[Libreoffice-commits] core.git: basic/source chart2/source connectivity/source dbaccess/source forms/source framework/source i18npool/source idlc/source include/vcl oox/source package/source sc/source sdext/source sd/inc sd/source starmath/source vcl/inc vcl/source vcl/unx vcl/win xmloff/source

Noel Grandin noel.grandin at collabora.co.uk
Tue May 9 06:29:43 UTC 2017


 basic/source/basmgr/basmgr.cxx                           |    3 -
 basic/source/comp/symtbl.cxx                             |    4 -
 basic/source/inc/symtbl.hxx                              |    3 -
 chart2/source/controller/main/ChartController_Window.cxx |    3 -
 connectivity/source/parse/sqliterator.cxx                |    5 --
 connectivity/source/parse/sqlnode.cxx                    |   13 ++----
 dbaccess/source/ext/macromigration/migrationlog.cxx      |    8 +--
 dbaccess/source/ext/macromigration/migrationlog.hxx      |    3 -
 dbaccess/source/ui/browser/unodatbr.cxx                  |    5 --
 forms/source/misc/limitedformats.cxx                     |    3 -
 framework/source/fwe/classes/addonsoptions.cxx           |   19 ++++----
 framework/source/uielement/toolbarsmenucontroller.cxx    |    9 +---
 i18npool/source/localedata/LocaleNode.cxx                |    5 --
 i18npool/source/localedata/LocaleNode.hxx                |    2 
 idlc/source/astdump.cxx                                  |   23 ++++------
 idlc/source/astenum.cxx                                  |    5 --
 idlc/source/astinterface.cxx                             |    5 --
 idlc/source/aststruct.cxx                                |    9 +---
 include/vcl/configsettings.hxx                           |    2 
 oox/source/drawingml/customshapegeometry.cxx             |   32 ++++++---------
 package/source/zippackage/ZipPackage.cxx                 |    3 -
 sc/source/core/tool/addincol.cxx                         |    3 -
 sc/source/core/tool/unitconv.cxx                         |    3 -
 sc/source/filter/xml/XMLStylesExportHelper.cxx           |    3 -
 sc/source/filter/xml/XMLStylesExportHelper.hxx           |    1 
 sc/source/ui/unoobj/warnpassword.cxx                     |    6 --
 sd/inc/stlpool.hxx                                       |    2 
 sd/source/core/CustomAnimationEffect.cxx                 |    6 --
 sd/source/core/stlpool.cxx                               |    5 --
 sdext/source/minimizer/impoptimizer.cxx                  |    3 -
 starmath/source/dialog.cxx                               |    6 --
 vcl/inc/unx/fontmanager.hxx                              |    2 
 vcl/inc/unx/helper.hxx                                   |    2 
 vcl/source/gdi/configsettings.cxx                        |    5 --
 vcl/unx/generic/dtrans/X11_selection.cxx                 |    5 --
 vcl/unx/generic/dtrans/X11_selection.hxx                 |    2 
 vcl/unx/generic/fontmanager/fontmanager.cxx              |    5 --
 vcl/unx/generic/fontmanager/helper.cxx                   |    5 --
 vcl/win/gdi/salfont.cxx                                  |    3 -
 xmloff/source/draw/ximpshap.cxx                          |    6 --
 xmloff/source/text/txtimp.cxx                            |    3 -
 41 files changed, 98 insertions(+), 142 deletions(-)

New commits:
commit 719a2adfbdac8ce26a035e5fedeeaade8706832d
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Mon May 8 16:12:01 2017 +0200

    remove unnecessary empty OUString fields and vars
    
    Change-Id: I940120087a0bc6b1b0abc30a3e7727ce22b7d9a7
    Reviewed-on: https://gerrit.libreoffice.org/37394
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 0258b268fedb..4acd754113ff 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -555,9 +555,8 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo )
     if( xScriptCont.is() )
     {
         // Register listener for lib container
-        OUString aEmptyLibName;
         uno::Reference< container::XContainerListener > xLibContainerListener
-            = new BasMgrContainerListenerImpl( this, aEmptyLibName );
+            = new BasMgrContainerListenerImpl( this, "" );
 
         uno::Reference< container::XContainer> xLibContainer( xScriptCont, uno::UNO_QUERY );
         xLibContainer->addContainerListener( xLibContainerListener );
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index b7017572e86f..81824a426e68 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -46,10 +46,10 @@ SbiStringPool::SbiStringPool( )
 SbiStringPool::~SbiStringPool()
 {}
 
-const OUString& SbiStringPool::Find( sal_uInt32 n ) const
+OUString SbiStringPool::Find( sal_uInt32 n ) const
 {
     if( n == 0 || n > aData.size() )
-        return aEmpty; //hack, returning a reference to a simulation of null
+        return OUString();
     else
         return aData[n - 1];
 }
diff --git a/basic/source/inc/symtbl.hxx b/basic/source/inc/symtbl.hxx
index f1ba8d0028f3..5ff54d2f87af 100644
--- a/basic/source/inc/symtbl.hxx
+++ b/basic/source/inc/symtbl.hxx
@@ -35,7 +35,6 @@ enum SbiSymScope { SbLOCAL, SbPARAM, SbPUBLIC, SbGLOBAL, SbRTL };
 // makes sure that they don't exist twice.
 
 class SbiStringPool {
-    const OUString aEmpty;
     std::vector<OUString> aData;
 public:
     SbiStringPool();
@@ -43,7 +42,7 @@ public:
     sal_uInt32 GetSize() const { return aData.size(); }
     short Add( const OUString& );
     short Add( double, SbxDataType );
-    const OUString& Find( sal_uInt32 ) const;
+    OUString Find( sal_uInt32 ) const;
 };
 
 
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 2ad50b7cc088..7d42bcff5490 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -131,8 +131,7 @@ void lcl_insertMenuCommand(
     const uno::Reference< awt::XPopupMenu > & xMenu,
     sal_Int16 nId, const OUString & rCommand )
 {
-    static OUString aEmptyString;
-    xMenu->insertItem( nId, aEmptyString, 0, -1 );
+    xMenu->insertItem( nId, "", 0, -1 );
     xMenu->setCommand( nId, rCommand );
 }
 
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 959e0ca4733b..e3bca3b0315f 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -927,12 +927,11 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
             /*&&  traverseSelectColumnNames( pSelectNode->getChild( 3 ) )*/;
     }
 
