summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/engine3d/cube3d.cxx9
-rw-r--r--svx/source/engine3d/extrud3d.cxx9
-rw-r--r--svx/source/engine3d/lathe3d.cxx9
-rw-r--r--svx/source/engine3d/obj3d.cxx9
-rw-r--r--svx/source/engine3d/scene3d.cxx11
-rw-r--r--svx/source/engine3d/sphere3d.cxx9
-rw-r--r--svx/source/form/fmshimp.cxx8
-rw-r--r--svx/source/svdraw/svdoashp.cxx11
-rw-r--r--svx/source/svdraw/svdobj.cxx11
-rw-r--r--svx/source/svdraw/svdocapt.cxx11
-rw-r--r--svx/source/svdraw/svdocirc.cxx21
-rw-r--r--svx/source/svdraw/svdoedge.cxx11
-rw-r--r--svx/source/svdraw/svdogrp.cxx15
-rw-r--r--svx/source/svdraw/svdomeas.cxx11
-rw-r--r--svx/source/svdraw/svdomedia.cxx11
-rw-r--r--svx/source/svdraw/svdopage.cxx11
-rw-r--r--svx/source/svdraw/svdopath.cxx30
-rw-r--r--svx/source/svdraw/svdorect.cxx23
-rw-r--r--svx/source/svdraw/svdotext.cxx11
-rw-r--r--svx/source/svdraw/svdouno.cxx11
-rw-r--r--svx/source/svdraw/svdovirt.cxx18
-rw-r--r--svx/source/table/svdotable.cxx11
22 files changed, 86 insertions, 195 deletions
diff --git a/svx/source/engine3d/cube3d.cxx b/svx/source/engine3d/cube3d.cxx
index 39542232f33f..c68462860c35 100644
--- a/svx/source/engine3d/cube3d.cxx
+++ b/svx/source/engine3d/cube3d.cxx
@@ -134,17 +134,14 @@ void E3dCubeObj::SetPosIsCenter(bool bNew)
OUString E3dCubeObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulCube3d));
+ OUString sName = SvxResId(STR_ObjNameSingulCube3d);
OUString aName(GetName());
if (!aName.isEmpty())
{
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
+ sName += " \'" + aName + "'";
}
- return sName.makeStringAndClear();
+ return sName;
}
// Get the name of the object (plural)
diff --git a/svx/source/engine3d/extrud3d.cxx b/svx/source/engine3d/extrud3d.cxx
index 605851d90476..d0cb345755a3 100644
--- a/svx/source/engine3d/extrud3d.cxx
+++ b/svx/source/engine3d/extrud3d.cxx
@@ -132,17 +132,14 @@ void E3dExtrudeObj::SetExtrudePolygon(const basegfx::B2DPolyPolygon &rNew)
OUString E3dExtrudeObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulExtrude3d));
+ OUString sName(SvxResId(STR_ObjNameSingulExtrude3d));
OUString aName(GetName());
if (!aName.isEmpty())
{
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
+ sName += " '" + aName + "'";
}
- return sName.makeStringAndClear();
+ return sName;
}
// Get the name of the object (plural)
diff --git a/svx/source/engine3d/lathe3d.cxx b/svx/source/engine3d/lathe3d.cxx
index ef80d9379202..e811d0eebfeb 100644
--- a/svx/source/engine3d/lathe3d.cxx
+++ b/svx/source/engine3d/lathe3d.cxx
@@ -159,17 +159,14 @@ void E3dLatheObj::SetPolyPoly2D(const basegfx::B2DPolyPolygon& rNew)
OUString E3dLatheObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulLathe3d));
+ OUString sName(SvxResId(STR_ObjNameSingulLathe3d));
OUString aName(GetName());
if (!aName.isEmpty())
{
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
+ sName += " '" + aName + "'";
}
- return sName.makeStringAndClear();
+ return sName;
}
// Get the name of the object (plural)
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index f12780305615..9f9263b02587 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -388,17 +388,14 @@ basegfx::B3DPolyPolygon E3dObject::CreateWireframe() const
// Get the name of the object (singular)
OUString E3dObject::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulObj3d));
+ OUString sName = SvxResId(STR_ObjNameSingulObj3d);
OUString aName(GetName());
if (!aName.isEmpty())
{
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
+ sName += " '" + aName + "'";
}
- return sName.makeStringAndClear();
+ return sName;
}
// Get the name of the object (plural)
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index 0589b1cc9e73..099f3fb75f7d 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -574,17 +574,12 @@ void E3dScene::RotateScene (const Point& rRef, double sn, double cs)
OUString E3dScene::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulScene3d));
+ OUString sName(SvxResId(STR_ObjNameSingulScene3d));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
- return sName.makeStringAndClear();
+ sName += " '" + aName + "'";
+ return sName;
}
OUString E3dScene::TakeObjNamePlural() const
diff --git a/svx/source/engine3d/sphere3d.cxx b/svx/source/engine3d/sphere3d.cxx
index b36e5248faa1..7cc16a82ff65 100644
--- a/svx/source/engine3d/sphere3d.cxx
+++ b/svx/source/engine3d/sphere3d.cxx
@@ -129,17 +129,14 @@ void E3dSphereObj::SetSize(const basegfx::B3DVector& rNew)
OUString E3dSphereObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulSphere3d));
+ OUString sName(SvxResId(STR_ObjNameSingulSphere3d));
OUString aName(GetName());
if (!aName.isEmpty())
{
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
+ sName += " '" + aName + "'";
}
- return sName.makeStringAndClear();
+ return sName;
}
// Get the name of the object (plural)
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index 2ad95ffd0a94..ba2875998cdc 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -2866,12 +2866,10 @@ void FmXFormShell::impl_collectFormSearchContexts_nothrow_Lock( const Reference<
sCurrentFormName = xNamed->getName();
// the name of the current form
- OUStringBuffer sCompleteCurrentName( sCurrentFormName );
+ OUString sCompleteCurrentName( sCurrentFormName );
if ( !_rCurrentLevelPrefix.isEmpty() )
{
- sCompleteCurrentName.append( " (" );
- sCompleteCurrentName.append ( _rCurrentLevelPrefix );
- sCompleteCurrentName.append( ")" );
+ sCompleteCurrentName += " (" + _rCurrentLevelPrefix + ")";
}
// the prefix for the next level
@@ -2882,7 +2880,7 @@ void FmXFormShell::impl_collectFormSearchContexts_nothrow_Lock( const Reference<
// remember both the form and its "display name"
_out_rForms.push_back( xCurrentAsForm );
- _out_rNames.push_back( sCompleteCurrentName.makeStringAndClear() );
+ _out_rNames.push_back( sCompleteCurrentName );
// and descend
impl_collectFormSearchContexts_nothrow_Lock(
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index 409915bc1c8a..e5ccc84e7cae 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -2782,16 +2782,11 @@ SdrObjCustomShape* SdrObjCustomShape::CloneSdrObject(SdrModel& rTargetModel) con
OUString SdrObjCustomShape::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulCUSTOMSHAPE));
+ OUString sName(SvxResId(STR_ObjNameSingulCUSTOMSHAPE));
OUString aNm(GetName());
if (!aNm.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aNm);
- sName.append('\'');
- }
- return sName.makeStringAndClear();
+ sName += " '" + aNm + "'";
+ return sName;
}
OUString SdrObjCustomShape::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 8a30af0054e5..b0996d5d8405 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1055,17 +1055,12 @@ SdrObject* SdrObject::CloneSdrObject(SdrModel& rTargetModel) const
OUString SdrObject::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulNONE));
+ OUString sName(SvxResId(STR_ObjNameSingulNONE));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
- return sName.makeStringAndClear();
+ sName += " '" + aName + "'";
+ return sName;
}
OUString SdrObject::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 6be4d7e7cdac..fdec2552981a 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -247,18 +247,13 @@ SdrCaptionObj* SdrCaptionObj::CloneSdrObject(SdrModel& rTargetModel) const
OUString SdrCaptionObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulCAPTION));
+ OUString sName(SvxResId(STR_ObjNameSingulCAPTION));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
OUString SdrCaptionObj::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdocirc.cxx b/svx/source/svdraw/svdocirc.cxx
index 8c16d470d3f3..4250b762ea86 100644
--- a/svx/source/svdraw/svdocirc.cxx
+++ b/svx/source/svdraw/svdocirc.cxx
@@ -338,17 +338,12 @@ OUString SdrCircObj::TakeObjNameSingul() const
default: break;
}
}
- OUStringBuffer sName(SvxResId(pID));
+ OUString sName(SvxResId(pID));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
- return sName.makeStringAndClear();
+ sName += " '" + aName + "'";
+ return sName;
}
OUString SdrCircObj::TakeObjNamePlural() const
@@ -621,12 +616,10 @@ OUString SdrCircObj::getSpecialDragComment(const SdrDragStat& rDrag) const
{
const Degree100 nAngle(1 == rDrag.GetHdl()->GetPointNum() ? nStartAngle : nEndAngle);
- OUStringBuffer aBuf(ImpGetDescriptionStr(STR_DragCircAngle));
- aBuf.append(" (");
- aBuf.append(SdrModel::GetAngleString(nAngle));
- aBuf.append(')');
-
- return aBuf.makeStringAndClear();
+ return ImpGetDescriptionStr(STR_DragCircAngle) +
+ " (" +
+ SdrModel::GetAngleString(nAngle) +
+ ")";
}
else
{
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 512d7b048bdc..c9411425e2e5 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -1671,17 +1671,12 @@ SdrEdgeObj* SdrEdgeObj::CloneSdrObject(SdrModel& rTargetModel) const
OUString SdrEdgeObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulEDGE));
+ OUString sName(SvxResId(STR_ObjNameSingulEDGE));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
- return sName.makeStringAndClear();
+ sName += " '" + aName + "'";
+ return sName;
}
OUString SdrEdgeObj::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index c71cff4b279e..620dfc154cf8 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -225,28 +225,23 @@ SdrObjGroup* SdrObjGroup::CloneSdrObject(SdrModel& rTargetModel) const
OUString SdrObjGroup::TakeObjNameSingul() const
{
- OUStringBuffer sName;
+ OUString sName;
if(0 == GetObjCount())
{
- sName.append(SvxResId(STR_ObjNameSingulGRUPEMPTY));
+ sName = SvxResId(STR_ObjNameSingulGRUPEMPTY);
}
else
{
- sName.append(SvxResId(STR_ObjNameSingulGRUP));
+ sName = SvxResId(STR_ObjNameSingulGRUP);
}
const OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index dcf0858705e5..db470844e4e0 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -714,18 +714,13 @@ SdrMeasureObj* SdrMeasureObj::CloneSdrObject(SdrModel& rTargetModel) const
OUString SdrMeasureObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulMEASURE));
+ OUString sName(SvxResId(STR_ObjNameSingulMEASURE));
OUString aName( GetName() );
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
OUString SdrMeasureObj::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx
index 5826d3e72bed..515bdff11b42 100644
--- a/svx/source/svdraw/svdomedia.cxx
+++ b/svx/source/svdraw/svdomedia.cxx
@@ -118,19 +118,14 @@ SdrObjKind SdrMediaObj::GetObjIdentifier() const
OUString SdrMediaObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulMEDIA));
+ OUString sName(SvxResId(STR_ObjNameSingulMEDIA));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
OUString SdrMediaObj::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdopage.cxx b/svx/source/svdraw/svdopage.cxx
index d4f0bc208838..d0eb579cc6dd 100644
--- a/svx/source/svdraw/svdopage.cxx
+++ b/svx/source/svdraw/svdopage.cxx
@@ -159,18 +159,13 @@ SdrPageObj* SdrPageObj::CloneSdrObject(SdrModel& rTargetModel) const
OUString SdrPageObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulPAGE));
+ OUString sName(SvxResId(STR_ObjNameSingulPAGE));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
OUString SdrPageObj::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index dc6f6ce3df5d..a9aaefae3239 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -1832,7 +1832,7 @@ SdrPathObj* SdrPathObj::CloneSdrObject(SdrModel& rTargetModel) const
OUString SdrPathObj::TakeObjNameSingul() const
{
- OUStringBuffer sName;
+ OUString sName;
if(OBJ_LINE == meKind)
{
@@ -1867,7 +1867,7 @@ OUString SdrPathObj::TakeObjNameSingul() const
}
}
- sName.append(SvxResId(pId));
+ sName = SvxResId(pId);
}
else if(OBJ_PLIN == meKind || OBJ_POLY == meKind)
{
@@ -1885,7 +1885,7 @@ OUString SdrPathObj::TakeObjNameSingul() const
pId = STR_ObjNameSingulPLIN;
}
- sName.append(SvxResId(pId));
+ sName = SvxResId(pId);
}
else
{
@@ -1906,35 +1906,29 @@ OUString SdrPathObj::TakeObjNameSingul() const
pId = STR_ObjNameSingulPLIN_PointCount;
}
- OUString sTemp(SvxResId(pId));
// #i96537#
- sName.append(sTemp.replaceFirst("%2", OUString::number(nPointCount)));
+ sName = SvxResId(pId).replaceFirst("%2", OUString::number(nPointCount));
}
}
else
{
switch (meKind)
{
- case OBJ_PATHLINE: sName.append(SvxResId(STR_ObjNameSingulPATHLINE)); break;
- case OBJ_FREELINE: sName.append(SvxResId(STR_ObjNameSingulFREELINE)); break;
- case OBJ_SPLNLINE: sName.append(SvxResId(STR_ObjNameSingulNATSPLN)); break;
- case OBJ_PATHFILL: sName.append(SvxResId(STR_ObjNameSingulPATHFILL)); break;
- case OBJ_FREEFILL: sName.append(SvxResId(STR_ObjNameSingulFREEFILL)); break;
- case OBJ_SPLNFILL: sName.append(SvxResId(STR_ObjNameSingulPERSPLN)); break;
+ case OBJ_PATHLINE: sName = SvxResId(STR_ObjNameSingulPATHLINE); break;
+ case OBJ_FREELINE: sName = SvxResId(STR_ObjNameSingulFREELINE); break;
+ case OBJ_SPLNLINE: sName = SvxResId(STR_ObjNameSingulNATSPLN); break;
+ case OBJ_PATHFILL: sName = SvxResId(STR_ObjNameSingulPATHFILL); break;
+ case OBJ_FREEFILL: sName = SvxResId(STR_ObjNameSingulFREEFILL); break;
+ case OBJ_SPLNFILL: sName = SvxResId(STR_ObjNameSingulPERSPLN); break;
default: break;
}
}
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
OUString SdrPathObj::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdorect.cxx b/svx/source/svdraw/svdorect.cxx
index bead75b27b44..825bf866ee96 100644
--- a/svx/source/svdraw/svdorect.cxx
+++ b/svx/source/svdraw/svdorect.cxx
@@ -207,8 +207,6 @@ OUString SdrRectObj::TakeObjNameSingul() const
return SdrTextObj::TakeObjNameSingul();
}
- OUStringBuffer sName;
-
bool bRounded = GetEckenradius() != 0; // rounded down
const char* pResId = bRounded ? STR_ObjNameSingulRECTRND : STR_ObjNameSingulRECT;
if (aGeo.nShearAngle)
@@ -219,18 +217,13 @@ OUString SdrRectObj::TakeObjNameSingul() const
{
pResId = bRounded ? STR_ObjNameSingulQUADRND : STR_ObjNameSingulQUAD; // square
}
- sName.append(SvxResId(pResId));
+ OUString sName(SvxResId(pResId));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
OUString SdrRectObj::TakeObjNamePlural() const
@@ -422,12 +415,10 @@ OUString SdrRectObj::getSpecialDragComment(const SdrDragStat& rDrag) const
if(nRad < 0)
nRad = 0;
- OUStringBuffer aBuf(ImpGetDescriptionStr(STR_DragRectEckRad));
- aBuf.append(" (");
- aBuf.append(GetMetrStr(nRad));
- aBuf.append(')');
-
- return aBuf.makeStringAndClear();
+ return ImpGetDescriptionStr(STR_DragRectEckRad) +
+ " (" +
+ GetMetrStr(nRad) +
+ ")";
}
else
{
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index 1d3f0ba2e4bf..c52ef1dff5ce 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -1017,18 +1017,13 @@ OUString SdrTextObj::TakeObjNameSingul() const
}
}
- OUStringBuffer sName(aStr);
+ OUString sName(aStr);
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
OUString SdrTextObj::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdouno.cxx b/svx/source/svdraw/svdouno.cxx
index 648463460622..eebe934ddf10 100644
--- a/svx/source/svdraw/svdouno.cxx
+++ b/svx/source/svdraw/svdouno.cxx
@@ -267,18 +267,13 @@ void SdrUnoObj::SetContextWritingMode( const sal_Int16 _nContextWritingMode )
OUString SdrUnoObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulUno));
+ OUString sName(SvxResId(STR_ObjNameSingulUno));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
OUString SdrUnoObj::TakeObjNamePlural() const
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 204b67057c3f..0bc2a393a400 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -145,28 +145,18 @@ SdrVirtObj* SdrVirtObj::CloneSdrObject(SdrModel& rTargetModel) const
OUString SdrVirtObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(rRefObj.TakeObjNameSingul());
- sName.insert(0, '[');
- sName.append(']');
+ OUString sName = "[" + rRefObj.TakeObjNameSingul() + "]";
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}
OUString SdrVirtObj::TakeObjNamePlural() const
{
- OUStringBuffer sName(rRefObj.TakeObjNamePlural());
- sName.insert(0, '[');
- sName.append(']');
- return sName.makeStringAndClear();
+ return "[" + rRefObj.TakeObjNamePlural() + "]";
}
bool SdrVirtObj::HasLimitedRotation() const
diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx
index 5731c12acdd9..9acef67c552f 100644
--- a/svx/source/table/svdotable.cxx
+++ b/svx/source/table/svdotable.cxx
@@ -1756,18 +1756,13 @@ EEAnchorMode SdrTableObj::GetOutlinerViewAnchorMode() const
OUString SdrTableObj::TakeObjNameSingul() const
{
- OUStringBuffer sName(SvxResId(STR_ObjNameSingulTable));
+ OUString sName(SvxResId(STR_ObjNameSingulTable));
OUString aName(GetName());
if (!aName.isEmpty())
- {
- sName.append(' ');
- sName.append('\'');
- sName.append(aName);
- sName.append('\'');
- }
+ sName += " '" + aName + "'";
- return sName.makeStringAndClear();
+ return sName;
}