sd/source/ui/dlg/LayerTabBar.cxx                 |    2 +-
 sd/source/ui/dlg/navigatr.cxx                    |    6 +++---
 sd/source/ui/framework/tools/FrameworkHelper.cxx |    4 ++--
 sd/source/ui/inc/DrawController.hxx              |    2 +-
 sd/source/ui/inc/DrawViewShell.hxx               |    2 +-
 sd/source/ui/inc/LayerTabBar.hxx                 |    2 +-
 sd/source/ui/inc/framework/FrameworkHelper.hxx   |    2 +-
 sd/source/ui/inc/navigatr.hxx                    |    2 +-
 sd/source/ui/unoidl/DrawController.cxx           |    2 +-
 sd/source/ui/view/ViewShellManager.cxx           |    4 ++--
 sd/source/ui/view/drviewsk.cxx                   |    2 +-
 11 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit a9395912202940a0b499a19f905177d35963f3b9
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Nov 7 11:52:56 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Nov 7 14:31:36 2024 +0100

    loplugin:passstuffbyref in sd
    
    Change-Id: I95a95b8962bf1d168fee92943c611ce70abf3cce
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176201
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    Tested-by: Jenkins

diff --git a/sd/source/ui/dlg/LayerTabBar.cxx b/sd/source/ui/dlg/LayerTabBar.cxx
index aba77bd9501c..01c0ffc09173 100644
--- a/sd/source/ui/dlg/LayerTabBar.cxx
+++ b/sd/source/ui/dlg/LayerTabBar.cxx
@@ -98,7 +98,7 @@ OUString LayerTabBar::convertToLocalizedName(const OUString& 
rName)
 }
 
 // Use a method name, that is specific to LayerTabBar to make code better 
readable
-OUString LayerTabBar::GetLayerName(sal_uInt16 nPageId) const
+const OUString & LayerTabBar::GetLayerName(sal_uInt16 nPageId) const
 {
     return GetAuxiliaryText(nPageId);
 }
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 6197825b2811..4e8d1c7a290e 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -704,12 +704,12 @@ void SdNavigatorWin::RefreshDocumentLB( const OUString* 
pDocName )
     mxLbDocs->set_active(nPos);
 }
 
-OUString SdNavigatorWin::GetDragTypeSdBmpId(NavigatorDragType eDT)
+const OUString & SdNavigatorWin::GetDragTypeSdBmpId(NavigatorDragType eDT)
 {
     switch( eDT )
     {
         case NAVIGATOR_DRAGTYPE_NONE:
-                return OUString();
+                return EMPTY_OUSTRING;
         case NAVIGATOR_DRAGTYPE_URL:
                 return BMP_HYPERLINK;
         case NAVIGATOR_DRAGTYPE_EMBEDDED:
@@ -718,7 +718,7 @@ OUString 
SdNavigatorWin::GetDragTypeSdBmpId(NavigatorDragType eDT)
                 return BMP_LINK;
         default: OSL_FAIL( "No resource for DragType available!" );
     }
-    return OUString();
+    return EMPTY_OUSTRING;
 }
 
 NavDocInfo* SdNavigatorWin::GetDocInfo()
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx 
b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index d7c7765c4797..16bc1192dcd3 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -446,7 +446,7 @@ ViewShell::ShellType FrameworkHelper::GetViewId (const 
OUString& rsViewURL)
         return ViewShell::ST_NONE;
 }
 
-OUString FrameworkHelper::GetViewURL (ViewShell::ShellType eType)
+const OUString & FrameworkHelper::GetViewURL (ViewShell::ShellType eType)
 {
     switch (eType)
     {
@@ -460,7 +460,7 @@ OUString FrameworkHelper::GetViewURL (ViewShell::ShellType 
eType)
         case ViewShell::ST_SIDEBAR : return msSidebarViewURL;
         case ViewShell::ST_NOTESPANEL: return msNotesPanelViewURL;
         default:
-            return OUString();
+            return EMPTY_OUSTRING;
     }
 }
 
diff --git a/sd/source/ui/inc/DrawController.hxx 
b/sd/source/ui/inc/DrawController.hxx
index bf69b3705274..4dc81feca3af 100644
--- a/sd/source/ui/inc/DrawController.hxx
+++ b/sd/source/ui/inc/DrawController.hxx
@@ -223,7 +223,7 @@ public:
     virtual css::uno::Reference<css::drawing::framework::XModuleController> 
SAL_CALL
         getModuleController() override;
 
