extensions/source/bibliography/datman.cxx            |    2 -
 extensions/source/propctrlr/formcomponenthandler.cxx |    2 -
 libreofficekit/source/gtk/lokdocview.cxx             |   16 ++++-----
 linguistic/source/gciterator.cxx                     |    2 -
 linguistic/source/spelldsp.cxx                       |    8 ++--
 oox/source/drawingml/chart/seriesconverter.cxx       |    6 +--
 oox/source/drawingml/connectorhelper.cxx             |    2 -
 oox/source/drawingml/fillproperties.cxx              |    2 -
 oox/source/drawingml/shape.cxx                       |    2 -
 oox/source/drawingml/table/tablecell.cxx             |    6 +--
 oox/source/export/DMLPresetShapeExport.cxx           |    6 +--
 oox/source/export/drawingml.cxx                      |   32 +++++++++----------
 oox/source/ppt/pptshape.cxx                          |    6 +--
 oox/source/ppt/presentationfragmenthandler.cxx       |    3 -
 oox/source/ppt/slidepersist.cxx                      |    6 +--
 oox/source/vml/vmlshape.cxx                          |    4 +-
 16 files changed, 52 insertions(+), 53 deletions(-)

New commits:
commit 69089f1737a825c81d958785972bf15e9c340d91
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Nov 11 13:49:53 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Nov 11 20:11:23 2024 +0100

    loplugin:reftotemp in libreofficekit..oox
    
    Change-Id: I62d868f70e33850fa933c8f413f824a523422499
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176400
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/libreofficekit/source/gtk/lokdocview.cxx 
b/libreofficekit/source/gtk/lokdocview.cxx
index bf2af004fe41..0c2784537032 100644
--- a/libreofficekit/source/gtk/lokdocview.cxx
+++ b/libreofficekit/source/gtk/lokdocview.cxx
@@ -1130,7 +1130,7 @@ callback (gpointer pData)
         std::stringstream aStream(pCallback->m_aPayload);
         boost::property_tree::ptree aTree;
         boost::property_tree::read_json(aStream, aTree);
-        const std::string& rRectangle = aTree.get<std::string>("rectangle");
+        const std::string rRectangle = aTree.get<std::string>("rectangle");
         int nViewId = aTree.get<int>("viewId");
 
         priv->m_aVisibleCursor = payloadToRectangle(pDocView, 
rRectangle.c_str());
@@ -1211,7 +1211,7 @@ callback (gpointer pData)
         boost::property_tree::read_json(aStream, aTree);
         int nViewId = aTree.get<int>("viewId");
         int nPart = aTree.get<int>("part");
-        const std::string& rRectangle = aTree.get<std::string>("selection");
+        const std::string rRectangle = aTree.get<std::string>("selection");
         if (rRectangle != "EMPTY")
             priv->m_aGraphicViewSelections[nViewId] = ViewRectangle(nPart, 
payloadToRectangle(pDocView, rRectangle.c_str()));
         else
@@ -1295,7 +1295,7 @@ callback (gpointer pData)
         boost::property_tree::read_json(aStream, aTree);
         int nViewId = aTree.get<int>("viewId");
         int nPart = aTree.get<int>("part");
-        const std::string& rRectangle = aTree.get<std::string>("rectangle");
+        const std::string rRectangle = aTree.get<std::string>("rectangle");
         priv->m_aViewCursors[nViewId] = ViewRectangle(nPart, 
payloadToRectangle(pDocView, rRectangle.c_str()));
         gtk_widget_queue_draw(GTK_WIDGET(pDocView));
         break;
@@ -1307,7 +1307,7 @@ callback (gpointer pData)
         boost::property_tree::read_json(aStream, aTree);
         int nViewId = aTree.get<int>("viewId");
         int nPart = aTree.get<int>("part");
-        const std::string& rSelection = aTree.get<std::string>("selection");
+        const std::string rSelection = aTree.get<std::string>("selection");
         priv->m_aTextViewSelectionRectangles[nViewId] = ViewRectangles(nPart, 
payloadToRectangles(pDocView, rSelection.c_str()));
         gtk_widget_queue_draw(GTK_WIDGET(pDocView));
         break;
@@ -1318,7 +1318,7 @@ callback (gpointer pData)
         boost::property_tree::ptree aTree;
         boost::property_tree::read_json(aStream, aTree);
         int nViewId = aTree.get<int>("viewId");
