[Libreoffice-commits] core.git: svtools/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 5 10:54:57 UTC 2020


 svtools/source/config/extcolorcfg.cxx      |    3 +--
 svtools/source/config/printoptions.cxx     |    6 ++----
 svtools/source/control/inettbc.cxx         |    4 +---
 svtools/source/dialogs/addresstemplate.cxx |    6 ++----
 svtools/source/filter/exportdialog.cxx     |    3 +--
 5 files changed, 7 insertions(+), 15 deletions(-)

New commits:
commit cf234676134ff225ea60d708d215a418975e67b7
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Jun 5 08:56:12 2020 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Jun 5 12:54:20 2020 +0200

    Upcoming loplugin:elidestringvar: svtools
    
    Change-Id: I950ae6fd44cc346af8be6669c8c5432fc0aa9ceb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95571
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index e23a2000b7df..707047f8b535 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -317,9 +317,8 @@ void ExtendedColorConfig_Impl::FillComponentColors(const uno::Sequence < OUStrin
             uno::Sequence < OUString > aDefaultColorNames = aColorNames;
 
             const OUString sColor("/Color");
-            const OUString sDefaultColor("/DefaultColor");
             lcl_addString(aColorNames,sColor);
-            lcl_addString(aDefaultColorNames,sDefaultColor);
+            lcl_addString(aDefaultColorNames,"/DefaultColor");
             uno::Sequence< uno::Any > aColors = GetProperties( aColorNames );
             const uno::Any* pColors = aColors.getConstArray();
 
diff --git a/svtools/source/config/printoptions.cxx b/svtools/source/config/printoptions.cxx
index 4a783863eb96..bb08bb3198f3 100644
--- a/svtools/source/config/printoptions.cxx
+++ b/svtools/source/config/printoptions.cxx
@@ -447,8 +447,7 @@ SvtPrinterOptions::SvtPrinterOptions()
     // ... and initialize our data container only if it not already!
     if( m_pStaticDataContainer == nullptr )
     {
-        OUString aRootPath = ROOTNODE_START "/Printer";
-        m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath );
+        m_pStaticDataContainer = new SvtPrintOptions_Impl( ROOTNODE_START "/Printer" );
         pPrinterOptionsDataContainer = m_pStaticDataContainer;
         svtools::ItemHolder2::holdConfigItem(EItem::PrintOptions);
     }
@@ -481,8 +480,7 @@ SvtPrintFileOptions::SvtPrintFileOptions()
     // ... and initialize our data container only if it not already!
     if( m_pStaticDataContainer == nullptr )
     {
-        OUString aRootPath = ROOTNODE_START "/File";
-        m_pStaticDataContainer = new SvtPrintOptions_Impl( aRootPath );
+        m_pStaticDataContainer = new SvtPrintOptions_Impl( ROOTNODE_START "/File" );
         pPrintFileOptionsDataContainer = m_pStaticDataContainer;
 
         svtools::ItemHolder2::holdConfigItem(EItem::PrintFileOptions);
diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx
index 9fcb473cc81f..7192bd6271c0 100644
--- a/svtools/source/control/inettbc.cxx
+++ b/svtools/source/control/inettbc.cxx
@@ -1066,11 +1066,9 @@ OUString SvtURLBox::GetURL()
 
         bool bSlash = aObj.hasFinalSlash();
         {
-            const OUString aPropName("CasePreservingURL");
-
             OUString aFileURL;
 
-            Any aAny = UCBContentHelper::GetProperty(aURL, aPropName);
+            Any aAny = UCBContentHelper::GetProperty(aURL, "CasePreservingURL");
             bool success = (aAny >>= aFileURL);
             OUString aTitle;
             if(success)
diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx
index e1f798650cfd..4b496ddb0cc6 100644
--- a/svtools/source/dialogs/addresstemplate.cxx
+++ b/svtools/source/dialogs/addresstemplate.cxx
@@ -687,8 +687,7 @@ void AssignmentPersistentData::ImplCommit()
             catch(const Exception&) { }
             if (!m_xDatabaseContext.is())
             {
-                const OUString sContextServiceName("com.sun.star.sdb.DatabaseContext");
-                ShowServiceNotAvailableError(m_xDialog.get(), sContextServiceName, false);
+                ShowServiceNotAvailableError(m_xDialog.get(), "com.sun.star.sdb.DatabaseContext", false);
                 return;
             }
         }
@@ -733,8 +732,7 @@ void AssignmentPersistentData::ImplCommit()
         catch(const Exception&) { }
         if (!xHandler.is())
         {
-            const OUString sInteractionHandlerServiceName("com.sun.star.task.InteractionHandler");
-            ShowServiceNotAvailableError(m_xDialog.get(), sInteractionHandlerServiceName, true);
+            ShowServiceNotAvailableError(m_xDialog.get(), "com.sun.star.task.InteractionHandler", true);
             return;
         }
 
diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx
index b355a16f8968..09e2e9b4d3b5 100644
--- a/svtools/source/filter/exportdialog.cxx
+++ b/svtools/source/filter/exportdialog.cxx
@@ -333,10 +333,9 @@ awt::Size ExportDialog::GetOriginalSize()
         aTransformation.m11 = aViewTransformation.get(1,1);
         aTransformation.m12 = aViewTransformation.get(1,2);
 
-        const OUString sViewTransformation( "ViewTransformation" );
         uno::Sequence< beans::PropertyValue > aViewInformation( 1 );
         aViewInformation[ 0 ].Value <<= aTransformation;
-        aViewInformation[ 0 ].Name  = sViewTransformation;
+        aViewInformation[ 0 ].Name  = "ViewTransformation";
 
         if ( mxShape.is() )
             aShapesRange = GetShapeRangeForXShape( mxShape, xPrimitiveFactory, aViewInformation );


More information about the Libreoffice-commits mailing list