[Libreoffice-commits] core.git: 31 commits - basctl/source basic/source chart2/source connectivity/source cui/source dbaccess/source desktop/source editeng/qa editeng/source extensions/source filter/source forms/source formula/source framework/source io/source jvmfwk/source scripting/source sc/source sdext/source sd/source sfx2/source starmath/qa stoc/source svtools/source svx/source sw/qa sw/source ucb/source unotools/source unoxml/source vcl/source writerfilter/source xmloff/source

Stephan Bergmann sbergman at redhat.com
Thu Jul 13 09:49:02 UTC 2017


 basctl/source/basicide/baside3.cxx                                                 |    3 -
 basctl/source/basicide/localizationmgr.cxx                                         |    3 -
 basctl/source/basicide/macrodlg.cxx                                                |    3 -
 basctl/source/basicide/moduldlg.cxx                                                |    3 -
 basic/source/classes/sb.cxx                                                        |    3 -
 basic/source/classes/sbunoobj.cxx                                                  |    6 --
 basic/source/comp/exprtree.cxx                                                     |    6 --
 basic/source/comp/parser.cxx                                                       |    3 -
 basic/source/runtime/runtime.cxx                                                   |    3 -
 basic/source/uno/namecont.cxx                                                      |   12 +---
 basic/source/uno/scriptcont.cxx                                                    |    6 --
 chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx |    3 -
 chart2/source/controller/main/ChartController_Properties.cxx                       |    4 -
 chart2/source/view/main/ChartView.cxx                                              |    3 -
 connectivity/source/commontools/TIndexes.cxx                                       |    4 -
 connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx                           |   27 +++-------
 connectivity/source/drivers/firebird/DatabaseMetaData.cxx                          |   27 +++-------
 connectivity/source/drivers/firebird/Users.cxx                                     |    3 -
 connectivity/source/drivers/mork/MDatabaseMetaData.cxx                             |   27 +++-------
 connectivity/source/parse/sqliterator.cxx                                          |    3 -
 cui/source/options/dbregister.cxx                                                  |    3 -
 cui/source/options/optbasic.cxx                                                    |    3 -
 cui/source/options/optjava.cxx                                                     |    3 -
 dbaccess/source/ui/app/AppControllerGen.cxx                                        |    3 -
 dbaccess/source/ui/dlg/ConnectionHelper.cxx                                        |    4 -
 dbaccess/source/ui/dlg/ConnectionPage.cxx                                          |    3 -
 dbaccess/source/ui/misc/UITools.cxx                                                |    3 -
 dbaccess/source/ui/misc/indexcollection.cxx                                        |    3 -
 desktop/source/app/app.cxx                                                         |    6 --
 desktop/source/migration/migration.cxx                                             |    6 --
 editeng/qa/unit/core-test.cxx                                                      |    4 -
 editeng/source/xml/xmltxtexp.cxx                                                   |    3 -
 extensions/source/propctrlr/formcomponenthandler.cxx                               |    3 -
 filter/source/graphicfilter/egif/egif.cxx                                          |    3 -
 filter/source/graphicfilter/eps/eps.cxx                                            |    3 -
 filter/source/graphicfilter/etiff/etiff.cxx                                        |    3 -
 forms/source/component/DatabaseForm.cxx                                            |    3 -
 formula/source/ui/dlg/parawin.cxx                                                  |    3 -
 framework/source/accelerators/acceleratorconfiguration.cxx                         |    3 -
 framework/source/fwe/dispatch/interaction.cxx                                      |    3 -
 framework/source/layoutmanager/helpers.cxx                                         |    4 -
 framework/source/layoutmanager/layoutmanager.cxx                                   |    3 -
 framework/source/recording/dispatchrecorder.cxx                                    |    8 --
 framework/source/tabwin/tabwindow.cxx                                              |    3 -
 framework/source/uielement/menubarmanager.cxx                                      |    3 -
 io/source/stm/odata.cxx                                                            |    6 --
 jvmfwk/source/fwkbase.cxx                                                          |    3 -
 sc/source/core/data/documen2.cxx                                                   |    3 -
 sc/source/core/data/document.cxx                                                   |    9 +--
 sc/source/filter/xml/xmlexprt.cxx                                                  |   21 ++-----
 sc/source/filter/xml/xmlstyli.cxx                                                  |    3 -
 sc/source/ui/condformat/condformatdlgentry.cxx                                     |    3 -
 sc/source/ui/docshell/docfunc.cxx                                                  |    3 -
 sc/source/ui/docshell/docsh5.cxx                                                   |    3 -
 sc/source/ui/unoobj/confuno.cxx                                                    |    3 -
 sc/source/ui/vba/vbachart.cxx                                                      |    6 --
 sc/source/ui/view/tabvwsh9.cxx                                                     |    3 -
 sc/source/ui/view/viewdata.cxx                                                     |    3 -
 scripting/source/dlgprov/dlgprov.cxx                                               |    3 -
 sd/source/core/drawdoc4.cxx                                                        |    3 -
 sd/source/ui/animations/CustomAnimationDialog.cxx                                  |   18 ++----
 sd/source/ui/table/tablefunction.cxx                                               |    3 -
 sd/source/ui/unoidl/unomodel.cxx                                                   |    6 --
 sd/source/ui/view/sdview2.cxx                                                      |    3 -
 sdext/source/presenter/PresenterTheme.cxx                                          |    3 -
 sfx2/source/appl/appserv.cxx                                                       |    3 -
 sfx2/source/appl/appuno.cxx                                                        |    9 +--
 sfx2/source/doc/doctemplates.cxx                                                   |    3 -
 sfx2/source/doc/objstor.cxx                                                        |    3 -
 sfx2/source/inet/inettbc.cxx                                                       |    3 -
 starmath/qa/cppunit/test_nodetotextvisitors.cxx                                    |    4 -
 stoc/source/implementationregistration/implreg.cxx                                 |    4 -
 svtools/source/control/headbar.cxx                                                 |    3 -
 svtools/source/control/tabbar.cxx                                                  |    3 -
 svx/source/dialog/imapdlg.cxx                                                      |    3 -
 svx/source/gallery2/galbrws2.cxx                                                   |    4 -
 sw/qa/extras/odfimport/odfimport.cxx                                               |    3 -
 sw/source/core/doc/tblafmt.cxx                                                     |    3 -
 sw/source/core/unocore/unoframe.cxx                                                |    3 -
 sw/source/filter/html/svxcss1.cxx                                                  |    4 -
 sw/source/filter/html/wrthtml.cxx                                                  |    3 -
 sw/source/filter/ww8/docxattributeoutput.cxx                                       |    7 +-
 sw/source/ui/dbui/createaddresslistdialog.cxx                                      |    9 +--
 sw/source/ui/dbui/customizeaddresslistdialog.cxx                                   |    3 -
 sw/source/uibase/app/apphdl.cxx                                                    |    3 -
 sw/source/uibase/dochdl/swdtflvr.cxx                                               |    3 -
 sw/source/uibase/uiview/view2.cxx                                                  |    3 -
 sw/source/uibase/utlui/glbltree.cxx                                                |    3 -
 ucb/source/ucp/cmis/cmis_repo_content.cxx                                          |    4 -
 ucb/source/ucp/ftp/ftpcontent.cxx                                                  |    4 -
 ucb/source/ucp/gio/gio_content.cxx                                                 |    3 -
 ucb/source/ucp/gio/gio_mount.cxx                                                   |    4 -
 ucb/source/ucp/webdav-neon/webdavcontent.cxx                                       |    6 --
 unotools/source/config/docinfohelper.cxx                                           |    3 -
 unoxml/source/dom/node.cxx                                                         |    6 --
 vcl/source/edit/texteng.cxx                                                        |    3 -
 vcl/source/filter/jpeg/JpegWriter.cxx                                              |    3 -
 vcl/source/filter/wmf/winmtf.cxx                                                   |    3 -
 vcl/source/filter/wmf/wmfwr.cxx                                                    |    3 -
 writerfilter/source/dmapper/DomainMapper.cxx                                       |    3 -
 writerfilter/source/dmapper/PropertyMap.cxx                                        |    3 -
 writerfilter/source/dmapper/StyleSheetTable.cxx                                    |    3 -
 xmloff/source/core/XMLEmbeddedObjectExportFilter.cxx                               |    3 -
 xmloff/source/draw/shapeexport.cxx                                                 |    3 -
 xmloff/source/style/xmlnumfi.cxx                                                   |    5 -
 xmloff/source/text/XMLTextFrameContext.cxx                                         |    3 -
 xmloff/source/text/txtparae.cxx                                                    |    6 +-
 xmloff/source/text/txtparai.cxx                                                    |    3 -
 108 files changed, 176 insertions(+), 336 deletions(-)

New commits:
commit 7274490e8af1de05ab84b5e08017a3378502ea96
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:47:33 2017 +0200

    loplugin:oncevar: empty strings: basctl
    
    Change-Id: Ie3ecf1dc0ad038113dbeab5332874bbd3279abab

diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index ddf2113b3fe3..d42b183eaa54 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -1155,9 +1155,8 @@ EntryDescriptor DialogWindow::CreateEntryDescriptor()
 {
     ScriptDocument aDocument( GetDocument() );
     OUString aLibName( GetLibName() );
-    OUString aLibSubName;
     LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
-    return EntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG );
+    return EntryDescriptor( aDocument, eLocation, aLibName, OUString(), GetName(), OBJ_TYPE_DIALOG );
 }
 
 void DialogWindow::SetReadOnly (bool bReadOnly)
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index 18b64c4f5a04..1af9b1224e33 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -1054,11 +1054,10 @@ void LocalizationMgr::copyResourceForDroppedDialog( const Reference< container::
         return;
 
     // Dialog as control
-    OUString aDummyName;
     Any aDialogCtrl;
     aDialogCtrl <<= xDialogModel;
     implHandleControlResourceProperties( aDialogCtrl, aDialogName,
-        aDummyName, xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
+        OUString(), xStringResourceManager, xSourceStringResolver, MOVE_RESOURCES );
 
     // Handle all controls
     Sequence< OUString > aNames = xDialogModel->getElementNames();
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index fd0fadce4541..f5a593b2bde9 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -761,9 +761,8 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton, void )
         EntryDescriptor aDesc = m_pBasicBox->GetEntryDescriptor(pCurEntry);
         ScriptDocument aDocument( aDesc.GetDocument() );
         OUString aLibName( aDesc.GetLibName() );
-        OUString aModName;
         createModImpl( static_cast<vcl::Window*>( this ), aDocument,
-            *m_pBasicBox, aLibName, aModName, true );
+            *m_pBasicBox, aLibName, OUString(), true );
     }
     else if (pButton == m_pOrganizeButton)
     {
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 0e02742d6d07..c5e5a54380d2 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -792,9 +792,8 @@ void ObjectPage::NewModule()
 
     if ( GetSelection( aDocument, aLibName ) )
     {
-        OUString aModName;
         createModImpl( static_cast<vcl::Window*>( this ), aDocument,
-                    *m_pBasicBox, aLibName, aModName, true );
+                    *m_pBasicBox, aLibName, OUString(), true );
     }
 }
 
commit 85d71244eb8caf55aab8094b587dfee7fa1e97b2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:47:27 2017 +0200

    loplugin:oncevar: empty strings: basic
    
    Change-Id: I4edf130e526c4004aa8913e6aafdcd1e2f4ac1ef

diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index e72136234e21..7367bba69051 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -849,8 +849,7 @@ void SbClassData::clear()
 
 SbClassFactory::SbClassFactory()
 {
-    OUString aDummyName;
-    xClassModules = new SbxObject( aDummyName );
+    xClassModules = new SbxObject( OUString() );
 }
 
 SbClassFactory::~SbClassFactory()
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 027caa17fd50..a5274f662c50 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -619,8 +619,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
             aClassAny <<= xClass;
 
             // instantiate SbUnoObject
-            OUString aName;
-            SbUnoObject* pSbUnoObject = new SbUnoObject( aName, aClassAny );
+            SbUnoObject* pSbUnoObject = new SbUnoObject( OUString(), aClassAny );
             SbxObjectRef xWrapper = static_cast<SbxObject*>(pSbUnoObject);
 
             // If the object is invalid deliver null