-        const std::string& rVisible = aTree.get<std::string>("visible");
+        const std::string rVisible = aTree.get<std::string>("visible");
         priv->m_aViewCursorVisibilities[nViewId] = rVisible == "true";
         gtk_widget_queue_draw(GTK_WIDGET(pDocView));
         break;
@@ -1331,7 +1331,7 @@ callback (gpointer pData)
         boost::property_tree::read_json(aStream, aTree);
         int nViewId = aTree.get<int>("viewId");
         int nPart = aTree.get<int>("part");
-        const std::string& rRectangle = aTree.get<std::string>("rectangle");
+        const std::string rRectangle = aTree.get<std::string>("rectangle");
         if (rRectangle != "EMPTY")
             priv->m_aCellViewCursors[nViewId] = ViewRectangle(nPart, 
payloadToRectangle(pDocView, rRectangle.c_str()));
         else
@@ -1350,7 +1350,7 @@ callback (gpointer pData)
         boost::property_tree::read_json(aStream, aTree);
         int nViewId = aTree.get<int>("viewId");
         int nPart = aTree.get<int>("part");
-        const std::string& rRectangle = aTree.get<std::string>("rectangle");
+        const std::string rRectangle = aTree.get<std::string>("rectangle");
         if (rRectangle != "EMPTY")
             priv->m_aViewLockRectangles[nViewId] = ViewRectangle(nPart, 
payloadToRectangle(pDocView, rRectangle.c_str()));
         else
@@ -1762,7 +1762,7 @@ static const GdkRGBA& getDarkColor(int nViewId, 
LOKDocViewPrivate& priv)
         boost::property_tree::read_json(aStream, aTree);
         for (const auto& rValue : aTree.get_child("authors"))
         {
-            const std::string& rName = rValue.second.get<std::string>("name");
+            const std::string rName = rValue.second.get<std::string>("name");
             guint32 nColor = rValue.second.get<guint32>("color");
             GdkRGBA 
aColor{static_cast<double>(static_cast<guint8>(nColor>>16))/255, 
static_cast<double>(static_cast<guint8>(static_cast<guint16>(nColor) >> 
8))/255, static_cast<double>(static_cast<guint8>(nColor))/255, 0};
             auto itAuthorViews = g_aAuthorViews.find(rName);
diff --git a/linguistic/source/gciterator.cxx b/linguistic/source/gciterator.cxx
index ab6d665af771..cabef14c94ab 100644
--- a/linguistic/source/gciterator.cxx
+++ b/linguistic/source/gciterator.cxx
@@ -550,7 +550,7 @@ uno::Reference< linguistic2::XProofreader > 
GrammarCheckingIterator::GetGrammarC
         m_bGCServicesChecked = true;
     }
 
