diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-24 18:35:51 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-24 22:23:18 +0400 |
commit | 4652bdfa47a2ba453b6c8c199bc5f4f6d03af457 (patch) | |
tree | 506ad1814b3b79326f5ce7cb734a3c414da2cacf /sd | |
parent | a0bfad8c0eed119af2aea71d4deebcd60ac3f4a5 (diff) |
convert StyleSheetUndoAction to OUString
Change-Id: I654df5dec1efae868aa6f90dbc672f9c29ebd0e3
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/dlg/unchss.cxx | 24 | ||||
-rw-r--r-- | sd/source/ui/inc/unchss.hxx | 2 |
2 files changed, 11 insertions, 15 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); } diff --git a/sd/source/ui/inc/unchss.hxx b/sd/source/ui/inc/unchss.hxx index 16927cf17b9e..4ca83c635706 100644 --- a/sd/source/ui/inc/unchss.hxx +++ b/sd/source/ui/inc/unchss.hxx @@ -32,7 +32,7 @@ class StyleSheetUndoAction : public SdUndoAction SfxItemSet* pNewSet; SfxItemSet* pOldSet; - String aComment; + OUString aComment; public: TYPEINFO(); |