[Libreoffice-commits] core.git: avmedia/source basctl/source basic/source chart2/source comphelper/source compilerplugins/clang configmgr/source connectivity/source cppu/source cpputools/source dbaccess/source desktop/source drawinglayer/source editeng/source filter/source forms/source framework/source io/source javaunohelper/source jvmfwk/plugins jvmfwk/source linguistic/source oox/source reportdesign/source scripting/source sc/source sdext/source sd/source sfx2/source stoc/source svgio/source svx/source sw/source unodevtools/source unotools/source vbahelper/source vcl/source vcl/unx xmloff/source xmlscript/source xmlsecurity/source

Noel Grandin noel at peralex.com
Mon Nov 9 00:35:02 PST 2015


 avmedia/source/gstreamer/gstuno.cxx                          |    3 
 avmedia/source/opengl/ogluno.cxx                             |    4 
 basctl/source/basicide/basobj2.cxx                           |    5 
 basctl/source/basicide/basobj3.cxx                           |    3 
 basctl/source/basicide/moduldl2.cxx                          |    4 
 basic/source/classes/eventatt.cxx                            |    4 
 basic/source/classes/propacc.cxx                             |    3 
 basic/source/classes/sbunoobj.cxx                            |    6 
 chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx |   18 -
 chart2/source/tools/DataSeriesHelper.cxx                     |    3 
 chart2/source/tools/ErrorBar.cxx                             |    3 
 chart2/source/tools/ExplicitCategoriesProvider.cxx           |    3 
 chart2/source/view/main/VLegend.cxx                          |    3 
 comphelper/source/xml/ofopxmlhelper.cxx                      |   18 -
 compilerplugins/clang/oncevar.cxx                            |  146 +++++++++++
 configmgr/source/configurationprovider.cxx                   |    3 
 configmgr/source/configurationregistry.cxx                   |    3 
 configmgr/source/defaultprovider.cxx                         |    3 
 configmgr/source/readonlyaccess.cxx                          |    3 
 configmgr/source/readwriteaccess.cxx                         |    3 
 configmgr/source/update.cxx                                  |    3 
 connectivity/source/commontools/DateConversion.cxx           |    3 
 connectivity/source/commontools/dbtools.cxx                  |    6 
 connectivity/source/drivers/hsqldb/HDriver.cxx               |    7 
 connectivity/source/drivers/postgresql/pq_connection.cxx     |    3 
 connectivity/source/drivers/postgresql/pq_driver.cxx         |   10 
 connectivity/source/manager/mdrivermanager.cxx               |   14 -
 cppu/source/uno/lbenv.cxx                                    |    3 
 cppu/source/uno/lbmap.cxx                                    |    3 
 cpputools/source/unoexe/unoexe.cxx                           |    6 
 dbaccess/source/ui/misc/UITools.cxx                          |    4 
 dbaccess/source/ui/querydesign/QueryDesignView.cxx           |    6 
 desktop/source/lib/init.cxx                                  |    3 
 desktop/source/splash/splash.cxx                             |    6 
 desktop/source/splash/unxsplash.cxx                          |    4 
 drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx |    4 
 editeng/source/uno/unofield.cxx                              |    3 
 filter/source/graphicfilter/ieps/ieps.cxx                    |   24 -
 filter/source/msfilter/escherex.cxx                          |    3 
 forms/source/xforms/xpathlib/xpathlib.cxx                    |    4 
 framework/source/layoutmanager/helpers.cxx                   |    9 
 io/source/stm/opump.cxx                                      |    4 
 javaunohelper/source/javaunohelper.cxx                       |   12 
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx                   |    6 
 jvmfwk/source/fwkbase.cxx                                    |   16 -
 linguistic/source/dlistimp.cxx                               |    3 
 oox/source/drawingml/customshapegeometry.cxx                 |   60 ----
 oox/source/drawingml/table/tableproperties.cxx               |    6 
 oox/source/export/chartexport.cxx                            |    3 
 reportdesign/source/ui/report/propbrw.cxx                    |    8 
 sc/source/core/data/docpool.cxx                              |    3 
 sc/source/core/tool/interpr4.cxx                             |    3 
 scripting/source/dlgprov/dlgprov.cxx                         |    3 
 sd/source/filter/xml/sdxmlwrp.cxx                            |    3 
 sd/source/ui/animations/CustomAnimationPane.cxx              |    9 
 sd/source/ui/table/tablefunction.cxx                         |    3 
 sd/source/ui/unoidl/unomodel.cxx                             |   10 
 sd/source/ui/view/drviewse.cxx                               |    3 
 sdext/source/minimizer/graphiccollector.cxx                  |   16 -
 sdext/source/minimizer/impoptimizer.cxx                      |   12 
 sfx2/source/appl/appinit.cxx                                 |    3 
 sfx2/source/appl/appuno.cxx                                  |    6 
 sfx2/source/config/evntconf.cxx                              |   21 -
 sfx2/source/dialog/filtergrouping.cxx                        |   13 
 sfx2/source/doc/sfxbasemodel.cxx                             |    6 
 stoc/source/javavm/javavm.cxx                                |    3 
 svgio/source/svguno/xsvgparser.cxx                           |    4 
 svx/source/form/fmPropBrw.cxx                                |    9 
 svx/source/svdraw/svdoashp.cxx                               |   36 --
 svx/source/toolbars/extrusionbar.cxx                         |    7 
 svx/source/toolbars/fontworkbar.cxx                          |    3 
 sw/source/filter/ww8/docxexportfilter.cxx                    |    4 
 sw/source/filter/ww8/rtfexportfilter.cxx                     |    4 
 sw/source/uibase/dbui/dbmgr.cxx                              |    2 
 sw/source/uibase/shells/langhelper.cxx                       |    6 
 unodevtools/source/unodevtools/options.cxx                   |    6 
 unotools/source/config/bootstrap.cxx                         |    4 
 vbahelper/source/vbahelper/vbahelper.cxx                     |    4 
 vcl/source/components/dtranscomp.cxx                         |   34 --
 vcl/source/components/fontident.cxx                          |    4 
 vcl/source/control/field2.cxx                                |   10 
 vcl/unx/generic/desktopdetect/desktopdetector.cxx            |   38 +-
 xmloff/source/chart/SchXMLExport.cxx                         |   34 --
 xmloff/source/chart/SchXMLImport.cxx                         |   18 -
 xmloff/source/draw/animationimport.cxx                       |    4 
 xmloff/source/draw/sdxmlexp.cxx                              |    4 
 xmloff/source/draw/sdxmlimp.cxx                              |    6 
 xmloff/source/draw/shapeexport.cxx                           |    3 
 xmloff/source/meta/MetaExportComponent.cxx                   |   14 -
 xmloff/source/meta/xmlmetai.cxx                              |    7 
 xmloff/source/text/txtexppr.cxx                              |    3 
 xmlscript/source/xml_helper/xml_impctx.cxx                   |    3 
 xmlscript/source/xmldlg_imexp/xmldlg_export.cxx              |    3 
 xmlscript/source/xmllib_imexp/xmllib_export.cxx              |   12 
 xmlscript/source/xmlmod_imexp/xmlmod_export.cxx              |    3 
 xmlsecurity/source/dialogs/resourcemanager.cxx               |    3 
 xmlsecurity/source/helper/documentsignaturehelper.cxx        |    9 
 97 files changed, 390 insertions(+), 515 deletions(-)

New commits:
commit 6c80a8fe89fadf9a2c7260a09c037a09462f53d1
Author: Noel Grandin <noel at peralex.com>
Date:   Fri Nov 6 09:23:33 2015 +0200

    new loplugin: oncevar
    
    Change-Id: If57390510dde4d166be3141b9f658a7453755d3f
    Reviewed-on: https://gerrit.libreoffice.org/19815
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/avmedia/source/gstreamer/gstuno.cxx b/avmedia/source/gstreamer/gstuno.cxx
index 6e8bbc8..b72a355 100644
--- a/avmedia/source/gstreamer/gstuno.cxx
+++ b/avmedia/source/gstreamer/gstuno.cxx
@@ -46,10 +46,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediagst_component_getFactory(
 
     if( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
     {
-        const OUString aServiceName( SERVICE_NAME );
         xFactory.set( ::cppu::createSingleFactory(
                         static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
-                        IMPL_NAME, create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
+                        IMPL_NAME, create_MediaPlayer, uno::Sequence< OUString > { SERVICE_NAME } ) );
     }
 
     if( xFactory.is() )
diff --git a/avmedia/source/opengl/ogluno.cxx b/avmedia/source/opengl/ogluno.cxx
index fc9f609..ca2b712 100644
--- a/avmedia/source/opengl/ogluno.cxx
+++ b/avmedia/source/opengl/ogluno.cxx
@@ -27,12 +27,10 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL avmediaogl_component_getFactory(
 
     if( rtl_str_compare( pImplName, "com.sun.star.comp.avmedia.Manager_OpenGL" ) == 0 )
     {
-        const OUString aServiceName( "com.sun.star.media.Manager_OpenGL" );
-
         xFactory.set( ::cppu::createSingleFactory(
                         static_cast< lang::XMultiServiceFactory* >( pServiceManager ),
                         "com.sun.star.comp.avmedia.Manager_OpenGL",
-                        create_MediaPlayer, uno::Sequence< OUString >( &aServiceName, 1 ) ) );
+                        create_MediaPlayer, uno::Sequence< OUString >{ "com.sun.star.media.Manager_OpenGL" } ) );
     }
 
     if( xFactory.is() )
diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx
index e2a9fb7..68a87ea 100644
--- a/basctl/source/basicide/basobj2.cxx
+++ b/basctl/source/basicide/basobj2.cxx
@@ -296,9 +296,6 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument,
             aName += ".";
             aName += pMethod->GetName();
 
-            // language
-            OUString aLanguage("Basic");
-
             // location
             OUString aLocation;
             ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) );
@@ -348,7 +345,7 @@ OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument,
                 aScriptURL = "vnd.sun.star.script:" ;
                 aScriptURL += aName;
                 aScriptURL += "?language=" ;
-                aScriptURL += aLanguage;
+                aScriptURL += "Basic";
                 aScriptURL += "&location=" ;
                 aScriptURL += aLocation;
             }
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 9edd995..dceb6be 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -69,11 +69,10 @@ SbMethod* CreateMacro( SbModule* pModule, const OUString& rMacroName )
         else
         {
             bool bValid = false;
-            OUString aStdMacroText( "Macro" );
             sal_Int32 nMacro = 1;
             while ( !bValid )
             {
-                aMacroName = aStdMacroText;
+                aMacroName = "Macro";
                 aMacroName += OUString::number( nMacro );
                 // test whether existing...
                 bValid = pModule->GetMethods()->Find( aMacroName, SbxCLASS_METHOD ) == nullptr;
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index ced2c30..9490bed 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -1481,13 +1481,11 @@ void createLibImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
 
     // create library name
     OUString aLibName;
-    OUString aLibStdName( "Library" );
-    //String aLibStdName( IDEResId( RID_STR_STDLIBNAME ) );
     bool bValid = false;
     sal_Int32 i = 1;
     while ( !bValid )
     {
-        aLibName = aLibStdName + OUString::number( i );
+        aLibName = "Library" + OUString::number( i );
         if ( !rDocument.hasLibrary( E_SCRIPTS, aLibName ) && !rDocument.hasLibrary( E_DIALOGS, aLibName ) )
             bValid = true;
         i++;
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx
index a47404d..ccdfd20 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -477,9 +477,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
             if( !bDecoration )
             {
                 xDlgModPropSet->setPropertyValue( aDecorationPropName, makeAny( true ) );
-
-                OUString aTitlePropName("Title");
-                xDlgModPropSet->setPropertyValue( aTitlePropName, makeAny( OUString() ) );
+                xDlgModPropSet->setPropertyValue( "Title", makeAny( OUString() ) );
             }
         }
         catch(const UnknownPropertyException& )
diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx
index ae2cdb2..ead41af 100644
--- a/basic/source/classes/propacc.cxx
+++ b/basic/source/classes/propacc.cxx
@@ -204,7 +204,6 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, bool bWrite
     }
 
     // Get class names of struct
-    OUString aServiceName( "stardiv.uno.beans.PropertySet");
 
     Reference< XInterface > xInterface = static_cast<OWeakObject*>(new SbPropertyValues());
 
@@ -222,7 +221,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, bool bWrite
         // Build a SbUnoObject and return it
         Any aAny;
         aAny <<= xInterface;
-        SbUnoObjectRef xUnoObj = new SbUnoObject( aServiceName, aAny );
+        SbUnoObjectRef xUnoObj = new SbUnoObject( "stardiv.uno.beans.PropertySet", aAny );
         if( xUnoObj->getUnoAny().getValueType().getTypeClass() != TypeClass_VOID )
         {
             // Return object
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index 74a9799..4d7c189 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -346,9 +346,8 @@ Any convertAny( const Any& rVal, const Type& aDestType )
     }
     catch( const CannotConvertException& e2 )
     {
-        OUString aCannotConvertExceptionName( "com.sun.star.lang.IllegalArgumentException");
         StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
-                          implGetExceptionMsg( e2, aCannotConvertExceptionName ) );
+                          implGetExceptionMsg( e2, "com.sun.star.lang.IllegalArgumentException" ) );
         return aConvertedVal;
     }
     return aConvertedVal;
