[Libreoffice-commits] core.git: dbaccess/source desktop/source drawinglayer/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 23 12:35:24 UTC 2018


 dbaccess/source/filter/hsqldb/createparser.cxx              |    7 +++----
 dbaccess/source/filter/xml/xmlExport.cxx                    |    2 +-
 dbaccess/source/ui/browser/brwview.cxx                      |    2 +-
 dbaccess/source/ui/dlg/ConnectionHelper.cxx                 |    2 +-
 dbaccess/source/ui/dlg/ConnectionPage.cxx                   |    2 +-
 dbaccess/source/ui/dlg/admincontrols.cxx                    |    2 +-
 dbaccess/source/ui/dlg/dbwizsetup.cxx                       |    2 +-
 dbaccess/source/ui/dlg/generalpage.cxx                      |    4 ++--
 dbaccess/source/ui/querydesign/JoinController.cxx           |    2 +-
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx       |    6 +++---
 dbaccess/source/ui/querydesign/TableWindowListBox.cxx       |    2 +-
 dbaccess/source/ui/tabledesign/TEditControl.cxx             |    2 +-
 desktop/source/app/app.cxx                                  |    2 +-
 desktop/source/deployment/gui/dp_gui_dialog2.cxx            |    2 +-
 desktop/source/deployment/registry/dp_backend.cxx           |    2 +-
 desktop/source/lib/init.cxx                                 |    2 +-
 drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx |    2 +-
 drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx |    2 +-
 drawinglayer/source/primitive3d/polygonprimitive3d.cxx      |    2 +-
 drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx  |    4 ++--
 drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx  |    6 +++---
 drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx   |    6 +++---
 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx  |    6 +++---
 drawinglayer/source/processor2d/vclpixelprocessor2d.cxx     |    4 ++--
 drawinglayer/source/processor3d/cutfindprocessor3d.cxx      |    4 ++--
 25 files changed, 39 insertions(+), 40 deletions(-)

New commits:
commit 32ca870833a89ec16ed7e08296dcc573dcc64029
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 23 07:47:33 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Tue Oct 23 14:34:59 2018 +0200

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

diff --git a/dbaccess/source/filter/hsqldb/createparser.cxx b/dbaccess/source/filter/hsqldb/createparser.cxx
index 0588b641a04f..77b1fbec84b2 100644
--- a/dbaccess/source/filter/hsqldb/createparser.cxx
+++ b/dbaccess/source/filter/hsqldb/createparser.cxx
@@ -49,12 +49,11 @@ sal_Int32 lcl_IndexOfUnicode(const OString& rSource, const sal_Int32 nFrom = 0)
 }
 
 //Convert ascii escaped unicode to utf-8
