diff options
author | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2013-01-21 14:32:09 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-01-21 20:48:35 +0000 |
commit | e3f11c10d8cc759d01afa4b8fd8bd98c81a03119 (patch) | |
tree | 36191c6d90da559009161a1199d1176cf6a2bbba /editeng | |
parent | Fix Variable 'nMode' is reassigned (diff) | |
download | core-e3f11c10d8cc759d01afa4b8fd8bd98c81a03119.tar.gz core-e3f11c10d8cc759d01afa4b8fd8bd98c81a03119.zip |
Changed SetText() / GetText() to take/return OUString
replaced lots of Len() with isEmpty()
Change-Id: I6b82d48245ee2a0782e05a326f7934e9357227d0
Reviewed-on: https://gerrit.libreoffice.org/1795
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/editeng/editeng.hxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/editeng.cxx | 6 | ||||
-rw-r--r-- | editeng/source/editeng/editundo.hxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/editeng/inc/editeng/editeng.hxx b/editeng/inc/editeng/editeng.hxx index 0eb4b128c01b..48e236c160e7 100644 --- a/editeng/inc/editeng/editeng.hxx +++ b/editeng/inc/editeng/editeng.hxx @@ -244,7 +244,7 @@ public: const Size& GetMaxAutoPaperSize() const; void SetMaxAutoPaperSize( const Size& rSz ); - String GetText( LineEnd eEnd = LINEEND_LF ) const; + OUString GetText( LineEnd eEnd = LINEEND_LF ) const; String GetText( const ESelection& rSelection, const LineEnd eEnd = LINEEND_LF ) const; sal_uInt32 GetTextLen() const; sal_uInt32 GetTextHeight() const; @@ -272,7 +272,7 @@ public: ESelection GetWord( const ESelection& rSelection, sal_uInt16 nWordType ) const; void Clear(); - void SetText( const String& rStr ); + void SetText( const OUString& rStr ); EditTextObject* CreateTextObject(); EditTextObject* CreateTextObject( sal_uInt16 nPara, sal_uInt16 nParas = 1 ); diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx index 6a42c910ee67..762fcaf8b479 100644 --- a/editeng/source/editeng/editeng.cxx +++ b/editeng/source/editeng/editeng.cxx @@ -606,7 +606,7 @@ void EditEngine::SetMaxAutoPaperSize( const Size& rSz ) pImpEditEngine->SetMaxAutoPaperSize( rSz ); } -XubString EditEngine::GetText( LineEnd eEnd ) const +OUString EditEngine::GetText( LineEnd eEnd ) const { DBG_CHKTHIS( EditEngine, 0 ); return pImpEditEngine->GetEditDoc().GetText( eEnd ); @@ -1528,11 +1528,11 @@ void EditEngine::Clear() pImpEditEngine->Clear(); } -void EditEngine::SetText( const XubString& rText ) +void EditEngine::SetText( const OUString& rText ) { DBG_CHKTHIS( EditEngine, 0 ); pImpEditEngine->SetText( rText ); - if ( rText.Len() ) + if ( !rText.isEmpty() ) pImpEditEngine->FormatAndUpdate(); } diff --git a/editeng/source/editeng/editundo.hxx b/editeng/source/editeng/editundo.hxx index dbd0e4e3e671..0b1ed791add7 100644 --- a/editeng/source/editeng/editundo.hxx +++ b/editeng/source/editeng/editundo.hxx @@ -262,7 +262,7 @@ public: EditUndoTransliteration(EditEngine* pEE, const ESelection& rESel, sal_Int32 nMode); virtual ~EditUndoTransliteration(); - void SetText( const String& rText ) { aText = rText; } + void SetText( const OUString& rText ) { aText = rText; } void SetText( EditTextObject* pObj ) { pTxtObj = pObj; } void SetNewSelection( const ESelection& rSel ) { aNewESel = rSel; } |