@@ -4283,9 +4282,8 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, bool bWrite )
     }
     catch( const NoSuchElementException& e1 )
     {
-        OUString aNoSuchElementExceptionName( "com.sun.star.container.NoSuchElementException"  );
         StarBASIC::Error( ERRCODE_BASIC_EXCEPTION,
-            implGetExceptionMsg( e1, aNoSuchElementExceptionName ) );
+            implGetExceptionMsg( e1, "com.sun.star.container.NoSuchElementException" ) );
         return;
     }
     Reference< XTypeDescription > xTypeDesc;
diff --git a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
index a4796a8..80255fb 100644
--- a/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
+++ b/chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx
@@ -133,16 +133,13 @@ namespace
         ::chart::LightSource aResult;
         if( 0 <= nIndex && nIndex < 8 )
         {
-            OUString aColorPropertyPrefix("D3DSceneLightColor");
-            OUString aDirectionPropertyPrefix("D3DSceneLightDirection");
-            OUString aEnabledPropertyPrefix("D3DSceneLightOn");
             OUString aIndex( OUString::number( nIndex + 1 ));
 
             try
             {
-                xSceneProperties->getPropertyValue( aColorPropertyPrefix + aIndex ) >>= aResult.nDiffuseColor;
-                xSceneProperties->getPropertyValue( aDirectionPropertyPrefix + aIndex ) >>= aResult.aDirection;
-                xSceneProperties->getPropertyValue( aEnabledPropertyPrefix + aIndex ) >>= aResult.bIsEnabled;
+                xSceneProperties->getPropertyValue( "D3DSceneLightColor" + aIndex ) >>= aResult.nDiffuseColor;
+                xSceneProperties->getPropertyValue( "D3DSceneLightDirection" + aIndex ) >>= aResult.aDirection;
+                xSceneProperties->getPropertyValue( "D3DSceneLightOn" + aIndex ) >>= aResult.bIsEnabled;
             }
             catch( const uno::Exception & ex )
             {
@@ -161,18 +158,15 @@ namespace
     {
         if( 0 <= nIndex && nIndex < 8 )
         {
-            OUString aColorPropertyPrefix("D3DSceneLightColor");
-            OUString aDirectionPropertyPrefix("D3DSceneLightDirection");
-            OUString aEnabledPropertyPrefix("D3DSceneLightOn");
             OUString aIndex( OUString::number( nIndex + 1 ));
 
             try
             {
-                xSceneProperties->setPropertyValue( aColorPropertyPrefix + aIndex,
+                xSceneProperties->setPropertyValue( "D3DSceneLightColor" + aIndex,
                                                     uno::makeAny( rLightSource.nDiffuseColor ));
-                xSceneProperties->setPropertyValue( aDirectionPropertyPrefix + aIndex,
+                xSceneProperties->setPropertyValue( "D3DSceneLightDirection" + aIndex,
                                                     uno::makeAny( rLightSource.aDirection ));
-                xSceneProperties->setPropertyValue( aEnabledPropertyPrefix + aIndex,
+                xSceneProperties->setPropertyValue( "D3DSceneLightOn" + aIndex,
                                                     uno::makeAny( rLightSource.bIsEnabled ));
             }
             catch( const uno::Exception & ex )
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index 6cea303..eea642e 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -390,7 +390,6 @@ void setStackModeAtSeries(
     if( eStackMode == StackMode_AMBIGUOUS )
         return;
 
-    const OUString aPropName( "StackingDirection" );
     const uno::Any aPropValue = uno::makeAny(
         ( (eStackMode == StackMode_Y_STACKED) ||
           (eStackMode == StackMode_Y_STACKED_PERCENT) )
@@ -407,7 +406,7 @@ void setStackModeAtSeries(
             Reference< beans::XPropertySet > xProp( aSeries[i], uno::UNO_QUERY );
             if( xProp.is() )
             {
-                xProp->setPropertyValue( aPropName, aPropValue );
+                xProp->setPropertyValue( "StackingDirection", aPropValue );
 
                 sal_Int32 nAxisIndex;
                 xProp->getPropertyValue( "AttachedAxisIndex" ) >>= nAxisIndex;
diff --git a/chart2/source/tools/ErrorBar.cxx b/chart2/source/tools/ErrorBar.cxx
index 4f301e4..c22e592 100644
--- a/chart2/source/tools/ErrorBar.cxx
+++ b/chart2/source/tools/ErrorBar.cxx
@@ -179,7 +179,6 @@ namespace {
 
 OUString getSourceRangeStrFromLabeledSequences( const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > >& aSequences, bool bPositive )
 {
-    const OUString aRolePrefix( "error-bars" );
     OUString aDirection;
     if(bPositive)
         aDirection = "positive";
@@ -196,7 +195,7 @@ OUString getSourceRangeStrFromLabeledSequences( const uno::Sequence< uno::Refere
                 uno::Reference< beans::XPropertySet > xSeqProp( xSequence, uno::UNO_QUERY_THROW );
                 OUString aRole;
                 if( ( xSeqProp->getPropertyValue( "Role" ) >>= aRole ) &&
-                        aRole.match( aRolePrefix ) && aRole.indexOf(aDirection) >= 0 )
+                        aRole.match( "error-bars" ) && aRole.indexOf(aDirection) >= 0 )
                 {
                     return xSequence->getSourceRangeRepresentation();
                 }
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index 56977db..c7c588b 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -371,7 +371,6 @@ Sequence< OUString > lcl_getExplicitSimpleCategories(
     {
         aRet.realloc(nMaxCategoryCount);
         aOuterEnd = aComplexCatsPerIndex.end();
-        OUString aSpace(" ");
         for(sal_Int32 nN=0; nN<nMaxCategoryCount; nN++)
         {
             OUString aText;
@@ -383,7 +382,7 @@ Sequence< OUString > lcl_getExplicitSimpleCategories(
                     if( !aAddText.isEmpty() )
                     {
                         if(!aText.isEmpty())
-                            aText += aSpace;
+                            aText += " ";
                         aText += aAddText;
                     }
                 }
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 584ea6b..478cd19 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -288,8 +288,7 @@ awt::Size lcl_placeLegendEntries(
     const sal_Int32 nSymbolToTextDistance = static_cast< sal_Int32 >( std::max( 100.0, fViewFontSize * 0.22 ) );//minimum 1mm
     const sal_Int32 nSymbolPlusDistanceWidth = rMaxSymbolExtent.Width + nSymbolToTextDistance;
     sal_Int32 nMaxTextWidth = rAvailableSpace.Width - (2 * nXPadding) - nSymbolPlusDistanceWidth;
-    OUString aPropNameTextMaximumFrameWidth( "TextMaximumFrameWidth" );
-    uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, aPropNameTextMaximumFrameWidth);
+    uno::Any* pFrameWidthAny = PropertyMapper::getValuePointer( rTextProperties.second, rTextProperties.first, "TextMaximumFrameWidth");
     if(pFrameWidthAny)
     {
         if( eExpansion == ::com::sun::star::chart::ChartLegendExpansion_HIGH )
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 23ced17..1614812 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -128,10 +128,6 @@ void WriteRelationsInfoSequence(
 
     OUString aRelListElement( "Relationships" );
     OUString aRelElement( "Relationship" );
-    OUString aIDAttr( "Id" );
-    OUString aTypeAttr( "Type" );
-    OUString aTargetModeAttr( "TargetMode" );
-    OUString aTargetAttr( "Target" );
     OUString aCDATAString( "CDATA" );
     OUString aWhiteSpace( " " );
 
@@ -152,10 +148,10 @@ void WriteRelationsInfoSequence(
         uno::Reference< xml::sax::XAttributeList > xAttrList( pAttrList );
         for( sal_Int32 nSecInd = 0; nSecInd < aSequence[nInd].getLength(); nSecInd++ )
         {
-            if ( aSequence[nInd][nSecInd].First.equals( aIDAttr )
-              || aSequence[nInd][nSecInd].First.equals( aTypeAttr )
-              || aSequence[nInd][nSecInd].First.equals( aTargetModeAttr )
-              || aSequence[nInd][nSecInd].First.equals( aTargetAttr ) )
+            if ( aSequence[nInd][nSecInd].First == "Id"
+              || aSequence[nInd][nSecInd].First == "Type"
+              || aSequence[nInd][nSecInd].First == "TargetMode"
+              || aSequence[nInd][nSecInd].First == "Target" )
             {
                 pAttrList->AddAttribute( aSequence[nInd][nSecInd].First, aCDATAString, aSequence[nInd][nSecInd].Second );
             }
@@ -194,8 +190,6 @@ void WriteContentSequence(
     OUString aTypesElement( "Types" );
     OUString aDefaultElement( "Default" );
     OUString aOverrideElement( "Override" );
-    OUString aExtensionAttr( "Extension" );
-    OUString aPartNameAttr( "PartName" );
     OUString aContentTypeAttr( "ContentType" );
     OUString aCDATAString( "CDATA" );
     OUString aWhiteSpace( " " );
@@ -215,7 +209,7 @@ void WriteContentSequence(
     {
         AttributeList *pAttrList = new AttributeList;
         uno::Reference< xml::sax::XAttributeList > xAttrList( pAttrList );
-        pAttrList->AddAttribute( aExtensionAttr, aCDATAString, aDefaultsSequence[nInd].First );
+        pAttrList->AddAttribute( "Extension", aCDATAString, aDefaultsSequence[nInd].First );
         pAttrList->AddAttribute( aContentTypeAttr, aCDATAString, aDefaultsSequence[nInd].Second );
 
         xWriter->startElement( aDefaultElement, xAttrList );
@@ -227,7 +221,7 @@ void WriteContentSequence(
     {
         AttributeList *pAttrList = new AttributeList;
         uno::Reference< xml::sax::XAttributeList > xAttrList( pAttrList );
-        pAttrList->AddAttribute( aPartNameAttr, aCDATAString, aOverridesSequence[nInd].First );
+        pAttrList->AddAttribute( "PartName", aCDATAString, aOverridesSequence[nInd].First );
         pAttrList->AddAttribute( aContentTypeAttr, aCDATAString, aOverridesSequence[nInd].Second );
 
         xWriter->startElement( aOverrideElement, xAttrList );
diff --git a/compilerplugins/clang/oncevar.cxx b/compilerplugins/clang/oncevar.cxx
new file mode 100644
index 0000000..6a348b4
--- /dev/null
+++ b/compilerplugins/clang/oncevar.cxx
@@ -0,0 +1,146 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <string>
+#include <iostream>
+#include <map>
+
+#include "plugin.hxx"
+#include "compat.hxx"
+#include "clang/AST/CXXInheritance.h"
+
+// Idea from tml.
+// Check for OUString variables that are
+//   (1) initialised from a string literal
+//   (2) only used in one spot
+// In which case, we might as well inline it.
+
+namespace
+{
+
+class OnceVar:
+    public RecursiveASTVisitor<OnceVar>, public loplugin::Plugin
+{
+public:
+    explicit OnceVar(InstantiationData const & data): Plugin(data) {}
+
+    virtual void run() override {
+        TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+    }
+
+    bool TraverseFunctionDecl( FunctionDecl* stmt );
+    bool VisitDeclRefExpr( const DeclRefExpr* );
+
+private:
+    bool mbChecking;
+    std::map<SourceLocation,int> maVarUsesMap;
+    std::map<SourceLocation,SourceRange> maVarDeclSourceRangeMap;
+    std::map<SourceLocation,SourceRange> maVarUseSourceRangeMap;
+    StringRef getFilename(SourceLocation loc);
+};
+
+StringRef OnceVar::getFilename(SourceLocation loc)
+{
+    SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc(loc);
+    StringRef name { compiler.getSourceManager().getFilename(spellingLocation) };
+    return name;
+}
+
+bool OnceVar::TraverseFunctionDecl(FunctionDecl * decl)
+{
+    if (ignoreLocation(decl)) {
+        return true;
+    }
+    if (!decl->hasBody()) {
+        return true;
+    }
+    if ( decl != decl->getCanonicalDecl() ) {
+        return true;
+    }
+
+    // some places, it makes the code worse
+    StringRef aFileName = getFilename(decl->getLocStart());
+    if (aFileName.startswith(SRCDIR "/sal/qa/osl/module/osl_Module.cxx")) {
+        return true;
+    }
+
+    maVarUsesMap.clear();
+    maVarDeclSourceRangeMap.clear();
+    mbChecking = true;
+    TraverseStmt(decl->getBody());
+    mbChecking = false;
+    for (auto it = maVarUsesMap.cbegin(); it != maVarUsesMap.cend(); ++it)
+    {
+        if (it->second == 1)
+        {
+            report(DiagnosticsEngine::Warning,
+                    "OUString var used only once, should be inlined",
+                   it->first)
+                << maVarDeclSourceRangeMap[it->first];
+            report(DiagnosticsEngine::Note,
+                   "to this spot",
+                   maVarUseSourceRangeMap[it->first].getBegin())
+                << maVarUseSourceRangeMap[it->first];
+        }
+    }
+    return true;
+}
+
+bool OnceVar::VisitDeclRefExpr( const DeclRefExpr* declRefExpr )
+{
+    if (!mbChecking)
+        return true;
+    const Decl* decl = declRefExpr->getDecl();
+    if (!isa<VarDecl>(decl) || isa<ParmVarDecl>(decl)) {
+        return true;
+    }
+    const VarDecl * varDecl = dyn_cast<VarDecl>(decl)->getCanonicalDecl();
+    if (!varDecl->hasInit() || varDecl->hasGlobalStorage()) {
+        return true;
+    }
+    if (varDecl->getType().getUnqualifiedType().getAsString().find("OUString") == std::string::npos) {
+        return true;
+    }
+    const CXXConstructExpr* constructExpr = dyn_cast<CXXConstructExpr>(varDecl->getInit());
+    if (!constructExpr || constructExpr->getNumArgs() < 1) {
+        return true;
+    }
+    if (!isa<StringLiteral>(constructExpr->getArg(0))) {
+        return true;
+    }
+
+    SourceLocation loc = varDecl->getLocation();
+
+    // ignore cases like:
+    //     const OUString("xxx") xxx;
+    //     rtl_something(xxx.pData);
+    // and
+    //      foo(&xxx);
+    // where we cannot inline the declaration.
+    if (isa<MemberExpr>(parentStmt(declRefExpr))
+        || isa<UnaryOperator>(parentStmt(declRefExpr))) {
+        maVarUsesMap[loc] = 2;
+        return true;
+    }
+
+    if (maVarUsesMap.find(loc) == maVarUsesMap.end()) {
+        maVarUsesMap[loc] = 1;
+        maVarDeclSourceRangeMap[loc] = varDecl->getSourceRange();
+        maVarUseSourceRangeMap[loc] = declRefExpr->getSourceRange();
+    } else {
+        maVarUsesMap[loc]++;
+    }
+    return true;
+}
+
+loplugin::Plugin::Registration< OnceVar > X("oncevar");
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/configmgr/source/configurationprovider.cxx b/configmgr/source/configurationprovider.cxx
index 0c4b408..2707a4f 100644
--- a/configmgr/source/configurationprovider.cxx
+++ b/configmgr/source/configurationprovider.cxx
@@ -476,8 +476,7 @@ OUString getImplementationName() {
 }
 
 css::uno::Sequence< OUString > getSupportedServiceNames() {
-    OUString name("com.sun.star.configuration.ConfigurationProvider");
-    return css::uno::Sequence< OUString >(&name, 1);
+    return css::uno::Sequence< OUString > { "com.sun.star.configuration.ConfigurationProvider" };
 }
 
 css::uno::Reference< css::lang::XSingleComponentFactory >
diff --git a/configmgr/source/configurationregistry.cxx b/configmgr/source/configurationregistry.cxx
index 2d02746..b91bd1d 100644
--- a/configmgr/source/configurationregistry.cxx
+++ b/configmgr/source/configurationregistry.cxx
@@ -795,8 +795,7 @@ OUString getImplementationName() {
 }
 
 css::uno::Sequence< OUString > getSupportedServiceNames() {
-    OUString name("com.sun.star.configuration.ConfigurationRegistry");
-    return css::uno::Sequence< OUString >(&name, 1);
+    return css::uno::Sequence< OUString > { "com.sun.star.configuration.ConfigurationRegistry" };
 }
 
 } }
diff --git a/configmgr/source/defaultprovider.cxx b/configmgr/source/defaultprovider.cxx
index df4d1b5..0032bf3 100644
--- a/configmgr/source/defaultprovider.cxx
+++ b/configmgr/source/defaultprovider.cxx
@@ -47,8 +47,7 @@ OUString getImplementationName() {
 }
 
 css::uno::Sequence< OUString > getSupportedServiceNames() {
-    OUString name("com.sun.star.configuration.DefaultProvider");
-    return css::uno::Sequence< OUString >(&name, 1);
+    return css::uno::Sequence< OUString > { "com.sun.star.configuration.DefaultProvider" };
 }
 
 } }
diff --git a/configmgr/source/readonlyaccess.cxx b/configmgr/source/readonlyaccess.cxx
index b1c331b..864eb13 100644
--- a/configmgr/source/readonlyaccess.cxx
+++ b/configmgr/source/readonlyaccess.cxx
@@ -132,8 +132,7 @@ OUString getImplementationName() {
 }
 
 css::uno::Sequence< OUString > getSupportedServiceNames() {
-    OUString name("com.sun.star.configuration.ReadOnlyAccess");
-    return css::uno::Sequence< OUString >(&name, 1);
+    return css::uno::Sequence< OUString > { "com.sun.star.configuration.ReadOnlyAccess" };
 }
 
 } }
diff --git a/configmgr/source/readwriteaccess.cxx b/configmgr/source/readwriteaccess.cxx
index 1a3b0d4..ca59f55 100644
--- a/configmgr/source/readwriteaccess.cxx
+++ b/configmgr/source/readwriteaccess.cxx
@@ -167,8 +167,7 @@ OUString getImplementationName() {
 }
 
 css::uno::Sequence< OUString > getSupportedServiceNames() {
-    OUString name("com.sun.star.configuration.ReadWriteAccess");
-    return css::uno::Sequence< OUString >(&name, 1);
+    return css::uno::Sequence< OUString > { "com.sun.star.configuration.ReadWriteAccess" };
 }
 
 } }
diff --git a/configmgr/source/update.cxx b/configmgr/source/update.cxx
index 058235e..b479ffe 100644
--- a/configmgr/source/update.cxx
+++ b/configmgr/source/update.cxx
@@ -168,8 +168,7 @@ OUString getImplementationName() {
 }
 
 css::uno::Sequence< OUString > getSupportedServiceNames() {
-    OUString name("com.sun.star.configuration.Update_Service");
-    return css::uno::Sequence< OUString >(&name, 1);
+    return css::uno::Sequence< OUString > { "com.sun.star.configuration.Update_Service" };
 }
 
 } }
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index b50fd8c..4fa40665 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -83,13 +83,12 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
                         _rxTypeConverter->convertToSimpleType(_rVal, TypeClass_STRING) >>= aTemp;
                         sal_Int32 nIndex = (sal_Int32)-1;
                         const OUString sQuot("\'");
-                        const OUString sQuotToReplace("\'\'");
                         do
                         {
                             nIndex += 2;
                             nIndex = aTemp.indexOf(sQuot,nIndex);
                             if(nIndex != -1)
-                                aTemp = aTemp.replaceAt(nIndex,sQuot.getLength(),sQuotToReplace);
+                                aTemp = aTemp.replaceAt(nIndex,sQuot.getLength(), "\'\'");
                         } while (nIndex != -1);
 
                         aRet.append(aTemp);
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index feed005..247b8d7 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -943,8 +943,6 @@ try
     Property* pOldProps = aOldProperties.getArray();
     Property* pNewProps = aNewProperties.getArray();
 
-    OUString sPropDefaultControl("DefaultControl");
-    OUString sPropLabelControl("LabelControl");
     OUString sPropFormatsSupplier("FormatsSupplier");
     OUString sPropCurrencySymbol("CurrencySymbol");
     OUString sPropDecimals("Decimals");
@@ -962,9 +960,7 @@ try
 
     for (sal_Int32 i=0; i<aOldProperties.getLength(); ++i)
     {
-        if  (   (!pOldProps[i].Name.equals(sPropDefaultControl))
-            &&  (!pOldProps[i].Name.equals(sPropLabelControl))
-            )
+        if ( pOldProps[i].Name != "DefaultControl" && pOldProps[i].Name != "LabelControl" )
         {
             // binary search
             Property* pResult = ::std::lower_bound(
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index ade5ae0..1ddded1 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -834,9 +834,10 @@ namespace connectivity
                 // arguments for creating the config access
                 Sequence< Any > aArguments(2);
                 // the path to the node to open
-                OUString sNodePath("/org.openoffice.Setup/L10N" );
-                aArguments[0] <<= PropertyValue( OUString("nodepath"), 0,
-                    makeAny( sNodePath ), PropertyState_DIRECT_VALUE
+                aArguments[0] <<= PropertyValue(
+                    OUString("nodepath"), 0,
+                    makeAny( OUString("/org.openoffice.Setup/L10N" ) ),
+                    PropertyState_DIRECT_VALUE
                 );
                 // the depth: -1 means unlimited
                 aArguments[1] <<= PropertyValue(
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx
index d93d7ba..9df93ea 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -137,8 +137,7 @@ OUString    ConnectionGetImplementationName()
 }
 com::sun::star::uno::Sequence<OUString> ConnectionGetSupportedServiceNames()
 {
-    OUString serv( "com.sun.star.sdbc.Connection" );
-    return Sequence< OUString> (&serv,1);
+    return Sequence< OUString > { "com.sun.star.sdbc.Connection" };
 }
 
 static sal_Int32 readLogLevelFromConfiguration()
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx
index 8ff5223..d67d14a 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -76,15 +76,7 @@ OUString DriverGetImplementationName()
 
 Sequence< OUString > DriverGetSupportedServiceNames()
 {
-    static Sequence< OUString > *p;
-    if( ! p )
-    {
-        MutexGuard guard( osl::Mutex::getGlobalMutex() );
-        OUString tmp( "com.sun.star.sdbc.Driver" );
-        static Sequence< OUString > instance( &tmp,1 );
-        p = &instance;
-    }
-    return *p;
+    return Sequence< OUString > { "com.sun.star.sdbc.Driver" };
 }
 
 Reference< XConnection > Driver::connect(
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index cddcf29..686fdf6 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -180,28 +180,24 @@ Any SAL_CALL ODriverEnumeration::nextElement(  ) throw(NoSuchElementException, W
         _rPrecedence.realloc( 0 );
         try
         {
-            // some strings we need
-            const OUString sDriverManagerConfigLocation(  "org.openoffice.Office.DataAccess/DriverManager" );
-            const OUString sDriverPreferenceLocation(  "DriverPrecedence" );
-            const OUString sNodePathArgumentName(  "nodepath" );
-            const OUString sNodeAccessServiceName(  "com.sun.star.configuration.ConfigurationAccess" );
-
             // create a configuration provider
             Reference< XMultiServiceFactory > xConfigurationProvider(
                 com::sun::star::configuration::theDefaultProvider::get( _rContext ) );
 
             // one argument for creating the node access: the path to the configuration node
             Sequence< Any > aCreationArgs(1);
-            aCreationArgs[0] <<= NamedValue( sNodePathArgumentName, makeAny( sDriverManagerConfigLocation ) );
+            aCreationArgs[0] <<= NamedValue( "nodepath", makeAny( OUString("org.openoffice.Office.DataAccess/DriverManager") ) );
 
             // create the node access
-            Reference< XNameAccess > xDriverManagerNode(xConfigurationProvider->createInstanceWithArguments(sNodeAccessServiceName, aCreationArgs), UNO_QUERY);
+            Reference< XNameAccess > xDriverManagerNode(
+                xConfigurationProvider->createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aCreationArgs),
+                UNO_QUERY);
 
             OSL_ENSURE(xDriverManagerNode.is(), "lcl_getDriverPrecedence: could not open my configuration node!");
             if (xDriverManagerNode.is())
             {
                 // obtain the preference list
-                Any aPreferences = xDriverManagerNode->getByName(sDriverPreferenceLocation);
+                Any aPreferences = xDriverManagerNode->getByName("DriverPrecedence");
                 bool bSuccess = aPreferences >>= _rPrecedence;
                 OSL_ENSURE(bSuccess || !aPreferences.hasValue(), "lcl_getDriverPrecedence: invalid value for the preferences node (no string sequence but not NULL)!");
             }
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index c888910..d036212 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -1055,8 +1055,7 @@ static bool loadEnv(OUString const  & cLibStem,
     if (!bMod)
         return false;
 
-    OUString aSymbolName(UNO_INIT_ENVIRONMENT);
-    uno_initEnvironmentFunc fpInit = reinterpret_cast<uno_initEnvironmentFunc>(aMod.getSymbol(aSymbolName));
+    uno_initEnvironmentFunc fpInit = reinterpret_cast<uno_initEnvironmentFunc>(aMod.getSymbol(UNO_INIT_ENVIRONMENT));
 
     if (!fpInit)
         return false;
diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx
index 7da528c..51e1c26 100644
--- a/cppu/source/uno/lbmap.cxx
+++ b/cppu/source/uno/lbmap.cxx
@@ -418,9 +418,8 @@ static Mapping loadExternalMapping(
 
         if (bModule)
         {
-            OUString aSymbolName( UNO_EXT_GETMAPPING );
             uno_ext_getMappingFunc fpGetMapFunc =
-                reinterpret_cast<uno_ext_getMappingFunc>(aModule.getSymbol( aSymbolName ));
+                reinterpret_cast<uno_ext_getMappingFunc>(aModule.getSymbol( UNO_EXT_GETMAPPING ));
 
             if (fpGetMapFunc)
             {
diff --git a/cpputools/source/unoexe/unoexe.cxx b/cpputools/source/unoexe/unoexe.cxx
index 512dfec..806e7a1 100644
--- a/cpputools/source/unoexe/unoexe.cxx
+++ b/cpputools/source/unoexe/unoexe.cxx
@@ -140,10 +140,9 @@ static bool readOption( OUString * pValue, const sal_Char * pOpt,
 static bool readOption( bool * pbOpt, const sal_Char * pOpt,
                         sal_uInt32 * pnIndex, const OUString & aArg)
 {
-    const OUString dashdash("--");
     OUString aOpt = OUString::createFromAscii(pOpt);
 
-    if(aArg.startsWith(dashdash) && aOpt.equals(aArg.copy(2)))
+    if(aArg.startsWith("--") && aOpt.equals(aArg.copy(2)))
     {
         ++(*pnIndex);
         *pbOpt = true;
@@ -408,8 +407,7 @@ SAL_IMPLEMENT_MAIN()
 
             rtl_getAppCommandArg(nPos, &arg.pData);
 
-            const OUString dashdash("--");
-            if (dashdash == arg)
+            if (arg == "--")
             {
                 ++nPos;
                 break;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index e58a6f2..0398b56a 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1273,9 +1273,9 @@ TOTypeInfoSP queryTypeInfoByType(sal_Int32 _nDataType,const OTypeInfoMap& _rType
     }
     if ( !pTypeInfo )
     {
-        OUString sCreate("x"),sTypeName;
+        OUString sTypeName;
         bool bForce = true;
-        pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,sCreate,50,0,false,bForce);
+        pTypeInfo = ::dbaui::getTypeInfoFromType(_rTypeInfo,DataType::VARCHAR,sTypeName,"x",50,0,false,bForce);
     }
     OSL_ENSURE(pTypeInfo,"Wrong DataType supplied!");
     return pTypeInfo;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index d2606d9..9312308 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -295,7 +295,6 @@ namespace
             {
                 const Reference< XDatabaseMetaData >  xMetaData = _xConnection->getMetaData();
                 const OUString aQuote = xMetaData->getIdentifierQuoteString();
-                const OUString sEqual(" = ");
 
                 for(;aIter != aEnd;++aIter)
                 {
@@ -304,7 +303,7 @@ namespace
                         aCondition.append(C_AND);
                     aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_FROM),aQuote));
                     aCondition.append(::dbtools::quoteName(aQuote, pLineData->GetFieldName(JTCS_FROM) ));
-                    aCondition.append(sEqual);
+                    aCondition.append(" = ");
                     aCondition.append(quoteTableAlias(true,pData->GetAliasName(JTCS_TO),aQuote));
                     aCondition.append(::dbtools::quoteName(aQuote, pLineData->GetFieldName(JTCS_TO) ));
                 }
@@ -2100,14 +2099,13 @@ namespace
     {
         SqlParseError eErrorCode = eOk;
         bool bFirstField = true;
-        OUString sAsterisk("*");
         OJoinTableView::OTableWindowMap::iterator aIter = _pTabList->begin();
         OJoinTableView::OTableWindowMap::iterator aEnd = _pTabList->end();
         for(;aIter != aEnd && eOk == eErrorCode ;++aIter)
         {
             OQueryTableWindow* pTabWin = static_cast<OQueryTableWindow*>(aIter->second.get());
             OTableFieldDescRef  aInfo = new OTableFieldDesc();
-            if (pTabWin->ExistsField( sAsterisk, aInfo ))
+            if (pTabWin->ExistsField( "*", aInfo ))
             {
                 eErrorCode = _pView->InsertField(aInfo, true, bFirstField);
                 bFirstField = false;
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index aaa5492..2d545ca 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1100,9 +1100,8 @@ static bool doc_paste(LibreOfficeKitDocument* pThis, const char* pMimeType, cons
         return false;
     }
 
-    OUString aCommand(".uno:Paste");
     uno::Sequence<beans::PropertyValue> aPropertyValues;
-    if (!comphelper::dispatchCommand(aCommand, aPropertyValues))
+    if (!comphelper::dispatchCommand(".uno:Paste", aPropertyValues))
     {
         gImpl->maLastExceptionMsg = "Failed to dispatch the .uno: command";
         return false;
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index c933dcf..bf69ff2 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -687,9 +687,9 @@ OUString desktop::splash::getImplementationName() {
     return OUString("com.sun.star.office.comp.SplashScreen");
 }
 
-css::uno::Sequence< OUString > desktop::splash::getSupportedServiceNames() {
-    OUString name("com.sun.star.office.SplashScreen");
-    return css::uno::Sequence< OUString >(&name, 1);
+css::uno::Sequence< OUString > desktop::splash::getSupportedServiceNames()
+{
+    return Sequence< OUString > { "com.sun.star.office.SplashScreen" };
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/splash/unxsplash.cxx b/desktop/source/splash/unxsplash.cxx
index 1170e84b..13daaef 100644
--- a/desktop/source/splash/unxsplash.cxx
+++ b/desktop/source/splash/unxsplash.cxx
@@ -163,9 +163,7 @@ OUString UnxSplash_getImplementationName()
 
 uno::Sequence< OUString > UnxSplash_getSupportedServiceNames() throw()
 {
-    const OUString aServiceName( "com.sun.star.office.PipeSplashScreen" );
-    const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
-    return aSeq;
+    return uno::Sequence< OUString > { "com.sun.star.office.PipeSplashScreen" };
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
index a87619b..70cae59 100644
--- a/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
+++ b/drawinglayer/source/drawinglayeruno/xprimitive2drenderer.cxx
@@ -82,9 +82,7 @@ namespace drawinglayer
     {
         uno::Sequence< OUString > XPrimitive2DRenderer_getSupportedServiceNames()
         {
-            OUString aServiceName("com.sun.star.graphic.Primitive2DTools" );
-            uno::Sequence< OUString > aServiceNames( &aServiceName, 1 );
-            return aServiceNames;
+            return uno::Sequence< OUString > { "com.sun.star.graphic.Primitive2DTools" };
         }
 
         OUString XPrimitive2DRenderer_getImplementationName()
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index fd129b9..ee59760 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -885,10 +885,9 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextCreateTextField( const OUSt
 
     // #i93308# up to OOo 3.2 we used this wrong namespace name with the capital T & F. This is
     // fixed since OOo 3.2 but for compatibility we will still provide support for the wrong notation.
-    const OUString aTextFieldPrexit2( "com.sun.star.text.TextField." );
 
     if( (ServiceSpecifier.startsWith( aTextFieldPrexit )) ||
-        (ServiceSpecifier.startsWith( aTextFieldPrexit2 )) )
+        (ServiceSpecifier.startsWith( "com.sun.star.text.TextField." )) )
     {
         OUString aFieldType( ServiceSpecifier.copy( aTextFieldPrexit.getLength() ) );
 
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index ca7b30a..6755405 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -208,7 +208,6 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
     sal_uInt64 nCount = pInputStream->Write(pBuf, nBytesRead);
     aTempInput.CloseStream();
 
-    OUString fileName("pstoedit" EXESUFFIX);
     //fdo#64161 pstoedit under non-windows uses libEMF to output the EMF, but
     //libEMF cannot calculate the bounding box of text, so the overall bounding
     //box is not increased to include that of any text in the eps
@@ -231,7 +230,8 @@ static bool RenderAsEMF(const sal_uInt8* pBuf, sal_uInt32 nBytesRead, Graphic &r
     oslFileHandle pIn = NULL;
     oslFileHandle pOut = NULL;
     oslFileHandle pErr = NULL;
-        oslProcessError eErr = runProcessWithPathSearch(fileName,
+        oslProcessError eErr = runProcessWithPathSearch(
+            "pstoedit" EXESUFFIX,
             args, sizeof(args)/sizeof(rtl_uString *),
             &aProcess, &pIn, &pOut, &pErr);
 
@@ -292,7 +292,7 @@ static void WriteFileInThread(void *wData)
 }
 
 static bool RenderAsBMPThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
-    Graphic &rGraphic, OUString &rProgName, rtl_uString *pArgs[], size_t nArgs)
+    Graphic &rGraphic, const OUString &rProgName, rtl_uString *pArgs[], size_t nArgs)
 {
     oslProcess aProcess;
     oslFileHandle pIn = NULL;
@@ -344,7 +344,6 @@ static bool RenderAsBMPThroughHelper(const sal_uInt8* pBuf, sal_uInt32 nBytesRea
 static bool RenderAsBMPThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
     Graphic &rGraphic)
 {
-    OUString fileName("convert" EXESUFFIX);
     // density in pixel/inch
     OUString arg1("-density");
     // since the preview is also used for PDF-Export & printing on non-PS-printers,
@@ -358,18 +357,15 @@ static bool RenderAsBMPThroughConvert(const sal_uInt8* pBuf, sal_uInt32 nBytesRe
     {
         arg1.pData, arg2.pData, arg3.pData, arg4.pData
     };
-    return RenderAsBMPThroughHelper(pBuf, nBytesRead, rGraphic, fileName, args,
+    return RenderAsBMPThroughHelper(pBuf, nBytesRead, rGraphic,
+        ("convert" EXESUFFIX),
+        args,
         sizeof(args)/sizeof(rtl_uString *));
 }
 
 static bool RenderAsBMPThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
     Graphic &rGraphic)
 {
-#ifdef WNT
-    OUString fileName("gswin32c" EXESUFFIX);
-#else
-    OUString fileName("gs" EXESUFFIX);
-#endif
     OUString arg1("-q");
     OUString arg2("-dBATCH");
     OUString arg3("-dNOPAUSE");
@@ -387,7 +383,13 @@ static bool RenderAsBMPThroughGS(const sal_uInt8* pBuf, sal_uInt32 nBytesRead,
         arg6.pData, arg7.pData, arg8.pData, arg9.pData, arg10.pData,
         arg11.pData
     };
-    return RenderAsBMPThroughHelper(pBuf, nBytesRead, rGraphic, fileName, args,
+    return RenderAsBMPThroughHelper(pBuf, nBytesRead, rGraphic,
+#ifdef WNT
+        "gswin32c" EXESUFFIX,
+#else
+        "gs" EXESUFFIX,
+#endif
+        args,
         sizeof(args)/sizeof(rtl_uString *));
 }
 
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index b4433da5..eb8e213 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -2472,10 +2472,9 @@ void ConvertEnhancedCustomShapeEquation( SdrObjCustomShape* pCustoShape,
     if ( pCustoShape )
     {
         uno::Sequence< OUString > sEquationSource;
-        const OUString sEquations( "Equations"  );
         const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(
             pCustoShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
-        const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( sEquations );
+        const uno::Any* pAny = rGeometryItem.GetPropertyValueByName( "Equations" );
         if ( pAny )
             *pAny >>= sEquationSource;
         sal_Int32 nEquationSourceCount = sEquationSource.getLength();
diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx
index c90a413..7d1943d 100644
--- a/forms/source/xforms/xpathlib/xpathlib.cxx
+++ b/forms/source/xforms/xpathlib/xpathlib.cxx
@@ -299,8 +299,6 @@ static bool parseDateTime(const OUString& aString, DateTime& aDateTime)
     sal_Int32 nDateLength = 10;
     sal_Int32 nTimeLength = 8;
 
-    OUString aUTCString("Z");
-
     OUString aDateString = aDateTimeString.copy(0, nDateLength);
     OUString aTimeString = aDateTimeString.copy(nDateLength+1, nTimeLength);
 
@@ -316,7 +314,7 @@ static bool parseDateTime(const OUString& aString, DateTime& aDateTime)
     Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear);
     tools::Time tmpTime(nHour, nMinute, nSecond);
     DateTime tmpDateTime(tmpDate, tmpTime);
-    if (aString.indexOf(aUTCString) < 0)
+    if (aString.indexOf("Z") < 0)
         tmpDateTime.ConvertToUTC();
 
     aDateTime = tmpDateTime;
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index 738aaef..11b7e20 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -300,18 +300,13 @@ bool implts_isFrameOrWindowTop( const uno::Reference< frame::XFrame >& xFrame )
 
 void impl_setDockingWindowVisibility( const css::uno::Reference< css::uno::XComponentContext>& rxContext, const css::uno::Reference< css::frame::XFrame >& rFrame, const OUString& rDockingWindowName, bool bVisible )
 {
-    const OUString aDockWinPrefixCommand( "DockingWindow" );
-
     sal_Int32 nID    = rDockingWindowName.toInt32();
     sal_Int32 nIndex = nID - DOCKWIN_ID_BASE;
 
     css::uno::Reference< css::frame::XDispatchProvider > xProvider(rFrame, css::uno::UNO_QUERY);
     if ( nIndex >= 0 && xProvider.is() )
     {
-        OUString aDockWinCommand( ".uno:" );
-        OUString aDockWinArgName( aDockWinPrefixCommand );
-
-        aDockWinArgName += OUString::number( nIndex );
+        OUString aDockWinArgName = "DockingWindow" + OUString::number( nIndex );
 
         css::uno::Sequence< css::beans::PropertyValue > aArgs(1);
         aArgs[0].Name  = aDockWinArgName;
@@ -319,7 +314,7 @@ void impl_setDockingWindowVisibility( const css::uno::Reference< css::uno::XComp
 
         css::uno::Reference< css::frame::XDispatchHelper > xDispatcher = css::frame::DispatchHelper::create( rxContext );
 
-        aDockWinCommand = aDockWinCommand + aDockWinArgName;
+        OUString aDockWinCommand = ".uno:" + aDockWinArgName;
         xDispatcher->executeDispatch(
             xProvider,
             aDockWinCommand,
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx
index d967a74..c68d174 100644
--- a/io/source/stm/opump.cxx
+++ b/io/source/stm/opump.cxx
@@ -467,9 +467,7 @@ OUString OPumpImpl_getImplementationName()
 
 Sequence<OUString> OPumpImpl_getSupportedServiceNames()
 {
-    OUString s("com.sun.star.io.Pump");
-    Sequence< OUString > seq( &s , 1 );
-    return seq;
+    return Sequence< OUString > { "com.sun.star.io.Pump" };
 }
 
 }
diff --git a/javaunohelper/source/javaunohelper.cxx b/javaunohelper/source/javaunohelper.cxx
index 86e0cd0..4fd51a2 100644
--- a/javaunohelper/source/javaunohelper.cxx
+++ b/javaunohelper/source/javaunohelper.cxx
@@ -72,8 +72,7 @@ jboolean Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
         lib.release();
 
         // ========================= LATEST VERSION =========================
-        OUString aGetEnvName( COMPONENT_GETENV );
-        oslGenericFunction pSym = lib.getFunctionSymbol(aGetEnvName);
+        oslGenericFunction pSym = lib.getFunctionSymbol(COMPONENT_GETENV);
         if (pSym)
         {
             Environment java_env, loader_env;
@@ -94,8 +93,7 @@ jboolean Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1writeInfo(
             uno_getEnvironment(
                 reinterpret_cast<uno_Environment **>(&java_env), java_env_name.pData, vm_access.get() );
 
-            OUString aWriteInfoName( COMPONENT_WRITEINFO );
-            pSym = lib.getFunctionSymbol(aWriteInfoName);
+            pSym = lib.getFunctionSymbol(COMPONENT_WRITEINFO);
             if (pSym)
             {
                 if (loader_env.is() && java_env.is())
@@ -164,8 +162,7 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
         lib.release();
 
         // ========================= LATEST VERSION =========================
-        OUString aGetEnvName( COMPONENT_GETENV );
-        oslGenericFunction pSym = lib.getFunctionSymbol(aGetEnvName);
+        oslGenericFunction pSym = lib.getFunctionSymbol(COMPONENT_GETENV);
         if (pSym)
         {
             Environment java_env, loader_env;
@@ -187,8 +184,7 @@ jobject Java_com_sun_star_comp_helper_SharedLibraryLoader_component_1getFactory(
             uno_getEnvironment(
                 reinterpret_cast<uno_Environment **>(&java_env), java_env_name.pData, vm_access.get() );
 
-            OUString aGetFactoryName( COMPONENT_GETFACTORY );
-            pSym = lib.getFunctionSymbol(aGetFactoryName);
+            pSym = lib.getFunctionSymbol(COMPONENT_GETFACTORY);
             if (pSym)
             {
                 if (loader_env.is() && java_env.is())
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 3463e74..1423c49 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -1038,12 +1038,11 @@ rtl::Reference<VendorBase> getJREInfoByPath(
 
     //find java.vendor property
     typedef vector<pair<OUString, OUString> >::const_iterator c_ip;
-    OUString sVendor("java.vendor");
     OUString sVendorName;
 
     for (c_ip i = props.begin(); i != props.end(); ++i)
     {
-        if (sVendor.equals(i->first))
+        if (i->first == "java.vendor")
         {
             sVendorName = i->second;
             break;
@@ -1254,10 +1253,9 @@ void addJavaInfosDirScan(
 
 
 
-    OUString usFile("file:///");
     for( int ii = 0; ii < cSearchPaths; ii ++)
     {
-        OUString usDir1(usFile + arPaths[ii]);
+        OUString usDir1("file:///" + arPaths[ii]);
         DirectoryItem item;
         if(DirectoryItem::get(usDir1, item) == File::E_None)
         {
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index 8292fab..ff178a1 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -293,9 +293,7 @@ OString BootParams::getClasspath()
 OUString BootParams::getVendorSettings()
 {
     OUString sVendor;
-    OUString sName(
-        UNO_JAVA_JFW_VENDOR_SETTINGS);
-    if (Bootstrap::get()->getFrom(sName ,sVendor))
+    if (Bootstrap::get()->getFrom(UNO_JAVA_JFW_VENDOR_SETTINGS, sVendor))
     {
         //check the value of the bootstrap variable
         jfw::FileStatus s = checkFileURL(sVendor);
@@ -407,17 +405,13 @@ JFW_MODE getMode()
         bool bDirectMode = true;
         OUString sValue;
         const rtl::Bootstrap * aBoot = Bootstrap::get();
-        OUString sJREHome(UNO_JAVA_JFW_JREHOME);
-        if (!aBoot->getFrom(sJREHome, sValue))
+        if (!aBoot->getFrom(UNO_JAVA_JFW_JREHOME, sValue))
         {
-            OUString sEnvJRE(UNO_JAVA_JFW_ENV_JREHOME);
-            if (!aBoot->getFrom(sEnvJRE, sValue))
+            if (!aBoot->getFrom(UNO_JAVA_JFW_ENV_JREHOME, sValue))
             {
-                OUString sClasspath(UNO_JAVA_JFW_CLASSPATH);
-                if (!aBoot->getFrom(sClasspath, sValue))
+                if (!aBoot->getFrom(UNO_JAVA_JFW_CLASSPATH, sValue))
                 {
-                    OUString sEnvClasspath(UNO_JAVA_JFW_ENV_CLASSPATH);
-                    if (!aBoot->getFrom(sEnvClasspath, sValue))
+                    if (!aBoot->getFrom(UNO_JAVA_JFW_ENV_CLASSPATH, sValue))
                     {
                         OUString sParams = UNO_JAVA_JFW_PARAMETER +
                             OUString::number(1);
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index dfe2d22..bc18293 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -853,13 +853,12 @@ static bool IsVers2OrNewer( const OUString& rFileURL, sal_uInt16& nLng, bool& bN
 {
     if (rFileURL.isEmpty())
         return false;
-    OUString aDIC("dic");
     OUString aExt;
     sal_Int32 nPos = rFileURL.lastIndexOf( '.' );
     if (-1 != nPos)
         aExt = rFileURL.copy( nPos + 1 ).toAsciiLowerCase();
 
-    if (aDIC != aExt)
+    if (aExt != "dic")
         return false;
 
     // get stream to be used
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 6875629..9eabc38 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -146,76 +146,40 @@ OUString GetFormulaParameter( const EnhancedCustomShapeParameter& rParameter )
         }
         break;
         case EnhancedCustomShapeParameterType::LEFT :
-        {
-            const OUString sLeft( "left" );
-            aRet = sLeft;
-        }
+            aRet = "left";
         break;
         case EnhancedCustomShapeParameterType::TOP :
-        {
-            const OUString sTop( "top" );
-            aRet = sTop;
-        }
+            aRet = "top";
         break;
         case EnhancedCustomShapeParameterType::RIGHT :
-        {
-            const OUString sRight( "right" );
-            aRet = sRight;
-        }
+            aRet = "right";
         break;
         case EnhancedCustomShapeParameterType::BOTTOM :
-        {
-            const OUString sBottom( "bottom" );
-            aRet = sBottom;
-        }
+            aRet = "bottom";
         break;
         case EnhancedCustomShapeParameterType::XSTRETCH :
-        {
-            const OUString sXStretch( "xstretch" );
-            aRet = sXStretch;
-        }
+            aRet = "xstretch";
         break;
         case EnhancedCustomShapeParameterType::YSTRETCH :
-        {
-            const OUString sYStretch( "ystretch" );
-            aRet = sYStretch;
-        }
+            aRet = "ystretch";
         break;
         case EnhancedCustomShapeParameterType::HASSTROKE :
-        {
-            const OUString sHasStroke( "hasstroke" );
-            aRet = sHasStroke;
-        }
+            aRet = "hasstroke";
         break;
         case EnhancedCustomShapeParameterType::HASFILL :
-        {
-            const OUString sHasFill( "hasfill"  );
-            aRet = sHasFill;
-        }
+            aRet = "hasfill";
         break;
         case EnhancedCustomShapeParameterType::WIDTH :
-        {
-            const OUString sWidth( "width"  );
-            aRet = sWidth;
-        }
+            aRet = "width";
         break;
         case EnhancedCustomShapeParameterType::HEIGHT :
-        {
-            const OUString sHeight( "height"  );
-            aRet = sHeight;
-        }
+            aRet = "height";
         break;
         case EnhancedCustomShapeParameterType::LOGWIDTH :
-        {
-            const OUString sLogWidth( "logwidth"  );
-            aRet = sLogWidth;
-        }
+            aRet = "logwidth";
         break;
         case EnhancedCustomShapeParameterType::LOGHEIGHT :
-        {
-            const OUString sLogHeight( "logheight"  );
-            aRet = sLogHeight;
-        }
+            aRet = "logheight";
         break;
     }
     return aRet;
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx
index 380fcfb..fc8e8a9 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -58,11 +58,10 @@ void CreateTableRows( uno::Reference< XTableRows > xTableRows, const std::vector
         xTableRows->insertByIndex( 0, rvTableRows.size() - 1 );
     std::vector< TableRow >::const_iterator aTableRowIter( rvTableRows.begin() );
     uno::Reference< container::XIndexAccess > xIndexAccess( xTableRows, UNO_QUERY_THROW );
-    const OUString sHeight("Height");
     for ( sal_Int32 n = 0; n < xIndexAccess->getCount(); n++ )
     {
         Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW );
-        xPropSet->setPropertyValue( sHeight, Any( static_cast< sal_Int32 >( aTableRowIter->getHeight() / 360 ) ) );
+        xPropSet->setPropertyValue( "Height", Any( static_cast< sal_Int32 >( aTableRowIter->getHeight() / 360 ) ) );
         ++aTableRowIter;
     }
 }
@@ -73,11 +72,10 @@ void CreateTableColumns( Reference< XTableColumns > xTableColumns, const std::ve
         xTableColumns->insertByIndex( 0, rvTableGrid.size() - 1 );
     std::vector< sal_Int32 >::const_iterator aTableGridIter( rvTableGrid.begin() );
     uno::Reference< container::XIndexAccess > xIndexAccess( xTableColumns, UNO_QUERY_THROW );
-    const OUString sWidth("Width");
     for ( sal_Int32 n = 0; n < xIndexAccess->getCount(); n++ )
     {
         Reference< XPropertySet > xPropSet( xIndexAccess->getByIndex( n ), UNO_QUERY_THROW );
-        xPropSet->setPropertyValue( sWidth, Any( static_cast< sal_Int32 >( *aTableGridIter++ / 360 ) ) );
+        xPropSet->setPropertyValue( "Width", Any( static_cast< sal_Int32 >( *aTableGridIter++ / 360 ) ) );
     }
 }
 
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index d3952fc..3b4967b 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -3558,7 +3558,6 @@ Reference< chart2::data::XDataSequence>  getLabeledSequence(
         const uno::Sequence< uno::Reference< chart2::data::XLabeledDataSequence > >& aSequences,
         bool bPositive )
 {
-    const OUString aRolePrefix( "error-bars" );
     OUString aDirection;
     if(bPositive)
         aDirection = "positive";
@@ -3573,7 +3572,7 @@ Reference< chart2::data::XDataSequence>  getLabeledSequence(
             uno::Reference< beans::XPropertySet > xSeqProp( xSequence, uno::UNO_QUERY_THROW );
             OUString aRole;
             if( ( xSeqProp->getPropertyValue( "Role" ) >>= aRole ) &&
-                    aRole.match( aRolePrefix ) && aRole.indexOf(aDirection) >= 0 )
+                    aRole.match( "error-bars" ) && aRole.indexOf(aDirection) >= 0 )
             {
                 return xSequence;
             }
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index 84727cd..0f948b2 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -73,14 +73,12 @@ namespace
 {
     static bool lcl_shouldEnableHelpSection( const Reference< XComponentContext >& _rxContext )
     {
-        const OUString sConfigName( "/org.openoffice.Office.ReportDesign/PropertyBrowser/" );
-        const OUString sPropertyName( "DirectHelp" );
-
         ::utl::OConfigurationTreeRoot aConfiguration(
-            ::utl::OConfigurationTreeRoot::createWithComponentContext( _rxContext, sConfigName ) );
+            ::utl::OConfigurationTreeRoot::createWithComponentContext(
+                _rxContext, "/org.openoffice.Office.ReportDesign/PropertyBrowser/" ) );
 
         bool bEnabled = false;
-        OSL_VERIFY( aConfiguration.getNodeValue( sPropertyName ) >>= bEnabled );
+        OSL_VERIFY( aConfiguration.getNodeValue( "DirectHelp"  ) >>= bEnabled );
         return bEnabled;
     }
 }
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 41b15ef..b6888e7 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -710,7 +710,6 @@ static bool lcl_HFPresentation
     SfxItemIter aIter( rSet );
     pItem = aIter.FirstItem();
     OUString aText;
-    OUString aDel(" + ");
 
     while( pItem )
     {
@@ -776,7 +775,7 @@ static bool lcl_HFPresentation
 
         if ( aText.getLength() )
         {
-            rText = rText + aText + aDel;
+            rText = rText + aText + " + ";
         }
 
         pItem = aIter.NextItem();
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index eb10b4f..f4c2958 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -2849,8 +2849,7 @@ static bool lcl_setVBARange( ScRange& aRange, ScDocument* pDok, SbxVariable* pPa
         xVBARange = ooo::vba::createVBAUnoAPIServiceWithArgs( pDok->GetDocumentShell(), "ooo.vba.excel.Range", aArgs );
         if ( xVBARange.is() )
         {
-            OUString sDummy("A-Range");
-            SbxObjectRef aObj = GetSbUnoObject( sDummy, uno::Any( xVBARange ) );
+            SbxObjectRef aObj = GetSbUnoObject( "A-Range", uno::Any( xVBARange ) );
             SetSbUnoObjectDfltPropName( aObj );
             bOk = pPar->PutObject( aObj );
         }
diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx
index 5451886..464ae7d 100644
--- a/scripting/source/dlgprov/dlgprov.cxx
+++ b/scripting/source/dlgprov/dlgprov.cxx
@@ -136,9 +136,8 @@ static const char aResourceResolverPropName[] = "ResourceResolver";
     {
         Reference< container::XNameContainer > xDialogModel(  lcl_createControlModel(i_xContext) );
 
-        OUString aDlgSrcUrlPropName( "DialogSourceURL"  );
         Reference< beans::XPropertySet > xDlgPropSet( xDialogModel, UNO_QUERY );
-        xDlgPropSet->setPropertyValue( aDlgSrcUrlPropName, aDialogSourceURL );
+        xDlgPropSet->setPropertyValue( "DialogSourceURL", aDialogSourceURL );
 
         // #TODO we really need to detect the source of the Dialog, is it
         // the dialog. E.g. if the dialog was created from basic ( then we just
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx b/sd/source/filter/xml/sdxmlwrp.cxx
index 190edaa..de06bbe 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -375,8 +375,7 @@ sal_Int32 ReadThroughComponent(
     DBG_ASSERT( xInfoSet.is(), "missing property set" );
     if( xInfoSet.is() )
     {
-        OUString sPropName( "StreamName" );
-        xInfoSet->setPropertyValue( sPropName, makeAny( sStreamName ) );
+        xInfoSet->setPropertyValue( "StreamName", makeAny( sStreamName ) );
     }
 
     try
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx
index c6c1445..bac92fa 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -867,7 +867,6 @@ static sal_Int32 calcMaxParaDepth( Reference< XShape > xTargetShape )
         if( xText.is() )
         {
             Reference< XPropertySet > xParaSet;
-            const OUString strNumberingLevel( "NumberingLevel" );
 
             Reference< XEnumeration > xEnumeration( xText->createEnumeration(), UNO_QUERY_THROW );
             while( xEnumeration->hasMoreElements() )
@@ -876,7 +875,7 @@ static sal_Int32 calcMaxParaDepth( Reference< XShape > xTargetShape )
                 if( xParaSet.is() )
                 {
                     sal_Int32 nParaDepth = 0;
-                    xParaSet->getPropertyValue( strNumberingLevel ) >>= nParaDepth;
+                    xParaSet->getPropertyValue( "NumberingLevel" ) >>= nParaDepth;
 
                     if( nParaDepth > nMaxParaDepth )
                         nMaxParaDepth = nParaDepth;
@@ -1027,15 +1026,13 @@ static bool hasVisibleShape( const Reference< XShape >& xShape )
         if( sShapeType == "com.sun.star.presentation.TitleTextShape" || sShapeType == "com.sun.star.presentation.OutlinerShape" ||
             sShapeType == "com.sun.star.presentation.SubtitleShape" || sShapeType == "com.sun.star.drawing.TextShape" )
         {
-            const OUString sFillStyle( "FillStyle" );
-            const OUString sLineStyle( "LineStyle" );
             Reference< XPropertySet > xSet( xShape, UNO_QUERY_THROW );
 
             FillStyle eFillStyle;
-            xSet->getPropertyValue( sFillStyle ) >>= eFillStyle;
+            xSet->getPropertyValue( "FillStyle" ) >>= eFillStyle;
 
             css::drawing::LineStyle eLineStyle;
-            xSet->getPropertyValue( sLineStyle ) >>= eLineStyle;
+            xSet->getPropertyValue( "LineStyle" ) >>= eLineStyle;
 
             return eFillStyle != FillStyle_NONE || eLineStyle != css::drawing::LineStyle_NONE;
         }
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 5f1a09a..7ec28cb 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -87,8 +87,7 @@ static void apply_table_style( SdrTableObj* pObj, SdrModel* pModel, const OUStri
         Reference< XNameAccess > xPool( dynamic_cast< XNameAccess* >( pModel->GetStyleSheetPool() ) );
         if( xPool.is() ) try
         {
-            const OUString sFamilyName("table" );
-            Reference< XNameContainer > xTableFamily( xPool->getByName( sFamilyName ), UNO_QUERY_THROW );
+            Reference< XNameContainer > xTableFamily( xPool->getByName( "table" ), UNO_QUERY_THROW );
             OUString aStdName( "default" );
             if( !sTableStyle.isEmpty() )
                 aStdName = sTableStyle;
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index f1e5614..d1d352c 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -1638,11 +1638,7 @@ void ImplPDFExportComments( uno::Reference< drawing::XDrawPage > xPage, vcl::PDF
 
 void ImplPDFExportShapeInteraction( uno::Reference< drawing::XShape > xShape, SdDrawDocument& rDoc, vcl::PDFExtOutDevData& rPDFExtOutDevData )
 {
-    const OUString sGroup   ( "com.sun.star.drawing.GroupShape");
-    const OUString sOnClick ( "OnClick" );
-    const OUString sBookmark( "Bookmark" );
-
-    if ( xShape->getShapeType().equals( sGroup ) )
+    if ( xShape->getShapeType() == "com.sun.star.drawing.GroupShape" )
     {
         uno::Reference< container::XIndexAccess > xIndexAccess( xShape, uno::UNO_QUERY );
         if ( xIndexAccess.is() )
@@ -1670,7 +1666,7 @@ void ImplPDFExportShapeInteraction( uno::Reference< drawing::XShape > xShape, Sd
             Rectangle   aLinkRect( Point( aShapePos.X, aShapePos.Y ), Size( aShapeSize.Width, aShapeSize.Height ) );
 
             presentation::ClickAction eCa;
-            uno::Any aAny( xShapePropSet->getPropertyValue( sOnClick ) );
+            uno::Any aAny( xShapePropSet->getPropertyValue( "OnClick" ) );
             if ( aAny >>= eCa )
             {
                 switch ( eCa )
@@ -1717,7 +1713,7 @@ void ImplPDFExportShapeInteraction( uno::Reference< drawing::XShape > xShape, Sd
                     case presentation::ClickAction_DOCUMENT :
                     {
                         OUString aBookmark;
-                        xShapePropSet->getPropertyValue( sBookmark ) >>= aBookmark;
+                        xShapePropSet->getPropertyValue( "Bookmark" ) >>= aBookmark;
                         if( !aBookmark.isEmpty() )
                         {
                             switch( eCa )
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 6000234..6133fe3 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1757,10 +1757,9 @@ namespace slideshowhelp
                 //show settings if any were set
                 Sequence< PropertyValue > aArguments(1);
                 PropertyValue aPage;
-                OUString sValue("0");
 
                 aPage.Name = "FirstPage";
-                aPage.Value <<= sValue;
+                aPage.Value <<= OUString("0");
 
                 aArguments[0] = aPage;
 
diff --git a/sdext/source/minimizer/graphiccollector.cxx b/sdext/source/minimizer/graphiccollector.cxx
index e341371..c5f59d6 100644
--- a/sdext/source/minimizer/graphiccollector.cxx
+++ b/sdext/source/minimizer/graphiccollector.cxx
@@ -62,9 +62,9 @@ const DeviceInfo& GraphicCollector::GetDeviceInfo( const Reference< XComponentCo
 void ImpAddEntity( std::vector< GraphicCollector::GraphicEntity >& rGraphicEntities, const GraphicSettings& rGraphicSettings, const GraphicCollector::GraphicUser& rUser )
 {
     const OUString aGraphicURL( rUser.maGraphicURL );
-    const OUString sPackageURL( "vnd.sun.star.GraphicObject:" );
 
-    if ( rGraphicSettings.mbEmbedLinkedGraphics || (aGraphicURL.isEmpty() || aGraphicURL.match( sPackageURL ) ) )
+    if ( rGraphicSettings.mbEmbedLinkedGraphics ||
+         aGraphicURL.isEmpty() || aGraphicURL.match( "vnd.sun.star.GraphicObject:" ) )
     {
         std::vector< GraphicCollector::GraphicEntity >::iterator aIter( rGraphicEntities.begin() );
         while( aIter != rGraphicEntities.end() )
@@ -221,18 +221,16 @@ void ImpCollectGraphicObjects( const Reference< XComponentContext >& rxMSF, cons
     {
         try
         {
-            const OUString sGraphicObjectShape( "com.sun.star.drawing.GraphicObjectShape"  );
-            const OUString sGroupShape( "com.sun.star.drawing.GroupShape"  );
             Reference< XShape > xShape( rxShapes->getByIndex( i ), UNO_QUERY_THROW );
             const OUString sShapeType( xShape->getShapeType() );
-            if ( sShapeType == sGroupShape )
+            if ( sShapeType == "com.sun.star.drawing.GroupShape" )
             {
                 Reference< XShapes > xShapes( xShape, UNO_QUERY_THROW );
                 ImpCollectGraphicObjects( rxMSF, xShapes, rGraphicSettings, rGraphicEntities );
                 continue;
             }
 
-            if ( sShapeType == sGraphicObjectShape )
+            if ( sShapeType == "com.sun.star.drawing.GraphicObjectShape" )
                 ImpAddGraphicEntity( rxMSF, xShape, rGraphicSettings, rGraphicEntities );
 
             // now check for a fillstyle
@@ -343,18 +341,16 @@ void ImpCountGraphicObjects( const Reference< XComponentContext >& rxMSF, const
     {
         try
         {
-            const OUString sGraphicObjectShape( "com.sun.star.drawing.GraphicObjectShape"  );
-            const OUString sGroupShape( "com.sun.star.drawing.GroupShape"  );
             Reference< XShape > xShape( rxShapes->getByIndex( i ), UNO_QUERY_THROW );
             const OUString sShapeType( xShape->getShapeType() );
-            if ( sShapeType == sGroupShape )
+            if ( sShapeType == "com.sun.star.drawing.GroupShape" )
             {
                 Reference< XShapes > xShapes( xShape, UNO_QUERY_THROW );
                 ImpCountGraphicObjects( rxMSF, xShapes, rGraphicSettings, rnGraphics );
                 continue;
             }
 
-            if ( sShapeType == sGraphicObjectShape )
+            if ( sShapeType == "com.sun.star.drawing.GraphicObjectShape" )
             {
                 rnGraphics++;
             }
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index 44af41c..f2be936 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -122,8 +122,7 @@ void ImpDeleteHiddenSlides(  const Reference< XModel >& rxModel )
             Reference< XPropertySet > xPropSet( xDrawPage, UNO_QUERY_THROW );
 
             bool bVisible = true;
-            const OUString sVisible( "Visible"  );
-            if ( xPropSet->getPropertyValue( sVisible ) >>= bVisible )
+            if ( xPropSet->getPropertyValue( "Visible" ) >>= bVisible )
             {
                 if (!bVisible )
                 {
@@ -153,8 +152,7 @@ void ImpDeleteNotesPages( const Reference< XModel >& rxModel )
             while( xShapes->getCount() )
                 xShapes->remove( Reference< XShape >( xShapes->getByIndex( xShapes->getCount() - 1 ), UNO_QUERY_THROW ) );
 
-            const OUString sLayout( "Layout"  );
-            xPropSet->setPropertyValue( sLayout, Any( (sal_Int16)21 ) );
+            xPropSet->setPropertyValue( "Layout", Any( (sal_Int16)21 ) );
         }
     }
     catch( Exception& )
@@ -173,9 +171,8 @@ void ImpConvertOLE( const Reference< XModel >& rxModel, sal_Int32 nOLEOptimizati
             Reference< XShapes > xShapes( xDrawPages->getByIndex( i ), UNO_QUERY_THROW );
             for ( sal_Int32 j = 0; j < xShapes->getCount(); j++ )
             {
-                const OUString sOLE2Shape( "com.sun.star.drawing.OLE2Shape"  );
                 Reference< XShape > xShape( xShapes->getByIndex( j ), UNO_QUERY_THROW );
-                if ( xShape->getShapeType() == sOLE2Shape )
+                if ( xShape->getShapeType() == "com.sun.star.drawing.OLE2Shape" )
                 {
                     Reference< XPropertySet > xPropSet( xShape, UNO_QUERY_THROW );
 
@@ -191,9 +188,8 @@ void ImpConvertOLE( const Reference< XModel >& rxModel, sal_Int32 nOLEOptimizati
                         Reference< XGraphic > xGraphic;
                         if ( xPropSet->getPropertyValue( "Graphic" ) >>= xGraphic )
                         {
-                            const OUString sGraphicShape( "com.sun.star.drawing.GraphicObjectShape"  );
                             Reference< XMultiServiceFactory > xFact( rxModel, UNO_QUERY_THROW );
-                            Reference< XShape > xShape2( xFact->createInstance( sGraphicShape ), UNO_QUERY_THROW );
+                            Reference< XShape > xShape2( xFact->createInstance( "com.sun.star.drawing.GraphicObjectShape" ), UNO_QUERY_THROW );
                             xShapes->add( xShape2 );
                             xShape2->setPosition( xShape->getPosition() );
                             xShape2->setSize( xShape->getSize() );
diff --git a/sfx2/source/appl/appinit.cxx b/sfx2/source/appl/appinit.cxx
index 4a038b5..7d7ee7b 100644
--- a/sfx2/source/appl/appinit.cxx
+++ b/sfx2/source/appl/appinit.cxx
@@ -185,8 +185,7 @@ OUString GetSpecialCharsForEdit(vcl::Window* pParent, const vcl::Font& rFont)
         aMod.loadRelative(&thisModule, SVLIBRARY("cui"));
 
         // get symbol
-        OUString aSymbol( "GetSpecialCharsForEdit"  );
-        pfunc_getSpecialCharsForEdit = reinterpret_cast<PFunc_getSpecialCharsForEdit>(aMod.getFunctionSymbol(aSymbol));
+        pfunc_getSpecialCharsForEdit = reinterpret_cast<PFunc_getSpecialCharsForEdit>(aMod.getFunctionSymbol("GetSpecialCharsForEdit"));
         DBG_ASSERT( pfunc_getSpecialCharsForEdit, "GetSpecialCharsForEdit() not found!" );
         aMod.release();
 #else
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 52ed0ff..0bea0bd 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -884,15 +884,13 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
     else
     {
         // transform parameter "OptionsPageURL" of slot "OptionsTreeDialog"
-        OUString sSlotName( "OptionsTreeDialog" );
-        OUString sPropName( "OptionsPageURL" );
-        if ( sSlotName == OUString( pSlot->pUnoName, strlen(pSlot->pUnoName), RTL_TEXTENCODING_UTF8 ) )
+        if ( "OptionsTreeDialog" == OUString( pSlot->pUnoName, strlen(pSlot->pUnoName), RTL_TEXTENCODING_UTF8 ) )
         {
             for ( sal_Int32 n = 0; n < nCount; ++n )
             {
                 const PropertyValue& rProp = pPropsVal[n];
                 OUString sName( rProp.Name );
-                if ( sName == sPropName )
+                if ( sName == "OptionsPageURL" )
                 {
                     OUString sURL;
                     if ( rProp.Value >>= sURL )
diff --git a/sfx2/source/config/evntconf.cxx b/sfx2/source/config/evntconf.cxx
index 3005e08..517e1f3 100644
--- a/sfx2/source/config/evntconf.cxx
+++ b/sfx2/source/config/evntconf.cxx
@@ -159,18 +159,14 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
             uno::Sequence < beans::PropertyValue > aProperties(3);
             beans::PropertyValue *pValues = aProperties.getArray();
 
-            OUString aType(STAR_BASIC );
-            OUString aLib  = pMacro->GetLibName();
-            OUString aMacro = pMacro->GetMacName();
-
             pValues[ 0 ].Name = PROP_EVENT_TYPE;
-            pValues[ 0 ].Value <<= aType;
+            pValues[ 0 ].Value <<= OUString("STAR_BASIC");
 
             pValues[ 1 ].Name = PROP_LIBRARY;
-            pValues[ 1 ].Value <<= aLib;
+            pValues[ 1 ].Value <<= pMacro->GetLibName();
 
             pValues[ 2 ].Name = PROP_MACRO_NAME;
-            pValues[ 2 ].Value <<= aMacro;
+            pValues[ 2 ].Value <<= pMacro->GetMacName();
 
             aEventData <<= aProperties;
         }
@@ -179,14 +175,11 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
             uno::Sequence < beans::PropertyValue > aProperties(2);
             beans::PropertyValue *pValues = aProperties.getArray();
 
-            OUString aLib   = pMacro->GetLibName();
-            OUString aMacro = pMacro->GetMacName();
-
             pValues[ 0 ].Name = PROP_EVENT_TYPE;
-            pValues[ 0 ].Value <<= aLib;
+            pValues[ 0 ].Value <<= pMacro->GetLibName();
 
             pValues[ 1 ].Name = PROP_SCRIPT;
-            pValues[ 1 ].Value <<= aMacro;
+            pValues[ 1 ].Value <<= pMacro->GetMacName();
 
             aEventData <<= aProperties;
         }
@@ -195,13 +188,11 @@ uno::Any CreateEventData_Impl( const SvxMacro *pMacro )
             uno::Sequence < beans::PropertyValue > aProperties(2);
             beans::PropertyValue *pValues = aProperties.getArray();
 
-            OUString aMacro  = pMacro->GetMacName();
-
             pValues[ 0 ].Name = PROP_EVENT_TYPE;
             pValues[ 0 ].Value <<= OUString(SVX_MACRO_LANGUAGE_JAVASCRIPT);
 
             pValues[ 1 ].Name = PROP_MACRO_NAME;
-            pValues[ 1 ].Value <<= aMacro;
+            pValues[ 1 ].Value <<= pMacro->GetMacName();
 
             aEventData <<= aProperties;
         }
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index ea8da23..3fb2ff5 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -987,11 +987,6 @@ namespace sfx2
         std::vector< ExportFilter >         aFilterGroup;
         Reference< XFilterGroupManager >    xFilterGroupManager( _rxFilterManager, UNO_QUERY );
         OUString                     sTypeName;
-        const OUString               sWriterHTMLType( "generic_HTML" );
-        const OUString               sGraphicHTMLType( "graphic_HTML" );
-        const OUString               sXHTMLType( "XHTML_File" );
-        const OUString               sPDFType( "pdf_Portable_Document_Format" );
-        const OUString               sFlashType( "graphic_SWF" );
 
         for ( const SfxFilter* pFilter = _rFilterMatcher.First(); pFilter; pFilter = _rFilterMatcher.Next() )
         {
@@ -1001,12 +996,12 @@ namespace sfx2
             ExportFilter aExportFilter( sUIName, sExtensions );
 
             if ( nHTMLIndex == -1 &&
-                ( sTypeName.equals( sWriterHTMLType ) || sTypeName.equals( sGraphicHTMLType ) ) )
+                ( sTypeName == "generic_HTML" || sTypeName == "graphic_HTML" ) )
             {
                 aImportantFilterGroup.insert( aImportantFilterGroup.begin(), aExportFilter );
                 nHTMLIndex = 0;
             }
-            else if ( nXHTMLIndex == -1 && sTypeName.equals( sXHTMLType ) )
+            else if ( nXHTMLIndex == -1 && sTypeName == "XHTML_File" )
             {
                 std::vector< ExportFilter >::iterator aIter = aImportantFilterGroup.begin();
                 if ( nHTMLIndex == -1 )
@@ -1015,7 +1010,7 @@ namespace sfx2
                     aImportantFilterGroup.insert( ++aIter, aExportFilter );
                 nXHTMLIndex = 0;
             }
-            else if ( nPDFIndex == -1 && sTypeName.equals( sPDFType ) )
+            else if ( nPDFIndex == -1 && sTypeName == "pdf_Portable_Document_Format" )
             {
                 std::vector< ExportFilter >::iterator aIter = aImportantFilterGroup.begin();
                 if ( nHTMLIndex != -1 )
@@ -1025,7 +1020,7 @@ namespace sfx2
                 aImportantFilterGroup.insert( aIter, aExportFilter );
                 nPDFIndex = 0;
             }
-            else if ( nFlashIndex == -1 && sTypeName.equals( sFlashType ) )
+            else if ( nFlashIndex == -1 && sTypeName == "graphic_SWF" )
             {
                 std::vector< ExportFilter >::iterator aIter = aImportantFilterGroup.begin();
                 if ( nHTMLIndex != -1 )
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index f6a1cd2..3a702be 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -3488,8 +3488,6 @@ static void ConvertSlotsToCommands( SfxObjectShell* pDoc, Reference< container::
     if ( pDoc )
     {
         SfxModule*    pModule( pDoc->GetFactory().GetModule() );
-        OUString aSlotCmd( "slot:" );
-        OUString aUnoCmd( ".uno:" );
         Sequence< beans::PropertyValue > aSeqPropValue;
 
         for ( sal_Int32 i = 0; i < rToolbarDefinition->getCount(); i++ )
@@ -3500,7 +3498,7 @@ static void ConvertSlotsToCommands( SfxObjectShell* pDoc, Reference< container::
             if ( rToolbarDefinition->getByIndex( i ) >>= aSeqPropValue )
             {
                 GetCommandFromSequence( aCommand, nIndex, aSeqPropValue );
-                if ( nIndex >= 0 && ( aCommand.startsWith( aSlotCmd ) ))
+                if ( nIndex >= 0 && aCommand.startsWith( "slot:" ) )
                 {
                     OUString aSlot( aCommand.copy( 5 ));
 
@@ -3508,7 +3506,7 @@ static void ConvertSlotsToCommands( SfxObjectShell* pDoc, Reference< container::
                     const SfxSlot* pSlot = pModule->GetSlotPool()->GetSlot( sal_uInt16( aSlot.toInt32() ));
                     if ( pSlot )
                     {
-                        OUStringBuffer aStrBuf( aUnoCmd );
+                        OUStringBuffer aStrBuf( ".uno:"  );
                         aStrBuf.appendAscii( pSlot->GetUnoName() );
 
                         aCommand = aStrBuf.makeStringAndClear();
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index b3f33ad..50e864e 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -201,8 +201,7 @@ OUString serviceGetImplementationName()
 
 css::uno::Sequence< OUString > serviceGetSupportedServiceNames()
 {
-    OUString aServiceName("com.sun.star.java.JavaVirtualMachine");
-    return css::uno::Sequence< OUString >(&aServiceName, 1);
+    return css::uno::Sequence< OUString > { "com.sun.star.java.JavaVirtualMachine" };
 }
 
 css::uno::Reference< css::uno::XInterface > SAL_CALL serviceCreateInstance(
diff --git a/svgio/source/svguno/xsvgparser.cxx b/svgio/source/svguno/xsvgparser.cxx
index 7c61413..4c722a0 100644
--- a/svgio/source/svguno/xsvgparser.cxx
+++ b/svgio/source/svguno/xsvgparser.cxx
@@ -70,9 +70,7 @@ namespace svgio
     {
         uno::Sequence< OUString > XSvgParser_getSupportedServiceNames()
         {
-            OUString aServiceName("com.sun.star.graphic.SvgTools" );
-            uno::Sequence< OUString > aServiceNames( &aServiceName, 1 );
-            return aServiceNames;
+            return uno::Sequence< OUString > { "com.sun.star.graphic.SvgTools" };
         }
 
         OUString XSvgParser_getImplementationName()
diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx
index d7bcdbd..8caf6c6 100644
--- a/svx/source/form/fmPropBrw.cxx
+++ b/svx/source/form/fmPropBrw.cxx
@@ -495,14 +495,13 @@ namespace
 {
     static bool lcl_shouldEnableHelpSection( const Reference< XComponentContext >& _rxContext )
     {
-        const OUString sConfigName( "/org.openoffice.Office.Common/Forms/PropertyBrowser/" );
-        const OUString sPropertyName( "DirectHelp" );
-
         ::utl::OConfigurationTreeRoot aConfiguration(
-            ::utl::OConfigurationTreeRoot::createWithComponentContext( _rxContext, sConfigName ) );
+            ::utl::OConfigurationTreeRoot::createWithComponentContext(
+                _rxContext,
+                "/org.openoffice.Office.Common/Forms/PropertyBrowser/" ) );
 
         bool bEnabled = false;
-        OSL_VERIFY( aConfiguration.getNodeValue( sPropertyName ) >>= bEnabled );
+        OSL_VERIFY( aConfiguration.getNodeValue( "DirectHelp" ) >>= bEnabled );
         return bEnabled;
     }
 }
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index c03e0e9..6f21751 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -175,9 +175,8 @@ static MSO_SPT ImpGetCustomShapeType( const SdrObjCustomShape& rCustoShape )
     if ( aEngine.isEmpty() || aEngine == "com.sun.star.drawing.EnhancedCustomShapeEngine" )
     {
         OUString sShapeType;
-        const OUString sType( "Type" );
         const SdrCustomShapeGeometryItem& rGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(rCustoShape.GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )) );
-        const Any* pAny = rGeometryItem.GetPropertyValueByName( sType );
+        const Any* pAny = rGeometryItem.GetPropertyValueByName( "Type" );
         if ( pAny && ( *pAny >>= sShapeType ) )
             eRetValue = EnhancedCustomShapeTypeNames::Get( sShapeType );
     }
@@ -738,62 +737,55 @@ static void lcl_ShapePropertiesFromDFF( const SvxMSDffHandle* pData, css::beans:
 
     // POSITION
     {
-        const OUString sPosition( "Position" );
         css::drawing::EnhancedCustomShapeParameterPair aPosition;
         EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aPosition.First, pData->nPositionX, true, true );
         EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aPosition.Second, pData->nPositionY, true, false );
-        rPropValues[ n ].Name = sPosition;
+        rPropValues[ n ].Name = "Position";
         rPropValues[ n++ ].Value <<= aPosition;
     }
     if ( nFlags & SvxMSDffHandleFlags::MIRRORED_X )
     {
-        const OUString sMirroredX( "MirroredX" );
         bool bMirroredX = true;
-        rPropValues[ n ].Name = sMirroredX;
+        rPropValues[ n ].Name = "MirroredX";
         rPropValues[ n++ ].Value <<= bMirroredX;
     }
     if ( nFlags & SvxMSDffHandleFlags::MIRRORED_Y )
     {
-        const OUString sMirroredY( "MirroredY" );
         bool bMirroredY = true;
-        rPropValues[ n ].Name = sMirroredY;
+        rPropValues[ n ].Name = "MirroredY";
         rPropValues[ n++ ].Value <<= bMirroredY;
     }
     if ( nFlags & SvxMSDffHandleFlags::SWITCHED )
     {
-        const OUString sSwitched( "Switched" );
         bool bSwitched = true;
-        rPropValues[ n ].Name = sSwitched;
+        rPropValues[ n ].Name = "Switched";
         rPropValues[ n++ ].Value <<= bSwitched;
     }
     if ( nFlags & SvxMSDffHandleFlags::POLAR )
     {
-        const OUString sPolar( "Polar" );
         css::drawing::EnhancedCustomShapeParameterPair aCenter;
         EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aCenter.First, pData->nCenterX,
                            bool( nFlags & SvxMSDffHandleFlags::CENTER_X_IS_SPECIAL ), true  );
         EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aCenter.Second, pData->nCenterY,
                            bool( nFlags & SvxMSDffHandleFlags::CENTER_Y_IS_SPECIAL ), false );
-        rPropValues[ n ].Name = sPolar;
+        rPropValues[ n ].Name = "Polar";
         rPropValues[ n++ ].Value <<= aCenter;
         if ( nFlags & SvxMSDffHandleFlags::RADIUS_RANGE )
         {
             if ( pData->nRangeXMin != DEFAULT_MINIMUM_SIGNED_COMPARE )
             {
-                const OUString sRadiusRangeMinimum( "RadiusRangeMinimum" );
                 css::drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum;
                 EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRadiusRangeMinimum, pData->nRangeXMin,
                            bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MIN_IS_SPECIAL ), true  );
-                rPropValues[ n ].Name = sRadiusRangeMinimum;
+                rPropValues[ n ].Name = "RadiusRangeMinimum";
                 rPropValues[ n++ ].Value <<= aRadiusRangeMinimum;
             }
             if ( pData->nRangeXMax != DEFAULT_MAXIMUM_SIGNED_COMPARE )
             {
-                const OUString sRadiusRangeMaximum( "RadiusRangeMaximum" );
                 css::drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum;
                 EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRadiusRangeMaximum, pData->nRangeXMax,
                            bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MAX_IS_SPECIAL ), false );
-                rPropValues[ n ].Name = sRadiusRangeMaximum;
+                rPropValues[ n ].Name = "RadiusRangeMaximum";
                 rPropValues[ n++ ].Value <<= aRadiusRangeMaximum;
             }
         }
@@ -802,38 +794,34 @@ static void lcl_ShapePropertiesFromDFF( const SvxMSDffHandle* pData, css::beans:
     {
         if ( pData->nRangeXMin != DEFAULT_MINIMUM_SIGNED_COMPARE )
         {
-            const OUString sRangeXMinimum( "RangeXMinimum" );
             css::drawing::EnhancedCustomShapeParameter aRangeXMinimum;
             EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRangeXMinimum, pData->nRangeXMin,
                            bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MIN_IS_SPECIAL ), true  );
-            rPropValues[ n ].Name = sRangeXMinimum;
+            rPropValues[ n ].Name = "RangeXMinimum";
             rPropValues[ n++ ].Value <<= aRangeXMinimum;
         }
         if ( pData->nRangeXMax != DEFAULT_MAXIMUM_SIGNED_COMPARE )
         {
-            const OUString sRangeXMaximum( "RangeXMaximum" );
             css::drawing::EnhancedCustomShapeParameter aRangeXMaximum;
             EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRangeXMaximum, pData->nRangeXMax,
                            bool( nFlags & SvxMSDffHandleFlags::RANGE_X_MAX_IS_SPECIAL ), false );
-            rPropValues[ n ].Name = sRangeXMaximum;
+            rPropValues[ n ].Name = "RangeXMaximum";
             rPropValues[ n++ ].Value <<= aRangeXMaximum;
         }
         if ( pData->nRangeYMin != DEFAULT_MINIMUM_SIGNED_COMPARE )
         {
-            const OUString sRangeYMinimum( "RangeYMinimum" );
             css::drawing::EnhancedCustomShapeParameter aRangeYMinimum;
             EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRangeYMinimum, pData->nRangeYMin,
                              bool( nFlags & SvxMSDffHandleFlags::RANGE_Y_MIN_IS_SPECIAL ), true );
-            rPropValues[ n ].Name = sRangeYMinimum;
+            rPropValues[ n ].Name = "RangeYMinimum";
             rPropValues[ n++ ].Value <<= aRangeYMinimum;
         }
         if ( pData->nRangeYMax != DEFAULT_MAXIMUM_SIGNED_COMPARE )
         {
-            const OUString sRangeYMaximum( "RangeYMaximum" );
             css::drawing::EnhancedCustomShapeParameter aRangeYMaximum;
             EnhancedCustomShape2d::SetEnhancedCustomShapeHandleParameter( aRangeYMaximum, pData->nRangeYMax,
                              bool( nFlags & SvxMSDffHandleFlags::RANGE_Y_MAX_IS_SPECIAL ), false );
-            rPropValues[ n ].Name = sRangeYMaximum;
+            rPropValues[ n ].Name = "RangeYMaximum";
             rPropValues[ n++ ].Value <<= aRangeYMaximum;
         }
     }
diff --git a/svx/source/toolbars/extrusionbar.cxx b/svx/source/toolbars/extrusionbar.cxx
index 1185081..b1fed14 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -449,20 +449,17 @@ static void impl_execute( SdrView*, SfxRequest& rReq, SdrCustomShapeGeometryItem
 
             if((nDirection >= 0) && (nDirection < 9))
             {
-                const OUString sFirstLightDirection( "FirstLightDirection" );
-                const OUString sSecondLightDirection( "SecondLightDirection" );
-
                 const Direction3D * pLighting1Defaults;
                 const Direction3D * pLighting2Defaults;
 
                 getLightingDirectionDefaults( &pLighting1Defaults, &pLighting2Defaults );
 
                 css::beans::PropertyValue aPropValue;
-                aPropValue.Name = sFirstLightDirection;
+                aPropValue.Name = "FirstLightDirection";
                 aPropValue.Value <<= pLighting1Defaults[nDirection];
                 rGeometryItem.SetPropertyValue( sExtrusion,  aPropValue );
 
-                aPropValue.Name = sSecondLightDirection;
+                aPropValue.Name = "SecondLightDirection";
                 aPropValue.Value <<= pLighting2Defaults[nDirection];
                 rGeometryItem.SetPropertyValue( sExtrusion,  aPropValue );
             }
diff --git a/svx/source/toolbars/fontworkbar.cxx b/svx/source/toolbars/fontworkbar.cxx
index f981076..25f2f8c 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -141,9 +141,8 @@ void SetFontWorkShapeTypeState( SdrView* pSdrView, SfxItemSet& rSet )
         SdrObject* pObj = rMarkList.GetMark( i )->GetMarkedSdrObj();
         if( dynamic_cast<const SdrObjCustomShape*>( pObj) !=  nullptr )
         {
-            const OUString sType( "Type" );
             const SdrCustomShapeGeometryItem aGeometryItem( static_cast<const SdrCustomShapeGeometryItem&>(pObj->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY )));
-            const Any* pAny = aGeometryItem.GetPropertyValueByName( sType );
+            const Any* pAny = aGeometryItem.GetPropertyValueByName( "Type" );
             if( pAny )
             {
                 OUString aType;
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index d3c2213..0076ed0 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -98,9 +98,7 @@ OUString DocxExportFilter::getImplementationName() throw (css::uno::RuntimeExcep
 
 uno::Sequence< OUString > SAL_CALL DocxExport_getSupportedServiceNames() throw()
 {
-    const OUString aServiceName( "com.sun.star.document.ExportFilter" );
-    const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
-    return aSeq;
+    return uno::Sequence< OUString > { "com.sun.star.document.ExportFilter" };
 }
 
 uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 466e539..b7ea8f2 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -107,9 +107,7 @@ OUString RtfExport_getImplementationName()
 
 uno::Sequence< OUString > SAL_CALL RtfExport_getSupportedServiceNames() throw()
 {
-    const OUString aServiceName("com.sun.star.document.ExportFilter");
-    const uno::Sequence< OUString > aSeq(&aServiceName, 1);
-    return aSeq;
+    return uno::Sequence< OUString > { "com.sun.star.document.ExportFilter" };
 }
 
 uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< uno::XComponentContext >& xCtx) throw(uno::Exception)
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 868bf06..02f296e 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -862,7 +862,7 @@ static void lcl_RemoveSectionLinks( SwWrtShell& rWorkShell )
 static void lcl_SaveDoc( SfxObjectShell *xTargetDocShell,
                          const char *name, int no = 0 )
 {
-    OUString sExt( ".odt" );
+    const OUString sExt( ".odt" );
     OUString basename = OUString::createFromAscii( name );
     if (no > 0)
         basename += OUString::number(no) + "-";
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 2732977..3f9ced7 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -138,8 +138,6 @@ namespace SwLangHelper
                 const OUString aSelectionLangPrefix("Current_");
                 const OUString aParagraphLangPrefix("Paragraph_");
                 const OUString aDocumentLangPrefix("Default_");
-                const OUString aStrNone("LANGUAGE_NONE");
-                const OUString aStrResetLangs("RESET_LANGUAGES");
 
                 sal_Int32 nPos = 0;
                 bool bForSelection = true;
@@ -181,9 +179,9 @@ namespace SwLangHelper
                     rSh.ExtendedSelectAll();
                 }
 
-                if (aNewLangText == aStrNone)
+                if (aNewLangText == "LANGUAGE_NONE")
                     SwLangHelper::SetLanguage_None( rSh, pOLV, aSelection, bForSelection, aEditAttr );
-                else if (aNewLangText == aStrResetLangs)
+                else if (aNewLangText == "RESET_LANGUAGES")
                     SwLangHelper::ResetLanguages( rSh, pOLV, aSelection, bForSelection );
                 else
                     SwLangHelper::SetLanguage( rSh, pOLV, aSelection, aNewLangText, bForSelection, aEditAttr );
diff --git a/unodevtools/source/unodevtools/options.cxx b/unodevtools/source/unodevtools/options.cxx
index a2fc5f3..8e0e870 100644
--- a/unodevtools/source/unodevtools/options.cxx
+++ b/unodevtools/source/unodevtools/options.cxx
@@ -88,12 +88,10 @@ bool readOption( OUString * pValue, const sal_Char * pOpt,
 bool readOption( sal_Bool * pbOpt, const sal_Char * pOpt,
                      sal_uInt32 * pnIndex, const OUString & aArg)
 {
-    const OUString dashdash("--");
-    const OUString dash("-");
     OUString aOpt = OUString::createFromAscii(pOpt);
 
-    if((aArg.startsWith(dash) && aOpt.equalsIgnoreAsciiCase(aArg.copy(1))) ||
-       (aArg.startsWith(dashdash) && aOpt.equalsIgnoreAsciiCase(aArg.copy(2))) )
+    if((aArg.startsWith("-") && aOpt.equalsIgnoreAsciiCase(aArg.copy(1))) ||
+       (aArg.startsWith("--") && aOpt.equalsIgnoreAsciiCase(aArg.copy(2))) )
     {
         ++(*pnIndex);
         *pbOpt = sal_True;
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx
index 40dcf5d5..3ad6fc8 100644
--- a/unotools/source/config/bootstrap.cxx
+++ b/unotools/source/config/bootstrap.cxx
@@ -395,9 +395,7 @@ Bootstrap::PathStatus implGetBootstrapFile(rtl::Bootstrap& _rData, Bootstrap::Im
 static
 Bootstrap::PathStatus implGetVersionFile(rtl::Bootstrap& _rData, Bootstrap::Impl::PathData & _rVersionFile)
 {
-    OUString const csVersionFileItem(BOOTSTRAP_ITEM_VERSIONFILE);
-
-    _rData.getFrom(csVersionFileItem,_rVersionFile.path);
+    _rData.getFrom(BOOTSTRAP_ITEM_VERSIONFILE, _rVersionFile.path);
 
     return updateStatus(_rVersionFile);
 }
diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx
index aa72b3c..e45911c 100644
--- a/vbahelper/source/vbahelper/vbahelper.cxx
+++ b/vbahelper/source/vbahelper/vbahelper.cxx

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list