diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-07-25 20:35:59 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-26 09:01:30 +0100 |
commit | a307e03946cca3a8e93b37eb9113721bc4e512bb (patch) | |
tree | 74840d663f7fb7035c52c1ba8b6e033e82f45f90 /svx | |
parent | b14688f07f2d2e1e53cf0b99bd2f7a055e2ddb3d (diff) |
convert TakeObjNamePlural family to OUString
Change-Id: I947e47934677a4f9ced0bfc0db3932bcbbb25f36
Diffstat (limited to 'svx')
26 files changed, 133 insertions, 121 deletions
diff --git a/svx/source/engine3d/cube3d.cxx b/svx/source/engine3d/cube3d.cxx index 5328d243ff0d..7a0426c364fa 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 6b4c60708901..98ceaddc0cb7 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 59005096ed01..55759026f2f1 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 6e74d2f04578..a9c5d65590af 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 cfc41635adf2..868ddcbaf6a5 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 b1c17beb252d..1f4487b1dbc0 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 91573ccb834c..547fa56782c9 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 73dd2b97a268..1c6fb1f3e0c6 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 dbfb8a05585d..3de2a643bf50 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 60d42ecf82cd..8e200faa74a1 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 ceb341b10119..9bd598c677ff 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 b43c842f3c88..9ed310c5d5ce 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 30d3366aa347..9cd1071d2f1b 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 fb550c168561..65ef13a0278d 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 98d7ca30c307..826d7f174da9 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 5778c7460bcd..90fa446be398 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 43b19988806f..94b4aa988b6e 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 c614f6aaf20c..b97bf73733af 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 8bb424d8a84f..c80bdf6e055f 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 b7ea371406f9..4d9cfb5521c4 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 65cd363c51f8..6fd3e0354391 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 f46744f52f99..4a5a646e6269 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 f23ca26af995..4991e0895917 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 991d283e9c1d..2a545777be9e 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 47251aad170f..a944f4e8dac5 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 cd340209a4e2..1a9c3651091f 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: |