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 /svx/source | |
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 'svx/source')
-rw-r--r-- | svx/source/dialog/compressgraphicdialog.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/ctredlin.cxx | 8 | ||||
-rw-r--r-- | svx/source/dialog/imapdlg.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/rubydialog.cxx | 4 | ||||
-rw-r--r-- | svx/source/dialog/srchdlg.cxx | 34 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/tbxform.cxx | 4 | ||||
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 4 | ||||
-rw-r--r-- | svx/source/tbxctrls/grafctrl.cxx | 8 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 2 | ||||
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 2 | ||||
-rw-r--r-- | svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 2 |
13 files changed, 39 insertions, 39 deletions
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index c58cfac3dd9a..ff33a9da6334 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -235,7 +235,7 @@ IMPL_LINK_NOARG( CompressGraphicsDialog, NewHeightModifiedHdl ) IMPL_LINK_NOARG( CompressGraphicsDialog, ResolutionModifiedHdl ) { - m_dResolution = (double) m_pResolutionLB->GetText().ToInt32(); + m_dResolution = (double) m_pResolutionLB->GetText().toInt32(); UpdateNewWidthMF(); UpdateNewHeightMF(); diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index fabdccc53088..86c86cab18e3 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -1183,7 +1183,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF) Time aTime(0); if(&aDfDate==pTF) { - if(aDfDate.GetText().Len()==0) + if(aDfDate.GetText().isEmpty()) aDfDate.SetDate(aDate); if(pRedlinTable!=NULL) @@ -1191,7 +1191,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF) } else if(&aDfDate2==pTF) { - if(aDfDate2.GetText().Len()==0) + if(aDfDate2.GetText().isEmpty()) aDfDate2.SetDate(aDate); if(pRedlinTable!=NULL) @@ -1199,7 +1199,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF) } else if(&aTfDate==pTF) { - if(aTfDate.GetText().Len()==0) + if(aTfDate.GetText().isEmpty()) aTfDate.SetTime(aTime); if(pRedlinTable!=NULL) @@ -1207,7 +1207,7 @@ IMPL_LINK( SvxTPFilter, ModifyDate, void*,pTF) } else if(&aTfDate2==pTF) { - if(aTfDate2.GetText().Len()==0) + if(aTfDate2.GetText().isEmpty()) aTfDate2.SetTime(aTime); if(pRedlinTable!=NULL) diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index 55495dafbcf8..ddf0f3bb5d8c 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -636,10 +636,10 @@ IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow*, pWnd ) aStbStatus.SetItemText( 1, rInfo.aMarkURL ); - if ( maURLBox.GetText() != rInfo.aMarkURL ) + if ( maURLBox.GetText() != OUString(rInfo.aMarkURL) ) maURLBox.SetText( rInfo.aMarkURL ); - if ( aEdtText.GetText() != rInfo.aMarkAltText ) + if ( aEdtText.GetText() != OUString(rInfo.aMarkAltText) ) aEdtText.SetText( rInfo.aMarkAltText ); if ( !rInfo.aMarkTarget.Len() ) diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 00d0ff002fd6..708f52b69ebb 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -409,8 +409,8 @@ void SvxRubyDialog::GetText() for(int i = 0; i < 8; i+=2) { if(aEditArr[i]->IsEnabled() && - (aEditArr[i]->GetText() != aEditArr[i]->GetSavedValue() || - aEditArr[i + 1]->GetText() != aEditArr[i + 1]->GetSavedValue())) + (aEditArr[i]->GetText() != OUString(aEditArr[i]->GetSavedValue()) || + aEditArr[i + 1]->GetText() != OUString(aEditArr[i + 1]->GetSavedValue()))) { Sequence<PropertyValues>& aRubyValues = pImpl->GetRubyValues(); DBG_ASSERT(aRubyValues.getLength() > (i / 2 + nTempLastPos), "wrong index" ); diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index f0dcab2e65a5..0371a66bd1f3 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -480,12 +480,12 @@ void SvxSearchDialog::Construct_Impl() } catch(uno::Exception&){} - if(aSearchComponent1PB.GetText().Len() && bSearchComponent1 ) + if(!aSearchComponent1PB.GetText().isEmpty() && bSearchComponent1 ) { aSearchComponentFL.Show(); aSearchComponent1PB.Show(); } - if( aSearchComponent2PB.GetText().Len() ) + if( !aSearchComponent2PB.GetText().isEmpty() ) { if(!aSearchComponent1PB.IsVisible()) { @@ -1122,14 +1122,14 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) else EnableControl_Impl( &aWordBtn ); - String aSrchAttrTxt; + OUString aSrchAttrTxt; if ( pImpl->bMultiLineEdit ) aSrchAttrTxt = pImpl->aSearchFormats.GetText(); else aSrchAttrTxt = aSearchAttrText.GetText(); - bDisableSearch = !aSearchLB.GetText().Len() && !aSrchAttrTxt.Len(); + bDisableSearch = aSearchLB.GetText().isEmpty() && aSrchAttrTxt.isEmpty(); } FocusHdl_Impl( &aSearchLB ); @@ -1159,8 +1159,8 @@ void SvxSearchDialog::Init_Impl( int bSearchPattern ) } } - if ( ( !pImpl->bMultiLineEdit && aSearchAttrText.GetText().Len() ) || - ( pImpl->bMultiLineEdit && pImpl->aSearchFormats.GetText().Len() ) ) + if ( ( !pImpl->bMultiLineEdit && !aSearchAttrText.GetText().isEmpty() ) || + ( pImpl->bMultiLineEdit && !pImpl->aSearchFormats.GetText().isEmpty() ) ) EnableControl_Impl( &aNoFormatBtn ); else aNoFormatBtn.Disable(); @@ -1375,7 +1375,7 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) IMPL_LINK( SvxSearchDialog, CommandHdl_Impl, Button *, pBtn ) { - bool bInclusive = ( aLayoutBtn.GetText() == aLayoutStr ); + bool bInclusive = ( aLayoutBtn.GetText() == OUString(aLayoutStr) ); if ( ( pBtn == &aSearchBtn ) || ( pBtn == &aSearchAllBtn ) || @@ -1549,16 +1549,16 @@ IMPL_LINK( SvxSearchDialog, ModifyHdl_Impl, ComboBox *, pEd ) if ( pEd == &aSearchLB || pEd == &aReplaceLB ) { - xub_StrLen nSrchTxtLen = aSearchLB.GetText().Len(); - xub_StrLen nReplTxtLen = 0; + sal_Int32 nSrchTxtLen = aSearchLB.GetText().getLength(); + sal_Int32 nReplTxtLen = 0; if (bAllowEmptySearch) - nReplTxtLen = aReplaceLB.GetText().Len(); + nReplTxtLen = aReplaceLB.GetText().getLength(); xub_StrLen nAttrTxtLen = 0; if ( !pImpl->bMultiLineEdit ) - nAttrTxtLen = aSearchAttrText.GetText().Len(); + nAttrTxtLen = aSearchAttrText.GetText().getLength(); else - nAttrTxtLen = pImpl->aSearchFormats.GetText().Len(); + nAttrTxtLen = pImpl->aSearchFormats.GetText().getLength(); if (nSrchTxtLen || nReplTxtLen || nAttrTxtLen) { @@ -1984,12 +1984,12 @@ void SvxSearchDialog::SetItem_Impl( const SvxSearchItem* pItem ) IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl ) { - xub_StrLen nTxtLen; + sal_Int32 nTxtLen; if ( !pImpl->bMultiLineEdit ) - nTxtLen = aSearchAttrText.GetText().Len(); + nTxtLen = aSearchAttrText.GetText().getLength(); else - nTxtLen = pImpl->aSearchFormats.GetText().Len(); + nTxtLen = pImpl->aSearchFormats.GetText().getLength(); if ( pCtrl == &aSearchLB || pCtrl == &pImpl->aSearchFormats ) { @@ -2010,8 +2010,8 @@ IMPL_LINK( SvxSearchDialog, FocusHdl_Impl, Control *, pCtrl ) pCtrl = &aReplaceLB; bSearch = sal_False; - if ( ( !pImpl->bMultiLineEdit && aReplaceAttrText.GetText().Len() ) || - ( pImpl->bMultiLineEdit && pImpl->aReplaceFormats.GetText().Len() ) ) + if ( ( !pImpl->bMultiLineEdit && !aReplaceAttrText.GetText().isEmpty() ) || + ( pImpl->bMultiLineEdit && !pImpl->aReplaceFormats.GetText().isEmpty() ) ) EnableControl_Impl( &aNoFormatBtn ); else aNoFormatBtn.Disable(); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 2258563eeb4a..0281ed3bc657 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1619,7 +1619,7 @@ sal_Bool DbFormattedField::commitControl() DBG_ASSERT(&rField == m_pWindow, "DbFormattedField::commitControl : can't work with a window other than my own !"); if (m_rColumn.IsNumeric()) { - if (rField.GetText().Len() != 0) + if (!rField.GetText().isEmpty()) aNewVal <<= rField.GetValue(); // ein LeerString wird erst mal standardmaessig als void weitergereicht } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 9a4081656770..d6434e18e76f 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -318,7 +318,7 @@ DbGridControl::NavigationBar::AbsolutePos::AbsolutePos(Window* pParent, WinBits //------------------------------------------------------------------------------ void DbGridControl::NavigationBar::AbsolutePos::KeyInput(const KeyEvent& rEvt) { - if (rEvt.GetKeyCode() == KEY_RETURN && GetText().Len()) + if (rEvt.GetKeyCode() == KEY_RETURN && !GetText().isEmpty()) { sal_Int64 nRecord = GetValue(); if (nRecord < GetMin() || nRecord > GetMax()) diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index efa8bdc3642d..42dd0335b94b 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -73,7 +73,7 @@ SvxFmAbsRecWin::~SvxFmAbsRecWin() // ----------------------------------------------------------------------- void SvxFmAbsRecWin::FirePosition( sal_Bool _bForce ) { - if ( _bForce || ( GetText() != GetSavedValue() ) ) + if ( _bForce || ( GetText() != OUString(GetSavedValue()) ) ) { sal_Int64 nRecord = GetValue(); if (nRecord < GetMin() || nRecord > GetMax()) @@ -105,7 +105,7 @@ void SvxFmAbsRecWin::LoseFocus() // ----------------------------------------------------------------------- void SvxFmAbsRecWin::KeyInput( const KeyEvent& rKeyEvent ) { - if( rKeyEvent.GetKeyCode() == KEY_RETURN && GetText().Len() ) + if( rKeyEvent.GetKeyCode() == KEY_RETURN && !GetText().isEmpty() ) FirePosition( sal_True ); else NumericField::KeyInput( rKeyEvent ); diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index d72f47749df3..6b8ed1c925cc 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -352,7 +352,7 @@ GalleryBrowser2::GalleryBrowser2( GalleryBrowser* pParent, const ResId& rResId, SetMode( ( GALLERYBROWSERMODE_PREVIEW != GalleryBrowser2::meInitMode ) ? GalleryBrowser2::meInitMode : GALLERYBROWSERMODE_ICON ); - if(maInfoBar.GetText().Len() == 0) + if(maInfoBar.GetText().isEmpty()) mpIconView->SetAccessibleRelationLabeledBy(mpIconView); else mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar); @@ -672,7 +672,7 @@ void GalleryBrowser2::SelectTheme( const String& rThemeName ) maViewBox.EnableItem( TBX_ID_LIST, sal_True ); maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, sal_True ); - if(maInfoBar.GetText().Len() == 0) + if(maInfoBar.GetText().isEmpty()) mpIconView->SetAccessibleRelationLabeledBy(mpIconView); else mpIconView->SetAccessibleRelationLabeledBy(&maInfoBar); diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx index de11a0238814..71e9b19edc08 100644 --- a/svx/source/tbxctrls/grafctrl.cxx +++ b/svx/source/tbxctrls/grafctrl.cxx @@ -230,7 +230,7 @@ void ImplGrafMetricField::Update( const SfxPoolItem* pItem ) SetValue( nValue ); } else - SetText( String() ); + SetText( OUString() ); } // -------------------- @@ -292,7 +292,7 @@ public: ~ImplGrafControl(); void Update( const SfxPoolItem* pItem ) { maField.Update( pItem ); } - void SetText( const String& rStr ) { maField.SetText( rStr ); } + void SetText( const OUString& rStr ) { maField.SetText( rStr ); } }; // ----------------------------------------------------------------------------- @@ -562,7 +562,7 @@ void SvxGrafToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const if( eState == SFX_ITEM_DISABLED ) { pCtrl->Disable(); - pCtrl->SetText( String() ); + pCtrl->SetText( OUString() ); } else { @@ -703,7 +703,7 @@ void SvxGrafModeToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, c if( eState == SFX_ITEM_DISABLED ) { pCtrl->Disable(); - pCtrl->SetText( String() ); + pCtrl->SetText( OUString() ); } else { diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 8c7d0d21a2a7..d49fc251d775 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -793,7 +793,7 @@ void SvxFontNameBox_Impl::Update( const SvxFontItem* pFontItem ) aCurFont.SetPitch ( pFontItem->GetPitch() ); aCurFont.SetCharSet ( pFontItem->GetCharSet() ); } - String aCurName = aCurFont.GetName(); + OUString aCurName = aCurFont.GetName(); if ( GetText() != aCurName ) SetText( aCurName ); } diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 0dff51068dfa..b643c7dcf83c 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -453,7 +453,7 @@ IMPL_LINK_NOARG(FindTextToolbarController, EditModifyHdl) ToolBox* pToolBox = (ToolBox*)pWindow; if ( pToolBox && m_pFindTextFieldControl ) { - if (m_pFindTextFieldControl->GetText().Len()>0) + if (!m_pFindTextFieldControl->GetText().isEmpty()) { if ( !pToolBox->IsItemEnabled(m_nDownSearchId) ) pToolBox->EnableItem(m_nDownSearchId, sal_True); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 98eaa94bd329..265afdf48478 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -675,7 +675,7 @@ IMPL_LINK_NOARG(ChineseDictionaryDialog, MappingSelectHdl) bool ChineseDictionaryDialog::isEditFieldsHaveContent() const { - return m_aED_Term.GetText().Len() && m_aED_Mapping.GetText().Len(); + return !m_aED_Term.GetText().isEmpty() && !m_aED_Mapping.GetText().isEmpty(); } bool ChineseDictionaryDialog::isEditFieldsContentEqualsSelectedListContent() const |