[Libreoffice-commits] core.git: 5 commits - sd/source
Ivan Timofeev
timofeev.i.s at gmail.com
Sat Aug 24 11:24:31 PDT 2013
sd/source/ui/dlg/sdpreslt.cxx | 37 +++++++++++++++++--------------------
sd/source/ui/dlg/tpoption.cxx | 18 +++++++-----------
sd/source/ui/dlg/unchss.cxx | 24 ++++++++++--------------
sd/source/ui/docshell/docshel2.cxx | 4 ++--
sd/source/ui/docshell/docshel4.cxx | 8 ++++----
sd/source/ui/func/bulmaper.cxx | 5 ++---
sd/source/ui/func/fubullet.cxx | 8 ++++----
sd/source/ui/func/fuconrec.cxx | 8 ++++----
sd/source/ui/func/fuconstr.cxx | 11 ++++-------
sd/source/ui/func/fuconuno.cxx | 3 +--
sd/source/ui/func/fucopy.cxx | 14 ++++++--------
sd/source/ui/func/fudraw.cxx | 35 +++++++++++++++++------------------
sd/source/ui/func/fuexpand.cxx | 4 ++--
sd/source/ui/func/fuhhconv.cxx | 3 +--
sd/source/ui/func/fuinsert.cxx | 35 ++++++++++++++++-------------------
sd/source/ui/func/fuinsfil.cxx | 11 +++++------
sd/source/ui/func/fulinend.cxx | 7 +++----
sd/source/ui/func/fumorph.cxx | 6 ++----
sd/source/ui/func/fuoaprms.cxx | 6 +++---
sd/source/ui/func/fuolbull.cxx | 3 +--
sd/source/ui/func/fupage.cxx | 6 ++----
sd/source/ui/func/fuprlout.cxx | 17 +++++++++--------
sd/source/ui/func/fuprobjs.cxx | 10 ++++------
sd/source/ui/func/fusel.cxx | 18 +++++++-----------
sd/source/ui/func/fusldlg.cxx | 8 ++++----
sd/source/ui/func/futempl.cxx | 26 +++++++++++---------------
sd/source/ui/func/futext.cxx | 6 +++---
sd/source/ui/func/futhes.cxx | 2 +-
sd/source/ui/func/futransf.cxx | 5 ++---
sd/source/ui/func/fuvect.cxx | 6 ++----
sd/source/ui/func/unmovss.cxx | 2 +-
sd/source/ui/inc/DrawDocShell.hxx | 4 ++--
sd/source/ui/inc/sdpreslt.hxx | 6 +++---
sd/source/ui/inc/tpoption.hxx | 8 ++++----
sd/source/ui/inc/unchss.hxx | 2 +-
35 files changed, 167 insertions(+), 209 deletions(-)
New commits:
commit 4d688beb2b2183ced387270e051dc25ee340fb4b
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sat Aug 24 22:22:45 2013 +0400
String->OUString
Change-Id: I43ab520187375d75009da43a2f75a541021fdbfb
diff --git a/sd/source/ui/func/bulmaper.cxx b/sd/source/ui/func/bulmaper.cxx
index 091fb52..8ee4c44 100644
--- a/sd/source/ui/func/bulmaper.cxx
+++ b/sd/source/ui/func/bulmaper.cxx
@@ -104,9 +104,8 @@ void SdBulletMapper::MapFontsInNumRule( SvxNumRule& aNumRule, const SfxItemSet&
}
else if( rSrcLevel.GetNumberingType() == com::sun::star::style::NumberingType::CHAR_SPECIAL )
{
- String aEmpty;
- aNewLevel.SetPrefix( aEmpty );
- aNewLevel.SetSuffix( aEmpty );
+ aNewLevel.SetPrefix("");
+ aNewLevel.SetSuffix("");
aNumRule.SetLevel(nLevel, aNewLevel );
}
}
diff --git a/sd/source/ui/func/fubullet.cxx b/sd/source/ui/func/fubullet.cxx
index 0293b60..2ce7f2e 100644
--- a/sd/source/ui/func/fubullet.cxx
+++ b/sd/source/ui/func/fubullet.cxx
@@ -155,7 +155,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
if( pArgs )
pArgs->GetItemState(mpDoc->GetPool().GetWhich(SID_CHARMAP), sal_False, &pItem);
- String aChars, aFontName;
+ OUString aChars;
Font aFont;
if ( pItem )
{
@@ -165,7 +165,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
if ( pFontItem )
{
- aFontName = pFontItem->GetValue();
+ OUString aFontName = pFontItem->GetValue();
aFont = Font( aFontName, Size(1,1) );
}
else
@@ -178,7 +178,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
}
}
- if (!aChars.Len() )
+ if (aChars.isEmpty())
{
SfxAllItemSet aSet( mpDoc->GetPool() );
aSet.Put( SfxBoolItem( FN_PARAM_1, sal_False ) );
@@ -219,7 +219,7 @@ void FuBullet::InsertSpecialCharacter( SfxRequest& rReq )
delete( pDlg );
}
- if( aChars.Len() )
+ if (!aChars.isEmpty())
{
OutlinerView* pOV = NULL;
::Outliner* pOL = NULL;
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 628b705..ed434e6 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -240,7 +240,7 @@ sal_Bool FuConstructRectangle::MouseButtonUp(const MouseEvent& rMEvt)
if(SID_DRAW_MEASURELINE == nSlotId)
{
SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin();
- String aStr(SdResId(STR_LAYER_MEASURELINES));
+ OUString aStr(SD_RESSTR(STR_LAYER_MEASURELINES));
pObj->SetLayer(rAdmin.GetLayerID(aStr, sal_False));
}
@@ -501,7 +501,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
{
// dimension line
SdPage* pPage = (SdPage*) mpView->GetSdrPageView()->GetPage();
- String aName(SdResId(STR_POOLSHEET_MEASURE));
+ OUString aName(SD_RESSTR(STR_POOLSHEET_MEASURE));
SfxStyleSheet* pSheet = (SfxStyleSheet*) pPage->GetModel()->
GetStyleSheetPool()->
Find(aName, SD_STYLE_FAMILY_GRAPHICS);
@@ -513,7 +513,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
}
SdrLayerAdmin& rAdmin = mpDoc->GetLayerAdmin();
- String aStr(SdResId(STR_LAYER_MEASURELINES));
+ OUString aStr(SD_RESSTR(STR_LAYER_MEASURELINES));
pObj->SetLayer(rAdmin.GetLayerID(aStr, sal_False));
}
else if (nSlotId == OBJ_CUSTOMSHAPE )
@@ -532,7 +532,7 @@ void FuConstructRectangle::SetAttributes(SfxItemSet& rAttr, SdrObject* pObj)
if( pLineEndList.is() )
{
- String aArrowName( SVX_RES(nResId) );
+ OUString aArrowName( SVX_RES(nResId) );
long nCount = pLineEndList->Count();
long nIndex;
for( nIndex = 0L; nIndex < nCount; nIndex++ )
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 06bc960..a788b9f 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -340,12 +340,9 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
/**********************************************
* Objects was created on the slide master page
***********************************************/
- String aName( pPage->GetLayoutName() );
- String aSep = OUString(SD_LT_SEPARATOR);
- sal_uInt16 n = aName.Search(aSep);
- n = n + aSep.Len();
- aName.Erase(n);
- aName.Append( SD_RESSTR( STR_LAYOUT_BACKGROUNDOBJECTS ) );
+ OUString aName( pPage->GetLayoutName() );
+ sal_Int32 n = aName.indexOf(SD_LT_SEPARATOR) + strlen(SD_LT_SEPARATOR);
+ aName = aName.copy(0, n) + SD_RESSTR(STR_LAYOUT_BACKGROUNDOBJECTS);
SfxStyleSheet* pSheet = (SfxStyleSheet*)pPage->GetModel()->
GetStyleSheetPool()->
Find(aName, SD_STYLE_FAMILY_MASTERPAGE);
@@ -375,7 +372,7 @@ void FuConstruct::SetStyleSheet( SfxItemSet& rAttr, SdrObject* pObj,
************************************/
if ( bForceNoFillStyle )
{
- String aName(SdResId(STR_POOLSHEET_OBJWITHOUTFILL));
+ OUString aName(SD_RESSTR(STR_POOLSHEET_OBJWITHOUTFILL));
SfxStyleSheet* pSheet = (SfxStyleSheet*)pPage->GetModel()->
GetStyleSheetPool()->
Find(aName, SD_STYLE_FAMILY_GRAPHICS);
diff --git a/sd/source/ui/func/fuconuno.cxx b/sd/source/ui/func/fuconuno.cxx
index 228f783..83ca72a 100644
--- a/sd/source/ui/func/fuconuno.cxx
+++ b/sd/source/ui/func/fuconuno.cxx
@@ -138,8 +138,7 @@ void FuConstructUnoControl::Activate()
mpWindow->SetPointer( aNewPointer );
aOldLayer = mpView->GetActiveLayer();
- String aStr(SdResId(STR_LAYER_CONTROLS));
- mpView->SetActiveLayer( aStr );
+ mpView->SetActiveLayer( SD_RESSTR(STR_LAYER_CONTROLS) );
FuConstruct::Activate();
}
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index ff433b7..88616c4 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -65,9 +65,8 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( mpView->AreObjectsMarked() )
{
// Undo
- String aString( mpView->GetDescriptionOfMarkedObjects() );
- aString.Append( sal_Unicode(' ') );
- aString.Append( SD_RESSTR( STR_UNDO_COPYOBJECTS ) );
+ OUString aString( mpView->GetDescriptionOfMarkedObjects() );
+ aString += " " + SD_RESSTR( STR_UNDO_COPYOBJECTS );
mpView->BegUndo( aString );
const SfxItemSet* pArgs = rReq.GetArgs();
@@ -173,9 +172,8 @@ void FuCopy::DoExecute( SfxRequest& rReq )
if( nNumber > 1 )
{
- String aStr( SdResId( STR_OBJECTS ) );
- aStr.Append( sal_Unicode(' ') );
- aStr.Append( SD_RESSTR( STR_UNDO_COPYOBJECTS ) );
+ OUString aStr( SD_RESSTR( STR_OBJECTS ) );
+ aStr += " " + SD_RESSTR( STR_UNDO_COPYOBJECTS );
pProgress = new SfxProgress( mpDocSh, aStr, nNumber );
mpDocSh->SetWaitCursor( sal_True );
@@ -212,7 +210,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
{
SfxItemSet aNewSet( mpViewShell->GetPool(), XATTR_FILLSTYLE, XATTR_FILLCOLOR, 0L );
aNewSet.Put( XFillStyleItem( XFILL_SOLID ) );
- aNewSet.Put( XFillColorItem( String(), aStartColor ) );
+ aNewSet.Put( XFillColorItem( OUString(), aStartColor ) );
mpView->SetAttributes( aNewSet );
}
@@ -274,7 +272,7 @@ void FuCopy::DoExecute( SfxRequest& rReq )
Color aNewColor( nRed, nGreen, nBlue );
SfxItemSet aNewSet( mpViewShell->GetPool(), XATTR_FILLSTYLE, XATTR_FILLCOLOR, 0L );
aNewSet.Put( XFillStyleItem( XFILL_SOLID ) );
- aNewSet.Put( XFillColorItem( String(), aNewColor ) );
+ aNewSet.Put( XFillColorItem( OUString(), aNewColor ) );
mpView->SetAttributes( aNewSet );
}
}
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index 943ed97..0acb1ec 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -828,7 +828,7 @@ sal_Bool FuDraw::RequestHelp(const HelpEvent& rHEvt)
sal_Bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewEvent& rVEvt)
{
sal_Bool bSet = sal_False;
- String aHelpText;
+ OUString aHelpText;
Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(rPosPixel)));
// URL for IMapObject underneath pointer is help text
@@ -841,7 +841,7 @@ sal_Bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrV
// show name
aHelpText = pIMapObj->GetAltText();
- if (aHelpText.Len() == 0)
+ if (aHelpText.isEmpty())
{
// show url if no name is available
aHelpText = INetURLObject::decode( pIMapObj->GetURL(), '%', INetURLObject::DECODE_WITH_CHARSET );
@@ -886,8 +886,8 @@ sal_Bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrV
{
// jump to object/page
aHelpText = SD_RESSTR(STR_CLICK_ACTION_BOOKMARK);
- aHelpText.AppendAscii( ": " );
- aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) ));
+ aHelpText += ": ";
+ aHelpText += INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET );
}
break;
@@ -895,8 +895,8 @@ sal_Bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrV
{
// jump to document (object/page)
aHelpText = SD_RESSTR(STR_CLICK_ACTION_DOCUMENT);
- aHelpText.AppendAscii( ": " );
- aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) ));
+ aHelpText += ": ";
+ aHelpText += INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET );
}
break;
@@ -904,8 +904,8 @@ sal_Bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrV
{
// execute program
aHelpText = SD_RESSTR(STR_CLICK_ACTION_PROGRAM);
- aHelpText.AppendAscii( ": " );
- aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) ));
+ aHelpText += ": ";
+ aHelpText += INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET );
}
break;
@@ -913,21 +913,20 @@ sal_Bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrV
{
// execute program
aHelpText = SD_RESSTR(STR_CLICK_ACTION_MACRO);
- aHelpText.AppendAscii( ": " );
+ aHelpText += ": ";
if ( SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) )
{
- aHelpText.Append( pInfo->GetBookmark() );
+ aHelpText += pInfo->GetBookmark();
}
else
{
- String sBookmark( pInfo->GetBookmark() );
- sal_Unicode cToken = '.';
- aHelpText.Append( sBookmark.GetToken( 2, cToken ) );
- aHelpText.Append( cToken );
- aHelpText.Append( sBookmark.GetToken( 1, cToken ) );
- aHelpText.Append( cToken );
- aHelpText.Append( sBookmark.GetToken( 0, cToken ) );
+ OUString sBookmark( pInfo->GetBookmark() );
+ aHelpText += sBookmark.getToken( 2, '.' );
+ aHelpText += ".";
+ aHelpText += sBookmark.getToken( 1, '.' );
+ aHelpText += ".";
+ aHelpText += sBookmark.getToken( 0, '.' );
}
}
break;
@@ -964,7 +963,7 @@ sal_Bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrV
aHelpText = INetURLObject::decode( rVEvt.pURLField->GetURL(), '%', INetURLObject::DECODE_WITH_CHARSET );
}
- if (aHelpText.Len())
+ if (!aHelpText.isEmpty())
{
bSet = sal_True;
Rectangle aLogicPix = mpWindow->LogicToPixel(pObj->GetLogicRect());
diff --git a/sd/source/ui/func/fuexpand.cxx b/sd/source/ui/func/fuexpand.cxx
index 2f839c3..d75cba4 100644
--- a/sd/source/ui/func/fuexpand.cxx
+++ b/sd/source/ui/func/fuexpand.cxx
@@ -140,7 +140,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
pActualPage->GetUppBorder(),
pActualPage->GetRgtBorder(),
pActualPage->GetLwrBorder() );
- pPage->SetName(String());
+ pPage->SetName(OUString());
// insert page after current page
mpDoc->InsertPage(pPage, nActualPageNum + nPos);
@@ -163,7 +163,7 @@ void FuExpandPage::DoExecute( SfxRequest& )
pActualNotesPage->GetRgtBorder(),
pActualNotesPage->GetLwrBorder() );
pNotesPage->SetPageKind(PK_NOTES);
- pNotesPage->SetName(String());
+ pNotesPage->SetName(OUString());
// insert page after current page
mpDoc->InsertPage(pNotesPage, nActualPageNum + nPos);
diff --git a/sd/source/ui/func/fuhhconv.cxx b/sd/source/ui/func/fuhhconv.cxx
index bc73ef6..dad628d 100644
--- a/sd/source/ui/func/fuhhconv.cxx
+++ b/sd/source/ui/func/fuhhconv.cxx
@@ -104,8 +104,7 @@ void FuHangulHanjaConversion::StartConversion( sal_Int16 nSourceLanguage, sal_In
const Font *pTargetFont, sal_Int32 nOptions, sal_Bool bIsInteractive )
{
- String aString( SdResId(STR_UNDO_HANGULHANJACONVERSION) );
- mpView->BegUndo( aString );
+ mpView->BegUndo(SD_RESSTR(STR_UNDO_HANGULHANJACONVERSION));
ViewShellBase* pBase = PTR_CAST(ViewShellBase, SfxViewShell::Current());
if (pBase != NULL)
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 48378a4..946c086 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -142,8 +142,8 @@ void FuInsertGraphic::DoExecute( SfxRequest& )
}
// store as link
- String aFltName(aDlg.GetCurrentFilter());
- String aPath(aDlg.GetPath());
+ OUString aFltName(aDlg.GetCurrentFilter());
+ OUString aPath(aDlg.GetPath());
pGrafObj->SetGraphicLink(aPath, aFltName);
}
}
@@ -182,20 +182,19 @@ void FuInsertClipboard::DoExecute( SfxRequest& )
SfxAbstractPasteDialog* pDlg = pFact->CreatePasteDialog( mpViewShell->GetActiveWindow() );
if ( pDlg )
{
- const String aEmptyString;
::com::sun::star::datatransfer::DataFlavor aFlavor;
- pDlg->Insert( SOT_FORMATSTR_ID_EMBED_SOURCE, aEmptyString );
- pDlg->Insert( SOT_FORMATSTR_ID_LINK_SOURCE, aEmptyString );
- pDlg->Insert( SOT_FORMATSTR_ID_DRAWING, aEmptyString );
- pDlg->Insert( SOT_FORMATSTR_ID_SVXB, aEmptyString );
- pDlg->Insert( FORMAT_GDIMETAFILE, aEmptyString );
- pDlg->Insert( FORMAT_BITMAP, aEmptyString );
- pDlg->Insert( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, aEmptyString );
- pDlg->Insert( FORMAT_STRING, aEmptyString );
- pDlg->Insert( SOT_FORMATSTR_ID_HTML, aEmptyString );
- pDlg->Insert( FORMAT_RTF, aEmptyString );
- pDlg->Insert( SOT_FORMATSTR_ID_EDITENGINE, aEmptyString );
+ pDlg->Insert( SOT_FORMATSTR_ID_EMBED_SOURCE, OUString() );
+ pDlg->Insert( SOT_FORMATSTR_ID_LINK_SOURCE, OUString() );
+ pDlg->Insert( SOT_FORMATSTR_ID_DRAWING, OUString() );
+ pDlg->Insert( SOT_FORMATSTR_ID_SVXB, OUString() );
+ pDlg->Insert( FORMAT_GDIMETAFILE, OUString() );
+ pDlg->Insert( FORMAT_BITMAP, OUString() );
+ pDlg->Insert( SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK, OUString() );
+ pDlg->Insert( FORMAT_STRING, OUString() );
+ pDlg->Insert( SOT_FORMATSTR_ID_HTML, OUString() );
+ pDlg->Insert( FORMAT_RTF, OUString() );
+ pDlg->Insert( SOT_FORMATSTR_ID_EDITENGINE, OUString() );
//TODO/MBA: testing
nFormatId = pDlg->GetFormat( aDataHelper );
@@ -450,7 +449,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
if( ERRCODE_NONE == aPluginFileDialog.Execute () )
{
// get URL
- String aStrURL(aPluginFileDialog.GetPath());
+ OUString aStrURL(aPluginFileDialog.GetPath());
INetURLObject aURL( aStrURL, INET_PROT_FILE );
if( aURL.GetProtocol() != INET_PROT_NOT_VALID )
{
@@ -475,10 +474,8 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
else
{
// unable to create PlugIn
- String aStrErr( SdResId( STR_ERROR_OBJNOCREATE_PLUGIN ) );
- String aMask;
- aMask += sal_Unicode('%');
- aStrErr.SearchAndReplace( aMask, aStrURL );
+ OUString aStrErr( SdResId( STR_ERROR_OBJNOCREATE_PLUGIN ) );
+ aStrErr = aStrErr.replaceFirst( "%", aStrURL );
ErrorBox( mpWindow, WB_3DLOOK | WB_OK, aStrErr ).Execute();
}
}
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index a3af98d..d6d6631 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -130,8 +130,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
// Get filter for current format
try
{
- String aExt;
- String aAllSpec( SdResId( STR_ALL_FILES ) );
+ OUString aAllSpec( SD_RESSTR( STR_ALL_FILES ) );
xFilterManager->appendFilter( aAllSpec, OUString("*.*") );
xFilterManager->setCurrentFilter( aAllSpec ); // set default-filter (<All>)
@@ -159,7 +158,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() );
// get Powerpoint filter
- aExt = OUString(".ppt");
+ OUString aExt = OUString(".ppt");
pFilter = aMatch.GetFilter4Extension( aExt );
if( pFilter )
xFilterManager->appendFilter( pFilter->GetUIName(), pFilter->GetDefaultExtension() );
@@ -635,7 +634,7 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
nNewPages = 0;
pDocliner->GetUndoManager().EnterListAction(
- SD_RESSTR(STR_UNDO_INSERT_FILE), String() );
+ SD_RESSTR(STR_UNDO_INSERT_FILE), OUString() );
sal_Int32 nSourcePos = 0;
SfxStyleSheet* pStyleSheet = pPage->GetStyleSheetForPresObj( PRESOBJ_OUTLINE );
@@ -650,8 +649,8 @@ void FuInsertFile::InsTextOrRTFinOlMode(SfxMedium* pMedium)
!pOutliner->GetText(pSourcePara).isEmpty())
{
pDocliner->Insert( pOutliner->GetText(pSourcePara), nTargetPos, nDepth );
- String aStyleSheetName( pStyleSheet->GetName() );
- aStyleSheetName.Erase( aStyleSheetName.Len()-1, 1 );
+ OUString aStyleSheetName( pStyleSheet->GetName() );
+ aStyleSheetName = aStyleSheetName.copy( 0, aStyleSheetName.getLength()-1 );
aStyleSheetName += OUString::number( nDepth <= 0 ? 1 : nDepth+1 );
SfxStyleSheetBasePool* pStylePool = mpDoc->GetStyleSheetPool();
SfxStyleSheet* pOutlStyle = (SfxStyleSheet*) pStylePool->Find( aStyleSheetName, pStyleSheet->GetFamily() );
diff --git a/sd/source/ui/func/fulinend.cxx b/sd/source/ui/func/fulinend.cxx
index ae0520f..40354fd 100644
--- a/sd/source/ui/func/fulinend.cxx
+++ b/sd/source/ui/func/fulinend.cxx
@@ -92,8 +92,8 @@ void FuLineEnd::DoExecute( SfxRequest& )
XLineEndListRef pLineEndList = mpDoc->GetLineEndList();
- String aNewName( SdResId( STR_LINEEND ) );
- String aDesc( SdResId( STR_DESC_LINEEND ) );
+ OUString aNewName( SD_RESSTR( STR_LINEEND ) );
+ OUString aDesc( SD_RESSTR( STR_DESC_LINEEND ) );
OUString aName;
long nCount = pLineEndList->Count();
@@ -138,9 +138,8 @@ void FuLineEnd::DoExecute( SfxRequest& )
}
else
{
- String aStr(SdResId( STR_WARN_NAME_DUPLICATE ));
WarningBox aWarningBox( mpWindow, WinBits( WB_OK ),
- aStr );
+ SD_RESSTR( STR_WARN_NAME_DUPLICATE ) );
aWarningBox.Execute();
}
}
diff --git a/sd/source/ui/func/fumorph.cxx b/sd/source/ui/func/fumorph.cxx
index f556b8a..b8c1e1c 100644
--- a/sd/source/ui/func/fumorph.cxx
+++ b/sd/source/ui/func/fumorph.cxx
@@ -164,10 +164,8 @@ void FuMorph::DoExecute( SfxRequest& )
if(ImpMorphPolygons(aPolyPoly1, aPolyPoly2, pDlg->GetFadeSteps(), aPolyPolyList))
{
- String aString(mpView->GetDescriptionOfMarkedObjects());
-
- aString.Append(sal_Unicode(' '));
- aString.Append(SD_RESSTR(STR_UNDO_MORPHING));
+ OUString aString(mpView->GetDescriptionOfMarkedObjects());
+ aString += " " + SD_RESSTR(STR_UNDO_MORPHING);
mpView->BegUndo(aString);
ImpInsertPolygons(aPolyPolyList, pDlg->IsAttributeFade(), pObj1, pObj2);
diff --git a/sd/source/ui/func/fuoaprms.cxx b/sd/source/ui/func/fuoaprms.cxx
index ae0f6c5..a8100be 100644
--- a/sd/source/ui/func/fuoaprms.cxx
+++ b/sd/source/ui/func/fuoaprms.cxx
@@ -108,10 +108,10 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
Color aFadeColor = COL_LIGHTGRAY;
sal_Bool bInvisible = sal_False;
sal_Bool bSoundOn = sal_False;
- String aSound;
+ OUString aSound;
sal_Bool bPlayFull = sal_False;
presentation::ClickAction eClickAction = presentation::ClickAction_NONE;
- String aBookmark;
+ OUString aBookmark;
presentation::AnimationEffect eSecondEffect = presentation::AnimationEffect_NONE;
presentation::AnimationSpeed eSecondSpeed = presentation::AnimationSpeed_MEDIUM;
@@ -791,7 +791,7 @@ void FuObjectAnimationParameters::DoExecute( SfxRequest& rReq )
pInfo->mbSecondPlayFull = bSecondPlayFull;
if (eClickAction == presentation::ClickAction_VERB)
- pInfo->mnVerb = (sal_uInt16)aBookmark.ToInt32();
+ pInfo->mnVerb = (sal_uInt16)aBookmark.toInt32();
}
}
// Set the Undo Group in of the Undo Manager
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 6d64c98..f522922 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -349,8 +349,7 @@ const SfxPoolItem* FuOutlineBullet::GetNumBulletItem(SfxItemSet& aNewAttr, sal_u
if(bOutliner)
{
SfxStyleSheetBasePool* pSSPool = mpView->GetDocSh()->GetStyleSheetPool();
- String aStyleName((SdResId((sal_uInt16)STR_LAYOUT_OUTLINE)));
- aStyleName.AppendAscii( " 1" );
+ OUString aStyleName(SD_RESSTR(STR_LAYOUT_OUTLINE) + " 1");
SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( aStyleName, SD_STYLE_FAMILY_PSEUDO);
if( pFirstStyleSheet )
pFirstStyleSheet->GetItemSet().GetItemState(EE_PARA_NUMBULLET, sal_False, (const SfxPoolItem**)&pItem);
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index abae128..875c3a1 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -347,13 +347,11 @@ const SfxItemSet* FuPage::ExecuteDialog( Window* pParent )
// notice-masterpage (at the moment)
if( ePageKind != PK_NOTES )
{
- String aTit(SdResId( STR_PAGE_BACKGROUND_TITLE ));
- String aTxt(SdResId( STR_PAGE_BACKGROUND_TXT ));
MessBox aQuestionBox (
pParent,
WB_YES_NO | WB_DEF_YES,
- aTit,
- aTxt );
+ SD_RESSTR(STR_PAGE_BACKGROUND_TITLE),
+ SD_RESSTR(STR_PAGE_BACKGROUND_TXT) );
aQuestionBox.SetImage( QueryBox::GetStandardImage() );
bSetToAllPages = ( RET_YES == aQuestionBox.Execute() );
}
diff --git a/sd/source/ui/func/fuprlout.cxx b/sd/source/ui/func/fuprlout.cxx
index 67ae4ca..6268679 100644
--- a/sd/source/ui/func/fuprlout.cxx
+++ b/sd/source/ui/func/fuprlout.cxx
@@ -57,7 +57,7 @@ namespace sd
TYPEINIT1( FuPresentationLayout, FuPoor );
-#define DOCUMENT_TOKEN (sal_Unicode('#'))
+#define DOCUMENT_TOKEN '#'
FuPresentationLayout::FuPresentationLayout (
ViewShell* pViewSh,
@@ -101,9 +101,10 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
DBG_ASSERT(nSelectedPage != SDRPAGE_NOTFOUND, "no selected page");
SdPage* pSelectedPage = mpDoc->GetSdPage(nSelectedPage, PK_STANDARD);
- String aOldPageLayoutName(pSelectedPage->GetLayoutName());
- String aOldLayoutName(aOldPageLayoutName);
- aOldLayoutName.Erase(aOldLayoutName.SearchAscii(SD_LT_SEPARATOR));
+ OUString aOldLayoutName(pSelectedPage->GetLayoutName());
+ sal_Int32 nPos = aOldLayoutName.indexOf(SD_LT_SEPARATOR);
+ if (nPos != -1)
+ aOldLayoutName = aOldLayoutName.copy(0, nPos);
/* if we are on a master page, the changes apply for all pages and notes-
pages who are using the relevant layout */
@@ -120,7 +121,7 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
// call dialog
sal_Bool bLoad = sal_False; // appear the new master pages?
- String aFile;
+ OUString aFile;
SfxItemSet aSet(mpDoc->GetPool(), ATTR_PRESLAYOUT_START, ATTR_PRESLAYOUT_END);
@@ -188,15 +189,15 @@ void FuPresentationLayout::DoExecute( SfxRequest& rReq )
if (bLoad)
{
- String aFileName = aFile.GetToken( 0, DOCUMENT_TOKEN );
+ OUString aFileName = aFile.getToken(0, DOCUMENT_TOKEN);
SdDrawDocument* pTempDoc = mpDoc->OpenBookmarkDoc( aFileName );
// #69581: If I chosed the standard-template I got no filename and so I get no
// SdDrawDocument-Pointer. But the method SetMasterPage is able to handle
// a NULL-pointer as a Standard-template ( look at SdDrawDocument::SetMasterPage )
- String aLayoutName;
+ OUString aLayoutName;
if( pTempDoc )
- aLayoutName = aFile.GetToken( 1, DOCUMENT_TOKEN );
+ aLayoutName = aFile.getToken(1, DOCUMENT_TOKEN);
mpDoc->SetMasterPage(nSelectedPage, aLayoutName, pTempDoc, bMasterPage, bCheckMasters);
mpDoc->CloseBookmarkDoc();
diff --git a/sd/source/ui/func/fuprobjs.cxx b/sd/source/ui/func/fuprobjs.cxx
index 81e3d58..6ae571f 100644
--- a/sd/source/ui/func/fuprobjs.cxx
+++ b/sd/source/ui/func/fuprobjs.cxx
@@ -74,8 +74,8 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
if not, it is not allowed to edit the templates */
SfxItemSet aSet(mpDoc->GetItemPool(), SID_STATUS_LAYOUT, SID_STATUS_LAYOUT);
pOutlineViewShell->GetStatusBarState( aSet );
- String aLayoutName = (((SfxStringItem&)aSet.Get(SID_STATUS_LAYOUT)).GetValue());
- DBG_ASSERT(aLayoutName.Len(), "Layout not defined");
+ OUString aLayoutName = ((SfxStringItem&)aSet.Get(SID_STATUS_LAYOUT)).GetValue();
+ DBG_ASSERT(!aLayoutName.isEmpty(), "Layout not defined");
sal_Bool bUnique = sal_False;
sal_Int16 nDepth, nTmp;
@@ -123,14 +123,12 @@ void FuPresentationObjects::DoExecute( SfxRequest& )
if( bPage )
{
ePO = PO_TITLE;
- String aStr(SdResId( STR_LAYOUT_TITLE ));
- aStyleName += aStr ;
+ aStyleName += SD_RESSTR(STR_LAYOUT_TITLE);
}
else
{
ePO = (PresentationObjects) ( PO_OUTLINE_1 + nDepth - 1 );
- String aStr(SdResId( STR_LAYOUT_OUTLINE ));
- aStyleName += aStr ;
+ aStyleName += SD_RESSTR(STR_LAYOUT_OUTLINE);
aStyleName += OUString(' ') ;
aStyleName += OUString::number( nDepth ) ;
}
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index fb7fcbb..b94cfe0 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -1200,9 +1200,9 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
case presentation::ClickAction_DOCUMENT:
{
- String sBookmark( pInfo->GetBookmark() );
+ OUString sBookmark( pInfo->GetBookmark() );
// Jump to document
- if (sBookmark.Len())
+ if (!sBookmark.isEmpty())
{
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
SfxStringItem aStrItem(SID_FILE_NAME, sBookmark);
@@ -1288,7 +1288,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
case presentation::ClickAction_PROGRAM:
{
- String aBaseURL = GetDocSh()->GetMedium()->GetBaseURL();
+ OUString aBaseURL = GetDocSh()->GetMedium()->GetBaseURL();
INetURLObject aURL( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pInfo->GetBookmark(),
URIHelper::GetMaybeFileHdl(), true, false,
INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ) );
@@ -1314,7 +1314,7 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
case presentation::ClickAction_MACRO:
{
// Execute macro
- String aMacro = pInfo->GetBookmark();
+ OUString aMacro = pInfo->GetBookmark();
if ( SfxApplication::IsXScriptURL( aMacro ) )
{
@@ -1346,16 +1346,12 @@ sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
// aMacro has got following format:
// "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, '.');
// In this moment the Call-method only
// resolves modulename+macroname
- String aExecMacro(aModulName);
- aExecMacro.Append( sal_Unicode('.') );
- aExecMacro.Append( aMacroName );
+ OUString aExecMacro(aModulName + "." + aMacroName);
bAnimated = mpDocSh->GetBasic()->Call(aExecMacro);
}
}
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 4ee6a2f..0162e96 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -63,8 +63,8 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
SfxItemSet aDlgSet( mpDoc->GetPool(), ATTR_PRESENT_START, ATTR_PRESENT_END );
std::vector<OUString> aPageNameList(mpDoc->GetSdPageCount( PK_STANDARD ));
- const String& rPresPage = rPresentationSettings.maPresPage;
- String aFirstPage;
+ const OUString& rPresPage = rPresentationSettings.maPresPage;
+ OUString aFirstPage;
SdPage* pPage = NULL;
long nPage;
@@ -83,13 +83,13 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
// is this our (existing) first page?
if ( rPresPage == aStr )
aFirstPage = rPresPage;
- else if ( pPage->IsSelected() && !aFirstPage.Len() )
+ else if ( pPage->IsSelected() && aFirstPage.isEmpty() )
aFirstPage = aStr;
}
SdCustomShowList* pCustomShowList = mpDoc->GetCustomShowList(); // No Create
sal_Bool bStartWithActualPage = SD_MOD()->GetSdOptions( mpDoc->GetDocumentType() )->IsStartWithActualPage();
- if( !aFirstPage.Len() && pPage )
+ if( aFirstPage.isEmpty() && pPage )
aFirstPage = pPage->GetName();
aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_ALL, rPresentationSettings.mbAll ) );
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 866ddbb..125dc5f 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -112,8 +112,8 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
else if( pArgs && SFX_ITEM_SET == pArgs->GetItemState( SID_STYLE_FAMILYNAME,
sal_False, &pItem ))
{
- String sFamily = ( (const SfxStringItem &) pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue();
- if (sFamily.CompareToAscii("graphics") == COMPARE_EQUAL)
+ OUString sFamily = ( (const SfxStringItem &) pArgs->Get( SID_STYLE_FAMILYNAME ) ).GetValue();
+ if (sFamily == "graphics")
nFamily = SD_STYLE_FAMILY_GRAPHICS;
else
nFamily = SD_STYLE_FAMILY_PSEUDO;
@@ -172,7 +172,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
if (pArgs->GetItemState(SID_STYLE_REFERENCE) == SFX_ITEM_ON)
{
- String aParentName(((const SfxStringItem&) pArgs->Get(SID_STYLE_REFERENCE)).GetValue());
+ OUString aParentName(((const SfxStringItem&) pArgs->Get(SID_STYLE_REFERENCE)).GetValue());
pStyleSheet->SetParent(aParentName);
}
else
@@ -310,7 +310,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
}
else if (eFamily == SD_STYLE_FAMILY_PSEUDO)
{
- String aName(pStyleSheet->GetName());
+ OUString aName(pStyleSheet->GetName());
sal_uInt16 nDlgId = 0;
if (aName == SD_RESSTR(STR_PSEUDOSHEET_TITLE))
@@ -341,15 +341,14 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
nDlgId = TAB_PRES_LAYOUT_TEMPLATE;
ePO = PO_NOTES;
}
- else if(aName.Search(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE)) !=
- STRING_NOTFOUND)
+ else if(aName.indexOf(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE)) != -1)
{
nDlgId = TAB_PRES_LAYOUT_TEMPLATE;
- String aOutlineStr((SdResId(STR_PSEUDOSHEET_OUTLINE)));
+ OUString aOutlineStr(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE));
// determine number, mind the blank between name and number
- String aNumStr(aName.Copy(aOutlineStr.Len() + 1));
- sal_uInt16 nLevel = (sal_uInt16)aNumStr.ToInt32();
+ OUString aNumStr(aName.copy(aOutlineStr.getLength() + 1));
+ sal_uInt16 nLevel = (sal_uInt16)aNumStr.toInt32();
switch (nLevel)
{
case 1: ePO = PO_OUTLINE_1; break;
@@ -415,8 +414,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
SvxNumRule aRule(*((SvxNumBulletItem*)aTempSet.GetItem(EE_PARA_NUMBULLET))->GetNumRule());
- String sStyleName((SdResId(STR_PSEUDOSHEET_OUTLINE)));
- sStyleName.AppendAscii( " 1" );
+ OUString sStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " 1");
SfxStyleSheetBase* pFirstStyleSheet = pSSPool->Find( sStyleName, SD_STYLE_FAMILY_PSEUDO);
if(pFirstStyleSheet)
@@ -430,8 +428,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
}
}
- String sStyleName((SdResId(STR_PSEUDOSHEET_OUTLINE)));
- sStyleName.Append( sal_Unicode( ' ' ));
+ OUString sStyleName(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE) + " ");
pStyleSheet->GetItemSet().Put(aTempSet);
SdStyleSheet* pRealSheet =((SdStyleSheet*)pStyleSheet)->GetRealStyleSheet();
@@ -441,8 +438,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
{
for( sal_uInt16 n = (sal_uInt16)(ePO - PO_OUTLINE_1 + 2); n < 10; n++ )
{
- String aName( sStyleName );
- aName.Append( OUString::number( (sal_Int32) n ));
+ OUString aName( sStyleName + OUString::number(n) );
SfxStyleSheetBase* pSheet = pSSPool->Find( aName, SD_STYLE_FAMILY_PSEUDO);
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index ada1937..739c096 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -1149,7 +1149,7 @@ sal_Bool FuText::DeleteDefaultText()
if( bIsUndoEnabled )
pOutliner->EnableUndo(sal_False);
- pOutliner->SetText( String(), pOutliner->GetParagraph( 0 ) );
+ pOutliner->SetText( OUString(), pOutliner->GetParagraph( 0 ) );
if( bIsUndoEnabled )
pOutliner->EnableUndo(sal_True);
@@ -1181,7 +1181,7 @@ sal_Bool FuText::RequestHelp(const HelpEvent& rHEvt)
if ((Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled()) &&
mxTextObj.is() && pOLV && pOLV->GetFieldUnderMousePointer())
{
- String aHelpText;
+ OUString aHelpText;
const SvxFieldItem* pFieldItem = pOLV->GetFieldUnderMousePointer();
const SvxFieldData* pField = pFieldItem->GetField();
@@ -1190,7 +1190,7 @@ sal_Bool FuText::RequestHelp(const HelpEvent& rHEvt)
// URL-Field
aHelpText = INetURLObject::decode( ((const SvxURLField*)pField)->GetURL(), '%', INetURLObject::DECODE_WITH_CHARSET );
}
- if (aHelpText.Len())
+ if (!aHelpText.isEmpty())
{
Rectangle aLogicPix = mpWindow->LogicToPixel(mxTextObj->GetLogicRect());
Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()),
diff --git a/sd/source/ui/func/futhes.cxx b/sd/source/ui/func/futhes.cxx
index 2998d2e..ed0888a 100644
--- a/sd/source/ui/func/futhes.cxx
+++ b/sd/source/ui/func/futhes.cxx
@@ -67,7 +67,7 @@ FunctionReference FuThesaurus::Create( ViewShell* pViewSh, ::sd::Window* pWin, :
void FuThesaurus::DoExecute( SfxRequest& )
{
- SfxErrorContext aContext(ERRCTX_SVX_LINGU_THESAURUS, String(),
+ SfxErrorContext aContext(ERRCTX_SVX_LINGU_THESAURUS, OUString(),
mpWindow, RID_SVXERRCTX, &DIALOG_MGR() );
if( mpViewShell && mpViewShell->ISA(DrawViewShell) )
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 9640b6d..3dec30d 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -107,9 +107,8 @@ void FuTransform::DoExecute( SfxRequest& rReq )
if( pArgs )
{
// Undo
- String aString( mpView->GetDescriptionOfMarkedObjects() );
- aString.Append( sal_Unicode(' ') );
- aString.Append( SD_RESSTR( STR_TRANSFORM ) );
+ OUString aString( mpView->GetDescriptionOfMarkedObjects() );
+ aString += " " + SD_RESSTR( STR_TRANSFORM );
mpView->BegUndo( aString );
mpView->SetGeoAttrToMarked( *pArgs );
diff --git a/sd/source/ui/func/fuvect.cxx b/sd/source/ui/func/fuvect.cxx
index d783fa3..cc15751 100644
--- a/sd/source/ui/func/fuvect.cxx
+++ b/sd/source/ui/func/fuvect.cxx
@@ -73,10 +73,8 @@ void FuVectorize::DoExecute( SfxRequest& )
if( pPageView && rMtf.GetActionSize() )
{
SdrGrafObj* pVectObj = (SdrGrafObj*) pObj->Clone();
- String aStr( mpView->GetDescriptionOfMarkedObjects() );
-
- aStr.Append( sal_Unicode(' ') );
- aStr.Append( SD_RESSTR( STR_UNDO_VECTORIZE ) );
+ OUString aStr( mpView->GetDescriptionOfMarkedObjects() );
+ aStr += " " + SD_RESSTR( STR_UNDO_VECTORIZE );
mpView->BegUndo( aStr );
pVectObj->SetGraphic( rMtf );
mpView->ReplaceObjectAtView( pObj, *pPageView, pVectObj );
diff --git a/sd/source/ui/func/unmovss.cxx b/sd/source/ui/func/unmovss.cxx
index ff42ebe..d742df5 100644
--- a/sd/source/ui/func/unmovss.cxx
+++ b/sd/source/ui/func/unmovss.cxx
@@ -57,7 +57,7 @@ void SdMoveStyleSheetsUndoAction::Undo()
std::vector< SdStyleSheetVector >::iterator childlistiter( maListOfChildLists.begin() );
for(SdStyleSheetVector::iterator iter = maStyles.begin(); iter != maStyles.end(); ++iter, ++childlistiter )
{
- String aParent((*iter)->GetName());
+ OUString aParent((*iter)->GetName());
for( SdStyleSheetVector::iterator childiter = (*childlistiter).begin(); childiter != (*childlistiter).end(); ++childiter )
{
(*childiter)->SetParent(aParent);
commit 72a3be3dd0983769f4d17f237844efd7536da7e1
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sat Aug 24 19:00:06 2013 +0400
convert SdTpOptionsMisc to OUString
Change-Id: Ifd971d1b0b2bbccea2e3c632e35b42d1065a66ea
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index ffa68c5..5b92eab 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -194,7 +194,7 @@ SfxTabPage* SdTpOptionsContents::Create( Window* pWindow,
|*
\************************************************************************/
#define TABLE_COUNT 12
-#define TOKEN (sal_Unicode(':'))
+#define TOKEN ':'
SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs ) :
SfxTabPage ( pParent, "OptSavePage","modules/simpress/ui/optimpressgeneralpage.ui", rInAttrs )
@@ -253,7 +253,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
for ( i = 0; i < aMetricArr.Count(); ++i )
{
- String sMetric = aMetricArr.GetStringByPos( i );
+ OUString sMetric = aMetricArr.GetStringByPos( i );
sal_IntPtr nFieldUnit = aMetricArr.GetValue( i );
sal_uInt16 nPos = m_pLbMetric->InsertEntry( sMetric );
m_pLbMetric->SetEntryData( nPos, (void*)nFieldUnit );
@@ -576,23 +576,19 @@ void SdTpOptionsMisc::SetDrawMode()
// -----------------------------------------------------------------------
-String SdTpOptionsMisc::GetScale( sal_Int32 nX, sal_Int32 nY )
+OUString SdTpOptionsMisc::GetScale( sal_Int32 nX, sal_Int32 nY )
{
- String aScale( OUString::number( nX ) );
- aScale.Append( TOKEN );
- aScale.Append( OUString::number( nY ) );
-
- return( aScale );
+ return OUString::number(nX) + OUString(TOKEN) + OUString::number(nY);
}
// -----------------------------------------------------------------------
-sal_Bool SdTpOptionsMisc::SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY )
+sal_Bool SdTpOptionsMisc::SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32& rY )
{
if( comphelper::string::getTokenCount(aScale, TOKEN) != 2 )
return( sal_False );
- OUString aTmp(aScale.GetToken( 0, TOKEN ));
+ OUString aTmp(aScale.getToken(0, TOKEN));
if (!comphelper::string::isdigitAsciiString(aTmp))
return sal_False;
@@ -600,7 +596,7 @@ sal_Bool SdTpOptionsMisc::SetScale( const String& aScale, sal_Int32& rX, sal_Int
if( rX == 0 )
return( sal_False );
- aTmp = aScale.GetToken( 1, TOKEN );
+ aTmp = aScale.getToken(1, TOKEN);
if (!comphelper::string::isdigitAsciiString(aTmp))
return sal_False;
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index b8e0a72..cbbd960 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -111,13 +111,13 @@ private:
sal_uInt32 nWidth;
sal_uInt32 nHeight;
- String aInfo1;
- String aInfo2;
+ OUString aInfo1;
+ OUString aInfo2;
SfxMapUnit ePoolUnit;
- String GetScale( sal_Int32 nX, sal_Int32 nY );
- sal_Bool SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY );
+ OUString GetScale( sal_Int32 nX, sal_Int32 nY );
+ sal_Bool SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32& rY );
DECL_LINK( SelectMetricHdl_Impl, void * );
commit 4c8fd5abdfd1cf588cf38e1b8e761d09b5952343
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sat Aug 24 18:49:18 2013 +0400
convert DrawDocShell to OUString
Change-Id: I09e6f284024d00dbbc8a1c7b33684f4c23a650a8
diff --git a/sd/source/ui/docshell/docshel2.cxx b/sd/source/ui/docshell/docshel2.cxx
index 9306d8f..193d4a3 100644
--- a/sd/source/ui/docshell/docshel2.cxx
+++ b/sd/source/ui/docshell/docshel2.cxx
@@ -286,12 +286,12 @@ Bitmap DrawDocShell::GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixe
*/
sal_Bool DrawDocShell::CheckPageName (::Window* pWin, OUString& rName )
{
- const String aStrForDlg( rName );
+ const OUString aStrForDlg( rName );
bool bIsNameValid = IsNewPageNameValid( rName, true );
if( ! bIsNameValid )
{
- String aDesc( SdResId( STR_WARN_PAGE_EXISTS ) );
+ OUString aDesc( SD_RESSTR( STR_WARN_PAGE_EXISTS ) );
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
AbstractSvxNameDialog* aNameDlg = pFact ? pFact->CreateSvxNameDialog( pWin, aStrForDlg, aDesc ) : 0;
if( aNameDlg )
diff --git a/sd/source/ui/docshell/docshel4.cxx b/sd/source/ui/docshell/docshel4.cxx
index 053b9a6..5fa8a76 100644
--- a/sd/source/ui/docshell/docshel4.cxx
+++ b/sd/source/ui/docshell/docshel4.cxx
@@ -652,7 +652,7 @@ SfxStyleSheetBasePool* DrawDocShell::GetStyleSheetPool()
return( (SfxStyleSheetBasePool*) mpDoc->GetStyleSheetPool() );
}
-sal_Bool DrawDocShell::GotoBookmark(const String& rBookmark)
+sal_Bool DrawDocShell::GotoBookmark(const OUString& rBookmark)
{
sal_Bool bFound = sal_False;
@@ -846,7 +846,7 @@ sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
masterpages about the name change.
*/
- String aLayoutName;
+ OUString aLayoutName;
SfxStringItem* pLayoutItem;
if( rMedium.GetItemSet()->GetItemState(SID_TEMPLATE_NAME, sal_False, (const SfxPoolItem**) & pLayoutItem ) == SFX_ITEM_SET )
@@ -860,7 +860,7 @@ sal_Bool DrawDocShell::SaveAsOwnFormat( SfxMedium& rMedium )
aLayoutName = aURL.getName();
}
- if( aLayoutName.Len() )
+ if (!aLayoutName.isEmpty())
{
sal_uInt32 nCount = mpDoc->GetMasterSdPageCount(PK_STANDARD);
for (sal_uInt32 i = 0; i < nCount; ++i)
@@ -935,7 +935,7 @@ OutputDevice* DrawDocShell::GetDocumentRefDev (void)
/** executes the SID_OPENDOC slot to let the framework open a document
with the given URL and this document as a referer */
-void DrawDocShell::OpenBookmark( const String& rBookmarkURL )
+void DrawDocShell::OpenBookmark( const OUString& rBookmarkURL )
{
SfxStringItem aStrItem( SID_FILE_NAME, rBookmarkURL );
SfxStringItem aReferer( SID_REFERER, GetMedium()->GetName() );
diff --git a/sd/source/ui/inc/DrawDocShell.hxx b/sd/source/ui/inc/DrawDocShell.hxx
index 397fa88..fa2f767 100644
--- a/sd/source/ui/inc/DrawDocShell.hxx
+++ b/sd/source/ui/inc/DrawDocShell.hxx
@@ -127,7 +127,7 @@ public:
void Disconnect(sd::ViewShell* pViewSh);
void UpdateTablePointers();
- sal_Bool GotoBookmark(const String& rBookmark);
+ sal_Bool GotoBookmark(const OUString& rBookmark);
Bitmap GetPagePreviewBitmap(SdPage* pPage, sal_uInt16 nMaxEdgePixel);
@@ -156,7 +156,7 @@ public:
/** executes the SID_OPENDOC slot to let the framework open a document
with the given URL and this document as a referer */
- void OpenBookmark( const String& rBookmarkURL );
+ void OpenBookmark( const OUString& rBookmarkURL );
/** checks, if the given name is a valid new name for a slide
commit 4652bdfa47a2ba453b6c8c199bc5f4f6d03af457
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sat Aug 24 18:35:51 2013 +0400
convert StyleSheetUndoAction to OUString
Change-Id: I654df5dec1efae868aa6f90dbc672f9c29ebd0e3
diff --git a/sd/source/ui/dlg/unchss.cxx b/sd/source/ui/dlg/unchss.cxx
index 9c5c1e1..a876559 100644
--- a/sd/source/ui/dlg/unchss.cxx
+++ b/sd/source/ui/dlg/unchss.cxx
@@ -52,13 +52,12 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc,
pTheDoc->MigrateItemSet( &pStyleSheet->GetItemSet(), pOldSet, pTheDoc );
aComment = SD_RESSTR(STR_UNDO_CHANGE_PRES_OBJECT);
- String aName(pStyleSheet->GetName());
+ OUString aName(pStyleSheet->GetName());
// delete layout name and separator
- String aSep( SD_LT_SEPARATOR );
- sal_uInt16 nPos = aName.Search(aSep);
- if( nPos != STRING_NOTFOUND )
- aName.Erase(0, nPos + aSep.Len());
+ sal_Int32 nPos = aName.indexOf(SD_LT_SEPARATOR);
+ if (nPos != -1)
+ aName = aName.copy(nPos + strlen(SD_LT_SEPARATOR));
if (aName == SD_RESSTR(STR_LAYOUT_TITLE))
{
@@ -82,20 +81,17 @@ StyleSheetUndoAction::StyleSheetUndoAction(SdDrawDocument* pTheDoc,
}
else
{
- String aOutlineStr(SdResId(STR_PSEUDOSHEET_OUTLINE));
- nPos = aName.Search(aOutlineStr);
- if (nPos != STRING_NOTFOUND)
+ OUString aOutlineStr(SD_RESSTR(STR_PSEUDOSHEET_OUTLINE));
+ nPos = aName.indexOf(aOutlineStr);
+ if (nPos != -1)
{
- String aNumStr(aName.Copy(aOutlineStr.Len()));
- aName = SD_RESSTR(STR_LAYOUT_OUTLINE);
- aName += aNumStr;
+ OUString aNumStr(aName.copy(aOutlineStr.getLength()));
+ aName = SD_RESSTR(STR_LAYOUT_OUTLINE) + aNumStr;
}
}
// replace placeholder with template name
- nPos = aComment.Search(sal_Unicode('$'));
- aComment.Erase(nPos, 1);
- aComment.Insert(aName, nPos);
+ aComment = aComment.replaceFirst("$", aName);
}
diff --git a/sd/source/ui/inc/unchss.hxx b/sd/source/ui/inc/unchss.hxx
index 16927cf..4ca83c6 100644
--- a/sd/source/ui/inc/unchss.hxx
+++ b/sd/source/ui/inc/unchss.hxx
@@ -32,7 +32,7 @@ class StyleSheetUndoAction : public SdUndoAction
SfxItemSet* pNewSet;
SfxItemSet* pOldSet;
- String aComment;
+ OUString aComment;
public:
TYPEINFO();
commit a0bfad8c0eed119af2aea71d4deebcd60ac3f4a5
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sat Aug 24 18:17:10 2013 +0400
convert SdPresLayoutDlg to OUString
Change-Id: If21b54a9f8f17945e87363d9c370e756b6700831
diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx
index bcb71e3..ae074a7 100644
--- a/sd/source/ui/dlg/sdpreslt.cxx
+++ b/sd/source/ui/dlg/sdpreslt.cxx
@@ -31,7 +31,6 @@
#include "sdpage.hxx"
#include "DrawDocShell.hxx"
-#define DOCUMENT_TOKEN (sal_Unicode('#'))
SdPresLayoutDlg::SdPresLayoutDlg(
::sd::DrawDocShell* pDocShell,
@@ -48,7 +47,7 @@ SdPresLayoutDlg::SdPresLayoutDlg(
maCbxCheckMasters (this, SdResId(CBX_CHECK_MASTERS)),
maBtnLoad (this, SdResId(BTN_LOAD)),
mrOutAttrs (rInAttrs),
- maStrNone ( SdResId( STR_NULL ) )
+ maStrNone (SD_RESSTR(STR_NULL))
{
FreeResource();
@@ -84,7 +83,7 @@ void SdPresLayoutDlg::Reset()
if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, sal_True, &pPoolItem) == SFX_ITEM_SET)
maName = ((const SfxStringItem*)pPoolItem)->GetValue();
else
- maName.Erase();
+ maName = "";
FillValueSet();
@@ -109,19 +108,17 @@ void SdPresLayoutDlg::GetAttr(SfxItemSet& rOutAttrs)
sal_Bool bLoad = nId > mnLayoutCount;
rOutAttrs.Put( SfxBoolItem( ATTR_PRESLAYOUT_LOAD, bLoad ) );
- String aLayoutName;
+ OUString aLayoutName;
if( bLoad )
{
- aLayoutName = maName;
- aLayoutName.Append( DOCUMENT_TOKEN );
- aLayoutName.Append( maLayoutNames[ nId - 1 ] );
+ aLayoutName = maName + "#" + maLayoutNames[ nId - 1 ];
}
else
{
aLayoutName = maLayoutNames[ nId - 1 ];
if( aLayoutName == maStrNone )
- aLayoutName.Erase(); // that way we encode "- nothing -" (see below)
+ aLayoutName = ""; // that way we encode "- nothing -" (see below)
}
rOutAttrs.Put( SfxStringItem( ATTR_PRESLAYOUT_NAME, aLayoutName ) );
@@ -151,9 +148,9 @@ void SdPresLayoutDlg::FillValueSet()
SdPage* pMaster = (SdPage*)pDoc->GetMasterPage(nLayout);
if (pMaster->GetPageKind() == PK_STANDARD)
{
- String aLayoutName(pMaster->GetLayoutName());
- aLayoutName.Erase( aLayoutName.SearchAscii( SD_LT_SEPARATOR ) );
- maLayoutNames.push_back(new String(aLayoutName));
+ OUString aLayoutName(pMaster->GetLayoutName());
+ aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR));
+ maLayoutNames.push_back(aLayoutName);
Bitmap aBitmap(mpDocSh->GetPagePreviewBitmap(pMaster, 90));
maVS.InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
@@ -204,7 +201,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
else
{
// that way we encode "- nothing -"
- maName.Erase();
+ maName = "";
}
}
break;
@@ -218,12 +215,12 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
{
// check if template already ecists
sal_Bool bExists = sal_False;
- String aCompareStr( maName );
- if( maName.Len() == 0 )
+ OUString aCompareStr(maName);
+ if (aCompareStr.isEmpty())
aCompareStr = maStrNone;
sal_uInt16 aPos = 0;
- for (boost::ptr_vector<String>::iterator it = maLayoutNames.begin();
+ for (std::vector<OUString>::iterator it = maLayoutNames.begin();
it != maLayoutNames.end() && !bExists; ++it, ++aPos)
{
if( aCompareStr == *it )
@@ -237,7 +234,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
if( !bExists )
{
// load document in order to determine preview bitmap (if template is selected)
- if( maName.Len() )
+ if (!maName.isEmpty())
{
// determine document in order to call OpenBookmarkDoc
SdDrawDocument* pDoc = mpDocSh->GetDoc();
@@ -254,9 +251,9 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
SdPage* pMaster = (SdPage*) pTemplDoc->GetMasterPage(nLayout);
if (pMaster->GetPageKind() == PK_STANDARD)
{
- String aLayoutName(pMaster->GetLayoutName());
- aLayoutName.Erase( aLayoutName.SearchAscii( SD_LT_SEPARATOR ) );
- maLayoutNames.push_back(new String(aLayoutName));
+ OUString aLayoutName(pMaster->GetLayoutName());
+ aLayoutName = aLayoutName.copy(0, aLayoutName.indexOf(SD_LT_SEPARATOR));
+ maLayoutNames.push_back(aLayoutName);
Bitmap aBitmap(pTemplDocSh->GetPagePreviewBitmap(pMaster, 90));
maVS.InsertItem((sal_uInt16)maLayoutNames.size(), aBitmap, aLayoutName);
@@ -273,7 +270,7 @@ IMPL_LINK_NOARG(SdPresLayoutDlg, ClickLoadHdl)
else
{
// empty layout
- maLayoutNames.push_back( new String( maStrNone ) );
+ maLayoutNames.push_back(maStrNone);
maVS.InsertItem( (sal_uInt16) maLayoutNames.size(),
Bitmap( SdResId( BMP_FOIL_NONE ) ), maStrNone );
}
diff --git a/sd/source/ui/inc/sdpreslt.hxx b/sd/source/ui/inc/sdpreslt.hxx
index 8e04d1e..9bf09dd 100644
--- a/sd/source/ui/inc/sdpreslt.hxx
+++ b/sd/source/ui/inc/sdpreslt.hxx
@@ -64,11 +64,11 @@ private:
const SfxItemSet& mrOutAttrs;
- boost::ptr_vector<String> maLayoutNames;
+ std::vector<OUString> maLayoutNames;
- String maName; ///< layout name or file name
+ OUString maName; ///< layout name or file name
long mnLayoutCount; ///< number of master pages in the document
- const String maStrNone;
+ const OUString maStrNone;
void FillValueSet();
void Reset();
More information about the Libreoffice-commits
mailing list