-OUString lcl_ConvertToUTF8(const OString& rText)
+OUString lcl_ConvertToUTF8(const OString& original)
 {
-    OString original = rText;
-    OString sResult = rText;
+    OString sResult = original;
     sal_Int32 nIndex = lcl_IndexOfUnicode(sResult);
-    while (nIndex != -1 && nIndex < rText.getLength())
+    while (nIndex != -1 && nIndex < original.getLength())
     {
         const OString sHex = original.copy(nIndex + 2, 4);
         const sal_Unicode cDec = static_cast<sal_Unicode>(strtol(sHex.getStr(), nullptr, 16));
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 8f3f5757321e..4a23c3d9f5be 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -288,7 +288,7 @@ void ODBExport::exportDataSource()
 
         ::connectivity::DriversConfig aDriverConfig(getComponentContext());
         const OUString sURL = ::comphelper::getString(xProp->getPropertyValue(PROPERTY_URL));
-        ::comphelper::NamedValueCollection aDriverSupportedProperties( aDriverConfig.getProperties( sURL ) );
+        const ::comphelper::NamedValueCollection& aDriverSupportedProperties( aDriverConfig.getProperties( sURL ) );
 
         static OUString s_sTrue(::xmloff::token::GetXMLToken( XML_TRUE ));
         static OUString s_sFalse(::xmloff::token::GetXMLToken( XML_FALSE ));
diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx
index 1f44d6b703cb..bc9cd3b2cae1 100644
--- a/dbaccess/source/ui/browser/brwview.cxx
+++ b/dbaccess/source/ui/browser/brwview.cxx
@@ -45,7 +45,7 @@ namespace
     {
         bool bGrabFocus = false;
         SbaGridControl* pVclControl = _pView->getVclControl();
-        Reference< css::awt::XControl > xGrid = _pView->getGridControl();
+        const Reference< css::awt::XControl >& xGrid = _pView->getGridControl();
         if (pVclControl && xGrid.is())
         {
             bGrabFocus = true;
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index fe0ba4585089..79b65147c57a 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -138,7 +138,7 @@ namespace dbaui
         // forward the values to the controls
         if ( bValid )
         {
-            OUString sUrl = pUrlItem->GetValue();
+            const OUString& sUrl = pUrlItem->GetValue();
             setURL( sUrl );
 
             checkTestConnection();
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx
index ea87983a665d..3fef20d84ed4 100644
--- a/dbaccess/source/ui/dlg/ConnectionPage.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx
@@ -233,7 +233,7 @@ namespace dbaui
             m_pUserName->SetText(pUidItem->GetValue());
             m_pPasswordRequired->Check(pAllowEmptyPwd->GetValue());
 
-            OUString sUrl = pUrlItem->GetValue();
+            const OUString& sUrl = pUrlItem->GetValue();
             setURL( sUrl );
 
             const bool bEnableJDBC = m_pCollection->determineType(m_eType) == ::dbaccess::DST_JDBC;
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index 452fbed5791a..0891f0925d66 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -272,7 +272,7 @@ namespace dbaui
         RadioButton& rSocketPipeRadio = *m_pNamedPipeRadio;
         const SfxStringItem* pSocketPipeItem = pNamedPipe;
 #endif
-        OUString sSocketPipe( pSocketPipeItem->GetValue() );
+        const OUString& sSocketPipe( pSocketPipeItem->GetValue() );
         if ( !sSocketPipe.isEmpty() )
             rSocketPipeRadio.Check();
         else
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 78c025be49bf..7937d80e950a 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -152,7 +152,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* _pParent
     ::dbaccess::ODsnTypeCollection::TypeIterator aEnd = m_pCollection->end();
     for(PathId i = 1;aIter != aEnd;++aIter,++i)
     {
-        const OUString sURLPrefix = aIter.getURLPrefix();
+        const OUString& sURLPrefix = aIter.getURLPrefix();
         svt::RoadmapWizardTypes::WizardPath aPath;
         aPath.push_back(PAGE_DBSETUPWIZARD_INTRO);
         m_pCollection->fillPageIds(sURLPrefix,aPath);
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 0963e3a7bb5a..e324ed3859e4 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -123,7 +123,7 @@ namespace dbaui
                         ++aTypeLoop
                     )
                 {
-                    const OUString sURLPrefix = aTypeLoop.getURLPrefix();
+                    const OUString& sURLPrefix = aTypeLoop.getURLPrefix();
                     if ( !sURLPrefix.isEmpty() )
                     {
                         // skip mysql connection variations. It is handled in another window.
@@ -166,7 +166,7 @@ namespace dbaui
                         ++aTypeLoop
                     )
                 {
-                    const OUString sURLPrefix = aTypeLoop.getURLPrefix();
+                    const OUString& sURLPrefix = aTypeLoop.getURLPrefix();
                     if ( !sURLPrefix.isEmpty() )
                     {
                         OUString sDisplayName = aTypeLoop.getDisplayName();
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index f41438313952..e89dace04e84 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -181,7 +181,7 @@ void OJoinController::impl_onModifyChanged()
 void OJoinController::SaveTabWinPosSize(OTableWindow const * pTabWin, long nOffsetX, long nOffsetY)
 {
     // the data for the window
-    TTableWindowData::value_type pData = pTabWin->GetData();
+    const TTableWindowData::value_type& pData = pTabWin->GetData();
     OSL_ENSURE(pData != nullptr, "SaveTabWinPosSize : TabWin has no data !");
 
     // set Position & Size of data anew (with current window parameters)
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 37475fb2d01b..0c7e6c1b0d6e 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -950,7 +950,7 @@ bool OSelectionBrowseBox::SaveModified()
                             OUString sTableAlias = aFieldName.getToken(0,'.');
                             pEntry->SetAlias(sTableAlias);
                             OUString sColumnName = aFieldName.copy(sTableAlias.getLength()+1);
-                            Reference<XConnection> xConnection = rController.getConnection();
+                            const Reference<XConnection>& xConnection = rController.getConnection();
                             if ( !xConnection.is() )
                                 return false;
                             bError = fillColumnRef( sColumnName, sTableAlias, xConnection->getMetaData(), pEntry, bListAction );
@@ -1685,7 +1685,7 @@ void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel)
     const sal_uInt16 nNewLevel = nLevel +1;
     for (auto const& field : getFields())
     {
-        OTableFieldDescRef pEntry = field;
+        const OTableFieldDescRef& pEntry = field;
         OUString sValue = pEntry->GetCriteria(nLevel);
         if ( !sValue.isEmpty() )
         {
@@ -1715,7 +1715,7 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O
     bool bAllFieldsSearched = true;
     for (auto const& field : getFields())
     {
-        OTableFieldDescRef pEntry = field;
+        const OTableFieldDescRef& pEntry = field;
         const OUString   aField = pEntry->GetField();
         const OUString   aAlias = pEntry->GetAlias();
 
diff --git a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
index cac61db4d7fd..7f126a99d6f5 100644
--- a/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindowListBox.cxx
@@ -94,7 +94,7 @@ SvTreeListEntry* OTableWindowListBox::GetEntryFromText( const OUString& rEntryTe
     try
     {
         bool bCase = false;
-        Reference<XConnection> xConnection = rController.getConnection();
+        const Reference<XConnection>& xConnection = rController.getConnection();
         if(xConnection.is())
         {
             Reference<XDatabaseMetaData> xMeta = xConnection->getMetaData();
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 2dc9d91345c0..0a97c99213c9 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -1290,7 +1290,7 @@ bool OTableEditorCtrl::IsPrimaryKeyAllowed( long /*nRow*/ )
             // Memo and Image fields cannot be primary keys
             // or if the column cannot be dropped and the Required flag is not set
             // or if a css::sdbcx::View is available and the Required flag is not set
-            TOTypeInfoSP pTypeInfo = pFieldDescr->getTypeInfo();
+            const TOTypeInfoSP& pTypeInfo = pFieldDescr->getTypeInfo();
             if(     pTypeInfo->nSearchType == ColumnSearch::NONE
                 || (pFieldDescr->IsNullable() && pRow->IsReadOnly())
               )
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index ba244fd8c268..0cc6c649e7e1 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1257,7 +1257,7 @@ int Desktop::Main()
     CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
 
 #if HAVE_FEATURE_DESKTOP
-    OUString aUnknown( rCmdLineArgs.GetUnknown() );
+    const OUString& aUnknown( rCmdLineArgs.GetUnknown() );
     if ( !aUnknown.isEmpty() )
     {
         displayCmdlineHelp( aUnknown );
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index c31088a88a8f..b36f18d8f5dc 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -674,7 +674,7 @@ bool ExtMgrDialog::acceptLicense( const uno::Reference< deployment::XPackage > &
 uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
 {
     sfx2::FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
-    const uno::Reference<ui::dialogs::XFilePicker3> xFilePicker = aDlgHelper.GetFilePicker();
+    const uno::Reference<ui::dialogs::XFilePicker3>& xFilePicker = aDlgHelper.GetFilePicker();
     xFilePicker->setTitle( m_sAddPackages );
 
     if ( !m_sLastFolderURL.isEmpty() )
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index f6108abab34c..58049f46e9b9 100644
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -218,7 +218,7 @@ OUString PackageRegistryBackend::createFolder(
 
     const OUString baseDir(sDataFolder);
     ::utl::TempFile aTemp(&baseDir, true);
-    const OUString url = aTemp.GetURL();
+    const OUString& url = aTemp.GetURL();
     return sDataFolder + url.copy(url.lastIndexOf('/'));
 }
 
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 6f080c5e0316..85b188b15e84 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -2888,7 +2888,7 @@ static char* getFontSubset (const OString& aFontName)
         {
             FontCharMapRef xFontCharMap (new FontCharMap());
             auto aDevice(VclPtr<VirtualDevice>::Create(nullptr, Size(1, 1), DeviceFormat::DEFAULT));
-            vcl::Font aFont(pList->GetFontName(nItFont));
+            const vcl::Font& aFont(pList->GetFontName(nItFont));
 
             aDevice->SetFont(aFont);
             aDevice->GetFontCharMap(xFontCharMap);
diff --git a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
index be04cd9f44d5..c1b95d8cf069 100644
--- a/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
+++ b/drawinglayer/source/primitive2d/sdrdecompositiontools2d.cxx
@@ -32,7 +32,7 @@ namespace drawinglayer
         Primitive2DReference createHiddenGeometryPrimitives2D(
             const basegfx::B2DHomMatrix& rMatrix)
         {
-            const basegfx::B2DPolygon aUnitOutline(basegfx::utils::createUnitPolygon());
+            const basegfx::B2DPolygon& aUnitOutline(basegfx::utils::createUnitPolygon());
 
             return createHiddenGeometryPrimitives2D(
                 false/*bFilled*/,
diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
index 4400dd827d66..3e81d31dc66f 100644
--- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx
@@ -88,7 +88,7 @@ namespace drawinglayer
 
                                         for(sal_uInt32 b(0); b < nPolyCount; b++)
                                         {
-                                            const basegfx::B3DPolygon aPartPoly(aFillPolyPolygon.getB3DPolygon(b));
+                                            const basegfx::B3DPolygon& aPartPoly(aFillPolyPolygon.getB3DPolygon(b));
                                             const sal_uInt32 nPointCount(aPartPoly.count());
                                             basegfx::B2DPolygon aTexPolygon;
 
diff --git a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx
index c0f08389509d..29e2b9704569 100644
--- a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx
@@ -117,7 +117,7 @@ namespace drawinglayer
                     // create hair line data for all sub polygons
                     for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
                     {
-                        const basegfx::B3DPolygon aCandidate = aHairLinePolyPolygon.getB3DPolygon(a);
+                        const basegfx::B3DPolygon& aCandidate = aHairLinePolyPolygon.getB3DPolygon(a);
                         const Primitive3DReference xRef(new PolygonHairlinePrimitive3D(aCandidate, getLineAttribute().getColor()));
                         aRetval[a] = xRef;
                     }
diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
index 6c6f3eb407b5..5f2672edfd7c 100644
--- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx
@@ -262,7 +262,7 @@ namespace drawinglayer
 
                             for (sal_uInt32 a = 0; a < nCount; ++a)
                             {
-                                const basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a));
+                                const basegfx::B3DPolygon& aPartPolygon(aSphere.getB3DPolygon(a));
                                 const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon);
 
                                 // need to create one primitive per Polygon since the primitive
@@ -318,7 +318,7 @@ namespace drawinglayer
 
                             for(sal_uInt32 a(0); a < aSphere.count(); a++)
                             {
-                                const basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a));
+                                const basegfx::B3DPolygon& aPartPolygon(aSphere.getB3DPolygon(a));
                                 const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon);
                                 BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false);
                                 aResultVector.push_back(pNew);
diff --git a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
index 9876cac985fb..a54a0d07b8b6 100644
--- a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx
@@ -115,8 +115,8 @@ namespace
 
         for(sal_uInt32 a(0); a < nPolygonCount; a++)
         {
-            const basegfx::B3DPolygon aSubA(rPolA.getB3DPolygon(a));
-            const basegfx::B3DPolygon aSubB(rPolB.getB3DPolygon(a));
+            const basegfx::B3DPolygon& aSubA(rPolA.getB3DPolygon(a));
+            const basegfx::B3DPolygon& aSubB(rPolB.getB3DPolygon(a));
             OSL_ENSURE(aSubA.count() == aSubB.count(), "impAddInBetweenFill: unequally sized polygons (!)");
             const sal_uInt32 nPointCount(std::min(aSubA.count(), aSubB.count()));
 
@@ -290,7 +290,7 @@ namespace
         for(sal_uInt32 a(0); a < nPolygonCount; a++)
         {
             basegfx::B3DPolygon aSubA(rPolA.getB3DPolygon(a));
-            const basegfx::B3DPolygon aSubB(rPolB.getB3DPolygon(a));
+            const basegfx::B3DPolygon& aSubB(rPolB.getB3DPolygon(a));
             OSL_ENSURE(aSubA.count() == aSubB.count(), "sdrExtrudePrimitive3D: unequally sized polygons (!)");
             const sal_uInt32 nPointCount(std::min(aSubA.count(), aSubB.count()));
 
diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
index 4a22113bb8cd..94fb0f34a0d9 100644
--- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx
@@ -154,7 +154,7 @@ namespace drawinglayer
                         for(a = 0; a < nCount; a++)
                         {
                             const sal_uInt32 nReducedCount(aReducedLoops.count());
-                            const basegfx::B3DPolygon aCandidate(aVerLine.getB3DPolygon(a));
+                            const basegfx::B3DPolygon& aCandidate(aVerLine.getB3DPolygon(a));
                             bool bAdd(true);
 
                             if(nReducedCount)
@@ -182,8 +182,8 @@ namespace drawinglayer
                             for(sal_uInt32 b(1); b < nReducedCount; b++)
                             {
                                 // get loop pair
-                                const basegfx::B3DPolygon aCandA(aReducedLoops.getB3DPolygon(b - 1));
-                                const basegfx::B3DPolygon aCandB(aReducedLoops.getB3DPolygon(b));
+                                const basegfx::B3DPolygon& aCandA(aReducedLoops.getB3DPolygon(b - 1));
+                                const basegfx::B3DPolygon& aCandB(aReducedLoops.getB3DPolygon(b));
 
                                 // for each loop pair create the connection edges
                                 createReducedOutlines(
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 825b1504e0de..6ac21b0985b0 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -128,7 +128,7 @@ namespace
 
             for(sal_uInt32 a(0); a < nPolyCount; a++)
             {
-                const basegfx::B2DPolygon aCandidate(rPolyPolygon.getB2DPolygon(a));
+                const basegfx::B2DPolygon& aCandidate(rPolyPolygon.getB2DPolygon(a));
                 const sal_uInt32 nPointCount(aCandidate.count());
                 bool bNeedToSplit(false);
 
@@ -221,7 +221,7 @@ namespace
         sal_uInt32 nCount(rPoly.count());
         for( sal_uInt32 i=0; i<nCount; ++i )
         {
-            basegfx::B2DPolygon aCandidate(rPoly.getB2DPolygon(i));
+            const basegfx::B2DPolygon& aCandidate(rPoly.getB2DPolygon(i));
             if( !aCandidate.isClosed() || aCandidate.count() > 1 )
                 aPoly.append(aCandidate);
         }
@@ -1390,7 +1390,7 @@ namespace drawinglayer
 
                     for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
                     {
-                        const basegfx::B2DPolygon aCandidate(aHairLinePolyPolygon.getB2DPolygon(a));
+                        const basegfx::B2DPolygon& aCandidate(aHairLinePolyPolygon.getB2DPolygon(a));
 
                         if(aCandidate.count() > 1)
                         {
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 002ae53c6560..4a891166f295 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -156,7 +156,7 @@ namespace drawinglayer
             }
 
             // get geometry data, prepare hairline data
-            basegfx::B2DPolygon aLocalPolygon(rSource.getB2DPolygon());
+            const basegfx::B2DPolygon& aLocalPolygon(rSource.getB2DPolygon());
             basegfx::B2DPolyPolygon aHairLinePolyPolygon;
 
             // simplify curve segments
@@ -220,7 +220,7 @@ namespace drawinglayer
 
             for(sal_uInt32 a(0); a < aHairLinePolyPolygon.count(); a++)
             {
-                const basegfx::B2DPolygon aSingle(aHairLinePolyPolygon.getB2DPolygon(a));
+                const basegfx::B2DPolygon& aSingle(aHairLinePolyPolygon.getB2DPolygon(a));
 
                 if(aSingle.count())
                 {
diff --git a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
index aa8479527bb6..09c2f1718253 100644
--- a/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
+++ b/drawinglayer/source/processor3d/cutfindprocessor3d.cxx
@@ -146,12 +146,12 @@ namespace drawinglayer
 
                     if(!maFront.equal(maBack))
                     {
-                           const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon();
+                        const basegfx::B3DPolyPolygon& rPolyPolygon = rPrimitive.getB3DPolyPolygon();
                         const sal_uInt32 nPolyCount(rPolyPolygon.count());
 
                         if(nPolyCount)
                         {
-                               const basegfx::B3DPolygon aPolygon(rPolyPolygon.getB3DPolygon(0));
+                            const basegfx::B3DPolygon& aPolygon(rPolyPolygon.getB3DPolygon(0));
                             const sal_uInt32 nPointCount(aPolygon.count());
 
                             if(nPointCount > 2)


More information about the Libreoffice-commits mailing list