-    SD_DLLPUBLIC rtl::Reference<sd::framework::ConfigurationController> 
getConfigurationControllerImpl();
+    SD_DLLPUBLIC const rtl::Reference<sd::framework::ConfigurationController> 
& getConfigurationControllerImpl();
 
 private:
     /** This method must return the name to index table. This table
diff --git a/sd/source/ui/inc/DrawViewShell.hxx 
b/sd/source/ui/inc/DrawViewShell.hxx
index f18d7913294a..da6d64bbf926 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -387,7 +387,7 @@ public:
     //move this method to ViewShell.
     //void  NotifyAccUpdate();
 
-    css::uno::Reference<css::presentation::XSlideShow> getXSlideShowInstance();
+    const css::uno::Reference<css::presentation::XSlideShow> & 
getXSlideShowInstance();
     void destroyXSlideShowInstance();
 
 protected:
diff --git a/sd/source/ui/inc/LayerTabBar.hxx b/sd/source/ui/inc/LayerTabBar.hxx
index c9a49f050b71..56f9e9cc8997 100644
--- a/sd/source/ui/inc/LayerTabBar.hxx
+++ b/sd/source/ui/inc/LayerTabBar.hxx
@@ -68,7 +68,7 @@ public:
     virtual void        SetPageText( sal_uInt16 nPageId, const OUString& rText 
) override;
 
     // Returns the real layer name if exists and empty OUString otherwise.
-    OUString            GetLayerName(sal_uInt16 nPageId) const;
+    const OUString &    GetLayerName(sal_uInt16 nPageId) const;
 
     // Used e.g. in DeleteActualLayer() to test whether deleting is allowed.
     static bool IsRealNameOfStandardLayer(std::u16string_view rName);
diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx 
b/sd/source/ui/inc/framework/FrameworkHelper.hxx
index 1dc36f552ef1..4bc3123356e5 100644
--- a/sd/source/ui/inc/framework/FrameworkHelper.hxx
+++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx
@@ -121,7 +121,7 @@ public:
     /** Return a view URL for the given identifier.  See GetViewId() for a
         mapping in the opposite direction.
     */
-    static OUString GetViewURL (ViewShell::ShellType eType);
+    static const OUString & GetViewURL (ViewShell::ShellType eType);
 
     /** Return a ViewShell pointer for the given XView reference.  This
         assumes that the given reference is implemented by the
diff --git a/sd/source/ui/inc/navigatr.hxx b/sd/source/ui/inc/navigatr.hxx
index 9c2b990511c0..1e3657616167 100644
--- a/sd/source/ui/inc/navigatr.hxx
+++ b/sd/source/ui/inc/navigatr.hxx
@@ -152,7 +152,7 @@ private:
     */
     //    bool                        mbShowAllShapes;
 
-    static OUString             GetDragTypeSdBmpId(NavigatorDragType eDT);
+    static const OUString &     GetDragTypeSdBmpId(NavigatorDragType eDT);
     NavDocInfo*                 GetDocInfo();
 
                                 DECL_DLLPRIVATE_LINK( SelectToolboxHdl, const 
OUString&, void );
diff --git a/sd/source/ui/unoidl/DrawController.cxx 
b/sd/source/ui/unoidl/DrawController.cxx
index d35578616777..24232a6967a5 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -561,7 +561,7 @@ Reference<XConfigurationController> SAL_CALL
     return mxConfigurationController;
 }
 
-rtl::Reference<sd::framework::ConfigurationController>
+const rtl::Reference<sd::framework::ConfigurationController> &
     DrawController::getConfigurationControllerImpl()
 {
     ThrowIfDisposed();
diff --git a/sd/source/ui/view/ViewShellManager.cxx 
b/sd/source/ui/view/ViewShellManager.cxx
index e5cbd13770af..5c733d6a2b02 100644
--- a/sd/source/ui/view/ViewShellManager.cxx
+++ b/sd/source/ui/view/ViewShellManager.cxx
@@ -115,7 +115,7 @@ public:
     void DeactivateSubShell (const SfxShell& rParentShell, ShellId nId);
     void RemoveOverridingMainShell();
     void SetOverridingShell(const std::shared_ptr<ViewShell>& pViewShell);
-    std::shared_ptr<ViewShell> GetOverridingShell();
+    const std::shared_ptr<ViewShell> & GetOverridingShell();
     void MoveToTop (const SfxShell& rParentShell);
     SfxShell* GetShell (ShellId nId) const;
     SfxShell* GetTopShell() const;
@@ -594,7 +594,7 @@ void ViewShellManager::Implementation::DeactivateSubShell (
     DestroySubShell(aDescriptor);
 }
 
-std::shared_ptr<ViewShell> 
ViewShellManager::Implementation::GetOverridingShell()
+const std::shared_ptr<ViewShell> & 
ViewShellManager::Implementation::GetOverridingShell()
 {
     return mpOverridingShell;
 }
diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx
index cb40d8398f04..9f0f171abda0 100644
--- a/sd/source/ui/view/drviewsk.cxx
+++ b/sd/source/ui/view/drviewsk.cxx
@@ -82,7 +82,7 @@ void DrawViewShell::destroyXSlideShowInstance()
     mxSlideShow.clear();
 }
 
-uno::Reference<presentation::XSlideShow> DrawViewShell::getXSlideShowInstance()
+const uno::Reference<presentation::XSlideShow> & 
DrawViewShell::getXSlideShowInstance()
 {
     if (!mxSlideShow.is())
     {

Reply via email to