summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-09-18 15:34:45 +0200
committerNoel Grandin <noel@peralex.com>2013-09-19 10:14:23 +0200
commit15d88e256dcf4d0bf567b5f320cefe55179e4bd8 (patch)
tree128e9aab9df1cb2778924497e1ecd85a72e62fcd /sd
parentbd6f344f027a06c2894bfa87fbeee1016576d117 (diff)
convert more .cxx files in sd from String to OUString
Change-Id: I03d86a02021df0205cc3505ea9f99d1d18735abc
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/sidebar/MasterPageContainerFiller.cxx8
-rw-r--r--sd/source/ui/sidebar/RecentMasterPagesSelector.cxx4
-rw-r--r--sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx2
-rw-r--r--sd/source/ui/slideshow/showwin.cxx8
-rw-r--r--sd/source/ui/slideshow/slideshow.cxx2
-rw-r--r--sd/source/ui/slideshow/slideshowimpl.cxx16
-rw-r--r--sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsClipboard.cxx2
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx12
-rw-r--r--sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx12
-rw-r--r--sd/source/ui/table/tablefunction.cxx4
-rw-r--r--sd/source/ui/toolpanel/LayoutMenu.cxx4
-rw-r--r--sd/source/ui/toolpanel/ToolPanelViewShell.cxx2
-rw-r--r--sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx8
-rw-r--r--sd/source/ui/toolpanel/controls/DocumentHelper.cxx10
15 files changed, 47 insertions, 49 deletions
diff --git a/sd/source/ui/sidebar/MasterPageContainerFiller.cxx b/sd/source/ui/sidebar/MasterPageContainerFiller.cxx
index cec5047fb05b..a33c86d86195 100644
--- a/sd/source/ui/sidebar/MasterPageContainerFiller.cxx
+++ b/sd/source/ui/sidebar/MasterPageContainerFiller.cxx
@@ -43,9 +43,9 @@ MasterPageContainerFiller::MasterPageContainerFiller (ContainerAdapter& rpAdapte
SharedMasterPageDescriptor pDescriptor (new MasterPageDescriptor(
MasterPageContainer::DEFAULT,
0,
- String(),
- String(),
- String(),
+ OUString(),
+ OUString(),
+ OUString(),
false,
::boost::shared_ptr<PageObjectProvider>(new DefaultPageObjectProvider()),
::boost::shared_ptr<PreviewProvider>(new PagePreviewProvider())));
@@ -160,7 +160,7 @@ MasterPageContainerFiller::State MasterPageContainerFiller::AddTemplate (void)
mnIndex,
mpLastAddedEntry->msPath,
mpLastAddedEntry->msTitle,
- String(),
+ OUString(),
false,
::boost::shared_ptr<PageObjectProvider>(
new TemplatePageObjectProvider(mpLastAddedEntry->msPath)),
diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
index 2d9b7cd5fdce..29ed781e30d5 100644
--- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
+++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx
@@ -129,8 +129,8 @@ void RecentMasterPagesSelector::Fill (ItemList& rItemList)
MasterPageContainer::Token aToken (rInstance.GetTokenForIndex(nIndex));
if (aToken != MasterPageContainer::NIL_TOKEN)
{
- String sStyleName (mpContainer->GetStyleNameForToken(aToken));
- if (sStyleName.Len()==0
+ OUString sStyleName (mpContainer->GetStyleNameForToken(aToken));
+ if (sStyleName.isEmpty()
|| aCurrentNames.find(sStyleName) == aCurrentNames.end())
{
rItemList.push_back(aToken);
diff --git a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
index 94a741e04d9d..aa696b3555f7 100644
--- a/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
+++ b/sd/source/ui/sidebar/RecentlyUsedMasterPages.cxx
@@ -203,7 +203,7 @@ void RecentlyUsedMasterPages::LoadPersistentValues (void)
MasterPageContainer::TEMPLATE,
-1,
sURL,
- String(),
+ OUString(),
sName,
false,
::boost::shared_ptr<PageObjectProvider>(
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index a495bed4119d..4fece11c240c 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -506,7 +506,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
const Size aOutSize( GetOutputSize() );
const Size aTextSize( LogicToLogic( Size( 0, 14 ), MAP_POINT, rMap ) );
const Size aOffset( LogicToLogic( Size( 1000, 1000 ), MAP_100TH_MM, rMap ) );
- String aText( SdResId( STR_PRES_PAUSE ) );
+ OUString aText( SdResId( STR_PRES_PAUSE ) );
bool bDrawn = false;
Font aFont( GetSettings().GetStyleSettings().GetMenuFont() );
@@ -555,9 +555,9 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly )
SvtSysLocale aSysLocale;
const LocaleDataWrapper& aLocaleData = aSysLocale.GetLocaleData();
- aText.AppendAscii( " ( " );
+ aText += " ( ";
aText += aLocaleData.getDuration( Time( 0, 0, mnPauseTimeout ) );
- aText.AppendAscii( " )" );
+ aText += " )";
aVDev.DrawText( Point( aOffset.Width(), 0 ), aText );
DrawOutDev( Point( aOutOrg.X(), aOffset.Height() ), aVDevSize, Point(), aVDevSize, aVDev );
bDrawn = true;
@@ -581,7 +581,7 @@ void ShowWindow::DrawEndScene()
const Point aOutOrg( PixelToLogic( Point() ) );
const Size aTextSize( LogicToLogic( Size( 0, 14 ), MAP_POINT, GetMapMode() ) );
- const String aText( SdResId( STR_PRES_SOFTEND ) );
+ const OUString aText( SdResId( STR_PRES_SOFTEND ) );
aFont.SetSize( aTextSize );
aFont.SetColor( COL_WHITE );
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index 9abf0aa96ac5..2d50fc3ebf4f 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -373,7 +373,7 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const
{
bIllegalArgument = false;
- const String aShowName( aShow );
+ const OUString aShowName( aShow );
SdCustomShowList* pCustomShowList = mpDoc->GetCustomShowList(sal_False);
if(pCustomShowList)
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 5f47c708baa6..afc85dcbf749 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -914,7 +914,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
// ---
- String aPresSlide( maPresSettings.maPresPage );
+ OUString aPresSlide( maPresSettings.maPresPage );
SdPage* pStartPage = mpViewShell ? mpViewShell->GetActualPage() : 0;
bool bStartWithActualSlide = pStartPage &&
( (meAnimationMode != ANIMATIONMODE_SHOW) ||
@@ -945,7 +945,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx* pPresSettings )
if( bStartWithActualSlide )
{
- if ( !aPresSlide.Len())
+ if ( aPresSlide.isEmpty())
{
// no preset slide yet, so pick current on one
aPresSlide = pStartPage->GetName();
@@ -1609,7 +1609,7 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const ::com::sun::
case presentation::ClickAction_MACRO:
{
- const String aMacro( pEvent->maStrBookmark );
+ const OUString aMacro( pEvent->maStrBookmark );
if ( SfxApplication::IsXScriptURL( aMacro ) )
{
@@ -1624,14 +1624,12 @@ void SlideshowImpl::click( const Reference< XShape >& xShape, const ::com::sun::
// aMacro has the following syntax:
// "Macroname.Modulname.Libname.Documentname" or
// "Macroname.Modulname.Libname.Applicationname"
- String aMacroName = aMacro.GetToken(0, sal_Unicode('.'));
- String aModulName = aMacro.GetToken(1, sal_Unicode('.'));
+ OUString aMacroName = aMacro.getToken(0, '.');
+ OUString aModulName = aMacro.getToken(1, '.');
// todo: is the limitation still given that only
// Modulname+Macroname can be used here?
- String aExecMacro(aModulName);
- aExecMacro.Append( sal_Unicode('.') );
- aExecMacro.Append( aMacroName );
+ OUString aExecMacro = aModulName + "." + aMacroName;
mpDocSh->GetBasic()->Call(aExecMacro);
}
}
@@ -2814,7 +2812,7 @@ void SlideshowImpl::receiveRequest(SfxRequest& rReq)
case SID_NAVIGATOR_OBJECT:
{
- const String aTarget( ((SfxStringItem&) pArgs->Get(SID_NAVIGATOR_OBJECT)).GetValue() );
+ const OUString aTarget( ((SfxStringItem&) pArgs->Get(SID_NAVIGATOR_OBJECT)).GetValue() );
// is the bookmark a Slide?
sal_Bool bIsMasterPage;
diff --git a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
index c70fad5e1124..58431bf2a1e9 100644
--- a/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
+++ b/sd/source/ui/slidesorter/cache/SlsBitmapFactory.cxx
@@ -71,7 +71,7 @@ Bitmap BitmapFactory::CreateBitmap (
Bitmap aPreview (maRenderer.RenderPage (
&rPage,
aSize,
- String(),
+ OUString(),
true,
false).GetBitmapEx().GetBitmap());
if (bDoSuperSampling)
diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
index 2190b26f5460..bdb17b4adac7 100644
--- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx
@@ -544,7 +544,7 @@ void Clipboard::CreateSlideTransferable (
const sal_Int32 nIndex (sURL.indexOf((sal_Unicode)'#'));
if (nIndex == -1)
break;
- String sBookmark (sURL.copy(nIndex+1));
+ OUString sBookmark (sURL.copy(nIndex+1));
// Make sure that the bookmark points to a page.
SdDrawDocument* pTransferableDocument = rSlideSorter.GetModel().GetDocument();
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index f0c5df24796c..cf64461dd4be 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -841,7 +841,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
sal_Int32 nActivePageCount;
sal_uInt16 nSelectedPages = mrSlideSorter.GetController().GetPageSelector().GetSelectedPageCount();
OUStringBuffer aPageStr;
- String aLayoutStr;
+ OUString aLayoutStr;
//Set number of slides
if (nSelectedPages > 0)
@@ -872,7 +872,7 @@ void SlotManager::GetStatusBarState (SfxItemSet& rSet)
{
pFirstPage = pPage;
aLayoutStr = pFirstPage->GetLayoutName();
- aLayoutStr.Erase( aLayoutStr.SearchAscii( SD_LT_SEPARATOR ) );
+ aLayoutStr = aLayoutStr.copy(0, aLayoutStr.indexOf( SD_LT_SEPARATOR ) );
rSet.Put( SfxStringItem( SID_STATUS_LAYOUT, aLayoutStr ) );
}
if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_ATTR_ZOOMSLIDER ) )
@@ -933,9 +933,9 @@ void SlotManager::RenameSlide (void)
pSelectedPage = aSelectedPages.GetNextElement()->GetPage();
if (pSelectedPage != NULL)
{
- String aTitle( SdResId( STR_TITLE_RENAMESLIDE ) );
- String aDescr( SdResId( STR_DESC_RENAMESLIDE ) );
- String aPageName = pSelectedPage->GetName();
+ OUString aTitle( SdResId( STR_TITLE_RENAMESLIDE ) );
+ OUString aDescr( SdResId( STR_DESC_RENAMESLIDE ) );
+ OUString aPageName = pSelectedPage->GetName();
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
DBG_ASSERT(pFact, "Dialogdiet fail!");
@@ -1043,7 +1043,7 @@ bool SlotManager::RenameSlideFromDrawViewShell( sal_uInt16 nPageId, const OUStri
pPageToRename = pDocument->GetMasterSdPage( nPageId, ePageKind );
if (pPageToRename != NULL)
{
- const String aOldLayoutName( pPageToRename->GetLayoutName() );
+ const OUString aOldLayoutName( pPageToRename->GetLayoutName() );
pManager->AddUndoAction( new RenameLayoutTemplateUndoAction( pDocument, aOldLayoutName, rName ) );
pDocument->RenameLayoutTemplate( aOldLayoutName, rName );
}
diff --git a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
index ebbd8391f278..eaea90f2cea6 100644
--- a/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
+++ b/sd/source/ui/slidesorter/view/SlsPageObjectLayouter.cxx
@@ -250,18 +250,18 @@ Size PageObjectLayouter::GetPageNumberAreaSize (const int nPageCount)
if (mpPageNumberFont)
mpWindow->SetFont(*mpPageNumberFont);
- String sPageNumberTemplate;
+ OUString sPageNumberTemplate;
if (nPageCount < 10)
- sPageNumberTemplate = OUString("9");
+ sPageNumberTemplate = "9";
else if (nPageCount < 100)
- sPageNumberTemplate = OUString("99");
+ sPageNumberTemplate = "99";
else if (nPageCount < 200)
// Just for the case that 1 is narrower than 9.
- sPageNumberTemplate = OUString("199");
+ sPageNumberTemplate = "199";
else if (nPageCount < 1000)
- sPageNumberTemplate = OUString("999");
+ sPageNumberTemplate = "999";
else
- sPageNumberTemplate = OUString("9999");
+ sPageNumberTemplate = "9999";
// More then 9999 pages are not handled.
const Size aSize (
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 77de56c68ab8..634bb79a0701 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -220,11 +220,11 @@ void DrawViewShell::GetTableMenuState( SfxItemSet &rSet )
}
else
{
- String aActiveLayer = mpDrawView->GetActiveLayer();
+ OUString aActiveLayer = mpDrawView->GetActiveLayer();
SdrPageView* pPV = mpDrawView->GetSdrPageView();
if( bIsUIActive ||
- ( aActiveLayer.Len() != 0 && pPV && ( pPV->IsLayerLocked(aActiveLayer) ||
+ ( !aActiveLayer.isEmpty() && pPV && ( pPV->IsLayerLocked(aActiveLayer) ||
!pPV->IsLayerVisible(aActiveLayer) ) ) ||
SD_MOD()->GetWaterCan() )
{
diff --git a/sd/source/ui/toolpanel/LayoutMenu.cxx b/sd/source/ui/toolpanel/LayoutMenu.cxx
index 557a31fb1a5e..beb9c39eff1f 100644
--- a/sd/source/ui/toolpanel/LayoutMenu.cxx
+++ b/sd/source/ui/toolpanel/LayoutMenu.cxx
@@ -733,7 +733,7 @@ SfxRequest LayoutMenu::CreateRequest (
SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers());
aRequest.AppendItem(
- SfxStringItem (ID_VAL_PAGENAME, String()));//pPage->GetName()));
+ SfxStringItem (ID_VAL_PAGENAME, OUString()));//pPage->GetName()));
aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout));
aRequest.AppendItem(
SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
@@ -804,7 +804,7 @@ void LayoutMenu::Fill (void)
if (bRightToLeft && (WritingMode_TB_RL != pInfo->meWritingMode))
aBmp.Mirror (BMP_MIRROR_HORZ);
- InsertItem (i, aBmp, String (SdResId (pInfo->mnStrResId)));
+ InsertItem (i, aBmp, SdResId (pInfo->mnStrResId));
SetItemData (i, new AutoLayout(pInfo->maAutoLayout));
n++;
}
diff --git a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
index 1352e9903856..081a77baede2 100644
--- a/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
+++ b/sd/source/ui/toolpanel/ToolPanelViewShell.cxx
@@ -748,7 +748,7 @@ ToolPanelViewShell_Impl::ToolPanelViewShell_Impl( ToolPanelViewShell& i_rPanelVi
,m_pTaskPane( new ::sfx2::ModuleTaskPane( i_rPanelDeckParent, i_rPanelViewShell.GetViewShellBase().GetViewFrame()->GetFrame().GetFrameInterface(), *this ) )
,m_bInitialized( false )
{
- const String sPaneTitle( SdResId( STR_RIGHT_PANE_TITLE ) );
+ const OUString sPaneTitle( SdResId( STR_RIGHT_PANE_TITLE ) );
GetToolPanelDeck().SetAccessibleName( sPaneTitle );
GetToolPanelDeck().SetAccessibleDescription( sPaneTitle );
diff --git a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx
index 4d901cf91f7a..8cf807683c25 100644
--- a/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx
+++ b/sd/source/ui/toolpanel/controls/CurrentMasterPagesSelector.cxx
@@ -120,7 +120,7 @@ void CurrentMasterPagesSelector::Fill (ItemList& rItemList)
continue;
// Use the name of the master page to avoid duplicate entries.
- String sName (pMasterPage->GetName());
+ OUString sName (pMasterPage->GetName());
if (aMasterPageNames.find(sName)!=aMasterPageNames.end())
continue;
aMasterPageNames.insert (sName);
@@ -133,9 +133,9 @@ void CurrentMasterPagesSelector::Fill (ItemList& rItemList)
SharedMasterPageDescriptor pDescriptor (new MasterPageDescriptor(
MasterPageContainer::MASTERPAGE,
nIndex,
- String(),
+ OUString(),
pMasterPage->GetName(),
- String(),
+ OUString(),
pMasterPage->IsPrecious(),
::boost::shared_ptr<PageObjectProvider>(new ExistingPageProvider(pMasterPage)),
::boost::shared_ptr<PreviewProvider>(new PagePreviewProvider())));
@@ -195,7 +195,7 @@ void CurrentMasterPagesSelector::UpdateSelection (void)
sal_uInt16 nItemCount (mpPageSet->GetItemCount());
for (nIndex=1; nIndex<=nItemCount && bLoop; nIndex++)
{
- String sName (mpPageSet->GetItemText (nIndex));
+ OUString sName (mpPageSet->GetItemText (nIndex));
if (aNames.find(sName) != aNames.end())
{
mpPageSet->SelectItem (nIndex);
diff --git a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
index 61b8be152cde..74848dd8a3c3 100644
--- a/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
+++ b/sd/source/ui/toolpanel/controls/DocumentHelper.cxx
@@ -263,8 +263,8 @@ void DocumentHelper::ProvideStyles (
SdPage* pPage)
{
// Get the layout name of the given page.
- String sLayoutName (pPage->GetLayoutName());
- sLayoutName.Erase (sLayoutName.SearchAscii (SD_LT_SEPARATOR));
+ OUString sLayoutName (pPage->GetLayoutName());
+ sLayoutName = sLayoutName.copy(0, sLayoutName.indexOf(SD_LT_SEPARATOR));
// Copy the style sheet from source to target document.
SdStyleSheetPool* pSourceStyleSheetPool =
@@ -307,8 +307,8 @@ void DocumentHelper::AssignMasterPageToPageList (
// Make the layout name by stripping ouf the layout postfix from the
// layout name of the given master page.
OUString sFullLayoutName(pMasterPage->GetLayoutName());
- String sBaseLayoutName (sFullLayoutName);
- sBaseLayoutName.Erase (sBaseLayoutName.SearchAscii (SD_LT_SEPARATOR));
+ OUString sBaseLayoutName (sFullLayoutName);
+ sBaseLayoutName = sBaseLayoutName.copy(0, sBaseLayoutName.indexOf(SD_LT_SEPARATOR));
if (rpPageList->empty())
return;
@@ -330,7 +330,7 @@ void DocumentHelper::AssignMasterPageToPageList (
::svl::IUndoManager* pUndoMgr = rTargetDocument.GetDocSh()->GetUndoManager();
if( pUndoMgr )
- pUndoMgr->EnterListAction(SD_RESSTR(STR_UNDO_SET_PRESLAYOUT), String());
+ pUndoMgr->EnterListAction(SD_RESSTR(STR_UNDO_SET_PRESLAYOUT), OUString());
SdPage* pMasterPageInDocument = ProvideMasterPage(rTargetDocument,pMasterPage,rpPageList);
if (pMasterPageInDocument == NULL)