[Libreoffice-commits] core.git: basctl/source basegfx/source basic/source connectivity/source cppcanvas/source cui/source dbaccess/source desktop/source drawinglayer/source editeng/source extensions/source filter/source formula/source framework/inc framework/source i18npool/source jvmfwk/plugins lingucomponent/source linguistic/source oox/source reportdesign/source scripting/source sc/source sdext/source sd/source sfx2/source slideshow/source starmath/source stoc/source svl/source svtools/source svx/source sw/source toolkit/source tools/source ucb/source vcl/source writerfilter/source xmlhelp/source xmloff/source xmlsecurity/source

Noel Grandin noel at peralex.com
Mon Apr 18 07:37:56 UTC 2016


 basctl/source/basicide/basides1.cxx                           |   16 
 basegfx/source/curve/b2dbeziertools.cxx                       |    2 
 basic/source/sbx/sbxscan.cxx                                  |    2 
 connectivity/source/commontools/predicateinput.cxx            |    8 
 connectivity/source/drivers/mork/MConnection.cxx              |    4 
 cppcanvas/source/mtfrenderer/implrenderer.cxx                 |    3 
 cui/source/customize/cfg.cxx                                  |    2 
 cui/source/customize/macropg.cxx                              |    5 
 cui/source/dialogs/about.cxx                                  |    2 
 cui/source/dialogs/cuigaldlg.cxx                              |    3 
 cui/source/options/optopencl.cxx                              |    2 
 cui/source/options/treeopt.cxx                                |    3 
 cui/source/tabpages/backgrnd.cxx                              |    4 
 cui/source/tabpages/paragrph.cxx                              |    2 
 dbaccess/source/core/dataaccess/databasecontext.cxx           |    2 
 dbaccess/source/core/misc/dsntypes.cxx                        |   16 
 dbaccess/source/core/recovery/subcomponentrecovery.cxx        |    2 
 dbaccess/source/ui/app/AppDetailPageHelper.cxx                |    3 
 dbaccess/source/ui/browser/unodatbr.cxx                       |    7 
 dbaccess/source/ui/control/SqlNameEdit.cxx                    |    9 
 dbaccess/source/ui/dlg/dbwizsetup.cxx                         |    5 
 dbaccess/source/ui/misc/UITools.cxx                           |    7 
 dbaccess/source/ui/misc/indexcollection.cxx                   |   16 
 dbaccess/source/ui/querydesign/QueryDesignView.cxx            |   17 
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx         |    7 
 dbaccess/source/ui/querydesign/limitboxcontroller.cxx         |    3 
 dbaccess/source/ui/querydesign/querycontroller.cxx            |    3 
 desktop/source/app/sofficemain.cxx                            |    2 
 desktop/source/deployment/misc/dp_misc.cxx                    |    3 
 desktop/source/lib/init.cxx                                   |    2 
 drawinglayer/source/primitive2d/metafileprimitive2d.cxx       |    4 
 drawinglayer/source/primitive2d/sceneprimitive2d.cxx          |    2 
 drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx  |    2 
 drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx   |    2 
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx    |    5 
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx       |    2 
 drawinglayer/source/processor3d/cutfindprocessor3d.cxx        |    2 
 drawinglayer/source/processor3d/defaultprocessor3d.cxx        |    4 
 drawinglayer/source/processor3d/geometry2dextractor.cxx       |    2 
 drawinglayer/source/tools/converters.cxx                      |    3 
 editeng/source/editeng/eehtml.cxx                             |    5 
 editeng/source/editeng/impedit3.cxx                           |   13 
 editeng/source/misc/svxacorr.cxx                              |   20 -
 extensions/source/bibliography/bibload.cxx                    |   10 
 extensions/source/bibliography/toolbar.cxx                    |    3 
 extensions/source/propctrlr/eformspropertyhandler.cxx         |    2 
 extensions/source/propctrlr/stringrepresentation.cxx          |   13 
 extensions/source/resource/oooresourceloader.cxx              |    3 
 filter/source/config/cache/cacheitem.cxx                      |    4 
 filter/source/flash/swfwriter1.cxx                            |    3 
 filter/source/msfilter/escherex.cxx                           |    7 
 filter/source/msfilter/msdffimp.cxx                           |    4 
 filter/source/svg/svgfontexport.cxx                           |    2 
 filter/source/svg/svgreader.cxx                               |    5 
 filter/source/svg/svgwriter.cxx                               |   18 
 filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx           |    5 
 formula/source/ui/dlg/FormulaHelper.cxx                       |    3 
 formula/source/ui/dlg/funcpage.cxx                            |    4 
 framework/inc/uielement/toolbarmerger.hxx                     |   12 
 framework/source/dispatch/dispatchprovider.cxx                |   22 -
 framework/source/fwe/classes/addonsoptions.cxx                |   14 
 framework/source/fwe/xml/menudocumenthandler.cxx              |   15 
 framework/source/layoutmanager/layoutmanager.cxx              |   10 
 framework/source/layoutmanager/toolbarlayoutmanager.cxx       |   11 
 framework/source/services/pathsettings.cxx                    |    3 
 framework/source/uielement/menubarmanager.cxx                 |    3 
 framework/source/uielement/toolbarmanager.cxx                 |    6 
 framework/source/uielement/toolbarmerger.cxx                  |   38 -
 i18npool/source/search/textsearch.cxx                         |   50 +-
 jvmfwk/plugins/sunmajor/pluginlib/util.cxx                    |    3 
 lingucomponent/source/spellcheck/spell/sspellimp.cxx          |    3 
 linguistic/source/dicimp.cxx                                  |   26 -
 linguistic/source/lngsvcmgr.cxx                               |   12 
 linguistic/source/misc.cxx                                    |    5 
 oox/source/drawingml/shape3dproperties.cxx                    |    2 
 oox/source/ole/axcontrol.cxx                                  |   32 -
 reportdesign/source/core/api/ReportDefinition.cxx             |    3 
 reportdesign/source/filter/xml/xmlExport.cxx                  |    2 
 sc/source/core/data/document.cxx                              |    4 
 sc/source/core/data/global2.cxx                               |   13 
 sc/source/core/tool/addincol.cxx                              |    6 
 sc/source/core/tool/compiler.cxx                              |    7 
 sc/source/core/tool/editutil.cxx                              |    2 
 sc/source/core/tool/queryparam.cxx                            |   31 -
 sc/source/core/tool/userlist.cxx                              |    3 
 sc/source/filter/excel/xehelper.cxx                           |   16 
 sc/source/filter/excel/xihelper.cxx                           |    2 
 sc/source/filter/html/htmlexp.cxx                             |    9 
 sc/source/filter/xcl97/xcl97rec.cxx                           |    2 
 sc/source/filter/xml/xmlimprt.cxx                             |   11 
 sc/source/ui/condformat/condformatmgr.cxx                     |    2 
 sc/source/ui/docshell/docfunc.cxx                             |    2 
 sc/source/ui/docshell/docsh.cxx                               |    6 
 sc/source/ui/docshell/docsh6.cxx                              |    6 
 sc/source/ui/docshell/docsh8.cxx                              |    5 
 sc/source/ui/undo/undostyl.cxx                                |    4 
 sc/source/ui/unoobj/addruno.cxx                               |   25 -
 sc/source/ui/unoobj/afmtuno.cxx                               |   29 -
 sc/source/ui/unoobj/appluno.cxx                               |   77 +--
 sc/source/ui/unoobj/cellsuno.cxx                              |   56 +-
 sc/source/ui/unoobj/dapiuno.cxx                               |  123 +++---
 sc/source/ui/unoobj/datauno.cxx                               |  141 +++----
 sc/source/ui/unoobj/docuno.cxx                                |  193 ++++------
 sc/source/ui/unoobj/fmtuno.cxx                                |   52 +-
 sc/source/ui/unoobj/funcuno.cxx                               |    2 
 sc/source/ui/unoobj/linkuno.cxx                               |   72 +--
 sc/source/ui/unoobj/shapeuno.cxx                              |   45 +-
 sc/source/ui/unoobj/srchuno.cxx                               |   64 +--
 sc/source/ui/unoobj/styleuno.cxx                              |   22 -
 sc/source/ui/unoobj/targuno.cxx                               |   11 
 sc/source/ui/unoobj/textuno.cxx                               |    3 
 sc/source/ui/unoobj/tokenuno.cxx                              |   26 -
 sc/source/ui/unoobj/viewuno.cxx                               |   86 ++--
 sc/source/ui/vba/vbarange.cxx                                 |   11 
 sc/source/ui/view/viewdata.cxx                                |    5 
 sc/source/ui/view/viewfun2.cxx                                |    3 
 scripting/source/dlgprov/dlgevtatt.cxx                        |    9 
 sd/source/core/CustomAnimationEffect.cxx                      |    7 
 sd/source/core/drawdoc2.cxx                                   |    5 
 sd/source/filter/xml/sdtransform.cxx                          |    2 
 sd/source/ui/animations/SlideTransitionPane.cxx               |    3 
 sd/source/ui/app/sdmod1.cxx                                   |    8 
 sd/source/ui/dlg/navigatr.cxx                                 |    2 
 sd/source/ui/docshell/docshel4.cxx                            |   13 
 sd/source/ui/slideshow/slideshow.cxx                          |    6 
 sd/source/ui/slidesorter/controller/SlideSorterController.cxx |    3 
 sd/source/ui/slidesorter/view/SlideSorterView.cxx             |    9 
 sd/source/ui/unoidl/unocpres.cxx                              |    6 
 sd/source/ui/unoidl/unomodel.cxx                              |    6 
 sd/source/ui/unoidl/unoobj.cxx                                |    8 
 sd/source/ui/unoidl/unopage.cxx                               |    7 
 sd/source/ui/view/drviews3.cxx                                |    5 
 sd/source/ui/view/sdview.cxx                                  |    3 
 sdext/source/minimizer/impoptimizer.cxx                       |    2 
 sfx2/source/appl/appopen.cxx                                  |    2 
 sfx2/source/appl/linkmgr2.cxx                                 |    7 
 sfx2/source/appl/macroloader.cxx                              |    2 
 sfx2/source/bastyp/frmhtml.cxx                                |    6 
 sfx2/source/control/templatelocalview.cxx                     |    6 
 sfx2/source/dialog/dinfdlg.cxx                                |    2 
 sfx2/source/dialog/filedlghelper.cxx                          |    4 
 sfx2/source/dialog/filtergrouping.cxx                         |    4 
 sfx2/source/dialog/srchdlg.cxx                                |    5 
 sfx2/source/doc/objmisc.cxx                                   |    2 
 sfx2/source/doc/printhelper.cxx                               |    2 
 slideshow/source/engine/slide/layer.cxx                       |    2 
 starmath/source/symbol.cxx                                    |    2 
 stoc/source/implementationregistration/implreg.cxx            |   15 
 stoc/source/typeconv/convert.cxx                              |    4 
 svl/source/numbers/zformat.cxx                                |   27 -
 svtools/source/brwbox/brwbox1.cxx                             |    3 
 svtools/source/graphic/grfcache.cxx                           |    2 
 svtools/source/graphic/grfmgr.cxx                             |    8 
 svtools/source/graphic/grfmgr2.cxx                            |   13 
 svtools/source/misc/templatefoldercache.cxx                   |    2 
 svtools/source/misc/transfer2.cxx                             |    3 
 svtools/source/uno/unoevent.cxx                               |    6 
 svx/source/core/extedit.cxx                                   |    2 
 svx/source/core/graphichelper.cxx                             |    3 
 svx/source/dialog/fntctrl.cxx                                 |    4 
 svx/source/engine3d/dragmt3d.cxx                              |   10 
 svx/source/engine3d/helperhittest3d.cxx                       |    2 
 svx/source/engine3d/helperminimaldepth3d.cxx                  |    2 
 svx/source/engine3d/obj3d.cxx                                 |    4 
 svx/source/engine3d/scene3d.cxx                               |    2 
 svx/source/engine3d/view3d.cxx                                |    5 
 svx/source/fmcomp/dbaexchange.cxx                             |    3 
 svx/source/fmcomp/fmgridif.cxx                                |    5 
 svx/source/form/navigatortree.cxx                             |    2 
 svx/source/gallery2/galbrws1.cxx                              |    3 
 svx/source/gallery2/galbrws2.cxx                              |    2 
 svx/source/gallery2/gallery1.cxx                              |    4 
 svx/source/gallery2/galmisc.cxx                               |    8 
 svx/source/gallery2/galtheme.cxx                              |    3 
 svx/source/sdr/contact/viewcontactofe3dscene.cxx              |    6 
 svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx      |    6 
 svx/source/svdraw/svdedtv1.cxx                                |    5 
 svx/source/svdraw/svdmodel.cxx                                |    2 
 svx/source/svdraw/svdoashp.cxx                                |   17 
 svx/source/svdraw/svdomedia.cxx                               |    2 
 svx/source/svdraw/svdtrans.cxx                                |    2 
 svx/source/tbxctrls/PaletteManager.cxx                        |    2 
 svx/source/tbxctrls/lboxctrl.cxx                              |    2 
 svx/source/tbxctrls/tbunocontroller.cxx                       |    3 
 svx/source/tbxctrls/tbunosearchcontrollers.cxx                |    9 
 svx/source/unodraw/UnoGraphicExporter.cxx                     |    6 
 svx/source/unodraw/unomod.cxx                                 |    5 
 svx/source/unodraw/unomtabl.cxx                               |   22 -
 svx/source/unodraw/unoshape.cxx                               |    3 
 svx/source/xml/xmlgrhlp.cxx                                   |   16 
 svx/source/xoutdev/_xoutbmp.cxx                               |    2 
 sw/source/core/doc/acmplwrd.cxx                               |    4 
 sw/source/core/doc/dbgoutsw.cxx                               |    2 
 sw/source/core/doc/doccorr.cxx                                |    1 
 sw/source/core/doc/docedt.cxx                                 |    2 
 sw/source/core/doc/doctxm.cxx                                 |    2 
 sw/source/core/doc/extinput.cxx                               |    2 
 sw/source/core/doc/number.cxx                                 |    4 
 sw/source/core/docnode/node.cxx                               |    3 
 sw/source/core/docnode/nodes.cxx                              |    3 
 sw/source/core/edit/edlingu.cxx                               |    4 
 sw/source/core/frmedt/fews.cxx                                |    2 
 sw/source/core/layout/paintfrm.cxx                            |   21 -
 sw/source/core/swg/SwXMLTextBlocks1.cxx                       |    5 
 sw/source/core/text/txtfly.cxx                                |    2 
 sw/source/core/text/xmldump.cxx                               |    4 
 sw/source/core/txtnode/txtatr2.cxx                            |    2 
 sw/source/core/txtnode/txtedt.cxx                             |   13 
 sw/source/core/unocore/unoflatpara.cxx                        |    6 
 sw/source/core/unocore/unosett.cxx                            |    3 
 sw/source/filter/html/css1atr.cxx                             |    2 
 sw/source/filter/html/htmlatr.cxx                             |    2 
 sw/source/filter/html/htmlforw.cxx                            |    6 
 sw/source/filter/ww8/docxattributeoutput.cxx                  |   23 -
 sw/source/filter/ww8/docxsdrexport.cxx                        |    8 
 sw/source/filter/ww8/rtfattributeoutput.cxx                   |    5 
 sw/source/filter/ww8/wrtw8esh.cxx                             |    2 
 sw/source/filter/ww8/wrtw8nds.cxx                             |    6 
 sw/source/filter/ww8/ww8atr.cxx                               |    6 
 sw/source/filter/ww8/ww8par.cxx                               |    2 
 sw/source/filter/xml/xmlimp.cxx                               |    2 
 sw/source/ui/misc/glossary.cxx                                |    5 
 sw/source/ui/vba/vbabookmarks.cxx                             |    9 
 sw/source/ui/vba/vbafield.cxx                                 |    3 
 sw/source/ui/vba/vbatablehelper.cxx                           |   10 
 sw/source/uibase/dbui/dbmgr.cxx                               |   14 
 sw/source/uibase/envelp/labelcfg.cxx                          |    5 
 sw/source/uibase/fldui/fldmgr.cxx                             |    7 
 sw/source/uibase/fldui/xfldui.cxx                             |    3 
 sw/source/uibase/misc/glosdoc.cxx                             |    3 
 sw/source/uibase/misc/redlndlg.cxx                            |    4 
 sw/source/uibase/shells/textsh1.cxx                           |    2 
 sw/source/uibase/sidebar/ThemePanel.cxx                       |    2 
 sw/source/uibase/uiview/viewprt.cxx                           |    2 
 sw/source/uibase/uiview/viewtab.cxx                           |    2 
 sw/source/uibase/uno/unoatxt.cxx                              |    4 
 sw/source/uibase/uno/unotxdoc.cxx                             |   44 +-
 sw/source/uibase/uno/unotxvw.cxx                              |    2 
 sw/source/uibase/utlui/content.cxx                            |    2 
 toolkit/source/awt/stylesettings.cxx                          |   10 
 toolkit/source/awt/vclxfont.cxx                               |    3 
 toolkit/source/awt/vclxwindows.cxx                            |    3 
 toolkit/source/controls/controlmodelcontainerbase.cxx         |    2 
 toolkit/source/controls/eventcontainer.cxx                    |    4 
 toolkit/source/controls/unocontrolbase.cxx                    |    2 
 toolkit/source/controls/unocontrolmodel.cxx                   |    4 
 toolkit/source/controls/unocontrols.cxx                       |    6 
 toolkit/source/helper/listenermultiplexer.cxx                 |    3 
 tools/source/datetime/datetimeutils.cxx                       |    2 
 ucb/source/ucp/webdav-neon/webdavcontent.cxx                  |    3 
 vcl/source/control/edit.cxx                                   |    2 
 vcl/source/control/field2.cxx                                 |    5 
 vcl/source/filter/graphicfilter.cxx                           |    9 
 vcl/source/filter/wmf/emfwr.cxx                               |    2 
 vcl/source/font/fontcache.cxx                                 |    2 
 vcl/source/gdi/salgdilayout.cxx                               |   12 
 vcl/source/outdev/map.cxx                                     |    4 
 vcl/source/outdev/mask.cxx                                    |    2 
 vcl/source/outdev/polygon.cxx                                 |    2 
 writerfilter/source/dmapper/DomainMapper_Impl.cxx             |    2 
 xmlhelp/source/cxxhelp/provider/databases.cxx                 |    7 
 xmlhelp/source/treeview/tvread.cxx                            |   36 -
 xmloff/source/chart/SchXMLChartContext.cxx                    |    2 
 xmloff/source/core/nmspmap.cxx                                |    4 
 xmloff/source/core/xmlexp.cxx                                 |    2 
 xmloff/source/core/xmlimp.cxx                                 |    4 
 xmloff/source/draw/shapeexport.cxx                            |    2 
 xmloff/source/style/GradientStyle.cxx                         |    5 
 xmloff/source/style/MarkerStyle.cxx                           |    5 
 xmloff/source/style/xmlaustp.cxx                              |    8 
 xmloff/source/text/XMLTextFrameContext.cxx                    |    2 
 xmloff/source/text/XMLTextListItemContext.cxx                 |    2 
 xmloff/source/text/txtparae.cxx                               |    8 
 xmloff/source/transform/DlgOASISTContext.cxx                  |    8 
 xmloff/source/transform/EventOASISTContext.cxx                |    4 
 xmloff/source/transform/EventOOoTContext.cxx                  |    2 
 xmloff/source/transform/OOo2Oasis.cxx                         |    9 
 xmloff/source/transform/Oasis2OOo.cxx                         |   10 
 xmloff/source/transform/PersAttrListTContext.cxx              |    4 
 xmloff/source/transform/StyleOASISTContext.cxx                |    6 
 xmloff/source/transform/StyleOOoTContext.cxx                  |   12 
 xmlsecurity/source/xmlsec/xmldocumentwrapper_xmlsecimpl.cxx   |    7 
 282 files changed, 1151 insertions(+), 1524 deletions(-)