@@ -707,8 +706,7 @@ void unoToSbxValue( SbxVariable* pVar, const Any& aValue )
                 }
             }
             // instantiate a SbUnoObject
-            OUString aName;
-            SbUnoObject* pSbUnoObject = new SbUnoObject( aName, aValue );
+            SbUnoObject* pSbUnoObject = new SbUnoObject( OUString(), aValue );
             //If this is called externally e.g. from the scripting
             //framework then there is no 'active' runtime the default property will not be set up
             //only a vba object will have XDefaultProp set anyway so... this
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index 3039046f39bd..085476bb794a 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -606,8 +606,7 @@ SbiExprNode* SbiExpression::Unary()
             pParser->Next();
             SbiExprNode* pObjNode = Operand( true/*bUsedForTypeOf*/ );
             pParser->TestToken( IS );
-            OUString aDummy;
-            SbiSymDef* pTypeDef = new SbiSymDef( aDummy );
+            SbiSymDef* pTypeDef = new SbiSymDef( OUString() );
             pParser->TypeDecl( *pTypeDef, true );
             pNd = new SbiExprNode( pObjNode, pTypeDef->GetTypeId() );
             break;
@@ -615,8 +614,7 @@ SbiExprNode* SbiExpression::Unary()
         case NEW:
         {
             pParser->Next();
-            OUString aStr;
-            SbiSymDef* pTypeDef = new SbiSymDef( aStr );
+            SbiSymDef* pTypeDef = new SbiSymDef( OUString() );
             pParser->TypeDecl( *pTypeDef, true );
             pNd = new SbiExprNode( pTypeDef->GetTypeId() );
             break;
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 0347e0eccd62..d4a33465c122 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -590,8 +590,7 @@ void SbiParser::Set()
     if( eTok == NEW )
     {
         Next();
-        OUString aStr;
-        SbiSymDef* pTypeDef = new SbiSymDef( aStr );
+        SbiSymDef* pTypeDef = new SbiSymDef( OUString() );
         TypeDecl( *pTypeDef, true );
 
         aLvalue.Gen();
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 47903f72cadf..ce1e17f74872 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -3828,8 +3828,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem )
                                     aAny <<= xRet;
 
                                     // #67173 don't specify a name so that the real class name is entered
-                                    OUString aName;
-                                    SbxObjectRef xWrapper = static_cast<SbxObject*>(new SbUnoObject( aName, aAny ));
+                                    SbxObjectRef xWrapper = static_cast<SbxObject*>(new SbUnoObject( OUString(), aAny ));
                                     pElem->PutObject( xWrapper.get() );
                                 }
                                 else
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 4a31ce5b2709..5c8f0c29dda2 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -921,8 +921,7 @@ void SfxLibraryContainer::init_Impl( const OUString& rInitialDocumentURL,
                     // Link is already initialised in createLibraryLink()
                     if( !pImplLib->mbInitialised && (!bStorage || xLibraryStor.is()) )
                     {
-                        OUString aIndexFileName;
-                        bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, aIndexFileName );
+                        bool bLoaded = implLoadLibraryIndexFile( pImplLib, rLib, xLibraryStor, OUString() );
                         SAL_WARN_IF(
                             bLoaded && aLibName != rLib.aName, "basic",
                             ("Different library names in library container and"
@@ -1370,10 +1369,9 @@ void SfxLibraryContainer::implStoreLibrary( SfxLibrary* pLib,
                                             const OUString& aName,
                                             const uno::Reference< embed::XStorage >& xStorage )
 {
-    OUString aDummyLocation;
     Reference< XSimpleFileAccess3 > xDummySFA;
     Reference< XInteractionHandler > xDummyHandler;
-    implStoreLibrary( pLib, aName, xStorage, aDummyLocation, xDummySFA, xDummyHandler );
+    implStoreLibrary( pLib, aName, xStorage, OUString(), xDummySFA, xDummyHandler );
 }
 
 // New variant for library export
@@ -1524,9 +1522,8 @@ void SfxLibraryContainer::implStoreLibraryIndexFile( SfxLibrary* pLib,
                                                      const ::xmlscript::LibDescriptor& rLib,
                                                      const uno::Reference< embed::XStorage >& xStorage )
 {
-    OUString aDummyLocation;
     Reference< XSimpleFileAccess3 > xDummySFA;
-    implStoreLibraryIndexFile( pLib, rLib, xStorage, aDummyLocation, xDummySFA );
+    implStoreLibraryIndexFile( pLib, rLib, xStorage, OUString(), xDummySFA );
 }
 
 // New variant for library export
@@ -2199,10 +2196,9 @@ Reference< XNameAccess > SAL_CALL SfxLibraryContainer::createLibraryLink
     pNewLib->maUnexpandedStorageURL = aUnexpandedStorageURL;
     pNewLib->maOriginalStorageURL = StorageURL;
 
-    OUString aInitFileName;
     uno::Reference< embed::XStorage > xDummyStor;
     ::xmlscript::LibDescriptor aLibDesc;
-    implLoadLibraryIndexFile( pNewLib, aLibDesc, xDummyStor, aInitFileName );
+    implLoadLibraryIndexFile( pNewLib, aLibDesc, xDummyStor, OUString() );
     implImportLibDescriptor( pNewLib, aLibDesc );
 
     Reference< XNameAccess > xRet = static_cast< XNameAccess* >( pNewLib );
diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx
index 6f14015a0d9e..9cfea4d879b8 100644
--- a/basic/source/uno/scriptcont.cxx
+++ b/basic/source/uno/scriptcont.cxx
@@ -135,9 +135,8 @@ SfxLibrary* SfxScriptLibraryContainer::implCreateLibraryLink( const OUString&,
 
 Any SAL_CALL SfxScriptLibraryContainer::createEmptyLibraryElement()
 {
-    OUString aMod;
     Any aRetAny;
-    aRetAny <<= aMod;
+    aRetAny <<= OUString();
     return aRetAny;
 }
 
@@ -553,9 +552,8 @@ bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib,
                                                           const uno::Reference< embed::XStorage >& xStorage,
                                                           const css::uno::Reference< css::task::XInteractionHandler >& xHandler )
 {
-    OUString aDummyLocation;
     Reference< XSimpleFileAccess3 > xDummySFA;
-    return implStorePasswordLibrary( pLib, aName, xStorage, aDummyLocation, xDummySFA, xHandler );
+    return implStorePasswordLibrary( pLib, aName, xStorage, OUString(), xDummySFA, xHandler );
 }
 
 bool SfxScriptLibraryContainer::implStorePasswordLibrary( SfxLibrary* pLib, const OUString& aName,
commit ad4e4c7834c576189e2a4b230baa1f12207718ec
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:47:16 2017 +0200

    loplugin:oncevar: empty strings: chart2
    
    Change-Id: If564ba545fbd1504127ff5116fb776ef60d6ab60

diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
index 8654699304fe..f7214e3e2946 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -260,8 +260,7 @@ void WrappedAxisTitleExistenceProperty::setPropertyValue( const Any& rOuterValue
 
     if( bNewValue )
     {
-        OUString aTitleText;
-        TitleHelper::createTitle(  m_eTitleType, aTitleText
+        TitleHelper::createTitle(  m_eTitleType, OUString()
             , m_spChart2ModelContact->getChartModel(), m_spChart2ModelContact->m_xContext );
     }
     else
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index a0b82a4d74ff..6da7736eea60 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -440,7 +440,6 @@ OUString lcl_getErrorCIDForCommand( const ObjectType eDispatchType, const Object
 OUString lcl_getObjectCIDForCommand( const OString& rDispatchCommand, const uno::Reference< XChartDocument > & xChartDocument, const OUString& rSelectedCID )
 {
     ObjectType eObjectType = OBJECTTYPE_UNKNOWN;
-    OUString aParticleID;
 
     uno::Reference< frame::XModel > xChartModel( xChartDocument, uno::UNO_QUERY );
     const ObjectType eSelectedType = ObjectIdentifier::getObjectType( rSelectedCID );
@@ -649,7 +648,8 @@ OUString lcl_getObjectCIDForCommand( const OString& rDispatchCommand, const uno:
     }
 
     return ObjectIdentifier::createClassifiedIdentifier(
-        eObjectType, aParticleID );
+        eObjectType,
+        OUString() ); // aParticleID
 }
 
 }
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 4d69b1cc6247..c93e7d8480a9 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1713,7 +1713,6 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
     for( std::unique_ptr<VSeriesPlotter>& aPlotter : rSeriesPlotterList )
     {
         VSeriesPlotter* pSeriesPlotter = aPlotter.get();
-        OUString aCID; //III
         uno::Reference< drawing::XShapes > xSeriesTarget(nullptr);
         if( pSeriesPlotter->WantToPlotInFrontOfAxisLine() )
             xSeriesTarget = xSeriesTargetInFrontOfAxis;
@@ -1722,7 +1721,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
             xSeriesTarget = xSeriesTargetBehindAxis;
             OSL_ENSURE( !bIsPieOrDonut, "not implemented yet! - during a complete recreation this shape is destroyed so no series can be created anymore" );
         }
-        pSeriesPlotter->initPlotter( xSeriesTarget,xTextTargetShapes,m_xShapeFactory,aCID );
+        pSeriesPlotter->initPlotter( xSeriesTarget,xTextTargetShapes,m_xShapeFactory,OUString() );
         pSeriesPlotter->setPageReferenceSize( rPageSize );
         VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( rVCooSysList, pSeriesPlotter );
         if(nDimensionCount==2)
commit c946de5ef0b40d3b6ddd1c101f7d59a5a9d3a6bd
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:47:07 2017 +0200

    loplugin:oncevar: empty strings: connectivity
    
    Change-Id: Icfc67638e2aee9b5025dd40a50a2627d153ada4d

diff --git a/connectivity/source/commontools/TIndexes.cxx b/connectivity/source/commontools/TIndexes.cxx
index 050364e81462..8ff2257731a2 100644
--- a/connectivity/source/commontools/TIndexes.cxx
+++ b/connectivity/source/commontools/TIndexes.cxx
@@ -228,8 +228,8 @@ void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementNam
             OUString aSql( "DROP INDEX " );
 
             OUString aComposedName = dbtools::composeTableName( m_pTable->getMetaData(), m_pTable, ::dbtools::EComposeRule::InIndexDefinitions, false, false, true );
-            OUString sIndexName,sTemp;
-            sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), sTemp, aSchema, aName, true, ::dbtools::EComposeRule::InIndexDefinitions );
+            OUString sIndexName;
+            sIndexName = dbtools::composeTableName( m_pTable->getMetaData(), OUString(), aSchema, aName, true, ::dbtools::EComposeRule::InIndexDefinitions );
 
             aSql += sIndexName + " ON " + aComposedName;
 
diff --git a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
index 0511b17e9a99..80bcafe266c9 100644
--- a/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NDatabaseMetaData.cxx
@@ -441,8 +441,7 @@ sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsNonNullableColumns(  )
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getCatalogTerm(  )
 {
-    OUString aVal;
-    return aVal;
+    return OUString();
 }
 
 OUString OEvoabDatabaseMetaData::impl_getIdentifierQuoteString_throw(  )
@@ -453,8 +452,7 @@ OUString OEvoabDatabaseMetaData::impl_getIdentifierQuoteString_throw(  )
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getExtraNameCharacters(  )
 {
-    OUString aVal;
-    return aVal;
+    return OUString();
 }
 
 sal_Bool SAL_CALL OEvoabDatabaseMetaData::supportsDifferentTableCorrelationNames(  )
@@ -795,14 +793,12 @@ OUString SAL_CALL OEvoabDatabaseMetaData::getURL(  )
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getUserName(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getDriverName(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getDriverVersion()
@@ -817,20 +813,17 @@ OUString SAL_CALL OEvoabDatabaseMetaData::getDatabaseProductVersion(  )
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getDatabaseProductName(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getProcedureTerm(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getSchemaTerm(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getDriverMajorVersion(  )
@@ -850,14 +843,12 @@ sal_Int32 SAL_CALL OEvoabDatabaseMetaData::getDriverMinorVersion(  )
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getSQLKeywords(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getSearchStringEscape(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL OEvoabDatabaseMetaData::getStringFunctions(  )
diff --git a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
index be811407e5e9..92e46c8ba95d 100644
--- a/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/firebird/DatabaseMetaData.cxx
@@ -348,8 +348,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns(  )
 
 OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters(  )
 {
-    OUString aVal;
-    return aVal;
+    return OUString();
 }
 
 sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames(  )
@@ -583,38 +582,32 @@ OUString SAL_CALL ODatabaseMetaData::getURL()
 
 OUString SAL_CALL ODatabaseMetaData::getUserName(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getDriverName(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getDriverVersion()
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getProcedureTerm(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion(  )
@@ -629,14 +622,12 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion(  )
 
 OUString SAL_CALL ODatabaseMetaData::getSQLKeywords(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getStringFunctions(  )
diff --git a/connectivity/source/drivers/firebird/Users.cxx b/connectivity/source/drivers/firebird/Users.cxx
index c0103368c377..a887a679e7e8 100644
--- a/connectivity/source/drivers/firebird/Users.cxx
+++ b/connectivity/source/drivers/firebird/Users.cxx
@@ -63,8 +63,7 @@ ObjectType Users::appendObject(const OUString& rName,
                                 const uno::Reference< XPropertySet >&)
 {
     // TODO: set sSql as appropriate
-    OUString sSql;
-    m_xMetaData->getConnection()->createStatement()->execute(sSql);
+    m_xMetaData->getConnection()->createStatement()->execute(OUString());
 
     return createObject(rName);
 }
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
index f282d8575992..69f1fa1f9fbe 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaData.cxx
@@ -262,8 +262,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsNonNullableColumns(  )
 
 OUString SAL_CALL ODatabaseMetaData::getCatalogTerm(  )
 {
-    OUString aVal;
-    return aVal;
+    return OUString();
 }
 
 OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw(  )
@@ -274,8 +273,7 @@ OUString ODatabaseMetaData::impl_getIdentifierQuoteString_throw(  )
 
 OUString SAL_CALL ODatabaseMetaData::getExtraNameCharacters(  )
 {
-    OUString aVal;
-    return aVal;
+    return OUString();
 }
 
 sal_Bool SAL_CALL ODatabaseMetaData::supportsDifferentTableCorrelationNames(  )
@@ -619,14 +617,12 @@ OUString SAL_CALL ODatabaseMetaData::getURL(  )
 
 OUString SAL_CALL ODatabaseMetaData::getUserName(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getDriverName(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getDriverVersion()
@@ -643,20 +639,17 @@ OUString SAL_CALL ODatabaseMetaData::getDatabaseProductVersion(  )
 
 OUString SAL_CALL ODatabaseMetaData::getDatabaseProductName(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getProcedureTerm(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getSchemaTerm(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMajorVersion(  )
@@ -676,14 +669,12 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getDriverMinorVersion(  )
 
 OUString SAL_CALL ODatabaseMetaData::getSQLKeywords(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getSearchStringEscape(  )
 {
-    OUString aValue;
-    return aValue;
+    return OUString();
 }
 
 OUString SAL_CALL ODatabaseMetaData::getStringFunctions(  )
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index eaaeabab365a..ba9d7f329759 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -681,8 +681,7 @@ bool OSQLParseTreeIterator::traverseTableNames(OSQLTables& _rTables)
 
     if ( pTableName )
     {
-        OUString sTableRange;
-        traverseOneTableName( _rTables, pTableName, sTableRange );
+        traverseOneTableName( _rTables, pTableName, OUString() );
     }
 
     return !hasErrors();
commit 9388a9da167880ca3002634422b3b1da33bceb82
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:47:00 2017 +0200

    loplugin:oncevar: empty strings: cui
    
    Change-Id: Id00cf5f78ef59520065587691c85f2e1a7e96a9c

diff --git a/cui/source/options/dbregister.cxx b/cui/source/options/dbregister.cxx
index 4324762b3433..ce2a4a94dd4b 100644
--- a/cui/source/options/dbregister.cxx
+++ b/cui/source/options/dbregister.cxx
@@ -283,8 +283,7 @@ IMPL_LINK_NOARG(DbRegistrationOptionsPage, DeleteHdl, Button*, void)
 
 IMPL_LINK_NOARG(DbRegistrationOptionsPage, NewHdl, Button*, void)
 {
-    OUString sNewName,sNewLocation;
-    openLinkDialog(sNewName,sNewLocation);
+    openLinkDialog(OUString(),OUString());
 }
 
 IMPL_LINK_NOARG(DbRegistrationOptionsPage, PathBoxDoubleClickHdl, SvTreeListBox*, bool)
diff --git a/cui/source/options/optbasic.cxx b/cui/source/options/optbasic.cxx
index 30b50463e8cc..632ccb923404 100644
--- a/cui/source/options/optbasic.cxx
+++ b/cui/source/options/optbasic.cxx
@@ -145,8 +145,7 @@ VclPtr<SfxTabPage> SvxBasicIDEOptionsPage::Create( vcl::Window* pParent, const S
 
 void SvxBasicIDEOptionsPage::FillUserData()
 {
-    OUString aUserData;
-    SetUserData( aUserData );
+    SetUserData( OUString() );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index d117b8668502..894a96280137 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -693,8 +693,7 @@ void SvxJavaOptionsPage::Reset( const SfxItemSet* /*rSet*/ )
 
 void SvxJavaOptionsPage::FillUserData()
 {
-    OUString aUserData;
-    SetUserData( aUserData );
+    SetUserData( OUString() );
 }
 
 // class SvxJavaParameterDlg ---------------------------------------------
commit 6c2d9f51ff4356e2c4096c0da091eaac6ecac052
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:46:54 2017 +0200

    loplugin:oncevar: empty strings: dbaccess
    
    Change-Id: I242ef3d2d91dee97e47aab209160e6e7fa566a6d

diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 96eee0c85e3b..f1100dbb1c0e 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -705,7 +705,6 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO
 
         std::vector< std::pair< OUString ,Reference< XModel > > >::const_iterator componentIter = aComponents.begin();
         std::vector< std::pair< OUString ,Reference< XModel > > >::const_iterator componentEnd = aComponents.end();
-        OUString aDocTypeString;
         SfxMailModel aSendMail;
         SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_OK;
         for (; componentIter != componentEnd && SfxMailModel::SEND_MAIL_OK == eResult; ++componentIter)
@@ -715,7 +714,7 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO
                 Reference< XModel > xModel(componentIter->second,UNO_QUERY);
 
                 // Send document as e-Mail using stored/default type
-                eResult = aSendMail.AttachDocument(aDocTypeString,xModel,componentIter->first);
+                eResult = aSendMail.AttachDocument(OUString(),xModel,componentIter->first);
                 ::comphelper::disposeComponent(xModel);
             }
             catch(const Exception&)
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 6be976f1b402..b6fdb4b7eb7c 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -417,10 +417,10 @@ namespace dbaui
             if ( m_pCollection->isFileSystemBased( m_eType ) )
             {
                 // get the two parts: prefix and file URL
-                OUString sTypePrefix, sFileURLDecoded;
+                OUString sFileURLDecoded;
                 sFileURLDecoded = sURL;
 
-                sURL = sTypePrefix;
+                sURL = OUString();
                 if ( !sFileURLDecoded.isEmpty() )
                 {
                     OFileNotation aFileNotation( sFileURLDecoded, OFileNotation::N_SYSTEM );
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index fa8d31fbfcd3..2c44abfc0038 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -194,8 +194,7 @@ namespace dbaui
                 {
                     OUString sText = m_pFT_Connection->GetText();
                     sText = sText.replaceAll("%test",m_pTestConnection->GetText());
-                    OUString sTemp;
-                    sText = sText.replaceAll("~",sTemp);
+                    sText = sText.replaceAll("~","");
                     m_pFT_Connection->SetText(sText);
                 }
                 m_pConnectionURL->Hide();
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 8453b903d86c..7881de2c27df 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1197,9 +1197,8 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
     }
     if ( !pTypeInfo )
     {
-        OUString sTypeName;
         bool bForce = true;
-        pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,"x",50,0,false,bForce);
+        pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,OUString(),"x",50,0,false,bForce);
     }
     OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!");
     return pTypeInfo;
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index 27d08b99903b..1fe324e9b0dd 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -310,8 +310,7 @@ namespace dbaui
     Indexes::iterator OIndexCollection::insert(const OUString& _rName)
     {
         OSL_ENSURE(end() == find(_rName), "OIndexCollection::insert: invalid new name!");
-        OUString tmpName;
-        OIndex aNewIndex(tmpName);  // the empty string indicates the index is a new one
+        OIndex aNewIndex((OUString()));  // the empty string indicates the index is a new one
         aNewIndex.sName = _rName;
         m_aIndexes.push_back(aNewIndex);
         return m_aIndexes.end() - 1;    // the last element is the new one ...
commit dd0bece80712ce30736515e55e1f732ff1ab392e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:46:47 2017 +0200

    loplugin:oncevar: empty strings: desktop
    
    Change-Id: I8c88b295d797a98f0374e3ce57b9c875b72c7bd3

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 2c067883e358..d39a8564366b 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1257,8 +1257,7 @@ void Desktop::Exception(ExceptionCategory nCategory)
     Application::SetSystemWindowMode( nOldMode & ~SystemWindowFlags::NOAUTOMODE );
     if ( bInException )
     {
-        OUString aDoubleExceptionString;
-        Application::Abort( aDoubleExceptionString );
+        Application::Abort( OUString() );
     }
 
     bInException = true;
@@ -1288,8 +1287,7 @@ void Desktop::Exception(ExceptionCategory nCategory)
     {
         case ExceptionCategory::ResourceNotLoaded:
         {
-            OUString aResExceptionString;
-            Application::Abort( aResExceptionString );
+            Application::Abort( OUString() );
             break;
         }
 
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index e30e26f7a4a1..807e335dc386 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -260,8 +260,7 @@ bool MigrationImpl::doMigration()
             if (i.bHasMenubar) {
                 uno::Reference< container::XIndexContainer > xOldVersionMenuSettings(xOldCfgManager->getSettings(sMenubarResourceURL, true), uno::UNO_QUERY);
                 uno::Reference< container::XIndexContainer > xNewVersionMenuSettings = aNewVersionUIInfo.getNewMenubarSettings(i.sModuleShortName);
-                OUString sParent;
-                compareOldAndNewConfig(sParent, xOldVersionMenuSettings, xNewVersionMenuSettings, sMenubarResourceURL);
+                compareOldAndNewConfig(OUString(), xOldVersionMenuSettings, xNewVersionMenuSettings, sMenubarResourceURL);
                 mergeOldToNewVersion(xCfgManager, xNewVersionMenuSettings, sModuleIdentifier, sMenubarResourceURL);
             }
 
@@ -273,8 +272,7 @@ bool MigrationImpl::doMigration()
 
                     uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings(xOldCfgManager->getSettings(sToolbarResourceURL, true), uno::UNO_QUERY);
                     uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(i.sModuleShortName, sToolbarName);
-                    OUString sParent;
-                    compareOldAndNewConfig(sParent, xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL);
+                    compareOldAndNewConfig(OUString(), xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL);
                     mergeOldToNewVersion(xCfgManager, xNewVersionToolbarSettings, sModuleIdentifier, sToolbarResourceURL);
                 }
             }
commit aa371639ee0d3255af474e605eea665125ecd3e2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:46:41 2017 +0200

    loplugin:oncevar: empty strings: editeng
    
    Change-Id: I3b60b918277b408038a99f2c4801a454e6aa7b4a

diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 69e91953b584..ceea79b810d4 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -347,9 +347,7 @@ private:
 //before the two letters
 void Test::testAutocorrect()
 {
-    OUString sShareAutocorrFile;
-    OUString sUserAutocorrFile;
-    SvxAutoCorrect aAutoCorrect(sShareAutocorrFile, sUserAutocorrFile);
+   SvxAutoCorrect aAutoCorrect((OUString()), (OUString()));
 
     {
         OUString sInput("TEst-TEst");
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 569e8927eba7..5606863f31db 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -185,8 +185,7 @@ sal_Bool SAL_CALL SvxSimpleUnoModel::attachResource( const OUString&, const css:
 
 OUString SAL_CALL SvxSimpleUnoModel::getURL(  )
 {
-    OUString aStr;
-    return aStr;
+    return OUString();
 }
 
 css::uno::Sequence< css::beans::PropertyValue > SAL_CALL SvxSimpleUnoModel::getArgs(  )
commit 6b8c36c6faa23acae024be4b8a4a1cf661ac531c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:46:33 2017 +0200

    loplugin:oncevar: empty strings: extensions
    
    Change-Id: I83fe6f3a918cef2da0085858b63ef86005a61619

diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index c88d994093ed..192135b23afc 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -387,7 +387,6 @@ namespace pcr
                                             + aDot
                                             + _rPropertyName;
                         sal_Int32 i;
-                        OUString aDummyStr;
                         for ( i = 0; i < nNewCount; ++i )
                         {
                             sal_Int32 nUniqueId = xStringResourceManager->getUniqueNumericId();
@@ -395,7 +394,7 @@ namespace pcr
                             aPureIdStr += aIdStrBase;
                             pNewPureIds[i] = aPureIdStr;
                             // Force usage of next Unique Id
-                            xStringResourceManager->setString( aPureIdStr, aDummyStr );
+                            xStringResourceManager->setString( aPureIdStr, OUString() );
                         }
 
                         // Move strings to new Ids for all locales
commit 49a8dc5057828f8dcde38f23b0642c03ce59a731
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:46:24 2017 +0200

    loplugin:oncevar: empty strings: filter
    
    Change-Id: Ic39410a26691e039229f052e79c49d03b578c647

diff --git a/filter/source/graphicfilter/egif/egif.cxx b/filter/source/graphicfilter/egif/egif.cxx
index ba08f15718a2..64552a354d24 100644
--- a/filter/source/graphicfilter/egif/egif.cxx
+++ b/filter/source/graphicfilter/egif/egif.cxx
@@ -93,8 +93,7 @@ bool GIFWriter::WriteGIF(const Graphic& rGraphic, FilterConfigItem* pFilterConfi
         xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
         if ( xStatusIndicator.is() )
         {
-            OUString aMsg;
-            xStatusIndicator->start( aMsg, 100 );
+            xStatusIndicator->start( OUString(), 100 );
         }
     }
 
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 2c4182ef66ac..d5fbde1ee44e 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -290,8 +290,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
         xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
         if ( xStatusIndicator.is() )
         {
-            OUString aMsg;
-            xStatusIndicator->start( aMsg, 100 );
+            xStatusIndicator->start( OUString(), 100 );
         }
     }
 
diff --git a/filter/source/graphicfilter/etiff/etiff.cxx b/filter/source/graphicfilter/etiff/etiff.cxx
index ef7009e65b92..eb437f991ec1 100644
--- a/filter/source/graphicfilter/etiff/etiff.cxx
+++ b/filter/source/graphicfilter/etiff/etiff.cxx
@@ -151,8 +151,7 @@ bool TIFFWriter::WriteTIFF( const Graphic& rGraphic, FilterConfigItem* pFilterCo
         xStatusIndicator = pFilterConfigItem->GetStatusIndicator();
         if ( xStatusIndicator.is() )
         {
-            OUString aMsg;
-            xStatusIndicator->start( aMsg, 100 );
+            xStatusIndicator->start( OUString(), 100 );
         }
     }
 
commit 60fe31ec22a38281dd0dfbfcc9dcc3f03cbd2d59
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:46:18 2017 +0200

    loplugin:oncevar: empty strings: forms
    
    Change-Id: I2cf41554d0f347ce5f052fce587e394ca6f92531

diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 085a6fc16d32..d56659fcec70 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -868,7 +868,6 @@ void ODatabaseForm::FillSuccessfulList( HtmlSuccessfulObjList& rList,
     rList.clear();
     // Iterate over Components
     Reference<XPropertySet> xComponentSet;
-    OUString aPrefix;
 
     // we know already how many objects should be appended,
     // so why not allocate the space for them
@@ -876,7 +875,7 @@ void ODatabaseForm::FillSuccessfulList( HtmlSuccessfulObjList& rList,
     for( sal_Int32 nIndex=0; nIndex < getCount(); nIndex++ )
     {
         getByIndex( nIndex ) >>= xComponentSet;
-        AppendComponent(rList, xComponentSet, aPrefix, rxSubmitButton, MouseEvt);
+        AppendComponent(rList, xComponentSet, OUString(), rxSubmitButton, MouseEvt);
     }
 }
 
commit 2a440a747cd9a7d2b6825d515bc7e1cdbe8fca7f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:46:12 2017 +0200

    loplugin:oncevar: empty strings: formula
    
    Change-Id: I76c0ac6cbd8475884fb80002ebb91f2ba84818a0

diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index b5fe5d0059be..069a104574a0 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -435,8 +435,7 @@ void ParaWin::SetArgumentOffset(sal_uInt16 nOffset)
     {
         for ( int i=0; i<4 && i<nArgs; i++ )
         {
-            OUString aString;
-            aArgInput[i].SetArgVal(aString);
+            aArgInput[i].SetArgVal(OUString());
             aArgInput[i].GetArgEdPtr()->Init(
                 (i==0)               ? nullptr : aArgInput[i-1].GetArgEdPtr(),
                 (i==3 || i==nArgs-1) ? nullptr : aArgInput[i+1].GetArgEdPtr(),
commit 48d8b2d468ad5a431f75b610f3a1ed1f45a887c5
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:46:06 2017 +0200

    loplugin:oncevar: empty strings: framework
    
    Change-Id: I5e3387890e0d9bddaec82d7711e6aa52df3126cd

diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx
index ed13cb13cdad..2f257eb11926 100644
--- a/framework/source/accelerators/acceleratorconfiguration.cxx
+++ b/framework/source/accelerators/acceleratorconfiguration.cxx
@@ -969,10 +969,9 @@ void SAL_CALL XCUBasedAcceleratorConfiguration::changesOccurred(const css::util:
 
         if ( sGlobalModules == CFG_ENTRY_GLOBAL )
         {
-            OUString sModule;
             sKey = ::utl::extractFirstFromConfigurationPath(sPath, &sPath);
             if ( !sKey.isEmpty() && !sPath.isEmpty() )
-                reloadChanged(sPrimarySecondary, sGlobalModules, sModule, sKey);
+                reloadChanged(sPrimarySecondary, sGlobalModules, OUString(), sKey);
         }
         else if ( sGlobalModules == CFG_ENTRY_MODULES )
         {
diff --git a/framework/source/fwe/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx
index 56f6ea40b22d..543e309495c4 100644
--- a/framework/source/fwe/dispatch/interaction.cxx
+++ b/framework/source/fwe/dispatch/interaction.cxx
@@ -105,9 +105,8 @@ private:
 
 RequestFilterSelect_Impl::RequestFilterSelect_Impl( const OUString& sURL )
 {
-    OUString temp;
     css::uno::Reference< css::uno::XInterface > temp2;
-    css::document::NoSuchFilterRequest aFilterRequest( temp                             ,
+    css::document::NoSuchFilterRequest aFilterRequest( OUString(),
                                                        temp2                            ,
                                                        sURL                                          );
     m_aRequest <<= aFilterRequest;
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index c68d732157eb..869e7829e077 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -195,8 +195,6 @@ WindowAlign ImplConvertAlignment( ui::DockingArea aAlignment )
 
 OUString getElementTypeFromResourceURL( const OUString& aResourceURL )
 {
-    OUString aType;
-
     OUString aUIResourceURL( UIRESOURCE_URL );
     if ( aResourceURL.startsWith( aUIResourceURL ) )
     {
@@ -207,7 +205,7 @@ OUString getElementTypeFromResourceURL( const OUString& aResourceURL )
         return aPathPart.getToken( 0, '/', nIndex );
     }
 
-    return aType;
+    return OUString();
 }
 
 void parseResourceURL( const OUString& aResourceURL, OUString& aElementType, OUString& aElementName )
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 591afd80fb5d..cb0d8409e61d 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -1137,11 +1137,10 @@ void LayoutManager::implts_setInplaceMenuBar( const Reference< XIndexAccess >& x
 
         if ( m_xFrame.is() && m_xContainerWindow.is() )
         {
-            OUString aModuleIdentifier;
             Reference< XDispatchProvider > xDispatchProvider;
 
             VclPtr<MenuBar> pMenuBar = VclPtr<MenuBar>::Create();
-            m_xInplaceMenuBar = new MenuBarManager( m_xContext, m_xFrame, m_xURLTransformer, xDispatchProvider, aModuleIdentifier, pMenuBar, true );
+            m_xInplaceMenuBar = new MenuBarManager( m_xContext, m_xFrame, m_xURLTransformer, xDispatchProvider, OUString(), pMenuBar, true );
             m_xInplaceMenuBar->SetItemContainer( xMergedMenuBar );
 
             SystemWindow* pSysWindow = getTopSystemWindow( m_xContainerWindow );
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index 387988b5bc39..7cc4ef5a31a1 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -112,19 +112,15 @@ void SAL_CALL DispatchRecorder::startRecording( const css::uno::Reference< css::
 void SAL_CALL DispatchRecorder::recordDispatch( const css::util::URL& aURL,
                                                 const css::uno::Sequence< css::beans::PropertyValue >& lArguments )
 {
-    OUString aTarget;
-
-    css::frame::DispatchStatement aStatement( aURL.Complete, aTarget, lArguments, 0, false );
+    css::frame::DispatchStatement aStatement( aURL.Complete, OUString(), lArguments, 0, false );
     m_aStatements.push_back( aStatement );
 }
 
 void SAL_CALL  DispatchRecorder::recordDispatchAsComment( const css::util::URL& aURL,
                                                           const css::uno::Sequence< css::beans::PropertyValue >& lArguments )
 {
-    OUString aTarget;
-
     // last parameter must be set to true -> it's a comment
-    css::frame::DispatchStatement aStatement( aURL.Complete, aTarget, lArguments, 0, true );
+    css::frame::DispatchStatement aStatement( aURL.Complete, OUString(), lArguments, 0, true );
     m_aStatements.push_back( aStatement );
 }
 
diff --git a/framework/source/tabwin/tabwindow.cxx b/framework/source/tabwin/tabwindow.cxx
index 866662d5334b..bd4216e1c3c4 100644
--- a/framework/source/tabwin/tabwindow.cxx
+++ b/framework/source/tabwin/tabwindow.cxx
@@ -566,10 +566,9 @@ void SAL_CALL TabWindow::windowDeactivated( const css::lang::EventObject& )
 
     sal_Int32 nNextTabID( m_nNextTabID++ );
 
-    OUString aTitle;
     TabControl* pTabControl = impl_GetTabControl( m_xTabControlWindow );
     if ( pTabControl )
-        pTabControl->InsertPage( sal_uInt16( nNextTabID ), aTitle );
+        pTabControl->InsertPage( sal_uInt16( nNextTabID ), OUString() );
     aLock.clear();
     /* SAFE AREA ----------------------------------------------------------------------------------------------- */
 
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 928a1fbf0c36..ea28334b7768 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1772,7 +1772,6 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame, Menu* pAddonMenu, b
     m_bIsBookmarkMenu   = true;
     m_bShowMenuImages   = true;
 
-    OUString aModuleIdentifier;
     m_xPopupMenuControllerFactory = frame::thePopupMenuControllerFactory::get(
         ::comphelper::getProcessComponentContext());
 
@@ -1790,7 +1789,7 @@ void MenuBarManager::Init(const Reference< XFrame >& rFrame, Menu* pAddonMenu, b
         {
             Reference< XDispatchProvider > xDispatchProvider;
             MenuBarManager* pSubMenuManager = new MenuBarManager( m_xContext, rFrame, m_xURLTransformer,
-                                                                  xDispatchProvider, aModuleIdentifier, pPopupMenu,
+                                                                  xDispatchProvider, OUString(), pPopupMenu,
                                                                   false );
 
             Reference< XStatusListener > xSubMenuManager( static_cast< OWeakObject *>( pSubMenuManager ), UNO_QUERY );
commit b25f30155756e5447e37f6dffe12f2f5fea606fb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:45:58 2017 +0200

    loplugin:oncevar: empty strings: io
    
    Change-Id: I42d9cd75a097a8ebb3700c83493c7e2f1466c453

diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index 9a9680f0fb8b..f8e45e28a0dd 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -911,15 +911,13 @@ void OObjectOutputStream::writeObject( const Reference< XPersistObject > & xPObj
         else
         {
             ODataOutputStream::writeLong( (*aIt).second );
-            OUString aName;
-            ODataOutputStream::writeUTF( aName );
+            ODataOutputStream::writeUTF( OUString() );
         }
     }
     else
     {
         ODataOutputStream::writeLong( 0 );
-        OUString aName;
-        ODataOutputStream::writeUTF( aName );
+        ODataOutputStream::writeUTF( OUString() );
     }
 
     sal_uInt32 nObjLenMark = m_rMarkable->createMark();
commit 46e6f92615336a8eaeef8459b6374d5a5165bf6e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:45:53 2017 +0200

    loplugin:oncevar: empty strings: jvmfwk
    
    Change-Id: Ic021968b648359d94e7e44d59606b25a6f6ce8c3

diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 6830b9f00a55..2c24017f1846 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -436,10 +436,9 @@ JFW_MODE getMode()
 OUString getApplicationClassPath()
 {
     OSL_ASSERT(getMode() == JFW_MODE_APPLICATION);
-    OUString retVal;
     OUString sParams = BootParams::getClasspathUrls();
     if (sParams.isEmpty())
-        return retVal;
+        return OUString();
 
     OUStringBuffer buf;
     sal_Int32 index = 0;
commit 3c9e9a5529e0bb6cc257c272b7265072306a9cd6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:45:44 2017 +0200

    loplugin:oncevar: empty strings: sc
    
    Change-Id: I8eca50560d9ce0a3be5ffe6a4a88cb0de5d5d451

diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 7d089f2a3d79..3debe812dc0a 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -1094,7 +1094,6 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
             {
                 aLibName = pSrcShell->GetBasicManager()->GetName();
             }
-            OUString sCodeName;
             OUString sSource;
             uno::Reference< script::XLibraryContainer > xLibContainer = pSrcShell->GetBasicContainer();
             uno::Reference< container::XNameContainer > xLib;
@@ -1112,7 +1111,7 @@ sal_uLong ScDocument::TransferTab( ScDocument* pSrcDoc, SCTAB nSrcPos,
                 xLib->getByName( sSrcCodeName ) >>= sRTLSource;
                 sSource = sRTLSource;
             }
-            VBA_InsertModule( *this, nDestPos, sCodeName, sSource );
+            VBA_InsertModule( *this, nDestPos, OUString(), sSource );
         }
     }
 
diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx
index b8c5db350e15..233422b12b13 100644
--- a/sc/source/core/data/document.cxx
+++ b/sc/source/core/data/document.cxx
@@ -1957,11 +1957,10 @@ void ScDocument::InitUndoSelected( ScDocument* pSrcDoc, const ScMarkData& rTabSe
 
         SharePooledResources(pSrcDoc);
 
-        OUString aString;
         for (SCTAB nTab = 0; nTab <= rTabSelection.GetLastSelected(); nTab++)
             if ( rTabSelection.GetTableSelect( nTab ) )
             {
-                ScTable* pTable = new ScTable(this, nTab, aString, bColInfo, bRowInfo);
+                ScTable* pTable = new ScTable(this, nTab, OUString(), bColInfo, bRowInfo);
                 if (nTab < static_cast<SCTAB>(maTabs.size()))
                     maTabs[nTab] = pTable;
                 else
@@ -1998,12 +1997,11 @@ void ScDocument::InitUndo( ScDocument* pSrcDoc, SCTAB nTab1, SCTAB nTab2,
     if (pSrcDoc->pShell->GetMedium())
         maFileURL = pSrcDoc->pShell->GetMedium()->GetURLObject().GetMainURL(INetURLObject::DecodeMechanism::ToIUri);
 
-    OUString aString;
     if ( nTab2 >= static_cast<SCTAB>(maTabs.size()))
         maTabs.resize(nTab2 + 1, nullptr);
     for (SCTAB nTab = nTab1; nTab <= nTab2; nTab++)
     {
-        ScTable* pTable = new ScTable(this, nTab, aString, bColInfo, bRowInfo);
+        ScTable* pTable = new ScTable(this, nTab, OUString(), bColInfo, bRowInfo);
         maTabs[nTab] = pTable;
     }
 }
@@ -2016,7 +2014,6 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, bool bColInfo, bool bRowI
         return;
     }
 
-    OUString aString;
     if (nTab2 >= static_cast<SCTAB>(maTabs.size()))
     {
         maTabs.resize(nTab2+1,nullptr);
@@ -2025,7 +2022,7 @@ void ScDocument::AddUndoTab( SCTAB nTab1, SCTAB nTab2, bool bColInfo, bool bRowI
     for (SCTAB nTab = nTab1; nTab <= nTab2; nTab++)
         if (!maTabs[nTab])
         {
-            maTabs[nTab] = new ScTable(this, nTab, aString, bColInfo, bRowInfo);
+            maTabs[nTab] = new ScTable(this, nTab, OUString(), bColInfo, bRowInfo);
         }
 }
 
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index d341e582cac4..51b7c81d935c 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2356,9 +2356,8 @@ void ScXMLExport::ExportAutoStyles_()
                     if (xTableProperties.is())
                     {
                         std::vector<XMLPropertyState> aPropStates(xTableStylesExportPropertySetMapper->Filter(xTableProperties));
-                        OUString sParent;
                         OUString sName( aTableIter->maName );
-                        GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TABLE_TABLE, sParent, aPropStates);
+                        GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TABLE_TABLE, OUString(), aPropStates);
                         GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TABLE_TABLE, sName);
                     }
                 }
@@ -2394,18 +2393,16 @@ void ScXMLExport::ExportAutoStyles_()
                             if ( !aNoteIter->maStyleName.isEmpty() )
                             {
                                 std::vector<XMLPropertyState> aPropStates(xShapeMapper->Filter(xShapeProperties));
-                                OUString sParent;
                                 OUString sName( aNoteIter->maStyleName );
-                                GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_SD_GRAPHICS_ID, sParent, aPropStates);
+                                GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_SD_GRAPHICS_ID, OUString(), aPropStates);
                                 GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_SD_GRAPHICS_ID, sName);
                             }
                             if ( !aNoteIter->maTextStyle.isEmpty() )
                             {
                                 std::vector<XMLPropertyState> aPropStates(
                                     GetTextParagraphExport()->GetParagraphPropertyMapper()->Filter(xShapeProperties));
-                                OUString sParent;
                                 OUString sName( aNoteIter->maTextStyle );
-                                GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, sParent, aPropStates);
+                                GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, OUString(), aPropStates);
                                 GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_PARAGRAPH, sName);
                             }
                         }
@@ -2439,9 +2436,8 @@ void ScXMLExport::ExportAutoStyles_()
                         if ( xParaProp.is() )
                         {
                             std::vector<XMLPropertyState> aPropStates(xParaPropMapper->Filter(xParaProp));
-                            OUString sParent;
                             OUString sName( aNoteParaIter->maName );
-                            GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, sParent, aPropStates);
+                            GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_PARAGRAPH, OUString(), aPropStates);
                             GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_PARAGRAPH, sName);
                         }
                     }
@@ -2476,9 +2472,8 @@ void ScXMLExport::ExportAutoStyles_()
                             pCursor->SetSelection( aNoteTextIter->maSelection );
 
                             std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(xCursorProp));
-                            OUString sParent;
                             OUString sName( aNoteTextIter->maName );
-                            GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, sParent, aPropStates);
+                            GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, OUString(), aPropStates);
                             GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_TEXT, sName);
                         }
                     }
@@ -2510,9 +2505,8 @@ void ScXMLExport::ExportAutoStyles_()
                         pCursor->SetSelection( aTextIter->maSelection );
 
                         std::vector<XMLPropertyState> aPropStates(xTextPropMapper->Filter(xCursorProp));
-                        OUString sParent;
                         OUString sName( aTextIter->maName );
-                        GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, sParent, aPropStates);
+                        GetAutoStylePool()->AddNamed(sName, XML_STYLE_FAMILY_TEXT_TEXT, OUString(), aPropStates);
                         GetAutoStylePool()->RegisterName(XML_STYLE_FAMILY_TEXT_TEXT, sName);
                     }
                 }
@@ -2544,9 +2538,8 @@ void ScXMLExport::ExportAutoStyles_()
                 std::vector<XMLPropertyState> aPropStates(xTableStylesExportPropertySetMapper->Filter(xTableProperties));
                 if(!aPropStates.empty())
                 {
-                    OUString sParent;
                     OUString sName;
-                    GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_TABLE, sParent, aPropStates);
+                    GetAutoStylePool()->Add(sName, XML_STYLE_FAMILY_TABLE_TABLE, OUString(), aPropStates);
                     aTableStyles.push_back(sName);
                 }
             }
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 49c00d6c9a86..305c7ad55ed8 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -404,11 +404,10 @@ ScCondFormatEntry* ScXMLMapContext::CreateConditionEntry()
     }
 
     ScConditionMode eMode = ScConditionEntry::GetModeFromApi(aParseResult.meOperator);
-    OUString aNmsp1, aNmsp2;
     ScDocument* pDoc = GetScImport().GetDocument();
 
     ScCondFormatEntry* pEntry =  new ScCondFormatEntry(eMode, aParseResult.maOperand1, aParseResult.maOperand2, pDoc, ScAddress(), msApplyStyle,
-                                                    aNmsp1, aNmsp2, eGrammar, eGrammar);
+                                                    OUString(), OUString(), eGrammar, eGrammar);
 
     pEntry->SetSrcString(msBaseCell);
     return pEntry;
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index 23d9d55099f6..9369c617812b 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -607,8 +607,7 @@ ScFormatEntry* ScFormulaFrmtEntry::createFormulaEntry() const
     if(aFormula.isEmpty())
         return nullptr;
 
-    OUString aExpr2;
-    ScFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT, aFormula, aExpr2, mpDoc, maPos, maLbStyle->GetSelectEntry());
+    ScFormatEntry* pEntry = new ScCondFormatEntry(SC_COND_DIRECT, aFormula, OUString(), mpDoc, maPos, maLbStyle->GetSelectEntry());
     return pEntry;
 }
 
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 2872bedc1ac2..40a578e15a0f 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -3125,8 +3125,7 @@ bool ScDocFunc::InsertTable( SCTAB nTab, const OUString& rName, bool bRecord, bo
         // Only insert vba modules if vba mode ( and not currently importing XML )
         if( bInsertDocModule )
         {
-            OUString sSource, sCodeName;
-            VBA_InsertModule( rDoc, nTab, sCodeName, sSource );
+            VBA_InsertModule( rDoc, nTab, OUString(), OUString() );
         }
         rDocShell.Broadcast( ScTablesHint( SC_TAB_INSERTED, nTab ) );
 
diff --git a/sc/source/ui/docshell/docsh5.cxx b/sc/source/ui/docshell/docsh5.cxx
index d247d39ab25d..5d3b3c46ac8b 100644
--- a/sc/source/ui/docshell/docsh5.cxx
+++ b/sc/source/ui/docshell/docsh5.cxx
@@ -940,7 +940,6 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
                 SCTAB nTabToUse = nDestTab;
                 if ( nDestTab == SC_TAB_APPEND )
                     nTabToUse = aDocument.GetMaxTableNumber() - 1;
-                OUString sCodeName;
                 OUString sSource;
                 try
                 {
@@ -958,7 +957,7 @@ bool ScDocShell::MoveTable( SCTAB nSrcTab, SCTAB nDestTab, bool bCopy, bool bRec
                 catch ( const css::uno::Exception& )
                 {
                 }
-                VBA_InsertModule( aDocument, nTabToUse, sCodeName, sSource );
+                VBA_InsertModule( aDocument, nTabToUse, OUString(), sSource );
             }
         }
         Broadcast( ScTablesHint( SC_TAB_COPIED, nSrcTab, nDestTab ) );
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index 857b9d1bac4d..1097d48b9f0b 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -151,9 +151,8 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue(
             sal_Int64 nColor = 0;
             if (aValue >>= nColor)
             {
-                OUString aColorName;
                 Color aColor(static_cast<sal_uInt32>(nColor));
-                aViewOpt.SetGridColor(aColor, aColorName);
+                aViewOpt.SetGridColor(aColor, OUString());
             }
         }
         else if ( aPropertyName == SC_UNO_SHOWPAGEBR )
diff --git a/sc/source/ui/vba/vbachart.cxx b/sc/source/ui/vba/vbachart.cxx
index 1d48529ffb00..07fd2447b1f4 100644
--- a/sc/source/ui/vba/vbachart.cxx
+++ b/sc/source/ui/vba/vbachart.cxx
@@ -970,8 +970,7 @@ ScVbaChart::getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown)
     }
     catch (const uno::Exception&)
     {
-        OUString aTemp;    // temporary needed for g++ 3.3.5
-        script::BasicErrorException( aTemp, uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), OUString() );
+        script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), OUString() );
     }
     return _nNotUpDown;
 }
@@ -988,8 +987,7 @@ ScVbaChart::hasMarkers()
     }
     catch (const uno::Exception&)
     {
-        OUString aTemp;    // temporary needed for g++ 3.3.5
-        script::BasicErrorException( aTemp, uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), OUString() );
+        script::BasicErrorException( OUString(), uno::Reference< uno::XInterface >(), sal_uInt32(ERRCODE_BASIC_METHOD_FAILED), OUString() );
     }
     return bHasMarkers;
 }
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index 170e8be91777..bd59e6df9fa2 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -76,8 +76,7 @@ void ScTabViewShell::ExecGallery( SfxRequest& rReq )
         Graphic aGraphic( pGalleryItem->GetGraphic() );
         Point   aPos     = GetInsertPos();
 
