summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-09-10 23:42:29 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-09-11 10:54:24 +0100
commit3e635c3368c23608bac471970f18d1d64684a147 (patch)
treebcd3c3896b079b16fd26ef826d44c9a93dde41bc /sd/source/ui
parentc0c7fb66985a9a3e8f9b7a796c1e0489e407879b (diff)
XubString->rtl::OUString
Change-Id: If7e5d015c95f8f173750ca32e061d69f56e2d93e
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/toolpanel/controls/DocumentHelper.cxx5
-rw-r--r--sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx5
-rw-r--r--sd/source/ui/view/drviews1.cxx17
-rw-r--r--sd/source/ui/view/drviewsb.cxx2
4 files changed, 15 insertions, 14 deletions
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
index 65ac625f1d34..10eec0451aa4 100644
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
@@ -315,7 +315,7 @@ void DocumentHelper::AssignMasterPageToPageList (
// Make the layout name by stripping ouf the layout postfix from the
// layout name of the given master page.
- String sFullLayoutName (pMasterPage->GetLayoutName());
+ OUString sFullLayoutName(pMasterPage->GetLayoutName());
String sBaseLayoutName (sFullLayoutName);
sBaseLayoutName.Erase (sBaseLayoutName.SearchAscii (SD_LT_SEPARATOR));
@@ -329,8 +329,7 @@ void DocumentHelper::AssignMasterPageToPageList (
for (iPage=rpPageList->begin(); iPage!=rpPageList->end(); ++iPage)
{
OSL_ASSERT(*iPage!=NULL && (*iPage)->GetModel() == &rTargetDocument);
- if (*iPage != NULL
- && (*iPage)->GetLayoutName().CompareTo(sFullLayoutName)!=0)
+ if (*iPage != NULL && (*iPage)->GetLayoutName() != sFullLayoutName)
{
aCleanedList.push_back(*iPage);
}
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
index 117bc36c3626..5a00b6f11603 100644
--- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
+++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx
@@ -351,14 +351,13 @@ void MasterPagesSelector::AssignMasterPageToAllSlides (SdPage* pMasterPage)
// Get a list of all pages. As a little optimization we only
// include pages that do not already have the given master page
// assigned.
- String sFullLayoutName (pMasterPage->GetLayoutName());
+ OUString sFullLayoutName(pMasterPage->GetLayoutName());
::sd::slidesorter::SharedPageSelection pPageList (
new ::sd::slidesorter::SlideSorterViewShell::PageSelection());
for (sal_uInt16 nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
{
SdPage* pPage = mrDocument.GetSdPage (nPageIndex, PK_STANDARD);
- if (pPage != NULL
- && pPage->GetLayoutName().CompareTo(sFullLayoutName)!=0)
+ if (pPage != NULL && pPage->GetLayoutName() != sFullLayoutName)
{
pPageList->push_back (pPage);
}
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);
diff --git a/sd/source/ui/view/drviewsb.cxx b/sd/source/ui/view/drviewsb.cxx
index 0628fe7bcaa1..a4264199a0d1 100644
--- a/sd/source/ui/view/drviewsb.cxx
+++ b/sd/source/ui/view/drviewsb.cxx
@@ -825,7 +825,7 @@ void DrawViewShell::ModifyLayer (
for( nPos = 0; nPos < nPageCount; nPos++ )
{
sal_uInt16 nId = GetLayerTabControl()->GetPageId( nPos );
- if( pLayer->GetName() == GetLayerTabControl()->GetPageText( nId ) )
+ if (GetLayerTabControl()->GetPageText(nId).equals(pLayer->GetName()))
{
nCurPage = nId;
break;