diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-08-12 20:13:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-13 09:22:29 +0100 |
commit | 6b2cc1eb6c7404d6934aad2d2c78555a45c9b4a8 (patch) | |
tree | f27113c8129692c06dc03602411a8f880b94bddb | |
parent | 89253a0c258c1107f598e5a37470ecb09055a895 (diff) |
XubString->OUString
Change-Id: I1db6254b23c5203c20c168989656d320f86a3bb9
-rw-r--r-- | dbaccess/source/ui/control/SqlNameEdit.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/FieldDescControl.hxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbtreelistbox.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/listviewitems.hxx | 2 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcutl.cxx | 2 | ||||
-rw-r--r-- | formula/source/ui/dlg/structpg.cxx | 2 | ||||
-rw-r--r-- | formula/source/ui/dlg/structpg.hxx | 2 | ||||
-rw-r--r-- | include/formula/funcutl.hxx | 2 | ||||
-rw-r--r-- | include/svx/sidebar/ValueSetWithTextControl.hxx | 14 | ||||
-rw-r--r-- | include/svx/svdmark.hxx | 14 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx | 6 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextCharacterSpacingControl.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/text/TextCharacterSpacingControl.hxx | 15 | ||||
-rw-r--r-- | svx/source/sidebar/tools/ValueSetWithTextControl.cxx | 10 | ||||
-rw-r--r-- | svx/source/svdraw/svdmark.cxx | 14 | ||||
-rw-r--r-- | sw/source/ui/sidebar/PageMarginControl.cxx | 34 |
17 files changed, 71 insertions, 72 deletions
diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx index 2e28ddd34684..6d815fc8a81b 100644 --- a/dbaccess/source/ui/control/SqlNameEdit.cxx +++ b/dbaccess/source/ui/control/SqlNameEdit.cxx @@ -38,18 +38,18 @@ namespace dbaui sal_Bool bCorrected = sal_False; if ( m_bCheck ) { - XubString sText = _sToCheck; - xub_StrLen nMatch = 0; - for ( xub_StrLen i=nMatch;i < sText.Len(); ++i ) + OUString sText = _sToCheck; + sal_Int32 nMatch = 0; + for (sal_Int32 i = nMatch; i < sText.getLength(); ++i) { - if ( !isCharOk( sText.GetBuffer()[i], i == 0, m_bOnlyUpperCase, m_sAllowedChars ) ) + if ( !isCharOk( sText[i], i == 0, m_bOnlyUpperCase, m_sAllowedChars ) ) { - _rsCorrected += sText.Copy( nMatch, i - nMatch ); + _rsCorrected += sText.copy(nMatch, i - nMatch); bCorrected = sal_True; nMatch = i + 1; } } - _rsCorrected += sText.Copy( nMatch, sText.Len() - nMatch ); + _rsCorrected += sText.copy( nMatch, sText.getLength() - nMatch ); } return bCorrected; } diff --git a/dbaccess/source/ui/inc/FieldDescControl.hxx b/dbaccess/source/ui/inc/FieldDescControl.hxx index 54409082f284..c05021a52aaf 100644 --- a/dbaccess/source/ui/inc/FieldDescControl.hxx +++ b/dbaccess/source/ui/inc/FieldDescControl.hxx @@ -102,8 +102,8 @@ namespace dbaui TOTypeInfoSP m_pPreviousType; short m_nPos; - XubString aYes; - XubString aNo; + OUString aYes; + OUString aNo; long m_nOldVThumb; long m_nOldHThumb; diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index d15c7b404969..16ad5901134e 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -35,7 +35,7 @@ namespace dbaui struct DBTreeEditedEntry { SvTreeListEntry* pEntry; - XubString aNewText; + OUString aNewText; }; class IEntryFilter diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx index 2dc6dd19bade..f9a81789921f 100644 --- a/dbaccess/source/ui/inc/listviewitems.hxx +++ b/dbaccess/source/ui/inc/listviewitems.hxx @@ -37,7 +37,7 @@ namespace dbaui sal_Bool m_bEmphasized; public: - OBoldListboxString(SvTreeListEntry* _pEntry, sal_uInt16 _nFlags, const XubString& _rStr) + OBoldListboxString(SvTreeListEntry* _pEntry, sal_uInt16 _nFlags, const OUString& _rStr) :SvLBoxString(_pEntry, _nFlags, _rStr) ,m_bEmphasized(sal_False) { diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index eb2bb819f4ed..3b9556a187fe 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -896,7 +896,7 @@ void RefEdit::SetRefValid(bool bValid) } } -void RefEdit::SetText( const XubString& rStr ) +void RefEdit::SetText(const OUString& rStr) { Edit::SetText( rStr ); UpdateHdl( &aTimer ); diff --git a/formula/source/ui/dlg/structpg.cxx b/formula/source/ui/dlg/structpg.cxx index 32f0de7be037..d672f73c1ab4 100644 --- a/formula/source/ui/dlg/structpg.cxx +++ b/formula/source/ui/dlg/structpg.cxx @@ -45,7 +45,7 @@ StructListBox::StructListBox(Window* pParent, const ResId& rResId ): } SvTreeListEntry* StructListBox::InsertStaticEntry( - const XubString& rText, + const OUString& rText, const Image& rEntryImg, SvTreeListEntry* pParent, sal_uLong nPos, IFormulaToken* pToken ) { diff --git a/formula/source/ui/dlg/structpg.hxx b/formula/source/ui/dlg/structpg.hxx index c68459b90280..fe68eead386f 100644 --- a/formula/source/ui/dlg/structpg.hxx +++ b/formula/source/ui/dlg/structpg.hxx @@ -52,7 +52,7 @@ public: /** Inserts an entry with static image (no difference between collapsed/expanded). */ SvTreeListEntry* InsertStaticEntry( - const XubString& rText, + const OUString& rText, const Image& rEntryImg, SvTreeListEntry* pParent = NULL, sal_uLong nPos = LIST_APPEND, diff --git a/include/formula/funcutl.hxx b/include/formula/funcutl.hxx index 0d802f137893..b34d56b85ee1 100644 --- a/include/formula/funcutl.hxx +++ b/include/formula/funcutl.hxx @@ -59,7 +59,7 @@ public: void SetRefValid(bool bValid); using Edit::SetText; - virtual void SetText( const XubString& rStr ); + void SetText( const OUString& rStr ); virtual void Modify(); void StartUpdateData(); diff --git a/include/svx/sidebar/ValueSetWithTextControl.hxx b/include/svx/sidebar/ValueSetWithTextControl.hxx index d0e524ca4e70..fe8a7aa41424 100644 --- a/include/svx/sidebar/ValueSetWithTextControl.hxx +++ b/include/svx/sidebar/ValueSetWithTextControl.hxx @@ -78,8 +78,8 @@ public: void AddItem( const Image& rItemImage, const Image* pSelectedItemImage, - const XubString& rItemText, - const XubString* pItemHelpText ); + const OUString& rItemText, + const OUString* pItemHelpText ); // replace item images for control type IMAGE_TEXT void ReplaceItemImages( @@ -92,9 +92,9 @@ public: // @param pItemHelpText // help text is optional. if not provided, it is the same as the item text void AddItem( - const XubString& rItemText, - const XubString& rItemText2, - const XubString* pItemHelpText ); + const OUString& rItemText, + const OUString& rItemText2, + const OUString* pItemHelpText ); virtual void UserDraw( const UserDrawEvent& rUDEvt ); @@ -103,8 +103,8 @@ private: { Image maItemImage; Image maSelectedItemImage; - XubString maItemText; - XubString maItemText2; + OUString maItemText; + OUString maItemText2; }; typedef ::std::vector< ValueSetWithTextItem > tItemList; diff --git a/include/svx/svdmark.hxx b/include/svx/svdmark.hxx index 09b4bfa06d4c..faeae356b0e7 100644 --- a/include/svx/svdmark.hxx +++ b/include/svx/svdmark.hxx @@ -168,9 +168,9 @@ class SVX_DLLPUBLIC SdrMarkList protected: std::vector<SdrMark*> maList; - String maMarkName; - String maPointName; - String maGluePointName; + OUString maMarkName; + OUString maPointName; + OUString maGluePointName; sal_Bool mbPointNameOk; sal_Bool mbGluePointNameOk; @@ -182,7 +182,7 @@ private: SVX_DLLPRIVATE void ImpForceSort(); private: - SVX_DLLPRIVATE const XubString& GetPointMarkDescription(sal_Bool bGlue) const; + SVX_DLLPRIVATE const OUString& GetPointMarkDescription(sal_Bool bGlue) const; public: SdrMarkList() @@ -235,13 +235,13 @@ public: // A verbal description of selected objects e.g.: // "27 Lines", "12 Objects", "Polygon" or even "Not an object" - const String& GetMarkDescription() const; - const String& GetPointMarkDescription() const + const OUString& GetMarkDescription() const; + const OUString& GetPointMarkDescription() const { return GetPointMarkDescription(sal_False); } - const String& GetGluePointMarkDescription() const + const OUString& GetGluePointMarkDescription() const { return GetPointMarkDescription(sal_True); } diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index fabb2086ea27..865377fee8ec 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -126,13 +126,13 @@ void ParaLineSpacingControl::initial() mpImgSel[2] = maSelSpacing15; mpImgSel[3] = maSelSpacing2; - mpStr = new XubString[4]; + mpStr = new OUString[4]; mpStr[0] = SVX_RESSTR(STR_SPACING1); mpStr[1] = SVX_RESSTR(STR_SPACING115); mpStr[2] = SVX_RESSTR(STR_SPACING15); mpStr[3] = SVX_RESSTR(STR_SPACING2); - mpStrTip = new XubString[4]; + mpStrTip = new OUString[4]; mpStrTip[0] = SVX_RESSTR(STR_LS_SINGLE); mpStrTip[1] = SVX_RESSTR(STR_LS_115); mpStrTip[2] = SVX_RESSTR(STR_LS_15); diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx index fc540c044971..2e29e8b2af00 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx @@ -88,12 +88,12 @@ private: Image maSelSelHanging; Image maImgCus; Image maImgCusGrey; - XubString maStrCus; + OUString maStrCus; Image* mpImg; Image* mpImgSel; - XubString* mpStr; - XubString* mpStrTip; + OUString* mpStr; + OUString* mpStrTip; String maLine; String maOf; diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx index 1f8b7222371f..bf5dd418ec67 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.cxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.cxx @@ -111,7 +111,7 @@ void TextCharacterSpacingControl::initial() mpImgSel[3] = Image(SVX_RES(IMG_LOOSE_S)); mpImgSel[4] = Image(SVX_RES(IMG_VERY_LOOSE_S)); - mpStr = new XubString[5]; + mpStr = new OUString[5]; mpStr[0] = SVX_RESSTR(STR_VERY_TIGHT); mpStr[1] = SVX_RESSTR(STR_TIGHT); mpStr[2] = SVX_RESSTR(STR_NORMAL); @@ -119,7 +119,7 @@ void TextCharacterSpacingControl::initial() mpStr[4] = SVX_RESSTR(STR_VERY_LOOSE); - mpStrTip = new XubString[5]; + mpStrTip = new OUString[5]; mpStrTip[0] = SVX_RESSTR(STR_VERY_TIGHT_TIP); mpStrTip[1] = SVX_RESSTR(STR_TIGHT_TIP); mpStrTip[2] = SVX_RESSTR(STR_NORMAL_TIP); diff --git a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx index f876f794562c..b47af09d9c9f 100644 --- a/svx/source/sidebar/text/TextCharacterSpacingControl.hxx +++ b/svx/source/sidebar/text/TextCharacterSpacingControl.hxx @@ -61,7 +61,6 @@ private: ValueSetWithTextControl maVSSpacing; FixedText maLastCus; -// Control maBorder; FixedText maFTSpacing; ListBox maLBKerning; @@ -70,16 +69,16 @@ private: Image* mpImg; Image* mpImgSel; - XubString* mpStr; - XubString* mpStrTip; + OUString* mpStr; + OUString* mpStrTip; Image maImgCus; Image maImgCusGrey; - XubString maStrCus; - XubString maStrCusE; //add - XubString maStrCusC; //add - XubString maStrCusN; //add - XubString maStrUnit; //add + OUString maStrCus; + OUString maStrCusE; + OUString maStrCusC; + OUString maStrCusN; + OUString maStrUnit; long mnCustomKern; short mnLastCus; diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index 91a1848a3b8d..37b5324b010a 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -88,8 +88,8 @@ ValueSetWithTextControl::~ValueSetWithTextControl(void) void ValueSetWithTextControl::AddItem( const Image& rItemImage, const Image* pSelectedItemImage, - const XubString& rItemText, - const XubString* pItemHelpText ) + const OUString& rItemText, + const OUString* pItemHelpText ) { if ( meControlType != IMAGE_TEXT ) { @@ -112,9 +112,9 @@ void ValueSetWithTextControl::AddItem( void ValueSetWithTextControl::AddItem( - const XubString& rItemText, - const XubString& rItemText2, - const XubString* pItemHelpText ) + const OUString& rItemText, + const OUString& rItemText2, + const OUString* pItemHelpText ) { if ( meControlType != TEXT_TEXT ) { diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index 1c6fb1f3e0c6..1c7bf49b50a8 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -540,7 +540,7 @@ sal_Bool SdrMarkList::InsertPageView(const SdrPageView& rPV) return bChgd; } -const XubString& SdrMarkList::GetMarkDescription() const +const OUString& SdrMarkList::GetMarkDescription() const { sal_uLong nAnz(GetMarkCount()); @@ -563,7 +563,7 @@ const XubString& SdrMarkList::GetMarkDescription() const if(!nAnz) { - ((SdrMarkList*)(this))->maMarkName = ImpGetResStr(STR_ObjNameNoObj); + const_cast<SdrMarkList*>(this)->maMarkName = ImpGetResStr(STR_ObjNameNoObj); } else if(1L == nAnz) { @@ -596,17 +596,17 @@ const XubString& SdrMarkList::GetMarkDescription() const aNam.Insert(OUString::number( nAnz ), 0); } - ((SdrMarkList*)(this))->maMarkName = aNam; - ((SdrMarkList*)(this))->mbNameOk = sal_True; + const_cast<SdrMarkList*>(this)->maMarkName = aNam; + const_cast<SdrMarkList*>(this)->mbNameOk = sal_True; } return maMarkName; } -const XubString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const +const OUString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const { sal_Bool& rNameOk = (sal_Bool&)(bGlue ? mbGluePointNameOk : mbPointNameOk); - XubString& rName = (XubString&)(bGlue ? maGluePointName : maPointName); + OUString& rName = const_cast<OUString&>(bGlue ? maGluePointName : maPointName); sal_uLong nMarkAnz(GetMarkCount()); sal_uLong nMarkPtAnz(0L); sal_uLong nMarkPtObjAnz(0L); @@ -650,7 +650,7 @@ const XubString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const if(!nMarkPtObjAnz) { - rName.Erase(); + rName = OUString(); rNameOk = sal_True; } else if(!rNameOk) diff --git a/sw/source/ui/sidebar/PageMarginControl.cxx b/sw/source/ui/sidebar/PageMarginControl.cxx index 89e0ca0617a9..05822c1f32af 100644 --- a/sw/source/ui/sidebar/PageMarginControl.cxx +++ b/sw/source/ui/sidebar/PageMarginControl.cxx @@ -167,14 +167,14 @@ void PageMarginControl::FillValueSet( const bool bLandscape, const bool bUserCustomValuesAvailable ) { - const XubString aLeft = SW_RES(STR_MARGIN_TOOLTIP_LEFT); - const XubString aRight = SW_RES(STR_MARGIN_TOOLTIP_RIGHT); - const XubString aTop = SW_RES(STR_MARGIN_TOOLTIP_TOP); - const XubString aBottom = SW_RES(STR_MARGIN_TOOLTIP_BOT); + const OUString aLeft = SW_RESSTR(STR_MARGIN_TOOLTIP_LEFT); + const OUString aRight = SW_RESSTR(STR_MARGIN_TOOLTIP_RIGHT); + const OUString aTop = SW_RESSTR(STR_MARGIN_TOOLTIP_TOP); + const OUString aBottom = SW_RESSTR(STR_MARGIN_TOOLTIP_BOT); SetMetricValue( maWidthHeightField, SWPAGE_NARROW_VALUE, meUnit ); - const XubString aNarrowValText = maWidthHeightField.GetText(); - XubString aHelpText = aLeft; + const OUString aNarrowValText = maWidthHeightField.GetText(); + OUString aHelpText = aLeft; aHelpText += aNarrowValText; aHelpText += aRight; aHelpText += aNarrowValText; @@ -184,10 +184,10 @@ void PageMarginControl::FillValueSet( aHelpText += aNarrowValText; mpMarginValueSet->AddItem( (bLandscape ? SW_RES(IMG_NARROW_L) : SW_RES(IMG_NARROW) ), 0, - SW_RES(STR_NARROW), &aHelpText ); + SW_RESSTR(STR_NARROW), &aHelpText ); SetMetricValue( maWidthHeightField, SWPAGE_NORMAL_VALUE, meUnit ); - const XubString aNormalValText = maWidthHeightField.GetText(); + const OUString aNormalValText = maWidthHeightField.GetText(); aHelpText = aLeft; aHelpText += aNormalValText; aHelpText += aRight; @@ -198,12 +198,12 @@ void PageMarginControl::FillValueSet( aHelpText += aNormalValText; mpMarginValueSet->AddItem( (bLandscape ? SW_RES(IMG_NORMAL_L) : SW_RES(IMG_NORMAL) ), 0, - SW_RES(STR_NORMAL), &aHelpText ); + SW_RESSTR(STR_NORMAL), &aHelpText ); SetMetricValue( maWidthHeightField, SWPAGE_WIDE_VALUE1, meUnit ); - const XubString aWide1ValText = maWidthHeightField.GetText(); + const OUString aWide1ValText = maWidthHeightField.GetText(); SetMetricValue( maWidthHeightField, SWPAGE_WIDE_VALUE2, meUnit ); - const XubString aWide2ValText = maWidthHeightField.GetText(); + const OUString aWide2ValText = maWidthHeightField.GetText(); aHelpText = aLeft; aHelpText += aWide2ValText; aHelpText += aRight; @@ -214,13 +214,13 @@ void PageMarginControl::FillValueSet( aHelpText += aWide1ValText; mpMarginValueSet->AddItem( (bLandscape ? SW_RES(IMG_WIDE_L) : SW_RES(IMG_WIDE) ), 0, - SW_RES(STR_WIDE), &aHelpText ); + SW_RESSTR(STR_WIDE), &aHelpText ); - const XubString aInner = SW_RES(STR_MARGIN_TOOLTIP_INNER); - const XubString aOuter = SW_RES(STR_MARGIN_TOOLTIP_OUTER); + const OUString aInner = SW_RESSTR(STR_MARGIN_TOOLTIP_INNER); + const OUString aOuter = SW_RESSTR(STR_MARGIN_TOOLTIP_OUTER); SetMetricValue( maWidthHeightField, SWPAGE_WIDE_VALUE3, meUnit ); - const XubString aWide3ValText = maWidthHeightField.GetText(); + const OUString aWide3ValText = maWidthHeightField.GetText(); aHelpText = aInner; aHelpText += aWide3ValText; aHelpText += aOuter; @@ -231,7 +231,7 @@ void PageMarginControl::FillValueSet( aHelpText += aWide1ValText; mpMarginValueSet->AddItem( (bLandscape ? SW_RES(IMG_MIRRORED_L) : SW_RES(IMG_MIRRORED) ), 0, - SW_RES(STR_MIRRORED), &aHelpText ); + SW_RESSTR(STR_MIRRORED), &aHelpText ); if ( bUserCustomValuesAvailable ) { @@ -254,7 +254,7 @@ void PageMarginControl::FillValueSet( } mpMarginValueSet->AddItem( (bUserCustomValuesAvailable ? SW_RES(IMG_CUSTOM) : SW_RES(IMG_CUSTOM_DIS) ), 0, - SW_RES(STR_LCVALUE), &aHelpText ); + SW_RESSTR(STR_LCVALUE), &aHelpText ); } |