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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Oct 24 06:36:40 UTC 2018


 svx/source/core/graphichelper.cxx                        |    2 -
 svx/source/engine3d/helperminimaldepth3d.cxx             |    2 -
 svx/source/engine3d/obj3d.cxx                            |    2 -
 svx/source/engine3d/view3d.cxx                           |    2 -
 svx/source/fmcomp/fmgridcl.cxx                           |    2 -
 svx/source/fmcomp/gridctrl.cxx                           |    4 +-
 svx/source/form/fmundo.cxx                               |    2 -
 svx/source/form/fmvwimp.cxx                              |    4 +-
 svx/source/form/navigatortree.cxx                        |    4 +-
 svx/source/form/navigatortreemodel.cxx                   |    3 --
 svx/source/sdr/contact/viewcontactofgroup.cxx            |    2 -
 svx/source/sdr/contact/viewcontactofsdrpage.cxx          |    2 -
 svx/source/sdr/overlay/overlayobjectlist.cxx             |    2 -
 svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx |    2 -
 svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx        |    2 -
 svx/source/sdr/primitive2d/sdrole2primitive2d.cxx        |    2 -
 svx/source/sdr/properties/e3dsceneproperties.cxx         |    2 -
 svx/source/sdr/properties/textproperties.cxx             |    2 -
 svx/source/sidebar/area/AreaPropertyPanelBase.cxx        |    6 ++--
 svx/source/sidebar/nbdtmg.cxx                            |   20 ++++++-------
 svx/source/smarttags/SmartTagMgr.cxx                     |    6 +---
 svx/source/svdraw/svdcrtv.cxx                            |    8 ++---
 svx/source/svdraw/svddrgmt.cxx                           |    2 -
 svx/source/svdraw/svddrgv.cxx                            |    2 -
 svx/source/svdraw/svdedtv2.cxx                           |    2 -
 svx/source/svdraw/svdedxv.cxx                            |    2 -
 svx/source/svdraw/svdhdl.cxx                             |   22 +++++++--------
 svx/source/svdraw/svdmrkv.cxx                            |    2 -
 svx/source/svdraw/svdobj.cxx                             |    2 -
 svx/source/svdraw/svdoole2.cxx                           |    2 -
 svx/source/svdraw/svdopath.cxx                           |    2 -
 svx/source/svdraw/svdsnpv.cxx                            |    4 +-
 svx/source/svdraw/svdview.cxx                            |    2 -
 svx/source/table/accessibletableshape.cxx                |    2 -
 svx/source/table/tablecontroller.cxx                     |    2 -
 svx/source/table/tablehandles.cxx                        |    4 +-
 svx/source/unodraw/unoshap2.cxx                          |    2 -
 svx/source/unodraw/unoshap3.cxx                          |    2 -
 svx/source/unodraw/unoshap4.cxx                          |    4 +-
 svx/source/unodraw/unoshape.cxx                          |    3 --
 svx/source/unodraw/unoshtxt.cxx                          |    2 -
 svx/source/xml/xmlgrhlp.cxx                              |    6 +---
 svx/source/xoutdev/xattr.cxx                             |    2 -
 43 files changed, 75 insertions(+), 81 deletions(-)

