diff options
-rw-r--r-- | sc/inc/styleuno.hxx | 2 | ||||
-rw-r--r-- | sd/source/core/stlsheet.cxx | 66 | ||||
-rw-r--r-- | sd/source/ui/func/fuprobjs.cxx | 12 | ||||
-rw-r--r-- | sd/source/ui/func/futempl.cxx | 2 | ||||
-rw-r--r-- | vcl/inc/svdata.hxx | 2 | ||||
-rw-r--r-- | vcl/inc/vcl/svapp.hxx | 4 | ||||
-rw-r--r-- | vcl/source/app/svapp.cxx | 6 |
7 files changed, 52 insertions, 42 deletions
diff --git a/sc/inc/styleuno.hxx b/sc/inc/styleuno.hxx index 71d01da90074..21f3d380bdc4 100644 --- a/sc/inc/styleuno.hxx +++ b/sc/inc/styleuno.hxx @@ -215,7 +215,7 @@ private: const SfxItemPropertySet* pPropSet; ScDocShell* pDocShell; SfxStyleFamily eFamily; // Family - String aStyleName; + OUString aStyleName; SfxStyleSheetBase* GetStyle_Impl(); const SfxItemSet* GetStyleItemSet_Impl( const ::rtl::OUString& rPropName, const SfxItemPropertySimpleEntry*& rpEntry ); diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx index 09c85c3c83ac..08540496fedd 100644 --- a/sd/source/core/stlsheet.cxx +++ b/sd/source/core/stlsheet.cxx @@ -55,7 +55,7 @@ #include "../ui/inc/DrawViewShell.hxx" #include "../ui/inc/ViewShellBase.hxx" -using ::rtl::OUString; + using ::osl::MutexGuard; using ::osl::ClearableMutexGuard; using ::cppu::OInterfaceContainerHelper; @@ -124,7 +124,7 @@ void ModifyListenerForewarder::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& /* } SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, sal_uInt16 _nMask) -: SdStyleSheetBase( UniString( rDisplayName ), _rPool, eFamily, _nMask) +: SdStyleSheetBase( OUString( rDisplayName ), _rPool, eFamily, _nMask) , ::cppu::BaseMutex() , msApiName( rDisplayName ) , mxPool( const_cast< SfxStyleSheetBasePool* >(&_rPool) ) @@ -386,8 +386,8 @@ bool SdStyleSheet::IsUsed() const SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const { - String aRealStyle; - String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR )); + OUString aRealStyle; + OUString aSep( SD_LT_SEPARATOR ); SdStyleSheet* pRealStyle = NULL; SdDrawDocument* pDoc = ((SdStyleSheetPool*)pPool)->GetDoc(); @@ -404,11 +404,14 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const { aRealStyle = pPage->GetLayoutName(); // cut after seperator string - aRealStyle.Erase(aRealStyle.Search(aSep) + aSep.Len()); + + if( aRealStyle.indexOf(aSep) >= 0) + { + aRealStyle = aRealStyle.copy(0,(aRealStyle.indexOf(aSep) + aSep.getLength())); + } } } - - if (aRealStyle.Len() == 0) + if (aRealStyle.isEmpty()) { SdPage* pPage = pDoc->GetSdPage(0, PK_STANDARD); @@ -426,7 +429,10 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const aRealStyle = pSheet->GetName(); } - aRealStyle.Erase(aRealStyle.Search(aSep) + aSep.Len()); + if( aRealStyle.indexOf(aSep) >= 0) + { + aRealStyle = aRealStyle.copy(0,(aRealStyle.indexOf(aSep) + aSep.getLength())); + } } // jetzt vom Namen (landessprachlich angepasst) auf den internen @@ -490,39 +496,43 @@ SdStyleSheet* SdStyleSheet::GetRealStyleSheet() const SdStyleSheet* SdStyleSheet::GetPseudoStyleSheet() const { SdStyleSheet* pPseudoStyle = NULL; - String aSep( RTL_CONSTASCII_USTRINGPARAM( SD_LT_SEPARATOR )); - String aStyleName(aName); + OUString aSep( SD_LT_SEPARATOR ); + OUString aStyleName(aName); // ohne Layoutnamen und Separator - aStyleName.Erase(0, aStyleName.Search(aSep) + aSep.Len()); - if (aStyleName == String(SdResId(STR_LAYOUT_TITLE))) + if( aStyleName.indexOf(aSep) >=0 ) { - aStyleName = String(SdResId(STR_PSEUDOSHEET_TITLE)); + aStyleName = aStyleName.copy (aStyleName.indexOf(aSep) + aSep.getLength()); } - else if (aStyleName == String(SdResId(STR_LAYOUT_SUBTITLE))) + + if (aStyleName == OUString(SdResId(STR_LAYOUT_TITLE))) + { + aStyleName = OUString(SdResId(STR_PSEUDOSHEET_TITLE)); + } + else if (aStyleName == OUString(SdResId(STR_LAYOUT_SUBTITLE))) { - aStyleName = String(SdResId(STR_PSEUDOSHEET_SUBTITLE)); + aStyleName = OUString(SdResId(STR_PSEUDOSHEET_SUBTITLE)); } - else if (aStyleName == String(SdResId(STR_LAYOUT_BACKGROUND))) + else if (aStyleName == OUString(SdResId(STR_LAYOUT_BACKGROUND))) { - aStyleName = String(SdResId(STR_PSEUDOSHEET_BACKGROUND)); + aStyleName = OUString(SdResId(STR_PSEUDOSHEET_BACKGROUND)); } - else if (aStyleName == String(SdResId(STR_LAYOUT_BACKGROUNDOBJECTS))) + else if (aStyleName == OUString(SdResId(STR_LAYOUT_BACKGROUNDOBJECTS))) { - aStyleName = String(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS)); + aStyleName = OUString(SdResId(STR_PSEUDOSHEET_BACKGROUNDOBJECTS)); } - else if (aStyleName == String(SdResId(STR_LAYOUT_NOTES))) + else if (aStyleName == OUString(SdResId(STR_LAYOUT_NOTES))) { - aStyleName = String(SdResId(STR_PSEUDOSHEET_NOTES)); + aStyleName = OUString(SdResId(STR_PSEUDOSHEET_NOTES)); } else { - String aOutlineStr((SdResId(STR_LAYOUT_OUTLINE))); - sal_uInt16 nPos = aStyleName.Search(aOutlineStr); - if (nPos != STRING_NOTFOUND) + OUString aOutlineStr((SdResId(STR_LAYOUT_OUTLINE))); + sal_Int32 nPos = aStyleName.indexOf(aOutlineStr); + if (nPos != -1) { - String aNumStr(aStyleName.Copy(aOutlineStr.Len())); - aStyleName = String(SdResId(STR_PSEUDOSHEET_OUTLINE)); + OUString aNumStr(aStyleName.copy(aOutlineStr.getLength())); + aStyleName = OUString(SdResId(STR_PSEUDOSHEET_OUTLINE)); aStyleName += aNumStr; } } @@ -573,7 +583,7 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, sal_Bool bOnlyMissingIte // Bulletbreite und Texteinzug an neue Fonthoehe // anpassen, wenn sie nicht explizit gesetzt wurden SfxStyleFamily eFamily = nFamily; - String aStyleName(aName); + OUString aStyleName(aName); if (eFamily == SD_STYLE_FAMILY_PSEUDO) { SfxStyleSheet* pRealStyle = GetRealStyleSheet(); @@ -582,7 +592,7 @@ void SdStyleSheet::AdjustToFontHeight(SfxItemSet& rSet, sal_Bool bOnlyMissingIte } if (eFamily == SD_STYLE_FAMILY_MASTERPAGE && - aStyleName.Search(String(SdResId(STR_LAYOUT_OUTLINE))) != STRING_NOTFOUND && + aStyleName.indexOf(OUString(SdResId(STR_LAYOUT_OUTLINE))) != -1 && rSet.GetItemState(EE_CHAR_FONTHEIGHT) == SFX_ITEM_SET) { const SfxItemSet* pCurSet = &GetItemSet(); diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx index 899b75e6d261..f38b91f899f2 100644 --- a/sd/source/ui/func/fuprobjs.cxx +++ b/sd/source/ui/func/fuprobjs.cxx @@ -121,8 +121,8 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) if( bUnique ) { - String aStyleName = aLayoutName; - aStyleName.AppendAscii( RTL_CONSTASCII_STRINGPARAM( SD_LT_SEPARATOR ) ); + OUString aStyleName = aLayoutName; + aStyleName += SD_LT_SEPARATOR ; sal_uInt16 nDlgId = TAB_PRES_LAYOUT_TEMPLATE; PresentationObjects ePO; @@ -130,15 +130,15 @@ void FuPresentationObjects::DoExecute( SfxRequest& ) { ePO = PO_TITLE; String aStr(SdResId( STR_LAYOUT_TITLE )); - aStyleName.Append( aStr ); + aStyleName += aStr ; } else { ePO = (PresentationObjects) ( PO_OUTLINE_1 + nDepth - 1 ); String aStr(SdResId( STR_LAYOUT_OUTLINE )); - aStyleName.Append( aStr ); - aStyleName.Append( sal_Unicode(' ') ); - aStyleName.Append( OUString::number( nDepth ) ); + aStyleName += aStr ; + aStyleName += OUString(' ') ; + aStyleName += OUString::number( nDepth ) ; } SfxStyleSheetBasePool* pStyleSheetPool = mpDocSh->GetStyleSheetPool(); diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 91d06f32ca85..14a60352e0d2 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -126,7 +126,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) nFamily = SD_STYLE_FAMILY_PSEUDO; } - String aStyleName; + OUString aStyleName; sal_uInt16 nRetMask = SFXSTYLEBIT_ALL; switch( nSId ) diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index b4b59b57bd2a..7f89f9fe0082 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -120,7 +120,7 @@ struct ImplSVAppData ImplAccelManager* mpAccelMgr; // Accelerator Manager XubString* mpAppName; // Application name XubString* mpAppFileName; // Abs. Application FileName - XubString* mpDisplayName; // Application Display Name + OUString* mpDisplayName; // Application Display Name String* mpFontPath; // Additional Fontpath Help* mpHelp; // Application help PopupMenu* mpActivePopupMenu; // Actives Popup-Menu (in Execute) diff --git a/vcl/inc/vcl/svapp.hxx b/vcl/inc/vcl/svapp.hxx index 364316827bb7..a3eb6b72a14e 100644 --- a/vcl/inc/vcl/svapp.hxx +++ b/vcl/inc/vcl/svapp.hxx @@ -260,8 +260,8 @@ public: static bool LoadBrandSVG( const char *pName, BitmapEx &rBitmap ); // default name of the application for message dialogs and printing - static void SetDisplayName( const UniString& rDisplayName ); - static UniString GetDisplayName(); + static void SetDisplayName( const OUString& rDisplayName ); + static OUString GetDisplayName(); static unsigned int GetScreenCount(); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 9e67117dc6b0..9182b1c34de5 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -1192,20 +1192,20 @@ XubString Application::GetAppName() // ----------------------------------------------------------------------- -void Application::SetDisplayName( const UniString& rName ) +void Application::SetDisplayName( const OUString& rName ) { ImplSVData* pSVData = ImplGetSVData(); // create if not existing if ( !pSVData->maAppData.mpDisplayName ) - pSVData->maAppData.mpDisplayName = new UniString( rName ); + pSVData->maAppData.mpDisplayName = new OUString( rName ); else *(pSVData->maAppData.mpDisplayName) = rName; } // ----------------------------------------------------------------------- -UniString Application::GetDisplayName() +OUString Application::GetDisplayName() { ImplSVData* pSVData = ImplGetSVData(); if ( pSVData->maAppData.mpDisplayName ) |