-    if (const auto& [aSvcImplName, oFallbackBcp47] = 
getServiceForLocale(rLocale);
+    if (const auto [aSvcImplName, oFallbackBcp47] = 
getServiceForLocale(rLocale);
         !aSvcImplName.isEmpty()) // matching configured language found?
     {
         if (oFallbackBcp47)
diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index 612ed2bc04a8..eb15cf3be923 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -83,19 +83,19 @@ void ProposalList::Append( const OUString &rOrig, bool 
bPrepend )
 {
     bool bFound = false;
     // convert ASCII apostrophe to the typographic one
-    const OUString &rText( rOrig.indexOf( '\'' ) > -1 ? rOrig.replace('\'', 
u'’') : rOrig );
+    const OUString aText( rOrig.indexOf( '\'' ) > -1 ? rOrig.replace('\'', 
u'’') : rOrig );
     size_t nCnt = aVec.size();
     for (size_t i = 0;  !bFound && i < nCnt;  ++i)
     {
-        if (aVec[i] == rText)
+        if (aVec[i] == aText)
             bFound = true;
     }
     if (!bFound)
     {
         if ( bPrepend )
-            aVec.insert( aVec.begin(), rText );
+            aVec.insert( aVec.begin(), aText );
         else
-            aVec.push_back( rText );
+            aVec.push_back( aText );
     }
 }
 
diff --git a/oox/source/drawingml/chart/seriesconverter.cxx 
b/oox/source/drawingml/chart/seriesconverter.cxx
index 97da1a6b5b8f..27f25057badf 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -353,11 +353,11 @@ void DataLabelConverter::convertFromModel( const 
Reference< XDataSeries >& rxDat
                 {
                     oaCellRange = pLabelSource->mxDataSeq->maFormula;
                     const auto& rLabelMap = pLabelSource->mxDataSeq->maData;
-                    const auto& rKV = rLabelMap.find(mrModel.mnIndex);
-                    if (rKV != rLabelMap.end())
+                    const auto aKV = rLabelMap.find(mrModel.mnIndex);
+                    if (aKV != rLabelMap.end())
                     {
                         oaLabelText.emplace();
-                        rKV->second >>= *oaLabelText;
+                        aKV->second >>= *oaLabelText;
                     }
                 }
             }
diff --git a/oox/source/drawingml/connectorhelper.cxx 
b/oox/source/drawingml/connectorhelper.cxx
index c8954d000e04..0a529b56a03c 100644
--- a/oox/source/drawingml/connectorhelper.cxx
+++ b/oox/source/drawingml/connectorhelper.cxx
@@ -316,7 +316,7 @@ void 
ConnectorHelper::applyConnections(oox::drawingml::ShapePtr& pConnector,
     // It contains maximal two items, each a struct with mbStartShape, 
maDestShapeId, mnDestGlueId
     for (const auto& aIt : aConnectorShapeProperties)
     {
-        const auto& pItem = rShapeMap.find(aIt.maDestShapeId);
+        const auto pItem = rShapeMap.find(aIt.maDestShapeId);
         if (pItem == rShapeMap.end())
             continue;
 
diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index 3311e4c6770b..49a0c9e50bdc 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -89,7 +89,7 @@ Reference< XGraphic > 
lclRotateGraphic(uno::Reference<graphic::XGraphic> const &
     assert (aGraphic.GetType() == GraphicType::Bitmap);
 
     BitmapEx aBitmapEx(aGraphic.GetBitmapEx());
-    const ::Color& aColor = ::Color(0x00);
+    const ::Color aColor(0x00);
     aBitmapEx.Rotate(nRotation, aColor);
     aReturnGraphic = ::Graphic(aBitmapEx);
     aReturnGraphic.setOriginURL(aGraphic.getOriginURL());
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 054671fd5c67..8bc71abeb3c7 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1811,7 +1811,7 @@ Reference< XShape > const & Shape::createAndInsert(
                     tools::Rectangle aArea{};
                     pTableShape->LayoutTableHeight(aArea);
                     sal_Int32 nCorrectedHeight = aArea.GetHeight();
-                    const auto& aShapeSize = mxShape->getSize();
+                    const auto aShapeSize = mxShape->getSize();
                     if( nCorrectedHeight > aShapeSize.Height )
                         mxShape->setSize( {aShapeSize.Width, nCorrectedHeight} 
);
                     pTableShape->SetSkipChangeLayout(false);
diff --git a/oox/source/drawingml/table/tablecell.cxx 
b/oox/source/drawingml/table/tablecell.cxx
index 3a10597996ba..e6fd01bf43fc 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -556,10 +556,10 @@ void TableCell::pushToXCell( const 
::oox::core::XmlFilterBase& rFilterBase, cons
     }
     if (aBgColor.isUsed())
     {
-        const Color& rCellColor = aFillProperties.getBestSolidColor();
-        const double fTransparency = rCellColor.isUsed() ? 0.01 * 
rCellColor.getTransparency() : 1.0;
+        const Color aCellColor = aFillProperties.getBestSolidColor();
+        const double fTransparency = aCellColor.isUsed() ? 0.01 * 
aCellColor.getTransparency() : 1.0;
         ::Color nBgColor( aBgColor.getColor(rFilterBase.getGraphicHelper(), 
nPhClr) );
-        ::Color nCellColor( 
rCellColor.getColor(rFilterBase.getGraphicHelper()) );
+        ::Color nCellColor( 
aCellColor.getColor(rFilterBase.getGraphicHelper()) );
         ::Color aResult( basegfx::interpolate(nBgColor.getBColor(), 
nCellColor.getBColor(), 1.0 - fTransparency) );
         aFillProperties.maFillColor.clearTransformations();
         
aFillProperties.maFillColor.setSrgbClr(sal_Int32(aResult.GetRGBColor()));
diff --git a/oox/source/export/DMLPresetShapeExport.cxx 
b/oox/source/export/DMLPresetShapeExport.cxx
index 05f1f92a4f0e..c77cbd3fcd5b 100644
--- a/oox/source/export/DMLPresetShapeExport.cxx
+++ b/oox/source/export/DMLPresetShapeExport.cxx
@@ -221,7 +221,7 @@ bool DMLPresetShapeExporter::WriteShape()
         if (!m_bHasHandleValues)
         {
             OUString sShapeType = GetShapeType();
-            const OString& sPresetShape = 
msfilter::util::GetOOXMLPresetGeometry(sShapeType);
+            const OString sPresetShape = 
msfilter::util::GetOOXMLPresetGeometry(sShapeType);
             m_pDMLexporter->WriteShapeTransformation(m_xShape, XML_a, 
IsXFlipped(), IsYFlipped(),
                                                      false, false);
             m_pDMLexporter->WritePresetShape(sPresetShape);
@@ -252,8 +252,8 @@ bool DMLPresetShapeExporter::StartAVListWriting()
 {
     try
     {
-        const OString& pShape = 
msfilter::util::GetOOXMLPresetGeometry(GetShapeType());
-        m_pDMLexporter->GetFS()->startElementNS(XML_a, XML_prstGeom, XML_prst, 
pShape);
+        const OString aShape = 
msfilter::util::GetOOXMLPresetGeometry(GetShapeType());
+        m_pDMLexporter->GetFS()->startElementNS(XML_a, XML_prstGeom, XML_prst, 
aShape);
         m_pDMLexporter->GetFS()->startElementNS(XML_a, XML_avLst);
         return true;
     }
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 1dd13a22309e..9136faa8d609 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1433,16 +1433,16 @@ void GraphicExport::writeBlip(Graphic const& rGraphic, 
std::vector<model::BlipEf
 
 OUString GraphicExport::writeNewEntryToStorage(const Graphic& rGraphic, bool 
bRelPathToMedia)
 {
-    GfxLink const& rLink = rGraphic.GetGfxLink();
+    GfxLink const aLink = rGraphic.GetGfxLink();
 
     OUString sMediaType;
     OUString aExtension;
 
     SvMemoryStream aStream;
-    const void* aData = rLink.GetData();
-    std::size_t nDataSize = rLink.GetDataSize();
+    const void* aData = aLink.GetData();
+    std::size_t nDataSize = aLink.GetDataSize();
 
-    switch (rLink.GetType())
+    switch (aLink.GetType())
     {
         case GfxLinkType::NativeGif:
             sMediaType = u"image/gif"_ustr;
@@ -1559,12 +1559,12 @@ OUString GraphicExport::writeNewSvgEntryToStorage(const 
Graphic& rGraphic, bool
     OUString sMediaType = u"image/svg"_ustr;
     OUString aExtension = u"svg"_ustr;
 
-    GfxLink const& rLink = rGraphic.GetGfxLink();
-    if (rLink.GetType() != GfxLinkType::NativeSvg)
+    GfxLink const aLink = rGraphic.GetGfxLink();
+    if (aLink.GetType() != GfxLinkType::NativeSvg)
         return OUString();
 
-    const void* aData = rLink.GetData();
-    std::size_t nDataSize = rLink.GetDataSize();
+    const void* aData = aLink.GetData();
+    std::size_t nDataSize = aLink.GetDataSize();
 
     GraphicExportCache& rGraphicExportCache = GraphicExportCache::get();
     auto sImageCountString = 
OUString::number(rGraphicExportCache.nextImageCount());
@@ -2013,8 +2013,8 @@ void 
DrawingML::WriteSrcRectXGraphic(uno::Reference<beans::XPropertySet> const &
 {
     Graphic aGraphic(rxGraphic);
     Size aOriginalSize = aGraphic.GetPrefSize();
-    const MapMode& rMapMode = aGraphic.GetPrefMapMode();
-    WriteGraphicCropProperties(rxPropertySet, aOriginalSize, rMapMode);
+    const MapMode aMapMode = aGraphic.GetPrefMapMode();
+    WriteGraphicCropProperties(rxPropertySet, aOriginalSize, aMapMode);
 }
 
 void DrawingML::WriteXGraphicStretch(uno::Reference<beans::XPropertySet> const 
& rXPropSet,
@@ -2103,9 +2103,9 @@ void 
DrawingML::WriteXGraphicTile(uno::Reference<beans::XPropertySet> const& rXP
 {
     Graphic aGraphic(rxGraphic);
     Size aOriginalSize(aGraphic.GetPrefSize());
-    const MapMode& rMapMode = aGraphic.GetPrefMapMode();
+    const MapMode aMapMode = aGraphic.GetPrefMapMode();
     // if the original size is in pixel, convert it to mm100
-    if (rMapMode.GetMapUnit() == MapUnit::MapPixel)
+    if (aMapMode.GetMapUnit() == MapUnit::MapPixel)
         aOriginalSize = 
Application::GetDefaultDevice()->PixelToLogic(aOriginalSize,
                                                                       
MapMode(MapUnit::Map100thMM));
     sal_Int32 nSizeX = 0;
@@ -2182,9 +2182,9 @@ void 
DrawingML::WriteXGraphicCustomPosition(uno::Reference<beans::XPropertySet>
 {
     Graphic aGraphic(rxGraphic);
     Size aOriginalSize(aGraphic.GetPrefSize());
-    const MapMode& rMapMode = aGraphic.GetPrefMapMode();
+    const MapMode aMapMode = aGraphic.GetPrefMapMode();
     // if the original size is in pixel, convert it to mm100
-    if (rMapMode.GetMapUnit() == MapUnit::MapPixel)
+    if (aMapMode.GetMapUnit() == MapUnit::MapPixel)
         aOriginalSize = 
Application::GetDefaultDevice()->PixelToLogic(aOriginalSize,
                                                                       
MapMode(MapUnit::Map100thMM));
     double nSizeX = 0;
@@ -3497,8 +3497,8 @@ bool DrawingML::WriteParagraphProperties(const 
Reference<XTextContent>& rParagra
             if (nLevel > -1)
             {
                 Reference< XIndexAccess > 
xNumberingRules(rXPropSet->getPropertyValue(u"NumberingRules"_ustr), UNO_QUERY);
-                const PropertyValues& rNumRuleOfLevel = 
xNumberingRules->getByIndex(nLevel).get<PropertyValues>();
-                for (const PropertyValue& rRule : rNumRuleOfLevel)
+                const PropertyValues aNumRuleOfLevel = 
xNumberingRules->getByIndex(nLevel).get<PropertyValues>();
+                for (const PropertyValue& rRule : aNumRuleOfLevel)
                     if (rRule.Name == "NumberingType" && 
rRule.Value.hasValue())
                         bNumberingOnThisLevel = rRule.Value.get<sal_uInt16>() 
!= style::NumberingType::NUMBER_NONE;
             }
diff --git a/oox/source/ppt/pptshape.cxx b/oox/source/ppt/pptshape.cxx
index 08e6bf1cbee9..634c46dc5255 100644
--- a/oox/source/ppt/pptshape.cxx
+++ b/oox/source/ppt/pptshape.cxx
@@ -263,15 +263,15 @@ void PPTShape::addShape(
                 case XML_ftr :
                     if (IsPlaceHolderCandidate(rSlidePersist))
                     {
-                        const OUString& rFooterText = 
getTextBody()->toString();
+                        const OUString aFooterText = getTextBody()->toString();
 
-                        if( !rFooterText.isEmpty() )
+                        if( !aFooterText.isEmpty() )
                         {
                             // if it is possible to get the footer as a 
property the LO way,
                             // get it and discard the shape
                             Reference< XPropertySet > xPropertySet( 
rSlidePersist.getPage(), UNO_QUERY );
                             xPropertySet->setPropertyValue( 
u"IsFooterVisible"_ustr, Any( true ) );
-                            xPropertySet->setPropertyValue( 
u"FooterText"_ustr, Any(rFooterText) );
+                            xPropertySet->setPropertyValue( 
u"FooterText"_ustr, Any(aFooterText) );
                             return;
                         }
                     }
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx 
b/oox/source/ppt/presentationfragmenthandler.cxx
index 086aca0de1b1..941fa68b6e16 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -335,10 +335,9 @@ void PresentationFragmentHandler::saveThemeToGrabBag(const 
oox::drawingml::Theme
                     ::Color nColor;
 
                     rClrScheme.getColor(nToken, nColor);
-                    const uno::Any& rColor = uno::Any(nColor);
 
                     pCurrentTheme[nId].Name = sName;
-                    pCurrentTheme[nId].Value = rColor;
+                    pCurrentTheme[nId].Value <<= nColor;
                 }
 
 
diff --git a/oox/source/ppt/slidepersist.cxx b/oox/source/ppt/slidepersist.cxx
index 915ce1a1d733..446b7d5623a2 100644
--- a/oox/source/ppt/slidepersist.cxx
+++ b/oox/source/ppt/slidepersist.cxx
@@ -177,7 +177,7 @@ void SlidePersist::createXShapes( XmlFilterBase& 
rFilterBase )
             {
                 pPPTShape->addShape( rFilterBase, *this, getTheme().get(), 
xShapes, aTransformation, &getShapeMap() );
 
-                const auto& pIter = maShapeMap.find(pPPTShape->getId());
+                const auto pIter = maShapeMap.find(pPPTShape->getId());
                 if (pIter != maShapeMap.end())
                     lcl_createShapeMap(pIter->second, aConnectorShapeMap);
             }
@@ -421,7 +421,7 @@ static sal_Int32 
lcl_GetAngle(uno::Reference<drawing::XShape>& rXShape, awt::Poi
 
 Reference<XAnimationNode> SlidePersist::getAnimationNode(const OUString& sId) 
const
 {
-    const auto& pIter = maAnimNodesMap.find(sId);
+    const auto pIter = maAnimNodesMap.find(sId);
     if (pIter != maAnimNodesMap.end())
         return pIter->second;
 
@@ -530,7 +530,7 @@ void 
SlidePersist::createConnectorShapeConnection(oox::drawingml::ShapePtr& pCon
         for (sal_Int32 j = 0; j < nCount; j++)
         {
             OUString aDestShapeId = aConnectorShapeProperties[j].maDestShapeId;
-            const auto& pShape = maShapeMap.find(aDestShapeId);
+            const auto pShape = maShapeMap.find(aDestShapeId);
             if (pShape == maShapeMap.end())
                 continue;
             uno::Reference<drawing::XShape> 
xShape(pShape->second->getXShape(), uno::UNO_QUERY);
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 41bfa084aefb..e201a80686af 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -935,11 +935,11 @@ Reference<XShape> 
SimpleShape::finalImplConvertAndInsert(const css::uno::Referen
         && !maShapeModel.mbInGroup)
     {
         const GraphicHelper& rGraphicHelper = 
mrDrawing.getFilter().getGraphicHelper();
-        const auto& nLeft = ConversionHelper::decodeMeasureToHmm(
+        const auto nLeft = ConversionHelper::decodeMeasureToHmm(
             rGraphicHelper, maTypeModel.maMarginLeft, 0, true, true);
         PropertySet aPropertySet(rxShape);
         aPropertySet.setProperty(PROP_HoriOrientPosition, nLeft);
-        const auto& nTop = ConversionHelper::decodeMeasureToHmm(
+        const auto nTop = ConversionHelper::decodeMeasureToHmm(
             rGraphicHelper, maTypeModel.maMarginTop, 0, true, true);
         aPropertySet.setProperty(PROP_VertOrientPosition, nTop);
         aPropertySet.setProperty(PROP_TextBox, true);
commit 9ce6abe3d47d7992145e7950b719af8c7eb3b2df
Author:     Noel Grandin <[email protected]>
AuthorDate: Mon Nov 11 19:32:15 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Mon Nov 11 20:11:11 2024 +0100

    clang-tidy: performance-unnecessary-copy-initialization in extensions
    
    Change-Id: I85e9c4f7e6d1b20e83929bcfdbbedee7129ce4e7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176413
    Reviewed-by: Noel Grandin <[email protected]>
    Tested-by: Jenkins

diff --git a/extensions/source/bibliography/datman.cxx 
b/extensions/source/bibliography/datman.cxx
index f3a521983fda..30cca335dde7 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -430,7 +430,7 @@ DBChangeDialog_Impl::DBChangeDialog_Impl(weld::Window* 
pParent, const BibDataMan
 
     try
     {
-        OUString sActiveSource = pDatMan->getActiveDataSource();
+        const OUString& sActiveSource = pDatMan->getActiveDataSource();
         for (const OUString& rSourceName : aConfig.GetDataSourceNames())
             m_xSelectionLB->append_text(rSourceName);
         m_xSelectionLB->select_text(sActiveSource);
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx 
b/extensions/source/propctrlr/formcomponenthandler.cxx
index 6f29f131f711..0f97ef6ec418 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -407,7 +407,7 @@ namespace pcr
                                     OUString aOldIdStr = pOldIdStrings[i];
                                     aOldPureIdStr = aOldIdStr.copy( 1 );
                                 }
-                                OUString aNewPureIdStr = pNewPureIds[i];
+                                const OUString& aNewPureIdStr = pNewPureIds[i];
 
                                 for ( const Locale& rLocale : aLocaleSeq )
                                 {

Reply via email to