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/ui/view/drviews1.cxx | |
parent | c0c7fb66985a9a3e8f9b7a796c1e0489e407879b (diff) |
XubString->rtl::OUString
Change-Id: If7e5d015c95f8f173750ca32e061d69f56e2d93e
Diffstat (limited to 'sd/source/ui/view/drviews1.cxx')
-rw-r--r-- | sd/source/ui/view/drviews1.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx index 54874de15129..183779a4f798 100644 --- a/sd/source/ui/view/drviews1.cxx +++ b/sd/source/ui/view/drviews1.cxx @@ -891,9 +891,10 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) if( pNewPage ) { SdrPageView* pPV = mpDrawView->GetSdrPageView(); - - String sPageText (pNewPage->GetLayoutName()); - sPageText.Erase(sPageText.SearchAscii(SD_LT_SEPARATOR)); + OUString sPageText(pNewPage->GetLayoutName()); + sal_Int32 nPos = sPageText.indexOf(SD_LT_SEPARATOR); + if (nPos != -1) + sPageText = sPageText.copy(0, nPos); if (pPV && pNewPage == dynamic_cast< SdPage* >( pPV->GetPage() ) && sPageText == maTabControl.GetPageText(nSelectedPage+1)) @@ -918,7 +919,7 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) SdPage* pCurrentPage = dynamic_cast< SdPage* >( pPV->GetPage()); if (pPV && pNewPage == pCurrentPage - && pNewPage->GetName() == maTabControl.GetPageText(nSelectedPage+1)) + && maTabControl.GetPageText(nSelectedPage+1).equals(pNewPage->GetName())) { // this slide is already visible return sal_True; @@ -1049,7 +1050,7 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) } maTabControl.SetCurPageId(nSelectedPage+1); - String aPageName = mpActualPage->GetName(); + OUString aPageName = mpActualPage->GetName(); if (maTabControl.GetPageText(nSelectedPage+1) != aPageName) { @@ -1117,8 +1118,10 @@ sal_Bool DrawViewShell::SwitchPage(sal_uInt16 nSelectedPage) } } - 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.SetCurPageId(nSelectedPage+1); |