New commits:
commit 789055bc2acb4c71483fd60ea258d158bd5aec10
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Apr 12 16:39:03 2016 +0200

    clang-tidy performance-unnecessary-copy-initialization
    
    probably not much performance benefit, but it sure is good at
    identifying leftover intermediate variables from previous
    refactorings.
    
    Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
    Reviewed-on: https://gerrit.libreoffice.org/24026
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
    Tested-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 23e25cb..926c9ad 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -304,7 +304,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
                 {
                     if ( !rInfo.GetModule().isEmpty() || pBasic->GetModules().empty() )
                     {
-                        OUString aModName = rInfo.GetModule();
+                        const OUString& aModName = rInfo.GetModule();
 
                         OUString sModuleCode;
                         if ( aDocument.createModule( aLibName, aModName, false, sModuleCode ) )
@@ -505,9 +505,9 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
         {
             DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
             const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
-            ScriptDocument aDocument( rSbxItem.GetDocument() );
-            OUString aLibName( rSbxItem.GetLibName() );
-            OUString aName( rSbxItem.GetName() );
+            const ScriptDocument& aDocument( rSbxItem.GetDocument() );
+            const OUString& aLibName( rSbxItem.GetLibName() );
+            const OUString& aName( rSbxItem.GetName() );
             if ( m_aCurLibName.isEmpty() || ( aDocument == m_aCurDocument && aLibName == m_aCurLibName ) )
             {
                 if ( rSbxItem.GetType() == TYPE_MODULE )
@@ -521,7 +521,7 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
         {
             DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
             const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
-            ScriptDocument aDocument( rSbxItem.GetDocument() );
+            const ScriptDocument& aDocument( rSbxItem.GetDocument() );
             BaseWindow* pWin = FindWindow( aDocument, rSbxItem.GetLibName(), rSbxItem.GetName(), rSbxItem.GetType(), true );
             if ( pWin )
                 RemoveWindow( pWin, true );
@@ -531,9 +531,9 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
         {
             DBG_ASSERT( rReq.GetArgs(), "arguments expected" );
             const SbxItem& rSbxItem = static_cast<const SbxItem&>(rReq.GetArgs()->Get(SID_BASICIDE_ARG_SBX ));
-            ScriptDocument aDocument( rSbxItem.GetDocument() );
-            OUString aLibName( rSbxItem.GetLibName() );
-            OUString aName( rSbxItem.GetName() );
+            const ScriptDocument& aDocument( rSbxItem.GetDocument() );
+            const OUString& aLibName( rSbxItem.GetLibName() );
+            const OUString& aName( rSbxItem.GetName() );
             SetCurLib( aDocument, aLibName );
             BaseWindow* pWin = nullptr;
             if ( rSbxItem.GetType() == TYPE_DIALOG )
diff --git a/basegfx/source/curve/b2dbeziertools.cxx b/basegfx/source/curve/b2dbeziertools.cxx
index 58d1f1e..d1e98c9 100644
--- a/basegfx/source/curve/b2dbeziertools.cxx
+++ b/basegfx/source/curve/b2dbeziertools.cxx
@@ -64,7 +64,7 @@ namespace basegfx
                 }
                 else
                 {
-                    const B2DPoint aLastNext(rBase.getEndPoint());
+                    const B2DPoint& aLastNext(rBase.getEndPoint());
                     const B2DVector aLastEdge(aLastNext - aNext);
 
                     fLength += aLastEdge.getLength();
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 3aac5c6..bf68189 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -825,7 +825,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const
                 const LocaleDataWrapper& rData = aSysLocale.GetLocaleData();
                 sal_Unicode cComma = rData.getNumDecimalSep()[0];
                 sal_Unicode c1000  = rData.getNumThousandSep()[0];
-                OUString aCurrencyStrg = rData.getCurrSymbol();
+                const OUString& aCurrencyStrg = rData.getCurrSymbol();
 
                 // initialize the Basic-formater help object:
                 // get resources for predefined output
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 29119e7..c32f225 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -279,13 +279,11 @@ namespace dbtools
         OUString sReturn;
         if ( _rxField.is() )
         {
-            OUString sValue( _rPredicateValue );
-
             // The following is mostly stolen from the former implementation in the parameter dialog
             // (dbaccess/source/ui/dlg/paramdialog.cxx). I do not fully understand this .....
 
             OUString sError;
-            OSQLParseNode* pParseNode = implPredicateTree( sError, sValue, _rxField );
+            OSQLParseNode* pParseNode = implPredicateTree( sError, _rPredicateValue, _rxField );
 
             implParseNode(pParseNode, true) >>= sReturn;
         }
@@ -353,13 +351,11 @@ namespace dbtools
 
         if ( _rxField.is() )
         {
-            OUString sValue( _rPredicateValue );
-
             // The following is mostly stolen from the former implementation in the parameter dialog
             // (dbaccess/source/ui/dlg/paramdialog.cxx). I do not fully understand this .....
 
             OUString sError;
-            OSQLParseNode* pParseNode = implPredicateTree( sError, sValue, _rxField );
+            OSQLParseNode* pParseNode = implPredicateTree( sError, _rPredicateValue, _rxField );
 
             return implParseNode(pParseNode, false);
         }
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index c034f16..688da51 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -382,7 +382,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
         OSL_ENSURE( ( _rError.getErrorCondition() == 0 ),
             "OConnection::throwSQLException: unsupported error code combination!" );
 
-        OUString sParameter( _rError.getParameter() );
+        const OUString& sParameter( _rError.getParameter() );
         if ( !sParameter.isEmpty() )
         {
             const OUString sError( getResources().getResourceStringWithSubstitution(
@@ -400,7 +400,7 @@ void OConnection::throwSQLException( const ErrorDescriptor& _rError, const Refer
     if ( _rError.getErrorCondition() != 0 )
     {
         SQLError aErrorHelper( comphelper::getComponentContext(getDriver()->getFactory()) );
-        OUString sParameter( _rError.getParameter() );
+        const OUString& sParameter( _rError.getParameter() );
         if ( !sParameter.isEmpty() )
             aErrorHelper.raiseException( _rError.getErrorCondition(), _rxContext, sParameter );
         else
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 15f4ce8..8d2b32d 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -1051,7 +1051,6 @@ namespace cppcanvas
                                            bool                             bIntersect )
         {
             ::cppcanvas::internal::OutDevState& rState( rParms.mrStates.getState() );
-            ::basegfx::B2DPolyPolygon aClipPoly( rClipPoly );
 
             const bool bEmptyClipRect( rState.clipRect.IsEmpty() );
             const bool bEmptyClipPoly( rState.clip.count() == 0 );
@@ -1086,7 +1085,7 @@ namespace cppcanvas
 
                 // AW: Simplified
                 rState.clip = basegfx::tools::clipPolyPolygonOnPolyPolygon(
-                    aClipPoly, rState.clip, true, false);
+                    rClipPoly, rState.clip, true, false);
             }
 
             // by now, our clip resides in the OutDevState::clip
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 8f5c1c4..f995d46 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1520,7 +1520,7 @@ bool ContextMenuSaveInData::Apply()
             css::uno::Reference< css::lang::XSingleComponentFactory > xFactory( xIndexContainer, css::uno::UNO_QUERY );
             ApplyMenu( xIndexContainer, xFactory, pEntry );
 
-            OUString aUrl = pEntry->GetCommand();
+            const OUString& aUrl = pEntry->GetCommand();
             try
             {
                 if ( GetConfigManager()->hasSettings( aUrl ) )
diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx
index efffa67..cbeb45a 100644
--- a/cui/source/customize/macropg.cxx
+++ b/cui/source/customize/macropg.cxx
@@ -466,10 +466,9 @@ IconLBoxString::IconLBoxString( const OUString& sText,
 void IconLBoxString::Paint(const Point& aPos, SvTreeListBox& /*aDevice*/, vcl::RenderContext& rRenderContext,
                            const SvViewDataEntry* /*pView*/, const SvTreeListEntry& /*rEntry*/)
 {
-    OUString aTxt(GetText());
-    if (!aTxt.isEmpty())
+    OUString aURL(GetText());
+    if (!aURL.isEmpty())
     {
-        OUString aURL(aTxt);
         sal_Int32 nIndex = aURL.indexOf(aVndSunStarUNO);
         bool bUNO = nIndex == 0;
 
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index f26a176..de838b0 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -160,7 +160,7 @@ void AboutDialog::StyleControls()
 
     const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
 
-    vcl::Font aLabelFont = rStyleSettings.GetLabelFont();
+    const vcl::Font& aLabelFont = rStyleSettings.GetLabelFont();
     vcl::Font aLargeFont = aLabelFont;
     aLargeFont.SetFontSize(Size( 0, aLabelFont.GetFontSize().Height() * 3));
 
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 92d5423..6175603 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -831,9 +831,8 @@ OUString TPGalleryThemeProperties::addExtension( const OUString& _rDisplayText,
 
     if ( sRet.indexOf( sAllFilter ) == -1 )
     {
-        OUString sExt = _rExtension;
         sRet += sOpenBracket;
-        sRet += sExt;
+        sRet += _rExtension;
         sRet += sCloseBracket;
     }
     return sRet;
diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx
index db1470e..250cae9 100644
--- a/cui/source/options/optopencl.cxx
+++ b/cui/source/options/optopencl.cxx
@@ -373,7 +373,7 @@ long SvxOpenCLTabPage::DeleteHdl(SvSimpleTable* pListBox, OpenCLConfig::ImplMatc
     if (!pListBox->FirstSelected())
         return 0;
 
-    OpenCLConfig::ImplMatcher rEntry(findCurrentEntry(rSet, pListBox));
+    const OpenCLConfig::ImplMatcher& rEntry(findCurrentEntry(rSet, pListBox));
     rSet.erase(rEntry);
     fillListBox(pListBox, rSet);
 
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 8357b71..536f0b4 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -2068,7 +2068,6 @@ VectorOfNodes OfaTreeOptionsDialog::LoadNodes(
 
 static sal_uInt16 lcl_getGroupId( const OUString& rGroupName, const SvTreeListBox& rTreeLB )
 {
-    OUString sGroupName( rGroupName );
     sal_uInt16 nRet = 0;
     SvTreeListEntry* pEntry = rTreeLB.First();
     while( pEntry )
@@ -2076,7 +2075,7 @@ static sal_uInt16 lcl_getGroupId( const OUString& rGroupName, const SvTreeListBo
         if ( !rTreeLB.GetParent( pEntry ) )
         {
             OUString sTemp( rTreeLB.GetEntryText( pEntry ) );
-            if ( sTemp == sGroupName )
+            if ( sTemp == rGroupName )
                 return nRet;
             nRet++;
         }
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 2256096..aa9c595 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1443,8 +1443,8 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr,
     }
     else
     {
-        const OUString  aStrLink   = rBgdAttr.GetGraphicLink();
-        const OUString  aStrFilter = rBgdAttr.GetGraphicFilter();
+        const OUString&  aStrLink   = rBgdAttr.GetGraphicLink();
+        const OUString&  aStrFilter = rBgdAttr.GetGraphicFilter();
 
         lcl_setFillStyle(m_pLbSelect, drawing::FillStyle_BITMAP);
         ShowBitmapUI_Impl();
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 49bbfeb..a85ec88 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -1615,7 +1615,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet* rSet )
 
             const SvxPageModelItem& rModel =
                 static_cast<const SvxPageModelItem&>(rSet->Get( _nWhich ));
-            OUString aStr( rModel.GetValue() );
+            const OUString& aStr( rModel.GetValue() );
 
             if ( !aStr.isEmpty() &&
                  m_pApplyCollBox->GetEntryPos( aStr ) != LISTBOX_ENTRY_NOTFOUND )
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index a82d227..9c28241 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -697,7 +697,7 @@ void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl
 
 void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl )
 {
-    OUString sURL( _rModelImpl.getURL() );
+    const OUString& sURL( _rModelImpl.getURL() );
     SAL_INFO("dbaccess.core", "DatabaseContext: deregistering " << sURL);
     m_aDatabaseObjects.erase( sURL );
 }
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 54494f1..a3f8039 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -84,7 +84,6 @@ OUString ODsnTypeCollection::getTypeDisplayName(const OUString& _sURL) const
 
 OUString ODsnTypeCollection::cutPrefix(const OUString& _sURL) const
 {
-    OUString sURL( _sURL);
     OUString sRet;
     OUString sOldPattern;
     StringVector::const_iterator aIter = m_aDsnPrefixes.begin();
@@ -99,8 +98,8 @@ OUString ODsnTypeCollection::cutPrefix(const OUString& _sURL) const
             //   foo*
             // that is, the very concept of "prefix" applies.
             OUString prefix(comphelper::string::stripEnd(*aIter, '*'));
-            OSL_ENSURE(prefix.getLength() <= sURL.getLength(), "How can A match B when A shorter than B?");
-            sRet = sURL.copy(prefix.getLength());
+            OSL_ENSURE(prefix.getLength() <= _sURL.getLength(), "How can A match B when A shorter than B?");
+            sRet = _sURL.copy(prefix.getLength());
             sOldPattern = *aIter;
         }
     }
@@ -110,7 +109,6 @@ OUString ODsnTypeCollection::cutPrefix(const OUString& _sURL) const
 
 OUString ODsnTypeCollection::getPrefix(const OUString& _sURL) const
 {
-    OUString sURL( _sURL);
     OUString sRet;
     OUString sOldPattern;
     StringVector::const_iterator aIter = m_aDsnPrefixes.begin();
@@ -118,13 +116,13 @@ OUString ODsnTypeCollection::getPrefix(const OUString& _sURL) const
     for(;aIter != aEnd;++aIter)
     {
         WildCard aWildCard(*aIter);
-        if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(sURL) )
+        if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(_sURL) )
         {
             // This relies on the fact that all patterns are of the form
             //   foo*
             // that is, the very concept of "prefix" applies.
             sRet = comphelper::string::stripEnd(*aIter, '*');
-            OSL_ENSURE(sRet.getLength() <= sURL.getLength(), "How can A match B when A shorter than B?");
+            OSL_ENSURE(sRet.getLength() <= _sURL.getLength(), "How can A match B when A shorter than B?");
             sOldPattern = *aIter;
         }
     }
@@ -140,7 +138,6 @@ bool ODsnTypeCollection::hasDriver( const sal_Char* _pAsciiPattern ) const
 
 bool ODsnTypeCollection::isConnectionUrlRequired(const OUString& _sURL) const
 {
-    OUString sURL( _sURL);
     OUString sRet;
     OUString sOldPattern;
     StringVector::const_iterator aIter = m_aDsnPrefixes.begin();
@@ -148,7 +145,7 @@ bool ODsnTypeCollection::isConnectionUrlRequired(const OUString& _sURL) const
     for(;aIter != aEnd;++aIter)
     {
         WildCard aWildCard(*aIter);
-        if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(sURL) )
+        if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(_sURL) )
         {
             sRet = *aIter;
             sOldPattern = *aIter;
@@ -507,14 +504,13 @@ OUString ODsnTypeCollection::getType(const OUString& _sURL) const
 sal_Int32 ODsnTypeCollection::getIndexOf(const OUString& _sURL) const
 {
     sal_Int32 nRet = -1;
-    OUString sURL( _sURL);
     OUString sOldPattern;
     StringVector::const_iterator aIter = m_aDsnPrefixes.begin();
     StringVector::const_iterator aEnd = m_aDsnPrefixes.end();
     for(sal_Int32 i = 0;aIter != aEnd;++aIter,++i)
     {
         WildCard aWildCard(*aIter);
-        if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(sURL) )
+        if ( sOldPattern.getLength() < aIter->getLength() && aWildCard.Matches(_sURL) )
         {
             nRet = i;
             sOldPattern = *aIter;
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index 0043993..d36b11e 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -562,7 +562,7 @@ namespace dbaccess
         aDesignInput.import( pDocHandler.get() );
 
         const ::comphelper::NamedValueCollection& rSettings( pDocHandler->getSettings() );
-        const Any aCurrentQueryDesign = rSettings.get( sCurrentQueryDesignName );
+        const Any& aCurrentQueryDesign = rSettings.get( sCurrentQueryDesignName );
 #if OSL_DEBUG_LEVEL > 0
         Sequence< PropertyValue > aQueryDesignLayout;
         OSL_VERIFY( aCurrentQueryDesign >>= aQueryDesignLayout );
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 29dffc9..822ca0c 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -786,7 +786,6 @@ void OAppDetailPageHelper::elementReplaced(ElementType _eType
     DBTreeListBox* pTreeView = getCurrentView();
     if ( pTreeView )
     {
-        OUString sNewName = _rNewName;
         SvTreeListEntry* pEntry = nullptr;
         switch( _eType )
         {
@@ -808,7 +807,7 @@ void OAppDetailPageHelper::elementReplaced(ElementType _eType
         OSL_ENSURE(pEntry,"Do you know that the name isn't existence!");
         if ( pEntry )
         {
-            pTreeView->SetEntryText(pEntry,sNewName);
+            pTreeView->SetEntryText(pEntry,_rNewName);
         }
     }
 }
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 1f04843..297dd92 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1190,7 +1190,6 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour
                 }
 
                 // look for the object
-                OUString sCommand = _rCommand;
                 sal_Int32 nIndex = 0;
                 do
                 {
@@ -1198,7 +1197,7 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour
                     switch (_nCommandType)
                     {
                     case CommandType::TABLE:
-                        sPath = sCommand;
+                        sPath = _rCommand;
                         nIndex = -1;
                         break;
 
@@ -1206,7 +1205,7 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour
                         assert(false);
                         // in non-debug builds, fall through.
                     case CommandType::QUERY:
-                        sPath = sCommand.getToken( 0, '/', nIndex );
+                        sPath = _rCommand.getToken( 0, '/', nIndex );
                         break;
                     }
                     pObject = m_pTreeView->getListBox().GetEntryPosByName(sPath, pCommandType);
@@ -1218,7 +1217,7 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour
                             DBTreeListUserData* pParentData = static_cast< DBTreeListUserData* >( pObject->GetUserData() );
                             Reference< XNameAccess > xCollection( pParentData->xContainer, UNO_QUERY );
                             sal_Int32 nIndex2 = nIndex;
-                            sPath = sCommand.getToken( 0, '/', nIndex2 );
+                            sPath = _rCommand.getToken( 0, '/', nIndex2 );
                             try
                             {
                                 if ( xCollection->hasByName(sPath) )
diff --git a/dbaccess/source/ui/control/SqlNameEdit.cxx b/dbaccess/source/ui/control/SqlNameEdit.cxx
index 2816c98..5c025af 100644
--- a/dbaccess/source/ui/control/SqlNameEdit.cxx
+++ b/dbaccess/source/ui/control/SqlNameEdit.cxx
@@ -38,18 +38,17 @@ namespace dbaui
         bool bCorrected = false;
         if ( m_bCheck )
         {
-            OUString sText = _sToCheck;
             sal_Int32 nMatch = 0;
-            for (sal_Int32 i = nMatch; i < sText.getLength(); ++i)
+            for (sal_Int32 i = nMatch; i < _sToCheck.getLength(); ++i)
             {
-                if ( !isCharOk( sText[i], i == 0, m_bOnlyUpperCase, m_sAllowedChars ) )
+                if ( !isCharOk( _sToCheck[i], i == 0, m_bOnlyUpperCase, m_sAllowedChars ) )
                 {
-                    _rsCorrected += sText.copy(nMatch, i - nMatch);
+                    _rsCorrected += _sToCheck.copy(nMatch, i - nMatch);
                     bCorrected = true;
                     nMatch = i + 1;
                 }
             }
-            _rsCorrected += sText.copy( nMatch, sText.getLength() - nMatch );
+            _rsCorrected += _sToCheck.copy( nMatch, _sToCheck.getLength() - nMatch );
         }
         return bCorrected;
     }
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 81e6e06..520d962 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -755,7 +755,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
     void ODbTypeWizDialogSetup::CreateDatabase()
     {
         OUString sUrl;
-        OUString eType = m_pGeneralPage->GetSelectedType();
+        const OUString eType = m_pGeneralPage->GetSelectedType();
         if ( dbaccess::ODsnTypeCollection::isEmbeddedDatabase(eType) )
         {
             sUrl = eType;
@@ -771,10 +771,9 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
             INetURLObject aDBPathURL(m_sWorkPath);
             aDBPathURL.Append(m_aDocURL.getBase());
             createUniqueFolderName(&aDBPathURL);
-            OUString sPrefix = eType;
             sUrl = aDBPathURL.GetMainURL( INetURLObject::NO_DECODE);
             xSimpleFileAccess->createFolder(sUrl);
-             sUrl = sPrefix.concat(sUrl);
+            sUrl = eType.concat(sUrl);
         }
         m_pOutSet->Put(SfxStringItem(DSID_CONNECTURL, sUrl));
         m_pImpl->saveChanges(*m_pOutSet);
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index c618a1b..c178dfb 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1397,10 +1397,9 @@ bool insertHierachyElement( vcl::Window* _pParent, const Reference< XComponentCo
         return false;
 
     Reference<XNameAccess> xNameAccess( _xNames, UNO_QUERY );
-    OUString sName = _sParentFolder;
-    if ( _xNames->hasByHierarchicalName(sName) )
+    if ( _xNames->hasByHierarchicalName(_sParentFolder) )
     {
-        Reference<XChild> xChild(_xNames->getByHierarchicalName(sName),UNO_QUERY);
+        Reference<XChild> xChild(_xNames->getByHierarchicalName(_sParentFolder),UNO_QUERY);
         xNameAccess.set(xChild,UNO_QUERY);
         if ( !xNameAccess.is() && xChild.is() )
             xNameAccess.set(xChild->getParent(),UNO_QUERY);
@@ -1428,7 +1427,7 @@ bool insertHierachyElement( vcl::Window* _pParent, const Reference< XComponentCo
             sTargetName = ::dbtools::createUniqueName(xNameAccess,sTargetName);
 
             // here we have everything needed to create a new query object ...
-            HierarchicalNameCheck aNameChecker( _xNames.get(), sName );
+            HierarchicalNameCheck aNameChecker( _xNames.get(), _sParentFolder );
             // ... ehm, except a new name
             ScopedVclPtrInstance<OSaveAsDlg> aAskForName(
                                    _pParent,
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index 94790d3..971a25f 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -67,13 +67,11 @@ namespace dbaui
 
     Indexes::const_iterator OIndexCollection::find(const OUString& _rName) const
     {
-        OUString sNameCompare(_rName);
-
         // loop'n'compare
         Indexes::const_iterator aSearch = m_aIndexes.begin();
         Indexes::const_iterator aEnd = m_aIndexes.end();
         for (; aSearch != aEnd; ++aSearch)
-            if (aSearch->sName == sNameCompare)
+            if (aSearch->sName == _rName)
                 break;
 
         return aSearch;
@@ -81,13 +79,11 @@ namespace dbaui
 
     Indexes::iterator OIndexCollection::find(const OUString& _rName)
     {
-        OUString sNameCompare(_rName);
-
         // loop'n'compare
         Indexes::iterator aSearch = m_aIndexes.begin();
         Indexes::const_iterator aEnd = m_aIndexes.end();
         for (; aSearch != aEnd; ++aSearch)
-            if (aSearch->sName == sNameCompare)
+            if (aSearch->sName == _rName)
                 break;
 
         return aSearch;
@@ -95,13 +91,11 @@ namespace dbaui
 
     Indexes::const_iterator OIndexCollection::findOriginal(const OUString& _rName) const
     {
-        OUString sNameCompare(_rName);
-
         // loop'n'compare
         Indexes::const_iterator aSearch = m_aIndexes.begin();
         Indexes::const_iterator aEnd = m_aIndexes.end();
         for (; aSearch != aEnd; ++aSearch)
-            if (aSearch->getOriginalName() == sNameCompare)
+            if (aSearch->getOriginalName() == _rName)
                 break;
 
         return aSearch;
@@ -109,13 +103,11 @@ namespace dbaui
 
     Indexes::iterator OIndexCollection::findOriginal(const OUString& _rName)
     {
-        OUString sNameCompare(_rName);
-
         // loop'n'compare
         Indexes::iterator aSearch = m_aIndexes.begin();
         Indexes::const_iterator aEnd = m_aIndexes.end();
         for (; aSearch != aEnd; ++aSearch)
-            if (aSearch->getOriginalName() == sNameCompare)
+            if (aSearch->getOriginalName() == _rName)
                 break;
 
         return aSearch;
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 8d88ec3..6d303db 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -788,10 +788,9 @@ namespace
                             else
                                 aHavingStr += aWork;
 
-                            OUString aTmp = aCriteria;
                             OUString aErrorMsg;
                             Reference<XPropertySet> xColumn;
-                            std::unique_ptr< ::connectivity::OSQLParseNode> pParseNode(_pView->getPredicateTreeFromEntry(pEntryField,aTmp,aErrorMsg,xColumn));
+                            std::unique_ptr< ::connectivity::OSQLParseNode> pParseNode(_pView->getPredicateTreeFromEntry(pEntryField,aCriteria,aErrorMsg,xColumn));
                             if (pParseNode.get())
                             {
                                 if (bMulti && !(pEntryField->isOtherFunction() || (aFieldName.toChar() == '*')))
@@ -819,10 +818,9 @@ namespace
 
                             aWhereStr += " ";
                             // aCriteria could have some german numbers so I have to be sure here
-                            OUString aTmp = aCriteria;
                             OUString aErrorMsg;
                             Reference<XPropertySet> xColumn;
-                            std::unique_ptr< ::connectivity::OSQLParseNode> pParseNode( _pView->getPredicateTreeFromEntry(pEntryField,aTmp,aErrorMsg,xColumn));
+                            std::unique_ptr< ::connectivity::OSQLParseNode> pParseNode( _pView->getPredicateTreeFromEntry(pEntryField,aCriteria,aErrorMsg,xColumn));
                             if (pParseNode.get())
                             {
                                 if (bMulti && !(pEntryField->isOtherFunction() || (aFieldName.toChar() == '*')))
@@ -888,7 +886,7 @@ namespace
                                     OUString& _rsRet)
     {
         const OQueryController& rController = static_cast<OQueryController&>(_pView->getController());
-        Reference< XConnection> xConnection = rController.getConnection();
+        const Reference< XConnection>& xConnection = rController.getConnection();
         if ( !xConnection.is() )
             return eNoConnection;
 
@@ -964,8 +962,7 @@ namespace
             if ( !aWorkStr.isEmpty() )
             {
                 const sal_Int32 nMaxOrder = xMetaData->getMaxColumnsInOrderBy();
-                OUString sToken(aWorkStr);
-                if ( nMaxOrder && nMaxOrder < comphelper::string::getTokenCount(sToken, ',') )
+                if ( nMaxOrder && nMaxOrder < comphelper::string::getTokenCount(aWorkStr, ',') )
                     eErrorCode = eStatementTooLong;
                 else
                 {
@@ -2239,8 +2236,7 @@ namespace
                         if ( SQL_ISRULE(pColumnRef,general_set_fct) )
                         {
                             aInfo->SetFunctionType(nFunctionType|FKT_AGGREGATE);
-                            OUString aCol(aColumns);
-                            aInfo->SetFunction(comphelper::string::stripEnd(aCol.getToken(0,'('), ' '));
+                            aInfo->SetFunction(comphelper::string::stripEnd(aColumns.getToken(0,'('), ' '));
                         }
                         else
                             aInfo->SetFunctionType(nFunctionType|FKT_OTHER);
@@ -3081,7 +3077,6 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(const OTableFieldDesc
         }
     }
 
-    OUString sTest(_sCriteria);
     // _rxColumn, if it is a "lookup" column, not a computed column,
     // is guaranteed to be the column taken from the *source* of the column,
     // that is either a table or another query.
@@ -3095,7 +3090,7 @@ OSQLParseNode* OQueryDesignView::getPredicateTreeFromEntry(const OTableFieldDesc
     // We are currently treating the entry "C='foo'"
     // Then _rxColumn has Name "C" and RealName "cee". We should *obviously* use "C", not "cee".
     OSQLParseNode* pParseNode = rParser.predicateTree(  _rsErrorMessage,
-                                                        sTest,
+                                                        _sCriteria,
                                                         static_cast<OQueryController&>(getController()).getNumberFormatter(),
                                                         _rxColumn,
                                                         false);
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index a35cdc4..ae0e953 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -66,10 +66,9 @@ namespace
         bool bAsterisk = !(!_sFieldName.isEmpty() && _sFieldName.toChar() != '*');
         if ( !bAsterisk )
         {
-            OUString sName = _sFieldName;
-            sal_Int32 nTokenCount = comphelper::string::getTokenCount(sName, '.');
-            if (    (nTokenCount == 2 && sName.getToken(1,'.')[0] == '*' )
-                ||  (nTokenCount == 3 && sName.getToken(2,'.')[0] == '*' ) )
+            sal_Int32 nTokenCount = comphelper::string::getTokenCount(_sFieldName, '.');
+            if (    (nTokenCount == 2 && _sFieldName.getToken(1,'.')[0] == '*' )
+                ||  (nTokenCount == 3 && _sFieldName.getToken(2,'.')[0] == '*' ) )
             {
                 bAsterisk = true;
             }
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
index 46c6154..19b60e6 100644
--- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
+++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
@@ -190,11 +190,10 @@ throw (uno::RuntimeException, std::exception)
 }
 
 uno::Reference< awt::XWindow > SAL_CALL LimitBoxController::createItemWindow(
-    const uno::Reference< awt::XWindow >& Parent )
+    const uno::Reference< awt::XWindow >& xParent )
     throw (uno::RuntimeException, std::exception)
 {
     uno::Reference< awt::XWindow > xItemWindow;
-    uno::Reference< awt::XWindow > xParent( Parent );
 
     vcl::Window* pParent = VCLUnoHelper::GetWindow( xParent );
     if ( pParent )
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index a0f844c..3db0802 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -1756,8 +1756,7 @@ OUString OQueryController::translateStatement( bool _bFireStatementChange )
     {
         ModuleRes aModuleRes(STR_QRY_NOSELECT);
         OUString sTmpStr(aModuleRes);
-        OUString sError(sTmpStr);
-        showError(SQLException(sError,nullptr,"S1000",1000,Any()));
+        showError(SQLException(sTmpStr,nullptr,"S1000",1000,Any()));
     }
     else
         sTranslatedStmt = m_sStatement;
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx
index e86d901..4a7ddfc 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -112,7 +112,7 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
     // handle --version and --help already here, otherwise they would be handled
     // after VCL initialization that might fail if $DISPLAY is not set
     const desktop::CommandLineArgs& rCmdLineArgs = desktop::Desktop::GetCommandLineArgs();
-    OUString aUnknown( rCmdLineArgs.GetUnknown() );
+    const OUString& aUnknown( rCmdLineArgs.GetUnknown() );
     if ( !aUnknown.isEmpty() )
     {
         desktop::Desktop::InitApplicationServiceManager();
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 28cf3d1..e02b84d 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -294,9 +294,8 @@ OUString makeURL( OUString const & baseURL, OUString const & relPath_ )
     return buf.makeStringAndClear();
 }
 
-OUString makeURLAppendSysPathSegment( OUString const & baseURL, OUString const & relPath_ )
+OUString makeURLAppendSysPathSegment( OUString const & baseURL, OUString const & segment )
 {
-    OUString segment = relPath_;
     OSL_ASSERT(segment.indexOf(static_cast<sal_Unicode>('/')) == -1);
 
     ::rtl::Uri::encode(
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 12d0555..b58f23e 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1623,7 +1623,7 @@ unsigned char* doc_renderFont(LibreOfficeKitDocument* /*pThis*/,
         for (sal_uInt16 i = 0; i < nFontCount; ++i)
         {
             const FontMetric& rFontMetric = pList->GetFontName(i);
-            OUString aFontName = rFontMetric.GetFamilyName();
+            const OUString& aFontName = rFontMetric.GetFamilyName();
             if (!aSearchedFontName.equals(aFontName.toUtf8().getStr()))
                 continue;
 
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index e12e128..2687514 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -371,9 +371,7 @@ namespace
 
         if(!rRegion.IsEmpty())
         {
-            vcl::Region aRegion(rRegion);
-
-            aRetval = aRegion.GetAsB2DPolyPolygon();
+            aRetval = rRegion.GetAsB2DPolyPolygon();
         }
 
         return aRetval;
diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
index a8d9562..27a4e0d 100644
--- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx
@@ -259,7 +259,7 @@ namespace drawinglayer
                 }
 
                 // calculate logic render size in world coordinates for usage in renderer
-                const basegfx::B2DHomMatrix aInverseOToV(rViewInformation.getInverseObjectToViewTransformation());
+                const basegfx::B2DHomMatrix& aInverseOToV(rViewInformation.getInverseObjectToViewTransformation());
                 const double fLogicX((aInverseOToV * basegfx::B2DVector(aDiscreteRange.getWidth() * fReduceFactor, 0.0)).getLength());
                 const double fLogicY((aInverseOToV * basegfx::B2DVector(0.0, aDiscreteRange.getHeight() * fReduceFactor)).getLength());
 
diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
index b7218e6..eaae44d 100644
--- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx
@@ -161,7 +161,7 @@ namespace drawinglayer
                 // support for single word mode; split to single word primitives
                 // using TextBreakupHelper
                 const TextBreakupHelper aTextBreakupHelper(*this);
-                const Primitive2DContainer aBroken(aTextBreakupHelper.getResult(BreakupUnit_word));
+                const Primitive2DContainer& aBroken(aTextBreakupHelper.getResult(BreakupUnit_word));
 
                 if(!aBroken.empty())
                 {
diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
index 722d2db..ae60358 100644
--- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
@@ -68,7 +68,7 @@ namespace drawinglayer
                                 {
                                     // polyPolygonMaterialPrimitive3D, check texturing and hatching
                                     const PolyPolygonMaterialPrimitive3D& rPrimitive = static_cast< const PolyPolygonMaterialPrimitive3D& >(*pBasePrimitive);
-                                    const basegfx::B3DPolyPolygon aFillPolyPolygon(rPrimitive.getB3DPolyPolygon());
+                                    const basegfx::B3DPolyPolygon& aFillPolyPolygon(rPrimitive.getB3DPolyPolygon());
 
                                     if(maHatch.isFillBackground())
                                     {
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 52b23c8..ca7af47 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -995,8 +995,7 @@ namespace drawinglayer
                         case drawinglayer::primitive2d::FIELD_TYPE_URL :
                         {
                             const OUString& rURL = rFieldPrimitive.getString();
-                            const OUString aOldString(rURL);
-                            mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const sal_uInt8* >(aOldString.getStr()), 2 * aOldString.getLength()));
+                            mpMetaFile->AddAction(new MetaCommentAction(aCommentStringCommon, 0, reinterpret_cast< const sal_uInt8* >(rURL.getStr()), 2 * rURL.getLength()));
                             break;
                         }
                     }
@@ -1816,7 +1815,7 @@ namespace drawinglayer
                     // - uses DrawTransparent for single PolyPoylgons directly. Can be detected by
                     //   checking the content for single PolyPolygonColorPrimitive2D
                     const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate = static_cast< const primitive2d::UnifiedTransparencePrimitive2D& >(rCandidate);
-                    const primitive2d::Primitive2DContainer rContent = rUniTransparenceCandidate.getChildren();
+                    const primitive2d::Primitive2DContainer& rContent = rUniTransparenceCandidate.getChildren();
 
                     if(!rContent.empty())
                     {
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index da004b0..6d7832f 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -866,7 +866,7 @@ namespace drawinglayer
                     // Detect if a single PolyPolygonColorPrimitive2D is contained; in that case,
                     // use the faster OutputDevice::DrawTransparent method
                     const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate = static_cast< const primitive2d::UnifiedTransparencePrimitive2D& >(rCandidate);
-                    const primitive2d::Primitive2DContainer rContent = rUniTransparenceCandidate.getChildren();
+                    const primitive2d::Primitive2DContainer& rContent = rUniTransparenceCandidate.getChildren();
 
                     if(!rContent.empty())
                     {
diff --git a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
index 5b8a790..b54f6de 100644
--- a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
@@ -134,7 +134,7 @@ namespace drawinglayer
                 case PRIMITIVE3D_ID_UNIFIEDTRANSPARENCETEXTUREPRIMITIVE3D :
                 {
                     const primitive3d::UnifiedTransparenceTexturePrimitive3D& rPrimitive = static_cast< const primitive3d::UnifiedTransparenceTexturePrimitive3D& >(rCandidate);
-                       const primitive3d::Primitive3DContainer rChildren = rPrimitive.getChildren();
+                    const primitive3d::Primitive3DContainer& rChildren = rPrimitive.getChildren();
 
                     if(rChildren.size())
                     {
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
index 6dfe5c7..f83eb1f 100644
--- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx
@@ -62,8 +62,8 @@ namespace drawinglayer
                 const basegfx::B2DRange aOutlineRange(0.0, 0.0, rPrimitive.getTextureSize().getX(), rPrimitive.getTextureSize().getY());
                 const attribute::GradientStyle aGradientStyle(rFillGradient.getStyle());
                 sal_uInt32 nSteps(rFillGradient.getSteps());
-                const basegfx::BColor aStart(rFillGradient.getStartColor());
-                const basegfx::BColor aEnd(rFillGradient.getEndColor());
+                const basegfx::BColor& aStart(rFillGradient.getStartColor());
+                const basegfx::BColor& aEnd(rFillGradient.getEndColor());
                 const sal_uInt32 nMaxSteps(sal_uInt32((aStart.getMaximumDistance(aEnd) * 127.5) + 0.5));
                 std::shared_ptr< texture::GeoTexSvx > pNewTex;
 
diff --git a/drawinglayer/source/processor3d/geometry2dextractor.cxx b/drawinglayer/source/processor3d/geometry2dextractor.cxx
index ccc6372..5279e7f 100644
--- a/drawinglayer/source/processor3d/geometry2dextractor.cxx
+++ b/drawinglayer/source/processor3d/geometry2dextractor.cxx
@@ -119,7 +119,7 @@ namespace drawinglayer
                 {
                     // TexturePrimitive3D: Process children, do not try to decompose
                     const primitive3d::TexturePrimitive3D& rTexturePrimitive = static_cast< const primitive3d::TexturePrimitive3D& >(rCandidate);
-                    const primitive3d::Primitive3DContainer aChildren(rTexturePrimitive.getChildren());
+                    const primitive3d::Primitive3DContainer& aChildren(rTexturePrimitive.getChildren());
 
                     if(!aChildren.empty())
                     {
diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx
index bae0387..635f37a 100644
--- a/drawinglayer/source/tools/converters.cxx
+++ b/drawinglayer/source/tools/converters.cxx
@@ -71,7 +71,6 @@ namespace drawinglayer
 
                 const Point aEmptyPoint;
                 const Size aSizePixel(nDiscreteWidth, nDiscreteHeight);
-                geometry::ViewInformation2D aViewInformation2D(rViewInformation2D);
                 ScopedVclPtrInstance< VirtualDevice > maContent;
 
                 // prepare vdev
@@ -87,7 +86,7 @@ namespace drawinglayer
                 // not wanted, change after this call as needed
                 processor2d::BaseProcessor2D* pContentProcessor = processor2d::createPixelProcessor2DFromOutputDevice(
                     *maContent.get(),
-                    aViewInformation2D);
+                    rViewInformation2D);
 
                 if(pContentProcessor)
                 {
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index d250b78..cb3c144 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -665,15 +665,14 @@ void EditHTMLParser::ImpSetStyleSheet( sal_uInt16 nHLevel )
 
 void EditHTMLParser::ImpInsertText( const OUString& rText )
 {
-    OUString aText( rText );
     if (mpEditEngine->IsImportHandlerSet())
     {
         ImportInfo aImportInfo(HTMLIMP_INSERTTEXT, this, mpEditEngine->CreateESelection(aCurSel));
-        aImportInfo.aText = aText;
+        aImportInfo.aText = rText;
         mpEditEngine->CallImportHandler(aImportInfo);
     }
 
-    aCurSel = mpEditEngine->InsertText(aCurSel, aText);
+    aCurSel = mpEditEngine->InsertText(aCurSel, rText);
 }
 
 void EditHTMLParser::SkipGroup( int nEndToken )
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 07285a9..7a2b9ac 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -1861,7 +1861,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
             if ( ( nWordEnd >= nMaxBreakPos ) && ( nWordLen > 3 ) )
             {
                 // May happen, because getLineBreak may differ from getWordBoudary with DICTIONARY_WORD
-                OUString aWord = pNode->GetString().copy(nWordStart, nWordLen);
+                const OUString aWord = pNode->GetString().copy(nWordStart, nWordLen);
                 sal_Int32 nMinTrail = nWordEnd-nMaxBreakPos+1; //+1: Before the dickey letter
                 Reference< XHyphenatedWord > xHyphWord;
                 if (xHyphenator.is())
@@ -1882,12 +1882,11 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
                         {
                             // TODO: handle all alternative hyphenations (see hyphen-1.2.8/tests/unicode.*)
                             OUString aAlt( xHyphWord->getHyphenatedWord() );
-                            OUString aWord2(aWord);
                             OUString aAltLeft(aAlt.copy(0, _nWordLen));
                             OUString aAltRight(aAlt.copy(_nWordLen));
-                            bAltFullLeft = aWord2.startsWith(aAltLeft);
-                            bAltFullRight = aWord2.endsWith(aAltRight);
-                            nAltDelChar = aWord2.getLength() - aAlt.getLength() + static_cast<int>(!bAltFullLeft) + static_cast<int>(!bAltFullRight);
+                            bAltFullLeft = aWord.startsWith(aAltLeft);
+                            bAltFullRight = aWord.endsWith(aAltRight);
+                            nAltDelChar = aWord.getLength() - aAlt.getLength() + static_cast<int>(!bAltFullLeft) + static_cast<int>(!bAltFullRight);
 
                             // NOTE: improved for other cases, see fdo#63711
 
@@ -1900,7 +1899,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
                             // compound words because the Hyphenator separates
                             // all position of the word. [This is not true for libhyphen.]
                             // "Schiffahrtsbrennesseln" -> "Schifffahrtsbrennnesseln"
-                 // We can thus actually not directly connect the index of the
+                            // We can thus actually not directly connect the index of the
                             // AlternativeWord to aWord. The whole issue will be simplified
                             // by a function in the  Hyphenator as soon as AMA builds this in...
                             sal_Int32 nAltStart = _nWordLen - 1;
@@ -1935,7 +1934,7 @@ void ImpEditEngine::ImpBreakLine( ParaPortion* pParaPortion, EditLine* pLine, Te
 
                             bHyphenated = true;
                             nBreakPos = nWordStart + nTxtStart;
-                            if ( cAlternateReplChar || aAlt.getLength() < aWord2.getLength() || !bAltFullRight) // also for "oma-tje", "re-eel"
+                            if ( cAlternateReplChar || aAlt.getLength() < aWord.getLength() || !bAltFullRight) // also for "oma-tje", "re-eel"
                                 nBreakPos++;
                         }
                     }
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 2ec8405..cafb0c0 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1752,14 +1752,12 @@ bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
 
     // First search for eLang, then primary language of eLang
     // and last in LANGUAGE_UNDETERMINED
-    OUString sTemp(sWord);
 
     if (m_pLangTable->find(aLanguageTag) != m_pLangTable->end() || CreateLanguageFile(aLanguageTag, false))
     {
         //the language is available - so bring it on
         auto const& pList = m_pLangTable->find(aLanguageTag)->second;
-        OUString _sTemp(sWord);
-        if(pList->GetWrdSttExceptList()->find(_sTemp) != pList->GetWrdSttExceptList()->end() )
+        if(pList->GetWrdSttExceptList()->find(sWord) != pList->GetWrdSttExceptList()->end() )
             return true;
     }
 
@@ -1773,7 +1771,7 @@ bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
     {
         //the language is available - so bring it on
         auto const& pList = m_pLangTable->find(aLanguageTag)->second;
-        if(pList->GetWrdSttExceptList()->find(sTemp) != pList->GetWrdSttExceptList()->end() )
+        if(pList->GetWrdSttExceptList()->find(sWord) != pList->GetWrdSttExceptList()->end() )
             return true;
     }
 
@@ -1782,7 +1780,7 @@ bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
     {
         //the language is available - so bring it on
         auto const& pList = m_pLangTable->find(aLanguageTag)->second;
-        if(pList->GetWrdSttExceptList()->find(sTemp) != pList->GetWrdSttExceptList()->end() )
+        if(pList->GetWrdSttExceptList()->find(sWord) != pList->GetWrdSttExceptList()->end() )
             return true;
     }
     return false;
@@ -1831,13 +1829,12 @@ bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
 
     // First search for eLang, then primary language of eLang
     // and last in LANGUAGE_UNDETERMINED
-    OUString sTemp( sWord );
 
     if (m_pLangTable->find(aLanguageTag) != m_pLangTable->end() || CreateLanguageFile(aLanguageTag, false))
     {
         //the language is available - so bring it on
         const SvStringsISortDtor* pList = m_pLangTable->find(aLanguageTag)->second->GetCplSttExceptList();
-        if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sTemp) != pList->end() )
+        if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sWord) != pList->end() )
             return true;
     }
 
@@ -1851,7 +1848,7 @@ bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
     {
         //the language is available - so bring it on
         const SvStringsISortDtor* pList = m_pLangTable->find(aLanguageTag)->second->GetCplSttExceptList();
-        if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sTemp) != pList->end() )
+        if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sWord) != pList->end() )
             return true;
     }
 
@@ -1860,7 +1857,7 @@ bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
     {
         //the language is available - so bring it on
         const SvStringsISortDtor* pList = m_pLangTable->find(aLanguageTag)->second->GetCplSttExceptList();
-        if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sTemp) != pList->end() )
+        if(bAbbreviation ? lcl_FindAbbreviation(pList, sWord) : pList->find(sWord) != pList->end() )
             return true;
     }
     return false;
@@ -1967,12 +1964,11 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
         rpLst = new SvStringsISortDtor;
 
     {
-        OUString sStrmName( pStrmName, strlen(pStrmName), RTL_TEXTENCODING_MS_1252 );
-        OUString sTmp( sStrmName );
+        const OUString sStrmName( pStrmName, strlen(pStrmName), RTL_TEXTENCODING_MS_1252 );
 
         if( rStg.Is() && rStg->IsStream( sStrmName ) )
         {
-            tools::SvRef<SotStorageStream> xStrm = rStg->OpenSotStream( sTmp,
+            tools::SvRef<SotStorageStream> xStrm = rStg->OpenSotStream( sStrmName,
                 ( StreamMode::READ | StreamMode::SHARE_DENYWRITE | StreamMode::NOCREATE ) );
             if( SVSTREAM_OK != xStrm->GetError())
             {
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx
index 4c6929f..d60e21b 100644
--- a/extensions/source/bibliography/bibload.cxx
+++ b/extensions/source/bibliography/bibload.cxx
@@ -228,8 +228,7 @@ void BibliographyLoader::load(const Reference< XFrame > & rFrame, const OUString
 
     m_pBibMod = OpenBibModul();
 
-    OUString aURLStr( rURL );
-    OUString aPartName = aURLStr.getToken( 1, '/' );
+    OUString aPartName = rURL.getToken( 1, '/' );
     Reference<XPropertySet> xPrSet(rFrame, UNO_QUERY);
     if(xPrSet.is())
     {
@@ -459,11 +458,10 @@ Any BibliographyLoader::getByName(const OUString& rName) throw
         if (!xColumns.is())
             return aRet;
 
-        OUString sIdentifierMapping = pDatMan->GetIdentifierMapping();
-        OUString sId = sIdentifierMapping;
+        const OUString sIdentifierMapping = pDatMan->GetIdentifierMapping();
         Reference< sdb::XColumn >  xColumn;
-        if (xColumns->hasByName(sId))
-            xColumn.set(*static_cast<Reference< XInterface > const *>(xColumns->getByName(sId).getValue()), UNO_QUERY);
+        if (xColumns->hasByName(sIdentifierMapping))
+            xColumn.set(*static_cast<Reference< XInterface > const *>(xColumns->getByName(sIdentifierMapping).getValue()), UNO_QUERY);
         if (xColumn.is())
         {
             do
diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx
index e2eb753..109c05b 100644
--- a/extensions/source/bibliography/toolbar.cxx
+++ b/extensions/source/bibliography/toolbar.cxx
@@ -481,8 +481,7 @@ IMPL_LINK_NOARG_TYPED( BibToolBar, SendSelHdl, Idle*, void )
     PropertyValue* pPropertyVal = const_cast<PropertyValue*>(aPropVal.getConstArray());
     pPropertyVal[0].Name = "DataSourceName";
     OUString aEntry( MnemonicGenerator::EraseAllMnemonicChars( aLBSource->GetSelectEntry() ) );
-    OUString aSelection = aEntry;
-    pPropertyVal[0].Value <<= aSelection;
+    pPropertyVal[0].Value <<= aEntry;
     SendDispatch(nTBC_LB_SOURCE, aPropVal);
 }
 
diff --git a/extensions/source/propctrlr/eformspropertyhandler.cxx b/extensions/source/propctrlr/eformspropertyhandler.cxx
index d4870a4..b63e96b 100644
--- a/extensions/source/propctrlr/eformspropertyhandler.cxx
+++ b/extensions/source/propctrlr/eformspropertyhandler.cxx
@@ -501,7 +501,7 @@ namespace pcr
             // the binding for the dialog to work with
             Reference< XPropertySet > xBinding( m_pHelper->getCurrentBinding() );
             // the aspect of the binding which the dialog should modify
-            OUString sFacetName( _rPropertyName );
+            const OUString& sFacetName( _rPropertyName );
 
             OSL_ENSURE( xModel.is() && xBinding.is() && !sFacetName.isEmpty(),
                 "EFormsPropertyHandler::onInteractivePropertySelection: something is missing for the dialog initialization!" );
diff --git a/extensions/source/propctrlr/stringrepresentation.cxx b/extensions/source/propctrlr/stringrepresentation.cxx
index 8c0c9df..c570ef9 100644
--- a/extensions/source/propctrlr/stringrepresentation.cxx
+++ b/extensions/source/propctrlr/stringrepresentation.cxx
@@ -527,48 +527,47 @@ bool StringRepresentation::convertStringToGenericValue( const OUString& _rString
     {
         uno::Type aElementType = ::comphelper::getSequenceElementType( _rTargetType );
 
-        OUString aStr( _rStringRep );
         switch ( aElementType.getTypeClass() )
         {
             case uno::TypeClass_STRING:
             {
                 Sequence< OUString > aElements;
-                splitComposedStringToSequence( aStr, aElements, StringIdentity() );
+                splitComposedStringToSequence( _rStringRep, aElements, StringIdentity() );
                 _rValue <<= aElements;
             }
             break;
             case uno::TypeClass_SHORT:
             {
                 Sequence< sal_Int16 > aElements;
-                splitComposedStringToSequence( aStr, aElements, ConvertIntegerFromAndToString() );
+                splitComposedStringToSequence( _rStringRep, aElements, ConvertIntegerFromAndToString() );
                 _rValue <<= aElements;
             }
             break;
             case uno::TypeClass_UNSIGNED_SHORT:
             {
                 Sequence< sal_uInt16 > aElements;
-                splitComposedStringToSequence( aStr, aElements, ConvertIntegerFromAndToString() );
+                splitComposedStringToSequence( _rStringRep, aElements, ConvertIntegerFromAndToString() );
                 _rValue <<= aElements;
             }
             break;
             case uno::TypeClass_LONG:
             {
                 Sequence< sal_Int32 > aElements;
-                splitComposedStringToSequence( aStr, aElements, ConvertIntegerFromAndToString() );
+                splitComposedStringToSequence( _rStringRep, aElements, ConvertIntegerFromAndToString() );
                 _rValue <<= aElements;
             }
             break;
             case uno::TypeClass_UNSIGNED_LONG:
             {
                 Sequence< sal_uInt32 > aElements;
-                splitComposedStringToSequence( aStr, aElements, ConvertIntegerFromAndToString() );
+                splitComposedStringToSequence( _rStringRep, aElements, ConvertIntegerFromAndToString() );
                 _rValue <<= aElements;
             }
             break;
             case uno::TypeClass_BYTE:
             {
                 Sequence< sal_Int8 > aElements;
-                splitComposedStringToSequence( aStr, aElements, ConvertIntegerFromAndToString() );
+                splitComposedStringToSequence( _rStringRep, aElements, ConvertIntegerFromAndToString() );
                 _rValue <<= aElements;
             }
             break;
diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx
index a79bfc4..cc41be8 100644
--- a/extensions/source/resource/oooresourceloader.cxx
+++ b/extensions/source/resource/oooresourceloader.cxx
@@ -177,8 +177,7 @@ namespace extensions { namespace resource
         :m_aLocale( _rLocale )
         ,m_pResourceManager( nullptr )
     {
-        OUString sBaseName( _rBaseName );
-        m_pResourceManager = new SimpleResMgr( OUStringToOString( sBaseName, RTL_TEXTENCODING_UTF8 ).getStr(),
+        m_pResourceManager = new SimpleResMgr( OUStringToOString( _rBaseName, RTL_TEXTENCODING_UTF8 ).getStr(),
                 LanguageTag( m_aLocale) );
 
         if ( !m_pResourceManager->IsValid() )
diff --git a/filter/source/config/cache/cacheitem.cxx b/filter/source/config/cache/cacheitem.cxx
index 57c69ad..b21d2fc 100644
--- a/filter/source/config/cache/cacheitem.cxx
+++ b/filter/source/config/cache/cacheitem.cxx
@@ -118,8 +118,8 @@ css::uno::Sequence< css::beans::PropertyValue > CacheItem::getAsPackedPropertyVa
 bool isSubSet(const css::uno::Any& aSubSet,
                   const css::uno::Any& aSet   )
 {
-    css::uno::Type aT1 = aSubSet.getValueType();
-    css::uno::Type aT2 = aSet.getValueType();
+    const css::uno::Type& aT1 = aSubSet.getValueType();
+    const css::uno::Type& aT2 = aSet.getValueType();
 
     if (!aT1.equals(aT2))
     {
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 2379fe7..05613b7 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -485,8 +485,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const lon
     Reference < XBreakIterator > xBI( Impl_GetBreakIterator() );
     if( xBI.is() )
     {
-        const OUString oText( rText );
-        nScriptType = xBI->getScriptType( oText, 0 );
+        nScriptType = xBI->getScriptType( rText, 0 );
     }
 
     // if the text is either right to left or complex or asian, we
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index b15cbd0..c56d27a 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1348,14 +1348,13 @@ void EscherPropertyContainer::CreateEmbeddedBitmapProperties(
     const OUString& rBitmapUrl, css::drawing::BitmapMode eBitmapMode )
 {
     OUString aVndUrl( "vnd.sun.star.GraphicObject:" );
-    OUString aBmpUrl( rBitmapUrl );
-    sal_Int32 nIndex = aBmpUrl.indexOf( aVndUrl );
+    sal_Int32 nIndex = rBitmapUrl.indexOf( aVndUrl );
     if( nIndex != -1 )
     {
         nIndex += aVndUrl.getLength();
-        if( aBmpUrl.getLength() > nIndex )
+        if( rBitmapUrl.getLength() > nIndex )
         {
-            OString aUniqueId(OUStringToOString(aBmpUrl.copy(nIndex, aBmpUrl.getLength() - nIndex), RTL_TEXTENCODING_UTF8));
+            OString aUniqueId(OUStringToOString(rBitmapUrl.copy(nIndex, rBitmapUrl.getLength() - nIndex), RTL_TEXTENCODING_UTF8));
             bool bRetValue = ImplCreateEmbeddedBmp( aUniqueId );
             if( bRetValue )
             {
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 29ae6d8..43b409b 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6564,11 +6564,11 @@ bool SvxMSDffManager::MakeContentStream( SotStorage * pStor, const GDIMetaFile &
     // If a not applicable MapUnit (device dependent) is used,
     // SV tries to guess a best match for the right value
     Size aSize = rMtf.GetPrefSize();
-    MapMode aMMSrc = rMtf.GetPrefMapMode();
+    const MapMode& aMMSrc = rMtf.GetPrefMapMode();
     MapMode aMMDst( MAP_100TH_MM );
     aSize = OutputDevice::LogicToLogic( aSize, aMMSrc, aMMDst );
     aEle.SetSize( aSize );
-     aEle.SetAspect( nAspect );
+    aEle.SetAspect( nAspect );
     aEle.SetAdviseFlags( nAdviseModes );
     aEle.SetMtf( rMtf );
     aEle.Write( *xStm );
diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx
index 121704a..366c673 100644
--- a/filter/source/svg/svgfontexport.cxx
+++ b/filter/source/svg/svgfontexport.cxx
@@ -47,7 +47,7 @@ SVGFontExport::GlyphSet& SVGFontExport::implGetGlyphSet( const vcl::Font& rFont
 {
     FontWeight      eWeight( WEIGHT_NORMAL );
     FontItalic      eItalic( ITALIC_NONE );
-    OUString aFontName( rFont.GetFamilyName() );
+    const OUString& aFontName( rFont.GetFamilyName() );
     sal_Int32       nNextTokenPos( 0 );
 
     switch( rFont.GetWeight() )
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 4dcde82..a81b376 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -1853,14 +1853,13 @@ struct ShapeWritingVisitor
     void writePathShape( rtl::Reference<SvXMLAttributeList>&             xAttrs,
                          const uno::Reference<xml::sax::XAttributeList>& xUnoAttrs,
                          const uno::Reference<xml::dom::XElement>&       xElem,
-                         const OUString&                            rStyleId,
+                         const OUString&                                 rStyleId,
                          const basegfx::B2DPolyPolygon&                  rPoly )
     {
         // we might need to split up polypolygon into multiple path
         // shapes (e.g. when emulating line stroking)
         std::vector<basegfx::B2DPolyPolygon> aPolys(1,rPoly);
         State aState = maCurrState;
-        OUString aStyleId(rStyleId);
 
         xAttrs->Clear();
 
@@ -1889,7 +1888,7 @@ struct ShapeWritingVisitor
             fillShapeProperties(xAttrs,
                                 xElem,
                                 aBounds,
-                                "svggraphicstyle"+aStyleId);
+                                "svggraphicstyle"+rStyleId);
 
             // force path coordinates to 100th millimeter, after
             // putting polygon data at origin (ODF viewbox
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 33d2501..e3ea5b1 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -1668,8 +1668,6 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
 
     mpContext->AddPaintAttr( COL_TRANSPARENT, aTextColor );
 
-    OUString sTextContent = rText;
-
     // <a> tag for link should be the innermost tag, inside <tspan>
     if( !mbIsPlaceholderShape && mbIsURLField && !msUrl.isEmpty() )
     {
@@ -1680,16 +1678,16 @@ void SVGTextWriter::implWriteTextPortion( const Point& rPos,
         mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrXLinkHRef, msUrl );
         {
             SvXMLElementExport aSVGAElem( mrExport, XML_NAMESPACE_NONE, aXMLElemA, mbIWS, mbIWS );
-            mrExport.GetDocHandler()->characters( sTextContent );
+            mrExport.GetDocHandler()->characters( rText );
         }
     }
     else
     {
         SvXMLElementExport aSVGTspanElem( mrExport, XML_NAMESPACE_NONE, aXMLElemTspan, mbIWS, mbIWS );
-        mrExport.GetDocHandler()->characters( sTextContent );
+        mrExport.GetDocHandler()->characters( rText );
     }
 
-    mnTextWidth += mpVDev->GetTextWidth( sTextContent );
+    mnTextWidth += mpVDev->GetTextWidth( rText );
 }
 
 
@@ -2512,16 +2510,15 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const OUString& rText,
 
     if( mbIsPlaceholderShape )
     {
-        OUString sTextContent = rText;
-        bIsPlaceholderField = sTextContent.match( sPlaceholderTag );
+        bIsPlaceholderField = rText.match( sPlaceholderTag );
         // for a placeholder text field we export only one <text> svg element
         if( bIsPlaceholderField )
         {
             OUString sCleanTextContent;
             static const sal_Int32 nFrom = sPlaceholderTag.getLength();
-            if( sTextContent.getLength() > nFrom )
+            if( rText.getLength() > nFrom )
             {
-                sCleanTextContent = sTextContent.copy( nFrom );
+                sCleanTextContent = rText.copy( nFrom );
             }
             mrExport.AddAttribute( XML_NAMESPACE_NONE, "class", "PlaceholderText" );
             mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrX, OUString::number( aPos.X() ) );
@@ -3686,8 +3683,7 @@ void SAL_CALL SVGWriter::write( const Reference<XDocumentHandler>& rxDocHandler,
 
     ReadGDIMetaFile( aMemStm, aMtf );
 
-    const Reference< XDocumentHandler > xDocumentHandler( rxDocHandler );
-    Reference<SVGExport> pWriter(new SVGExport( mxContext, xDocumentHandler, maFilterData ));
+    Reference<SVGExport> pWriter(new SVGExport( mxContext, rxDocHandler, maFilterData ));
     pWriter->writeMtf( aMtf );
 }
 
diff --git a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
index 429fdc5..d177204 100644
--- a/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
+++ b/filter/source/xmlfilteradaptor/XmlFilterAdaptor.cxx
@@ -67,8 +67,8 @@ using namespace ::com::sun::star::task;
 bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::PropertyValue >& aDescriptor )
     throw (RuntimeException, std::exception)
 {
-    OUString udConvertClass=msUserData[0];
-    OUString udImport =msUserData[2];
+    OUString udConvertClass    = msUserData[0];
+    const OUString sXMLImportService = msUserData[2];
     sal_Int32 nSteps= 0;
     sal_Int32 nProgressRange = 4;
 
@@ -80,7 +80,6 @@ bool SAL_CALL XmlFilterAdaptor::importImpl( const Sequence< css::beans::Property
         xStatusIndicator->start( "Loading :",nProgressRange);
     }
 
-    OUString sXMLImportService (  udImport  );
     Reference < XParser > xSaxParser = Parser::create( mxContext );
 
     Sequence< Any > aAnys(1);
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index 73a5dd6..2ffe25e 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -91,7 +91,6 @@ bool FormulaHelper::GetNextFunc( const OUString&  rFormula,
         if ( ppFDesc )
         {
             *ppFDesc = nullptr;
-            const OUString sTemp( aFname );
             const sal_uInt32 nCategoryCount = m_pFunctionManager->getCount();
             for(sal_uInt32 j= 0; j < nCategoryCount && !*ppFDesc; ++j)
             {
@@ -100,7 +99,7 @@ bool FormulaHelper::GetNextFunc( const OUString&  rFormula,
                 for(sal_uInt32 i = 0 ; i < nCount; ++i)
                 {
                     const IFunctionDescription* pCurrent = pCategory->getFunction(i);
-                    if ( pCurrent->getFunctionName().equalsIgnoreAsciiCase(sTemp) )
+                    if ( pCurrent->getFunctionName().equalsIgnoreAsciiCase(aFname) )
                     {
                         *ppFDesc = pCurrent;
                         break;
diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx
index d629ca3..77bf516 100644
--- a/formula/source/ui/dlg/funcpage.cxx
+++ b/formula/source/ui/dlg/funcpage.cxx
@@ -38,9 +38,7 @@ FormulaListBox::FormulaListBox( vcl::Window* pParent, WinBits nBits ):
 
 void FormulaListBox::KeyInput( const KeyEvent& rKEvt )
 {
-    KeyEvent aKEvt=rKEvt;
-
-    if(aKEvt.GetCharCode()==' ')
+    if(rKEvt.GetCharCode()==' ')
         DoubleClick();
 }
 
diff --git a/framework/inc/uielement/toolbarmerger.hxx b/framework/inc/uielement/toolbarmerger.hxx
index 4ad1467..683af86 100644
--- a/framework/inc/uielement/toolbarmerger.hxx
+++ b/framework/inc/uielement/toolbarmerger.hxx
@@ -87,8 +87,7 @@ class ToolBarMerger
         static ReferenceToolbarPathInfo FindReferencePoint( ToolBox* pToolbar,
                                                             const OUString& rReferencePoint );
 
-        static bool       ProcessMergeOperation( const css::uno::Reference< css::frame::XFrame >& xFrame,
-                                                 ToolBox*                  pToolbar,
+        static bool       ProcessMergeOperation( ToolBox*                  pToolbar,
                                                  sal_uInt16                nPos,
                                                  sal_uInt16&               rItemId,
                                                  CommandToInfoMap&         rCommandMap,
@@ -97,8 +96,7 @@ class ToolBarMerger
                                                  const OUString&           rMergeCommandParameter,
                                                  const AddonToolbarItemContainer& rItems );
 
-        static bool       ProcessMergeFallback( const css::uno::Reference< css::frame::XFrame >& xFrame,
-                                                ToolBox*                         pToolbar,
+        static bool       ProcessMergeFallback( ToolBox*                         pToolbar,
                                                 sal_uInt16                       nPos,
                                                 sal_uInt16&                      rItemId,
                                                 CommandToInfoMap&                rCommandMap,
@@ -107,8 +105,7 @@ class ToolBarMerger
                                                 const OUString&           rMergeFallback,
                                                 const AddonToolbarItemContainer& rItems );
 
-        static bool       MergeItems( const css::uno::Reference< css::frame::XFrame >& xFrame,
-                                      ToolBox*                  pToolbar,
+        static bool       MergeItems( ToolBox*                  pToolbar,
                                       sal_uInt16                nPos,
                                       sal_uInt16                nModIndex,
                                       sal_uInt16&               rItemId,
@@ -116,8 +113,7 @@ class ToolBarMerger
                                       const OUString&           rModuleIdentifier,
                                       const AddonToolbarItemContainer& rAddonToolbarItems );
 
-        static bool       ReplaceItem( const css::uno::Reference< css::frame::XFrame >& xFrame,
-                                       ToolBox*                  pToolbar,
+        static bool       ReplaceItem( ToolBox*                  pToolbar,
                                        sal_uInt16                nPos,
                                        sal_uInt16&               rItemId,
                                        CommandToInfoMap&         rCommandMap,
diff --git a/framework/source/dispatch/dispatchprovider.cxx b/framework/source/dispatch/dispatchprovider.cxx
index 28ab6e4..846b121 100644
--- a/framework/source/dispatch/dispatchprovider.cxx
+++ b/framework/source/dispatch/dispatchprovider.cxx
@@ -251,8 +251,6 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
     // 0) Some URLs are dispatched in a generic way (e.g. by the menu) using the default target "".
     //    But they are specified to use her own fix target. Detect such URLs here and use the correct target.
 
-    OUString sTargetName = sTargetFrameName;
-
     // I) handle special cases which not right for using findFrame() first
 
     // I.I) "_blank", "_default"
@@ -261,20 +259,20 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
     //  here. Thats why we must "intercept" here.
 
     if (
-        (sTargetName==SPECIALTARGET_BLANK  ) ||
-        (sTargetName==SPECIALTARGET_DEFAULT)
+        (sTargetFrameName==SPECIALTARGET_BLANK  ) ||
+        (sTargetFrameName==SPECIALTARGET_DEFAULT)
        )
     {
         css::uno::Reference< css::frame::XDispatchProvider > xParent( xFrame->getCreator(), css::uno::UNO_QUERY );
         if (xParent.is())
-            xDispatcher = xParent->queryDispatch(aURL, sTargetName, 0); // it's a special target - ignore search flags
+            xDispatcher = xParent->queryDispatch(aURL, sTargetFrameName, 0); // it's a special target - ignore search flags
     }
 
     // I.II) "_beamer"
     //  Special sub frame of a top frame only. Search or create it. ... OK it's currently a little bit HACKI.
     //  Only the sfx (means the controller) can create it.
 
-    else if (sTargetName==SPECIALTARGET_BEAMER)
+    else if (sTargetFrameName==SPECIALTARGET_BEAMER)
     {
         css::uno::Reference< css::frame::XDispatchProvider > xBeamer( xFrame->findFrame( SPECIALTARGET_BEAMER, css::frame::FrameSearchFlag::CHILDREN | css::frame::FrameSearchFlag::SELF ), css::uno::UNO_QUERY );
         if (xBeamer.is())
@@ -294,7 +292,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
     // I.IV) "_parent"
     //  Our parent frame (if it exist) should handle this URL.
 
-    else if (sTargetName==SPECIALTARGET_PARENT)
+    else if (sTargetFrameName==SPECIALTARGET_PARENT)
     {
         css::uno::Reference< css::frame::XDispatchProvider > xParent( xFrame->getCreator(), css::uno::UNO_QUERY );
         if (xParent.is())
@@ -306,7 +304,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
     //  This request must be forwarded to any parent frame, till we reach a top frame.
     //  If no parent exist, we can handle itself.
 
-    else if (sTargetName==SPECIALTARGET_TOP)
+    else if (sTargetFrameName==SPECIALTARGET_TOP)
     {
         if (xFrame->isTop())
         {
@@ -332,8 +330,8 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
     //  we load it into the frame by returning specilized dispatch object.
 
     else if (
-             (sTargetName==SPECIALTARGET_SELF)  ||
-             (sTargetName.isEmpty())
+             (sTargetFrameName==SPECIALTARGET_SELF)  ||
+             (sTargetFrameName.isEmpty())
             )
     {
         // There exist a hard coded interception for special URLs.
@@ -396,7 +394,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
                   nRightFlags &= ~css::frame::FrameSearchFlag::CREATE;
 
         // try to find any existing target and ask him for his dispatcher
-        css::uno::Reference< css::frame::XFrame > xFoundFrame = xFrame->findFrame(sTargetName, nRightFlags);
+        css::uno::Reference< css::frame::XFrame > xFoundFrame = xFrame->findFrame(sTargetFrameName, nRightFlags);
         if (xFoundFrame.is())
         {
             // Attention: Found target is our own owner frame!
@@ -423,7 +421,7 @@ css::uno::Reference< css::frame::XDispatch > DispatchProvider::implts_queryFrame
         {
             css::uno::Reference< css::frame::XDispatchProvider > xParent( xFrame->getCreator(), css::uno::UNO_QUERY );
             if (xParent.is())
-                xDispatcher = xParent->queryDispatch(aURL, sTargetName, css::frame::FrameSearchFlag::CREATE);
+                xDispatcher = xParent->queryDispatch(aURL, sTargetFrameName, css::frame::FrameSearchFlag::CREATE);
         }
     }
 
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 82a519b..406e466 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -771,16 +771,15 @@ void AddonsOptions_Impl::ReadMenuMergeInstructions( MergeMenuInstructionContaine
     const OUString aMenuMergeRootName( "AddonUI/OfficeMenuBarMerging/" );
 
     Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aMenuMergeRootName );
-    OUString                aAddonMergeNode( aMenuMergeRootName );
 
-    sal_uInt32              nCount = aAddonMergeNodesSeq.getLength();
+    sal_uInt32           nCount = aAddonMergeNodesSeq.getLength();
 
     // Init the property value sequence
     Sequence< OUString > aNodePropNames( 5 );
 
     for ( sal_uInt32 i = 0; i < nCount; i++ )
     {
-        OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] );
+        OUString aMergeAddonInstructions( aMenuMergeRootName + aAddonMergeNodesSeq[i] );
 
         Sequence< OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
         sal_uInt32           nCountAddons = aAddonInstMergeNodesSeq.getLength();
@@ -849,16 +848,14 @@ void AddonsOptions_Impl::ReadToolbarMergeInstructions( ToolbarMergingInstruction
     const OUString aToolbarMergeRootName( "AddonUI/OfficeToolbarMerging/" );
 
     Sequence< OUString > aAddonMergeNodesSeq = GetNodeNames( aToolbarMergeRootName );
-    OUString                aAddonMergeNode( aToolbarMergeRootName );
-
-    sal_uInt32              nCount = aAddonMergeNodesSeq.getLength();
+    sal_uInt32           nCount = aAddonMergeNodesSeq.getLength();
 
     // Init the property value sequence
     Sequence< OUString > aNodePropNames( 6 );
 
     for ( sal_uInt32 i = 0; i < nCount; i++ )
     {
-        OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] );
+        OUString aMergeAddonInstructions( aToolbarMergeRootName + aAddonMergeNodesSeq[i] );
 
         Sequence< OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
         sal_uInt32           nCountAddons = aAddonInstMergeNodesSeq.getLength();
@@ -929,14 +926,13 @@ void AddonsOptions_Impl::ReadStatusbarMergeInstructions( MergeStatusbarInstructi
     const ::rtl::OUString aStatusbarMergeRootName( "AddonUI/OfficeStatusbarMerging/" );
 
     Sequence< ::rtl::OUString > aAddonMergeNodesSeq = GetNodeNames( aStatusbarMergeRootName );
-    ::rtl::OUString aAddonMergeNode( aStatusbarMergeRootName );
     sal_uInt32  nCount = aAddonMergeNodesSeq.getLength();
 
     Sequence< ::rtl::OUString > aNodePropNames( 5 );
 
     for ( sal_uInt32 i = 0; i < nCount; i++ )
     {
-        ::rtl::OUString aMergeAddonInstructions( aAddonMergeNode + aAddonMergeNodesSeq[i] );
+        ::rtl::OUString aMergeAddonInstructions( aStatusbarMergeRootName + aAddonMergeNodesSeq[i] );
 
         Sequence< ::rtl::OUString > aAddonInstMergeNodesSeq = GetNodeNames( aMergeAddonInstructions );
         sal_uInt32 nCountAddons = aAddonInstMergeNodesSeq.getLength();
diff --git a/framework/source/fwe/xml/menudocumenthandler.cxx b/framework/source/fwe/xml/menudocumenthandler.cxx
index e3cb6b5..8055034 100644
--- a/framework/source/fwe/xml/menudocumenthandler.cxx
+++ b/framework/source/fwe/xml/menudocumenthandler.cxx
@@ -362,7 +362,7 @@ throw( SAXException, RuntimeException, std::exception )
             for ( sal_Int16 i=0; i< xAttrList->getLength(); i++ )
             {
                 OUString aName = xAttrList->getNameByIndex( i );
-                OUString aValue = xAttrList->getValueByIndex( i );
+                const OUString aValue = xAttrList->getValueByIndex( i );
                 if ( aName == ATTRIBUTE_ID )
                     aCommandId = aValue;
                 else if ( aName == ATTRIBUTE_LABEL )
@@ -371,11 +371,10 @@ throw( SAXException, RuntimeException, std::exception )
                     aHelpId = aValue;
                 else if ( aName == ATTRIBUTE_STYLE )
                 {
-                    OUString aTemp( aValue );
                     sal_Int32 nIndex = 0;
                     do
                     {
-                        OUString aToken = aTemp.getToken( 0, '+', nIndex );
+                        OUString aToken = aValue.getToken( 0, '+', nIndex );
                         if ( !aToken.isEmpty() )
                         {
                             if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT )
@@ -573,7 +572,7 @@ throw( SAXException, RuntimeException, std::exception )
         for ( sal_Int16 i=0; i< xAttrList->getLength(); i++ )
         {
             OUString aName = xAttrList->getNameByIndex( i );
-            OUString aValue = xAttrList->getValueByIndex( i );
+            const OUString aValue = xAttrList->getValueByIndex( i );
             if ( aName == ATTRIBUTE_ID )
                 aCommandId = aValue;
             else if ( aName == ATTRIBUTE_LABEL )
@@ -582,11 +581,10 @@ throw( SAXException, RuntimeException, std::exception )
                 aHelpId = aValue;
             else if ( aName == ATTRIBUTE_STYLE )
             {
-                OUString aTemp( aValue );
                 sal_Int32 nIndex = 0;
                 do
                 {
-                    OUString aToken = aTemp.getToken( 0, '+', nIndex );
+                    OUString aToken = aValue.getToken( 0, '+', nIndex );
                     if ( !aToken.isEmpty() )
                     {
                         if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT )
@@ -630,7 +628,7 @@ throw( SAXException, RuntimeException, std::exception )
         for ( sal_Int16 i=0; i< xAttrList->getLength(); i++ )
         {
             OUString aName = xAttrList->getNameByIndex( i );
-            OUString aValue = xAttrList->getValueByIndex( i );
+            const OUString aValue = xAttrList->getValueByIndex( i );
             if ( aName == ATTRIBUTE_ID )
                 aCommandId = aValue;
             else if ( aName == ATTRIBUTE_LABEL )
@@ -639,11 +637,10 @@ throw( SAXException, RuntimeException, std::exception )
                 aHelpId = aValue;
             else if ( aName == ATTRIBUTE_STYLE )
             {
-                OUString aTemp( aValue );
                 sal_Int32 nIndex = 0;
                 do
                 {
-                    OUString aToken = aTemp.getToken( 0, '+', nIndex );
+                    OUString aToken = aValue.getToken( 0, '+', nIndex );
                     if ( !aToken.isEmpty() )
                     {
                         if ( aToken == ATTRIBUTE_ITEMSTYLE_TEXT )
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index f2c598a..4dede28 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -490,15 +490,11 @@ bool LayoutManager::readWindowStateData( const OUString& aName, UIElement& rElem
         GlobalSettings* &rGlobalSettings, bool &bInGlobalSettings,
         const Reference< XComponentContext > &rComponentContext )
 {
-    SolarMutexResettableGuard aWriteLock;
-    Reference< XNameAccess > xPersistentWindowState( rPersistentWindowState );
-    aWriteLock.clear();
-
-    if ( xPersistentWindowState.is() )
+    if ( rPersistentWindowState.is() )
     {
         bool bGetSettingsState( false );
 
-        aWriteLock.reset();
+        SolarMutexResettableGuard aWriteLock;
         bool bGlobalSettings( bInGlobalSettings );
         GlobalSettings* pGlobalSettings( nullptr );
         if ( rGlobalSettings == nullptr )
@@ -512,7 +508,7 @@ bool LayoutManager::readWindowStateData( const OUString& aName, UIElement& rElem
         try
         {
             Sequence< PropertyValue > aWindowState;
-            if ( xPersistentWindowState->hasByName( aName ) && (xPersistentWindowState->getByName( aName ) >>= aWindowState) )
+            if ( rPersistentWindowState->hasByName( aName ) && (rPersistentWindowState->getByName( aName ) >>= aWindowState) )
             {
                 bool bValue( false );
                 for ( sal_Int32 n = 0; n < aWindowState.getLength(); n++ )
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 9dff9b9..785ca6f9c 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1406,13 +1406,12 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno
     bool bShowElement( rElement.m_bVisible && !rElement.m_bMasterHide && implts_isParentWindowVisible() );
     aReadLock.clear();
 
-    uno::Reference< awt::XDockableWindow > xDockWindow( rDockWindow );
-    uno::Reference< awt::XWindow2 >        xWindow( xDockWindow, uno::UNO_QUERY );
+    uno::Reference< awt::XWindow2 >  xWindow( rDockWindow, uno::UNO_QUERY );
 
     vcl::Window*  pWindow( nullptr );
     ToolBox* pToolBox( nullptr );
 
-    if ( xDockWindow.is() && xWindow.is() )
+    if ( rDockWindow.is() && xWindow.is() )
     {
         {
             SolarMutexGuard aGuard;
@@ -1450,7 +1449,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno
             bool bUndefPos = hasDefaultPosValue( rElement.m_aFloatingData.m_aPos );
             bool bSetSize = ( rElement.m_aFloatingData.m_aSize.Width != 0 &&
                               rElement.m_aFloatingData.m_aSize.Height != 0 );
-            xDockWindow->setFloatingMode( sal_True );
+            rDockWindow->setFloatingMode( sal_True );
             if ( bUndefPos )
             {
                 aPos = implts_findNextCascadeFloatingPos();
@@ -1501,9 +1500,9 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno
                 SolarMutexGuard aGuard;
                 pToolBox->SetAlign( ImplConvertAlignment(rElement.m_aDockedData.m_nDockedArea )  );
                 pToolBox->SetLineCount( 1 );
-                xDockWindow->setFloatingMode( sal_False );
+                rDockWindow->setFloatingMode( sal_False );
                 if ( rElement.m_aDockedData.m_bLocked )
-                    xDockWindow->lock();
+                    rDockWindow->lock();
                 aSize = pToolBox->CalcWindowSizePixel();
                 bSetSize = true;
 
diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx
index befd73f1..8172e01 100644
--- a/framework/source/services/pathsettings.cxx
+++ b/framework/source/services/pathsettings.cxx
@@ -840,7 +840,6 @@ PathSettings::EChangeOp PathSettings::impl_updatePath(const OUString& sPath
 
 css::uno::Sequence< sal_Int32 > PathSettings::impl_mapPathName2IDList(const OUString& sPath)
 {
-    OUString sOldStyleProp = sPath;
     OUString sInternalProp = sPath+POSTFIX_INTERNAL_PATHS;
     OUString sUserProp     = sPath+POSTFIX_USER_PATHS;
     OUString sWriteProp    = sPath+POSTFIX_WRITE_PATH;
@@ -865,7 +864,7 @@ css::uno::Sequence< sal_Int32 > PathSettings::impl_mapPathName2IDList(const OUSt
     {
         const css::beans::Property& rProp = m_lPropDesc[i];
 
-        if (rProp.Name.equals(sOldStyleProp))
+        if (rProp.Name.equals(sPath))
             lIDs[IDGROUP_OLDSTYLE] = rProp.Handle;
         else
         if (rProp.Name.equals(sInternalProp))
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx
index 3c74936..902e277 100644
--- a/framework/source/uielement/menubarmanager.cxx
+++ b/framework/source/uielement/menubarmanager.cxx
@@ -1293,8 +1293,7 @@ void MenuBarManager::FillMenuManager( Menu* pMenu, const Reference< XFrame >& rF
                         // Set image for the addon popup menu item
                         if ( bItemShowMenuImages && !pPopup->GetItemImage( ITEMID_ADDONLIST ))
                         {
-                            Reference< XFrame > xTemp( rFrame );
-                            Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aItemCommand, false, xTemp );
+                            Image aImage = vcl::CommandInfoProvider::Instance().GetImageForCommand( aItemCommand, false, rFrame );
                             if ( !!aImage )
                                    pPopup->SetItemImage( ITEMID_ADDONLIST, aImage );
                         }
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 09f754b..f0ae7ef 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1109,8 +1109,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
 
                 if ( aRefPoint.bResult )
                 {
-                    ToolBarMerger::ProcessMergeOperation( m_xFrame,
-                                                          m_pToolBar,
+                    ToolBarMerger::ProcessMergeOperation( m_pToolBar,
                                                           aRefPoint.nPos,
                                                           nItemId,
                                                           m_aCommandMap,
@@ -1121,8 +1120,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine
                 }
                 else
                 {
-                    ToolBarMerger::ProcessMergeFallback( m_xFrame,
-                                                         m_pToolBar,
+                    ToolBarMerger::ProcessMergeFallback( m_pToolBar,
                                                          aRefPoint.nPos,
                                                          nItemId,
                                                          m_aCommandMap,
diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx
index 0a7fb02..db77987 100644
--- a/framework/source/uielement/toolbarmerger.cxx
+++ b/framework/source/uielement/toolbarmerger.cxx
@@ -264,11 +264,6 @@ ReferenceToolbarPathInfo ToolBarMerger::FindReferencePoint(
  Processes a merge operation.
 
  @param
-     xFrame
-
-     Must be a valid reference to a frame.
-
- @param
      pToolbar
 
      A valid pointer to the toolbar where the merge
@@ -312,7 +307,6 @@ ReferenceToolbarPathInfo ToolBarMerger::FindReferencePoint(
      false.
 */
 bool ToolBarMerger::ProcessMergeOperation(
-    const uno::Reference< frame::XFrame >& xFrame,
     ToolBox*                               pToolbar,
     sal_uInt16                             nPos,
     sal_uInt16&                            rItemId,
@@ -323,11 +317,11 @@ bool ToolBarMerger::ProcessMergeOperation(
     const AddonToolbarItemContainer&       rItems )
 {
     if ( rMergeCommand == MERGECOMMAND_ADDAFTER )
-        return MergeItems( xFrame, pToolbar, nPos, 1, rItemId, rCommandMap, rModuleIdentifier, rItems );
+        return MergeItems( pToolbar, nPos, 1, rItemId, rCommandMap, rModuleIdentifier, rItems );
     else if ( rMergeCommand == MERGECOMMAND_ADDBEFORE )
-        return MergeItems( xFrame, pToolbar, nPos, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
+        return MergeItems( pToolbar, nPos, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
     else if ( rMergeCommand == MERGECOMMAND_REPLACE )
-        return ReplaceItem( xFrame, pToolbar, nPos, rItemId, rCommandMap, rModuleIdentifier, rItems );
+        return ReplaceItem( pToolbar, nPos, rItemId, rCommandMap, rModuleIdentifier, rItems );
     else if ( rMergeCommand == MERGECOMMAND_REMOVE )
         return RemoveItems( pToolbar, nPos, rMergeCommandParameter );
 
@@ -338,11 +332,6 @@ bool ToolBarMerger::ProcessMergeOperation(
  Processes a merge fallback operation.
 
  @param
-     xFrame
-
-     Must be a valid reference to a frame.
-
- @param
      pToolbar
 
      A valid pointer to the toolbar where the merge
@@ -381,7 +370,6 @@ bool ToolBarMerger::ProcessMergeOperation(
      false.
 */
 bool ToolBarMerger::ProcessMergeFallback(
-    const css::uno::Reference< css::frame::XFrame >& xFrame,
     ToolBox*                         pToolbar,
     sal_uInt16                       /*nPos*/,
     sal_uInt16&                      rItemId,
@@ -401,9 +389,9 @@ bool ToolBarMerger::ProcessMergeFallback(
              ( rMergeCommand == MERGECOMMAND_ADDAFTER ) )
     {
         if ( rMergeFallback == MERGEFALLBACK_ADDFIRST )
-            return MergeItems( xFrame, pToolbar, 0, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
+            return MergeItems( pToolbar, 0, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
         else if ( rMergeFallback == MERGEFALLBACK_ADDLAST )
-            return MergeItems( xFrame, pToolbar, TOOLBOX_APPEND, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
+            return MergeItems( pToolbar, TOOLBOX_APPEND, 0, rItemId, rCommandMap, rModuleIdentifier, rItems );
     }
 
     return false;
@@ -413,11 +401,6 @@ bool ToolBarMerger::ProcessMergeFallback(
  Merges (adds) toolbar items into an existing toolbar.
 
  @param
-     xFrame
-
-     Must be a valid reference to a frame.
-
- @param
      pToolbar
 
      A valid pointer to the toolbar where the merge
@@ -451,7 +434,6 @@ bool ToolBarMerger::ProcessMergeFallback(
      false.
 */
 bool ToolBarMerger::MergeItems(
-    const uno::Reference< frame::XFrame >& rFrame,
     ToolBox*                               pToolbar,
     sal_uInt16                             nPos,
     sal_uInt16                             nModIndex,
@@ -462,8 +444,6 @@ bool ToolBarMerger::MergeItems(
 {
     const sal_Int32 nSize( rAddonToolbarItems.size() );
 
-    uno::Reference< frame::XFrame > xFrame( rFrame );
-
     sal_uInt16 nIndex( 0 );
     for ( sal_Int32 i = 0; i < nSize; i++ )
     {
@@ -507,11 +487,6 @@ bool ToolBarMerger::MergeItems(
  existing toolbar.
 
  @param
-     xFrame
-
-     Must be a valid reference to a frame.
-
- @param
      pToolbar
 
      A valid pointer to the toolbar where the merge
@@ -545,7 +520,6 @@ bool ToolBarMerger::MergeItems(
      false.
 */
 bool ToolBarMerger::ReplaceItem(
-    const uno::Reference< frame::XFrame >& xFrame,
     ToolBox*                               pToolbar,
     sal_uInt16                             nPos,
     sal_uInt16&                            rItemId,
@@ -554,7 +528,7 @@ bool ToolBarMerger::ReplaceItem(
     const AddonToolbarItemContainer&       rAddonToolbarItems )
 {
     pToolbar->RemoveItem( nPos );
-    return MergeItems( xFrame, pToolbar, nPos, 0, rItemId, rCommandMap, rModuleIdentifier, rAddonToolbarItems );
+    return MergeItems( pToolbar, nPos, 0, rItemId, rCommandMap, rModuleIdentifier, rAddonToolbarItems );
 }
 
 /**
diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx
index dab32d1..0604509 100644
--- a/i18npool/source/search/textsearch.cxx
+++ b/i18npool/source/search/textsearch.cxx
@@ -685,8 +685,7 @@ SearchResult TextSearch::NSrchFrwrd( const OUString& searchStr, sal_Int32 startP
 
     OUString sSearchKey = bUsePrimarySrchStr ? sSrchStr : sSrchStr2;
 
-    OUString aStr( searchStr );
-    sal_Int32 nSuchIdx = aStr.getLength();
+    sal_Int32 nSuchIdx = searchStr.getLength();
     sal_Int32 nEnde = endPos;
     if( !nSuchIdx || !sSearchKey.getLength() || sSearchKey.getLength() > nSuchIdx )
         return aRet;
@@ -704,15 +703,15 @@ SearchResult TextSearch::NSrchFrwrd( const OUString& searchStr, sal_Int32 startP
 
     for (sal_Int32 nCmpIdx = startPos; // start position for the search
             nCmpIdx <= nEnde;
-            nCmpIdx += GetDiff( aStr[nCmpIdx + sSearchKey.getLength()-1]))
+            nCmpIdx += GetDiff( searchStr[nCmpIdx + sSearchKey.getLength()-1]))
     {
         // if the match would be the completed cells, skip it.

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list