-    static OUString aEmptyString;
     // nyi: more checks for correct structure!
     if (pSelectNode->getChild(2)->isRule() && SQL_ISPUNCTUATION(pSelectNode->getChild(2)->getChild(0),"*"))
     {
         // SELECT * ...
-        setSelectColumnName(m_aSelectColumns,"*", aEmptyString,aEmptyString);
+        setSelectColumnName(m_aSelectColumns, "*", "", "");
     }
     else if (SQL_ISRULE(pSelectNode->getChild(2),scalar_exp_commalist))
     {
@@ -952,7 +951,7 @@ bool OSQLParseTreeIterator::traverseSelectColumnNames(const OSQLParseNode* pSele
                 // All the table's columns
                 OUString aTableRange;
                 pColumnRef->getChild(0)->parseNodeToStr( aTableRange, m_pImpl->m_xConnection, nullptr, false, false );
-                setSelectColumnName(m_aSelectColumns,"*", aEmptyString,aTableRange);
+                setSelectColumnName(m_aSelectColumns, "*", "", aTableRange);
                 continue;
             }
             else if (SQL_ISRULE(pColumnRef,derived_column))
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index b2f1d43a05d9..a4d89f4e4290 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1031,10 +1031,9 @@ sal_Int16 OSQLParser::buildLikeRule(OSQLParseNode* pAppend, OSQLParseNode*& pLit
 
 OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
 {
-    OUString aEmptyString;
-    OSQLParseNode* pNewNode = new OSQLInternalNode(aEmptyString, SQLNodeType::Rule,OSQLParser::RuleID(OSQLParseNode::set_fct_spec));
+    OSQLParseNode* pNewNode = new OSQLInternalNode("", SQLNodeType::Rule,OSQLParser::RuleID(OSQLParseNode::set_fct_spec));
     pNewNode->append(new OSQLInternalNode("{", SQLNodeType::Punctuation));
-    OSQLParseNode* pDateNode = new OSQLInternalNode(aEmptyString, SQLNodeType::Rule,OSQLParser::RuleID(OSQLParseNode::odbc_fct_spec));
+    OSQLParseNode* pDateNode = new OSQLInternalNode("", SQLNodeType::Rule,OSQLParser::RuleID(OSQLParseNode::odbc_fct_spec));
     pNewNode->append(pDateNode);
     pNewNode->append(new OSQLInternalNode("}", SQLNodeType::Punctuation));
 
@@ -1044,7 +1043,7 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
         {
             Date aDate = DBTypeConversion::toDate(fValue,DBTypeConversion::getNULLDate(m_xFormatter->getNumberFormatsSupplier()));
             OUString aString = DBTypeConversion::toDateString(aDate);
-            pDateNode->append(new OSQLInternalNode(aEmptyString, SQLNodeType::Keyword, SQL_TOKEN_D));
+            pDateNode->append(new OSQLInternalNode("", SQLNodeType::Keyword, SQL_TOKEN_D));
             pDateNode->append(new OSQLInternalNode(aString, SQLNodeType::String));
             break;
         }
@@ -1052,7 +1051,7 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
         {
             css::util::Time aTime = DBTypeConversion::toTime(fValue);
             OUString aString = DBTypeConversion::toTimeString(aTime);
-            pDateNode->append(new OSQLInternalNode(aEmptyString, SQLNodeType::Keyword, SQL_TOKEN_T));
+            pDateNode->append(new OSQLInternalNode("", SQLNodeType::Keyword, SQL_TOKEN_T));
             pDateNode->append(new OSQLInternalNode(aString, SQLNodeType::String));
             break;
         }
@@ -1062,13 +1061,13 @@ OSQLParseNode* OSQLParser::buildNode_Date(const double& fValue, sal_Int32 nType)
             if (aDateTime.Seconds || aDateTime.Minutes || aDateTime.Hours)
             {
                 OUString aString = DBTypeConversion::toDateTimeString(aDateTime);
-                pDateNode->append(new OSQLInternalNode(aEmptyString, SQLNodeType::Keyword, SQL_TOKEN_TS));
+                pDateNode->append(new OSQLInternalNode("", SQLNodeType::Keyword, SQL_TOKEN_TS));
                 pDateNode->append(new OSQLInternalNode(aString, SQLNodeType::String));
             }
             else
             {
                 Date aDate(aDateTime.Day,aDateTime.Month,aDateTime.Year);
-                pDateNode->append(new OSQLInternalNode(aEmptyString, SQLNodeType::Keyword, SQL_TOKEN_D));
+                pDateNode->append(new OSQLInternalNode("", SQLNodeType::Keyword, SQL_TOKEN_D));
                 pDateNode->append(new OSQLInternalNode(DBTypeConversion::toDateString(aDate), SQLNodeType::String));
             }
             break;
diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx
index 4941b4f82a66..b37a9f990124 100644
--- a/dbaccess/source/ext/macromigration/migrationlog.cxx
+++ b/dbaccess/source/ext/macromigration/migrationlog.cxx
@@ -156,16 +156,14 @@ namespace dbmm
         // nothing to do here
     }
 
-    const OUString& MigrationLog::getNewLibraryName( DocumentID _nDocID, ScriptType _eScriptType,
+    OUString MigrationLog::getNewLibraryName( DocumentID _nDocID, ScriptType _eScriptType,
         const OUString& _rOriginalLibName ) const
     {
-        static OUString s_sEmptyString;
-
         DocumentLogs::const_iterator docPos = m_pData->aDocumentLogs.find( _nDocID );
         if ( docPos == m_pData->aDocumentLogs.end() )
         {
             OSL_FAIL( "MigrationLog::getNewLibraryName: document is not known!" );
-            return s_sEmptyString;
+            return OUString();
         }
 
         const DocumentEntry& rDocEntry( docPos->second );
@@ -181,7 +179,7 @@ namespace dbmm
         }
 
         OSL_FAIL( "MigrationLog::getNewLibraryName: doc is known, but library isn't!" );
-        return s_sEmptyString;
+        return OUString();
     }
 
     namespace
diff --git a/dbaccess/source/ext/macromigration/migrationlog.hxx b/dbaccess/source/ext/macromigration/migrationlog.hxx
index 85adba176097..d4e757c4c281 100644
--- a/dbaccess/source/ext/macromigration/migrationlog.hxx
+++ b/dbaccess/source/ext/macromigration/migrationlog.hxx
@@ -83,8 +83,7 @@ namespace dbmm
             <member>movedLibrary</member>. If not, an assertion will be raised in
             the non-product builds, and an empty string will be returned.
         */
-        const OUString&
-                    getNewLibraryName(
+        OUString    getNewLibraryName(
                         DocumentID _nDocID,
                         ScriptType _eScriptType,
                         const OUString& _rOriginalLibName
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index ec132f2eb4df..c57cea8ab205 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -468,9 +468,8 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow()
         if ( invalidColumn )
         {
             // reset the complete order statement at both the row set and the parser
-            const OUString sEmptyOrder;
-            xRowSetProps->setPropertyValue( PROPERTY_ORDER, makeAny( sEmptyOrder ) );
-            xComposer->setOrder( sEmptyOrder );
+            xRowSetProps->setPropertyValue( PROPERTY_ORDER, makeAny( OUString() ) );
+            xComposer->setOrder( "" );
         }
 
         // check if the columns participating in the filter refer to existing tables
diff --git a/forms/source/misc/limitedformats.cxx b/forms/source/misc/limitedformats.cxx
index 461bd8618dfb..06aa1a3a18d6 100644
--- a/forms/source/misc/limitedformats.cxx
+++ b/forms/source/misc/limitedformats.cxx
@@ -56,8 +56,7 @@ namespace frm
     {
         static const Locale s_aEnglishUS( "en", "us", OUString() );
         static const Locale s_aGerman( "de", "DE", OUString() );
-        static const OUString s_sEmptyString;
-        static const Locale s_aSystem( s_sEmptyString, s_sEmptyString, s_sEmptyString );
+        static const Locale s_aSystem( "", "", "" );
 
         switch (_eType)
         {
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index ad82adad4784..96cb03bdbc5f 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -288,7 +288,6 @@ class AddonsOptions_Impl : public ConfigItem
         OUString                                   m_aPropMergeMenuNames[PROPERTYCOUNT_MERGE_MENUBAR];
         OUString                                   m_aPropMergeToolbarNames[PROPERTYCOUNT_MERGE_TOOLBAR];
         OUString                                   m_aPropMergeStatusbarNames[PROPERTYCOUNT_MERGE_STATUSBAR];
-        OUString                                   m_aEmpty;
         OUString                                   m_aPathDelimiter;
         OUString                                   m_aRootAddonPopupMenuURLPrexfix;
         Sequence< Sequence< PropertyValue > >             m_aCachedMenuProperties;
@@ -1078,7 +1077,7 @@ bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence<
             // A popup menu must have a title and can have a URL and ImageIdentifier
             // Set the other property values to empty
             aMenuItem[ OFFSET_MENUITEM_URL              ].Value <<= aPopupMenuURL;
-            aMenuItem[ OFFSET_MENUITEM_TARGET           ].Value <<= m_aEmpty;
+            aMenuItem[ OFFSET_MENUITEM_TARGET           ].Value <<= OUString();
             aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Value <<= aPopupMenuImageId;
             aMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Value = aMenuItemNodePropValues[ OFFSET_MENUITEM_CONTEXT ];
 
@@ -1113,9 +1112,9 @@ bool AddonsOptions_Impl::ReadMenuItem( const OUString& aMenuNodeName, Sequence<
     {
         // Separator
         aMenuItem[ OFFSET_MENUITEM_URL              ].Value <<= aStrValue;
-        aMenuItem[ OFFSET_MENUITEM_TARGET           ].Value <<= m_aEmpty;
-        aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Value <<= m_aEmpty;
-        aMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Value <<= m_aEmpty;
+        aMenuItem[ OFFSET_MENUITEM_TARGET           ].Value <<= OUString();
+        aMenuItem[ OFFSET_MENUITEM_IMAGEIDENTIFIER  ].Value <<= OUString();
+        aMenuItem[ OFFSET_MENUITEM_CONTEXT          ].Value <<= OUString();
         aMenuItem[ OFFSET_MENUITEM_SUBMENU          ].Value <<= Sequence< Sequence< PropertyValue > >(); // Submenu set!
         bResult = true;
     }
@@ -1194,11 +1193,11 @@ bool AddonsOptions_Impl::ReadToolBarItem( const OUString& aToolBarItemNodeName,
         {
             // A separator toolbar item only needs a URL
             aToolBarItem[ OFFSET_TOOLBARITEM_URL                ].Value <<= aURL;
-            aToolBarItem[ OFFSET_TOOLBARITEM_TITLE              ].Value <<= m_aEmpty;
-            aToolBarItem[ OFFSET_TOOLBARITEM_TARGET             ].Value <<= m_aEmpty;
-            aToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER    ].Value <<= m_aEmpty;
-            aToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT            ].Value <<= m_aEmpty;
-            aToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE        ].Value <<= m_aEmpty;
+            aToolBarItem[ OFFSET_TOOLBARITEM_TITLE              ].Value <<= OUString();
+            aToolBarItem[ OFFSET_TOOLBARITEM_TARGET             ].Value <<= OUString();
+            aToolBarItem[ OFFSET_TOOLBARITEM_IMAGEIDENTIFIER    ].Value <<= OUString();
+            aToolBarItem[ OFFSET_TOOLBARITEM_CONTEXT            ].Value <<= OUString();
+            aToolBarItem[ OFFSET_TOOLBARITEM_CONTROLTYPE        ].Value <<= OUString();
             aToolBarItem[ OFFSET_TOOLBARITEM_WIDTH              ].Value <<= sal_Int32( 0 );
 
             bResult = true;
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx
index 88c527669710..2f5805ddc0ca 100644
--- a/framework/source/uielement/toolbarsmenucontroller.cxx
+++ b/framework/source/uielement/toolbarsmenucontroller.cxx
@@ -286,7 +286,6 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
     m_aCommandVector.clear();
 
     // Retrieve layout manager for additional information
-    OUString aEmptyString;
     Reference< XLayoutManager > xLayoutManager( getLayoutManagerFromFrame( m_xFrame ));
 
     m_bResetActive = false;
@@ -414,11 +413,11 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
         {
             if ( m_aModuleIdentifier == "com.sun.star.drawing.DrawingDocument" ||
                  m_aModuleIdentifier == "com.sun.star.presentation.PresentationDocument" )
-                addCommand( m_xPopupMenu, ".uno:ColorControl", aEmptyString );
+                addCommand( m_xPopupMenu, ".uno:ColorControl", "" );
             else if ( m_aModuleIdentifier == "com.sun.star.sheet.SpreadsheetDocument" )
-                addCommand( m_xPopupMenu, ".uno:InputLineVisible", aEmptyString );
+                addCommand( m_xPopupMenu, ".uno:InputLineVisible", "" );
             else
-                addCommand( m_xPopupMenu, ".uno:InsertFormula", aEmptyString );
+                addCommand( m_xPopupMenu, ".uno:InsertFormula", "" );
         }
 
         bool          bAddCommand( true );
@@ -441,7 +440,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r
                 m_xPopupMenu->insertSeparator( nItemCount+1 );
             }
 
-            addCommand( m_xPopupMenu, aConfigureToolbar, aEmptyString );
+            addCommand( m_xPopupMenu, aConfigureToolbar, "" );
         }
 
         // Add separator if no configure has been added
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index eaf50e0c2759..0fba9c6f5d99 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -2390,13 +2390,12 @@ Attr::Attr (const Reference< XAttributeList > & attr) {
     }
 }
 
-const OUString& Attr::getValueByName (const sal_Char *str) const {
-    static OUString empty;
+OUString Attr::getValueByName (const sal_Char *str) const {
     sal_Int32 len = name.getLength();
     for (sal_Int32 i = 0;i<len;i++)
         if (name[i].equalsAscii(str))
             return value[i];
-    return empty;
+    return OUString();
 }
 
 sal_Int32 Attr::getLength() const{
diff --git a/i18npool/source/localedata/LocaleNode.hxx b/i18npool/source/localedata/LocaleNode.hxx
index 31f7c95d9d57..b64bdbb4ba0d 100644
--- a/i18npool/source/localedata/LocaleNode.hxx
+++ b/i18npool/source/localedata/LocaleNode.hxx
@@ -72,7 +72,7 @@ class Attr {
 
 public:
     explicit Attr (const Reference< XAttributeList > & attr);
-    const OUString& getValueByName (const sal_Char *str) const;
+    OUString getValueByName (const sal_Char *str) const;
     sal_Int32 getLength() const;
     const OUString& getTypeByIndex (sal_Int32 idx) const;
     const OUString& getValueByIndex (sal_Int32 idx) const ;
diff --git a/idlc/source/astdump.cxx b/idlc/source/astdump.cxx
index 4847b4fc0669..5b12b08817a9 100644
--- a/idlc/source/astdump.cxx
+++ b/idlc/source/astdump.cxx
@@ -36,7 +36,6 @@
 
 bool AstModule::dump(RegistryKey& rKey)
 {
-    OUString emptyStr;
     RegistryKey localKey;
     if ( getNodeType() == NT_root )
     {
@@ -62,7 +61,7 @@ bool AstModule::dump(RegistryKey& rKey)
 
         typereg::Writer aBlob(
             m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
-            getDocumentation(), emptyStr, typeClass,
+            getDocumentation(), "", typeClass,
             m_bPublished,
             OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0,
             nConst, 0, 0);
@@ -86,7 +85,7 @@ bool AstModule::dump(RegistryKey& rKey)
         sal_uInt32 aBlobSize;
         void const * pBlob = aBlob.getBlob(&aBlobSize);
 
-        if (localKey.setValue(emptyStr, RegValueType::BINARY,
+        if (localKey.setValue("", RegValueType::BINARY,
                                 const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
         {
             fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
@@ -102,7 +101,7 @@ bool AstModule::dump(RegistryKey& rKey)
 
         typereg::Writer aBlob(
             m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
-            getDocumentation(), emptyStr, typeClass, m_bPublished,
+            getDocumentation(), "", typeClass, m_bPublished,
             OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0, 0, 0,
             0);
 
@@ -111,7 +110,7 @@ bool AstModule::dump(RegistryKey& rKey)
 
         if ( getNodeType() != NT_root )
         {
-            if (localKey.setValue(emptyStr, RegValueType::BINARY,
+            if (localKey.setValue("", RegValueType::BINARY,
                                     const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
             {
                 fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
@@ -130,7 +129,6 @@ bool AstModule::dump(RegistryKey& rKey)
 
 bool AstTypeDef::dump(RegistryKey& rKey)
 {
-    OUString emptyStr;
     RegistryKey localKey;
     if (rKey.createKey( OStringToOUString(getFullName(), RTL_TEXTENCODING_UTF8 ), localKey) != RegError::NO_ERROR)
     {
@@ -142,7 +140,7 @@ bool AstTypeDef::dump(RegistryKey& rKey)
 
     typereg::Writer aBlob(
         m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
-        getDocumentation(), emptyStr, RT_TYPE_TYPEDEF, m_bPublished,
+        getDocumentation(), "", RT_TYPE_TYPEDEF, m_bPublished,
         OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 1, 0, 0, 0);
     aBlob.setSuperTypeName(
         0,
@@ -152,7 +150,7 @@ bool AstTypeDef::dump(RegistryKey& rKey)
     sal_uInt32 aBlobSize;
     void const * pBlob = aBlob.getBlob(&aBlobSize);
 
-    if (localKey.setValue(emptyStr, RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
+    if (localKey.setValue("", RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
     {
         fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
                 idlc()->getOptions()->getProgramName().getStr(),
@@ -165,7 +163,6 @@ bool AstTypeDef::dump(RegistryKey& rKey)
 
 bool AstService::dump(RegistryKey& rKey)
 {
-    OUString emptyStr;
     typereg_Version version = m_bPublished
         ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0;
     OString superName;
@@ -230,7 +227,7 @@ bool AstService::dump(RegistryKey& rKey)
         return false;
     }
     typereg::Writer writer(
-        version, getDocumentation(), emptyStr,
+        version, getDocumentation(), "",
         getNodeType() == NT_singleton ? RT_TYPE_SINGLETON : RT_TYPE_SERVICE,
         m_bPublished,
         OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8),
@@ -303,14 +300,14 @@ bool AstService::dump(RegistryKey& rKey)
     }
     if (m_defaultConstructor) {
         writer.setMethodData(
-            constructorIndex++, emptyStr, RTMethodMode::TWOWAY,
-            emptyStr, "void",
+            constructorIndex++, "", RTMethodMode::TWOWAY,
+            "", "void",
             0, 0);
     }
     sal_uInt32 size;
     void const * blob = writer.getBlob(&size);
     if (localKey.setValue(
-            emptyStr, RegValueType::BINARY, const_cast< void * >(blob),
+            "", RegValueType::BINARY, const_cast< void * >(blob),
             size) != RegError::NO_ERROR)
     {
         fprintf(
diff --git a/idlc/source/astenum.cxx b/idlc/source/astenum.cxx
index ece9609a88d2..69fb0c7bfd89 100644
--- a/idlc/source/astenum.cxx
+++ b/idlc/source/astenum.cxx
@@ -66,13 +66,12 @@ bool AstEnum::dump(RegistryKey& rKey)
         return false;
     }
 
-    OUString emptyStr;
     sal_uInt16 nConst = getNodeCount(NT_enum_val);
     if ( nConst > 0 )
     {
         typereg::Writer aBlob(
             m_bPublished ? TYPEREG_VERSION_1 : TYPEREG_VERSION_0,
-            getDocumentation(), emptyStr, RT_TYPE_ENUM, m_bPublished,
+            getDocumentation(), "", RT_TYPE_ENUM, m_bPublished,
             OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), 0,
             nConst, 0, 0);
 
@@ -91,7 +90,7 @@ bool AstEnum::dump(RegistryKey& rKey)
         sal_uInt32 aBlobSize;
         void const * pBlob = aBlob.getBlob(&aBlobSize);
 
-        if (localKey.setValue(emptyStr, RegValueType::BINARY,
+        if (localKey.setValue("", RegValueType::BINARY,
                                 const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
         {
             fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
diff --git a/idlc/source/astinterface.cxx b/idlc/source/astinterface.cxx
index 8add687cc0be..90e5c060ece4 100644
--- a/idlc/source/astinterface.cxx
+++ b/idlc/source/astinterface.cxx
@@ -191,9 +191,8 @@ bool AstInterface::dump(RegistryKey& rKey)
         }
     }
 
-    OUString emptyStr;
     typereg::Writer aBlob(
-        version, getDocumentation(), emptyStr, RT_TYPE_INTERFACE, m_bPublished,
+        version, getDocumentation(), "", RT_TYPE_INTERFACE, m_bPublished,
         OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8), nBaseTypes,
         nAttributes, nMethods, nReferences);
 
@@ -242,7 +241,7 @@ bool AstInterface::dump(RegistryKey& rKey)
     sal_uInt32 aBlobSize;
     void const * pBlob = aBlob.getBlob(&aBlobSize);
 
-    if (localKey.setValue(emptyStr, RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
+    if (localKey.setValue("", RegValueType::BINARY, const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
     {
         fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
                 idlc()->getOptions()->getProgramName().getStr(),
diff --git a/idlc/source/aststruct.cxx b/idlc/source/aststruct.cxx
index 5245f06c90f8..8b683d085f23 100644
--- a/idlc/source/aststruct.cxx
+++ b/idlc/source/aststruct.cxx
@@ -102,11 +102,10 @@ bool AstStruct::dump(RegistryKey& rKey)
     if ( getNodeType() == NT_exception )
         typeClass = RT_TYPE_EXCEPTION;
 
-    OUString emptyStr;
     typereg::Writer aBlob(
         (m_typeParameters.empty() && !m_bPublished
          ? TYPEREG_VERSION_0 : TYPEREG_VERSION_1),
-        getDocumentation(), emptyStr, typeClass, m_bPublished,
+        getDocumentation(), "", typeClass, m_bPublished,
         OStringToOUString(getRelativName(), RTL_TEXTENCODING_UTF8),
         m_pBaseType == nullptr ? 0 : 1, nMember, 0,
         static_cast< sal_uInt16 >(m_typeParameters.size()));
@@ -138,7 +137,7 @@ bool AstStruct::dump(RegistryKey& rKey)
                     typeName = pMember->getType()->getRelativName();
                 }
                 aBlob.setFieldData(
-                    index++, pMember->getDocumentation(), emptyStr, flags,
+                    index++, pMember->getDocumentation(), "", flags,
                     OStringToOUString(
                         pMember->getLocalName(), RTL_TEXTENCODING_UTF8),
                     OStringToOUString(typeName, RTL_TEXTENCODING_UTF8),
@@ -153,7 +152,7 @@ bool AstStruct::dump(RegistryKey& rKey)
          i != m_typeParameters.end(); ++i)
     {
         aBlob.setReferenceData(
-            index++, emptyStr, RTReferenceType::TYPE_PARAMETER, RTFieldAccess::INVALID,
+            index++, "", RTReferenceType::TYPE_PARAMETER, RTFieldAccess::INVALID,
             OStringToOUString(
                 (*i)->getLocalName(), RTL_TEXTENCODING_UTF8));
     }
@@ -161,7 +160,7 @@ bool AstStruct::dump(RegistryKey& rKey)
     sal_uInt32 aBlobSize;
     void const * pBlob = aBlob.getBlob(&aBlobSize);
 
-    if (localKey.setValue(emptyStr, RegValueType::BINARY,
+    if (localKey.setValue("", RegValueType::BINARY,
                             const_cast<RegValue>(pBlob), aBlobSize) != RegError::NO_ERROR)
     {
         fprintf(stderr, "%s: warning, could not set value of key \"%s\" in %s\n",
diff --git a/include/vcl/configsettings.hxx b/include/vcl/configsettings.hxx
index b58692e6acde..39824188b9b9 100644
--- a/include/vcl/configsettings.hxx
+++ b/include/vcl/configsettings.hxx
@@ -51,7 +51,7 @@ namespace vcl
 
         static SettingsConfigItem* get();
 
-        const OUString& getValue( const OUString& rGroup, const OUString& rKey ) const;
+        OUString getValue( const OUString& rGroup, const OUString& rKey ) const;
         void setValue( const OUString& rGroup, const OUString& rKey, const OUString& rValue );
 
     };
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 43de3ddebc19..4f515fd2ab65 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -653,30 +653,29 @@ XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler2Helper& rParent, co
 , mrAdjustHandle( rAdjustHandle )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
-    const OUString aEmptyDefault;
     if ( rAttribs.hasAttribute( XML_gdRefX ) )
     {
-        mrAdjustHandle.gdRef1 = GetGeomGuideName( rAttribs.getString( XML_gdRefX, aEmptyDefault ) );
+        mrAdjustHandle.gdRef1 = GetGeomGuideName( rAttribs.getString( XML_gdRefX, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_minX ) )
     {
-        mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minX, aEmptyDefault ) );
+        mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minX, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_maxX ) )
     {
-        mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxX, aEmptyDefault ) );
+        mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxX, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_gdRefY ) )
     {
-        mrAdjustHandle.gdRef2 = GetGeomGuideName( rAttribs.getString( XML_gdRefY, aEmptyDefault ) );
+        mrAdjustHandle.gdRef2 = GetGeomGuideName( rAttribs.getString( XML_gdRefY, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_minY ) )
     {
-        mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minY, aEmptyDefault ) );
+        mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minY, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_maxY ) )
     {
-        mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxY, aEmptyDefault ) );
+        mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxY, "" ) );
     }
 }
 
@@ -704,32 +703,31 @@ PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler2Helper& rPare
 , mrAdjustHandle( rAdjustHandle )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
-    const OUString aEmptyDefault;
     if ( rAttribs.hasAttribute( XML_gdRefR ) )
     {
         mrAdjustHandle.polar = true ;
-        mrAdjustHandle.gdRef1 = GetGeomGuideName( rAttribs.getString( XML_gdRefR, aEmptyDefault ) );
+        mrAdjustHandle.gdRef1 = GetGeomGuideName( rAttribs.getString( XML_gdRefR, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_minR ) )
     {
-        mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minR, aEmptyDefault ) );
+        mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minR, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_maxR ) )
     {
-        mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxR, aEmptyDefault ) );
+        mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxR, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_gdRefAng ) )
     {
         mrAdjustHandle.polar = true ;
-        mrAdjustHandle.gdRef2 = GetGeomGuideName( rAttribs.getString( XML_gdRefAng, aEmptyDefault ) );
+        mrAdjustHandle.gdRef2 = GetGeomGuideName( rAttribs.getString( XML_gdRefAng, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_minAng ) )
     {
-        mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minAng, aEmptyDefault ) );
+        mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minAng, "" ) );
     }
     if ( rAttribs.hasAttribute( XML_maxAng ) )
     {
-        mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxAng, aEmptyDefault ) );
+        mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxAng, "" ) );
     }
 }
 
@@ -947,10 +945,8 @@ Path2DContext::Path2DContext( ContextHandler2Helper& rParent, const AttributeLis
 , mrSegments( rSegments )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
-    const OUString aEmptyString;
-
-    rPath2D.w = rAttribs.getString( XML_w, aEmptyString ).toInt64();
-    rPath2D.h = rAttribs.getString( XML_h, aEmptyString ).toInt64();
+    rPath2D.w = rAttribs.getString( XML_w, "" ).toInt64();
+    rPath2D.h = rAttribs.getString( XML_h, "" ).toInt64();
     rPath2D.fill = rAttribs.getToken( XML_fill, XML_norm );
     rPath2D.stroke = rAttribs.getBool( XML_stroke, true );
     rPath2D.extrusionOk = rAttribs.getBool( XML_extrusionOk, true );
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index cb87074658be..17d5adf52d81 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -1228,8 +1228,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
             RandomPool aRandomPool;
 
             // call saveContents ( it will recursively save sub-directories
-            OUString aEmptyString;
-            m_xRootFolder->saveContents(aEmptyString, aManList, aZipOut, GetEncryptionKey(), aRandomPool.get());
+            m_xRootFolder->saveContents("", aManList, aZipOut, GetEncryptionKey(), aRandomPool.get());
         }
 
         if( m_nFormat == embed::StorageFormats::PACKAGE )
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index c25bb8a6061b..d4041aa40656 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -365,8 +365,7 @@ void ScUnoAddInCollection::ReadConfiguration()
     const OUString sSlash('/');
 
     // get the list of add-ins (services)
-    OUString aEmptyString;
-    uno::Sequence<OUString> aServiceNames = rAddInConfig.GetNodeNames( aEmptyString );
+    uno::Sequence<OUString> aServiceNames = rAddInConfig.GetNodeNames( "" );
 
     sal_Int32 nServiceCount = aServiceNames.getLength();
     for ( sal_Int32 nService = 0; nService < nServiceCount; nService++ )
diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx
index 0868ef58bb82..f40dc116d79e 100644
--- a/sc/source/core/tool/unitconv.cxx
+++ b/sc/source/core/tool/unitconv.cxx
@@ -63,8 +63,7 @@ ScUnitConverter::ScUnitConverter()
     ScLinkConfigItem aConfigItem( CFGPATH_UNIT );
 
     // empty node name -> use the config item's path itself
-    OUString aEmptyString;
-    Sequence<OUString> aNodeNames = aConfigItem.GetNodeNames( aEmptyString );
+    Sequence<OUString> aNodeNames = aConfigItem.GetNodeNames( "" );
 
     long nNodeCount = aNodeNames.getLength();
     if ( nNodeCount )
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index 5d501c8426cc..a9d0464a82d8 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -82,7 +82,6 @@ bool ScMyValidation::IsEqual(const ScMyValidation& aVal) const
 
 ScMyValidationsContainer::ScMyValidationsContainer()
     : aValidationVec(),
-    sEmptyString(),
     sERRALSTY(SC_UNONAME_ERRALSTY),
     sIGNOREBL(SC_UNONAME_IGNOREBL),
     sSHOWLIST(SC_UNONAME_SHOWLIST),
@@ -417,7 +416,7 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport)
                             pArr[0].Name = "EventType";
                             pArr[0].Value <<= bScriptURL ? sScript : OUString("StarBasic");
                             pArr[1].Name = "Library";
-                            pArr[1].Value <<= sEmptyString;
+                            pArr[1].Value <<= OUString();
                             pArr[2].Name = bScriptURL ? sScript : OUString("MacroName");
                             pArr[2].Value <<= aItr->sErrorTitle;
 
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.hxx b/sc/source/filter/xml/XMLStylesExportHelper.hxx
index 67362125e7d2..82f46ff4eb70 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.hxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.hxx
@@ -66,7 +66,6 @@ class ScMyValidationsContainer
 {
 private:
     ScMyValidationVec      aValidationVec;
-    const OUString         sEmptyString;
     const OUString         sERRALSTY;
     const OUString         sIGNOREBL;
     const OUString         sSHOWLIST;
diff --git a/sc/source/ui/unoobj/warnpassword.cxx b/sc/source/ui/unoobj/warnpassword.cxx
index c69303137f6d..6e1583df4506 100644
--- a/sc/source/ui/unoobj/warnpassword.cxx
+++ b/sc/source/ui/unoobj/warnpassword.cxx
@@ -42,12 +42,10 @@ bool ScWarnPassword::WarningOnPassword( SfxMedium& rMedium )
     Reference< XInteractionHandler > xHandler( rMedium.GetInteractionHandler());
     if( xHandler.is() )
     {
-
-        OUString empty;
-        Any aException( makeAny(InteractiveAppException(empty,
+        Any aException( makeAny(InteractiveAppException("",
                 Reference <XInterface> (),
                 InteractionClassification_QUERY,
-                 ERRCODE_SVX_EXPORT_FILTER_CRYPT)));
+                ERRCODE_SVX_EXPORT_FILTER_CRYPT)));
 
         rtl::Reference< ucbhelper::SimpleInteractionRequest > xRequest
                     = new ucbhelper::SimpleInteractionRequest(
diff --git a/sd/inc/stlpool.hxx b/sd/inc/stlpool.hxx
index 4447ee7f31af..dd412963bd84 100644
--- a/sd/inc/stlpool.hxx
+++ b/sd/inc/stlpool.hxx
@@ -124,7 +124,7 @@ public:
 protected:
     void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily );
     void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, SdStyleSheetVector& rCreatedSheets );
-    void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, SdStyleSheetVector& rCreatedSheets, OUString &rRenameSuffix );
+    void CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, SdStyleSheetVector& rCreatedSheets, const OUString &rRenameSuffix );
 
     virtual SfxStyleSheetBase* Create(const OUString& rName, SfxStyleFamily eFamily, sal_uInt16 nMask) override;
 
diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx
index 86e7fd18bfb1..cc78e33da1b0 100644
--- a/sd/source/core/CustomAnimationEffect.cxx
+++ b/sd/source/core/CustomAnimationEffect.cxx
@@ -1643,8 +1643,7 @@ CustomAnimationEffectPtr EffectSequenceHelper::append( const CustomAnimationPres
 
     if( pPreset.get() )
     {
-        OUString strEmpty;
-        Reference< XAnimationNode > xNode( pPreset->create( strEmpty ) );
+        Reference< XAnimationNode > xNode( pPreset->create( "" ) );
         if( xNode.is() )
         {
             // first, filter all only ui relevant user data
@@ -1776,8 +1775,7 @@ void EffectSequenceHelper::replace( const CustomAnimationEffectPtr& pEffect, con
 
 void EffectSequenceHelper::replace( const CustomAnimationEffectPtr& pEffect, const CustomAnimationPresetPtr& pPreset, double fDuration /* = -1.0 */ )
 {
-    OUString strEmpty;
-    replace( pEffect, pPreset, strEmpty, fDuration );
+    replace( pEffect, pPreset, "", fDuration );
 }
 
 void EffectSequenceHelper::remove( const CustomAnimationEffectPtr& pEffect )
diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index 64e894c97cb5..624f329ca45d 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -605,8 +605,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
 
 void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, SdStyleSheetVector& rCreatedSheets)
 {
-    OUString emptyName;
-    CopySheets(rSourcePool, eFamily, rCreatedSheets, emptyName);
+    CopySheets(rSourcePool, eFamily, rCreatedSheets, "");
 }
 
 namespace
@@ -626,7 +625,7 @@ struct HasFamilyPredicate : svl::StyleSheetPredicate
 
 }
 
-void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, SdStyleSheetVector& rCreatedSheets, OUString& rRenameSuffix)
+void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily eFamily, SdStyleSheetVector& rCreatedSheets, const OUString& rRenameSuffix)
 {
     std::vector< std::pair< rtl::Reference< SfxStyleSheetBase >, OUString > > aNewStyles;
     std::vector< std::pair< OUString, OUString > > aRenamedList;
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index 41d5250370c8..cd3e5815242b 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -418,9 +418,8 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
                         {
                             if ( aGraphicUserIter->mxShape.is() )
                             {
-                                OUString sEmptyGraphicURL;
                                 Reference< XPropertySet > xShapePropertySet( aGraphicUserIter->mxShape, UNO_QUERY_THROW );
-                                xShapePropertySet->setPropertyValue( "GraphicURL", Any( sEmptyGraphicURL ) );
+                                xShapePropertySet->setPropertyValue( "GraphicURL", Any( OUString() ) );
                                 xShapePropertySet->setPropertyValue( "Graphic", Any( xNewGraphic ) );
 
                                 if ( aGraphicUserIter->maGraphicCropLogic.Left || aGraphicUserIter->maGraphicCropLogic.Top
diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx
index b0252455b2f7..868254f60d79 100644
--- a/starmath/source/dialog.cxx
+++ b/starmath/source/dialog.cxx
@@ -736,10 +736,8 @@ IMPL_LINK( SmDistanceDialog, CheckBoxClickHdl, Button *, pCheckBox, void )
 
 void SmDistanceDialog::SetHelpId(MetricField &rField, const OString& sHelpId)
 {
-    const OUString aEmptyText;
-
     rField.SetHelpId(sHelpId);
-    rField.SetHelpText(aEmptyText);
+    rField.SetHelpText("");
 
     // since MetricField inherits from SpinField which has a sub Edit field
     // (which is actually the one we modify) we have to set the help-id
@@ -748,7 +746,7 @@ void SmDistanceDialog::SetHelpId(MetricField &rField, const OString& sHelpId)
     if (pSubEdit)
     {
         pSubEdit->SetHelpId(sHelpId);
-        pSubEdit->SetHelpText(aEmptyText);
+        pSubEdit->SetHelpText("");
     }
 }
 
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index 521ac458d5a7..2e89c5f655be 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -240,7 +240,7 @@ public:
     // routines to get font info in small pieces
 
     // get a specific fonts PSName name
-    const OUString& getPSName( fontID nFontID ) const;
+    OUString getPSName( fontID nFontID ) const;
 
     // get a specific fonts italic type
     FontItalic getFontItalic( fontID nFontID ) const
diff --git a/vcl/inc/unx/helper.hxx b/vcl/inc/unx/helper.hxx
index a5f475e099e1..ce4f10876ec7 100644
--- a/vcl/inc/unx/helper.hxx
+++ b/vcl/inc/unx/helper.hxx
@@ -47,7 +47,7 @@ void splitPath( OString& rOrgPath, OString& rDir, OString& rBase );
 
 enum class whichOfficePath { InstallationRootPath, UserPath, ConfigPath };
 
-OUString const & getOfficePath( whichOfficePath ePath );
+OUString getOfficePath( whichOfficePath ePath );
 
 } // namespace
 
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index ab5348a59c5d..fe9c69c1c7a0 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -120,13 +120,12 @@ void SettingsConfigItem::getValues()
     }
 }
 
-const OUString& SettingsConfigItem::getValue( const OUString& rGroup, const OUString& rKey ) const
+OUString SettingsConfigItem::getValue( const OUString& rGroup, const OUString& rKey ) const
 {
     std::unordered_map< OUString, SmallOUStrMap, OUStringHash >::const_iterator group = m_aSettings.find( rGroup );
     if( group == m_aSettings.end() || group->second.find( rKey ) == group->second.end() )
     {
-        static OUString aEmpty;
-        return aEmpty;
+        return OUString();
     }
     return group->second.find(rKey)->second;
 }
diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx
index dff6aa2127c0..10045e76b144 100644
--- a/vcl/unx/generic/dtrans/X11_selection.cxx
+++ b/vcl/unx/generic/dtrans/X11_selection.cxx
@@ -689,16 +689,15 @@ SelectionManager& SelectionManager::get( const OUString& rDisplayName )
     return *pInstance;
 }
 
-const OUString& SelectionManager::getString( Atom aAtom )
+OUString SelectionManager::getString( Atom aAtom )
 {
     osl::MutexGuard aGuard(m_aMutex);
 
     if( m_aAtomToString.find( aAtom ) == m_aAtomToString.end() )
     {
-        static OUString aEmpty;
         char* pAtom = m_pDisplay ? XGetAtomName( m_pDisplay, aAtom ) : nullptr;
         if( ! pAtom )
-            return aEmpty;
+            return OUString();
         OUString aString( OStringToOUString( pAtom, RTL_TEXTENCODING_ISO_8859_1 ) );
         XFree( pAtom );
         m_aStringToAtom[ aString ] = aAtom;
diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx
index 516c9dc6c8f8..550e24a31a9f 100644
--- a/vcl/unx/generic/dtrans/X11_selection.hxx
+++ b/vcl/unx/generic/dtrans/X11_selection.hxx
@@ -433,7 +433,7 @@ namespace x11 {
         osl::Mutex& getMutex() { return m_aMutex; }
 
         Atom getAtom( const OUString& rString );
-        const OUString& getString( Atom nAtom );
+        OUString getString( Atom nAtom );
 
         // type conversion
         // note: convertTypeToNative does NOT clear the list, so you can append
diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx
index d9c78fcb408b..2b961e58fa06 100644
--- a/vcl/unx/generic/fontmanager/fontmanager.cxx
+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx
@@ -947,16 +947,15 @@ OString PrintFontManager::getFontFile(const PrintFont* pFont) const
     return aPath;
 }
 
-const OUString& PrintFontManager::getPSName( fontID nFontID ) const
+OUString PrintFontManager::getPSName( fontID nFontID ) const
 {
-    static OUString aEmpty;
     PrintFont* pFont = getFont( nFontID );
     if (pFont && pFont->m_aPSName.isEmpty())
     {
         analyzeSfntFile(pFont);
     }
 
-    return pFont ? pFont->m_aPSName : aEmpty;
+    return pFont ? pFont->m_aPSName : OUString();
 }
 
 int PrintFontManager::getFontAscend( fontID nFontID ) const
diff --git a/vcl/unx/generic/fontmanager/helper.cxx b/vcl/unx/generic/fontmanager/helper.cxx
index 0377ead5a0c4..0c8ba1e33003 100644
--- a/vcl/unx/generic/fontmanager/helper.cxx
+++ b/vcl/unx/generic/fontmanager/helper.cxx
@@ -37,12 +37,11 @@ using ::rtl::Bootstrap;
 
 namespace psp {
 
-OUString const & getOfficePath( whichOfficePath ePath )
+OUString getOfficePath( whichOfficePath ePath )
 {
     static OUString aInstallationRootPath;
     static OUString aUserPath;
     static OUString aConfigPath;
-    static OUString aEmpty;
     static bool bOnce = false;
 
     if( ! bOnce )
@@ -86,7 +85,7 @@ OUString const & getOfficePath( whichOfficePath ePath )
         case whichOfficePath::InstallationRootPath: return aInstallationRootPath;
         case whichOfficePath::UserPath: return aUserPath;
     }
-    return aEmpty;
+    return OUString();
 }
 
 static OString getEnvironmentPath( const char* pKey )
diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx
index 97a7384da70e..942898364291 100644
--- a/vcl/win/gdi/salfont.cxx
+++ b/vcl/win/gdi/salfont.cxx
@@ -1285,14 +1285,13 @@ void WinSalGraphics::GetDevFontList( PhysicalFontCollection* pFontCollection )
         if( rcOSL == osl::FileBase::E_None )
         {
             osl::DirectoryItem aDirItem;
-            OUString aEmptyString;
 
             while( aFontDir.getNextItem( aDirItem, 10 ) == osl::FileBase::E_None )
             {
                 osl::FileStatus aFileStatus( osl_FileStatus_Mask_FileURL );
                 rcOSL = aDirItem.getFileStatus( aFileStatus );
                 if ( rcOSL == osl::FileBase::E_None )
-                    AddTempDevFont( pFontCollection, aFileStatus.getFileURL(), aEmptyString );
+                    AddTempDevFont( pFontCollection, aFileStatus.getFileURL(), "" );
             }
         }
     }
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index 19bdfbf08b5a..c94a9dcc6191 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -1615,8 +1615,7 @@ void SdXMLTextBoxShapeContext::StartElement(const uno::Reference< xml::sax::XAtt
         if( bClearText )
         {
             uno::Reference< text::XText > xText( mxShape, uno::UNO_QUERY );
-            OUString aEmpty;
-            xText->setString( aEmpty );
+            xText->setString( "" );
         }
 
         // set parameters on shape
@@ -3795,8 +3794,7 @@ void SdXMLCustomShapeContext::EndElement()
                 Reference< drawing::XEnhancedCustomShapeDefaulter > xDefaulter( mxShape, UNO_QUERY );
                 if( xDefaulter.is() )
                 {
-                    OUString aEmptyType;
-                    xDefaulter->createCustomShapeDefaults( aEmptyType );
+                    xDefaulter->createCustomShapeDefaults( "" );
                 }
             }
         }
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 5646ce4192ab..2f248359b58f 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1830,11 +1830,10 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
                      !bOutlineStyleCandidate &&
                      m_xImpl->m_xChapterNumbering.is())
                 {
-                    OUString sEmptyStr;
                     if ( !lcl_HasListStyle( sStyleName,
                                     m_xImpl->m_xParaStyles, GetXMLImport(),
                                     "NumberingStyleName",
-                                    sEmptyStr ) )
+                                    "" ) )
                     {
                         // heading not in a list --> apply outline style
                         xPropSet->setPropertyValue( s_NumberingRules,


More information about the Libreoffice-commits mailing list