From 9928fd7fc600efa620ad7c3b78c0b0051a4fa930 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Mon, 25 Jun 2012 10:07:22 +0100 Subject: [PATCH] remove some annoying XubStrings Change-Id: I8c34a344285b6929091788c6b7a5529b48943f94 --- accessibility/source/standard/vclxaccessiblelist.cxx | 2 +- chart2/source/controller/dialogs/tp_AxisPositions.cxx | 2 +- sd/source/ui/toolpanel/controls/DocumentHelper.cxx | 5 ++--- svtools/source/edit/svmedit.cxx | 8 ++++---- svx/source/unodraw/unoshtxt.cxx | 4 ++-- vcl/source/control/fixed.cxx | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/accessibility/source/standard/vclxaccessiblelist.cxx b/accessibility/source/standard/vclxaccessiblelist.cxx index 6abb056ed6be..75085418dea5 100644 --- a/accessibility/source/standard/vclxaccessiblelist.cxx +++ b/accessibility/source/standard/vclxaccessiblelist.cxx @@ -261,7 +261,7 @@ void VCLXAccessibleList::UpdateSelection (::rtl::OUString sTextOfSelectedItem) if ( pBox != NULL ) { // Find the index of the selected item inside the VCL control... - sal_uInt16 nIndex = pBox->GetEntryPos (XubString(sTextOfSelectedItem)); + sal_uInt16 nIndex = pBox->GetEntryPos(sTextOfSelectedItem); // ...and then find the associated accessibility object. if ( nIndex == LISTBOX_ENTRY_NOTFOUND ) nIndex = 0; diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index d60b44c38ac4..41fb85f3fea5 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -327,7 +327,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet& rInAttrs) else { m_aED_CrossesAtCategory.SetNoSelection(); - m_aED_CrossesAt.SetTextValue(XubString()); + m_aED_CrossesAt.SetTextValue(rtl::OUString()); } } else diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx index 25c60ebf92de..65ac625f1d34 100644 --- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx +++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx @@ -523,12 +523,11 @@ SdPage* DocumentHelper::ProvideMasterPage ( SdPage* pMasterPageInDocument = NULL; // Search for a master page with the same name as the given one in // the target document. - const XubString sMasterPageLayoutName (pMasterPage->GetLayoutName()); + const rtl::OUString sMasterPageLayoutName (pMasterPage->GetLayoutName()); for (sal_uInt16 nIndex=0,nCount=rTargetDocument.GetMasterPageCount(); nIndex(rTargetDocument.GetMasterPage(nIndex)); - if (pCandidate!=NULL - && sMasterPageLayoutName==pCandidate->GetLayoutName()) + if (pCandidate && sMasterPageLayoutName.equals(pCandidate->GetLayoutName())) { // The requested master page does already exist in the // target document, return it. diff --git a/svtools/source/edit/svmedit.cxx b/svtools/source/edit/svmedit.cxx index 8dd65023fda9..beb2153e4ffc 100644 --- a/svtools/source/edit/svmedit.cxx +++ b/svtools/source/edit/svmedit.cxx @@ -804,8 +804,8 @@ void TextWindow::KeyInput( const KeyEvent& rKEvent ) { // Damit die Selektion erhalten bleibt mbActivePopup = sal_True; - XubString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() ); - if ( aChars.Len() ) + rtl::OUString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() ); + if (!aChars.isEmpty()) { mpExtTextView->InsertText( aChars ); mpExtTextView->GetTextEngine()->SetModified( sal_True ); @@ -905,8 +905,8 @@ void TextWindow::Command( const CommandEvent& rCEvt ) break; case SV_MENU_EDIT_INSERTSYMBOL: { - XubString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() ); - if ( aChars.Len() ) + rtl::OUString aChars = Edit::GetGetSpecialCharsFunction()( this, GetFont() ); + if (!aChars.isEmpty()) { mpExtTextView->InsertText( aChars ); mpExtTextEngine->SetModified( sal_True ); diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx index 6779a018ce6a..f12a7630289c 100644 --- a/svx/source/unodraw/unoshtxt.cxx +++ b/svx/source/unodraw/unoshtxt.cxx @@ -657,9 +657,9 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder() if (mpOutliner->GetParagraphCount()==1) { // if we only have one paragraph we check if it is empty - XubString aStr( mpOutliner->GetText( mpOutliner->GetParagraph( 0 ) ) ); + rtl::OUString aStr(mpOutliner->GetText(mpOutliner->GetParagraph(0))); - if(!aStr.Len()) + if (aStr.isEmpty()) { // its empty, so we have to force the outliner to initialise itself mpOutliner->SetText( String(), mpOutliner->GetParagraph( 0 ) ); diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 06060734f02c..62fae387d47e 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -231,8 +231,8 @@ void FixedText::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); WinBits nWinStyle = GetStyle(); - XubString aText( GetText() ); - sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle ); + rtl::OUString aText( GetText() ); + sal_uInt16 nTextStyle = FixedText::ImplGetTextStyle( nWinStyle ); Point aPos = rPos; if ( nWinStyle & WB_EXTRAOFFSET )