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 /vcl/source/edit | |
parent | 87f9d7da00857c649784a7d9eca046bf6e71ae3c (diff) |
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 'vcl/source/edit')
-rw-r--r-- | vcl/source/edit/texteng.cxx | 8 | ||||
-rw-r--r-- | vcl/source/edit/vclmedit.cxx | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index cf7fcc785955..2bd7234ab926 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -445,7 +445,7 @@ void TextEngine::ImpRemoveText() ResetUndo(); } -void TextEngine::SetText( const XubString& rText ) +void TextEngine::SetText( const OUString& rText ) { ImpRemoveText(); @@ -457,7 +457,7 @@ void TextEngine::SetText( const XubString& rText ) TextSelection aEmptySel( aStartPaM, aStartPaM ); TextPaM aPaM = aStartPaM; - if ( rText.Len() ) + if ( !rText.isEmpty() ) aPaM = ImpInsertText( aEmptySel, rText ); for ( sal_uInt16 nView = 0; nView < mpViews->size(); nView++ ) @@ -467,11 +467,11 @@ void TextEngine::SetText( const XubString& rText ) // Wenn kein Text, dann auch Kein Format&Update // => Der Text bleibt stehen. - if ( !rText.Len() && GetUpdateMode() ) + if ( rText.isEmpty() && GetUpdateMode() ) pView->Invalidate(); } - if( !rText.Len() ) // sonst muss spaeter noch invalidiert werden, !bFormatted reicht. + if( rText.isEmpty() ) // sonst muss spaeter noch invalidiert werden, !bFormatted reicht. mnCurTextHeight = 0; FormatAndUpdate(); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 23109d612ada..7bcde9360b2b 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -128,8 +128,8 @@ public: void Copy(); void Paste(); - void SetText( const String& rStr ); - String GetText() const; + void SetText( const OUString& rStr ); + OUString GetText() const; String GetText( LineEnd aSeparator ) const; String GetTextLines( LineEnd aSeparator ) const; @@ -491,7 +491,7 @@ void ImpVclMEdit::Paste() mpTextWindow->GetTextView()->Paste(); } -void ImpVclMEdit::SetText( const String& rStr ) +void ImpVclMEdit::SetText( const OUString& rStr ) { sal_Bool bWasModified = mpTextWindow->GetTextEngine()->IsModified(); mpTextWindow->GetTextEngine()->SetText( rStr ); @@ -505,7 +505,7 @@ void ImpVclMEdit::SetText( const String& rStr ) ImpUpdateSrollBarVis( nWinStyle ); } -String ImpVclMEdit::GetText() const +OUString ImpVclMEdit::GetText() const { return mpTextWindow->GetTextEngine()->GetText(); } @@ -1161,17 +1161,17 @@ void VclMultiLineEdit::Paste() pImpVclMEdit->Paste(); } -void VclMultiLineEdit::SetText( const String& rStr ) +void VclMultiLineEdit::SetText( const OUString& rStr ) { pImpVclMEdit->SetText( rStr ); } -String VclMultiLineEdit::GetText() const +OUString VclMultiLineEdit::GetText() const { return pImpVclMEdit->GetText(); } -String VclMultiLineEdit::GetText( LineEnd aSeparator ) const +OUString VclMultiLineEdit::GetText( LineEnd aSeparator ) const { return pImpVclMEdit->GetText( aSeparator ); } |