diff options
author | Noel Grandin <noel@peralex.com> | 2013-09-04 16:41:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-09-05 08:55:14 +0200 |
commit | 9f04bfd8d53a7640bd6f0707708401a8ac9fb386 (patch) | |
tree | e37382ef6bbaf8085bdc90c270134a5ec308ee61 /svx | |
parent | e0848f6dae86e53dac12b18120e4362957d000d2 (diff) |
convert svx/* from XubString to OUString
Change-Id: Ifa063924d95bfe397bd512411a44247d4c016018
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/form/fmpgeimp.cxx | 4 | ||||
-rw-r--r-- | svx/source/form/navigatortreemodel.cxx | 12 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthControl.cxx | 22 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthControl.hxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthValueSet.cxx | 4 | ||||
-rw-r--r-- | svx/source/sidebar/line/LineWidthValueSet.hxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svddrgv.cxx | 13 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv1.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdedxv.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdfmtf.cxx | 15 | ||||
-rw-r--r-- | svx/source/svdraw/svdglev.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdmark.cxx | 20 | ||||
-rw-r--r-- | svx/source/svdraw/svdopath.cxx | 4 | ||||
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdpntv.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdpoev.cxx | 6 | ||||
-rw-r--r-- | svx/source/svdraw/svdview.cxx | 4 | ||||
-rw-r--r-- | svx/source/xoutdev/xtabcolr.cxx | 123 | ||||
-rw-r--r-- | svx/source/xoutdev/xtabdash.cxx | 15 |
19 files changed, 109 insertions, 169 deletions
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx index 733173929e00..2dc627569a10 100644 --- a/svx/source/form/fmpgeimp.cxx +++ b/svx/source/form/fmpgeimp.cxx @@ -498,8 +498,8 @@ Reference< ::com::sun::star::form::XForm > FmFormPageImpl::findPlaceInFormCompo if( bUndo ) { OUString aStr(SVX_RESSTR(RID_STR_FORM)); - XubString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT)); - aUndoStr.SearchAndReplace(OUString('#'), aStr); + OUString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT)); + aUndoStr = aUndoStr.replaceFirst("#", aStr); pModel->BegUndo(aUndoStr); } diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx index 263826e84f19..bbcfcb31c393 100644 --- a/svx/source/form/navigatortreemodel.cxx +++ b/svx/source/form/navigatortreemodel.cxx @@ -275,7 +275,7 @@ namespace svxform Reference< XChild > xElement( pEntry->GetChildIFace() ); if (bAlterModel) { - XubString aStr; + OUString aStr; if (pEntry->ISA(FmFormData)) aStr = SVX_RESSTR(RID_STR_FORM); else @@ -291,8 +291,8 @@ namespace svxform if( bUndo ) { - XubString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT)); - aUndoStr.SearchAndReplace(OUString('#'), aStr); + OUString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_INSERT)); + aUndoStr = aUndoStr.replaceFirst("#", aStr); m_pFormModel->BegUndo(aUndoStr); } @@ -381,7 +381,7 @@ namespace svxform Reference< XChild > xElement ( pEntry->GetChildIFace() ); if (bAlterModel) { - XubString aStr; + OUString aStr; if (pEntry->ISA(FmFormData)) aStr = SVX_RESSTR(RID_STR_FORM); else @@ -389,8 +389,8 @@ namespace svxform if( bUndo ) { - XubString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_REMOVE)); - aUndoStr.SearchAndReplace(OUString('#'), aStr); + OUString aUndoStr(SVX_RESSTR(RID_STR_UNDO_CONTAINER_REMOVE)); + aUndoStr = aUndoStr.replaceFirst("#", aStr); m_pFormModel->BegUndo(aUndoStr); } } diff --git a/svx/source/sidebar/line/LineWidthControl.cxx b/svx/source/sidebar/line/LineWidthControl.cxx index 924cba021062..38b86f46330e 100644 --- a/svx/source/sidebar/line/LineWidthControl.cxx +++ b/svx/source/sidebar/line/LineWidthControl.cxx @@ -130,16 +130,16 @@ void LineWidthControl::Initialize() maMFWidth.SetMin( maMFWidth.Normalize( nMin ), FUNIT_TWIP ); maMFWidth.SetMax( maMFWidth.Normalize( nMax ), FUNIT_TWIP ); - rStr = new XubString[9]; + rStr = new OUString[9]; //modify, - rStr[0] = OUString("05"); - rStr[1] = OUString("08"); - rStr[2] = OUString("10"); - rStr[3] = OUString("15"); - rStr[4] = OUString("23"); - rStr[5] = OUString("30"); - rStr[6] = OUString("45"); - rStr[7] = OUString("60"); + rStr[0] = "05"; + rStr[1] = "08"; + rStr[2] = "10"; + rStr[3] = "15"; + rStr[4] = "23"; + rStr[5] = "30"; + rStr[6] = "45"; + rStr[7] = "60"; rStr[8] = SVX_RESSTR(STR_WIDTH_LAST_CUSTOM); const LocaleDataWrapper& rLocaleWrapper( Application::GetSettings().GetLocaleDataWrapper() ); @@ -147,8 +147,8 @@ void LineWidthControl::Initialize() for(int i = 0; i <= 7 ; i++) { - rStr[i] = rStr[i].Insert(cSep, 1);//Modify - rStr[i].Append(mstrPT); + rStr[i] = rStr[i].replaceAt(1, 1, OUString(cSep));//Modify + rStr[i] += mstrPT; } //end diff --git a/svx/source/sidebar/line/LineWidthControl.hxx b/svx/source/sidebar/line/LineWidthControl.hxx index c31a3de16635..e4060f9de3cd 100644 --- a/svx/source/sidebar/line/LineWidthControl.hxx +++ b/svx/source/sidebar/line/LineWidthControl.hxx @@ -50,8 +50,8 @@ private: FixedText maFTWidth; MetricField maMFWidth; SfxMapUnit meMapUnit; - XubString* rStr; - XubString mstrPT; // + OUString* rStr; + OUString mstrPT; // long mnCustomWidth; bool mbCustom; bool mbColseByEdit; diff --git a/svx/source/sidebar/line/LineWidthValueSet.cxx b/svx/source/sidebar/line/LineWidthValueSet.cxx index ffecfb29b926..d19c315d6a2f 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.cxx +++ b/svx/source/sidebar/line/LineWidthValueSet.cxx @@ -29,7 +29,7 @@ LineWidthValueSet::LineWidthValueSet ( nSelItem(0), bCusEnable(false) { - strUnit = new XubString[9]; + strUnit = new OUString[9]; SetColCount( 1 ); SetLineCount( 9); } @@ -46,7 +46,7 @@ LineWidthValueSet::~LineWidthValueSet (void) -void LineWidthValueSet::SetUnit(XubString* str) +void LineWidthValueSet::SetUnit(OUString* str) { for(int i = 0; i < 9; i++) { diff --git a/svx/source/sidebar/line/LineWidthValueSet.hxx b/svx/source/sidebar/line/LineWidthValueSet.hxx index 1e97af100e25..20492e5ff992 100644 --- a/svx/source/sidebar/line/LineWidthValueSet.hxx +++ b/svx/source/sidebar/line/LineWidthValueSet.hxx @@ -30,7 +30,7 @@ public: LineWidthValueSet (Window* pParent, const ResId& rResId); virtual ~LineWidthValueSet (void); - void SetUnit(XubString* str); + void SetUnit(OUString* str); void SetSelItem(sal_uInt16 nSel); sal_uInt16 GetSelItem(); void SetImage(Image img); @@ -41,7 +41,7 @@ public: protected: VirtualDevice* pVDev; sal_uInt16 nSelItem; - XubString* strUnit; + OUString* strUnit; Image imgCus; bool bCusEnable; }; diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index da555ea0ab9d..9b1a15e31d72 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -639,14 +639,13 @@ sal_Bool SdrDragView::ImpBegInsObjPoint(sal_Bool bIdxZwang, sal_uInt32 nIdx, con pInsPointUndo = dynamic_cast< SdrUndoGeoObj* >( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pMarkedObj) ); DBG_ASSERT( pInsPointUndo, "svx::SdrDragView::BegInsObjPoint(), could not create correct undo object!" ); - XubString aStr(ImpGetResStr(STR_DragInsertPoint)); + OUString aStr(ImpGetResStr(STR_DragInsertPoint)); OUString aName(pMarkedObj->TakeObjNameSingul()); - xub_StrLen nPos(aStr.SearchAscii("%1")); + sal_Int32 nPos(aStr.indexOf("%1")); - if(STRING_NOTFOUND != nPos) + if(-1 != nPos) { - aStr.Erase(nPos, 2); - aStr.Insert(aName, nPos); + aStr = aStr.replaceAt(nPos, 2, aName); } aInsPointUndoStr = aStr; @@ -749,10 +748,10 @@ sal_Bool SdrDragView::BegInsGluePoint(const Point& rPnt) UnmarkAllGluePoints(); pInsPointUndo= dynamic_cast< SdrUndoGeoObj* >( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj) ); DBG_ASSERT( pInsPointUndo, "svx::SdrDragView::BegInsObjPoint(), could not create correct undo object!" ); - XubString aStr(ImpGetResStr(STR_DragInsertGluePoint)); + OUString aStr(ImpGetResStr(STR_DragInsertGluePoint)); OUString aName(pObj->TakeObjNameSingul()); - aStr.SearchAndReplaceAscii("%1", aName); + aStr = aStr.replaceFirst("%1", aName); aInsPointUndoStr=aStr; SdrGluePointList* pGPL=pObj->ForceGluePointList(); diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 7f0c5f1213c7..edd1eec4be36 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -184,9 +184,9 @@ void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy) if( bUndo ) { - XubString aStr(ImpGetResStr(STR_EditMove)); + OUString aStr(ImpGetResStr(STR_EditMove)); if (bCopy) - aStr+=ImpGetResStr(STR_EditWithCopy); + aStr += ImpGetResStr(STR_EditWithCopy); // meeds its own UndoGroup because of its parameters BegUndo(aStr,GetDescriptionOfMarkedObjects(),SDRREPFUNC_OBJ_MOVE); } diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 21a7ba22f7de..81a80dec068f 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -1369,17 +1369,13 @@ sal_Bool SdrObjEditView::ImpIsTextEditAllSelected() const ESelection aESel(pTextEditOutlinerView->GetSelection()); if (aESel.nStartPara==0 && aESel.nStartPos==0 && aESel.nEndPara==(nParaAnz-1)) { - XubString aStr(pTextEditOutliner->GetText(pLastPara)); - - if(aStr.Len() == aESel.nEndPos) + if( pTextEditOutliner->GetText(pLastPara).getLength() == aESel.nEndPos ) bRet = sal_True; } // in case the selection was done backwards if (!bRet && aESel.nEndPara==0 && aESel.nEndPos==0 && aESel.nStartPara==(nParaAnz-1)) { - XubString aStr(pTextEditOutliner->GetText(pLastPara)); - - if(aStr.Len() == aESel.nStartPos) + if(pTextEditOutliner->GetText(pLastPara).getLength() == aESel.nStartPos) bRet = sal_True; } } diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx index 72d6d57e0613..386caf7ece55 100644 --- a/svx/source/svdraw/svdfmtf.cxx +++ b/svx/source/svdraw/svdfmtf.cxx @@ -1062,25 +1062,22 @@ void ImpSdrGDIMetaFileImport::ImportText( const Point& rPos, const OUString& rSt void ImpSdrGDIMetaFileImport::DoAction(MetaTextAction& rAct) { - XubString aStr(rAct.GetText()); - aStr.Erase(0,rAct.GetIndex()); - aStr.Erase(rAct.GetLen()); + OUString aStr(rAct.GetText()); + aStr = aStr.copy(rAct.GetIndex(), rAct.GetLen()); ImportText( rAct.GetPoint(), aStr, rAct ); } void ImpSdrGDIMetaFileImport::DoAction(MetaTextArrayAction& rAct) { - XubString aStr(rAct.GetText()); - aStr.Erase(0,rAct.GetIndex()); - aStr.Erase(rAct.GetLen()); + OUString aStr(rAct.GetText()); + aStr = aStr.copy(rAct.GetIndex(), rAct.GetLen()); ImportText( rAct.GetPoint(), aStr, rAct ); } void ImpSdrGDIMetaFileImport::DoAction(MetaStretchTextAction& rAct) { - XubString aStr(rAct.GetText()); - aStr.Erase(0,rAct.GetIndex()); - aStr.Erase(rAct.GetLen()); + OUString aStr(rAct.GetText()); + aStr = aStr.copy(rAct.GetIndex(), rAct.GetLen()); ImportText( rAct.GetPoint(), aStr, rAct ); } diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx index 359b413b3c96..83db1668d397 100644 --- a/svx/source/svdraw/svdglev.cxx +++ b/svx/source/svdraw/svdglev.cxx @@ -362,8 +362,8 @@ static void ImpMove(Point& rPt, const void* p1, const void* /*p2*/, const void* void SdrGlueEditView::MoveMarkedGluePoints(const Size& rSiz, bool bCopy) { ForceUndirtyMrkPnt(); - XubString aStr(ImpGetResStr(STR_EditMove)); - if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy); + OUString aStr(ImpGetResStr(STR_EditMove)); + if (bCopy) aStr += ImpGetResStr(STR_EditWithCopy); BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SDRREPFUNC_OBJ_MOVE); if (bCopy) ImpCopyMarkedGluePoints(); ImpTransformMarkedGluePoints(ImpMove,&rSiz); @@ -381,7 +381,7 @@ static void ImpResize(Point& rPt, const void* p1, const void* p2, const void* p3 void SdrGlueEditView::ResizeMarkedGluePoints(const Point& rRef, const Fraction& xFact, const Fraction& yFact, bool bCopy) { ForceUndirtyMrkPnt(); - XubString aStr(ImpGetResStr(STR_EditResize)); + OUString aStr(ImpGetResStr(STR_EditResize)); if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy); BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SDRREPFUNC_OBJ_RESIZE); if (bCopy) ImpCopyMarkedGluePoints(); @@ -400,7 +400,7 @@ static void ImpRotate(Point& rPt, const void* p1, const void* /*p2*/, const void void SdrGlueEditView::RotateMarkedGluePoints(const Point& rRef, long nWink, bool bCopy) { ForceUndirtyMrkPnt(); - XubString aStr(ImpGetResStr(STR_EditRotate)); + OUString aStr(ImpGetResStr(STR_EditRotate)); if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy); BegUndo(aStr,GetDescriptionOfMarkedGluePoints(),SDRREPFUNC_OBJ_ROTATE); if (bCopy) ImpCopyMarkedGluePoints(); diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index 1c7bf49b50a8..13f8c74fcd03 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -559,7 +559,7 @@ const OUString& SdrMarkList::GetMarkDescription() const if(!mbNameOk) { SdrMark* pMark = GetMark(0); - XubString aNam; + OUString aNam; if(!nAnz) { @@ -583,7 +583,7 @@ const OUString& SdrMarkList::GetMarkDescription() const { SdrMark* pMark2 = GetMark(i); OUString aStr1(pMark2->GetMarkedSdrObj()->TakeObjNamePlural()); - bEq = aNam.Equals(aStr1); + bEq = aNam == aStr1; } if(!bEq) @@ -592,8 +592,7 @@ const OUString& SdrMarkList::GetMarkDescription() const } } - aNam.Insert(sal_Unicode(' '), 0); - aNam.Insert(OUString::number( nAnz ), 0); + aNam = OUString::number( nAnz ) + " " + aNam; } const_cast<SdrMarkList*>(this)->maMarkName = aNam; @@ -656,7 +655,7 @@ const OUString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const else if(!rNameOk) { const SdrMark* pMark = GetMark(n1stMarkNum); - XubString aNam; + OUString aNam; if(1L == nMarkPtObjAnz) { @@ -682,7 +681,7 @@ const OUString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const if(pPts && !pPts->empty() && pMark2->GetMarkedSdrObj()) { OUString aStr1(pMark2->GetMarkedSdrObj()->TakeObjNamePlural()); - bEq = aNam.Equals(aStr1); + bEq = aNam == aStr1; } } @@ -691,11 +690,10 @@ const OUString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const aNam = ImpGetResStr(STR_ObjNamePlural); } - aNam.Insert(sal_Unicode(' '), 0); - aNam.Insert(OUString::number( nMarkPtObjAnz ), 0); + aNam = OUString::number( nMarkPtObjAnz ) + " " + aNam; } - XubString aStr1; + OUString aStr1; if(1L == nMarkPtAnz) { @@ -704,10 +702,10 @@ const OUString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const else { aStr1 = (ImpGetResStr(bGlue ? STR_ViewMarkedGluePoints : STR_ViewMarkedPoints)); - aStr1.SearchAndReplaceAscii("%2", OUString::number( nMarkPtAnz )); + aStr1 = aStr1.replaceFirst("%2", OUString::number( nMarkPtAnz )); } - aStr1.SearchAndReplaceAscii("%1", aNam); + aStr1 = aStr1.replaceFirst("%1", aNam); rName = aStr1; rNameOk = sal_True; } diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index 33f0888501ea..a9a6fe5e9568 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1000,10 +1000,10 @@ OUString ImpPathForDragAndCreate::getSpecialDragComment(const SdrDragStat& rDrag aStr = aTmp; // delete %O - XubString aStr2(ImpGetResStr(STR_EditDelete)); + OUString aStr2(ImpGetResStr(STR_EditDelete)); // UNICODE: delete point of ... - aStr2.SearchAndReplaceAscii("%1", aStr); + aStr2 = aStr2.replaceFirst("%1", aStr); return aStr2; } diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index a9f8cdc0bfc6..1615b04c2e21 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -472,9 +472,7 @@ bool SdrTextObj::HasTextImpl( SdrOutliner* pOutliner ) if(nParaAnz==1) { // if it is only one paragraph, check if that paragraph is empty - XubString aStr(pOutliner->GetText(p1stPara)); - - if(!aStr.Len()) + if( pOutliner->GetText(p1stPara).isEmpty() ) nParaAnz = 0; } @@ -970,7 +968,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS OUString SdrTextObj::TakeObjNameSingul() const { - XubString aStr; + OUString aStr; switch(eTextKind) { diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx index f854be1ce471..e4264681a49f 100644 --- a/svx/source/svdraw/svdpntv.cxx +++ b/svx/source/svdraw/svdpntv.cxx @@ -1026,7 +1026,7 @@ void SdrPaintView::MergeNotPersistDefaultAttr(SfxItemSet& rAttr, sal_Bool /*bOnl { // bOnlyHardAttr has no effect here at all. bool bMeasure=ISA(SdrView) && ((SdrView*)this)->IsMeasureTool(); - const XubString& aNam=bMeasure?aMeasureLayer:aAktLayer; + const OUString& aNam = bMeasure ? aMeasureLayer : aAktLayer; rAttr.Put(SdrLayerNameItem(aNam)); SdrLayerID nLayer=pMod->GetLayerAdmin().GetLayerID(aNam,sal_True); if (nLayer!=SDRLAYER_NOTFOUND) { diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index e6324da53653..8ff5f021bdfd 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -664,7 +664,7 @@ void SdrPolyEditView::MoveMarkedPoints(const Size& rSiz, bool bCopy) { bCopy=sal_False; // TODO: not yet implemented ForceUndirtyMrkPnt(); - XubString aStr(ImpGetResStr(STR_EditMove)); + OUString aStr(ImpGetResStr(STR_EditMove)); if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy); BegUndo(aStr,GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_MOVE); ImpTransformMarkedPoints(ImpMove,&rSiz); @@ -685,7 +685,7 @@ void SdrPolyEditView::ResizeMarkedPoints(const Point& rRef, const Fraction& xFac { bCopy=sal_False; // TODO: not yet implemented ForceUndirtyMrkPnt(); - XubString aStr(ImpGetResStr(STR_EditResize)); + OUString aStr(ImpGetResStr(STR_EditResize)); if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy); BegUndo(aStr,GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_RESIZE); ImpTransformMarkedPoints(ImpResize,&rRef,&xFact,&yFact); @@ -706,7 +706,7 @@ void SdrPolyEditView::RotateMarkedPoints(const Point& rRef, long nWink, bool bCo { bCopy=sal_False; // TODO: not yet implemented ForceUndirtyMrkPnt(); - XubString aStr(ImpGetResStr(STR_EditResize)); + OUString aStr(ImpGetResStr(STR_EditResize)); if (bCopy) aStr+=ImpGetResStr(STR_EditWithCopy); BegUndo(aStr,GetDescriptionOfMarkedPoints(),SDRREPFUNC_OBJ_ROTATE); double nSin=sin(nWink*nPi180); diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index af0b4abf314e..68d258e72f7f 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -1166,7 +1166,7 @@ Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice* OUString SdrView::GetStatusText() { OUString aStr; - XubString aName; + OUString aName; aStr += STR_NOTHING; @@ -1280,7 +1280,7 @@ OUString SdrView::GetStatusText() aStr = ""; } } - else if(aName.Len()) + else if(!aName.isEmpty()) { aStr = aStr.replaceFirst("%1", aName); } diff --git a/svx/source/xoutdev/xtabcolr.cxx b/svx/source/xoutdev/xtabcolr.cxx index a6e1d9debc9c..a1e6eb5c5a2f 100644 --- a/svx/source/xoutdev/xtabcolr.cxx +++ b/svx/source/xoutdev/xtabcolr.cxx @@ -67,25 +67,37 @@ bool XColorList::Create() sal_uInt32 b(0); // <!-- Gray palette from white to black --> - XubString aStrGrey( SVX_RESSTR( RID_SVXSTR_COLOR_GREY ) ); + const OUString aStrGrey( SVX_RESSTR( RID_SVXSTR_COLOR_GREY ) ); Insert( new XColorEntry( Color( 0xff, 0xff, 0xff ), SVX_RESSTR( RID_SVXSTR_COLOR_WHITE ) ) ); - aStrGrey.AppendAscii(" 1"); Insert( new XColorEntry( Color( 0xee, 0xee, 0xee ), aStrGrey ) ); - aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('2')); Insert( new XColorEntry( Color( 0xdd, 0xdd, 0xdd ), aStrGrey ) ); - aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('3')); Insert( new XColorEntry( Color( 0xcc, 0xcc, 0xcc ), aStrGrey ) ); - aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('4')); Insert( new XColorEntry( Color( 0xb2, 0xb2, 0xb2 ), aStrGrey ) ); - aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('5')); Insert( new XColorEntry( Color( 0x99, 0x99, 0x99 ), aStrGrey ) ); - aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('6')); Insert( new XColorEntry( Color( 0x80, 0x80, 0x80 ), aStrGrey ) ); - aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('7')); Insert( new XColorEntry( Color( 0x66, 0x66, 0x66 ), aStrGrey ) ); - aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('8')); Insert( new XColorEntry( Color( 0x33, 0x33, 0x33 ), aStrGrey ) ); - aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('9')); Insert( new XColorEntry( Color( 0x1c, 0x1c, 0x1c ), aStrGrey ) ); - aStrGrey.SetChar(aStrGrey.Len() - 1, sal_Unicode('1')); aStrGrey.AppendAscii("0"); Insert( new XColorEntry( Color( 0x11, 0x11, 0x11 ), aStrGrey ) ); + Insert( new XColorEntry( Color( 0xee, 0xee, 0xee ), aStrGrey + " 1" ) ); + Insert( new XColorEntry( Color( 0xdd, 0xdd, 0xdd ), aStrGrey + " 2" ) ); + Insert( new XColorEntry( Color( 0xcc, 0xcc, 0xcc ), aStrGrey + " 3" ) ); + Insert( new XColorEntry( Color( 0xb2, 0xb2, 0xb2 ), aStrGrey + " 4" ) ); + Insert( new XColorEntry( Color( 0x99, 0x99, 0x99 ), aStrGrey + " 5" ) ); + Insert( new XColorEntry( Color( 0x80, 0x80, 0x80 ), aStrGrey + " 6" ) ); + Insert( new XColorEntry( Color( 0x66, 0x66, 0x66 ), aStrGrey + " 7" ) ); + Insert( new XColorEntry( Color( 0x33, 0x33, 0x33 ), aStrGrey + " 8" ) ); + Insert( new XColorEntry( Color( 0x1c, 0x1c, 0x1c ), aStrGrey + " 9" ) ); + Insert( new XColorEntry( Color( 0x11, 0x11, 0x11 ), aStrGrey + " 10") ); Insert( new XColorEntry( Color( 0x00, 0x00, 0x00 ), SVX_RESSTR( RID_SVXSTR_COLOR_BLACK ) ) ); // <!-- Base colors step 0 to 10 --> const sal_uInt32 nNumColorsInGroup(12); const sal_uInt32 nNumGroups(11); - XubString aStrCol[nNumColorsInGroup]; + const OUString aStrCol[nNumColorsInGroup] = { + SVX_RESSTR(RID_SVXSTR_COLOR_YELLOW), + SVX_RESSTR(RID_SVXSTR_COLOR_ORANGE), + SVX_RESSTR(RID_SVXSTR_COLOR_RED), + SVX_RESSTR(RID_SVXSTR_COLOR_PINK), + SVX_RESSTR(RID_SVXSTR_COLOR_MAGENTA), + SVX_RESSTR(RID_SVXSTR_COLOR_PURPLE), + SVX_RESSTR(RID_SVXSTR_COLOR_BLUE), + SVX_RESSTR(RID_SVXSTR_COLOR_SKYBLUE), + SVX_RESSTR(RID_SVXSTR_COLOR_CYAN), + SVX_RESSTR(RID_SVXSTR_COLOR_TURQUOISE), + SVX_RESSTR(RID_SVXSTR_COLOR_GREEN), + SVX_RESSTR(RID_SVXSTR_COLOR_YELLOWGREEN) }; const sal_uInt32 aStdCol[nNumColorsInGroup * nNumGroups] = { 0xffff99, 0xff6600, 0xff3333, 0xff00cc, 0xff33ff, 0x9900ff, 0x6666ff, 0x00ccff, 0x66ffff, 0x33ff99, 0x99ff66, 0xccff00, 0xffff66, 0xffcc00, 0xff9999, 0xff66cc, 0xff99ff, 0xcc66ff, 0x9999ff, 0x9999ff, 0x99ffff, 0x66ff99, 0x99ff99, 0xccff66, @@ -101,56 +113,14 @@ bool XColorList::Create() for(a = 0; a < nNumGroups; a++) { - switch(a) - { - case 0: - { - aStrCol[0] = SVX_RESSTR(RID_SVXSTR_COLOR_YELLOW); - aStrCol[1] = SVX_RESSTR(RID_SVXSTR_COLOR_ORANGE); - aStrCol[2] = SVX_RESSTR(RID_SVXSTR_COLOR_RED); - aStrCol[3] = SVX_RESSTR(RID_SVXSTR_COLOR_PINK); - aStrCol[4] = SVX_RESSTR(RID_SVXSTR_COLOR_MAGENTA); - aStrCol[5] = SVX_RESSTR(RID_SVXSTR_COLOR_PURPLE); - aStrCol[6] = SVX_RESSTR(RID_SVXSTR_COLOR_BLUE); - aStrCol[7] = SVX_RESSTR(RID_SVXSTR_COLOR_SKYBLUE); - aStrCol[8] = SVX_RESSTR(RID_SVXSTR_COLOR_CYAN); - aStrCol[9] = SVX_RESSTR(RID_SVXSTR_COLOR_TURQUOISE); - aStrCol[10] = SVX_RESSTR(RID_SVXSTR_COLOR_GREEN); - aStrCol[11] = SVX_RESSTR(RID_SVXSTR_COLOR_YELLOWGREEN); - break; - } - case 1: - { - for(b = 0; b < nNumColorsInGroup; b++) - { - aStrCol[b].AppendAscii(" 1"); - } - break; - } - case 10: - { - for(b = 0; b < nNumColorsInGroup; b++) - { - aStrCol[b].SetChar(aStrCol[b].Len() - 1, sal_Unicode('1')); - aStrCol[b].AppendAscii("0"); - } - break; - } - default: // 2 .. 9, 11 - { - for(b = 0; b < nNumColorsInGroup; b++) - { - aStrCol[b].SetChar(aStrCol[b].Len() - 1, sal_Unicode('0') + sal_Unicode(a % 10)); - } - break; - } - } + OUString aSuffix; + if (a > 0) aSuffix = OUString::number(a); const sal_uInt32 nOffset(a * nNumColorsInGroup); for(b = 0; b < nNumColorsInGroup; b++) { - Insert( new XColorEntry( aStdCol[nOffset + b], aStrCol[b] ) ); + Insert( new XColorEntry( aStdCol[nOffset + b], aStrCol[b] + aSuffix ) ); } } @@ -168,32 +138,19 @@ bool XColorList::Create() Insert( new XColorEntry( Color( 0x00, 0x66, 0xcc ), SVX_RESSTR( RID_SVXSTR_COLOR_SEABLUE ) ) ); // <!-- add Chart colors from original palette (also 12, coincidence?) --> - XubString aStrChart( SVX_RESSTR( RID_SVXSTR_COLOR_CHART ) ); - aStrChart.AppendAscii(" 1"); - Insert( new XColorEntry( Color( 0x00, 0x45, 0x86 ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('2')); - Insert( new XColorEntry( Color( 0xff, 0x42, 0x0e ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('3')); - Insert( new XColorEntry( Color( 0xff, 0xd3, 0x20 ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('4')); - Insert( new XColorEntry( Color( 0x57, 0x9d, 0x1c ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('5')); - Insert( new XColorEntry( Color( 0x7e, 0x00, 0x21 ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('6')); - Insert( new XColorEntry( Color( 0x83, 0xca, 0xff ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('7')); - Insert( new XColorEntry( Color( 0x31, 0x40, 0x04 ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('8')); - Insert( new XColorEntry( Color( 0xae, 0xcf, 0x00 ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('9')); - Insert( new XColorEntry( Color( 0x4b, 0x1f, 0x6f ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('1')); - aStrChart.AppendAscii("0"); - Insert( new XColorEntry( Color( 0xff, 0x95, 0x0e ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('1')); - Insert( new XColorEntry( Color( 0xc5, 0x00, 0x0b ), aStrChart ) ); - aStrChart.SetChar(aStrChart.Len() - 1, sal_Unicode('2')); - Insert( new XColorEntry( Color( 0x00, 0x84, 0xd1 ), aStrChart ) ); + const OUString aStrChart( SVX_RESSTR( RID_SVXSTR_COLOR_CHART ) ); + Insert( new XColorEntry( Color( 0x00, 0x45, 0x86 ), aStrChart + " 1" ) ); + Insert( new XColorEntry( Color( 0xff, 0x42, 0x0e ), aStrChart + " 2" ) ); + Insert( new XColorEntry( Color( 0xff, 0xd3, 0x20 ), aStrChart + " 3" ) ); + Insert( new XColorEntry( Color( 0x57, 0x9d, 0x1c ), aStrChart + " 4" ) ); + Insert( new XColorEntry( Color( 0x7e, 0x00, 0x21 ), aStrChart + " 5" ) ); + Insert( new XColorEntry( Color( 0x83, 0xca, 0xff ), aStrChart + " 6" ) ); + Insert( new XColorEntry( Color( 0x31, 0x40, 0x04 ), aStrChart + " 7" ) ); + Insert( new XColorEntry( Color( 0xae, 0xcf, 0x00 ), aStrChart + " 8" ) ); + Insert( new XColorEntry( Color( 0x4b, 0x1f, 0x6f ), aStrChart + " 9" ) ); + Insert( new XColorEntry( Color( 0xff, 0x95, 0x0e ), aStrChart + " 10" ) ); + Insert( new XColorEntry( Color( 0xc5, 0x00, 0x0b ), aStrChart + " 11" ) ); + Insert( new XColorEntry( Color( 0x00, 0x84, 0xd1 ), aStrChart + " 12" ) ); return(165 == Count()); } diff --git a/svx/source/xoutdev/xtabdash.cxx b/svx/source/xoutdev/xtabdash.cxx index 7cb5ed36727b..d34e60fe156d 100644 --- a/svx/source/xoutdev/xtabdash.cxx +++ b/svx/source/xoutdev/xtabdash.cxx @@ -68,16 +68,11 @@ uno::Reference< container::XNameContainer > XDashList::createInstance() bool XDashList::Create() { - XubString aStr(SVX_RESSTR(RID_SVXSTR_LINESTYLE)); - xub_StrLen nLen; - - aStr.AppendAscii(" 1"); - nLen = aStr.Len() - 1; - Insert(new XDashEntry(XDash(XDASH_RECT,1, 50,1, 50, 50),aStr)); - aStr.SetChar(nLen, sal_Unicode('2')); - Insert(new XDashEntry(XDash(XDASH_RECT,1,500,1,500,500),aStr)); - aStr.SetChar(nLen, sal_Unicode('3')); - Insert(new XDashEntry(XDash(XDASH_RECT,2, 50,3,250,120),aStr)); + const OUString aStr(SVX_RESSTR(RID_SVXSTR_LINESTYLE)); + + Insert(new XDashEntry(XDash(XDASH_RECT,1, 50,1, 50, 50),aStr + " 1")); + Insert(new XDashEntry(XDash(XDASH_RECT,1,500,1,500,500),aStr + " 2")); + Insert(new XDashEntry(XDash(XDASH_RECT,2, 50,3,250,120),aStr + " 3")); return true; } |