canvas/source/cairo/cairo_canvashelper.cxx               |    4 ++--
 canvas/source/cairo/cairo_textlayout.cxx                 |    2 +-
 chart2/source/controller/main/ChartController_Tools.cxx  |    2 +-
 chart2/source/controller/main/ChartController_Window.cxx |    2 +-
 chart2/source/controller/main/SelectionHelper.cxx        |    2 +-
 chart2/source/controller/sidebar/ChartAreaPanel.cxx      |    4 ++--
 chart2/source/tools/DiagramHelper.cxx                    |    3 +--
 chart2/source/view/charttypes/VSeriesPlotter.cxx         |    2 +-
 chart2/source/view/main/ChartView.cxx                    |    2 +-
 connectivity/source/commontools/dbtools.cxx              |    2 +-
 connectivity/source/commontools/parameters.cxx           |    2 +-
 connectivity/source/drivers/calc/CDatabaseMetaData.cxx   |    2 +-
 connectivity/source/drivers/dbase/DColumns.cxx           |    2 +-
 connectivity/source/drivers/dbase/DIndexColumns.cxx      |    2 +-
 connectivity/source/drivers/file/fcode.cxx               |    8 ++++----
 connectivity/source/drivers/flat/EColumns.cxx            |    2 +-
 connectivity/source/drivers/mork/MQueryHelper.cxx        |    2 +-
 connectivity/source/parse/sqliterator.cxx                |    3 +--
 connectivity/source/parse/sqlnode.cxx                    |    2 +-
 cui/source/customize/cfg.cxx                             |    2 +-
 cui/source/dialogs/cuicharmap.cxx                        |    2 +-
 cui/source/dialogs/insdlg.cxx                            |    2 +-
 cui/source/dialogs/scriptdlg.cxx                         |    3 +--
 cui/source/options/optaccessibility.cxx                  |    2 +-
 cui/source/options/optasian.cxx                          |    2 +-
 cui/source/tabpages/autocdlg.cxx                         |    4 ++--
 cui/source/tabpages/macroass.cxx                         |    2 +-
 cui/source/tabpages/numpages.cxx                         |    2 +-
 28 files changed, 34 insertions(+), 37 deletions(-)

