summaryrefslogtreecommitdiff
path: root/sd/source/ui/dlg
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2013-08-24 18:35:51 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2013-08-24 22:23:18 +0400
commit4652bdfa47a2ba453b6c8c199bc5f4f6d03af457 (patch)
tree506ad1814b3b79326f5ce7cb734a3c414da2cacf /sd/source/ui/dlg
parenta0bfad8c0eed119af2aea71d4deebcd60ac3f4a5 (diff)
convert StyleSheetUndoAction to OUString
Change-Id: I654df5dec1efae868aa6f90dbc672f9c29ebd0e3
Diffstat (limited to 'sd/source/ui/dlg')
-rw-r--r--sd/source/ui/dlg/unchss.cxx24
1 files changed, 10 insertions, 14 deletions
diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx
index 9c5c1e1f50af..a87655947712 100644
--- a/sd/source/ui/dlg/unchss.cxx
+++ b/sd/source/ui/dlg/unchss.cxx
@@ -52,13 +52,12 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc,
pTheDoc->MigrateItemSet( &pStyleSheet->GetItemSet(), pOldSet, pTheDoc );
aComment = SD_RESSTR(STR_UNDO_CHANGE_PRES_OBJECT);
- String aName(pStyleSheet->GetName());
+ OUString aName(pStyleSheet->GetName());
// delete layout name and separator
- String aSep( SD_LT_SEPARATOR );
- sal_uInt16 nPos = aName.Search(aSep);
- if( nPos != STRING_NOTFOUND )
- aName.Erase(0, nPos + aSep.Len());
+ sal_Int32 nPos = aName.indexOf(SD_LT_SEPARATOR);
+ if (nPos != -1)
+ aName = aName.copy(nPos + strlen(SD_LT_SEPARATOR));
if (aName == SD_RESSTR(STR_LAYOUT_TITLE))
{
@@ -82,20 +81,17 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc,
}
else
{
- String aOutlineStr(SdResId(STR_PSEUDOSHEET_OUTLINE));
- nPos = aName.Search(aOutlineStr);
- if (nPos != STRING_NOTFOUND)
+ OUString aOutlineStr(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE));
+ nPos = aName.indexOf(aOutlineStr);
+ if (nPos != -1)
{
- String aNumStr(aName.Copy(aOutlineStr.Len()));
- aName = SD_RESSTR(STR_LAYOUT_OUTLINE);
- aName += aNumStr;
+ OUString aNumStr(aName.copy(aOutlineStr.getLength()));
+ aName = SD_RESSTR(STR_LAYOUT_OUTLINE) + aNumStr;
}
}
// replace placeholder with template name
- nPos = aComment.Search(sal_Unicode('$'));
- aComment.Erase(nPos, 1);
- aComment.Insert(aName, nPos);
+ aComment = aComment.replaceFirst("$", aName);
}