-        OUString aPath, aFilter;
-        PasteGraphic( aPos, aGraphic, aPath, aFilter );
+        PasteGraphic( aPos, aGraphic, OUString(), OUString() );
     }
     else if ( nType == css::gallery::GalleryItemType::MEDIA )
     {
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index 66af78052f74..3eca76120b02 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -2944,12 +2944,11 @@ void ScViewData::ReadUserDataSequence(const uno::Sequence <beans::PropertyValue>
             sal_Int64 nColor = 0;
             if (rSettings[i].Value >>= nColor)
             {
-                OUString aColorName;
                 Color aColor(static_cast<sal_uInt32>(nColor));
                 // #i47435# set automatic grid color explicitly
                 if( aColor.GetColor() == COL_AUTO )
                     aColor.SetColor( SC_STD_GRIDCOLOR );
-                pOptions->SetGridColor(aColor, aColorName);
+                pOptions->SetGridColor(aColor, OUString());
             }
         }
         else if ( sName == SC_UNO_SHOWPAGEBR )
commit 4f2bb2516d901c8541bae8d2d63c18b2f58775ba
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:45:38 2017 +0200

    loplugin:oncevar: empty strings: scripting
    
    Change-Id: I5f9df200e0b221670c1646dec011c2647804b9e0

diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 4f0c8babe547..00899e8da5f8 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -92,14 +92,13 @@ namespace dlgprov
         aInetObj.removeSegment();
         OUString aDlgLocation = aInetObj.GetMainURL( INetURLObject::DecodeMechanism::NONE );
         css::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale();
-        OUString aComment;
 
         Sequence<Any> aArgs( 6 );
         aArgs[0] <<= aDlgLocation;
         aArgs[1] <<= true; // bReadOnly
         aArgs[2] <<= aLocale;
         aArgs[3] <<= aDlgName;
-        aArgs[4] <<= aComment;
+        aArgs[4] <<= OUString();
 
         Reference< task::XInteractionHandler > xDummyHandler;
         aArgs[5] <<= xDummyHandler;
commit 552bbc2ec1b41f9ceb5367f1e94eb7e8bbffc76a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:45:32 2017 +0200

    loplugin:oncevar: empty strings: sd
    
    Change-Id: I94330c65d021c96e79185c8a2d59f1be702c6b61

diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx
index 5bc477b0f535..3b870da22f9e 100644
--- a/sd/source/core/drawdoc4.cxx
+++ b/sd/source/core/drawdoc4.cxx
@@ -533,7 +533,6 @@ void SdDrawDocument::CreateDefaultCellStyles()
 {
     SdStyleSheetPool*       pSSPool = static_cast< SdStyleSheetPool* >(GetStyleSheetPool());
     SfxStyleSheetBase*      pSheet = nullptr;
-    OUString                aHelpFile;
 
     Reference< XNameContainer > xTableFamily( pSSPool->getByName( "table" ), UNO_QUERY );
 
@@ -542,7 +541,7 @@ void SdDrawDocument::CreateDefaultCellStyles()
     OUString aDefaultCellStyleName( "default" );
 
     pSheet = &(pSSPool->Make(aDefaultCellStyleName, SD_STYLE_FAMILY_CELL, SFXSTYLEBIT_AUTO));
-    pSheet->SetHelpId( aHelpFile, HID_SD_CELL_STYLE_DEFAULT );
+    pSheet->SetHelpId( OUString(), HID_SD_CELL_STYLE_DEFAULT );
     SfxItemSet& rISet = pSheet->GetItemSet();
 
     Color    aNullCol(RGB_Color(COL_BLACK));
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 4a0aadfd7e02..474d3c6e0860 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -288,8 +288,7 @@ FontPropertyBox::FontPropertyBox( sal_Int32 nControlType, vcl::Window* pParent,
     if( bMustDelete )
         delete pFontList;
 
-    OUString aPresetId;
-    setValue( rValue, aPresetId );
+    setValue( rValue, OUString() );
 }
 
 IMPL_LINK_NOARG(FontPropertyBox, ControlSelectHdl, ComboBox&, void)
@@ -443,8 +442,7 @@ CharHeightPropertyBox::CharHeightPropertyBox(sal_Int32 nControlType, vcl::Window
     mpControl->SetModifyHdl( LINK( this, CharHeightPropertyBox, EditModifyHdl ) );
     mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_CHARHEIGHTPROPERTYBOX );
 
-    OUString aPresetId;
-    setValue( rValue, aPresetId );
+    setValue( rValue, OUString() );
 }
 
 CharHeightPropertyBox::~CharHeightPropertyBox()
@@ -532,8 +530,7 @@ TransparencyPropertyBox::TransparencyPropertyBox( sal_Int32 nControlType, vcl::W
     Link<Edit&,void> aLink( LINK( this, TransparencyPropertyBox, implModifyHdl ) );
     mpControl->SetModifyHdl( aLink );
 
-    OUString aPresetId;
-    setValue( rValue, aPresetId  );
+    setValue( rValue, OUString()  );
 }
 
 TransparencyPropertyBox::~TransparencyPropertyBox()
@@ -628,8 +625,7 @@ RotationPropertyBox::RotationPropertyBox( sal_Int32 nControlType, vcl::Window* p
     Link<Edit&,void> aLink( LINK( this, RotationPropertyBox, implModifyHdl ) );
     mpControl->SetModifyHdl( aLink );
 
-    OUString aPresetId;
-    setValue( rValue, aPresetId );
+    setValue( rValue, OUString() );
 }
 
 RotationPropertyBox::~RotationPropertyBox()
@@ -748,8 +744,7 @@ ScalePropertyBox::ScalePropertyBox(sal_Int32 nControlType, vcl::Window* pParent,
     Link<Edit&,void> aLink( LINK( this, ScalePropertyBox, implModifyHdl ) );
     mpControl->SetModifyHdl( aLink );
 
-    OUString aPresetId;
-    setValue( rValue, aPresetId );
+    setValue( rValue, OUString() );
 }
 
 ScalePropertyBox::~ScalePropertyBox()
@@ -907,8 +902,7 @@ FontStylePropertyBox::FontStylePropertyBox( sal_Int32 nControlType, vcl::Window*
     mpControl->SetMenuSelectHdl( LINK( this, FontStylePropertyBox, implMenuSelectHdl ));
     mpControl->SetHelpId( HID_SD_CUSTOMANIMATIONPANE_FONTSTYLEPROPERTYBOX );
 
-    OUString aPresetId;
-    setValue( rValue, aPresetId );
+    setValue( rValue, OUString() );
 }
 
 FontStylePropertyBox::~FontStylePropertyBox()
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 856ef30e5eff..20bbc450fad5 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -277,8 +277,7 @@ void CreateTableFromRTF( SvStream& rStream, SdDrawDocument* pModel )
             ::tools::Rectangle aRect (aPos, aSize);
             sdr::table::SdrTableObj* pObj = new sdr::table::SdrTableObj( pModel, aRect, 1, 1 );
             pObj->NbcSetStyleSheet( pModel->GetDefaultStyleSheet(), true );
-            OUString sTableStyle;
-            apply_table_style( pObj, pModel, sTableStyle );
+            apply_table_style( pObj, pModel, OUString() );
 
             pPage->NbcInsertObject( pObj );
 
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index e1add507af43..eacd8ade3941 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -495,8 +495,6 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
         sal_uInt16 nStandardPageNum = pPreviousStandardPage->GetPageNum() + 2;
         SdPage* pPreviousNotesPage = static_cast<SdPage*>( mpDoc->GetPage( nStandardPageNum - 1 ) );
         sal_uInt16 nNotesPageNum = nStandardPageNum + 1;
-        OUString aStandardPageName;
-        OUString aNotesPageName;
 
         /**************************************************************
         * standard page
@@ -512,7 +510,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
                                     pPreviousStandardPage->GetRgtBorder(),
                                     pPreviousStandardPage->GetLwrBorder() );
         pStandardPage->SetOrientation( pPreviousStandardPage->GetOrientation() );
-        pStandardPage->SetName(aStandardPageName);
+        pStandardPage->SetName(OUString());
 
         // insert page after current page
         mpDoc->InsertPage(pStandardPage, nStandardPageNum);
@@ -547,7 +545,7 @@ SdPage* SdXImpressDocument::InsertSdPage( sal_uInt16 nPage, bool bDuplicate )
                                 pPreviousNotesPage->GetRgtBorder(),
                                 pPreviousNotesPage->GetLwrBorder() );
         pNotesPage->SetOrientation( pPreviousNotesPage->GetOrientation() );
-        pNotesPage->SetName(aNotesPageName);
+        pNotesPage->SetName(OUString());
         pNotesPage->SetPageKind(PageKind::Notes);
 
         // insert page after current page
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index d18e0006fdfe..2844da7cead8 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -698,8 +698,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
             // special insert?
             if( !nRet && mpViewSh )
             {
-                OUString        aTmpString1, aTmpString2;
-                INetBookmark    aINetBookmark( aTmpString1, aTmpString2 );
+                INetBookmark    aINetBookmark( (OUString()), (OUString()) );
 
                 // insert bookmark
                 if( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) &&
commit 833d376b6df5f2f9e4a9cee8fe59aafac405d94f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:45:27 2017 +0200

    loplugin:oncevar: empty strings: sdext
    
    Change-Id: I4685380e343370757cc9b9ebcc0af35c8918b1e3

diff --git a/sdext/source/presenter/PresenterTheme.cxx b/sdext/source/presenter/PresenterTheme.cxx
index 412c2c9e8f3e..4bdd60676853 100644
--- a/sdext/source/presenter/PresenterTheme.cxx
+++ b/sdext/source/presenter/PresenterTheme.cxx
@@ -276,8 +276,7 @@ std::shared_ptr<PresenterTheme::Theme> PresenterTheme::ReadTheme()
         "/org.openoffice.Office.PresenterScreen/",
         PresenterConfigurationAccess::READ_ONLY);
 
-    OUString sThemeName;
-    return aReadContext.ReadTheme(aConfiguration, sThemeName);
+    return aReadContext.ReadTheme(aConfiguration, OUString());
 }
 
 bool PresenterTheme::HasCanvas() const
commit a38eb6862868c18296b26d582658a831b622088a
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:45:21 2017 +0200

    loplugin:oncevar: empty strings: sfx2
    
    Change-Id: I76a8b7e9501951a0166dd63890949bd7d2781398

diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 450e74931393..b17d8ba93128 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -199,8 +199,7 @@ namespace
                 using namespace svtools;
                 Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()));
                 Sequence< OUString > vPackages { "libreoffice-base" };
-                OUString sInteraction;
-                xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, sInteraction);
+                xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, OUString());
                 // Ill be back (hopefully)!
                 SolarMutexGuard aGuard;
                 executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_BIBLIOGRAPHY_INSTALL);
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 2abeaf4f4e28..d4d7cfbc9ab5 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -1616,9 +1616,8 @@ uno::Sequence< beans::PropertyValue > SAL_CALL
 RequestFilterOptions::RequestFilterOptions( uno::Reference< frame::XModel > const & rModel,
                               const uno::Sequence< beans::PropertyValue >& rProperties )
 {
-    OUString temp;
     uno::Reference< uno::XInterface > temp2;
-    document::FilterOptionsRequest aOptionsRequest( temp,
+    document::FilterOptionsRequest aOptionsRequest( OUString(),
                                                     temp2,
                                                     rModel,
                                                     rProperties );
@@ -1656,9 +1655,8 @@ public:
 
 RequestPackageReparation_Impl::RequestPackageReparation_Impl( const OUString& aName )
 {
-    OUString temp;
     uno::Reference< uno::XInterface > temp2;
-    document::BrokenPackageRequest aBrokenPackageRequest( temp, temp2, aName );
+    document::BrokenPackageRequest aBrokenPackageRequest( OUString(), temp2, aName );
     m_aRequest <<= aBrokenPackageRequest;
     m_xApprove = new comphelper::OInteractionApprove;
     m_xDisapprove = new comphelper::OInteractionDisapprove;
@@ -1713,9 +1711,8 @@ public:
 
 NotifyBrokenPackage_Impl::NotifyBrokenPackage_Impl( const OUString& aName )
 {
-    OUString temp;
     uno::Reference< uno::XInterface > temp2;
-    document::BrokenPackageRequest aBrokenPackageRequest( temp, temp2, aName );
+    document::BrokenPackageRequest aBrokenPackageRequest( OUString(), temp2, aName );
     m_aRequest <<= aBrokenPackageRequest;
     m_xAbort = new comphelper::OInteractionAbort;
 }
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index c811fde66138..2f287f70e1cf 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -2452,7 +2452,6 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl& rList,
                 OUString aChildTitle( xRow->getString( 1 ) );
                 const OUString aTargetURL {xContentAccess->queryContentIdentifierString()};
                 OUString aType;
-                OUString aHierURL;
 
                 if ( aChildTitle == "sfx.tlx" || aChildTitle == "groupuinames.xml" )
                     continue;
@@ -2461,7 +2460,7 @@ void SfxDocTplService_Impl::addFsysGroup( GroupList_Impl& rList,
                 if( !getTitleFromURL( aTargetURL, aChildTitle, aType, bDocHasTitle ) )
                     continue;
 
-                pGroup->addEntry( aChildTitle, aTargetURL, aType, aHierURL );
+                pGroup->addEntry( aChildTitle, aTargetURL, aType, OUString() );
             }
         }
         catch ( Exception& ) {}
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 828d32043cd9..1f05b72bde83 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -2544,10 +2544,9 @@ bool SfxObjectShell::Save_Impl( const SfxItemSet* pSet )
     if ( pSalvageItem )
     {
         const SfxStringItem* pFilterItem = SfxItemSet::GetItem<SfxStringItem>(GetMedium()->GetItemSet(), SID_FILTER_NAME, false);
-        OUString aFilterName;
         std::shared_ptr<const SfxFilter> pFilter;
         if ( pFilterItem )
-            pFilter = SfxFilterMatcher( GetFactory().GetFactoryName() ).GetFilter4FilterName( aFilterName );
+            pFilter = SfxFilterMatcher( GetFactory().GetFactoryName() ).GetFilter4FilterName( OUString() );
 
         SfxMedium *pMed = new SfxMedium(
             pSalvageItem->GetValue(), StreamMode::READWRITE | StreamMode::SHARE_DENYWRITE | StreamMode::TRUNC, pFilter );
diff --git a/sfx2/source/inet/inettbc.cxx b/sfx2/source/inet/inettbc.cxx
index 978209c6e941..da0820aa208d 100644
--- a/sfx2/source/inet/inettbc.cxx
+++ b/sfx2/source/inet/inettbc.cxx
@@ -78,7 +78,6 @@ void SfxURLToolBoxControl_Impl::OpenURL( const OUString& rName ) const
 {
     OUString aName;
     OUString aFilter;
-    OUString aOptions;
 
     INetURLObject aObj( rName );
     if ( aObj.GetProtocol() == INetProtocol::NotValid )
@@ -112,7 +111,7 @@ void SfxURLToolBoxControl_Impl::OpenURL( const OUString& rName ) const
             {
                 aArgs.realloc( 4 );
                 aArgs[2].Name = "FilterOptions";
-                aArgs[2].Value <<= aOptions;
+                aArgs[2].Value <<= OUString();
                 aArgs[3].Name = "FilterName";
                 aArgs[3].Value <<= aFilter;
             }
commit 8d6db960d8f3a1eba5a5bcd865429cf4d5df401c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:45:15 2017 +0200

    loplugin:oncevar: empty strings: starmath
    
    Change-Id: I01750964033db223a5f4bd5d0820a7bfb97d4f3d

diff --git a/starmath/qa/cppunit/test_nodetotextvisitors.cxx b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
index bc131de94027..aec16ea30738 100644
--- a/starmath/qa/cppunit/test_nodetotextvisitors.cxx
+++ b/starmath/qa/cppunit/test_nodetotextvisitors.cxx
@@ -572,10 +572,8 @@ void Test::testBinVerInUnary()
 
 void Test::testBinHorInSubSup()
 {
-    OUString sInput;
-
     // set up a blank formula
-    SmNode* pTree = SmParser().Parse(sInput);
+    SmNode* pTree = SmParser().Parse(OUString());
     pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef);
 
     SmCursor aCursor(pTree, xDocShRef.get());
commit 75fd528048885033b0963600667c042834769de7
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:45:01 2017 +0200

    loplugin:oncevar: empty strings: stoc
    
    Change-Id: Ib38846e6f89697e8c9c82b77f01cdafae32714d0

diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index d32de8ff99d6..d6d2dd457b96 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -285,8 +285,6 @@ OUString searchLinkTargetForImpl(const Reference < XRegistryKey >& xRootKey,
                                         const OUString& implName)
     // throw ( InvalidRegistryException, RuntimeException )
 {
-    OUString ret;
-
 //      try
 //      {
         const StringPool & pool = spool();
@@ -318,7 +316,7 @@ OUString searchLinkTargetForImpl(const Reference < XRegistryKey >& xRootKey,
 //      {
 //      }
 
-    return ret;
+    return OUString();
 }
 
 
commit f863d377b84c2e3c44369b73372e2dfa86b42723
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:44:54 2017 +0200

    loplugin:oncevar: empty strings: svtools
    
    Change-Id: I069b49dd628b9c72a25a2b9b7ce46a63fe67b0c5

diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx
index 6b77152ae4d3..75cd3f9a960e 100644
--- a/svtools/source/control/headbar.cxx
+++ b/svtools/source/control/headbar.cxx
@@ -1318,10 +1318,9 @@ OUString HeaderBar::GetHelpText( sal_uInt16 nItemId ) const
 OString HeaderBar::GetHelpId( sal_uInt16 nItemId ) const
 {
     sal_uInt16 nPos = GetItemPos( nItemId );
-    OString aRet;
     if ( nPos != HEADERBAR_ITEM_NOTFOUND )
         return (*mpItemList)[ nPos ]->maHelpId;
-    return aRet;
+    return OString();
 }
 
 Size HeaderBar::CalcWindowSizePixel() const
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 76f3edaa8cb1..88d6074d194b 100644
--- a/svtools/source/control/tabbar.cxx
+++ b/svtools/source/control/tabbar.cxx
@@ -2243,10 +2243,9 @@ OUString TabBar::GetHelpText(sal_uInt16 nPageId) const
 OString TabBar::GetHelpId(sal_uInt16 nPageId) const
 {
     sal_uInt16 nPos = GetPagePos(nPageId);
-    OString aRet;
     if (nPos != PAGE_NOT_FOUND)
         return mpImpl->mpItemList[nPos]->maHelpId;
-    return aRet;
+    return OString();
 }
 
 bool TabBar::StartDrag(const CommandEvent& rCEvt, vcl::Region& rRegion)
commit 99a735474db0a7a422fea948e3e0dc460566e8f6
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:44:48 2017 +0200

    loplugin:oncevar: empty strings: svx
    
    Change-Id: I371e3b76cca006125629e7ceeed52873836c8ccc

diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index e64dd30470d9..4c9325902254 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -588,7 +588,6 @@ void SvxIMapDlg::SetActiveTool( sal_uInt16 nId )
 
 IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow&, rWnd, void )
 {
-    OUString            aStr;
     const NotifyInfo&   rInfo = rWnd.GetInfo();
 
     if ( rInfo.bNewObj )
@@ -611,7 +610,7 @@ IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow&, rWnd, void )
         m_pTbxIMapDlg1->EnableItem( mnActiveId, false );
         m_pTbxIMapDlg1->EnableItem( mnMacroId, false );
         m_pTbxIMapDlg1->EnableItem( mnPropertyId, false );
-        m_pStbStatus->SetItemText( 1, aStr );
+        m_pStbStatus->SetItemText( 1, OUString() );
 
         m_pFtURL->Disable();
         m_pURLBox->Disable();
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx
index a2afa9b0383a..cff892c4f875 100644
--- a/svx/source/gallery2/galbrws2.cxx
+++ b/svx/source/gallery2/galbrws2.cxx
@@ -1031,7 +1031,7 @@ void GalleryBrowser2::DispatchAdd(
         return;
 
     sal_Int8 nType = 0;
-    OUString aFileURL, aFilterName;
+    OUString aFilterName;
     css::uno::Reference< css::lang::XComponent > xDrawing;
     css::uno::Reference< css::graphic::XGraphic > xGraphic;
 
@@ -1067,7 +1067,7 @@ void GalleryBrowser2::DispatchAdd(
     aSeq[0].Name = SVXGALLERYITEM_TYPE;
     aSeq[0].Value <<= nType;
     aSeq[1].Name = SVXGALLERYITEM_URL;
-    aSeq[1].Value <<= aFileURL;
+    aSeq[1].Value <<= OUString();
     aSeq[2].Name = SVXGALLERYITEM_FILTER;
     aSeq[2].Value <<= aFilterName;
     aSeq[3].Name = SVXGALLERYITEM_DRAWING;
commit 9fb2a9c895334c88eae7641b26921a3d1ce9c909
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:44:39 2017 +0200

    loplugin:oncevar: empty strings: sw
    
    Change-Id: I38d5669078308b425d8e87090ef72279de96c6c9

diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index a105bd658179..dfd99a246634 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -656,9 +656,8 @@ DECLARE_ODFIMPORT_TEST(testSpellmenuRedline, "spellmenu-redline.odt")
     SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
     CPPUNIT_ASSERT(pTextDoc);
     SwWrtShell* pWrtShell = pTextDoc->GetDocShell()->GetWrtShell();
-    OUString aParaText;
     uno::Reference<linguistic2::XSpellAlternatives> xAlt;
-    SwSpellPopup aPopup(pWrtShell, xAlt, aParaText);
+    SwSpellPopup aPopup(pWrtShell, xAlt, OUString());
     Menu& rMenu = aPopup.GetMenu();
     // Make sure that if we show the spellcheck popup menu (for the current
     // document, which contains redlines), then the last two entries will be
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 44fbbfaad073..4bc795809203 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -1227,9 +1227,8 @@ SwTableAutoFormatTable::~SwTableAutoFormatTable()
 SwTableAutoFormatTable::SwTableAutoFormatTable()
     : m_pImpl(new Impl)
 {
-    OUString sNm;
     std::unique_ptr<SwTableAutoFormat> pNew(new SwTableAutoFormat(
-                SwStyleNameMapper::GetUIName(RES_POOLTABSTYLE_DEFAULT, sNm)));
+                SwStyleNameMapper::GetUIName(RES_POOLTABSTYLE_DEFAULT, OUString())));
 
     SwBoxAutoFormat aNew;
 
diff --git a/sw/source/core/unocore/unoframe.cxx b/sw/source/core/unocore/unoframe.cxx
index f43b6bace8e3..a10893f9a8c4 100644
--- a/sw/source/core/unocore/unoframe.cxx
+++ b/sw/source/core/unocore/unoframe.cxx
@@ -1694,8 +1694,7 @@ void SwXFrame::setPropertyValue(const OUString& rPropertyName, const ::uno::Any&
                     {
                         svt::EmbeddedObjectRef &rObj = pOleNode->GetOLEObj().GetObject();
 
-                        OUString aMediaType;
-                        rObj.SetGraphic( aGraphic, aMediaType );
+                        rObj.SetGraphic( aGraphic, OUString() );
                     }
                 }
             }
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index eeeeca87c8de..5c84a9c7fc43 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -1074,7 +1074,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
 {
     OSL_ENSURE( pExpr, "no expression" );
 
-    OUString aName, aStyleName;
+    OUString aName;
     rtl_TextEncoding eEnc = rParser.GetDfltEncoding();
     const FontList *pFList = rParser.GetFontList();
     bool bFirst = true;
@@ -1126,7 +1126,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
 
     if( !aName.isEmpty() && !rParser.IsIgnoreFontFamily() )
     {
-        SvxFontItem aFont( FAMILY_DONTKNOW, aName, aStyleName, PITCH_DONTKNOW,
+        SvxFontItem aFont( FAMILY_DONTKNOW, aName, OUString(), PITCH_DONTKNOW,
                             eEnc, aItemIds.nFont );
         if( rParser.IsSetWesternProps() )
             rItemSet.Put( aFont );
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index cff264ca1bc1..155a8f6784ad 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1044,8 +1044,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
 
         if( m_bCfgOutStyles )
         {
-            OUString dummy;
-            OutCSS1_BodyTagStyleOpt( *this, rItemSet, dummy );
+            OutCSS1_BodyTagStyleOpt( *this, rItemSet, OUString() );
         }
         // append events
         if( pDoc->GetDocShell() )   // only with DocShell BASIC is possible
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8c5e7369945a..d31fe60928e7 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1464,7 +1464,7 @@ void DocxAttributeOutput::WriteFFData(  const FieldInfos& rInfos )
     if ( rInfos.eType == ww::eFORMDROPDOWN )
     {
         uno::Sequence< OUString> vListEntries;
-        OUString sName, sHelp, sToolTip, sSelected;
+        OUString sName, sSelected;
 
         FieldMarkParamsHelper params( rFieldmark );
         params.extractParam( ODF_FORMDROPDOWN_LISTENTRY, vListEntries );
@@ -1477,7 +1477,7 @@ void DocxAttributeOutput::WriteFFData(  const FieldInfos& rInfos )
                 sSelected = vListEntries[ nSelectedIndex ];
         }
 
-        GetExport().DoComboBox( sName, sHelp, sToolTip, sSelected, vListEntries );
+        GetExport().DoComboBox( sName, OUString(), OUString(), sSelected, vListEntries );
     }
     else if ( rInfos.eType == ww::eFORMCHECKBOX )
     {
@@ -6845,8 +6845,7 @@ void DocxAttributeOutput::SetField( const SwField& rField, ww::eField eType, con
 void DocxAttributeOutput::WriteExpand( const SwField* pField )
 {
     // Will be written in the next End Run
-    OUString sCmd;
-    m_rExport.OutputField( pField, ww::eUNKNOWN, sCmd );
+    m_rExport.OutputField( pField, ww::eUNKNOWN, OUString() );
 }
 
 void DocxAttributeOutput::WriteField_Impl( const SwField* pField, ww::eField eType, const OUString& rFieldCmd, FieldFlags nMode )
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 4ed69955cde8..b5ca4fc4aabc 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -484,8 +484,7 @@ SwCreateAddressListDialog::SwCreateAddressListDialog(
         for(sal_uInt32 nHeader = 0; nHeader < nCount; ++nHeader)
             m_pCSVData->aDBColumnHeaders.push_back( rAddressHeader.GetString(nHeader));
         std::vector<OUString> aNewData;
-        OUString sTemp;
-        aNewData.insert(aNewData.begin(), nCount, sTemp);
+        aNewData.insert(aNewData.begin(), nCount, OUString());
         m_pCSVData->aDBData.push_back(aNewData);
     }
     //now fill the address control
@@ -522,8 +521,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, NewHdl_Impl, Button*, void)
 {
     sal_uInt32 nCurrent = m_pAddressControl->GetCurrentDataSet();
     std::vector<OUString> aNewData;
-    OUString sTemp;
-    aNewData.insert(aNewData.begin(), m_pCSVData->aDBColumnHeaders.size(), sTemp);
+    aNewData.insert(aNewData.begin(), m_pCSVData->aDBColumnHeaders.size(), OUString());
     m_pCSVData->aDBData.insert(m_pCSVData->aDBData.begin() + ++nCurrent, aNewData);
     m_pSetNoNF->SetMax(m_pCSVData->aDBData.size());
     //the NumericField start at 1
@@ -545,8 +543,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, DeleteHdl_Impl, Button*, void)
     else
     {
         // if only one set is available then clear the data
-        OUString sTemp;
-        m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), sTemp);
+        m_pCSVData->aDBData[0].assign(m_pCSVData->aDBData[0].size(), OUString());
         m_pDeletePB->Enable(false);
     }
     m_pAddressControl->SetCurrentDataSet(nCurrent);
diff --git a/sw/source/ui/dbui/customizeaddresslistdialog.cxx b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
index aafaffff4b75..dbc8c9fc0280 100644
--- a/sw/source/ui/dbui/customizeaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/customizeaddresslistdialog.cxx
@@ -112,10 +112,9 @@ IMPL_LINK(SwCustomizeAddressListDialog, AddRenameHdl_Impl, Button*, pButton, voi
             //add the new column
             m_pNewData->aDBColumnHeaders.insert(m_pNewData->aDBColumnHeaders.begin() + nPos, sNew);
             //add a new entry into all data arrays
-            OUString sTemp;
             std::vector< std::vector< OUString > >::iterator aDataIter;
             for( aDataIter = m_pNewData->aDBData.begin(); aDataIter != m_pNewData->aDBData.end(); ++aDataIter)
-                aDataIter->insert(aDataIter->begin() + nPos, sTemp);
+                aDataIter->insert(aDataIter->begin() + nPos, OUString());
 
         }
 
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 5150e4dd22af..7df4f04e4677 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -421,8 +421,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs
             using namespace svtools;
             css::uno::Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext()));
             const css::uno::Sequence< OUString > vPackages{ "libreoffice-base" };
-            OUString sInteraction;
-            xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, sInteraction);
+            xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, OUString());
             SolarMutexGuard aGuard;
             executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_MAILMERGE_INSTALL);
         }
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 8b1033b76bf3..3d852d931287 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1860,11 +1860,10 @@ bool SwTransferable::PasteOLE( TransferableDataHelper& rData, SwWrtShell& rSh,
                 // it is important to have an icon, let an empty graphic be used
                 // if no other graphic is provided
                 // TODO/LATER: in future a default bitmap could be used
-                OUString aMimeType;
                 MapMode aMapMode( MapUnit::Map100thMM );
                 aGraphic.SetPrefSize( Size( 2500, 2500 ) );
                 aGraphic.SetPrefMapMode( aMapMode );
-                xObjRef.SetGraphic( aGraphic, aMimeType );
+                xObjRef.SetGraphic( aGraphic, OUString() );
             }
 
             //set size. This is a hack because of handing over, size should be
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 2f55016e378f..bdf016c7dab6 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -2218,9 +2218,8 @@ long SwView::InsertMedium( sal_uInt16 nSlotId, SfxMedium* pMedium, sal_Int16 nVe
         SfxObjectShellRef xDocSh;
         SfxObjectShellLock xLockRef;
 
-        OUString sFltNm;
         const int nRet = SwFindDocShell( xDocSh, xLockRef, pMedium->GetName(), OUString(),
-                                    sFltNm, nVersion, pDocSh );
+                                    OUString(), nVersion, pDocSh );
         if( nRet )
         {
             SwWait aWait( *GetDocShell(), true );
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 8c33ba7f96ec..8e750f9cb53e 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -1255,7 +1255,6 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
             _pContent = static_cast<SwGlblDocContent*>(pLast->GetUserData());
             bMove = true;
         }
-        OUString sFilePassword;
         sal_uLong nEntryCount = GetEntryCount();
         const OUString* pFileNames = _rFiles.getConstArray();
         SwWrtShell& rSh = GetParentWindow()->GetCreateView()->GetWrtShell();
@@ -1319,7 +1318,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
 
             aSectionData.SetLinkFileName(sFileName);
             aSectionData.SetType(FILE_LINK_SECTION);
-            aSectionData.SetLinkFilePassword( sFilePassword );
+            aSectionData.SetLinkFilePassword( OUString() );
 
             rSh.InsertGlobalDocContent( *pAnchorContent, aSectionData );
         }
commit fd40ba1e2eb709c34672b0e20052fe4f9130739f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jul 13 11:44:34 2017 +0200

    loplugin:oncevar: empty strings: ucb
    
    Change-Id: If97b0dbeaced579bf23f9f77d431d1085ab89594

diff --git a/ucb/source/ucp/cmis/cmis_repo_content.cxx b/ucb/source/ucp/cmis/cmis_repo_content.cxx
index e1754666879d..d12cbdae8a27 100644
--- a/ucb/source/ucp/cmis/cmis_repo_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_repo_content.cxx
@@ -309,13 +309,11 @@ namespace cmis
 
     OUString RepoContent::getParentURL( )
     {
-        OUString sRet;
-
         SAL_INFO( "ucb.ucp.cmis", "RepoContent::getParentURL()" );
 
         // TODO Implement me
 
-        return sRet;
+        return OUString();
     }
 
     XTYPEPROVIDER_COMMON_IMPL( RepoContent );
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx
index 287d7eb88bc4..5546a56f8005 100644
--- a/ucb/source/ucp/ftp/ftpcontent.cxx
+++ b/ucb/source/ucp/ftp/ftpcontent.cxx
@@ -247,7 +247,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
             if(action == THROWAUTHENTICATIONREQUEST)
             {
                 // try to get a continuation first
-                OUString aRealm,aPassword,aAccount;
+                OUString aPassword,aAccount;
                 m_pFCP->forHost(m_aFTPURL.host(),
                                 m_aFTPURL.port(),
                                 m_aFTPURL.username(),
@@ -258,7 +258,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
                         m_aFTPURL.ident(false, false),
                         m_aFTPURL.host(),      // ServerName
                         ucbhelper::SimpleAuthenticationRequest::ENTITY_NA,
-                        aRealm,
+                        OUString(),
                         ucbhelper::SimpleAuthenticationRequest
                         ::ENTITY_FIXED,
                         m_aFTPURL.username(),
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index c1bb36ff71c4..6cd665ccbd21 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -151,7 +151,6 @@ uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterfac
     g_error_free(pError);
 
     OUString sName;
-    OUString sHost;
 
     uno::Sequence< uno::Any > aArgs( 1 );
     aArgs[ 0 ] <<= sName;
@@ -259,7 +258,7 @@ uno::Any convertToException(GError *pError, const uno::Reference< uno::XInterfac
             break;
         case G_IO_ERROR_HOST_NOT_FOUND:
             { ucb::InteractiveNetworkResolveNameException aExcept(sMessage, rContext,
-                task::InteractionClassification_ERROR, sHost);
+                task::InteractionClassification_ERROR, OUString());
               EXCEPT(aExcept);}
             break;
         default:
diff --git a/ucb/source/ucp/gio/gio_mount.cxx b/ucb/source/ucp/gio/gio_mount.cxx
index 75aa07e7061f..aa955ac77d60 100644
--- a/ucb/source/ucp/gio/gio_mount.cxx
+++ b/ucb/source/ucp/gio/gio_mount.cxx
@@ -81,7 +81,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op,
         return;
     }
 
-    OUString aHostName, aDomain, aUserName, aPassword;
+    OUString aDomain, aUserName, aPassword;
 
     ucbhelper::SimpleAuthenticationRequest::EntityType eUserName =
         (flags & G_ASK_PASSWORD_NEED_USERNAME)
@@ -118,7 +118,7 @@ static void ooo_mount_operation_ask_password (GMountOperation *op,
         aDomain = OUString(default_domain, strlen(default_domain), RTL_TEXTENCODING_UTF8);
 

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list