New commits:
commit a8a461b2fba27f1a729e2b9b28426286617892a9
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Oct 23 07:46:34 2018 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Oct 23 09:44:09 2018 +0200

    clang-tidy performance-unnecessary-copy-init in canvas..cui
    
    Change-Id: I08c137d852b5f1f817c171ee4f1cee7971417dc4
    Reviewed-on: https://gerrit.libreoffice.org/62214
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/canvas/source/cairo/cairo_canvashelper.cxx 
b/canvas/source/cairo/cairo_canvashelper.cxx
index 8a80912886a5..dcd752cf6a52 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -694,7 +694,7 @@ namespace cairocanvas
 
         for( sal_uInt32 nPolygonIndex = 0; nPolygonIndex < 
aPolyPolygon.count(); nPolygonIndex++ )
         {
-            ::basegfx::B2DPolygon aPolygon( aPolyPolygon.getB2DPolygon( 
nPolygonIndex ) );
+            const ::basegfx::B2DPolygon& aPolygon( aPolyPolygon.getB2DPolygon( 
nPolygonIndex ) );
             const sal_uInt32 nPointCount( aPolygon.count() );
             // to correctly render closed curves, need to output first
             // point twice (so output one additional point)
@@ -831,7 +831,7 @@ namespace cairocanvas
             // emulate rendering::PathJoinType::NONE by painting single edges
             for(sal_uInt32 a(0); a < rPolyPoly.count(); a++)
             {
-                const basegfx::B2DPolygon 
aCandidate(rPolyPoly.getB2DPolygon(a));
+                const basegfx::B2DPolygon& 
aCandidate(rPolyPoly.getB2DPolygon(a));
                 const sal_uInt32 nPointCount(aCandidate.count());
 
                 if(nPointCount)
diff --git a/canvas/source/cairo/cairo_textlayout.cxx 
b/canvas/source/cairo/cairo_textlayout.cxx
index bce2469d6b9d..087f0479bf05 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -399,7 +399,7 @@ namespace cairocanvas
             if (cairo_glyphs.empty())
                 continue;
 
-            vcl::Font aFont = rOutDev.GetFont();
+            const vcl::Font& aFont = rOutDev.GetFont();
             long nWidth = aFont.GetAverageFontWidth();
             long nHeight = aFont.GetFontHeight();
             if (nWidth == 0)
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index d59ae46fb52e..5cd5da3edf05 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -538,7 +538,7 @@ bool ChartController::isObjectDeleteable( const uno::Any& 
rSelection )
     ObjectIdentifier aSelOID( rSelection );
     if ( aSelOID.isAutoGeneratedObject() )
     {
-        OUString aSelObjCID( aSelOID.getObjectCID() );
+        const OUString& aSelObjCID( aSelOID.getObjectCID() );
         ObjectType aObjectType(ObjectIdentifier::getObjectType( aSelObjCID ));
 
         switch(aObjectType)
diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index 104eec4cc067..8a4d92b95c6b 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1359,7 +1359,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& 
rKEvt )
         bReturn = aObjNav.handleKeyEvent( aKeyEvent );
         if( bReturn )
         {
-            ObjectIdentifier aNewOID = aObjNav.getCurrentSelection();
+            const ObjectIdentifier& aNewOID = aObjNav.getCurrentSelection();
             uno::Any aNewSelection;
             if ( aNewOID.isValid() && !ObjectHierarchy::isRootNode( aNewOID ) )
             {
diff --git a/chart2/source/controller/main/SelectionHelper.cxx 
b/chart2/source/controller/main/SelectionHelper.cxx
index 083e7e0f71e7..7a7f08c58f3b 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -592,7 +592,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
             const ::basegfx::B2DPolyPolygon& rPolyPolygon = 
static_cast<SdrPathObj*>(m_pMarkObj)->GetPathPoly();
             for( sal_uInt32 nN = 0; nN < rPolyPolygon.count(); nN++)
             {
-                const ::basegfx::B2DPolygon 
aPolygon(rPolyPolygon.getB2DPolygon(nN));
+                const ::basegfx::B2DPolygon& 
aPolygon(rPolyPolygon.getB2DPolygon(nN));
                 for( sal_uInt32 nM = 0; nM < aPolygon.count(); nM++)
                 {
                     const ::basegfx::B2DPoint aPoint(aPolygon.getB2DPoint(nM));
diff --git a/chart2/source/controller/sidebar/ChartAreaPanel.cxx 
b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
index cd222e37c547..023d14127922 100644
--- a/chart2/source/controller/sidebar/ChartAreaPanel.cxx
+++ b/chart2/source/controller/sidebar/ChartAreaPanel.cxx
@@ -331,7 +331,7 @@ void ChartAreaPanel::setFillFloatTransparence(
         return;
     }
 
-    OUString aName = rItem.GetName();
+    const OUString& aName = rItem.GetName();
     css::uno::Any aGradientVal;
     rItem.QueryValue(aGradientVal, MID_FILLGRADIENT);
     OUString aNewName = 
PropertyHelper::addTransparencyGradientUniqueNameToTable(aGradientVal, 
css::uno::Reference<css::lang::XMultiServiceFactory>(mxModel, 
css::uno::UNO_QUERY_THROW), aName);
@@ -399,7 +399,7 @@ void ChartAreaPanel::setFillStyleAndBitmap(const 
XFillStyleItem* pStyleItem,
 
     css::uno::Any aBitmap;
     rBitmapItem.QueryValue(aBitmap, MID_BITMAP);
-    OUString aPreferredName = rBitmapItem.GetName();
+    const OUString& aPreferredName = rBitmapItem.GetName();
     aBitmap <<= PropertyHelper::addBitmapUniqueNameToTable(aBitmap, 
css::uno::Reference<css::lang::XMultiServiceFactory>(mxModel, 
css::uno::UNO_QUERY_THROW), aPreferredName);
     xPropSet->setPropertyValue("FillBitmapName", aBitmap);
 }
diff --git a/chart2/source/tools/DiagramHelper.cxx 
b/chart2/source/tools/DiagramHelper.cxx
index f7be64b86c3b..c91caa084bad 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -854,9 +854,8 @@ void DiagramHelper::setCategoriesToDiagram(
     std::vector< Reference< chart2::XAxis > > aCatAxes(
         lcl_getAxisHoldingCategoriesFromDiagram( xDiagram ));
 
-    for (auto const& elem : aCatAxes)
+    for (const Reference< chart2::XAxis >& xCatAxis : aCatAxes)
     {
-        Reference< chart2::XAxis > xCatAxis(elem);
         if( xCatAxis.is())
         {
             ScaleData aScaleData( xCatAxis->getScaleData());
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx 
b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 47fe81a1ab98..ed5db9e6555d 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -538,7 +538,7 @@ uno::Reference< drawing::XShape > 
VSeriesPlotter::createDataLabel( const uno::Re
                         OUString aRole;
                         if ( m_xChartTypeModel )
                             aRole = 
m_xChartTypeModel->getRoleOfSequenceForSeriesLabel();
-                        uno::Reference< XDataSeries > xSeries( 
rDataSeries.getModel() );
+                        const uno::Reference< XDataSeries >& xSeries( 
rDataSeries.getModel() );
                         aTextList[i] = DataSeriesHelper::getDataSeriesLabel( 
xSeries, aRole );
                         break;
                     }
diff --git a/chart2/source/view/main/ChartView.cxx 
b/chart2/source/view/main/ChartView.cxx
index 4d560ca4531d..28494f7a46d3 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -745,7 +745,7 @@ void SeriesPlotterContainer::setNumberFormatsFromAxes()
         if(pVCooSys)
         {
             AxesNumberFormats aAxesNumberFormats;
-            uno::Reference< XCoordinateSystem > xCooSys = pVCooSys->getModel();
+            const uno::Reference< XCoordinateSystem >& xCooSys = 
pVCooSys->getModel();
             sal_Int32 nDimensionCount = xCooSys->getDimension();
             for(sal_Int32 nDimensionIndex=0; nDimensionIndex<nDimensionCount; 
++nDimensionIndex)
             {
diff --git a/connectivity/source/commontools/dbtools.cxx 
b/connectivity/source/commontools/dbtools.cxx
index 26e2c604a230..757e4fa37fb1 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -480,7 +480,7 @@ Reference< XNameAccess> getPrimaryKeyColumns_throw(const 
Reference< XPropertySet
         if ( xKeys.is() )
         {
             ::dbtools::OPropertyMap& rPropMap = OMetaConnection::getPropMap();
-            const OUString sPropName = 
rPropMap.getNameByIndex(PROPERTY_ID_TYPE);
+            const OUString& sPropName = 
rPropMap.getNameByIndex(PROPERTY_ID_TYPE);
             Reference<XPropertySet> xProp;
             const sal_Int32 nCount = xKeys->getCount();
             for(sal_Int32 i = 0;i< nCount;++i)
diff --git a/connectivity/source/commontools/parameters.cxx 
b/connectivity/source/commontools/parameters.cxx
index ffa43f04644a..b3dfdd008c41 100644
--- a/connectivity/source/commontools/parameters.cxx
+++ b/connectivity/source/commontools/parameters.cxx
@@ -674,7 +674,7 @@ namespace dbtools
         try
         {
             // transfer the values from the continuation object to the 
parameter columns
-            Sequence< PropertyValue > aFinalValues = pParams->getValues();
+            const Sequence< PropertyValue >& aFinalValues = 
pParams->getValues();
             const PropertyValue* pFinalValues = aFinalValues.getConstArray();
             for ( sal_Int32 i = 0; i < aFinalValues.getLength(); ++i, 
++pFinalValues )
             {
diff --git a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx 
b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
index 65e79f2b5df0..9b030637723a 100644
--- a/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/calc/CDatabaseMetaData.cxx
@@ -168,7 +168,7 @@ Reference< XResultSet > SAL_CALL 
OCalcDatabaseMetaData::getTables(
     // get the sheet names from the document
 
     OCalcConnection::ODocHolder 
aDocHolder(static_cast<OCalcConnection*>(m_pConnection));
-    Reference<XSpreadsheetDocument> xDoc = aDocHolder.getDoc();
+    const Reference<XSpreadsheetDocument>& xDoc = aDocHolder.getDoc();
     if ( !xDoc.is() )
         throw SQLException();
     Reference<XSpreadsheets> xSheets = xDoc->getSheets();
diff --git a/connectivity/source/drivers/dbase/DColumns.cxx 
b/connectivity/source/drivers/dbase/DColumns.cxx
index c43caf4a4a8a..b06bdd99173c 100644
--- a/connectivity/source/drivers/dbase/DColumns.cxx
+++ b/connectivity/source/drivers/dbase/DColumns.cxx
@@ -35,7 +35,7 @@ sdbcx::ObjectType ODbaseColumns::createObject(const OUString& 
_rName)
 {
     ODbaseTable* pTable = static_cast<ODbaseTable*>(m_pTable);
 
-    ::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns();
+    const ::rtl::Reference<OSQLColumns>& aCols = pTable->getTableColumns();
     OSQLColumns::Vector::const_iterator aIter = 
find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
 
     sdbcx::ObjectType xRet;
diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx 
b/connectivity/source/drivers/dbase/DIndexColumns.cxx
index bdc774e95549..533a6023ef2a 100644
--- a/connectivity/source/drivers/dbase/DIndexColumns.cxx
+++ b/connectivity/source/drivers/dbase/DIndexColumns.cxx
@@ -38,7 +38,7 @@ sdbcx::ObjectType ODbaseIndexColumns::createObject(const 
OUString& _rName)
 {
     const ODbaseTable* pTable = m_pIndex->getTable();
 
-    ::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns();
+    const ::rtl::Reference<OSQLColumns>& aCols = pTable->getTableColumns();
     OSQLColumns::Vector::const_iterator aIter = 
find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
 
     Reference< XPropertySet > xCol;
diff --git a/connectivity/source/drivers/file/fcode.cxx 
b/connectivity/source/drivers/file/fcode.cxx
index 1ad83491986c..52c6099f9442 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -215,8 +215,8 @@ bool OOp_ISNOTNULL::operate(const OOperand* pOperand, const 
OOperand*) const
 bool OOp_LIKE::operate(const OOperand* pLeft, const OOperand* pRight) const
 {
     bool bMatch;
-    ORowSetValue aLH(pLeft->getValue());
-    ORowSetValue aRH(pRight->getValue());
+    const ORowSetValue& aLH(pLeft->getValue());
+    const ORowSetValue& aRH(pRight->getValue());
 
     if (aLH.isNull() || aRH.isNull())
         bMatch = false;
@@ -236,8 +236,8 @@ bool OOp_NOTLIKE::operate(const OOperand* pLeft, const 
OOperand* pRight) const
 
 bool OOp_COMPARE::operate(const OOperand* pLeft, const OOperand* pRight) const
 {
-    ORowSetValue aLH(pLeft->getValue());
-    ORowSetValue aRH(pRight->getValue());
+    const ORowSetValue& aLH(pLeft->getValue());
+    const ORowSetValue& aRH(pRight->getValue());
 
     if (aLH.isNull() || aRH.isNull()) // if (!aLH.getValue() || 
!aRH.getValue())
         return false;
diff --git a/connectivity/source/drivers/flat/EColumns.cxx 
b/connectivity/source/drivers/flat/EColumns.cxx
index e00e9b275443..6336753d30d9 100644
--- a/connectivity/source/drivers/flat/EColumns.cxx
+++ b/connectivity/source/drivers/flat/EColumns.cxx
@@ -33,7 +33,7 @@ using namespace ::com::sun::star::container;
 sdbcx::ObjectType OFlatColumns::createObject(const OUString& _rName)
 {
     OFlatTable* pTable = static_cast<OFlatTable*>(m_pTable);
-    ::rtl::Reference<OSQLColumns> aCols = pTable->getTableColumns();
+    const ::rtl::Reference<OSQLColumns>& aCols = pTable->getTableColumns();
     OSQLColumns::Vector::const_iterator aIter = 
find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
     sdbcx::ObjectType xRet;
     if(aIter != aCols->get().end())
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx 
b/connectivity/source/drivers/mork/MQueryHelper.cxx
index f53e7e619cef..7f0d4ae08d52 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -258,7 +258,7 @@ std::vector<bool> entryMatchedByExpression(MQueryHelper* 
_aQuery, MQueryExpressi
             if (bRequiresValue)
             {
                 SAL_INFO("connectivity.mork", "Value = " << evStr->getValue() 
);
-                OUString searchedValue = evStr->getValue();
+                const OUString& searchedValue = evStr->getValue();
                 if (evStr->getCond() == MQueryOp::Is) {
                     SAL_INFO("connectivity.mork", "MQueryOp::Is; done");
                     resultVector.push_back(currentValue == searchedValue);
diff --git a/connectivity/source/parse/sqliterator.cxx 
b/connectivity/source/parse/sqliterator.cxx
index e29c8d394557..0f7170143cad 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -723,9 +723,8 @@ namespace
             // look up the column in the select column, to find an possible 
alias
             if ( _pSelectColumns )
             {
-                for (auto const& lookupColumn : _pSelectColumns->get())
+                for (const Reference< XPropertySet >& xColumn : 
_pSelectColumns->get())
                 {
-                    Reference< XPropertySet > xColumn( lookupColumn );
                     try
                     {
                         OUString sName, sTableName;
diff --git a/connectivity/source/parse/sqlnode.cxx 
b/connectivity/source/parse/sqlnode.cxx
index 6b4b4351fb46..14b271a61ee7 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1535,7 +1535,7 @@ bool OSQLParser::extractDate(OSQLParseNode const * 
pLiteral,double& _rfValue)
             m_nFormatKey = ::dbtools::getDefaultNumberFormat( m_xField, 
xFormatTypes, m_pData->aLocale );
     }
     catch( Exception& ) { }
-    OUString sValue = pLiteral->getTokenValue();
+    const OUString& sValue = pLiteral->getTokenValue();
     sal_Int32 nTryFormat = m_nFormatKey;
     bool bSuccess = lcl_saveConvertToNumber( m_xFormatter, nTryFormat, sValue, 
_rfValue );
 
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 70644c7ed9d3..87631448b711 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2483,7 +2483,7 @@ void ToolbarSaveInData::Reset()
     {
         try
         {
-            OUString url = entry->GetCommand();
+            const OUString& url = entry->GetCommand();
             GetConfigManager()->removeSettings( url );
         }
         catch ( uno::Exception& )
diff --git a/cui/source/dialogs/cuicharmap.cxx 
b/cui/source/dialogs/cuicharmap.cxx
index 64581f5f5165..4639d6a6c9df 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -746,7 +746,7 @@ IMPL_LINK_NOARG(SvxCharacterMap, SubsetSelectHdl, 
weld::ComboBox&, void)
 
 IMPL_LINK(SvxCharacterMap, RecentClearClickHdl, SvxCharView*, rView, void)
 {
-    OUString sTitle = rView->GetText();
+    const OUString& sTitle = rView->GetText();
     auto itChar = std::find(maRecentCharList.begin(), maRecentCharList.end(), 
sTitle);
 
     OUString sFont = rView->GetFont().GetFamilyName();
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 32facb080e20..b954f29d9a52 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -95,7 +95,7 @@ IMPL_LINK_NOARG(SvInsertOleDlg, DoubleClickHdl, 
weld::TreeView&, void)
 IMPL_LINK_NOARG(SvInsertOleDlg, BrowseHdl, weld::Button&, void)
 {
     sfx2::FileDialogHelper 
aHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 
FileDialogFlags::NONE, m_xDialog.get());
-    Reference< XFilePicker3 > xFilePicker = aHelper.GetFilePicker();
+    const Reference< XFilePicker3 >& xFilePicker = aHelper.GetFilePicker();
 
     // add filter
     try
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 40e3cb890687..ef073d277cb2 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -230,9 +230,8 @@ void SFTreeListBox::Init( const OUString& language  )
             }
         }
 
-        OUString lang( language );
         Reference< browse::XBrowseNode > langEntries =
-            getLangNodeFromRootNode( children[ n ], lang );
+            getLangNodeFromRootNode( children[ n ], language );
 
         insertEntry( uiName, app ? OUStringLiteral(RID_CUIBMP_HARDDISK) : 
OUStringLiteral(RID_CUIBMP_DOC),
             nullptr, true, o3tl::make_unique< SFEntry >( langEntries, 
xDocumentModel ), factoryURL );
diff --git a/cui/source/options/optaccessibility.cxx 
b/cui/source/options/optaccessibility.cxx
index 5d4bd2e4522f..716fc042d7fe 100644
--- a/cui/source/options/optaccessibility.cxx
+++ b/cui/source/options/optaccessibility.cxx
@@ -120,7 +120,7 @@ void SvxAccessibilityOptionsTabPage::Reset( const 
SfxItemSet* )
         m_pAutoDetectHC->Disable();
 
     AllSettings aAllSettings = Application::GetSettings();
-    MiscSettings aMiscSettings = aAllSettings.GetMiscSettings();
+    const MiscSettings& aMiscSettings = aAllSettings.GetMiscSettings();
     m_pAccessibilityTool->Check(aMiscSettings.GetEnableATToolSupport());
 }
 
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 135cf9fdc1ff..935d6576c913 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -292,7 +292,7 @@ IMPL_LINK_NOARG(SvxAsianLayoutPage, LanguageHdl, ListBox&, 
void)
     //set current value
     LanguageType eSelectLanguage = m_pLanguageLB->GetSelectedLanguage();
     LanguageTag aLanguageTag( eSelectLanguage);
-    Locale aLocale( aLanguageTag.getLocale());
+    const Locale& aLocale( aLanguageTag.getLocale());
 
     OUString sStart, sEnd;
     bool bAvail;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 20e8429ba0ec..b754fd31c378 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -731,7 +731,7 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl, Button*, 
void)
         aMapDlg.SetChar( (*pUserData->pString)[0] );
         if (RET_OK == aMapDlg.execute())
         {
-            vcl::Font aFont(aMapDlg.GetCharFont());
+            const vcl::Font& aFont(aMapDlg.GetCharFont());
             *pUserData->pFont = aFont;
             sal_UCS4 aChar = aMapDlg.GetChar();
             // using the UCS4 constructor
@@ -2525,7 +2525,7 @@ void OfaSmartTagOptionsTabPage::FillListBox( const 
SmartTagMgr& rSmartTagMgr )
 
     for ( sal_uInt32 i = 0; i < nNumberOfRecognizers; ++i )
     {
-        uno::Reference< smarttags::XSmartTagRecognizer > xRec = 
rSmartTagMgr.GetRecognizer(i);
+        const uno::Reference< smarttags::XSmartTagRecognizer >& xRec = 
rSmartTagMgr.GetRecognizer(i);
 
         const OUString aName = xRec->getName( aLocale );
         const sal_Int32 nNumberOfSupportedSmartTags = xRec->getSmartTagCount();
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index eb0dfa26c40a..9bd6a00f7d71 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -424,7 +424,7 @@ void SfxMacroTabPage::FillEvents()
             SvLBoxString&     rLItem = static_cast<SvLBoxString&>( 
pE->GetItem( LB_MACROS_ITEMPOS ) );
             DBG_ASSERT( SvLBoxItemType::String == rLItem.GetType(), 
"SfxMacroTabPage::FillEvents(): no LBoxString" );
 
-            OUString          sOld( rLItem.GetText() );
+            const OUString&   sOld( rLItem.GetText() );
             OUString          sNew;
             SvMacroItemId     nEventId = 
static_cast<SvMacroItemId>(reinterpret_cast<sal_uLong>( pE->GetUserData() ));
             if( aTbl.IsKeyValid( nEventId ) )
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 557065396065..59e5862a98e5 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -3275,7 +3275,7 @@ IMPL_LINK_NOARG(SvxNumPositionTabPage, StandardHdl_Impl, 
weld::Button&, void)
         if(nActNumLvl & nMask)
         {
             SvxNumberFormat aNumFmt( pActNum->GetLevel( i ) );
-            SvxNumberFormat aTempFmt(aTmpNumRule.GetLevel( i ));
+            const SvxNumberFormat& aTempFmt(aTmpNumRule.GetLevel( i ));
             aNumFmt.SetPositionAndSpaceMode( 
aTempFmt.GetPositionAndSpaceMode() );
             if ( aTempFmt.GetPositionAndSpaceMode() == 
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
             {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to