Kaydet (Commit) 11986b61 authored tarafından Noel Grandin's avatar Noel Grandin

convert SvxAutocorrWord from String to OUString

Change-Id: I4f70ebb03d5028db77ab3d86eb884462c92ec9dc
üst ac85b6cf
...@@ -753,7 +753,7 @@ sal_Bool EdtAutoCorrDoc::ChgAutoCorrWord( sal_uInt16& rSttPos, ...@@ -753,7 +753,7 @@ sal_Bool EdtAutoCorrDoc::ChgAutoCorrWord( sal_uInt16& rSttPos,
"Cursor in the heart of the action?!"); "Cursor in the heart of the action?!");
nCursor -= ( nEndPos-rSttPos ); nCursor -= ( nEndPos-rSttPos );
mpEditEngine->InsertText(aSel, pFnd->GetLong()); mpEditEngine->InsertText(aSel, pFnd->GetLong());
nCursor = nCursor + pFnd->GetLong().Len(); nCursor = nCursor + pFnd->GetLong().getLength();
if( pPara ) if( pPara )
*pPara = pCurNode->GetString(); *pPara = pCurNode->GetString();
bRet = true; bRet = true;
......
...@@ -122,15 +122,15 @@ public: ...@@ -122,15 +122,15 @@ public:
class EDITENG_DLLPUBLIC SvxAutocorrWord class EDITENG_DLLPUBLIC SvxAutocorrWord
{ {
String sShort, sLong; OUString sShort, sLong;
sal_Bool bIsTxtOnly; // Is pure ASCII - Text sal_Bool bIsTxtOnly; // Is pure ASCII - Text
public: public:
SvxAutocorrWord( const String& rS, const String& rL, sal_Bool bFlag = sal_True ) SvxAutocorrWord( const OUString& rS, const OUString& rL, sal_Bool bFlag = sal_True )
: sShort( rS ), sLong( rL ), bIsTxtOnly( bFlag ) : sShort( rS ), sLong( rL ), bIsTxtOnly( bFlag )
{} {}
const String& GetShort() const { return sShort; } const OUString& GetShort() const { return sShort; }
const String& GetLong() const { return sLong; } const OUString& GetLong() const { return sLong; }
sal_Bool IsTextOnly() const { return bIsTxtOnly; } sal_Bool IsTextOnly() const { return bIsTxtOnly; }
}; };
......
...@@ -328,8 +328,8 @@ sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPo ...@@ -328,8 +328,8 @@ sal_Bool SwAutoCorrDoc::ChgAutoCorrWord( xub_StrLen & rSttPos, xub_StrLen nEndPo
if( pFnd->IsTextOnly() ) if( pFnd->IsTextOnly() )
{ {
//JP 22.04.99: Bug 63883 - Special treatment for dots. //JP 22.04.99: Bug 63883 - Special treatment for dots.
if( !bLastCharIsPoint || !pFnd->GetLong().Len() || if( !bLastCharIsPoint || pFnd->GetLong().isEmpty() ||
'.' != pFnd->GetLong().GetChar( pFnd->GetLong().Len() - 1 ) ) '.' != pFnd->GetLong()[ pFnd->GetLong().getLength() - 1 ] )
{ {
// replace the selection // replace the selection
pDoc->ReplaceRange( aPam, pFnd->GetLong(), false); pDoc->ReplaceRange( aPam, pFnd->GetLong(), false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment