diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-10 21:37:06 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-08-10 21:37:34 +0400 |
commit | d4ba5995a168a8999734252fe6e9240bde1b7dae (patch) | |
tree | 52aa47b71fcfb9f51a42861d053f78f3560264f6 /sd/source/ui/view/drviews1.cxx | |
parent | 8cb156a67b987981efbda3640e503d601c40d88b (diff) |
String->OUString
Change-Id: Ic908590642bac656db78a965c2176d6f53c8d6f4
Diffstat (limited to 'sd/source/ui/view/drviews1.cxx')
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index f6eb20f545d5..6d0db828eed5 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -372,13 +372,12 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) maTabControl.Clear(); SdPage* pPage; - String aPageName; sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind); for (sal_uInt16 i = 0; i < nPageCnt; i++) { pPage = GetDoc()->GetSdPage(i, mePageKind); - aPageName = pPage->GetName(); + OUString aPageName = pPage->GetName(); maTabControl.InsertPage(i + 1, aPageName); if ( pPage->IsSelected() && nActualPageNum == 0 ) @@ -412,8 +411,10 @@ void DrawViewShell::ChangeEditMode(EditMode eEMode, bool bIsLayerModeActive) for (sal_uInt16 i = 0; i < nMasterPageCnt; i++) { SdPage* pMaster = GetDoc()->GetMasterSdPage(i, mePageKind); - String aLayoutName(pMaster->GetLayoutName()); - aLayoutName.Erase(aLayoutName.SearchAscii(SD_LT_SEPARATOR)); + OUString aLayoutName = pMaster->GetLayoutName(); + sal_Int32 nPos = aLayoutName.indexOf(SD_LT_SEPARATOR); + if (nPos != -1) + aLayoutName = aLayoutName.copy(0, nPos); maTabControl.InsertPage(i + 1, aLayoutName); @@ -650,12 +651,11 @@ void DrawViewShell::ResetActualPage() maTabControl.Clear(); SdPage* pPage = NULL; - String aPageName; for (sal_uInt16 i = 0; i < nPageCount; i++) { pPage = GetDoc()->GetSdPage(i, mePageKind); - aPageName = pPage->GetName(); + OUString aPageName = pPage->GetName(); maTabControl.InsertPage(i + 1, aPageName); // correct selection recognition of the pages @@ -674,8 +674,10 @@ void DrawViewShell::ResetActualPage() for (sal_uInt16 i = 0; i < nMasterPageCnt; i++) { SdPage* pMaster = GetDoc()->GetMasterSdPage(i, mePageKind); - String aLayoutName(pMaster->GetLayoutName()); - aLayoutName.Erase(aLayoutName.SearchAscii(SD_LT_SEPARATOR)); + OUString aLayoutName = pMaster->GetLayoutName(); + sal_Int32 nPos = aLayoutName.indexOf(SD_LT_SEPARATOR); + if (nPos != -1) + aLayoutName = aLayoutName.copy(0, nPos); maTabControl.InsertPage(i + 1, aLayoutName); if (pActualPage == pMaster) @@ -1131,13 +1133,13 @@ void DrawViewShell::ResetActualLayer() */ pLayerBar->Clear(); - String aName; - String aActiveLayer = mpDrawView->GetActiveLayer(); - String aBackgroundLayer( SdResId(STR_LAYER_BCKGRND) ); - String aBackgroundObjLayer( SdResId(STR_LAYER_BCKGRNDOBJ) ); - String aLayoutLayer( SdResId(STR_LAYER_LAYOUT) ); - String aControlsLayer( SdResId(STR_LAYER_CONTROLS) ); - String aMeasureLinesLayer( SdResId(STR_LAYER_MEASURELINES) ); + OUString aName; + OUString aActiveLayer = mpDrawView->GetActiveLayer(); + OUString aBackgroundLayer = SD_RESSTR(STR_LAYER_BCKGRND); + OUString aBackgroundObjLayer = SD_RESSTR(STR_LAYER_BCKGRNDOBJ); + OUString aLayoutLayer = SD_RESSTR(STR_LAYER_LAYOUT); + OUString aControlsLayer = SD_RESSTR(STR_LAYER_CONTROLS); + OUString aMeasureLinesLayer = SD_RESSTR(STR_LAYER_MEASURELINES); sal_uInt16 nActiveLayer = SDRLAYER_NOTFOUND; SdrLayerAdmin& rLayerAdmin = GetDoc()->GetLayerAdmin(); sal_uInt16 nLayerCnt = rLayerAdmin.GetLayerCount(); |