From e3f11c10d8cc759d01afa4b8fd8bd98c81a03119 Mon Sep 17 00:00:00 2001 From: "Chr. Rossmanith" Date: Mon, 21 Jan 2013 14:32:09 +0100 Subject: 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 Tested-by: Michael Stahl --- extensions/source/abpilot/abpfinalpage.cxx | 4 ++-- extensions/source/dbpilots/groupboxwiz.cxx | 2 +- extensions/source/propctrlr/inspectorhelpwindow.cxx | 2 +- extensions/source/propctrlr/inspectorhelpwindow.hxx | 2 +- extensions/source/propctrlr/standardcontrol.cxx | 12 ++++++------ extensions/source/propctrlr/usercontrol.cxx | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) (limited to 'extensions') diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index bc34737151e5..aa5d46d146c0 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -182,8 +182,8 @@ namespace abp void FinalPage::implCheckName() { sal_Bool bValidName = isValidName(); - sal_Bool bEmptyName = 0 == m_aName.GetText().Len(); - sal_Bool bEmptyLocation = 0 == m_aLocation.GetText().Len(); + sal_Bool bEmptyName = m_aName.GetText().isEmpty(); + sal_Bool bEmptyLocation = m_aLocation.GetText().isEmpty(); // enable or disable the finish button getDialog()->enableButtons( WZB_FINISH, !bEmptyLocation && (!m_aRegisterName.IsChecked() || bValidName) ); diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 904c1c1c2ec1..36ddee11b6f3 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -319,7 +319,7 @@ namespace dbp { sal_Bool bHaveSome = (0 != m_aExistingRadios.GetEntryCount()); sal_Bool bSelectedSome = (0 != m_aExistingRadios.GetSelectEntryCount()); - sal_Bool bUnfinishedInput = (0 != m_aRadioName.GetText().Len()); + sal_Bool bUnfinishedInput = (!m_aRadioName.GetText().isEmpty()); m_aMoveLeft.Enable(bSelectedSome); m_aMoveRight.Enable(bUnfinishedInput); diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx index bbcf8f06d9c1..dfe7c9640122 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.cxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx @@ -52,7 +52,7 @@ namespace pcr } //-------------------------------------------------------------------- - void InspectorHelpWindow::SetText( const XubString& _rStr ) + void InspectorHelpWindow::SetText( const OUString& _rStr ) { m_aHelpText.SetText( _rStr ); } diff --git a/extensions/source/propctrlr/inspectorhelpwindow.hxx b/extensions/source/propctrlr/inspectorhelpwindow.hxx index 886240696221..0bb2eaee3152 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.hxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.hxx @@ -42,7 +42,7 @@ namespace pcr public: InspectorHelpWindow( Window* _pParent ); - virtual void SetText( const XubString& rStr ); + virtual void SetText( const OUString& rStr ); void SetLimits( sal_Int32 _nMinLines, sal_Int32 _nMaxLines ); long GetMinimalHeightPixel(); diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index a9f6f9bca84c..eb01b058d209 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -96,7 +96,7 @@ namespace pcr Any SAL_CALL OTimeControl::getValue() throw (RuntimeException) { Any aPropValue; - if ( getTypedControlWindow()->GetText().Len()>0 ) + if ( !getTypedControlWindow()->GetText().isEmpty() ) { ::Time aTime( getTypedControlWindow()->GetTime() ); util::Time aUNOTime( aTime.Get100Sec(), aTime.GetSec(), aTime.GetMin(), aTime.GetHour() ); @@ -150,7 +150,7 @@ namespace pcr Any SAL_CALL ODateControl::getValue() throw (RuntimeException) { Any aPropValue; - if ( getTypedControlWindow()->GetText().Len() > 0 ) + if ( !getTypedControlWindow()->GetText().isEmpty() ) { ::Date aDate( getTypedControlWindow()->GetDate() ); util::Date aUNODate( aDate.GetDay(), aDate.GetMonth(), aDate.GetYear() ); @@ -294,7 +294,7 @@ namespace pcr Any SAL_CALL ODateTimeControl::getValue() throw (RuntimeException) { Any aPropValue; - if ( getTypedControlWindow()->GetText().Len() ) + if ( !getTypedControlWindow()->GetText().isEmpty() ) { double nValue = getTypedControlWindow()->GetValue(); @@ -387,7 +387,7 @@ namespace pcr bool HyperlinkInput::impl_textHitTest( const ::Point& _rWindowPos ) { xub_StrLen nPos = GetCharPos( _rWindowPos ); - return ( ( nPos != STRING_LEN ) && ( nPos < GetText().Len() ) ); + return ( ( nPos != STRING_LEN ) && ( nPos < GetText().getLength() ) ); } //-------------------------------------------------------------------- @@ -631,7 +631,7 @@ namespace pcr Any SAL_CALL ONumericControl::getValue() throw (RuntimeException) { Any aPropValue; - if ( getTypedControlWindow()->GetText().Len() ) + if ( !getTypedControlWindow()->GetText().isEmpty() ) { double nValue = impl_fieldValueToApiValue_nothrow( getTypedControlWindow()->GetValue( m_eValueUnit ) ); aPropValue <<= nValue; @@ -1217,7 +1217,7 @@ namespace pcr m_pFloatingEdit->Show(); m_pFloatingEdit->getEdit()->GrabFocus(); - m_pFloatingEdit->getEdit()->SetSelection(Selection(m_pFloatingEdit->getEdit()->GetText().Len())); + m_pFloatingEdit->getEdit()->SetSelection(Selection(m_pFloatingEdit->getEdit()->GetText().getLength())); m_bDropdown=sal_True; if ( m_nOperationMode == eMultiLineText ) m_pFloatingEdit->getEdit()->SetText( m_pImplEdit->GetText() ); diff --git a/extensions/source/propctrlr/usercontrol.cxx b/extensions/source/propctrlr/usercontrol.cxx index 6f82fd2cc6bd..7f23e6a00ad7 100644 --- a/extensions/source/propctrlr/usercontrol.cxx +++ b/extensions/source/propctrlr/usercontrol.cxx @@ -155,7 +155,7 @@ namespace pcr Any SAL_CALL OFormatSampleControl::getValue() throw (RuntimeException) { Any aPropValue; - if ( getTypedControlWindow()->GetText().Len() ) + if ( !getTypedControlWindow()->GetText().isEmpty() ) aPropValue <<= (sal_Int32)getTypedControlWindow()->GetFormatKey(); return aPropValue; } @@ -201,7 +201,7 @@ namespace pcr Any SAL_CALL OFormattedNumericControl::getValue() throw (RuntimeException) { Any aPropValue; - if ( getTypedControlWindow()->GetText().Len() ) + if ( !getTypedControlWindow()->GetText().isEmpty() ) aPropValue <<= (double)getTypedControlWindow()->GetValue(); return aPropValue; } @@ -297,7 +297,7 @@ namespace pcr Any SAL_CALL OFileUrlControl::getValue() throw (RuntimeException) { Any aPropValue; - if ( getTypedControlWindow()->GetText().Len() ) + if ( !getTypedControlWindow()->GetText().isEmpty() ) aPropValue <<= (::rtl::OUString)getTypedControlWindow()->GetURL(); return aPropValue; } -- cgit v1.2.3