New commits:
commit 2629aac31142449312f77c5843ea209cc810acb4
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 23 09:47:10 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Oct 24 08:36:11 2018 +0200

    clang-tidy performance-unnecessary-copy-init in svx
    
    Change-Id: I27f4dd0cb08f9b62496a1c51eed732a678e1c2e5
    Reviewed-on: https://gerrit.libreoffice.org/62252
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index 6c997eb4c929..017545603101 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -352,7 +352,7 @@ void GraphicHelper::SaveShapeAsGraphic(weld::Window* pParent,  const Reference<
         Reference< XPropertySet > xShapeSet( xShape, UNO_QUERY_THROW );
 
         SvtPathOptions aPathOpt;
-        OUString sGraphicPath( aPathOpt.GetGraphicPath() );
+        const OUString& sGraphicPath( aPathOpt.GetGraphicPath() );
 
         FileDialogHelper aDialogHelper(TemplateDescription::FILESAVE_AUTOEXTENSION, FileDialogFlags::NONE, pParent);
         Reference < XFilePicker3 > xFilePicker = aDialogHelper.GetFilePicker();
diff --git a/svx/source/engine3d/helperminimaldepth3d.cxx b/svx/source/engine3d/helperminimaldepth3d.cxx
index 228fc5876d20..04bac4157564 100644
--- a/svx/source/engine3d/helperminimaldepth3d.cxx
+++ b/svx/source/engine3d/helperminimaldepth3d.cxx
@@ -110,7 +110,7 @@ namespace drawinglayer
 
                     for(sal_uInt32 a(0); a < nPolyCount; a++)
                     {
-                           const basegfx::B3DPolygon aPolygon(rPolyPolygon.getB3DPolygon(a));
+                        const basegfx::B3DPolygon& aPolygon(rPolyPolygon.getB3DPolygon(a));
                         const sal_uInt32 nCount(aPolygon.count());
 
                         for(sal_uInt32 b(0); b < nCount; b++)
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index 15ecacd3ed16..a7d6c5d05e59 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -308,7 +308,7 @@ basegfx::B3DRange E3dObject::RecalcBoundVolume() const
     if(pVCOfE3D)
     {
         // BoundVolume is without 3D object transformation, use correct sequence
-        const drawinglayer::primitive3d::Primitive3DContainer xLocalSequence(pVCOfE3D->getVIP3DSWithoutObjectTransform());
+        const drawinglayer::primitive3d::Primitive3DContainer& xLocalSequence(pVCOfE3D->getVIP3DSWithoutObjectTransform());
 
         if(!xLocalSequence.empty())
         {
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 7b0bcc451b10..807045ef5990 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -168,7 +168,7 @@ void Impl3DMirrorConstructOverlay::SetMirrorAxis(Point aMirrorAxisA, Point aMirr
     for(sal_uInt32 a(0); a < mrView.PaintWindowCount(); a++)
     {
         SdrPaintWindow* pCandidate = mrView.GetPaintWindow(a);
-        rtl::Reference< sdr::overlay::OverlayManager > xTargetOverlay = pCandidate->GetOverlayManager();
+        const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager();
 
         if(xTargetOverlay.is())
         {
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index ede783e1d746..99ea376c76f8 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -1497,7 +1497,7 @@ void FmGridControl::ColumnResized(sal_uInt16 nId)
 
     // transfer value to the model
     DbGridColumn* pCol = DbGridControl::GetColumns()[ GetModelColumnPos(nId) ].get();
-    Reference< css::beans::XPropertySet >  xColModel(pCol->getModel());
+    const Reference< css::beans::XPropertySet >&  xColModel(pCol->getModel());
     if (xColModel.is())
     {
         Any aWidth;
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index 79fa0339f7b3..dcdd6e913fbd 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -861,7 +861,7 @@ DbGridRow::DbGridRow(CursorWrapper* pCur, bool bPaintCursor)
                 m_eStatus = (pCur->isAfterLast() || pCur->isBeforeFirst()) ? GridRowStatus::Invalid : GridRowStatus::Clean;
             else
             {
-                Reference< XPropertySet > xSet = pCur->getPropertySet();
+                const Reference< XPropertySet >& xSet = pCur->getPropertySet();
                 if (xSet.is())
                 {
                     m_bIsNew = ::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_ISNEW));
@@ -903,7 +903,7 @@ void DbGridRow::SetState(CursorWrapper* pCur, bool bPaintCursor)
             m_eStatus = GridRowStatus::Clean;
             if (!bPaintCursor)
             {
-                Reference< XPropertySet > xSet = pCur->getPropertySet();
+                const Reference< XPropertySet >& xSet = pCur->getPropertySet();
                 DBG_ASSERT(xSet.is(), "DbGridRow::SetState : invalid cursor !");
 
                 if (::comphelper::getBOOL(xSet->getPropertyValue(FM_PROP_ISMODIFIED)))
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 971671888437..795332f0708e 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -401,7 +401,7 @@ void FmXUndoEnvironment::Inserted(FmFormObj* pObj)
         {
             try
             {
-                Reference< XIndexContainer > xObjectParent = pObj->GetOriginalParent();
+                const Reference< XIndexContainer >& xObjectParent = pObj->GetOriginalParent();
 
                 FmFormPage& rPage(dynamic_cast< FmFormPage& >( *pObj->getSdrPageFromSdrObject()));
                 Reference< XIndexAccess >  xForms( rPage.GetForms(), UNO_QUERY_THROW );
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index 48f0b2220bec..14100c57fb1a 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -545,7 +545,7 @@ void FmXFormView::addWindow(const SdrPageWindow& rWindow)
     if ( !pFormPage )
         return;
 
-    Reference< XControlContainer > xCC = rWindow.GetControlContainer();
+    const Reference< XControlContainer >& xCC = rWindow.GetControlContainer();
     if  (   xCC.is()
         &&  ( !findWindow( xCC ).is() )
         )
@@ -1470,7 +1470,7 @@ SdrObjectUniquePtr FmXFormView::implCreateXFormsControl( const svx::OXFormsDescr
         else {
 
             // create a button control
-            const MapMode eTargetMode( pOutDev->GetMapMode() );
+            const MapMode& eTargetMode( pOutDev->GetMapMode() );
             const MapMode eSourceMode(MapUnit::Map100thMM);
             const sal_uInt16 nObjID = OBJ_FM_BUTTON;
             ::Size controlSize(4000, 500);
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 1e073238e26b..82747e00acf0 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -482,7 +482,7 @@ namespace svxform
                         DBG_ASSERT( IsFormEntry(pSelectedForm), "NavigatorTree::Command: This entry must be a FormEntry." );
 
                         FmFormData* pFormData = static_cast<FmFormData*>(pSelectedForm->GetUserData());
-                        Reference< XForm >  xForm(  pFormData->GetFormIface());
+                        const Reference< XForm >&  xForm(  pFormData->GetFormIface());
 
                         Reference< XTabControllerModel >  xTabController(xForm, UNO_QUERY);
                         if( !xTabController.is() )
@@ -1010,7 +1010,7 @@ namespace svxform
         DBG_ASSERT( DND_ACTION_COPY != _nAction, "NavigatorTree::implExecuteDataTransfer: somebody changed the logics!" );
 
         // list of dragged entries
-        ListBoxEntrySet aDropped = _rData.selected();
+        const ListBoxEntrySet& aDropped = _rData.selected();
         DBG_ASSERT(!aDropped.empty(), "NavigatorTree::implExecuteDataTransfer: no entries!");
 
         // shell and model
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index d7354712e7af..62ce8a327dc0 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -883,8 +883,7 @@ namespace svxform
         if( dynamic_cast<const FmFormData*>( pEntryData) !=  nullptr )
         {
             FmFormData* pFormData = static_cast<FmFormData*>(pEntryData);
-            Reference< XForm >  xForm( pFormData->GetFormIface());
-            xFormComponent = xForm;
+            xFormComponent = pFormData->GetFormIface();
         }
 
         if( dynamic_cast<const FmControlData*>( pEntryData) !=  nullptr )
diff --git a/svx/source/sdr/contact/viewcontactofgroup.cxx b/svx/source/sdr/contact/viewcontactofgroup.cxx
index 19224da02d7b..d6a0e98dfcfe 100644
--- a/svx/source/sdr/contact/viewcontactofgroup.cxx
+++ b/svx/source/sdr/contact/viewcontactofgroup.cxx
@@ -63,7 +63,7 @@ namespace sdr
                 for(sal_uInt32 a(0); a < nObjectCount; a++)
                 {
                     const ViewContact& rCandidate(GetViewContact(a));
-                    const drawinglayer::primitive2d::Primitive2DContainer aCandSeq(rCandidate.getViewIndependentPrimitive2DContainer());
+                    const drawinglayer::primitive2d::Primitive2DContainer& aCandSeq(rCandidate.getViewIndependentPrimitive2DContainer());
 
                     xRetval.insert(xRetval.end(), aCandSeq.begin(), aCandSeq.end());
                 }
diff --git a/svx/source/sdr/contact/viewcontactofsdrpage.cxx b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
index 4e3cb8b2db4d..5eea087eac66 100644
--- a/svx/source/sdr/contact/viewcontactofsdrpage.cxx
+++ b/svx/source/sdr/contact/viewcontactofsdrpage.cxx
@@ -395,7 +395,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfPageHierarchy::crea
     for(sal_uInt32 a(0); a < nObjectCount; a++)
     {
         const ViewContact& rCandidate(GetViewContact(a));
-        const drawinglayer::primitive2d::Primitive2DContainer aCandSeq(rCandidate.getViewIndependentPrimitive2DContainer());
+        const drawinglayer::primitive2d::Primitive2DContainer& aCandSeq(rCandidate.getViewIndependentPrimitive2DContainer());
 
         xRetval.insert(xRetval.end(), aCandSeq.begin(), aCandSeq.end());
     }
diff --git a/svx/source/sdr/overlay/overlayobjectlist.cxx b/svx/source/sdr/overlay/overlayobjectlist.cxx
index 8b92e076eda2..182acf22e38b 100644
--- a/svx/source/sdr/overlay/overlayobjectlist.cxx
+++ b/svx/source/sdr/overlay/overlayobjectlist.cxx
@@ -80,7 +80,7 @@ namespace sdr
                         fLogicTolerance = aSizeLogic.Width();
                     }
 
-                    const drawinglayer::geometry::ViewInformation2D aViewInformation2D(pManager->getCurrentViewInformation2D());
+                    const drawinglayer::geometry::ViewInformation2D& aViewInformation2D(pManager->getCurrentViewInformation2D());
                     drawinglayer::processor2d::HitTestProcessor2D aHitTestProcessor2D(
                         aViewInformation2D,
                         rLogicPosition,
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
index 7143b91a635e..371ce7d538bd 100644
--- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx
@@ -41,7 +41,7 @@ namespace drawinglayer
             // add text
             if(!getSdrSTAttribute().getText().isDefault())
             {
-                const basegfx::B2DPolygon aUnitOutline(basegfx::utils::createUnitPolygon());
+                const basegfx::B2DPolygon& aUnitOutline(basegfx::utils::createUnitPolygon());
 
                 aRetval.push_back(
                     createTextPrimitive(
diff --git a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
index 76c274881bd3..d0067a99f683 100644
--- a/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrgrafprimitive2d.cxx
@@ -37,7 +37,7 @@ namespace drawinglayer
             Primitive2DContainer  aRetval;
 
             // create unit outline polygon
-            basegfx::B2DPolygon aUnitOutline(basegfx::utils::createUnitPolygon());
+            const basegfx::B2DPolygon& aUnitOutline(basegfx::utils::createUnitPolygon());
 
             // add fill, but only when graphic is transparent
             if(!getSdrLFSTAttribute().getFill().isDefault() && isTransparent())
diff --git a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
index 8efd59bba6be..6c4e2f6bdadf 100644
--- a/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrole2primitive2d.cxx
@@ -77,7 +77,7 @@ namespace drawinglayer
             Primitive2DContainer  aRetval;
 
             // create unit outline polygon
-            const basegfx::B2DPolygon aUnitOutline(basegfx::utils::createUnitPolygon());
+            const basegfx::B2DPolygon& aUnitOutline(basegfx::utils::createUnitPolygon());
 
             // add fill
             if(!bBehaveCompatibleToPaintVersion
diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx
index 4548c796489a..065bd5bba5de 100644
--- a/svx/source/sdr/properties/e3dsceneproperties.cxx
+++ b/svx/source/sdr/properties/e3dsceneproperties.cxx
@@ -279,7 +279,7 @@ namespace sdr
             GetObjectItemSet();
 
             E3dScene& rObj = static_cast<E3dScene&>(GetSdrObject());
-            Camera3D aSceneCam(rObj.GetCamera());
+            const Camera3D& aSceneCam(rObj.GetCamera());
 
             // ProjectionType
             mpItemSet->Put(Svx3DPerspectiveItem(aSceneCam.GetProjection()));
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index efd4148ab9af..9926586837f8 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -587,7 +587,7 @@ namespace sdr
                     if(pExtendedHint
                         && SfxHintId::StyleSheetModified == pExtendedHint->GetId())
                     {
-                        OUString aOldName(pExtendedHint->GetOldName());
+                        const OUString& aOldName(pExtendedHint->GetOldName());
                         OUString aNewName(pExtendedHint->GetStyleSheet()->GetName());
                         SfxStyleFamily eFamily = pExtendedHint->GetStyleSheet()->GetFamily();
 
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 5b4f67d85020..1235ecb98b2d 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -333,7 +333,7 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void)
             const SvxHatchListItem* pItem( pSh->GetItem(SID_HATCH_LIST) );
             if(pItem)
             {
-                XHatchListRef pXHatchList(pItem->GetHatchList());
+                const XHatchListRef& pXHatchList(pItem->GetHatchList());
                 mpLbFillAttr->Enable();
                 mpLbFillAttr->Clear();
                 mpLbFillAttr->Fill(pXHatchList);
@@ -381,7 +381,7 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void)
                 const SvxBitmapListItem* pItem = pSh->GetItem(SID_BITMAP_LIST);
                 if(pItem)
                 {
-                    XBitmapListRef pXBitmapList(pItem->GetBitmapList());
+                    const XBitmapListRef& pXBitmapList(pItem->GetBitmapList());
                     mpLbFillAttr->Fill(pXBitmapList);
 
                     mpLbFillAttr->AdaptDropDownLineCountToMaximum();
@@ -408,7 +408,7 @@ IMPL_LINK_NOARG(AreaPropertyPanelBase, SelectFillTypeHdl, ListBox&, void)
                 const SvxPatternListItem* pItem = pSh->GetItem(SID_PATTERN_LIST);
                 if(pItem)
                 {
-                    XPatternListRef pXPatternList(pItem->GetPatternList());
+                    const XPatternListRef& pXPatternList(pItem->GetPatternList());
                     mpLbFillAttr->Fill(pXPatternList);
 
                     mpLbFillAttr->AdaptDropDownLineCountToMaximum();
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 394215401a3e..4d21ea94fd9e 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -285,7 +285,7 @@ sal_uInt16 BulletsTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 mLe
     if ( nActLv == sal_uInt16(0xFFFF) )
         return sal_uInt16(0xFFFF);
 
-    SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
+    const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv));
     sal_Unicode cChar = aFmt.GetBulletChar();
     for(sal_uInt16 i = nFromIndex; i < DEFAULT_BULLET_TYPES; i++)
     {
@@ -447,11 +447,11 @@ sal_uInt16 NumberingTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 m
     if ( nActLv == sal_uInt16(0xFFFF) )
         return sal_uInt16(0xFFFF);
 
-    SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
+    const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv));
     //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0];
     //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0];
-    OUString sPrefix = aFmt.GetPrefix();
-    OUString sLclSuffix = aFmt.GetSuffix();
+    const OUString& sPrefix = aFmt.GetPrefix();
+    const OUString& sLclSuffix = aFmt.GetSuffix();
     sal_Int16 eNumType = aFmt.GetNumberingType();
 
     sal_uInt16 nCount = maNumberSettingsArr.size();
@@ -480,7 +480,7 @@ void NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_
     if ( nActLv == sal_uInt16(0xFFFF) )
         return;
 
-    SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
+    const SvxNumberFormat& aFmt(aNum.GetLevel(nActLv));
     SvxNumType eNumType = aFmt.GetNumberingType();
 
     sal_uInt16 nCount = maNumberSettingsArr.size();
@@ -614,7 +614,7 @@ void OutlineTypeMgr::Init()
                 Sequence<PropertyValue> aLevelProps;
                 aValueAny >>= aLevelProps;
                 NumSettings_Impl* pNew = lcl_CreateNumberingSettingsPtr(aLevelProps);
-                SvxNumberFormat aNumFmt( aDefNumRule.GetLevel( nLevel) );
+                const SvxNumberFormat& aNumFmt( aDefNumRule.GetLevel( nLevel) );
                 pNew->eLabelFollowedBy = aNumFmt.GetLabelFollowedBy();
                 pNew->nTabValue = aNumFmt.GetListtabPos();
                 pNew->eNumAlign = aNumFmt.GetNumAdjust();
@@ -642,9 +642,9 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m
             NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get();
             sal_Int16 eNType = _pSet->nNumberType;
 
-            SvxNumberFormat aFmt(aNum.GetLevel(iLevel));
-            OUString sPrefix = aFmt.GetPrefix();
-            OUString sLclSuffix = aFmt.GetSuffix();
+            const SvxNumberFormat& aFmt(aNum.GetLevel(iLevel));
+            const OUString& sPrefix = aFmt.GetPrefix();
+            const OUString& sLclSuffix = aFmt.GetSuffix();
                 sal_Int16 eNumType = aFmt.GetNumberingType();
                 if( eNumType == SVX_NUM_CHAR_SPECIAL)
             {
@@ -713,7 +713,7 @@ void OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uI
     sal_uInt16 nCount = pItemArr->pNumSettingsArr->size();
     for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++)
     {
-        SvxNumberFormat aFmt(aNum.GetLevel(iLevel));
+        const SvxNumberFormat& aFmt(aNum.GetLevel(iLevel));
         SvxNumType eNumType = aFmt.GetNumberingType();
 
         NumSettings_Impl* _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get();
diff --git a/svx/source/smarttags/SmartTagMgr.cxx b/svx/source/smarttags/SmartTagMgr.cxx
index b7cb3a3dbf2f..7d2ae7ea4365 100644
--- a/svx/source/smarttags/SmartTagMgr.cxx
+++ b/svx/source/smarttags/SmartTagMgr.cxx
@@ -82,10 +82,8 @@ void SmartTagMgr::RecognizeString( const OUString& rText,
                              const lang::Locale& rLocale,
                              sal_uInt32 nStart, sal_uInt32 nLen ) const
 {
-    for (const auto & i : maRecognizerList)
+    for (const Reference < smarttags::XSmartTagRecognizer >& xRecognizer : maRecognizerList)
     {
-        Reference < smarttags::XSmartTagRecognizer > xRecognizer = i;
-
         // if all smart tag types supported by this recognizer have been
         // disabled, we do not have to call the recognizer:
         bool bCallRecognizer = false;
@@ -104,7 +102,7 @@ void SmartTagMgr::RecognizeString( const OUString& rText,
             {
                 mxBreakIter.set( BreakIterator::create(mxContext) );
             }
-            i->recognize( rText, nStart, nLen,
+            xRecognizer->recognize( rText, nStart, nLen,
                                             smarttags::SmartTagRecognizerMode_PARAGRAPH,
                                             rLocale, xMarkup, maApplicationName, xController,
                                             mxBreakIter );
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index 051866a9b27d..5578cb193198 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -69,7 +69,7 @@ ImplConnectMarkerOverlay::ImplConnectMarkerOverlay(const SdrCreateView& rView, S
     for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++)
     {
         SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
-        rtl::Reference< sdr::overlay::OverlayManager > xTargetOverlay = pCandidate->GetOverlayManager();
+        const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager();
 
         if(xTargetOverlay.is())
         {
@@ -137,14 +137,14 @@ void ImpSdrCreateViewExtraData::CreateAndShowOverlay(const SdrCreateView& rView,
     for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++)
     {
         SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
-        rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager = pCandidate->GetOverlayManager();
+        const rtl::Reference<sdr::overlay::OverlayManager>& xOverlayManager = pCandidate->GetOverlayManager();
 
         if (xOverlayManager.is())
         {
             if(pObject)
             {
                 const sdr::contact::ViewContact& rVC = pObject->GetViewContact();
-                const drawinglayer::primitive2d::Primitive2DContainer aSequence = rVC.getViewIndependentPrimitive2DContainer();
+                const drawinglayer::primitive2d::Primitive2DContainer& aSequence = rVC.getViewIndependentPrimitive2DContainer();
                 std::unique_ptr<sdr::overlay::OverlayObject> pNew(new sdr::overlay::OverlayPrimitive2DSequenceObject(aSequence));
 
                 xOverlayManager->add(*pNew);
@@ -815,7 +815,7 @@ void SdrCreateView::ShowCreateObj(/*OutputDevice* pOut, sal_Bool bFull*/)
             for(sal_uInt32 a(0); a < PaintWindowCount(); a++)
             {
                 SdrPaintWindow* pCandidate = GetPaintWindow(a);
-                rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager = pCandidate->GetOverlayManager();
+                const rtl::Reference<sdr::overlay::OverlayManager>& xOverlayManager = pCandidate->GetOverlayManager();
 
                 if (xOverlayManager.is())
                 {
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 4f856c588dc8..6957043cf2f6 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -475,7 +475,7 @@ void SdrDragMethod::createSdrDragEntries_PointDrag()
 
                 if(pPath)
                 {
-                    const basegfx::B2DPolyPolygon aPathXPP = pPath->GetPathPoly();
+                    const basegfx::B2DPolyPolygon& aPathXPP = pPath->GetPathPoly();
 
                     if(aPathXPP.count())
                     {
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 46bc158c742e..f624ae2a5562 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -784,7 +784,7 @@ void SdrDragView::ShowDragObj()
         for(sal_uInt32 a(0); a < PaintWindowCount(); a++)
         {
             SdrPaintWindow* pCandidate = GetPaintWindow(a);
-            rtl::Reference<sdr::overlay::OverlayManager> xOverlayManager = pCandidate->GetOverlayManager();
+            const rtl::Reference<sdr::overlay::OverlayManager>& xOverlayManager = pCandidate->GetOverlayManager();
 
             if (xOverlayManager.is())
             {
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 2ee701195876..fdfc237ff043 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1412,7 +1412,7 @@ bool SdrEditView::ImpCanDismantle(const basegfx::B2DPolyPolygon& rPpolyPolygon,
     else if(bMakeLines && 1 == nPolygonCount)
     {
         // #i69172# ..or with at least 2 edges (curves or lines)
-        const basegfx::B2DPolygon aPolygon(rPpolyPolygon.getB2DPolygon(0));
+        const basegfx::B2DPolygon& aPolygon(rPpolyPolygon.getB2DPolygon(0));
         const sal_uInt32 nPointCount(aPolygon.count());
 
         if(nPointCount > 2)
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 4a058ad961d6..cbc6b661cc35 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -1189,7 +1189,7 @@ bool SdrObjEditView::SdrBeginTextEdit(
 
                         if (rPageWindow.GetPaintWindow().OutputToWindow())
                         {
-                            rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                            const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                             if (xManager.is())
                             {
                                 std::unique_ptr<TextEditOverlayObject> pNewTextEditOverlayObject(new TextEditOverlayObject(
diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx
index dd2057ccacb7..3a81b869d89f 100644
--- a/svx/source/svdraw/svdhdl.cxx
+++ b/svx/source/svdraw/svdhdl.cxx
@@ -561,7 +561,7 @@ void SdrHdl::CreateB2dIAObject()
                             aMoveOutsideOffset.AdjustX(aOffset.Height() );
                     }
 
-                    rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                    const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                     if (xManager.is())
                     {
                         basegfx::B2DPoint aPosition(aPos.X(), aPos.Y());
@@ -1107,7 +1107,7 @@ void SdrHdlColor::CreateB2dIAObject()
 
                     if(rPageWindow.GetPaintWindow().OutputToWindow())
                     {
-                        rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                        const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                         if (xManager.is())
                         {
                             BitmapEx aBmpCol(CreateColorDropper(aMarkerColor));
@@ -1257,7 +1257,7 @@ void SdrHdlGradient::CreateB2dIAObject()
 
                     if(rPageWindow.GetPaintWindow().OutputToWindow())
                     {
-                        rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                        const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                         if (xManager.is())
                         {
                             // striped line in between
@@ -1413,7 +1413,7 @@ void SdrHdlLine::CreateB2dIAObject()
 
                     if(rPageWindow.GetPaintWindow().OutputToWindow())
                     {
-                        rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                        const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                         if (xManager.is())
                         {
                             basegfx::B2DPoint aPosition1(pHdl1->GetPos().X(), pHdl1->GetPos().Y());
@@ -1469,7 +1469,7 @@ void SdrHdlBezWgt::CreateB2dIAObject()
 
                     if(rPageWindow.GetPaintWindow().OutputToWindow())
                     {
-                        rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                        const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                         if (xManager.is())
                         {
                             basegfx::B2DPoint aPosition1(pHdl1->GetPos().X(), pHdl1->GetPos().Y());
@@ -1525,7 +1525,7 @@ void E3dVolumeMarker::CreateB2dIAObject()
 
                     if(rPageWindow.GetPaintWindow().OutputToWindow())
                     {
-                        rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                        const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                         if (xManager.is() && aWireframePoly.count())
                         {
                             std::unique_ptr<sdr::overlay::OverlayObject> pNewOverlayObject(new
@@ -1587,7 +1587,7 @@ void ImpEdgeHdl::CreateB2dIAObject()
 
                         if(rPageWindow.GetPaintWindow().OutputToWindow())
                         {
-                            rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                            const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                             if (xManager.is())
                             {
                                 basegfx::B2DPoint aPosition(aPos.X(), aPos.Y());
@@ -1703,7 +1703,7 @@ void ImpMeasureHdl::CreateB2dIAObject()
 
                     if(rPageWindow.GetPaintWindow().OutputToWindow())
                     {
-                        rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                        const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                         if (xManager.is())
                         {
                             basegfx::B2DPoint aPosition(aPos.X(), aPos.Y());
@@ -1765,7 +1765,7 @@ void ImpTextframeHdl::CreateB2dIAObject()
 
                     if(rPageWindow.GetPaintWindow().OutputToWindow())
                     {
-                        rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                        const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                         if (xManager.is())
                         {
                             const basegfx::B2DPoint aTopLeft(maRect.Left(), maRect.Top());
@@ -2359,7 +2359,7 @@ void SdrCropHdl::CreateB2dIAObject()
 
             if(rPageWindow.GetPaintWindow().OutputToWindow())
             {
-                rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                 if (xManager.is())
                 {
                     basegfx::B2DPoint aPosition(aPos.X(), aPos.Y());
@@ -2607,7 +2607,7 @@ void SdrCropViewHdl::CreateB2dIAObject()
 
         if(rPageWindow.GetPaintWindow().OutputToWindow())
         {
-            rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+            const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
             if(xManager.is())
             {
                 std::unique_ptr<sdr::overlay::OverlayObject> pNew(new sdr::overlay::OverlayPrimitive2DSequenceObject(aSequence));
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 9e596cda77a8..d70cc8293c53 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -90,7 +90,7 @@ ImplMarkingOverlay::ImplMarkingOverlay(const SdrPaintView& rView, const basegfx:
     for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++)
     {
         SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
-        rtl::Reference< sdr::overlay::OverlayManager > xTargetOverlay = pCandidate->GetOverlayManager();
+        const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager();
 
         if (xTargetOverlay.is())
         {
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index fbbf0ff2d008..4df3c375243f 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -1140,7 +1140,7 @@ basegfx::B2DPolyPolygon SdrObject::TakeContour() const
 
         // get sequence from clone
         const sdr::contact::ViewContact& rVC(pClone->GetViewContact());
-        const drawinglayer::primitive2d::Primitive2DContainer xSequence(rVC.getViewIndependentPrimitive2DContainer());
+        const drawinglayer::primitive2d::Primitive2DContainer& xSequence(rVC.getViewIndependentPrimitive2DContainer());
 
         if(!xSequence.empty())
         {
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 02179d16879f..812852b905f8 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -378,7 +378,7 @@ void SAL_CALL SdrLightEmbeddedClient_Impl::activatingUI()
             // only deactivate ole objects which belongs to the same frame
             if ( xFrame == lcl_getFrame_throw(pObj) )
             {
-                uno::Reference< embed::XEmbeddedObject > xObject = pObj->GetObjRef();
+                const uno::Reference< embed::XEmbeddedObject >& xObject = pObj->GetObjRef();
                 try
                 {
                     if ( xObject->getStatus( pObj->GetAspect() ) & embed::EmbedMisc::MS_EMBED_ACTIVATEWHENVISIBLE )
diff --git a/svx/source/svdraw/svdopath.cxx b/svx/source/svdraw/svdopath.cxx
index 20dd65125d2e..0e56b63494e6 100644
--- a/svx/source/svdraw/svdopath.cxx
+++ b/svx/source/svdraw/svdopath.cxx
@@ -2603,7 +2603,7 @@ SdrObject* SdrPathObj::RipPoint(sal_uInt32 nHdlNum, sal_uInt32& rNewPt0Index)
     {
         if(0 == nPoly)
         {
-            const basegfx::B2DPolygon aCandidate(aLocalPolyPolygon.getB2DPolygon(nPoly));
+            const basegfx::B2DPolygon& aCandidate(aLocalPolyPolygon.getB2DPolygon(nPoly));
             const sal_uInt32 nPointCount(aCandidate.count());
 
             if(nPointCount)
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index dd43290445c2..77100d37d6fc 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -58,7 +58,7 @@ ImplPageOriginOverlay::ImplPageOriginOverlay(const SdrPaintView& rView, const ba
     for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++)
     {
         SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
-        rtl::Reference< sdr::overlay::OverlayManager > xTargetOverlay = pCandidate->GetOverlayManager();
+        const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager();
 
         if (xTargetOverlay.is())
         {
@@ -132,7 +132,7 @@ ImplHelpLineOverlay::ImplHelpLineOverlay(
     for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++)
     {
         SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
-        rtl::Reference< sdr::overlay::OverlayManager > xTargetOverlay = pCandidate->GetOverlayManager();
+        const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager();
 
         if (xTargetOverlay.is())
         {
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index 37f5d07f2e34..c68bbe443a72 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -92,7 +92,7 @@ void SdrDropMarkerOverlay::ImplCreateOverlays(
     for(sal_uInt32 a(0); a < rView.PaintWindowCount(); a++)
     {
         SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
-        rtl::Reference< sdr::overlay::OverlayManager > xTargetOverlay = pCandidate->GetOverlayManager();
+        const rtl::Reference< sdr::overlay::OverlayManager >& xTargetOverlay = pCandidate->GetOverlayManager();
 
         if (xTargetOverlay.is())
         {
diff --git a/svx/source/table/accessibletableshape.cxx b/svx/source/table/accessibletableshape.cxx
index f856d6b6e3d5..5f4a82a0d00f 100644
--- a/svx/source/table/accessibletableshape.cxx
+++ b/svx/source/table/accessibletableshape.cxx
@@ -938,7 +938,7 @@ AccessibleCell* AccessibleTableShape::GetActiveAccessibleCell()
         sdr::table::SdrTableObj* pTableObj = pController->GetTableObj();
         if ( pTableObj )
         {
-            sdr::table::CellRef xCellRef (pTableObj->getActiveCell());
+            const sdr::table::CellRef& xCellRef (pTableObj->getActiveCell());
             if ( xCellRef.is() )
             {
                 try
diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx
index cedf54732426..07d4201abe3f 100644
--- a/svx/source/table/tablecontroller.cxx
+++ b/svx/source/table/tablecontroller.cxx
@@ -2204,7 +2204,7 @@ void SvxTableController::updateSelectionOverlay()
                 SdrPaintWindow* pPaintWindow = mrView.GetPaintWindow(nIndex);
                 if( pPaintWindow )
                 {
-                    rtl::Reference < sdr::overlay::OverlayManager > xOverlayManager = pPaintWindow->GetOverlayManager();
+                    const rtl::Reference < sdr::overlay::OverlayManager >& xOverlayManager = pPaintWindow->GetOverlayManager();
                     if( xOverlayManager.is() )
                     {
                         std::unique_ptr<sdr::overlay::OverlayObjectCell> pOverlay(new sdr::overlay::OverlayObjectCell( aHighlight, aRanges ));
diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx
index 5e9e82ed64c6..4d2dec6fd78f 100644
--- a/svx/source/table/tablehandles.cxx
+++ b/svx/source/table/tablehandles.cxx
@@ -168,7 +168,7 @@ void TableEdgeHdl::CreateB2dIAObject()
 
                     if(rPageWindow.GetPaintWindow().OutputToWindow())
                     {
-                        rtl::Reference< sdr::overlay::OverlayManager > xManager = rPageWindow.GetOverlayManager();
+                        const rtl::Reference< sdr::overlay::OverlayManager >& xManager = rPageWindow.GetOverlayManager();
                         if (xManager.is())
                         {
                             if(aVisible.count())
@@ -270,7 +270,7 @@ void TableBorderHdl::CreateB2dIAObject()
 
             if (rPageWindow.GetPaintWindow().OutputToWindow())
             {
-                rtl::Reference<sdr::overlay::OverlayManager> xManager = rPageWindow.GetOverlayManager();
+                const rtl::Reference<sdr::overlay::OverlayManager>& xManager = rPageWindow.GetOverlayManager();
 
                 if (xManager.is())
                 {
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 959b8be84887..20802ca894ca 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1120,7 +1120,7 @@ bool SvxShapePolyPolygon::getPropertyValueImpl( const OUString& rName, const Sfx
         if( nCount > 0 )
         {
             // get single polygon
-            const basegfx::B2DPolygon aPoly(aPolyPoly.getB2DPolygon(0));
+            const basegfx::B2DPolygon& aPoly(aPolyPoly.getB2DPolygon(0));
 
             // get pointer to arrays
             awt::Point* pSequence = aRetval.getArray();
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index 0e487d0c7888..2d5871e00c1f 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -707,7 +707,7 @@ static void B3dPolyPolygon_to_PolyPolygonShape3D( const basegfx::B3DPolyPolygon&
     drawing::DoubleSequence* pOuterSequenceZ = aRetval.SequenceZ.getArray();
     for(sal_uInt32 a(0);a<rSourcePolyPolygon.count();a++)
     {
-        const basegfx::B3DPolygon aPoly(rSourcePolyPolygon.getB3DPolygon(a));
+        const basegfx::B3DPolygon& aPoly(rSourcePolyPolygon.getB3DPolygon(a));
         sal_Int32 nPointCount(aPoly.count());
         if(aPoly.isClosed()) nPointCount++;
         pOuterSequenceX->realloc(nPointCount);
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 0e1300884c8d..459cd45101c6 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -160,7 +160,7 @@ bool SvxOle2Shape::setPropertyValueImpl( const OUString& rName, const SfxItemPro
             if( pOle )
             {
                 GraphicObject aGrafObj( xGraphic );
-                const Graphic aGraphic( aGrafObj.GetGraphic() );
+                const Graphic& aGraphic( aGrafObj.GetGraphic() );
                 pOle->SetGraphicToObj( aGraphic );
             }
             return true;
@@ -540,7 +540,7 @@ const SvGlobalName SvxOle2Shape::GetClassName_Impl(OUString& rHexCLSID)
 
         if (rHexCLSID.isEmpty())
         {
-            uno::Reference < embed::XEmbeddedObject > xObj( pOle2Obj->GetObjRef() );
+            const uno::Reference < embed::XEmbeddedObject >& xObj( pOle2Obj->GetObjRef() );
             if ( xObj.is() )
             {
                 aClassName = SvGlobalName( xObj->getClassID() );
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 0bd7c77fb017..44e33d61df0a 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -2809,8 +2809,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
         SdrLayer* pLayer = GetSdrObject()->getSdrModelFromSdrObject().GetLayerAdmin().GetLayerPerID(GetSdrObject()->GetLayer());
         if( pLayer )
         {
-            OUString aName( pLayer->GetName() );
-            rValue <<= aName;
+            rValue <<= pLayer->GetName();
         }
         break;
     }
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 46ea6032705c..4dffab0d5906 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -311,7 +311,7 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
                         sdr::table::SdrTableObj* pTableObj = dynamic_cast< sdr::table::SdrTableObj* >( mpObject );
                         if(pTableObj)
                         {
-                            sdr::table::CellRef xCell = pTableObj->getActiveCell();
+                            const sdr::table::CellRef& xCell = pTableObj->getActiveCell();
                             if (xCell.is())
                             {
                                 sdr::table::Cell* pCellObj = dynamic_cast< sdr::table::Cell* >( mpText );
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index ca23ea3dc7a2..27341ecd171d 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -104,10 +104,8 @@ public:
 };
 
 
-GraphicInputStream::GraphicInputStream(GraphicObject const & raGraphicObject, const OUString & rMimeType)
+GraphicInputStream::GraphicInputStream(GraphicObject const & aGraphicObject, const OUString & rMimeType)
 {
-    GraphicObject aGraphicObject(raGraphicObject);
-
     maTempFile.EnableKillingFile();
 
     if (aGraphicObject.GetType() != GraphicType::NONE)
@@ -116,7 +114,7 @@ GraphicInputStream::GraphicInputStream(GraphicObject const & raGraphicObject, co
 
         if (pStream)
         {
-            Graphic aGraphic(aGraphicObject.GetGraphic());
+            const Graphic& aGraphic(aGraphicObject.GetGraphic());
             const GfxLink aGfxLink(aGraphic.GetGfxLink());
             bool bRet = false;
 
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx
index d22b3d667f76..74912a9ded57 100644
--- a/svx/source/xoutdev/xattr.cxx
+++ b/svx/source/xoutdev/xattr.cxx
@@ -200,7 +200,7 @@ OUString NameOrIndex::CheckNamedItem( const NameOrIndex* pCheckItem, const sal_u
                     }
                     else
                     {
-                        const OUString aEntryName = pEntry->GetName();
+                        const OUString& aEntryName = pEntry->GetName();
                         if(aEntryName.getLength() >= aUser.getLength())
                         {
                             sal_Int32 nThisIndex = aEntryName.copy( aUser.getLength() ).toInt32();


More information about the Libreoffice-commits mailing list