X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyxfr1.C;h=ee35ba89820594536181a8052c500dc860f860fa;hb=a858be7332e331e0244e4dba7b0931b6072ffd3d;hp=acef2e73d61cebe0a35c65546f800fe472e96ce6;hpb=27de1486ca34aaad446adb798d71a77d6f6304da;p=lyx.git diff --git a/src/lyxfr1.C b/src/lyxfr1.C index acef2e73d6..ee35ba8982 100644 --- a/src/lyxfr1.C +++ b/src/lyxfr1.C @@ -1,18 +1,18 @@ /* This file is part of -* ====================================================== -* -* LyX, The Document Processor -* -* Copyright (C) 1995 Matthias Ettrich, -* Copyright (C) 1995-1998 The LyX Team. -* -*======================================================*/ + * ====================================================== + * + * LyX, The Document Processor + * + * Copyright 1995 Matthias Ettrich, + * Copyright 1995-1999 The LyX Team. + * + * ======================================================*/ #include -#include -#include -#include +#include +#include +#include #ifdef __GNUG__ #pragma implementation @@ -26,12 +26,13 @@ #include "lyxfr1.h" #include "lyxfunc.h" #include "lyxscreen.h" -#include "error.h" +#include "debug.h" #include "lyxtext.h" #include "gettext.h" #include "LyXView.h" #include "lyx_gui_misc.h" #include "minibuffer.h" +#include "support/lstrings.h" extern BufferView *current_view; // called too many times in this file... extern MiniBuffer *minibuffer; @@ -46,11 +47,11 @@ bool IsLetterCharOrDigit(char ch); // If nothing selected, select the word at the cursor. // Returns the current selection // Note: this function should be in LyXText! -LString const GetSelectionOrWordAtCursor(LyXText *lt); +string const GetSelectionOrWordAtCursor(LyXText *lt); // Returns the current selection. If nothing is selected or if the selection // spans 2 paragraphs, an empty string is returned. -LString const GetCurrentSelectionAsString(LyXText *lt); +string const GetCurrentSelectionAsString(LyXText *lt); // This is a copy of SetSelectionOverString from text.C // It does the same, but uses only the length as a parameter @@ -66,7 +67,7 @@ bool IsLetterCharOrDigit(char ch) // Returns the current selection. If nothing is selected or if the selection // spans 2 paragraphs, an empty string is returned. -LString const GetCurrentSelectionAsString(LyXText *lt) +string const GetCurrentSelectionAsString(LyXText *lt) { LyXParagraph *par; int pos; @@ -106,13 +107,13 @@ LString const GetCurrentSelectionAsString(LyXText *lt) } sz[i] = 0; } - return LString(sz); + return string(sz); } // If nothing selected, select the word at the cursor. // Returns the current selection -LString const GetSelectionOrWordAtCursor(LyXText *lt) +string const GetSelectionOrWordAtCursor(LyXText *lt) { lt->SelectWordWhenUnderCursor(); return GetCurrentSelectionAsString(lt); @@ -163,7 +164,7 @@ void LyXFindReplace1::SearchReplaceCB() return; } - LString const replacestring = ReplaceString(); + string const replacestring = ReplaceString(); current_view->getScreen()->HideCursor(); current_view->currentBuffer()->update(-2); @@ -204,7 +205,7 @@ void LyXFindReplace1::SearchReplaceAllCB() return; } - LString const replacestring = ReplaceString(); + string const replacestring = ReplaceString(); current_view->getScreen()->HideCursor(); @@ -234,8 +235,7 @@ void LyXFindReplace1::SearchReplaceAllCB() if( replace_count == 1 ) { minibuffer->Set(_("1 string has been replaced.")); } else { - LString str; - str += replace_count; + string str = tostr(replace_count); str += _(" strings have been replaced."); minibuffer->Set(str); } @@ -368,7 +368,7 @@ bool LyXFindReplace1::IsSearchStringInText(LyXParagraph *par, int pos) char chText; bool fPrevIsSpace; int iText; - int iSrch; + string::size_type iSrch; if (!par) return false;