include/svx/cube3d.hxx | 2 - include/svx/extrud3d.hxx | 2 - include/svx/lathe3d.hxx | 2 - include/svx/obj3d.hxx | 2 - include/svx/scene3d.hxx | 2 - include/svx/sphere3d.hxx | 2 - include/svx/svdoashp.hxx | 2 - include/svx/svdobj.hxx | 2 - include/svx/svdocapt.hxx | 2 - include/svx/svdocirc.hxx | 2 - include/svx/svdoedge.hxx | 2 - include/svx/svdograf.hxx | 2 - include/svx/svdogrp.hxx | 2 - include/svx/svdomeas.hxx | 2 - include/svx/svdomedia.hxx | 2 - include/svx/svdoole2.hxx | 2 - include/svx/svdopage.hxx | 2 - include/svx/svdopath.hxx | 2 - include/svx/svdorect.hxx | 2 - include/svx/svdotable.hxx | 2 - include/svx/svdotext.hxx | 2 - include/svx/svdouno.hxx | 2 - include/svx/svdovirt.hxx | 2 - svx/source/engine3d/cube3d.cxx | 4 +- svx/source/engine3d/extrud3d.cxx | 4 +- svx/source/engine3d/lathe3d.cxx | 4 +- svx/source/engine3d/obj3d.cxx | 4 +- svx/source/engine3d/scene3d.cxx | 4 +- svx/source/engine3d/sphere3d.cxx | 4 +- svx/source/svdraw/svdedtv2.cxx | 9 ++-- svx/source/svdraw/svdmark.cxx | 14 +++---- svx/source/svdraw/svdoashp.cxx | 4 +- svx/source/svdraw/svdobj.cxx | 4 +- svx/source/svdraw/svdocapt.cxx | 4 +- svx/source/svdraw/svdocirc.cxx | 4 +- svx/source/svdraw/svdoedge.cxx | 4 +- svx/source/svdraw/svdograf.cxx | 74 ++++++++++++++++++++------------------- svx/source/svdraw/svdogrp.cxx | 10 ++--- svx/source/svdraw/svdomeas.cxx | 4 +- svx/source/svdraw/svdomedia.cxx | 4 +- svx/source/svdraw/svdoole2.cxx | 4 +- svx/source/svdraw/svdopage.cxx | 4 +- svx/source/svdraw/svdopath.cxx | 22 ++++++----- svx/source/svdraw/svdorect.cxx | 32 +++++++++++----- svx/source/svdraw/svdotext.cxx | 12 +++--- svx/source/svdraw/svdouno.cxx | 4 +- svx/source/svdraw/svdovirt.cxx | 9 ++-- svx/source/table/svdotable.cxx | 4 +- svx/source/unodraw/unoshape.cxx | 4 -- 49 files changed, 156 insertions(+), 144 deletions(-)
New commits: commit a307e03946cca3a8e93b37eb9113721bc4e512bb Author: Caolán McNamara <caol...@redhat.com> Date: Thu Jul 25 20:35:59 2013 +0100 convert TakeObjNamePlural family to OUString Change-Id: I947e47934677a4f9ced0bfc0db3932bcbbb25f36 diff --git a/include/svx/cube3d.hxx b/include/svx/cube3d.hxx index fc25aae..942f96c 100644 --- a/include/svx/cube3d.hxx +++ b/include/svx/cube3d.hxx @@ -80,7 +80,7 @@ public: // TakeObjName...() is for the display in the UI, for example "3 frames selected". virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; }; #endif // _E3D_CUBE3D_HXX diff --git a/include/svx/extrud3d.hxx b/include/svx/extrud3d.hxx index d24857b..fc94e8c 100644 --- a/include/svx/extrud3d.hxx +++ b/include/svx/extrud3d.hxx @@ -87,7 +87,7 @@ public: // TakeObjName...() is for the display in the UI (for example "3 frames selected") virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; // set/get local parameters with geometry regeneration void SetExtrudePolygon(const basegfx::B2DPolyPolygon &rNew); diff --git a/include/svx/lathe3d.hxx b/include/svx/lathe3d.hxx index fe9c607..e765a2d 100644 --- a/include/svx/lathe3d.hxx +++ b/include/svx/lathe3d.hxx @@ -98,7 +98,7 @@ private: // TakeObjName...() is for the display in the UI, for example "3 frames selected". virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; // set/get local parameters with geometry recreation void SetPolyPoly2D(const basegfx::B2DPolyPolygon& rNew); diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx index 4628bcd..8195ee3 100644 --- a/include/svx/obj3d.hxx +++ b/include/svx/obj3d.hxx @@ -185,7 +185,7 @@ public: // TakeObjName...() is for the display in the UI, for example "3 frames selected". virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; sal_uInt16 GetLogicalGroup() { return 0; } virtual E3dObject* Clone() const; E3dObject& operator=( const E3dObject& rObj ); diff --git a/include/svx/scene3d.hxx b/include/svx/scene3d.hxx index 04273fe..2dd0faa 100644 --- a/include/svx/scene3d.hxx +++ b/include/svx/scene3d.hxx @@ -215,7 +215,7 @@ public: // TakeObjName...() is for the display in the UI, for example "3 frames selected". virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; // get transformations B3dCamera& GetCameraSet() { return aCameraSet; } diff --git a/include/svx/sphere3d.hxx b/include/svx/sphere3d.hxx index c32c0a8..500705f 100644 --- a/include/svx/sphere3d.hxx +++ b/include/svx/sphere3d.hxx @@ -69,7 +69,7 @@ public: // TakeObjName...() is for displaying in the UI, eg "3 selected frames." virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; }; #endif // _E3D_SPHERE3D_HXX diff --git a/include/svx/svdoashp.hxx b/include/svx/svdoashp.hxx index 5733599..1c54345 100644 --- a/include/svx/svdoashp.hxx +++ b/include/svx/svdoashp.hxx @@ -224,7 +224,7 @@ public: SdrObjCustomShape& operator=(const SdrObjCustomShape& rObj); virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual basegfx::B2DPolyPolygon TakeCreatePoly( const SdrDragStat& rDrag) const; diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 44ced52..8e2b9ce 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -624,7 +624,7 @@ public: // TakeObjName...() ist fuer die Anzeige in der UI, z.B. "3 Rahmen selektiert". virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; // Das Xor-Polygon wird von der View zu Draggen des Objektes benoetigt. // Alle Polygone innerhalb des PolyPolygon werden als PolyLine interpretiert. diff --git a/include/svx/svdocapt.hxx b/include/svx/svdocapt.hxx index abd875e..315045e 100644 --- a/include/svx/svdocapt.hxx +++ b/include/svx/svdocapt.hxx @@ -92,7 +92,7 @@ public: void SetFixedTail() { mbFixedTail = sal_True; } virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual basegfx::B2DPolyPolygon TakeXorPoly() const; virtual void SetModel(SdrModel* pNewModel); diff --git a/include/svx/svdocirc.hxx b/include/svx/svdocirc.hxx index dede492..6ea0a35 100644 --- a/include/svx/svdocirc.hxx +++ b/include/svx/svdocirc.hxx @@ -99,7 +99,7 @@ public: virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual SdrCircObj* Clone() const; virtual void RecalcSnapRect(); diff --git a/include/svx/svdoedge.hxx b/include/svx/svdoedge.hxx index a5bb981f..a7469be 100644 --- a/include/svx/svdoedge.hxx +++ b/include/svx/svdoedge.hxx @@ -240,7 +240,7 @@ public: virtual SdrEdgeObj* Clone() const; SdrEdgeObj& operator=(const SdrEdgeObj& rObj); virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; void SetEdgeTrackPath( const basegfx::B2DPolyPolygon& rPoly ); basegfx::B2DPolyPolygon GetEdgeTrackPath() const; diff --git a/include/svx/svdograf.hxx b/include/svx/svdograf.hxx index 64e109a..c97ba69 100644 --- a/include/svx/svdograf.hxx +++ b/include/svx/svdograf.hxx @@ -150,7 +150,7 @@ public: virtual sal_uInt16 GetObjIdentifier() const; virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; // #i25616# virtual basegfx::B2DPolyPolygon TakeXorPoly() const; diff --git a/include/svx/svdogrp.hxx b/include/svx/svdogrp.hxx index e25b169..7d35fb2 100644 --- a/include/svx/svdogrp.hxx +++ b/include/svx/svdogrp.hxx @@ -71,7 +71,7 @@ public: SdrObjGroup& operator=(const SdrObjGroup& rObj); virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual void RecalcSnapRect(); virtual basegfx::B2DPolyPolygon TakeXorPoly() const; diff --git a/include/svx/svdomeas.hxx b/include/svx/svdomeas.hxx index 144292b..a6fcdaa 100644 --- a/include/svx/svdomeas.hxx +++ b/include/svx/svdomeas.hxx @@ -96,7 +96,7 @@ public: virtual SdrMeasureObj* Clone() const; virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual basegfx::B2DPolyPolygon TakeXorPoly() const; virtual sal_uInt32 GetHdlCount() const; diff --git a/include/svx/svdomedia.hxx b/include/svx/svdomedia.hxx index 163b219..61fa800 100644 --- a/include/svx/svdomedia.hxx +++ b/include/svx/svdomedia.hxx @@ -51,7 +51,7 @@ public: virtual sal_uInt16 GetObjIdentifier() const; virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual SdrMediaObj* Clone() const; SdrMediaObj& operator=(const SdrMediaObj& rObj); diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx index fea461e..e1ecb96 100644 --- a/include/svx/svdoole2.hxx +++ b/include/svx/svdoole2.hxx @@ -142,7 +142,7 @@ public: virtual void TakeObjInfo(SdrObjTransformInfoRec& rInfo) const; virtual sal_uInt16 GetObjIdentifier() const; virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; SdrOle2Obj* Clone() const; SdrOle2Obj& operator=(const SdrOle2Obj& rObj); diff --git a/include/svx/svdopage.hxx b/include/svx/svdopage.hxx index 39cda1b..7c93c6e 100644 --- a/include/svx/svdopage.hxx +++ b/include/svx/svdopage.hxx @@ -60,7 +60,7 @@ public: SdrPageObj& operator=(const SdrPageObj& rObj); virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; }; //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/include/svx/svdopath.hxx b/include/svx/svdopath.hxx index 610692b..775cfeb 100644 --- a/include/svx/svdopath.hxx +++ b/include/svx/svdopath.hxx @@ -95,7 +95,7 @@ public: SdrPathObj& operator=(const SdrPathObj& rObj); virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual basegfx::B2DPolyPolygon TakeXorPoly() const; virtual void RecalcSnapRect(); virtual void NbcSetSnapRect(const Rectangle& rRect); diff --git a/include/svx/svdorect.hxx b/include/svx/svdorect.hxx index 71cc9f1..bc3f6b7 100644 --- a/include/svx/svdorect.hxx +++ b/include/svx/svdorect.hxx @@ -84,7 +84,7 @@ public: virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual SdrRectObj* Clone() const; virtual void RecalcSnapRect(); diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index 5234bde..bff5576 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -206,7 +206,7 @@ public: virtual bool AdjustTextFrameWidthAndHeight(Rectangle& rR, bool bHgt = true, bool bWdt = true) const; virtual bool AdjustTextFrameWidthAndHeight(bool bHgt = true, bool bWdt = true); virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual SdrTableObj* Clone() const; SdrTableObj& operator=(const SdrTableObj& rObj); virtual basegfx::B2DPolyPolygon TakeXorPoly() const; diff --git a/include/svx/svdotext.hxx b/include/svx/svdotext.hxx index 2752be0..15d9aba 100644 --- a/include/svx/svdotext.hxx +++ b/include/svx/svdotext.hxx @@ -422,7 +422,7 @@ public: // Wird zur Bestimmung des Textankerbereichs benoetigt virtual void TakeUnrotatedSnapRect(Rectangle& rRect) const; virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual SdrTextObj* Clone() const; SdrTextObj& operator=(const SdrTextObj& rObj); virtual basegfx::B2DPolyPolygon TakeXorPoly() const; diff --git a/include/svx/svdouno.hxx b/include/svx/svdouno.hxx index d02a05a..107ae91 100644 --- a/include/svx/svdouno.hxx +++ b/include/svx/svdouno.hxx @@ -91,7 +91,7 @@ public: virtual SdrObject* getFullDragClone() const; virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(XubString& rName) const; + virtual OUString TakeObjNamePlural() const; virtual void SetContextWritingMode( const sal_Int16 _nContextWritingMode ); diff --git a/include/svx/svdovirt.hxx b/include/svx/svdovirt.hxx index d3e62f4..94b5bae 100644 --- a/include/svx/svdovirt.hxx +++ b/include/svx/svdovirt.hxx @@ -73,7 +73,7 @@ public: SdrVirtObj& operator=(const SdrVirtObj& rObj); virtual OUString TakeObjNameSingul() const; - virtual void TakeObjNamePlural(String& rName) const; + virtual OUString TakeObjNamePlural() const; virtual basegfx::B2DPolyPolygon TakeXorPoly() const; virtual sal_uInt32 GetHdlCount() const; diff --git a/svx/source/engine3d/cube3d.cxx b/svx/source/engine3d/cube3d.cxx index 5328d24..7a0426c 100644 --- a/svx/source/engine3d/cube3d.cxx +++ b/svx/source/engine3d/cube3d.cxx @@ -127,9 +127,9 @@ OUString E3dCubeObj::TakeObjNameSingul() const // Get the name of the object (plural) -void E3dCubeObj::TakeObjNamePlural(XubString& rName) const +OUString E3dCubeObj::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralCube3d); + return ImpGetResStr(STR_ObjNamePluralCube3d); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx index 6b4c607..98ceadd 100644 --- a/svx/source/engine3d/extrud3d.cxx +++ b/svx/source/engine3d/extrud3d.cxx @@ -137,9 +137,9 @@ OUString E3dExtrudeObj::TakeObjNameSingul() const // Get the name of the object (plural) -void E3dExtrudeObj::TakeObjNamePlural(XubString& rName) const +OUString E3dExtrudeObj::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralExtrude3d); + return ImpGetResStr(STR_ObjNamePluralExtrude3d); } bool E3dExtrudeObj::IsBreakObjPossible() diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx index 5900509..5575902 100644 --- a/svx/source/engine3d/lathe3d.cxx +++ b/svx/source/engine3d/lathe3d.cxx @@ -165,9 +165,9 @@ OUString E3dLatheObj::TakeObjNameSingul() const // Get the name of the object (plural) -void E3dLatheObj::TakeObjNamePlural(XubString& rName) const +OUString E3dLatheObj::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralLathe3d); + return ImpGetResStr(STR_ObjNamePluralLathe3d); } bool E3dLatheObj::IsBreakObjPossible() diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 6e74d2f..a9c5d65 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -681,9 +681,9 @@ OUString E3dObject::TakeObjNameSingul() const // Get the name of the object (plural) -void E3dObject::TakeObjNamePlural(XubString& rName) const +OUString E3dObject::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralObj3d); + return ImpGetResStr(STR_ObjNamePluralObj3d); } E3dObject* E3dObject::Clone() const diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx index cfc4163..868ddcb 100644 --- a/svx/source/engine3d/scene3d.cxx +++ b/svx/source/engine3d/scene3d.cxx @@ -588,9 +588,9 @@ OUString E3dScene::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void E3dScene::TakeObjNamePlural(XubString& rName) const +OUString E3dScene::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralScene3d); + return ImpGetResStr(STR_ObjNamePluralScene3d); } // The NbcRotate routine overloads the one of the SdrObject. The idea is diff --git a/svx/source/engine3d/sphere3d.cxx b/svx/source/engine3d/sphere3d.cxx index b1c17be..1f4487b 100644 --- a/svx/source/engine3d/sphere3d.cxx +++ b/svx/source/engine3d/sphere3d.cxx @@ -144,9 +144,9 @@ OUString E3dSphereObj::TakeObjNameSingul() const // Get the name of the object (plural) -void E3dSphereObj::TakeObjNamePlural(XubString& rName) const +OUString E3dSphereObj::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralSphere3d); + return ImpGetResStr(STR_ObjNamePluralSphere3d); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 91573cc..547fa56 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -1794,7 +1794,7 @@ void SdrEditView::UnGroupMarked() BegUndo(String(), String(), SDRREPFUNC_OBJ_UNGROUP); sal_uIntPtr nCount=0; - XubString aName1; + OUString aName1; OUString aName; bool bNameOk=false; for (sal_uIntPtr nm=GetMarkedObjectCount(); nm>0;) { @@ -1806,15 +1806,14 @@ void SdrEditView::UnGroupMarked() nCount++; if (nCount==1) { aName = pGrp->TakeObjNameSingul(); // retrieve name of group - pGrp->TakeObjNamePlural(aName1); // retrieve name of group + aName1 = pGrp->TakeObjNamePlural(); // retrieve name of group bNameOk=true; } else { if (nCount==2) aName=aName1; // set plural name if (bNameOk) { - XubString aStr; - pGrp->TakeObjNamePlural(aStr); // retrieve name of group + OUString aStr(pGrp->TakeObjNamePlural()); // retrieve name of group - if(!aStr.Equals(aName)) + if (aStr != aName) bNameOk = false; } } diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index 73dd2b9..1c6fb1f 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -576,14 +576,13 @@ const XubString& SdrMarkList::GetMarkDescription() const { if(pMark->GetMarkedSdrObj()) { - pMark->GetMarkedSdrObj()->TakeObjNamePlural(aNam); - XubString aStr1; - sal_Bool bEq(sal_True); + aNam = pMark->GetMarkedSdrObj()->TakeObjNamePlural(); + bool bEq(true); for(sal_uLong i = 1; i < GetMarkCount() && bEq; i++) { SdrMark* pMark2 = GetMark(i); - pMark2->GetMarkedSdrObj()->TakeObjNamePlural(aStr1); + OUString aStr1(pMark2->GetMarkedSdrObj()->TakeObjNamePlural()); bEq = aNam.Equals(aStr1); } @@ -670,11 +669,10 @@ const XubString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const { if(pMark->GetMarkedSdrObj()) { - pMark->GetMarkedSdrObj()->TakeObjNamePlural(aNam); + aNam = pMark->GetMarkedSdrObj()->TakeObjNamePlural(); } - XubString aStr1; - sal_Bool bEq(sal_True); + bool bEq(true); for(sal_uLong i(n1stMarkNum + 1L); i < GetMarkCount() && bEq; i++) { @@ -683,7 +681,7 @@ const XubString& SdrMarkList::GetPointMarkDescription(sal_Bool bGlue) const if(pPts && !pPts->empty() && pMark2->GetMarkedSdrObj()) { - pMark2->GetMarkedSdrObj()->TakeObjNamePlural(aStr1); + OUString aStr1(pMark2->GetMarkedSdrObj()->TakeObjNamePlural()); bEq = aNam.Equals(aStr1); } } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index dbfb8a0..3de2a64 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -2838,9 +2838,9 @@ OUString SdrObjCustomShape::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrObjCustomShape::TakeObjNamePlural(XubString& rName) const +OUString SdrObjCustomShape::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralCUSTOMSHAPE); + return ImpGetResStr(STR_ObjNamePluralCUSTOMSHAPE); } basegfx::B2DPolyPolygon SdrObjCustomShape::TakeXorPoly() const diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx index 60d42ec..8e200fa 100644 --- a/svx/source/svdraw/svdobj.cxx +++ b/svx/source/svdraw/svdobj.cxx @@ -1105,9 +1105,9 @@ OUString SdrObject::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrObject::TakeObjNamePlural(XubString& rName) const +OUString SdrObject::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralNONE); + return ImpGetResStr(STR_ObjNamePluralNONE); } void SdrObject::ImpTakeDescriptionStr(sal_uInt16 nStrCacheID, OUString& rStr, sal_uInt16 nVal) const diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx index ceb341b..9bd598c 100644 --- a/svx/source/svdraw/svdocapt.cxx +++ b/svx/source/svdraw/svdocapt.cxx @@ -256,9 +256,9 @@ OUString SdrCaptionObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrCaptionObj::TakeObjNamePlural(XubString& rName) const +OUString SdrCaptionObj::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralCAPTION); + return ImpGetResStr(STR_ObjNamePluralCAPTION); } basegfx::B2DPolyPolygon SdrCaptionObj::TakeXorPoly() const diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx index b43c842..9ed310c 100644 --- a/svx/source/svdraw/svdocirc.cxx +++ b/svx/source/svdraw/svdocirc.cxx @@ -316,7 +316,7 @@ OUString SdrCircObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrCircObj::TakeObjNamePlural(XubString& rName) const +OUString SdrCircObj::TakeObjNamePlural() const { sal_uInt16 nID=STR_ObjNamePluralCIRC; if (aRect.GetWidth()==aRect.GetHeight() && aGeo.nShearWink==0) { @@ -336,7 +336,7 @@ void SdrCircObj::TakeObjNamePlural(XubString& rName) const default: break; } } - rName=ImpGetResStr(nID); + return ImpGetResStr(nID); } SdrCircObj* SdrCircObj::Clone() const diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx index 30d3366..9cd1071 100644 --- a/svx/source/svdraw/svdoedge.cxx +++ b/svx/source/svdraw/svdoedge.cxx @@ -1653,9 +1653,9 @@ OUString SdrEdgeObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrEdgeObj::TakeObjNamePlural(XubString& rName) const +OUString SdrEdgeObj::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralEDGE); + return ImpGetResStr(STR_ObjNamePluralEDGE); } basegfx::B2DPolyPolygon SdrEdgeObj::TakeXorPoly() const diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx index fb550c1..65ef13a 100644 --- a/svx/source/svdraw/svdograf.cxx +++ b/svx/source/svdraw/svdograf.cxx @@ -766,53 +766,57 @@ OUString SdrGrafObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrGrafObj::TakeObjNamePlural( XubString& rName ) const +OUString SdrGrafObj::TakeObjNamePlural() const { - if(pGraphic) - { - const SvgDataPtr& rSvgDataPtr = pGraphic->GetGraphic().getSvgData(); + if(!pGraphic) + return OUString(); - if(rSvgDataPtr.get()) - { - rName = ImpGetResStr(STR_ObjNamePluralGRAFSVG); - } - else + const SvgDataPtr& rSvgDataPtr = pGraphic->GetGraphic().getSvgData(); + + OUStringBuffer sName; + + if(rSvgDataPtr.get()) + { + sName.append(ImpGetResStr(STR_ObjNamePluralGRAFSVG)); + } + else + { + switch( pGraphic->GetType() ) { - switch( pGraphic->GetType() ) + case GRAPHIC_BITMAP: { - case GRAPHIC_BITMAP: - { - const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ? - ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) : - ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPLNK : STR_ObjNamePluralGRAFBMP ) ); + const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || ( (const SdrGrafTransparenceItem&) GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ? + ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) : + ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPLNK : STR_ObjNamePluralGRAFBMP ) ); - rName=ImpGetResStr( nId ); - } - break; + sName.append(ImpGetResStr(nId)); + } + break; - case GRAPHIC_GDIMETAFILE: - rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFMTFLNK : STR_ObjNamePluralGRAFMTF ); - break; + case GRAPHIC_GDIMETAFILE: + sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNamePluralGRAFMTFLNK : STR_ObjNamePluralGRAFMTF)); + break; - case GRAPHIC_NONE: - rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFNONELNK : STR_ObjNamePluralGRAFNONE ); - break; + case GRAPHIC_NONE: + sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNamePluralGRAFNONELNK : STR_ObjNamePluralGRAFNONE)); + break; - default: - rName=ImpGetResStr( IsLinkedGraphic() ? STR_ObjNamePluralGRAFLNK : STR_ObjNamePluralGRAF ); - break; - } + default: + sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNamePluralGRAFLNK : STR_ObjNamePluralGRAF)); + break; } + } - const String aName(GetName()); + const OUString aName(GetName()); - if( aName.Len() ) - { - rName.AppendAscii( " '" ); - rName += aName; - rName += sal_Unicode( '\'' ); - } + if (!aName.isEmpty()) + { + sName.append(" '"); + sName.append(aName); + sName.append('\''); } + + return sName.makeStringAndClear(); } SdrObject* SdrGrafObj::getFullDragClone() const diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx index 98d7ca3..826d7f1 100644 --- a/svx/source/svdraw/svdogrp.cxx +++ b/svx/source/svdraw/svdogrp.cxx @@ -318,13 +318,11 @@ OUString SdrObjGroup::TakeObjNameSingul() const } -void SdrObjGroup::TakeObjNamePlural(XubString& rName) const +OUString SdrObjGroup::TakeObjNamePlural() const { - if (pSub->GetObjCount()==0) { - rName=ImpGetResStr(STR_ObjNamePluralGRUPEMPTY); - } else { - rName=ImpGetResStr(STR_ObjNamePluralGRUP); - } + if (pSub->GetObjCount()==0) + return ImpGetResStr(STR_ObjNamePluralGRUPEMPTY); + return ImpGetResStr(STR_ObjNamePluralGRUP); } diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 5778c74..90fa446 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -759,9 +759,9 @@ OUString SdrMeasureObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrMeasureObj::TakeObjNamePlural(XubString& rName) const +OUString SdrMeasureObj::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralMEASURE); + return ImpGetResStr(STR_ObjNamePluralMEASURE); } basegfx::B2DPolyPolygon SdrMeasureObj::TakeXorPoly() const diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index 43b1998..94b4aa9 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -158,9 +158,9 @@ OUString SdrMediaObj::TakeObjNameSingul() const // ------------------------------------------------------------------------------ -void SdrMediaObj::TakeObjNamePlural(XubString& rName) const +OUString SdrMediaObj::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralMEDIA); + return ImpGetResStr(STR_ObjNamePluralMEDIA); } // ------------------------------------------------------------------------------ diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index c614f6a..b97bf73 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1609,9 +1609,9 @@ OUString SdrOle2Obj::TakeObjNameSingul() const // ----------------------------------------------------------------------------- -void SdrOle2Obj::TakeObjNamePlural(XubString& rName) const +OUString SdrOle2Obj::TakeObjNamePlural() const { - rName=ImpGetResStr(bFrame ? STR_ObjNamePluralFrame : STR_ObjNamePluralOLE2); + return ImpGetResStr(bFrame ? STR_ObjNamePluralFrame : STR_ObjNamePluralOLE2); } // ----------------------------------------------------------------------------- diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx index 8bb424d..c80bdf6 100644 --- a/svx/source/svdraw/svdopage.cxx +++ b/svx/source/svdraw/svdopage.cxx @@ -182,9 +182,9 @@ OUString SdrPageObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrPageObj::TakeObjNamePlural(XubString& rName) const +OUString SdrPageObj::TakeObjNamePlural() const { - rName=ImpGetResStr(STR_ObjNamePluralPAGE); + return ImpGetResStr(STR_ObjNamePluralPAGE); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx index b7ea371..4d9cfb5 100644 --- a/svx/source/svdraw/svdopath.cxx +++ b/svx/source/svdraw/svdopath.cxx @@ -1974,21 +1974,23 @@ OUString SdrPathObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrPathObj::TakeObjNamePlural(XubString& rName) const +OUString SdrPathObj::TakeObjNamePlural() const { + OUString sName; switch(meKind) { - case OBJ_LINE : rName=ImpGetResStr(STR_ObjNamePluralLINE ); break; - case OBJ_PLIN : rName=ImpGetResStr(STR_ObjNamePluralPLIN ); break; - case OBJ_POLY : rName=ImpGetResStr(STR_ObjNamePluralPOLY ); break; - case OBJ_PATHLINE: rName=ImpGetResStr(STR_ObjNamePluralPATHLINE); break; - case OBJ_FREELINE: rName=ImpGetResStr(STR_ObjNamePluralFREELINE); break; - case OBJ_SPLNLINE: rName=ImpGetResStr(STR_ObjNamePluralNATSPLN); break; - case OBJ_PATHFILL: rName=ImpGetResStr(STR_ObjNamePluralPATHFILL); break; - case OBJ_FREEFILL: rName=ImpGetResStr(STR_ObjNamePluralFREEFILL); break; - case OBJ_SPLNFILL: rName=ImpGetResStr(STR_ObjNamePluralPERSPLN); break; + case OBJ_LINE : sName=ImpGetResStr(STR_ObjNamePluralLINE ); break; + case OBJ_PLIN : sName=ImpGetResStr(STR_ObjNamePluralPLIN ); break; + case OBJ_POLY : sName=ImpGetResStr(STR_ObjNamePluralPOLY ); break; + case OBJ_PATHLINE: sName=ImpGetResStr(STR_ObjNamePluralPATHLINE); break; + case OBJ_FREELINE: sName=ImpGetResStr(STR_ObjNamePluralFREELINE); break; + case OBJ_SPLNLINE: sName=ImpGetResStr(STR_ObjNamePluralNATSPLN); break; + case OBJ_PATHFILL: sName=ImpGetResStr(STR_ObjNamePluralPATHFILL); break; + case OBJ_FREEFILL: sName=ImpGetResStr(STR_ObjNamePluralFREEFILL); break; + case OBJ_SPLNFILL: sName=ImpGetResStr(STR_ObjNamePluralPERSPLN); break; default: break; } + return sName; } basegfx::B2DPolyPolygon SdrPathObj::TakeXorPoly() const diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx index 65cd363..6fd3e03 100644 --- a/svx/source/svdraw/svdorect.cxx +++ b/svx/source/svdraw/svdorect.cxx @@ -249,19 +249,29 @@ OUString SdrRectObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrRectObj::TakeObjNamePlural(XubString& rName) const +OUString SdrRectObj::TakeObjNamePlural() const { - if (IsTextFrame()) SdrTextObj::TakeObjNamePlural(rName); - else { - sal_uInt16 nResId=STR_ObjNamePluralRECT; - if (aGeo.nShearWink!=0) { - nResId+=4; // parallelogram or rhombus - } else { - if (aRect.GetWidth()==aRect.GetHeight()) nResId+=2; // square - } - if (GetEckenradius()!=0) nResId+=8; // rounded down - rName=ImpGetResStr(nResId); + if (IsTextFrame()) + { + return SdrTextObj::TakeObjNamePlural(); } + + sal_uInt16 nResId=STR_ObjNamePluralRECT; + + if (aGeo.nShearWink!=0) + { + nResId+=4; // parallelogram or rhombus + } + else + { + if (aRect.GetWidth()==aRect.GetHeight()) + nResId+=2; // square + } + + if (GetEckenradius()!=0) + nResId+=8; // rounded down + + return ImpGetResStr(nResId); } SdrRectObj* SdrRectObj::Clone() const diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index f46744f..4a5a646 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -1034,19 +1034,21 @@ OUString SdrTextObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrTextObj::TakeObjNamePlural(XubString& rName) const +OUString SdrTextObj::TakeObjNamePlural() const { + OUString sName; switch (eTextKind) { - case OBJ_OUTLINETEXT: rName=ImpGetResStr(STR_ObjNamePluralOUTLINETEXT); break; - case OBJ_TITLETEXT : rName=ImpGetResStr(STR_ObjNamePluralTITLETEXT); break; + case OBJ_OUTLINETEXT: sName=ImpGetResStr(STR_ObjNamePluralOUTLINETEXT); break; + case OBJ_TITLETEXT : sName=ImpGetResStr(STR_ObjNamePluralTITLETEXT); break; default: { if (IsLinkedText()) { - rName=ImpGetResStr(STR_ObjNamePluralTEXTLNK); + sName=ImpGetResStr(STR_ObjNamePluralTEXTLNK); } else { - rName=ImpGetResStr(STR_ObjNamePluralTEXT); + sName=ImpGetResStr(STR_ObjNamePluralTEXT); } } break; } // switch + return sName; } SdrTextObj* SdrTextObj::Clone() const diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx index f23ca26..4991e08 100644 --- a/svx/source/svdraw/svdouno.cxx +++ b/svx/source/svdraw/svdouno.cxx @@ -271,9 +271,9 @@ OUString SdrUnoObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrUnoObj::TakeObjNamePlural(XubString& rName) const +OUString SdrUnoObj::TakeObjNamePlural() const { - rName = ImpGetResStr(STR_ObjNamePluralUno); + return ImpGetResStr(STR_ObjNamePluralUno); } SdrUnoObj* SdrUnoObj::Clone() const diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx index 991d283..2a54577 100644 --- a/svx/source/svdraw/svdovirt.cxx +++ b/svx/source/svdraw/svdovirt.cxx @@ -169,11 +169,12 @@ OUString SdrVirtObj::TakeObjNameSingul() const return sName.makeStringAndClear(); } -void SdrVirtObj::TakeObjNamePlural(XubString& rName) const +OUString SdrVirtObj::TakeObjNamePlural() const { - rRefObj.TakeObjNamePlural(rName); - rName.Insert(sal_Unicode('['), 0); - rName += sal_Unicode(']'); + OUStringBuffer sName(rRefObj.TakeObjNamePlural()); + sName.insert(0, '['); + sName.append(']'); + return sName.makeStringAndClear(); } void operator +=(PolyPolygon& rPoly, const Point& rOfs) diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index 47251aa..a944f4e 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -1708,9 +1708,9 @@ OUString SdrTableObj::TakeObjNameSingul() const // -------------------------------------------------------------------- -void SdrTableObj::TakeObjNamePlural(XubString& rName) const +OUString SdrTableObj::TakeObjNamePlural() const { - rName = ImpGetResStr(STR_ObjNamePluralTable); + return ImpGetResStr(STR_ObjNamePluralTable); } // -------------------------------------------------------------------- diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index cd34020..1a9c365 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -2914,9 +2914,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl case OWN_ATTR_UINAME_PLURAL: { - String aTmp; - mpObj->TakeObjNamePlural( aTmp ); - rValue <<= OUString( aTmp ); + rValue <<= mpObj->TakeObjNamePlural(); break; } case OWN_ATTR_METAFILE:
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits