sd/qa/unit/import-tests.cxx                           |    4 -
 sd/qa/unit/import-tests2.cxx                          |   18 +++----
 sd/source/filter/eppt/pptx-animations.cxx             |   12 ++---
 sd/source/filter/xml/sdtransform.cxx                  |    8 +--
 sd/source/filter/xml/sdxmlwrp.cxx                     |    2 
 sd/source/ui/dlg/navigatr.cxx                         |    8 +--
 sd/source/ui/dlg/prntopts.cxx                         |    6 +-
 sd/source/ui/dlg/sdtreelb.cxx                         |    6 +-
 sd/source/ui/dlg/tpoption.cxx                         |    8 +--
 sd/source/ui/framework/factories/BasicViewFactory.cxx |   18 +++----
 sd/source/ui/func/futransf.cxx                        |    4 -
 sd/source/ui/slideshow/slideshowviewimpl.cxx          |    4 -
 sd/source/ui/unoidl/unomodel.cxx                      |   18 +++----
 sd/source/ui/view/Outliner.cxx                        |    4 -
 sd/source/ui/view/ToolBarManager.cxx                  |    2 
 sd/source/ui/view/drtxtob1.cxx                        |    6 +-
 sd/source/ui/view/drviews4.cxx                        |   10 ++--
 sd/source/ui/view/drviews7.cxx                        |    4 -
 sd/source/ui/view/drviewse.cxx                        |    4 -
 sfx2/source/bastyp/frmhtmlw.cxx                       |   42 +++++++++---------
 sfx2/source/control/charmapcontrol.cxx                |   10 ++--
 sfx2/source/control/templatelocalview.cxx             |    2 
 sfx2/source/devtools/ObjectInspectorTreeHandler.cxx   |    6 +-
 sfx2/source/dialog/dinfdlg.cxx                        |    6 +-
 sfx2/source/dialog/infobar.cxx                        |    6 +-
 sfx2/source/dialog/printopt.cxx                       |    6 +-
 sfx2/source/dialog/tabdlg.cxx                         |   12 ++---
 sfx2/source/doc/guisaveas.cxx                         |    2 
 sfx2/source/doc/templatedlg.cxx                       |    2 
 sfx2/source/notebookbar/SfxNotebookBar.cxx            |    6 +-
 sfx2/source/view/sfxbasecontroller.cxx                |    2 
 sfx2/source/view/viewsh.cxx                           |    4 -
 32 files changed, 126 insertions(+), 126 deletions(-)

New commits:
commit ccb96251ea15c3252010416377dd185205206cbd
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Nov 12 12:18:28 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Nov 12 13:55:55 2024 +0100

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

diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index eb8a795ae004..9d9da3a79b95 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -89,17 +89,17 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, 
const OUString& rBaseURL,
     HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_title );
     if( i_xDocProps.is() )
     {
-        const OUString& rTitle = i_xDocProps->getTitle();
-        if( !rTitle.isEmpty() )
-            HTMLOutFuncs::Out_String( rStrm, rTitle, pNonConvertableChars );
+        const OUString aTitle = i_xDocProps->getTitle();
+        if( !aTitle.isEmpty() )
+            HTMLOutFuncs::Out_String( rStrm, aTitle, pNonConvertableChars );
     }
     HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_title, false );
 
     // Target-Frame
     if( i_xDocProps.is() )
     {
-        const OUString& rTarget = i_xDocProps->getDefaultTarget();
-        if( !rTarget.isEmpty() )
+        const OUString aTarget = i_xDocProps->getDefaultTarget();
+        if( !aTarget.isEmpty() )
         {
             rStrm.WriteOString( SAL_NEWLINE_STRING );
             if( pIndent )
@@ -107,7 +107,7 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, 
const OUString& rBaseURL,
 
             rStrm.WriteOString( "<" OOO_STRING_SVTOOLS_HTML_base " "
                 OOO_STRING_SVTOOLS_HTML_O_target "=\"" );
-            HTMLOutFuncs::Out_String( rStrm, rTarget, pNonConvertableChars )
+            HTMLOutFuncs::Out_String( rStrm, aTarget, pNonConvertableChars )
                .WriteOString( "\">" );
         }
     }
@@ -129,11 +129,11 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, 
const OUString& rBaseURL,
         OUString sContent = OUString::number(
                             i_xDocProps->getAutoloadSecs() );
 
-        const OUString &rReloadURL = i_xDocProps->getAutoloadURL();
-        if( !rReloadURL.isEmpty() )
+        const OUString aReloadURL = i_xDocProps->getAutoloadURL();
+        if( !aReloadURL.isEmpty() )
         {
             sContent += ";URL=" + URIHelper::simpleNormalizedMakeRelative(
-                          rBaseURL, rReloadURL);
+                          rBaseURL, aReloadURL);
         }
 
         OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_refresh, 
sContent, true,
@@ -141,9 +141,9 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, 
const OUString& rBaseURL,
     }
 
     // Author
-    const OUString& rAuthor = i_xDocProps->getAuthor();
-    if( !rAuthor.isEmpty() )
-        OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_author, rAuthor, 
false,
+    const OUString aAuthor = i_xDocProps->getAuthor();
+    if( !aAuthor.isEmpty() )
+        OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_author, aAuthor, 
false,
                  pNonConvertableChars );
 
     // created
@@ -155,9 +155,9 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, 
const OUString& rBaseURL,
              pNonConvertableChars );
 
     // changedby
-    const OUString& rChangedBy = i_xDocProps->getModifiedBy();
-    if( !rChangedBy.isEmpty() )
-        OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changedby, 
rChangedBy, false,
+    const OUString aChangedBy = i_xDocProps->getModifiedBy();
+    if( !aChangedBy.isEmpty() )
+        OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_changedby, 
aChangedBy, false,
                  pNonConvertableChars );
 
     // changed
@@ -168,15 +168,15 @@ void SfxFrameHTMLWriter::Out_DocInfo( SvStream& rStrm, 
const OUString& rBaseURL,
              pNonConvertableChars );
 
     // Subject
-    const OUString& rTheme = i_xDocProps->getSubject();
-    if( !rTheme.isEmpty() )
-        OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_classification, 
rTheme, false,
+    const OUString aTheme = i_xDocProps->getSubject();
+    if( !aTheme.isEmpty() )
+        OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_classification, 
aTheme, false,
                  pNonConvertableChars );
 
     // Description
-    const OUString& rComment = i_xDocProps->getDescription();
-    if( !rComment.isEmpty() )
-        OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_description, 
rComment, false,
+    const OUString aComment = i_xDocProps->getDescription();
+    if( !aComment.isEmpty() )
+        OutMeta( rStrm, pIndent, OOO_STRING_SVTOOLS_HTML_META_description, 
aComment, false,
                  pNonConvertableChars);
 
     // Keywords
diff --git a/sfx2/source/control/charmapcontrol.cxx 
b/sfx2/source/control/charmapcontrol.cxx
index a3208a65a372..63a8cb33a739 100644
--- a/sfx2/source/control/charmapcontrol.cxx
+++ b/sfx2/source/control/charmapcontrol.cxx
@@ -311,7 +311,7 @@ void SfxCharmapContainer::updateRecentCharControl()
 void SfxCharmapContainer::updateRecentCharacterList(const OUString& sTitle, 
const OUString& rFont)
 {
     // if recent char to be added is already in list, remove it
-    if( const auto& [itChar, itChar2] = getRecentChar(sTitle, rFont);
+    if( const auto [itChar, itChar2] = getRecentChar(sTitle, rFont);
         itChar != m_aRecentCharList.end() &&  itChar2 != 
m_aRecentCharFontList.end() )
     {
         m_aRecentCharList.erase( itChar );
@@ -349,7 +349,7 @@ void SfxCharmapContainer::updateRecentCharacterList(const 
OUString& sTitle, cons
 void SfxCharmapContainer::updateFavCharacterList(const OUString& sTitle, const 
OUString& rFont)
 {
     // if Fav char to be added is already in list, remove it
-    if( const auto& [itChar, itChar2] = getFavChar(sTitle, rFont);
+    if( const auto [itChar, itChar2] = getFavChar(sTitle, rFont);
         itChar != m_aFavCharList.end() &&  itChar2 != m_aFavCharFontList.end() 
)
     {
         m_aFavCharList.erase( itChar );
@@ -385,7 +385,7 @@ void SfxCharmapContainer::updateFavCharacterList(const 
OUString& sTitle, const O
 void SfxCharmapContainer::deleteFavCharacterFromList(std::u16string_view 
sTitle, std::u16string_view rFont)
 {
     // if Fav char is found, remove it
-    if( const auto& [itChar, itChar2] = getFavChar(sTitle, rFont);
+    if( const auto [itChar, itChar2] = getFavChar(sTitle, rFont);
         itChar != m_aFavCharList.end() &&  itChar2 != m_aFavCharFontList.end() 
)
     {
         m_aFavCharList.erase( itChar );
@@ -411,7 +411,7 @@ void 
SfxCharmapContainer::deleteFavCharacterFromList(std::u16string_view sTitle,
 
 bool SfxCharmapContainer::isFavChar(std::u16string_view sTitle, 
std::u16string_view rFont)
 {
-    const auto& [itChar, itFont] = getFavChar(sTitle, rFont);
+    const auto [itChar, itFont] = getFavChar(sTitle, rFont);
     return itChar != m_aFavCharList.end() && itFont != 
m_aFavCharFontList.end();
 }
 
@@ -421,7 +421,7 @@ IMPL_LINK(SfxCharmapContainer, RecentClearClickHdl, 
SvxCharView*, rView, void)
     OUString sFont = rView->GetFont().GetFamilyName();
 
     // if recent char to be added is already in list, remove it
-    if( const auto& [itChar, itChar2] = getRecentChar(sTitle, sFont);
+    if( const auto [itChar, itChar2] = getRecentChar(sTitle, sFont);
         itChar != m_aRecentCharList.end() &&  itChar2 != 
m_aRecentCharFontList.end() )
     {
         m_aRecentCharList.erase( itChar );
diff --git a/sfx2/source/control/templatelocalview.cxx 
b/sfx2/source/control/templatelocalview.cxx
index 898a068314a7..43083414656b 100644
--- a/sfx2/source/control/templatelocalview.cxx
+++ b/sfx2/source/control/templatelocalview.cxx
@@ -845,7 +845,7 @@ BitmapEx TemplateLocalView::scaleImg (const BitmapEx &rImg, 
tools::Long width, t
 bool TemplateLocalView::IsDefaultTemplate(const OUString& rPath)
 {
     SvtModuleOptions aModOpt;
-    const css::uno::Sequence<OUString> &aServiceNames = 
aModOpt.GetAllServiceNames();
+    const css::uno::Sequence<OUString> aServiceNames = 
aModOpt.GetAllServiceNames();
 
     return std::any_of(aServiceNames.begin(), aServiceNames.end(), 
[&rPath](const OUString& rName) {
         return SfxObjectFactory::GetStandardTemplate(rName).match(rPath); });
diff --git a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx 
b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
index f3fd127bd5b0..1457fe1a10d0 100644
--- a/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
+++ b/sfx2/source/devtools/ObjectInspectorTreeHandler.cxx
@@ -511,7 +511,7 @@ public:
 
     bool shouldShowExpander() override
     {
-        auto const& xSuperClasses = mxClass->getSuperclasses();
+        auto const xSuperClasses = mxClass->getSuperclasses();
         return xSuperClasses.getLength() > 2
                || (xSuperClasses.getLength() == 1 && 
!isXInterface(xSuperClasses[0]));
     }
@@ -522,7 +522,7 @@ public:
     void fillChildren(std::unique_ptr<weld::TreeView>& rTree,
                       const weld::TreeIter* pParent) override
     {
-        auto const& xSuperClasses = mxClass->getSuperclasses();
+        auto const xSuperClasses = mxClass->getSuperclasses();
         for (auto const& xSuper : xSuperClasses)
         {
             if (!isXInterface(xSuper))
@@ -745,7 +745,7 @@ void 
GenericPropertiesNode::fillChildren(std::unique_ptr<weld::TreeView>& pTree,
     if (!xInvocation.is())
         return;
 
-    auto const& xInvocationAccess = xInvocation->getIntrospection();
+    auto const xInvocationAccess = xInvocation->getIntrospection();
     if (!xInvocationAccess.is())
         return;
 
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 05ef79f5dda6..598593e0888c 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -1115,7 +1115,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
     // determine context symbol
     aURL.SetSmartProtocol( INetProtocol::File );
     aURL.SetSmartURL( aFactory);
-    const OUString& rMainURL = aURL.GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
+    const OUString aMainURL = aURL.GetMainURL( 
INetURLObject::DecodeMechanism::NONE );
     OUString aImage = SvFileInformationManager::GetImageId( aURL, true );
     m_xBmp->set_from_icon_name(aImage);
 
@@ -1130,7 +1130,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
         aSizeText = CreateSizeText( nSize );
     m_xShowSizeFT->set_label( aSizeText );
 
-    OUString aDescription = SvFileInformationManager::GetDescription( 
INetURLObject(rMainURL) );
+    OUString aDescription = SvFileInformationManager::GetDescription( 
INetURLObject(aMainURL) );
     if ( aDescription.isEmpty() )
         aDescription = SfxResId( STR_SFX_NEWOFFICEDOC );
     m_xShowTypeFT->set_label( aDescription );
@@ -1144,7 +1144,7 @@ void SfxDocumentPage::Reset( const SfxItemSet* rSet )
 
         // Disable setting/changing password on text files.
         // Perhaps this needs to be done for both Online and Desktop.
-        OUString sExtension(INetURLObject(rMainURL).getExtension());
+        OUString sExtension(INetURLObject(aMainURL).getExtension());
         if (!sExtension.isEmpty())
         {
             sExtension = sExtension.toAsciiLowerCase();
diff --git a/sfx2/source/dialog/infobar.cxx b/sfx2/source/dialog/infobar.cxx
index e69fe481bccb..c6a919d43710 100644
--- a/sfx2/source/dialog/infobar.cxx
+++ b/sfx2/source/dialog/infobar.cxx
@@ -463,9 +463,9 @@ void SfxInfoBarContainerWindow::Resize()
     if (m_bResizing)
         return;
     m_bResizing = true;
-    const Size& rOrigSize = GetSizePixel();
-    auto nOrigWidth = rOrigSize.getWidth();
-    auto nOrigHeight = rOrigSize.getHeight();
+    const Size aWindowOrigSize = GetSizePixel();
+    auto nOrigWidth = aWindowOrigSize.getWidth();
+    auto nOrigHeight = aWindowOrigSize.getHeight();
 
     tools::Long nHeight = 0;
 
diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx
index d1ee64911b2d..1d374eb94d6f 100644
--- a/sfx2/source/dialog/printopt.cxx
+++ b/sfx2/source/dialog/printopt.cxx
@@ -97,7 +97,7 @@ OUString SfxCommonPrintOptionsTabPage::GetAllStrings()
 
     for (const auto& label : labels)
     {
-        if (const auto& pString = m_xBuilder->weld_label(label))
+        if (const auto pString = m_xBuilder->weld_label(label))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -106,7 +106,7 @@ OUString SfxCommonPrintOptionsTabPage::GetAllStrings()
 
     for (const auto& check : checkButton)
     {
-        if (const auto& pString = m_xBuilder->weld_check_button(check))
+        if (const auto pString = m_xBuilder->weld_check_button(check))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -122,7 +122,7 @@ OUString SfxCommonPrintOptionsTabPage::GetAllStrings()
 
     for (const auto& radio : radioButton)
     {
-        if (const auto& pString = m_xBuilder->weld_radio_button(radio))
+        if (const auto pString = m_xBuilder->weld_radio_button(radio))
             sAllStrings += pString->get_label() + " ";
     }
 
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index ec1e8dbcefa6..331414c4c784 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -430,9 +430,9 @@ IMPL_LINK_NOARG(SfxTabDialogController, ResetHdl, 
weld::Button&, void)
         m_xExampleSet.reset(new SfxItemSet(*m_pSet));
 
     const SfxItemPool* pPool = m_pSet->GetPool();
-    const WhichRangesContainer& pTmpRanges = ((*it)->fnGetRanges)();
+    const WhichRangesContainer aTmpRanges = ((*it)->fnGetRanges)();
 
-    for (const auto & rPair : pTmpRanges)
+    for (const auto & rPair : aTmpRanges)
     {
         // Correct Range with multiple values
         sal_uInt16 nTmp = rPair.first, nTmpEnd = rPair.second;
@@ -483,10 +483,10 @@ IMPL_LINK_NOARG(SfxTabDialogController, BaseFmtHdl, 
weld::Button&, void)
         m_xExampleSet.reset(new SfxItemSet(*m_pSet));
 
     const SfxItemPool* pPool = m_pSet->GetPool();
-    const WhichRangesContainer& pTmpRanges = ((*it)->fnGetRanges)();
+    const WhichRangesContainer aTmpRanges = ((*it)->fnGetRanges)();
     SfxItemSet aTmpSet(*m_xExampleSet);
 
-    for (const auto& rPair : pTmpRanges)
+    for (const auto& rPair : aTmpRanges)
     {
         // Correct Range with multiple values
         sal_uInt16 nTmp = rPair.first, nTmpEnd = rPair.second;
@@ -716,9 +716,9 @@ const WhichRangesContainer & 
SfxTabDialogController::GetInputRanges(const SfxIte
 
         if ( elem->fnGetRanges )
         {
-            const WhichRangesContainer& pTmpRanges = (elem->fnGetRanges)();
+            const WhichRangesContainer aTmpRanges = (elem->fnGetRanges)();
 
-            for (const auto & rPair : pTmpRanges)
+            for (const auto & rPair : aTmpRanges)
             {
                 sal_uInt16 nWidFrom = rPool.GetWhichIDFromSlotID(rPair.first);
                 sal_uInt16 nWidTo = rPool.GetWhichIDFromSlotID(rPair.second);
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 0b093707b6d8..a266a4a5bb2b 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1814,7 +1814,7 @@ bool 
SfxStoringHelper::FinishGUIStoreModel(::comphelper::SequenceAsHashMap::cons
         OUString sPrintedBy(SfxResId(STR_SFX_FILTERNAME_PDF));
         if (pDocShell && pDocShell->IsUseUserData())
         {
-            const OUString& sFullName = SvtUserOptions().GetFullName();
+            const OUString sFullName = SvtUserOptions().GetFullName();
             if (!sFullName.isEmpty())
                 sPrintedBy += ": " + sFullName;
         }
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index 95b193d0979d..57493759b16c 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -1238,7 +1238,7 @@ static std::vector<OUString> lcl_getAllFactoryURLs ()
 {
     SvtModuleOptions aModOpt;
     std::vector<OUString> aList;
-    const css::uno::Sequence<OUString> &aServiceNames = 
aModOpt.GetAllServiceNames();
+    const css::uno::Sequence<OUString> aServiceNames = 
aModOpt.GetAllServiceNames();
 
     for( const auto& rServiceName : aServiceNames )
     {
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx 
b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 79557592a1c8..eb1d3bcb56a2 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -592,7 +592,7 @@ void SfxNotebookBar::ShowMenubar(bool bShow)
 
             if ( eApp == eCurrentApp )
             {
-                const Reference<frame::XLayoutManager>& xLayoutManager =
+                const Reference<frame::XLayoutManager> xLayoutManager =
                                                         lcl_getLayoutManager( 
xFrame );
 
                 if (xLayoutManager.is())
@@ -623,7 +623,7 @@ void SfxNotebookBar::ShowMenubar(SfxViewFrame const * 
pViewFrame, bool bShow)
     Reference<frame::XFrame> xFrame = 
pViewFrame->GetFrame().GetFrameInterface();
     if (xFrame.is())
     {
-        const Reference<frame::XLayoutManager>& xLayoutManager = 
lcl_getLayoutManager(xFrame);
+        const Reference<frame::XLayoutManager> xLayoutManager = 
lcl_getLayoutManager(xFrame);
         if (xLayoutManager.is())
         {
             if (xLayoutManager->getElement(MENUBAR_STR).is())
@@ -648,7 +648,7 @@ void SfxNotebookBar::ToggleMenubar()
     if (!xFrame.is())
         return;
 
-    const Reference<frame::XLayoutManager>& xLayoutManager =
+    const Reference<frame::XLayoutManager> xLayoutManager =
                                             lcl_getLayoutManager(xFrame);
 
     bool bShow = true;
diff --git a/sfx2/source/view/sfxbasecontroller.cxx 
b/sfx2/source/view/sfxbasecontroller.cxx
index 7c97fbd873b7..30718d1d42e7 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -681,7 +681,7 @@ GetSlotDispatchWithFallback(SfxViewFrame* pViewFrame, const 
css::util::URL& aURL
     // try to find parent SfxViewFrame
     if (const auto& xOwnFrame = pViewFrame->GetFrame().GetFrameInterface())
     {
-        if (const auto& xParentFrame = xOwnFrame->getCreator())
+        if (const auto xParentFrame = xOwnFrame->getCreator())
         {
             // TODO/LATER: in future probably SfxViewFrame hierarchy should be 
the same as XFrame hierarchy
             // SfxViewFrame* pParentFrame = pViewFrame->GetParentViewFrame();
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index a184d0a0f8b8..46b809472878 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -2088,8 +2088,8 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
                                 for( ToolBox::ImplToolItems::size_type nItem = 
0; nItem < nItemCount; ++nItem )
                                 {
                                     ToolBoxItemId nItemId = 
pTextToolbox->GetItemId( nItem );
-                                    const OUString& rCommand = 
pTextToolbox->GetItemCommand( nItemId );
-                                    if (rCommand == ".uno:StyleApply")
+                                    const OUString aCommand = 
pTextToolbox->GetItemCommand( nItemId );
+                                    if (aCommand == ".uno:StyleApply")
                                     {
                                         vcl::Window* pItemWin = 
pTextToolbox->GetItemWindow( nItemId );
                                         if( pItemWin )
commit 021b7b6684f13853d8bd1a7bcd7273967a2034d9
Author:     Noel Grandin <[email protected]>
AuthorDate: Tue Nov 12 12:18:12 2024 +0200
Commit:     Noel Grandin <[email protected]>
CommitDate: Tue Nov 12 13:55:46 2024 +0100

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

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 1af789b4df21..3d9423497232 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -1770,8 +1770,8 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testPDFImportShared)
             if (pSdrGrafObj == nullptr)
                 continue;
 
-            const GraphicObject& rGraphicObject = 
pSdrGrafObj->GetGraphicObject().GetGraphic();
-            const Graphic& rGraphic = rGraphicObject.GetGraphic();
+            const GraphicObject aGraphicObject = 
pSdrGrafObj->GetGraphicObject().GetGraphic();
+            const Graphic& rGraphic = aGraphicObject.GetGraphic();
             CPPUNIT_ASSERT_MESSAGE(
                 "After loading, the PDF shouldn't have the primitive sequence 
created yet",
                 
!rGraphic.getVectorGraphicData()->isPrimitiveSequenceCreated());
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index a39bc847c784..2ff83269d682 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -1167,25 +1167,25 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf114821)
 
     // These Labels have custom position, so the exported LabelPlacement 
(reference point) by MSO is OUTSIDE/OUTEND
     // Check the first label
-    const css::uno::Reference<css::beans::XPropertySet>& rPropSet0(
+    const css::uno::Reference<css::beans::XPropertySet> aPropSet0(
         aSeriesSeq[0]->getDataPointByIndex(0));
-    CPPUNIT_ASSERT(rPropSet0.is());
+    CPPUNIT_ASSERT(aPropSet0.is());
     sal_Int32 aPlacement;
-    rPropSet0->getPropertyValue(u"LabelPlacement"_ustr) >>= aPlacement;
+    aPropSet0->getPropertyValue(u"LabelPlacement"_ustr) >>= aPlacement;
     CPPUNIT_ASSERT_EQUAL(css::chart::DataLabelPlacement::OUTSIDE, aPlacement);
 
     // Check the second label
-    const css::uno::Reference<css::beans::XPropertySet>& rPropSet1(
+    const css::uno::Reference<css::beans::XPropertySet> aPropSet1(
         aSeriesSeq[0]->getDataPointByIndex(1));
-    CPPUNIT_ASSERT(rPropSet1.is());
-    rPropSet1->getPropertyValue(u"LabelPlacement"_ustr) >>= aPlacement;
+    CPPUNIT_ASSERT(aPropSet1.is());
+    aPropSet1->getPropertyValue(u"LabelPlacement"_ustr) >>= aPlacement;
     CPPUNIT_ASSERT_EQUAL(css::chart::DataLabelPlacement::OUTSIDE, aPlacement);
 
     // Check the third label
-    const css::uno::Reference<css::beans::XPropertySet>& rPropSet2(
+    const css::uno::Reference<css::beans::XPropertySet> aPropSet2(
         aSeriesSeq[0]->getDataPointByIndex(2));
-    CPPUNIT_ASSERT(rPropSet2.is());
-    rPropSet2->getPropertyValue(u"LabelPlacement"_ustr) >>= aPlacement;
+    CPPUNIT_ASSERT(aPropSet2.is());
+    aPropSet2->getPropertyValue(u"LabelPlacement"_ustr) >>= aPlacement;
     CPPUNIT_ASSERT_EQUAL(css::chart::DataLabelPlacement::OUTSIDE, aPlacement);
 }
 
diff --git a/sd/source/filter/eppt/pptx-animations.cxx 
b/sd/source/filter/eppt/pptx-animations.cxx
index 0029cc96c659..dbe264019c75 100644
--- a/sd/source/filter/eppt/pptx-animations.cxx
+++ b/sd/source/filter/eppt/pptx-animations.cxx
@@ -206,8 +206,8 @@ void WriteAnimateValues(const FSHelperPtr& pFS, const 
Reference<XAnimate>& rXAni
     if (!aKeyTimes.hasElements())
         return;
     const Sequence<Any> aValues = rXAnimate->getValues();
-    const OUString& sFormula = rXAnimate->getFormula();
-    const OUString& rAttributeName = rXAnimate->getAttributeName();
+    const OUString sFormula = rXAnimate->getFormula();
+    const OUString sAttributeName = rXAnimate->getAttributeName();
 
     SAL_INFO("sd.eppt", "animate values, formula: " << sFormula.toUtf8());
 
@@ -228,13 +228,13 @@ void WriteAnimateValues(const FSHelperPtr& pFS, const 
Reference<XAnimate>& rXAni
             if (aValues[i] >>= aPair)
             {
                 WriteAnimationProperty(
-                    pFS, AnimationExporter::convertAnimateValue(aPair.First, 
rAttributeName));
+                    pFS, AnimationExporter::convertAnimateValue(aPair.First, 
sAttributeName));
                 WriteAnimationProperty(
-                    pFS, AnimationExporter::convertAnimateValue(aPair.Second, 
rAttributeName));
+                    pFS, AnimationExporter::convertAnimateValue(aPair.Second, 
sAttributeName));
             }
             else
                 WriteAnimationProperty(
-                    pFS, AnimationExporter::convertAnimateValue(aValues[i], 
rAttributeName));
+                    pFS, AnimationExporter::convertAnimateValue(aValues[i], 
sAttributeName));
 
             pFS->endElementNS(XML_p, XML_val);
             pFS->endElementNS(XML_p, XML_tav);
@@ -1244,7 +1244,7 @@ sal_Int32 
PPTXAnimationExport::GetNextAnimationNodeId(const Reference<XAnimation
 sal_Int32 PPTXAnimationExport::GetAnimationNodeId(const 
Reference<XAnimationNode>& xNode)
 {
     sal_Int32 nId = -1;
-    const auto& aIter = maAnimationNodeIdMap.find(xNode);
+    const auto aIter = maAnimationNodeIdMap.find(xNode);
     if (aIter != maAnimationNodeIdMap.end())
     {
         nId = aIter->second;
diff --git a/sd/source/filter/xml/sdtransform.cxx 
b/sd/source/filter/xml/sdtransform.cxx
index 3049935c9128..418f65470315 100644
--- a/sd/source/filter/xml/sdtransform.cxx
+++ b/sd/source/filter/xml/sdtransform.cxx
@@ -338,15 +338,15 @@ bool SdTransformOOo2xDocument::removeAlienAttributes( 
SfxItemSet& rSet, sal_uInt
                     {
                         if( nItem != nFound )
                         {
-                            OUString const& 
rNamespace(rAttr.GetAttrNamespace(nItem));
-                            OUString const& 
rPrefix(rAttr.GetAttrPrefix(nItem));
-                            if (rPrefix.isEmpty())
+                            OUString const 
aNamespace(rAttr.GetAttrNamespace(nItem));
+                            OUString const aPrefix(rAttr.GetAttrPrefix(nItem));
+                            if (aPrefix.isEmpty())
                             {
                                 aNewItem.AddAttr(rAttr.GetAttrLName(nItem), 
rAttr.GetAttrValue(nItem));
                             }
                             else
                             {
-                                aNewItem.AddAttr(rPrefix, rNamespace, 
rAttr.GetAttrLName(nItem), rAttr.GetAttrValue(nItem));
+                                aNewItem.AddAttr(aPrefix, aNamespace, 
rAttr.GetAttrLName(nItem), rAttr.GetAttrValue(nItem));
                             }
                         }
                     }
diff --git a/sd/source/filter/xml/sdxmlwrp.cxx 
b/sd/source/filter/xml/sdxmlwrp.cxx
index a26a4e65155d..b8cc7bf10226 100644
--- a/sd/source/filter/xml/sdxmlwrp.cxx
+++ b/sd/source/filter/xml/sdxmlwrp.cxx
@@ -779,7 +779,7 @@ bool SdXMLFilter::Export()
         bool bUsePrettyPrinting = 
officecfg::Office::Common::Save::Document::PrettyPrinting::get();
         xInfoSet->setPropertyValue( u"UsePrettyPrinting"_ustr, Any( 
bUsePrettyPrinting ) );
 
-        const uno::Reference < embed::XStorage >& xStorage = 
mrMedium.GetOutputStorage();
+        const uno::Reference < embed::XStorage > xStorage = 
mrMedium.GetOutputStorage();
 
         // Set base URI
         OUString sPropName( u"BaseURI"_ustr );
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 4e8d1c7a290e..d4f189277fd7 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -367,13 +367,13 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, 
weld::TreeView&, bool)
 
                 // Page entries in the tree have id value 1. Object entries 
have id value of
                 // the address of the pointer to the object.
-                const auto& rCursorEntryId = mxTlbObjects->get_cursor_id();
-                auto nCursorEntryId = rCursorEntryId.toInt64();
-                SdrObject* pCursorEntryObject = 
weld::fromId<SdrObject*>(rCursorEntryId);
+                const auto aCursorEntryId = mxTlbObjects->get_cursor_id();
+                auto nCursorEntryId = aCursorEntryId.toInt64();
+                SdrObject* pCursorEntryObject = 
weld::fromId<SdrObject*>(aCursorEntryId);
 
                 bool 
bIsCursorEntrySelected(std::find(vSelectedEntryIds.begin(),
                                                       vSelectedEntryIds.end(),
-                                                      rCursorEntryId) != 
vSelectedEntryIds.end());
+                                                      aCursorEntryId) != 
vSelectedEntryIds.end());
 
                 if (bIsCursorEntrySelected)
                 {
diff --git a/sd/source/ui/dlg/prntopts.cxx b/sd/source/ui/dlg/prntopts.cxx
index e95820b39ae2..d26e80f1af82 100644
--- a/sd/source/ui/dlg/prntopts.cxx
+++ b/sd/source/ui/dlg/prntopts.cxx
@@ -89,7 +89,7 @@ OUString SdPrintOptions::GetAllStrings()
 
     for (const auto& label : labels)
     {
-        if (const auto& pString = m_xBuilder->weld_label(label))
+        if (const auto pString = m_xBuilder->weld_label(label))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -99,7 +99,7 @@ OUString SdPrintOptions::GetAllStrings()
 
     for (const auto& check : checkButton)
     {
-        if (const auto& pString = m_xBuilder->weld_check_button(check))
+        if (const auto pString = m_xBuilder->weld_check_button(check))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -108,7 +108,7 @@ OUString SdPrintOptions::GetAllStrings()
 
     for (const auto& radio : radioButton)
     {
-        if (const auto& pString = m_xBuilder->weld_radio_button(radio))
+        if (const auto pString = m_xBuilder->weld_radio_button(radio))
             sAllStrings += pString->get_label() + " ";
     }
 
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 5c5bc8513863..8834c71e50bb 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -798,8 +798,8 @@ IMPL_LINK(SdPageObjsTLV, EditedEntryHdl, const IterString&, 
rIterString, bool)
     }
 
     // set the new name
-    const auto& rEntryId = m_xTreeView->get_id(rIterString.first);
-    if (rEntryId.toInt64() == 1)
+    const auto aEntryId = m_xTreeView->get_id(rIterString.first);
+    if (aEntryId.toInt64() == 1)
     {
         // page name
         if (::sd::DrawDocShell* pDocShell = m_pDoc->GetDocSh())
@@ -811,7 +811,7 @@ IMPL_LINK(SdPageObjsTLV, EditedEntryHdl, const IterString&, 
rIterString, bool)
             }
         }
     }
-    else if (SdrObject* pCursorEntryObject = 
weld::fromId<SdrObject*>(rEntryId))
+    else if (SdrObject* pCursorEntryObject = 
weld::fromId<SdrObject*>(aEntryId))
     {
         // object name
         pCursorEntryObject->SetName(rIterString.second);
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index 361c34fb20a4..8b97d4df7aec 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -216,7 +216,7 @@ OUString SdTpOptionsContents::GetAllStrings()
 
     for (const auto& label : labels)
     {
-        if (const auto& pString = m_xBuilder->weld_label(label))
+        if (const auto pString = m_xBuilder->weld_label(label))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -224,7 +224,7 @@ OUString SdTpOptionsContents::GetAllStrings()
 
     for (const auto& check : checkButton)
     {
-        if (const auto& pString = m_xBuilder->weld_check_button(check))
+        if (const auto pString = m_xBuilder->weld_check_button(check))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -505,7 +505,7 @@ OUString SdTpOptionsMisc::GetAllStrings()
 
     for (const auto& label : labels)
     {
-        if (const auto& pString = m_xBuilder->weld_label(label))
+        if (const auto pString = m_xBuilder->weld_label(label))
             sAllStrings += pString->get_label() + " ";
     }
 
@@ -515,7 +515,7 @@ OUString SdTpOptionsMisc::GetAllStrings()
 
     for (const auto& check : checkButton)
     {
-        if (const auto& pString = m_xBuilder->weld_check_button(check))
+        if (const auto pString = m_xBuilder->weld_check_button(check))
             sAllStrings += pString->get_label() + " ";
     }
 
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx 
b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index c9f06e6593d6..f94cf08a498a 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -303,8 +303,8 @@ std::shared_ptr<ViewShell> 
BasicViewFactory::CreateViewShell (
     FrameView* pFrameView)
 {
     std::shared_ptr<ViewShell> pViewShell;
-    const OUString& rsViewURL (rxViewId->getResourceURL());
-    if (rsViewURL == FrameworkHelper::msImpressViewURL)
+    const OUString sViewURL (rxViewId->getResourceURL());
+    if (sViewURL == FrameworkHelper::msImpressViewURL)
     {
         pViewShell =
             std::make_shared<DrawViewShell>(
@@ -314,14 +314,14 @@ std::shared_ptr<ViewShell> 
BasicViewFactory::CreateViewShell (
                 pFrameView);
         pViewShell->GetContentWindow()->set_id(u"impress_win"_ustr);
     }
-    else if (rsViewURL == FrameworkHelper::msDrawViewURL)
+    else if (sViewURL == FrameworkHelper::msDrawViewURL)
     {
         pViewShell = std::shared_ptr<GraphicViewShell>(
                 new GraphicViewShell(*mpBase, &rWindow, pFrameView),
                 o3tl::default_delete<GraphicViewShell>());
         pViewShell->GetContentWindow()->set_id(u"draw_win"_ustr);
     }
-    else if (rsViewURL == FrameworkHelper::msOutlineViewURL)
+    else if (sViewURL == FrameworkHelper::msOutlineViewURL)
     {
         pViewShell =
             std::make_shared<OutlineViewShell>(
@@ -331,7 +331,7 @@ std::shared_ptr<ViewShell> 
BasicViewFactory::CreateViewShell (
                 pFrameView);
         pViewShell->GetContentWindow()->set_id(u"outline_win"_ustr);
     }
-    else if (rsViewURL == FrameworkHelper::msNotesViewURL)
+    else if (sViewURL == FrameworkHelper::msNotesViewURL)
     {
         pViewShell =
             std::make_shared<DrawViewShell>(
@@ -341,7 +341,7 @@ std::shared_ptr<ViewShell> 
BasicViewFactory::CreateViewShell (
                 pFrameView);
         pViewShell->GetContentWindow()->set_id(u"notes_win"_ustr);
     }
-    else if (rsViewURL == FrameworkHelper::msHandoutViewURL)
+    else if (sViewURL == FrameworkHelper::msHandoutViewURL)
     {
         pViewShell =
             std::make_shared<DrawViewShell>(
@@ -351,7 +351,7 @@ std::shared_ptr<ViewShell> 
BasicViewFactory::CreateViewShell (
                 pFrameView);
         pViewShell->GetContentWindow()->set_id(u"handout_win"_ustr);
     }
-    else if (rsViewURL == FrameworkHelper::msPresentationViewURL)
+    else if (sViewURL == FrameworkHelper::msPresentationViewURL)
     {
         pViewShell =
             std::make_shared<PresentationViewShell>(
@@ -360,7 +360,7 @@ std::shared_ptr<ViewShell> 
BasicViewFactory::CreateViewShell (
                 pFrameView);
         pViewShell->GetContentWindow()->set_id(u"presentation_win"_ustr);
     }
-    else if (rsViewURL == FrameworkHelper::msSlideSorterURL)
+    else if (sViewURL == FrameworkHelper::msSlideSorterURL)
     {
         pViewShell = ::sd::slidesorter::SlideSorterViewShell::Create (
             &rFrame,
@@ -369,7 +369,7 @@ std::shared_ptr<ViewShell> 
BasicViewFactory::CreateViewShell (
             pFrameView);
         pViewShell->GetContentWindow()->set_id(u"slidesorter"_ustr);
     }
-    else if (rsViewURL == FrameworkHelper::msNotesPanelViewURL)
+    else if (sViewURL == FrameworkHelper::msNotesPanelViewURL)
     {
         pViewShell = std::make_shared<NotesPanelViewShell>(&rFrame, *mpBase, 
&rWindow, pFrameView);
         pViewShell->GetContentWindow()->set_id(u"notes_panel_win"_ustr);
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index d9e92c000413..a50cfaf3648a 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -96,8 +96,8 @@ void FuTransform::DoExecute( SfxRequest& rReq )
         SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
         pDlg.reset(pFact->CreateCaptionDialog(mpViewShell->GetFrameWeld(), 
mpView));
 
-        const WhichRangesContainer& pRange = pDlg->GetInputRanges( 
*aNewAttr.GetPool() );
-        SfxItemSet aCombSet( *aNewAttr.GetPool(), pRange );
+        const WhichRangesContainer aRange = pDlg->GetInputRanges( 
*aNewAttr.GetPool() );
+        SfxItemSet aCombSet( *aNewAttr.GetPool(), aRange );
         aCombSet.Put( aNewAttr );
         aCombSet.Put( aSet );
         pDlg->SetInputSet( &aCombSet );
diff --git a/sd/source/ui/slideshow/slideshowviewimpl.cxx 
b/sd/source/ui/slideshow/slideshowviewimpl.cxx
index 9b3ae107b9fb..7db8594e4e08 100644
--- a/sd/source/ui/slideshow/slideshowviewimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowviewimpl.cxx
@@ -269,9 +269,9 @@ geometry::AffineMatrix2D SAL_CALL 
SlideShowView::getTransformation(  )
     std::unique_lock aGuard( m_aMutex );
     SolarMutexGuard aSolarGuard;
 
-    const Size& rTmpSize( mrOutputWindow.GetSizePixel() );
+    const Size aTmpSize( mrOutputWindow.GetSizePixel() );
 
-    if (rTmpSize.IsEmpty())
+    if (aTmpSize.IsEmpty())
     {
         return geometry::AffineMatrix2D (1,0,0,0,1,0);
     }
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index c4d831fe168a..070616a101a0 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -899,9 +899,9 @@ void AnimationsExporter::exportNodeImpl(const 
Reference<XAnimationNode>& xNode)
                 rValue.Value >>= xMaster;
                 if (xMaster.is())
                 {
-                    const std::string& rIdentifier(GetInterfaceHash(xMaster));
-                    if (!rIdentifier.empty())
-                        mrWriter.put("masterElement", rIdentifier);
+                    const std::string aIdentifier(GetInterfaceHash(xMaster));
+                    if (!aIdentifier.empty())
+                        mrWriter.put("masterElement", aIdentifier);
                 }
             }
             else if (IsXMLToken(rValue.Name, XML_GROUP_ID))
@@ -1007,9 +1007,9 @@ void AnimationsExporter::convertTarget(OStringBuffer& 
sTmp, const Any& rTarget)
     SAL_WARN_IF(!xRef.is(), "sd", "AnimationsExporter::convertTarget(), 
invalid target type!");
     if (xRef.is())
     {
-        const std::string& rIdentifier(GetInterfaceHash(xRef));
-        if (!rIdentifier.empty())
-            sTmp.append(rIdentifier);
+        const std::string aIdentifier(GetInterfaceHash(xRef));
+        if (!aIdentifier.empty())
+            sTmp.append(aIdentifier);
     }
 }
 
@@ -3937,9 +3937,9 @@ void SdXImpressDocument::getPostIts(::tools::JsonWriter& 
rJsonWriter)
             uno::Reference<text::XText> xText(xAnnotation->getTextRange());
             rJsonWriter.put("text", xText->getString());
             rJsonWriter.put("parthash", pPage->GetUniqueID());
-            geometry::RealPoint2D const & rPoint = xAnnotation->getPosition();
-            geometry::RealSize2D const & rSize = xAnnotation->getSize();
-            ::tools::Rectangle aRectangle(Point(rPoint.X * 100.0, rPoint.Y * 
100.0), Size(rSize.Width * 100.0, rSize.Height * 100.0));
+            geometry::RealPoint2D const aPoint = xAnnotation->getPosition();
+            geometry::RealSize2D const aSize = xAnnotation->getSize();
+            ::tools::Rectangle aRectangle(Point(aPoint.X * 100.0, aPoint.Y * 
100.0), Size(aSize.Width * 100.0, aSize.Height * 100.0));
             aRectangle = o3tl::toTwips(aRectangle, o3tl::Length::mm100);
             OString sRectangle = aRectangle.toString();
             rJsonWriter.put("rectangle", sRectangle.getStr());
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 38b3128affb1..2439e98d7c82 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -728,8 +728,8 @@ basegfx::B2DRectangle getPDFSelection(const 
std::unique_ptr<VectorGraphicSearch>
 {
     basegfx::B2DRectangle aSelection;
 
-    auto const & rTextRectangles = rVectorGraphicSearch->getTextRectangles();
-    if (rTextRectangles.empty())
+    auto const aTextRectangles = rVectorGraphicSearch->getTextRectangles();
+    if (aTextRectangles.empty())
         return aSelection;
 
     basegfx::B2DSize aPdfPageSizeHMM = rVectorGraphicSearch->pageSize();
diff --git a/sd/source/ui/view/ToolBarManager.cxx 
b/sd/source/ui/view/ToolBarManager.cxx
index 0dcb3a1a919a..d5dda2d3ce31 100644
--- a/sd/source/ui/view/ToolBarManager.cxx
+++ b/sd/source/ui/view/ToolBarManager.cxx
@@ -1352,7 +1352,7 @@ void ToolBarShellList::UpdateShells (
     if (rpMainViewShell == nullptr)
         return;
 
-    const std::shared_ptr<ViewShell>& pCurrentMainViewShell
+    const std::shared_ptr<ViewShell> pCurrentMainViewShell
         = rpManager->GetOverridingMainShell() ? 
rpManager->GetOverridingMainShell() : rpMainViewShell;
 
     GroupedShellList aList;
diff --git a/sd/source/ui/view/drtxtob1.cxx b/sd/source/ui/view/drtxtob1.cxx
index 5c448c88b756..eed3b9662676 100644
--- a/sd/source/ui/view/drtxtob1.cxx
+++ b/sd/source/ui/view/drtxtob1.cxx
@@ -692,12 +692,12 @@ SET_ADJUST:
                     {
                         const sal_uInt16 nEEWhich
                             = aEditAttr.GetPool()->GetWhichIDFromSlotID(nSlot);
-                        const std::optional<NamedColor>& oColor
+                        const std::optional<NamedColor> oColor
                             = mpViewShell->GetDocSh()->GetRecentColor(nSlot);
                         if (oColor.has_value())
                         {
-                            const model::ComplexColor& rCol = 
(*oColor).getComplexColor();
-                            aNewAttr.Put(SvxColorItem(rCol.getFinalColor(), 
rCol, nEEWhich));
+                            const model::ComplexColor aCol = 
(*oColor).getComplexColor();
+                            aNewAttr.Put(SvxColorItem(aCol.getFinalColor(), 
aCol, nEEWhich));
                         }
                     }
                     break;
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 776546ed9cfc..3611af691081 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -149,24 +149,24 @@ void DrawViewShell::DeleteActualLayer()
 
     SdrLayerAdmin& rAdmin = GetDoc()->GetLayerAdmin();
     sal_uInt16 nId = GetLayerTabControl()->GetCurPageId();
-    const OUString& rName = GetLayerTabControl()->GetLayerName(nId);
-    if(LayerTabBar::IsRealNameOfStandardLayer(rName))
+    const OUString aName = GetLayerTabControl()->GetLayerName(nId);
+    if(LayerTabBar::IsRealNameOfStandardLayer(aName))
     {
         assert(false && "Standard layer may not be deleted.");
         return;
     }
-    const OUString& rDisplayName(GetLayerTabControl()->GetPageText(nId));
+    const OUString aDisplayName(GetLayerTabControl()->GetPageText(nId));
     OUString aString(SdResId(STR_ASK_DELETE_LAYER));
 
     // replace placeholder
-    aString = aString.replaceFirst("$", rDisplayName);
+    aString = aString.replaceFirst("$", aDisplayName);
 
     std::unique_ptr<weld::MessageDialog> 
xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
                                                    VclMessageType::Question, 
VclButtonsType::YesNo,
                                                    aString));
     if (xQueryBox->run() == RET_YES)
     {
-        const SdrLayer* pLayer = rAdmin.GetLayer(rName);
+        const SdrLayer* pLayer = rAdmin.GetLayer(aName);
         mpDrawView->DeleteLayer( pLayer->GetName() );
 
         /* in order to redraw TabBar and Window; should be initiated later on 
by
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index b207a600ff45..3e8ad0a7c922 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -908,9 +908,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
         if(GetLayerTabControl()) // #i87182#
         {
             sal_uInt16 nCurrentLayer = GetLayerTabControl()->GetCurPageId();
-            const OUString& rName = 
GetLayerTabControl()->GetLayerName(nCurrentLayer);
+            const OUString aName = 
GetLayerTabControl()->GetLayerName(nCurrentLayer);
 
-            if (!IsLayerModeActive() || 
LayerTabBar::IsRealNameOfStandardLayer(rName))
+            if (!IsLayerModeActive() || 
LayerTabBar::IsRealNameOfStandardLayer(aName))
             {
                 rSet.DisableItem(SID_DELETE_LAYER);
                 rSet.DisableItem(SID_RENAMELAYER);
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 622dd2cad93c..a096b31da543 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -1706,10 +1706,10 @@ namespace slideshowhelp
             const SfxUInt16Item* pStartingSlide = 
rReq.GetArg<SfxUInt16Item>(FN_PARAM_1);
             const sal_uInt16 nStartingSlide = pStartingSlide ? 
pStartingSlide->GetValue() - 1 : 0;
             SdPage* pSlide = rDoc.GetSdPage(nStartingSlide, 
PageKind::Standard);
-            const OUString& rStartingSlide = pSlide ? pSlide->GetName() : 
OUString();
+            const OUString aStartingSlide = pSlide ? pSlide->GetName() : 
OUString();
 
             Sequence< PropertyValue > aArguments{ 
comphelper::makePropertyValue(u"FirstPage"_ustr,
-                                                                               
 rStartingSlide) };
+                                                                               
 aStartingSlide) };
             xPresentation->startWithArguments( aArguments );
         }
         sfx2::SfxNotebookBar::UnlockNotebookBar();

Reply via email to