summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 13:31:06 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 14:12:31 +0100
commit70e56ffe13fb00ff044a43074e99eb70275883b3 (patch)
treece08fc82a84e1d3fa17cb970b38f829c4049ccad /sfx2
parentsdext: Use appropriate OUString functions on string constants (diff)
downloadcore-70e56ffe13fb00ff044a43074e99eb70275883b3.tar.gz
core-70e56ffe13fb00ff044a43074e99eb70275883b3.zip
sfx2: Use appropriate OUString functions on string constants
Change-Id: Iea55d87a7c7b2afc408e3822121f79234481eccc
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/app.cxx2
-rw-r--r--sfx2/source/appl/appmisc.cxx4
-rw-r--r--sfx2/source/appl/appuno.cxx104
-rw-r--r--sfx2/source/appl/fileobj.cxx4
-rw-r--r--sfx2/source/appl/helpinterceptor.cxx4
-rw-r--r--sfx2/source/appl/linkmgr2.cxx4
-rw-r--r--sfx2/source/appl/linksrc.cxx2
-rw-r--r--sfx2/source/appl/lnkbase2.cxx2
-rw-r--r--sfx2/source/appl/macroloader.cxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx2
-rw-r--r--sfx2/source/appl/openuriexternally.cxx3
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/bastyp/sfxhtml.cxx2
-rw-r--r--sfx2/source/config/evntconf.cxx14
-rw-r--r--sfx2/source/dialog/dockwin.cxx4
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx2
-rw-r--r--sfx2/source/dialog/mailmodel.cxx2
-rw-r--r--sfx2/source/dialog/securitypage.cxx2
-rw-r--r--sfx2/source/doc/SfxDocumentMetaData.cxx10
-rw-r--r--sfx2/source/doc/docfile.cxx8
-rw-r--r--sfx2/source/doc/doctempl.cxx8
-rw-r--r--sfx2/source/doc/doctemplates.cxx2
-rw-r--r--sfx2/source/doc/guisaveas.cxx2
-rw-r--r--sfx2/source/doc/iframe.cxx2
-rw-r--r--sfx2/source/doc/objembed.cxx2
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/doc/plugin.cxx2
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx23
-rw-r--r--sfx2/source/doc/zoomitem.cxx6
-rw-r--r--sfx2/source/notify/eventsupplier.cxx4
-rw-r--r--sfx2/source/notify/globalevents.cxx2
-rw-r--r--sfx2/source/sidebar/Theme.cxx2
32 files changed, 116 insertions, 120 deletions
diff --git a/sfx2/source/appl/app.cxx b/sfx2/source/appl/app.cxx
index 8a2cd275e091..5b8ff78ddd8e 100644
--- a/sfx2/source/appl/app.cxx
+++ b/sfx2/source/appl/app.cxx
@@ -302,7 +302,7 @@ void SfxApplication::SetLastDir_Impl
void SfxApplication::ResetLastDir()
{
- pAppData_Impl->aLastDir = "";
+ pAppData_Impl->aLastDir.clear();
}
diff --git a/sfx2/source/appl/appmisc.cxx b/sfx2/source/appl/appmisc.cxx
index fa87870cf690..fb4a17b20a9e 100644
--- a/sfx2/source/appl/appmisc.cxx
+++ b/sfx2/source/appl/appmisc.cxx
@@ -142,13 +142,13 @@ bool SfxApplication::loadBrandSvg(const char *pName, BitmapEx &rBitmap, int nWid
{
// Load from disk
- OUString aBaseName = OUString("/") + OUString::createFromAscii( pName );
+ OUString aBaseName = "/" + OUString::createFromAscii( pName );
rtl_Locale *pLoc = NULL;
osl_getProcessLocale (&pLoc);
LanguageTag aLanguageTag( *pLoc);
- OUString uri = OUString( "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER ) + aBaseName + ".svg";
+ OUString uri = "$BRAND_BASE_DIR/" LIBO_ETC_FOLDER + aBaseName + ".svg";
rtl::Bootstrap::expandMacros( uri );
INetURLObject aObj( uri );
SvgData aSvgData(aObj.PathToFileName());
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 4e53652fbb21..01b950d46202 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1379,67 +1379,67 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
const SfxPoolItem *pItem=0;
if ( rSet.GetItemState( SID_COMPONENTDATA, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sComponentData);
+ pValue[nActProp].Name = sComponentData;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_COMPONENTCONTEXT, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sComponentContext);
+ pValue[nActProp].Name = sComponentContext;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_PROGRESS_STATUSBAR_CONTROL, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sStatusInd);
+ pValue[nActProp].Name = sStatusInd;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_INTERACTIONHANDLER, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sInteractionHdl);
+ pValue[nActProp].Name = sInteractionHdl;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_VIEW_DATA, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sViewData);
+ pValue[nActProp].Name = sViewData;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_FILTER_DATA, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sFilterData);
+ pValue[nActProp].Name = sFilterData;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_DOCUMENT, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sModel);
+ pValue[nActProp].Name = sModel;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_CONTENT, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sUCBContent);
+ pValue[nActProp].Name = sUCBContent;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_INPUTSTREAM, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sInputStream);
+ pValue[nActProp].Name = sInputStream;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_STREAM, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sStream);
+ pValue[nActProp].Name = sStream;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_OUTPUTSTREAM, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sOutputStream);
+ pValue[nActProp].Name = sOutputStream;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_POSTDATA, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sPostData);
+ pValue[nActProp].Name = sPostData;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_FILLFRAME, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sFrame);
+ pValue[nActProp].Name = sFrame;
if ( pItem->ISA( SfxUsrAnyItem ) )
{
OSL_FAIL( "TransformItems: transporting an XFrame via an SfxUsrAnyItem is not deprecated!" );
@@ -1452,92 +1452,92 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
}
if ( rSet.GetItemState( SID_TEMPLATE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sAsTemplate);
+ pValue[nActProp].Name = sAsTemplate;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_OPEN_NEW_VIEW, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sOpenNewView);
+ pValue[nActProp].Name = sOpenNewView;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_FAIL_ON_WARNING, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sFailOnWarning);
+ pValue[nActProp].Name = sFailOnWarning;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_VIEW_ID, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sViewId);
+ pValue[nActProp].Name = sViewId;
pValue[nActProp++].Value <<= (sal_Int16) static_cast<const SfxUInt16Item*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_PLUGIN_MODE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sPluginMode);
+ pValue[nActProp].Name = sPluginMode;
pValue[nActProp++].Value <<= (sal_Int16) static_cast<const SfxUInt16Item*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_DOC_READONLY, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sReadOnly);
+ pValue[nActProp].Name = sReadOnly;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_DDE_RECONNECT_ONLOAD, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sDdeReconnect);
+ pValue[nActProp].Name = sDdeReconnect;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_DOC_STARTPRESENTATION, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sStartPresentation);
+ pValue[nActProp].Name = sStartPresentation;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_SELECTION, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sSelectionOnly);
+ pValue[nActProp].Name = sSelectionOnly;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_HIDDEN, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sHidden);
+ pValue[nActProp].Name = sHidden;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_MINIMIZED, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sMinimized);
+ pValue[nActProp].Name = sMinimized;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_SILENT, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sSilent);
+ pValue[nActProp].Name = sSilent;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_PREVIEW, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sPreview);
+ pValue[nActProp].Name = sPreview;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_VIEWONLY, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sViewOnly);
+ pValue[nActProp].Name = sViewOnly;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_EDITDOC, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sDontEdit);
+ pValue[nActProp].Name = sDontEdit;
pValue[nActProp++].Value <<= !static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_FILE_DIALOG, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sUseSystemDialog);
+ pValue[nActProp].Name = sUseSystemDialog;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_STANDARD_DIR, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sStandardDir);
+ pValue[nActProp].Name = sStandardDir;
pValue[nActProp++].Value <<= OUString( static_cast<const SfxStringItem*>(pItem)->GetValue());
}
if ( rSet.GetItemState( SID_BLACK_LIST, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sBlackList);
+ pValue[nActProp].Name = sBlackList;
com::sun::star::uno::Sequence< OUString > aList;
static_cast<const SfxStringListItem*>(pItem)->GetStringList( aList );
@@ -1545,108 +1545,108 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
}
if ( rSet.GetItemState( SID_TARGETNAME, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sFrameName);
+ pValue[nActProp].Name = sFrameName;
pValue[nActProp++].Value <<= OUString( static_cast<const SfxStringItem*>(pItem)->GetValue() );
}
if ( rSet.GetItemState( SID_DOC_SALVAGE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sSalvagedFile);
+ pValue[nActProp].Name = sSalvagedFile;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_PATH, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sFolderName);
+ pValue[nActProp].Name = sFolderName;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_CONTENTTYPE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sMediaType);
+ pValue[nActProp].Name = sMediaType;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_TEMPLATE_NAME, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sTemplateName);
+ pValue[nActProp].Name = sTemplateName;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_TEMPLATE_REGIONNAME, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sTemplateRegionName);
+ pValue[nActProp].Name = sTemplateRegionName;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_JUMPMARK, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sJumpMark);
+ pValue[nActProp].Name = sJumpMark;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_CHARSET, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sCharacterSet);
+ pValue[nActProp].Name = sCharacterSet;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_MACROEXECMODE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sMacroExecMode);
+ pValue[nActProp].Name = sMacroExecMode;
pValue[nActProp++].Value <<= (sal_Int16) static_cast<const SfxUInt16Item*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_UPDATEDOCMODE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sUpdateDocMode);
+ pValue[nActProp].Name = sUpdateDocMode;
pValue[nActProp++].Value <<= (sal_Int16) static_cast<const SfxUInt16Item*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_REPAIRPACKAGE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sRepairPackage);
+ pValue[nActProp].Name = sRepairPackage;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue() ;
}
if ( rSet.GetItemState( SID_DOCINFO_TITLE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sDocumentTitle);
+ pValue[nActProp].Name = sDocumentTitle;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_DOC_BASEURL, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sDocumentBaseURL);
+ pValue[nActProp].Name = sDocumentBaseURL;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_DOC_HIERARCHICALNAME, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sHierarchicalDocumentName);
+ pValue[nActProp].Name = sHierarchicalDocumentName;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_COPY_STREAM_IF_POSSIBLE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sCopyStreamIfPossible);
+ pValue[nActProp].Name = sCopyStreamIfPossible;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_NOAUTOSAVE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sNoAutoSave);
+ pValue[nActProp].Name = sNoAutoSave;
pValue[nActProp++].Value <<= static_cast<const SfxBoolItem*>(pItem)->GetValue() ;
}
if ( rSet.GetItemState( SID_MODIFYPASSWORDINFO, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sModifyPasswordInfo);
+ pValue[nActProp].Name = sModifyPasswordInfo;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_ENCRYPTIONDATA, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sEncryptionData);
+ pValue[nActProp].Name = sEncryptionData;
pValue[nActProp++].Value = static_cast<const SfxUnoAnyItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_SUGGESTEDSAVEASDIR, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sSuggestedSaveAsDir);
+ pValue[nActProp].Name = sSuggestedSaveAsDir;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_SUGGESTEDSAVEASNAME, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sSuggestedSaveAsName);
+ pValue[nActProp].Name = sSuggestedSaveAsName;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if ( rSet.GetItemState( SID_DOC_SERVICE, false, &pItem ) == SfxItemState::SET )
{
- pValue[nActProp].Name = OUString(sDocumentService);
+ pValue[nActProp].Name = sDocumentService;
pValue[nActProp++].Value <<= static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if (rSet.HasItem(SID_FILTER_PROVIDER, &pItem))
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 88761455b147..60d566a8462a 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -418,7 +418,7 @@ void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Li
aEndEditLink.Call( &sFile );
}
else
- sFile = "";
+ sFile.clear();
}
break;
@@ -454,7 +454,7 @@ void SvFileObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Li
break;
default:
- sFile = "";
+ sFile.clear();
}
}
}
diff --git a/sfx2/source/appl/helpinterceptor.cxx b/sfx2/source/appl/helpinterceptor.cxx
index a7dc82cb7c66..7f4418771d82 100644
--- a/sfx2/source/appl/helpinterceptor.cxx
+++ b/sfx2/source/appl/helpinterceptor.cxx
@@ -230,8 +230,8 @@ Sequence< OUString > SAL_CALL HelpInterceptor_Impl::getInterceptedURLs()
void SAL_CALL HelpInterceptor_Impl::dispatch(
const URL& aURL, const Sequence< ::com::sun::star::beans::PropertyValue >& ) throw( RuntimeException, std::exception )
{
- bool bBack = ( OUString( ".uno:Backward" ) == aURL.Complete );
- if ( bBack || OUString( ".uno:Forward" ) == aURL.Complete )
+ bool bBack = aURL.Complete == ".uno:Backward";
+ if ( bBack || aURL.Complete == ".uno:Forward" )
{
if ( m_pHistory )
{
diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 314cd813fcc8..c14f0e1b53a6 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -392,7 +392,7 @@ void MakeLnkName( OUString& rName, const OUString* pType, const OUString& rFile,
rName += OUString(cTokenSeparator);
}
else if( !rName.isEmpty() )
- rName = "";
+ rName.clear();
rName += rFile;
@@ -626,7 +626,7 @@ bool SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
else
pShell = SfxObjectShell::GetNext( *pShell, &aType, false );
- sTmp = "";
+ sTmp.clear();
}
}
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index d89f4a8d96e2..7b53359c6b63 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -287,7 +287,7 @@ void SvLinkSource::SendDataChanged()
delete pImpl->pTimer;
pImpl->pTimer = NULL;
}
- pImpl->aDataMimeType = "";
+ pImpl->aDataMimeType.clear();
}
void SvLinkSource::NotifyDataChanged()
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index a5e1d8c78371..ab22c6db2efe 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -253,7 +253,7 @@ IMPL_LINK( SvBaseLink, EndEditHdl, OUString*, _pNewName )
if ( _pNewName )
sNewName = *_pNewName;
if ( !ExecuteEdit( sNewName ) )
- sNewName = "";
+ sNewName.clear();
bWasLastEditOK = !sNewName.isEmpty();
if ( pImpl->m_aEndEditLink.IsSet() )
pImpl->m_aEndEditLink.Call( this );
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx
index 55f610812a18..79f8ce50b88b 100644
--- a/sfx2/source/appl/macroloader.cxx
+++ b/sfx2/source/appl/macroloader.cxx
@@ -75,7 +75,7 @@ css::uno::Sequence<OUString> SAL_CALL SfxMacroLoader::getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception)
{
css::uno::Sequence< OUString > aSeq(1);
- aSeq[0] = OUString("com.sun.star.frame.ProtocolHandler");
+ aSeq[0] = "com.sun.star.frame.ProtocolHandler";
return aSeq;
}
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index cdad56376365..b629a09121ac 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -834,7 +834,7 @@ void IndexTabPage_Impl::OpenKeyword()
{
m_pIndexCB->SetText( sKeyword );
m_pIndexCB->GetDoubleClickHdl().Call( NULL );
- sKeyword = "";
+ sKeyword.clear();
}
}
diff --git a/sfx2/source/appl/openuriexternally.cxx b/sfx2/source/appl/openuriexternally.cxx
index e892c2c6f6b8..ecc347eddd27 100644
--- a/sfx2/source/appl/openuriexternally.cxx
+++ b/sfx2/source/appl/openuriexternally.cxx
@@ -41,8 +41,7 @@ bool sfx2::openUriExternally(
} catch (css::lang::IllegalArgumentException & e) {
if (e.ArgumentPosition != 0) {
throw css::uno::RuntimeException(
- OUString("unexpected IllegalArgumentException: ")
- + e.Message);
+ "unexpected IllegalArgumentException: " + e.Message);
}
SolarMutexGuard g;
MessageDialog eb(
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index f8f0e2a42ab1..f6bca870bc8e 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -115,7 +115,7 @@ css::uno::Sequence<OUString> SAL_CALL ShutdownIcon::getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception)
{
css::uno::Sequence< OUString > aSeq(1);
- aSeq[0] = OUString("com.sun.star.office.Quickstart");
+ aSeq[0] = "com.sun.star.office.Quickstart";
return aSeq;
}
diff --git a/sfx2/source/bastyp/sfxhtml.cxx b/sfx2/source/bastyp/sfxhtml.cxx
index 8549e9b7c64a..9c5eee8d0d69 100644
--- a/sfx2/source/bastyp/sfxhtml.cxx
+++ b/sfx2/source/bastyp/sfxhtml.cxx
@@ -179,7 +179,7 @@ IMAPOBJ_SETEVENT:
}
if( bNoHRef )
- aHRef = "";
+ aHRef.clear();
bool bNewArea = true;
switch( nShape )
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 33ab223a27a3..20c09d9b0d3c 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -163,13 +163,13 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
OUString aLib = pMacro->GetLibName();
OUString aMacro = pMacro->GetMacName();
- pValues[ 0 ].Name = OUString(PROP_EVENT_TYPE );
+ pValues[ 0 ].Name = PROP_EVENT_TYPE;
pValues[ 0 ].Value <<= aType;
- pValues[ 1 ].Name = OUString(PROP_LIBRARY );
+ pValues[ 1 ].Name = PROP_LIBRARY;
pValues[ 1 ].Value <<= aLib;
- pValues[ 2 ].Name = OUString(PROP_MACRO_NAME );
+ pValues[ 2 ].Name = PROP_MACRO_NAME;
pValues[ 2 ].Value <<= aMacro;
aEventData <<= aProperties;
@@ -182,10 +182,10 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
OUString aLib = pMacro->GetLibName();
OUString aMacro = pMacro->GetMacName();
- pValues[ 0 ].Name = OUString(PROP_EVENT_TYPE );
+ pValues[ 0 ].Name = PROP_EVENT_TYPE;
pValues[ 0 ].Value <<= aLib;
- pValues[ 1 ].Name = OUString(PROP_SCRIPT );
+ pValues[ 1 ].Name = PROP_SCRIPT;
pValues[ 1 ].Value <<= aMacro;
aEventData <<= aProperties;
@@ -197,10 +197,10 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
OUString aMacro = pMacro->GetMacName();
- pValues[ 0 ].Name = OUString(PROP_EVENT_TYPE );
+ pValues[ 0 ].Name = PROP_EVENT_TYPE;
pValues[ 0 ].Value <<= OUString(SVX_MACRO_LANGUAGE_JAVASCRIPT);
- pValues[ 1 ].Name = OUString(PROP_MACRO_NAME );
+ pValues[ 1 ].Name = PROP_MACRO_NAME;
pValues[ 1 ].Value <<= aMacro;
aEventData <<= aProperties;
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index 2f47a5f2d7e5..d7117623baac 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -1053,7 +1053,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
SfxChildAlignment eLocalAlignment = (SfxChildAlignment) (sal_uInt16) aStr.toInt32();
if ( pImp->bDockingPrevented )
// docking prevented, ignore old configuration and take alignment from default
- aStr = "";
+ aStr.clear();
else
SetAlignment( eLocalAlignment );
@@ -1062,7 +1062,7 @@ void SfxDockingWindow::Initialize(SfxChildWinInfo *pInfo)
{
OSL_FAIL("Invalid Alignment!");
SetAlignment( eAlign );
- aStr = "";
+ aStr.clear();
}
// get last alignment (for toggeling)
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index fe2fe37ca3bd..2b46f08eb350 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2021,7 +2021,7 @@ namespace
}
if ( !bValid )
- sPath = "";
+ sPath.clear();
return sPath;
}
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 68053778e117..ab7de098e7d3 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -941,7 +941,7 @@ bool CreateFromAddress_Impl( OUString& rFrom )
rFrom = rFrom + "<" + comphelper::string::strip(aEmailName, ' ') + ">";
}
else
- rFrom = "";
+ rFrom.clear();
return !rFrom.isEmpty();
}
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index 1cedc62247a8..af2c2a419818 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -368,7 +368,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl)
// remember required values to change protection and change recording in
// FillItemSet_Impl later on if password was correct.
m_bNewPasswordIsValid = true;
- m_aNewPassword = "";
+ m_aNewPassword.clear();
m_pProtectPB->Show();
m_pUnProtectPB->Hide();
}
diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx
index 0eb060b5e307..2310e6b78e47 100644
--- a/sfx2/source/doc/SfxDocumentMetaData.cxx
+++ b/sfx2/source/doc/SfxDocumentMetaData.cxx
@@ -1230,8 +1230,7 @@ void SAL_CALL SfxDocumentMetaData::init(
// The ODF spec says that handling multiple occurrences is
// application-specific.
css::uno::Reference<css::xml::dom::XNode> xNode =
- xPath->selectSingleNode(m_xParent,
- OUString("child::") + name);
+ xPath->selectSingleNode(m_xParent, "child::" + name);
// Do not create an empty element if it is missing;
// for certain elements, such as dateTime, this would be invalid
m_meta[name] = xNode;
@@ -1241,8 +1240,7 @@ void SAL_CALL SfxDocumentMetaData::init(
for (const char **pName = s_stdMetaList; *pName != 0; ++pName) {
OUString name = OUString::createFromAscii(*pName);
css::uno::Reference<css::xml::dom::XNodeList> nodes =
- xPath->selectNodeList(m_xParent,
- OUString("child::") + name);
+ xPath->selectNodeList(m_xParent, "child::" + name);
std::vector<css::uno::Reference<css::xml::dom::XNode> > v;
for (sal_Int32 i = 0; i < nodes->getLength(); ++i) {
v.push_back(nodes->item(i));
@@ -1901,9 +1899,9 @@ SfxDocumentMetaData::loadFromStorage(
try {
xPropArg->getPropertyValue("BaseURI")
>>= input.sSystemId;
- input.sSystemId += "/" + OUString(s_meta);
+ input.sSystemId += OUStringLiteral("/") + s_meta;
} catch (const css::uno::Exception &) {
- input.sSystemId = OUString(s_meta);
+ input.sSystemId = s_meta;
}
css::uno::Sequence< css::uno::Any > args(1);
args[0] <<= xPropArg;
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 9260fea0e9d8..6fcd374c269d 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -2171,7 +2171,7 @@ void SfxMedium::ClearBackup_Impl()
if ( ::utl::UCBContentHelper::Kill( pImp->m_aBackupURL ) )
{
pImp->m_bRemoveBackup = false;
- pImp->m_aBackupURL = "";
+ pImp->m_aBackupURL.clear();
}
else
{
@@ -2181,7 +2181,7 @@ void SfxMedium::ClearBackup_Impl()
}
}
else
- pImp->m_aBackupURL = "";
+ pImp->m_aBackupURL.clear();
}
@@ -2763,7 +2763,7 @@ void SfxMedium::CompleteReOpen()
{
pTmpFile = pImp->pTempFile;
pImp->pTempFile = NULL;
- pImp->m_aName = "";
+ pImp->m_aName.clear();
}
GetMedium_Impl();
@@ -3237,7 +3237,7 @@ void SfxMedium::CreateTempFile( bool bReplace )
return;
DELETEZ( pImp->pTempFile );
- pImp->m_aName = "";
+ pImp->m_aName.clear();
}
pImp->pTempFile = new ::utl::TempFile();
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index ebbc05927cc5..0af4abec2be4 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -337,10 +337,10 @@ const OUString& SfxDocumentTemplates::GetRegionName
if ( pData )
maTmpString = pData->GetTitle();
else
- maTmpString = "";
+ maTmpString.clear();
}
else
- maTmpString = "";
+ maTmpString.clear();
return maTmpString;
}
@@ -432,10 +432,10 @@ const OUString& SfxDocumentTemplates::GetName
if ( pEntry )
maTmpString = pEntry->GetTitle();
else
- maTmpString = "";
+ maTmpString.clear();
}
else
- maTmpString = "";
+ maTmpString.clear();
return maTmpString;
}
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index a51fdaa63c69..f76c7ad50571 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -2238,7 +2238,7 @@ public:
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{
css::uno::Sequence< OUString > aSeq(1);
- aSeq[0] = OUString("com.sun.star.frame.DocumentTemplates");
+ aSeq[0] = "com.sun.star.frame.DocumentTemplates";
return aSeq;
}
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 6ee6c0f18b47..296a41bb99d3 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1280,7 +1280,7 @@ OUString ModelData_Impl::GetRecommendedName( const OUString& aSuggestedName, con
uno::UNO_QUERY );
if ( xTypeDetection.is() )
{
- INetURLObject aObj( OUString( "c:/" ) + aRecommendedName, INET_PROT_FILE,
+ INetURLObject aObj( "c:/" + aRecommendedName, INET_PROT_FILE,
INetURLObject::ENCODE_ALL, RTL_TEXTENCODING_UTF8, INetURLObject::FSYS_DOS );
uno::Sequence< beans::PropertyValue > aTypeNameProps;
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 01d0022c33aa..e76c9f544462 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -83,7 +83,7 @@ public:
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{
css::uno::Sequence< OUString > aSeq(1);
- aSeq[0] = OUString("com.sun.star.frame.SpecialEmbeddedObject");
+ aSeq[0] = "com.sun.star.frame.SpecialEmbeddedObject";
return aSeq;
}
diff --git a/sfx2/source/doc/objembed.cxx b/sfx2/source/doc/objembed.cxx
index 3daaa45be28d..fe7432823882 100644
--- a/sfx2/source/doc/objembed.cxx
+++ b/sfx2/source/doc/objembed.cxx
@@ -164,7 +164,7 @@ void SfxObjectShell::FillTransferableObjectDescriptor( TransferableObjectDescrip
rDesc.mnOle2Misc = GetMiscStatus();
rDesc.maSize = OutputDevice::LogicToLogic( GetVisArea().GetSize(), GetMapUnit(), MAP_100TH_MM );
rDesc.maDragStartPos = Point();
- rDesc.maDisplayName = "";
+ rDesc.maDisplayName.clear();
rDesc.mbCanLink = false;
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index c8993f47d11d..230d19a461b6 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -960,7 +960,7 @@ void SfxObjectShell::InvalidateName()
*/
{
- pImp->aTitle = "";
+ pImp->aTitle.clear();
SetName( GetTitle( SFX_TITLE_APINAME ) );
Broadcast( SfxSimpleHint(SFX_HINT_TITLECHANGED) );
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index b68a09d0086b..532c1702d077 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -128,7 +128,7 @@ public:
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{
css::uno::Sequence< OUString > aSeq(1);
- aSeq[0] = OUString("com.sun.star.frame.SpecialEmbeddedObject");
+ aSeq[0] = "com.sun.star.frame.SpecialEmbeddedObject";
return aSeq;
}
};
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index ebb924bf0359..79fc4e371f3a 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -1970,7 +1970,7 @@ Any SAL_CALL SfxBaseModel::getTransferData( const datatransfer::DataFlavor& aFla
MapUnit aMapUnit = m_pData->m_pObjectShell->GetMapUnit();
aDesc.maSize = OutputDevice::LogicToLogic( aSize, aMapUnit, MAP_100TH_MM );
aDesc.maDragStartPos = Point();
- aDesc.maDisplayName = "";
+ aDesc.maDisplayName.clear();
aDesc.mbCanLink = false;
SvMemoryStream aMemStm( 1024, 1024 );
@@ -2190,54 +2190,53 @@ Sequence< datatransfer::DataFlavor > SAL_CALL SfxBaseModel::getTransferDataFlavo
Sequence< datatransfer::DataFlavor > aFlavorSeq( nSuppFlavors );
aFlavorSeq[0].MimeType =
- OUString( "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"" );
+ "application/x-openoffice-gdimetafile;windows_formatname=\"GDIMetaFile\"";
aFlavorSeq[0].HumanPresentableName = "GDIMetaFile";
aFlavorSeq[0].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
aFlavorSeq[1].MimeType =
- OUString( "application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"" );
+ "application/x-openoffice-highcontrast-gdimetafile;windows_formatname=\"GDIMetaFile\"";
aFlavorSeq[1].HumanPresentableName = "GDIMetaFile";
aFlavorSeq[1].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
aFlavorSeq[2].MimeType =
- OUString( "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" );
+ "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" ;
aFlavorSeq[2].HumanPresentableName = "Enhanced Windows MetaFile";
aFlavorSeq[2].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
aFlavorSeq[3].MimeType =
- OUString( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" );
+ "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"";
aFlavorSeq[3].HumanPresentableName = "Windows MetaFile";
aFlavorSeq[3].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
aFlavorSeq[4].MimeType =
- OUString( "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"" );
+ "application/x-openoffice-objectdescriptor-xml;windows_formatname=\"Star Object Descriptor (XML)\"";
aFlavorSeq[4].HumanPresentableName = "Star Object Descriptor (XML)";
aFlavorSeq[4].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
aFlavorSeq[5].MimeType =
- OUString( "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\"" );
+ "application/x-openoffice-embed-source-xml;windows_formatname=\"Star Embed Source (XML)\"";
aFlavorSeq[5].HumanPresentableName = "Star Embed Source (XML)";
aFlavorSeq[5].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
aFlavorSeq[6].MimeType =
- OUString( "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"" );
+ "application/x-openoffice-bitmap;windows_formatname=\"Bitmap\"";
aFlavorSeq[6].HumanPresentableName = "Bitmap";
aFlavorSeq[6].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
- aFlavorSeq[7].MimeType =
- OUString( "image/png" );
+ aFlavorSeq[7].MimeType = "image/png";
aFlavorSeq[7].HumanPresentableName = "PNG";
aFlavorSeq[7].DataType = getCppuType( (const Sequence< sal_Int8 >*) 0 );
if ( nSuppFlavors == 10 )
{
aFlavorSeq[8].MimeType =
- OUString( "application/x-openoffice-emf;windows_formatname=\"Image EMF\"" );
+ "application/x-openoffice-emf;windows_formatname=\"Image EMF\"";
aFlavorSeq[8].HumanPresentableName = "Enhanced Windows MetaFile";
aFlavorSeq[8].DataType = cppu::UnoType<sal_uInt64>::get();
aFlavorSeq[9].MimeType =
- OUString( "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"" );
+ "application/x-openoffice-wmf;windows_formatname=\"Image WMF\"";
aFlavorSeq[9].HumanPresentableName = "Windows MetaFile";
aFlavorSeq[9].DataType = cppu::UnoType<sal_uInt64>::get();
}
diff --git a/sfx2/source/doc/zoomitem.cxx b/sfx2/source/doc/zoomitem.cxx
index 20c93d81dbd2..7ee923c74ff2 100644
--- a/sfx2/source/doc/zoomitem.cxx
+++ b/sfx2/source/doc/zoomitem.cxx
@@ -114,11 +114,11 @@ bool SvxZoomItem::QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberI
case 0:
{
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aSeq( ZOOM_PARAMS );
- aSeq[0].Name = OUString( ZOOM_PARAM_VALUE );
+ aSeq[0].Name = ZOOM_PARAM_VALUE;
aSeq[0].Value <<= sal_Int32( GetValue() );
- aSeq[1].Name = OUString( ZOOM_PARAM_VALUESET );
+ aSeq[1].Name = ZOOM_PARAM_VALUESET;
aSeq[1].Value <<= sal_Int16( nValueSet );
- aSeq[2].Name = OUString( ZOOM_PARAM_TYPE );
+ aSeq[2].Name = ZOOM_PARAM_TYPE;
aSeq[2].Value <<= sal_Int16( eType );
rVal <<= aSeq;
break;
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index 311faf5fb795..f5c32f396ac6 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -397,7 +397,7 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const uno::Any& rElement, SfxObjectShe
if ( aLibrary == "application" )
aLibrary = SfxGetpApp()->GetName();
else
- aLibrary = "";
+ aLibrary.clear();
pMacro = new SvxMacro( aMacroName, aLibrary, eType );
}
else if ( eType == EXTENDED_STYPE )
@@ -461,7 +461,7 @@ void SfxEvents_Impl::NormalizeMacro( const ::comphelper::NamedValueCollection& i
}
else if ( !aMacroName.isEmpty() )
{
- aScript = OUString( MACRO_PRFIX );
+ aScript = MACRO_PRFIX;
if ( aLibrary != SfxGetpApp()->GetName() && aLibrary != "StarDesktop" && aLibrary != "application" )
aScript += OUString('.');
diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx
index 81981b7652a9..25d15144cdf4 100644
--- a/sfx2/source/notify/globalevents.cxx
+++ b/sfx2/source/notify/globalevents.cxx
@@ -113,7 +113,7 @@ public:
throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
{
css::uno::Sequence< OUString > aSeq(1);
- aSeq[0] = OUString("com.sun.star.frame.GlobalEventBroadcaster");
+ aSeq[0] = "com.sun.star.frame.GlobalEventBroadcaster";
return aSeq;
}
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index 4acbe851528e..adae89ec4b03 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -751,7 +751,7 @@ void Theme::SetupPropertyMaps (void)
maBooleans.resize(__Bool_Rect - __Int_Bool - 1);
maRectangles.resize(__Post_Rect - __Bool_Rect - 1);
- #define AddEntry(e) maPropertyNameToIdMap[OUString(#e)]=e; maPropertyIdToNameMap[e]=OUString(#e)
+ #define AddEntry(e) maPropertyNameToIdMap[OUString(#e)]=e; maPropertyIdToNameMap[e]=#e
AddEntry(Image_Grip);
AddEntry(Image_Expand);