diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2013-09-05 10:04:02 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2013-09-05 10:05:29 +0200 |
commit | 4c491c1253de0210dcd4d4ff593ee73562e4d958 (patch) | |
tree | 2dc2829b28ee0c829264e26be6bee2fbfa9ad148 /svx | |
parent | 17ff0d2b866f0e501057695d1485bf7d8d882f2a (diff) |
Make use replaceFirst
Change-Id: Ieedb318f36afc5d85fa90533578e847a1d9d6840
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svddrgv.cxx | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index 9b1a15e31d72..7c3bbc15738d 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -640,15 +640,9 @@ sal_Bool SdrDragView::ImpBegInsObjPoint(sal_Bool bIdxZwang, sal_uInt32 nIdx, con DBG_ASSERT( pInsPointUndo, "svx::SdrDragView::BegInsObjPoint(), could not create correct undo object!" ); OUString aStr(ImpGetResStr(STR_DragInsertPoint)); - OUString aName(pMarkedObj->TakeObjNameSingul()); - sal_Int32 nPos(aStr.indexOf("%1")); - if(-1 != nPos) - { - aStr = aStr.replaceAt(nPos, 2, aName); - } + aInsPointUndoStr = aStr.replaceFirst("%1", pMarkedObj->TakeObjNameSingul() ); - aInsPointUndoStr = aStr; Point aPt(rPnt); if(bNewObj) @@ -749,11 +743,9 @@ sal_Bool SdrDragView::BegInsGluePoint(const Point& rPnt) pInsPointUndo= dynamic_cast< SdrUndoGeoObj* >( GetModel()->GetSdrUndoFactory().CreateUndoGeoObject(*pObj) ); DBG_ASSERT( pInsPointUndo, "svx::SdrDragView::BegInsObjPoint(), could not create correct undo object!" ); OUString aStr(ImpGetResStr(STR_DragInsertGluePoint)); - OUString aName(pObj->TakeObjNameSingul()); - aStr = aStr.replaceFirst("%1", aName); + aInsPointUndoStr = aStr.replaceFirst("%1", pObj->TakeObjNameSingul() ); - aInsPointUndoStr=aStr; SdrGluePointList* pGPL=pObj->ForceGluePointList(); if (pGPL!=NULL) { |