diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-18 12:28:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-08-18 18:19:09 +0200 |
commit | 4dbe4a9313d9844c10f71b29a77218d31bc6f3b3 (patch) | |
tree | caf0ca4ceb3cbbb2aaf1255cebbcb8b38d6d45c5 /include | |
parent | 9e1aee666fa48b768c829bbc707f47a98250df1e (diff) |
loplugin:passstuffbyref
Change-Id: I4f01eb3842ef198f02af274f54afb2760c820a4b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120655
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/framework/dispatchhelper.hxx | 7 | ||||
-rw-r--r-- | include/oox/export/DMLPresetShapeExport.hxx | 7 | ||||
-rw-r--r-- | include/sfx2/docfile.hxx | 2 | ||||
-rw-r--r-- | include/sfx2/sidebar/Panel.hxx | 2 | ||||
-rw-r--r-- | include/svx/svdobj.hxx | 2 | ||||
-rw-r--r-- | include/tools/wldcrd.hxx | 2 | ||||
-rw-r--r-- | include/unotools/localedatawrapper.hxx | 4 | ||||
-rw-r--r-- | include/unotools/moduleoptions.hxx | 2 | ||||
-rw-r--r-- | include/vcl/graphicfilter.hxx | 4 | ||||
-rw-r--r-- | include/vcl/menubarupdateicon.hxx | 4 | ||||
-rw-r--r-- | include/vcl/test/GraphicsRenderTests.hxx | 6 |
11 files changed, 22 insertions, 20 deletions
diff --git a/include/framework/dispatchhelper.hxx b/include/framework/dispatchhelper.hxx index ca7e2b2ccf12..7c89a2d79aac 100644 --- a/include/framework/dispatchhelper.hxx +++ b/include/framework/dispatchhelper.hxx @@ -93,9 +93,10 @@ public: // not a public XDispatchHelper-method, need in sfx2/source/control/statcach.cxx for extensions /// @throws css::uno::RuntimeException - css::uno::Any executeDispatch(const css::uno::Reference<css::frame::XDispatch>& xDispatch, - const css::util::URL& aURL, bool SyncronFlag, - const css::uno::Sequence<css::beans::PropertyValue>& lArguments); + const css::uno::Any& + executeDispatch(const css::uno::Reference<css::frame::XDispatch>& xDispatch, + const css::util::URL& aURL, bool SyncronFlag, + const css::uno::Sequence<css::beans::PropertyValue>& lArguments); // XDispatchResultListener virtual void SAL_CALL dispatchFinished(const css::frame::DispatchResultEvent& aResult) override; diff --git a/include/oox/export/DMLPresetShapeExport.hxx b/include/oox/export/DMLPresetShapeExport.hxx index 1baf1d44cabc..37cd1c3743b2 100644 --- a/include/oox/export/DMLPresetShapeExport.hxx +++ b/include/oox/export/DMLPresetShapeExport.hxx @@ -104,11 +104,12 @@ private: bool IsYFlipped() { return m_bIsFlipped.second; }; // Returns with the shape type, like triangle for example - OUString GetShapeType(); + const OUString& GetShapeType(); // Returns with the handle points - css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>> GetHandleValues(); + const css::uno::Sequence<css::uno::Sequence<css::beans::PropertyValue>>& GetHandleValues(); // Returns with the adjustment values - css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue> GetAdjustmentValues(); + const css::uno::Sequence<css::drawing::EnhancedCustomShapeAdjustmentValue>& + GetAdjustmentValues(); // Returns with the raw value of the given property of the shape geometry. css::uno::Any GetHandleValueOfModificationPoint(sal_Int32 nPoint, std::u16string_view sType); // Returns with the appropriate value of the handle point. diff --git a/include/sfx2/docfile.hxx b/include/sfx2/docfile.hxx index 83bcb91c5812..55b31202bcab 100644 --- a/include/sfx2/docfile.hxx +++ b/include/sfx2/docfile.hxx @@ -101,7 +101,7 @@ public: void AddToCheckEditableWorkerList(); void SetWorkerReloadEvent(ImplSVEvent* pEvent); ImplSVEvent* GetWorkerReloadEvent() const; - std::shared_ptr<std::recursive_mutex> GetCheckEditableMutex() const; + const std::shared_ptr<std::recursive_mutex>& GetCheckEditableMutex() const; void CancelCheckEditableEntry(bool bRemoveEvent = true); void UseInteractionHandler( bool ); diff --git a/include/sfx2/sidebar/Panel.hxx b/include/sfx2/sidebar/Panel.hxx index 485063f2152d..7ea94a49960a 100644 --- a/include/sfx2/sidebar/Panel.hxx +++ b/include/sfx2/sidebar/Panel.hxx @@ -69,7 +69,7 @@ public: { return mxPanelComponent; } - css::uno::Reference<css::awt::XWindow> GetElementParentWindow(); + const css::uno::Reference<css::awt::XWindow>& GetElementParentWindow(); css::uno::Reference<css::awt::XWindow> GetElementWindow(); void SetExpanded(const bool bIsExpanded); bool IsExpanded() const { return mbIsExpanded; } diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx index 5a4460dd9ddd..760f53f3a019 100644 --- a/include/svx/svdobj.hxx +++ b/include/svx/svdobj.hxx @@ -869,7 +869,7 @@ public: // If fillstyle is drawing::FillStyle_BITMAP, returns the graphic. const Graphic* getFillGraphic() const; - OUString getHyperlink() const { return msHyperlink; } + const OUString& getHyperlink() const { return msHyperlink; } void setHyperlink(const OUString& sHyperlink) { msHyperlink = sHyperlink; } protected: diff --git a/include/tools/wldcrd.hxx b/include/tools/wldcrd.hxx index b50bbcd11fc9..dfb1e9d87bc3 100644 --- a/include/tools/wldcrd.hxx +++ b/include/tools/wldcrd.hxx @@ -48,7 +48,7 @@ public: { } - OUString getGlob() const + const OUString & getGlob() const { return aWildString; } diff --git a/include/unotools/localedatawrapper.hxx b/include/unotools/localedatawrapper.hxx index 94cc9be3425a..7584055e1751 100644 --- a/include/unotools/localedatawrapper.hxx +++ b/include/unotools/localedatawrapper.hxx @@ -158,7 +158,7 @@ public: css::uno::Sequence< css::i18n::FormatElement > getAllFormats() const; css::i18n::ForbiddenCharacters getForbiddenCharacters() const; const css::uno::Sequence< css::lang::Locale > & getAllInstalledLocaleNames() const; - css::uno::Sequence< OUString > getDateAcceptancePatterns() const; + const css::uno::Sequence< OUString > & getDateAcceptancePatterns() const; /// same as the wrapper implementation but static @@ -199,7 +199,7 @@ public: Indian grouping. The sal_Int32* getConstArray() can be passed directly to the ::rtl::math::doubleToString() methods as argument for the pGroups parameter. */ - css::uno::Sequence< sal_Int32 > getDigitGrouping() const; + const css::uno::Sequence< sal_Int32 >& getDigitGrouping() const; // Functionality of class International methods, LocaleItem diff --git a/include/unotools/moduleoptions.hxx b/include/unotools/moduleoptions.hxx index 1324e4d06e18..b5051fb1ecf7 100644 --- a/include/unotools/moduleoptions.hxx +++ b/include/unotools/moduleoptions.hxx @@ -92,7 +92,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtModuleOptions final : public utl::de bool IsModuleInstalled ( EModule eModule ) const; OUString GetModuleName ( EModule eModule ) const; - OUString GetFactoryName ( EFactory eFactory ) const; + const OUString & GetFactoryName ( EFactory eFactory ) const; OUString GetFactoryStandardTemplate( EFactory eFactory ) const; OUString GetFactoryEmptyDocumentURL( EFactory eFactory ) const; OUString GetFactoryDefaultFilter ( EFactory eFactory ) const; diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index 833007e28088..17e1b9e3a07f 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -232,13 +232,13 @@ public: * Returns the logic size, according to the map mode available via GetPreferredMapMode(). Prefer * this size over GetSize_100TH_MM(). */ - std::optional<Size> GetPreferredLogSize() const { return maPreferredLogSize; } + const std::optional<Size>& GetPreferredLogSize() const { return maPreferredLogSize; } /** * If available, this returns the map mode the graphic prefers, which may be other than pixel or * 100th mm. Prefer this map mode over just assuming MapUnit::Map100thMM. */ - std::optional<MapMode> GetPreferredMapMode() const { return maPreferredMapMode; } + const std::optional<MapMode>& GetPreferredMapMode() const { return maPreferredMapMode; } /** @return bits/pixel or 0 **/ sal_uInt16 GetBitsPerPixel() const { return nBitsPerPixel; } diff --git a/include/vcl/menubarupdateicon.hxx b/include/vcl/menubarupdateicon.hxx index 7aacad52d3ec..b8e2b717a3dd 100644 --- a/include/vcl/menubarupdateicon.hxx +++ b/include/vcl/menubarupdateicon.hxx @@ -77,8 +77,8 @@ public: bool GetShowMenuIcon() const { return mbShowMenuIcon; } bool GetShowBubble() const { return mbShowBubble; } - OUString GetBubbleTitle() const { return maBubbleTitle; } - OUString GetBubbleText() const { return maBubbleText; } + const OUString& GetBubbleTitle() const { return maBubbleTitle; } + const OUString& GetBubbleText() const { return maBubbleText; } void RemoveBubbleWindow(bool bRemoveIcon); diff --git a/include/vcl/test/GraphicsRenderTests.hxx b/include/vcl/test/GraphicsRenderTests.hxx index 7aaca9c5874d..b311aeecebae 100644 --- a/include/vcl/test/GraphicsRenderTests.hxx +++ b/include/vcl/test/GraphicsRenderTests.hxx @@ -32,9 +32,9 @@ public: , m_aResultantBitmap(atestBitmap) { } - OUString getTestName() { return m_aTestName; } - OUString getStatus() { return m_aTestStatus; } - Bitmap getBitmap() { return m_aResultantBitmap; } + const OUString& getTestName() { return m_aTestName; } + const OUString& getStatus() { return m_aTestStatus; } + const Bitmap& getBitmap() { return m_aResultantBitmap; } }; class VCL_PLUGIN_PUBLIC GraphicsRenderTests |