diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-09-10 23:42:29 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-09-11 10:54:24 +0100 |
commit | 3e635c3368c23608bac471970f18d1d64684a147 (patch) | |
tree | bcd3c3896b079b16fd26ef826d44c9a93dde41bc /sd/source/core | |
parent | c0c7fb66985a9a3e8f9b7a796c1e0489e407879b (diff) |
XubString->rtl::OUString
Change-Id: If7e5d015c95f8f173750ca32e061d69f56e2d93e
Diffstat (limited to 'sd/source/core')
-rw-r--r-- | sd/source/core/drawdoc3.cxx | 10 | ||||
-rw-r--r-- | sd/source/core/sdpage.cxx | 18 | ||||
-rw-r--r-- | sd/source/core/sdpage2.cxx | 8 | ||||
-rw-r--r-- | sd/source/core/stlfamily.cxx | 2 |
4 files changed, 18 insertions, 20 deletions
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx index 27e9197c0cd6..ab8b0e5e82c6 100644 --- a/sd/source/core/drawdoc3.cxx +++ b/sd/source/core/drawdoc3.cxx @@ -1258,7 +1258,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, sal_Bool { // Do not delete master pages that have their precious flag set. sal_Bool bDeleteMaster = !pMaster->IsPrecious(); - String aLayoutName = pMaster->GetLayoutName(); + OUString aLayoutName = pMaster->GetLayoutName(); if(bOnlyDuplicatePages ) { @@ -1419,11 +1419,11 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum, } else { - String aSearchFor(rLayoutName); - aSearchFor.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR )); - aSearchFor.Append( String(SdResId(STR_LAYOUT_OUTLINE))) ; + OUStringBuffer aBuf(rLayoutName); + aBuf.append(SD_LT_SEPARATOR).append(SdResId(STR_LAYOUT_OUTLINE).toString()); + OUString aSearchFor(aBuf.makeStringAndClear()); - for (sal_uInt16 nMP = 0; nMP < pSourceDoc->GetMasterPageCount(); nMP++) + for (sal_uInt16 nMP = 0; nMP < pSourceDoc->GetMasterPageCount(); ++nMP) { SdPage* pMP = (SdPage*) pSourceDoc->GetMasterPage(nMP); diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 0432f5403700..0d44e14e3029 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -118,9 +118,9 @@ SdPage::SdPage(SdDrawDocument& rNewDoc, StarBASIC* pBasic, sal_Bool bMasterPage) // Der Layoutname der Seite wird von SVDRAW benutzt, um die Praesentations- // vorlagen der Gliederungsobjekte zu ermitteln. Darum enthaelt er bereits // den Bezeichner fuer die Gliederung (STR_LAYOUT_OUTLINE). - maLayoutName = String(SdResId(STR_LAYOUT_DEFAULT_NAME)); - maLayoutName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR )); - maLayoutName += String(SdResId(STR_LAYOUT_OUTLINE)); + OUStringBuffer aBuf(SdResId(STR_LAYOUT_DEFAULT_NAME).toString()); + aBuf.append(SD_LT_SEPARATOR).append(SdResId(STR_LAYOUT_OUTLINE).toString()); + maLayoutName = aBuf.makeStringAndClear(); Size aPageSize(GetSize()); @@ -2494,18 +2494,16 @@ void SdPage::SetLinkData(const String&, const String& ) |* Layoutname setzen |* \************************************************************************/ -void SdPage::SetLayoutName(String aName) +void SdPage::SetLayoutName(OUString aName) { maLayoutName = aName; if( mbMaster ) { - String aSep( RTL_CONSTASCII_USTRINGPARAM(SD_LT_SEPARATOR) ); - sal_uInt16 nPos = maLayoutName.Search( aSep ); - if ( nPos != STRING_NOTFOUND ) - { - FmFormPage::SetName(maLayoutName.Copy(0, nPos)); - } + OUString aSep(SD_LT_SEPARATOR); + sal_Int32 nPos = maLayoutName.indexOf(aSep); + if (nPos != -1) + FmFormPage::SetName(maLayoutName.copy(0, nPos)); } } diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx index d8ec4ec7a52d..f44cbcede000 100644 --- a/sd/source/core/sdpage2.cxx +++ b/sd/source/core/sdpage2.cxx @@ -90,10 +90,10 @@ void SdPage::SetPresentationLayout(const String& rLayoutName, /********************************************************************* |* Layoutname der Seite \********************************************************************/ - String aOldLayoutName(maLayoutName); // merken - maLayoutName = rLayoutName; - maLayoutName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR )); - maLayoutName += String(SdResId(STR_LAYOUT_OUTLINE)); + OUString aOldLayoutName(maLayoutName); // merken + OUStringBuffer aBuf(rLayoutName); + aBuf.append(SD_LT_SEPARATOR).append(SdResId(STR_LAYOUT_OUTLINE).toString()); + maLayoutName = aBuf.makeStringAndClear(); /********************************************************************* |* ggf. Masterpage suchen und setzen diff --git a/sd/source/core/stlfamily.cxx b/sd/source/core/stlfamily.cxx index 7b32a4b2abd9..5024a8134730 100644 --- a/sd/source/core/stlfamily.cxx +++ b/sd/source/core/stlfamily.cxx @@ -62,7 +62,7 @@ typedef std::map< rtl::OUString, rtl::Reference< SdStyleSheet > > PresStyleMap; struct SdStyleFamilyImpl { SdrPageWeakRef mxMasterPage; - String maLayoutName; + OUString maLayoutName; PresStyleMap& getStyleSheets(); rtl::Reference< SfxStyleSheetPool > mxPool; |