diff options
58 files changed, 92 insertions, 87 deletions
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index f7c251055e18..a4fddee5f4dc 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -107,9 +107,10 @@ void SvxPostItDialog::ShowLastAuthor(std::u16string_view rAuthor, std::u16string m_xLastEditFT->set_label( sTxt ); } -WhichRangesContainer SvxPostItDialog::GetRanges() +const WhichRangesContainer & SvxPostItDialog::GetRanges() { - return WhichRangesContainer(svl::Items<SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_TEXT>); + static const auto gRanges = WhichRangesContainer(svl::Items<SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_TEXT>); + return gRanges; } void SvxPostItDialog::EnableTravel(bool bNext, bool bPrev) diff --git a/cui/source/inc/TextColumnsPage.hxx b/cui/source/inc/TextColumnsPage.hxx index af45c23c93ca..0aa6e2c9e800 100644 --- a/cui/source/inc/TextColumnsPage.hxx +++ b/cui/source/inc/TextColumnsPage.hxx @@ -31,7 +31,7 @@ public: static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*); - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer& GetRanges() { return pRanges; } virtual bool FillItemSet(SfxItemSet*) override; virtual void Reset(const SfxItemSet*) override; diff --git a/cui/source/inc/align.hxx b/cui/source/inc/align.hxx index a1761607cfd8..0154e8ab19da 100644 --- a/cui/source/inc/align.hxx +++ b/cui/source/inc/align.hxx @@ -58,7 +58,7 @@ public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet ); explicit AlignmentTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreSet); - static WhichRangesContainer GetRanges() { return s_pRanges; } + static const WhichRangesContainer & GetRanges() { return s_pRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; diff --git a/cui/source/inc/backgrnd.hxx b/cui/source/inc/backgrnd.hxx index 3d50d69e95f4..af23e6f0a198 100644 --- a/cui/source/inc/backgrnd.hxx +++ b/cui/source/inc/backgrnd.hxx @@ -58,7 +58,7 @@ public: virtual ~SvxBkgTabPage() override; // returns the area of the which-values - static WhichRangesContainer GetRanges() { return pBkgRanges; } + static const WhichRangesContainer & GetRanges() { return pBkgRanges; } static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); virtual bool FillItemSet( SfxItemSet* ) override; diff --git a/cui/source/inc/border.hxx b/cui/source/inc/border.hxx index accb555930dc..67efd02ea178 100644 --- a/cui/source/inc/border.hxx +++ b/cui/source/inc/border.hxx @@ -83,7 +83,7 @@ public: virtual ~SvxBorderTabPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet); - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } virtual bool FillItemSet( SfxItemSet* rCoreAttrs ) override; virtual void Reset( const SfxItemSet* ) override; diff --git a/cui/source/inc/chardlg.hxx b/cui/source/inc/chardlg.hxx index b484c7419b83..03567a7f5ba4 100644 --- a/cui/source/inc/chardlg.hxx +++ b/cui/source/inc/chardlg.hxx @@ -143,7 +143,7 @@ public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); virtual ~SvxCharNamePage() override; - static WhichRangesContainer GetRanges() { return pNameRanges; } + static const WhichRangesContainer & GetRanges() { return pNameRanges; } virtual void Reset( const SfxItemSet* rSet ) override; virtual bool FillItemSet( SfxItemSet* rSet ) override; @@ -222,7 +222,7 @@ public: virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; public: - static WhichRangesContainer GetRanges() { return pEffectsRanges; } + static const WhichRangesContainer & GetRanges() { return pEffectsRanges; } virtual void Reset( const SfxItemSet* rSet ) override; virtual bool FillItemSet( SfxItemSet* rSet ) override; @@ -292,7 +292,7 @@ public: virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; public: - static WhichRangesContainer GetRanges() { return pPositionRanges; } + static const WhichRangesContainer & GetRanges() { return pPositionRanges; } virtual void Reset( const SfxItemSet* rSet ) override; virtual bool FillItemSet( SfxItemSet* rSet ) override; @@ -331,7 +331,7 @@ public: virtual void ActivatePage( const SfxItemSet& rSet ) override; virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override; - static WhichRangesContainer GetRanges() { return pTwoLinesRanges; } + static const WhichRangesContainer & GetRanges() { return pTwoLinesRanges; } virtual void Reset( const SfxItemSet* rSet ) override; virtual bool FillItemSet( SfxItemSet* rSet ) override; diff --git a/cui/source/inc/connect.hxx b/cui/source/inc/connect.hxx index 73891d0ff8e6..103e83c071e8 100644 --- a/cui/source/inc/connect.hxx +++ b/cui/source/inc/connect.hxx @@ -63,7 +63,7 @@ public: virtual ~SvxConnectionPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx index 3e810c5b0dbe..f0f5bdc28a5b 100644 --- a/cui/source/inc/cuitabarea.hxx +++ b/cui/source/inc/cuitabarea.hxx @@ -195,7 +195,7 @@ public: virtual ~SvxTransparenceTabPage() override; static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*); - static WhichRangesContainer GetRanges() { return pTransparenceRanges; } + static const WhichRangesContainer & GetRanges() { return pTransparenceRanges; } virtual bool FillItemSet(SfxItemSet*) override; virtual void Reset(const SfxItemSet*) override; @@ -275,7 +275,7 @@ public: static std::unique_ptr<SfxTabPage> CreateWithSlideBackground(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*); - static WhichRangesContainer GetRanges() { return pAreaRanges; } + static const WhichRangesContainer & GetRanges() { return pAreaRanges; } virtual OUString GetAllStrings() override; @@ -337,7 +337,7 @@ public: virtual ~SvxShadowTabPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pShadowRanges; } + static const WhichRangesContainer & GetRanges() { return pShadowRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; diff --git a/cui/source/inc/cuitabline.hxx b/cui/source/inc/cuitabline.hxx index 5cd3b0fdb044..ce2a9c4887c8 100644 --- a/cui/source/inc/cuitabline.hxx +++ b/cui/source/inc/cuitabline.hxx @@ -206,7 +206,7 @@ public: void Construct(); static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pLineRanges; } + static const WhichRangesContainer & GetRanges() { return pLineRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet* ) override; diff --git a/cui/source/inc/labdlg.hxx b/cui/source/inc/labdlg.hxx index 5d7f778d5c38..b04c2a2b6d05 100644 --- a/cui/source/inc/labdlg.hxx +++ b/cui/source/inc/labdlg.hxx @@ -81,7 +81,7 @@ public: virtual ~SvxCaptionTabPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pCaptionRanges; } + static const WhichRangesContainer & GetRanges() { return pCaptionRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx index 1d9f2230f048..b40555bb76b9 100644 --- a/cui/source/inc/macropg.hxx +++ b/cui/source/inc/macropg.hxx @@ -92,7 +92,7 @@ public: // class SvxMacroAssignDlg -------------------------------------------------- -typedef WhichRangesContainer (*GetTabPageRanges)(); // gives international Which-values +typedef const WhichRangesContainer & (*GetTabPageRanges)(); // gives international Which-values class SvxMacroAssignSingleTabDialog : public SfxSingleTabDialogController { diff --git a/cui/source/inc/measure.hxx b/cui/source/inc/measure.hxx index 7e18c6485556..c30e83ee1ed4 100644 --- a/cui/source/inc/measure.hxx +++ b/cui/source/inc/measure.hxx @@ -70,7 +70,7 @@ public: virtual ~SvxMeasurePage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; diff --git a/cui/source/inc/numfmt.hxx b/cui/source/inc/numfmt.hxx index 13f1a88e9eab..2df21ef094bd 100644 --- a/cui/source/inc/numfmt.hxx +++ b/cui/source/inc/numfmt.hxx @@ -64,7 +64,7 @@ public: const SfxItemSet* rAttrSet ); virtual ~SvxNumberFormatTabPage() override; // Returns area information. - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; diff --git a/cui/source/inc/optasian.hxx b/cui/source/inc/optasian.hxx index 31a622f7a50d..26d8b1bfe604 100644 --- a/cui/source/inc/optasian.hxx +++ b/cui/source/inc/optasian.hxx @@ -52,7 +52,7 @@ public: static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet); - static WhichRangesContainer GetRanges(); + static const WhichRangesContainer& GetRanges(); virtual OUString GetAllStrings() override; diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index 151569ac4634..81acdd58a7c8 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -172,7 +172,7 @@ public: virtual ~SvxPageDescPage() override; // returns the range of the Which values - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } virtual bool FillItemSet( SfxItemSet* rOutSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; diff --git a/cui/source/inc/paragrph.hxx b/cui/source/inc/paragrph.hxx index e219aa622e07..3a1ef5d455ad 100644 --- a/cui/source/inc/paragrph.hxx +++ b/cui/source/inc/paragrph.hxx @@ -102,7 +102,7 @@ public: DECL_LINK(ELRLoseFocusHdl, weld::MetricSpinButton&, void); - static WhichRangesContainer GetRanges() { return pStdRanges; } + static const WhichRangesContainer & GetRanges() { return pStdRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; @@ -165,8 +165,8 @@ public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); virtual ~SvxParaAlignTabPage() override; - static WhichRangesContainer GetRanges() { return pAlignRanges; } - static WhichRangesContainer GetSdrRanges() { return pSdrAlignRanges; } + static const WhichRangesContainer & GetRanges() { return pAlignRanges; } + static const WhichRangesContainer & GetSdrRanges() { return pSdrAlignRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; @@ -201,7 +201,7 @@ public: const SfxItemSet* rSet ); virtual ~SvxExtParagraphTabPage() override; - static WhichRangesContainer GetRanges() { return pExtRanges; } + static const WhichRangesContainer & GetRanges() { return pExtRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; @@ -315,7 +315,7 @@ public: static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet); virtual ~SvxAsianTabPage() override; - static WhichRangesContainer GetRanges(); + static const WhichRangesContainer & GetRanges(); virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; diff --git a/cui/source/inc/postdlg.hxx b/cui/source/inc/postdlg.hxx index 66fd07af6255..5c6da9c75abb 100644 --- a/cui/source/inc/postdlg.hxx +++ b/cui/source/inc/postdlg.hxx @@ -44,7 +44,7 @@ public: bool bPrevNext); virtual ~SvxPostItDialog() override; - static WhichRangesContainer GetRanges(); + static const WhichRangesContainer & GetRanges(); const SfxItemSet* GetOutputItemSet() const { return m_xOutSet.get(); } void SetPrevHdl( const Link<SvxPostItDialog&,void>& rLink ) diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx index 037cede29326..782d892a65a4 100644 --- a/cui/source/inc/swpossizetabpage.hxx +++ b/cui/source/inc/swpossizetabpage.hxx @@ -120,7 +120,7 @@ public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); virtual ~SvxSwPosSizeTabPage() override; - static WhichRangesContainer GetRanges(); + static const WhichRangesContainer & GetRanges(); virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; diff --git a/cui/source/inc/tabstpge.hxx b/cui/source/inc/tabstpge.hxx index 207b8b70503d..189e9a579373 100644 --- a/cui/source/inc/tabstpge.hxx +++ b/cui/source/inc/tabstpge.hxx @@ -65,7 +65,7 @@ public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); virtual ~SvxTabulatorTabPage() override; - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; diff --git a/cui/source/inc/textanim.hxx b/cui/source/inc/textanim.hxx index 010d3954716c..02a75bab849a 100644 --- a/cui/source/inc/textanim.hxx +++ b/cui/source/inc/textanim.hxx @@ -80,7 +80,7 @@ public: virtual ~SvxTextAnimationPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; diff --git a/cui/source/inc/textattr.hxx b/cui/source/inc/textattr.hxx index a6a7f2bd6f46..cf828cfa6a5e 100644 --- a/cui/source/inc/textattr.hxx +++ b/cui/source/inc/textattr.hxx @@ -77,7 +77,7 @@ public: virtual ~SvxTextAttrPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; diff --git a/cui/source/inc/transfrm.hxx b/cui/source/inc/transfrm.hxx index 78ffd84e2794..25464e9a0bc5 100644 --- a/cui/source/inc/transfrm.hxx +++ b/cui/source/inc/transfrm.hxx @@ -139,7 +139,7 @@ public: virtual ~SvxPositionSizeTabPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pPosSizeRanges; } + static const WhichRangesContainer & GetRanges() { return pPosSizeRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; @@ -195,7 +195,7 @@ public: virtual ~SvxAngleTabPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pAngleRanges; } + static const WhichRangesContainer & GetRanges() { return pAngleRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; @@ -239,7 +239,7 @@ public: virtual ~SvxSlantTabPage() override; static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* ); - static WhichRangesContainer GetRanges() { return pSlantRanges; } + static const WhichRangesContainer & GetRanges() { return pSlantRanges; } virtual bool FillItemSet( SfxItemSet* ) override; virtual void Reset( const SfxItemSet * ) override; diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 66f7f9818851..c7d219993ae1 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -400,10 +400,11 @@ IMPL_LINK(SvxAsianLayoutPage, ModifyHdl, weld::Entry&, rEdit, void) pImpl->aConfig.SetStartEndChars( aLocale, bEnable ? &sStart : nullptr, bEnable ? &sEnd : nullptr); } -WhichRangesContainer SvxAsianLayoutPage::GetRanges() +const WhichRangesContainer & SvxAsianLayoutPage::GetRanges() { //no items are used - return WhichRangesContainer(); + static const WhichRangesContainer gEmpty; + return gEmpty; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 56b697a046a6..33c3005eebaa 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -2648,9 +2648,10 @@ std::unique_ptr<SfxTabPage> SvxAsianTabPage::Create(weld::Container* pPage, weld return std::make_unique<SvxAsianTabPage>(pPage, pController, *rSet); } -WhichRangesContainer SvxAsianTabPage::GetRanges() +const WhichRangesContainer & SvxAsianTabPage::GetRanges() { - return WhichRangesContainer(svl::Items<SID_ATTR_PARA_SCRIPTSPACE, SID_ATTR_PARA_FORBIDDEN_RULES>); + static const auto gRanges = WhichRangesContainer(svl::Items<SID_ATTR_PARA_SCRIPTSPACE, SID_ATTR_PARA_FORBIDDEN_RULES>); + return gRanges; } bool SvxAsianTabPage::FillItemSet( SfxItemSet* rSet ) diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 6789caaf477f..d84fb7131a91 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -743,7 +743,7 @@ std::unique_ptr<SfxTabPage> SvxSwPosSizeTabPage::Create(weld::Container* pPage, return std::make_unique<SvxSwPosSizeTabPage>(pPage, pController, *rSet); } -WhichRangesContainer SvxSwPosSizeTabPage::GetRanges() +const WhichRangesContainer & SvxSwPosSizeTabPage::GetRanges() { static const WhichRangesContainer ranges(svl::Items< SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y, diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index 0a7f653b0180..4f7cd0f29c8f 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -82,7 +82,7 @@ public: SfxBindings& GetBindings() const { return *m_pBindings; } }; -typedef WhichRangesContainer (*GetTabPageRanges)(); // provides international Which values +typedef const WhichRangesContainer & (*GetTabPageRanges)(); // provides international Which values class SFX2_DLLPUBLIC SfxOkDialogController : public SfxDialogController { diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx index 828054bc562d..336fe80c11dd 100644 --- a/include/sfx2/tabdlg.hxx +++ b/include/sfx2/tabdlg.hxx @@ -37,7 +37,7 @@ class SfxTabPage; typedef std::unique_ptr<SfxTabPage> (*CreateTabPage)(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rAttrSet); -typedef WhichRangesContainer (*GetTabPageRanges)(); // provides international Which-value +typedef const WhichRangesContainer & (*GetTabPageRanges)(); // provides international Which-value struct TabPageImpl; struct TabDlg_Impl; diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx index 5882a7c465b7..5dd053f5a227 100644 --- a/include/svx/PaletteManager.hxx +++ b/include/svx/PaletteManager.hxx @@ -68,7 +68,7 @@ public: sal_Int32 GetPalette() const; sal_Int32 GetPaletteCount() const { return mnNumOfPalettes; } OUString GetPaletteName(); - OUString GetSelectedPalettePath(); + const OUString & GetSelectedPalettePath(); tools::Long GetColorCount() const; tools::Long GetRecentColorCount() const; diff --git a/include/svx/annotation/Annotation.hxx b/include/svx/annotation/Annotation.hxx index ba2021a70ec6..3e442dc90d73 100644 --- a/include/svx/annotation/Annotation.hxx +++ b/include/svx/annotation/Annotation.hxx @@ -135,19 +135,19 @@ public: } // Changes without triggering notification broadcast - css::geometry::RealPoint2D GetPosition() const { return m_Position; } + const css::geometry::RealPoint2D& GetPosition() const { return m_Position; } void SetPosition(const css::geometry::RealPoint2D& rValue) { m_Position = rValue; } - css::geometry::RealSize2D GetSize() const { return m_Size; } + const css::geometry::RealSize2D& GetSize() const { return m_Size; } void SetSize(const css::geometry::RealSize2D& rValue) { m_Size = rValue; } - OUString GetAuthor() const { return m_Author; } + const OUString& GetAuthor() const { return m_Author; } void SetAuthor(const OUString& rValue) { m_Author = rValue; } - OUString GetInitials() const { return m_Initials; } + const OUString& GetInitials() const { return m_Initials; } void SetInitials(const OUString& rValue) { m_Initials = rValue; } - css::util::DateTime GetDateTime() const { return m_DateTime; } + const css::util::DateTime& GetDateTime() const { return m_DateTime; } void SetDateTime(const css::util::DateTime& rValue) { m_DateTime = rValue; } virtual css::uno::Reference<css::text::XText> SAL_CALL getTextRange() override; @@ -160,7 +160,7 @@ public: OUString GetText(); void SetText(OUString const& rText); - rtl::Reference<sdr::annotation::TextApiObject> getTextApiObject() { return m_TextRange; } + const rtl::Reference<sdr::annotation::TextApiObject>& getTextApiObject() { return m_TextRange; } SdrModel* GetModel() const; SdrPage const* getPage() const { return mpPage; } diff --git a/include/svx/colorbox.hxx b/include/svx/colorbox.hxx index fe134531d39a..04d1c740f2ff 100644 --- a/include/svx/colorbox.hxx +++ b/include/svx/colorbox.hxx @@ -63,7 +63,7 @@ public: void SetSlotId(sal_uInt16 nSlotId, bool bShowNoneButton = false); Color const& GetSelectEntryColor() const { return m_aSelectedColor.m_aColor; } - NamedColor GetSelectedEntry() const { return m_aSelectedColor; } + const NamedColor& GetSelectedEntry() const { return m_aSelectedColor; } const NamedColor& GetSelectedEntryThemedColor() const { return m_aSelectedColor; } void SelectEntry(const NamedColor& rColor); diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx index 6890e23fc78b..091137eed358 100644 --- a/include/svx/hdft.hxx +++ b/include/svx/hdft.hxx @@ -97,7 +97,7 @@ class SVX_DLLPUBLIC SvxHeaderPage final : public SvxHFPage public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); // returns the Which values to the range - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } SVX_DLLPRIVATE SvxHeaderPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); }; @@ -105,7 +105,7 @@ class SVX_DLLPUBLIC SvxFooterPage final : public SvxHFPage { public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); - static WhichRangesContainer GetRanges() { return pRanges; } + static const WhichRangesContainer & GetRanges() { return pRanges; } SVX_DLLPRIVATE SvxFooterPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); }; diff --git a/include/svx/numvset.hxx b/include/svx/numvset.hxx index 7b96ffa6ee01..d54ad8f17a19 100644 --- a/include/svx/numvset.hxx +++ b/include/svx/numvset.hxx @@ -86,7 +86,7 @@ public: css::uno::Reference<css::text::XNumberingFormatter> const & xFormatter, const css::lang::Locale& rLocale); - std::vector<std::pair<OUString, OUString>> GetCustomBullets() { return maCustomBullets; } + const std::vector<std::pair<OUString, OUString>> & GetCustomBullets() { return maCustomBullets; } void SetCustomBullets(const std::vector<std::pair<OUString, OUString>>& rCustomBullets); virtual FactoryFunction GetUITestFactory() const override; diff --git a/include/svx/svdoole2.hxx b/include/svx/svdoole2.hxx index 1f89c237c1e8..aa56e05f3e0c 100644 --- a/include/svx/svdoole2.hxx +++ b/include/svx/svdoole2.hxx @@ -172,7 +172,7 @@ public: void SetGraphicToObj( const css::uno::Reference< css::io::XInputStream >& xGrStream, const OUString& aMediaType ); - css::uno::Reference< css::frame::XModel > GetParentXModel() const; + const css::uno::Reference< css::frame::XModel > & GetParentXModel() const; bool CalculateNewScaling( Fraction& aScaleWidth, Fraction& aScaleHeight, Size& aObjAreaSize ); bool AddOwnLightClient(); diff --git a/include/svx/svdotable.hxx b/include/svx/svdotable.hxx index e22ef60a48b7..54688c17e499 100644 --- a/include/svx/svdotable.hxx +++ b/include/svx/svdotable.hxx @@ -118,7 +118,7 @@ public: css::uno::Reference< css::table::XTable > getTable() const; /// Get the concrete UNO class for the table - rtl::Reference< sdr::table::TableModel > getUnoTable() const; + const rtl::Reference< sdr::table::TableModel > & getUnoTable() const; bool isValid( const sdr::table::CellPos& rPos ) const; static CellPos getFirstCell(); diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index b92adec13b3d..a2ef0c03a47e 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -55,7 +55,7 @@ class SdrObject; class SvxSpellWrapper; struct FmSearchContext; -typedef WhichRangesContainer (*DialogGetRanges)(); +typedef const WhichRangesContainer & (*DialogGetRanges)(); typedef ::std::vector< OUString > TargetList; diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx index 37d751523469..4a613f344b12 100644 --- a/sc/source/ui/inc/tabpages.hxx +++ b/sc/source/ui/inc/tabpages.hxx @@ -30,7 +30,7 @@ public: const SfxItemSet* rAttrSet); virtual ~ScTabPageProtection() override; - static WhichRangesContainer GetRanges () { return pProtectionRanges; } + static const WhichRangesContainer & GetRanges () { return pProtectionRanges; } virtual bool FillItemSet ( SfxItemSet* rCoreAttrs ) override; virtual void Reset ( const SfxItemSet* ) override; diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx index 9af97f6d7080..f5e46ded1478 100644 --- a/sc/source/ui/inc/tphf.hxx +++ b/sc/source/ui/inc/tphf.hxx @@ -56,7 +56,7 @@ class ScHeaderPage : public ScHFPage public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); ScHeaderPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); - static WhichRangesContainer GetRanges(); + static const WhichRangesContainer & GetRanges(); }; class ScFooterPage : public ScHFPage @@ -64,7 +64,7 @@ class ScFooterPage : public ScHFPage public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); ScFooterPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); - static WhichRangesContainer GetRanges(); + static const WhichRangesContainer & GetRanges(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx index e843f769cb42..9e98c050a20e 100644 --- a/sc/source/ui/inc/tptable.hxx +++ b/sc/source/ui/inc/tptable.hxx @@ -29,7 +29,7 @@ public: static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rCoreSet); virtual ~ScTablePage() override; - static WhichRangesContainer GetRanges () { return pPageTableRanges; } + static const WhichRangesContainer & GetRanges () { return pPageTableRanges; } virtual bool FillItemSet ( SfxItemSet* rCoreSet ) override; virtual void Reset ( const SfxItemSet* rCoreSet ) override; virtual DeactivateRC DeactivatePage ( SfxItemSet* pSet ) override; diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index dfd8868e3397..b6421f2b948e 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -238,7 +238,7 @@ std::unique_ptr<SfxTabPage> ScHeaderPage::Create(weld::Container* pPage, weld::D return std::make_unique<ScHeaderPage>(pPage, pController, *rCoreSet); } -WhichRangesContainer ScHeaderPage::GetRanges() +const WhichRangesContainer & ScHeaderPage::GetRanges() { return SvxHeaderPage::GetRanges(); } @@ -254,7 +254,7 @@ std::unique_ptr<SfxTabPage> ScFooterPage::Create(weld::Container* pPage, weld::D return std::make_unique<ScFooterPage>(pPage, pController, *rCoreSet); } -WhichRangesContainer ScFooterPage::GetRanges() +const WhichRangesContainer & ScFooterPage::GetRanges() { return SvxHeaderPage::GetRanges(); } diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index 6a514cf2f937..a41e3c99d56f 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -37,7 +37,7 @@ public: SdParagraphNumTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet); static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); - static WhichRangesContainer GetRanges(); + static const WhichRangesContainer & GetRanges(); virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; @@ -69,9 +69,10 @@ std::unique_ptr<SfxTabPage> SdParagraphNumTabPage::Create(weld::Container* pPage return std::make_unique<SdParagraphNumTabPage>(pPage, pController, *rAttrSet); } -WhichRangesContainer SdParagraphNumTabPage::GetRanges() +const WhichRangesContainer & SdParagraphNumTabPage::GetRanges() { - return WhichRangesContainer(svl::Items<ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END>); + static const auto gRanges = WhichRangesContainer(svl::Items<ATTR_PARANUMBERING_START, ATTR_PARANUMBERING_END>); + return gRanges; } bool SdParagraphNumTabPage::FillItemSet( SfxItemSet* rSet ) diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx index 28d2cdf3a001..ed04609bbfbd 100644 --- a/svx/source/accessibility/AccessibleControlShape.cxx +++ b/svx/source/accessibility/AccessibleControlShape.cxx @@ -67,7 +67,7 @@ namespace constexpr OUString LABEL_CONTROL_PROPERTY_NAME = u"LabelControl"_ustr; // return the property which should be used as AccessibleName - OUString lcl_getPreferredAccNameProperty( const Reference< XPropertySetInfo >& _rxPSI ) + const OUString & lcl_getPreferredAccNameProperty( const Reference< XPropertySetInfo >& _rxPSI ) { if ( _rxPSI.is() && _rxPSI->hasPropertyByName( LABEL_PROPERTY_NAME ) ) return LABEL_PROPERTY_NAME; diff --git a/svx/source/accessibility/charmapacc.cxx b/svx/source/accessibility/charmapacc.cxx index 191f71efc4ad..0f1fbf2b7f42 100644 --- a/svx/source/accessibility/charmapacc.cxx +++ b/svx/source/accessibility/charmapacc.cxx @@ -55,7 +55,7 @@ SvxShowCharSetItem::~SvxShowCharSetItem() } } -rtl::Reference<SvxShowCharSetItemAcc> SvxShowCharSetItem::GetAccessible() +const rtl::Reference<SvxShowCharSetItemAcc> & SvxShowCharSetItem::GetAccessible() { if( !m_xItem.is() ) { diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 8fd0b05635d5..7f3e8f5a7956 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -431,7 +431,7 @@ namespace } - OUString getServiceNameByControlType(SdrObjKind nType) + const OUString & getServiceNameByControlType(SdrObjKind nType) { switch (nType) { @@ -459,7 +459,7 @@ namespace case SdrObjKind::FormNavigationBar : return FM_SUN_COMPONENT_NAVIGATIONBAR; default:; } - return OUString(); + return EMPTY_OUSTRING; } } diff --git a/svx/source/inc/charmapacc.hxx b/svx/source/inc/charmapacc.hxx index 43ab846d5b6f..995aa97ae866 100644 --- a/svx/source/inc/charmapacc.hxx +++ b/svx/source/inc/charmapacc.hxx @@ -52,7 +52,7 @@ namespace svx SvxShowCharSetItem( SvxShowCharSet& rParent, SvxShowCharSetAcc* _pParent, sal_uInt16 _nPos ); ~SvxShowCharSetItem(); - rtl::Reference< SvxShowCharSetItemAcc > GetAccessible(); + const rtl::Reference< SvxShowCharSetItemAcc > & GetAccessible(); }; diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index c3d0564a90f3..fe5a51508d1f 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -112,7 +112,7 @@ namespace svxform /** convert submission replace string from UI to API. Use 'none' as default. */ - OUString toAPI( std::u16string_view rStr ) const + const OUString & toAPI( std::u16string_view rStr ) const { if( rStr == m_sDoc_UI ) return m_sDoc_API; @@ -156,7 +156,7 @@ namespace svxform } /** convert from UI to API; put is default */ - OUString toAPI( std::u16string_view rStr ) const + const OUString & toAPI( std::u16string_view rStr ) const { if( rStr == m_sGet_UI ) return m_sGet_API; diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index d63556a50d3d..0c8e1c2f74bc 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -812,7 +812,7 @@ namespace { } - basegfx::B2DRange getTextBounds(const sdr::contact::ViewObjectContact &rVOC, sdr::contact::DisplayInfo &raDisplayInfo) + const basegfx::B2DRange & getTextBounds(const sdr::contact::ViewObjectContact &rVOC, sdr::contact::DisplayInfo &raDisplayInfo) { this->process(rVOC.getPrimitive2DSequence(raDisplayInfo)); return maTextRange; diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx index 3212314f4ade..e744fc613a27 100644 --- a/svx/source/svdraw/svdoole2.cxx +++ b/svx/source/svdraw/svdoole2.cxx @@ -1914,7 +1914,7 @@ bool SdrOle2Obj::IsCalc() const || SvGlobalName(SO3_SC_CLASSID) == aObjClsId; } -uno::Reference< frame::XModel > SdrOle2Obj::GetParentXModel() const +const uno::Reference< frame::XModel > & SdrOle2Obj::GetParentXModel() const { return getSdrModelFromSdrObject().getUnoModel(); } diff --git a/svx/source/table/svdotable.cxx b/svx/source/table/svdotable.cxx index b300c4284c38..455d561f283a 100644 --- a/svx/source/table/svdotable.cxx +++ b/svx/source/table/svdotable.cxx @@ -912,7 +912,7 @@ Reference< XTable > SdrTableObj::getTable() const return mpImpl->mxTable; } -rtl::Reference< TableModel > SdrTableObj::getUnoTable() const +const rtl::Reference< TableModel > & SdrTableObj::getUnoTable() const { return mpImpl->mxTable; } diff --git a/svx/source/tbxctrls/PaletteManager.cxx b/svx/source/tbxctrls/PaletteManager.cxx index 15799432eedf..894d38808f84 100644 --- a/svx/source/tbxctrls/PaletteManager.cxx +++ b/svx/source/tbxctrls/PaletteManager.cxx @@ -350,12 +350,12 @@ OUString PaletteManager::GetPaletteName() return aNames[mnCurrentPalette]; } -OUString PaletteManager::GetSelectedPalettePath() +const OUString & PaletteManager::GetSelectedPalettePath() { if (mnCurrentPalette < m_Palettes.size() && mnCurrentPalette != 0) return m_Palettes[mnCurrentPalette - 1]->GetPath(); else - return OUString(); + return EMPTY_OUSTRING; } tools::Long PaletteManager::GetColorCount() const diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 7339d2695018..64dbdf825277 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -350,9 +350,10 @@ void SwTextGridPage::SetLinesOrCharsRanges(weld::Label& rField, const sal_Int32 rField.set_label(aFieldStr); } -WhichRangesContainer SwTextGridPage::GetRanges() +const WhichRangesContainer & SwTextGridPage::GetRanges() { - return WhichRangesContainer(svl::Items<RES_TEXTGRID, RES_TEXTGRID>); + static const auto gRanges = WhichRangesContainer(svl::Items<RES_TEXTGRID, RES_TEXTGRID>); + return gRanges; } IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, weld::SpinButton&, rField, void) diff --git a/sw/source/uibase/inc/column.hxx b/sw/source/uibase/inc/column.hxx index d45331cddfcd..6eabca9db70c 100644 --- a/sw/source/uibase/inc/column.hxx +++ b/sw/source/uibase/inc/column.hxx @@ -171,7 +171,7 @@ public: virtual ~SwColumnPage() override; static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet); - static WhichRangesContainer GetRanges() { return s_aPageRg; } + static const WhichRangesContainer & GetRanges() { return s_aPageRg; } virtual bool FillItemSet(SfxItemSet *rSet) override; virtual void Reset(const SfxItemSet *rSet) override; diff --git a/sw/source/uibase/inc/drpcps.hxx b/sw/source/uibase/inc/drpcps.hxx index afc7c6482253..4542ebc24749 100644 --- a/sw/source/uibase/inc/drpcps.hxx +++ b/sw/source/uibase/inc/drpcps.hxx @@ -151,7 +151,7 @@ public: virtual ~SwDropCapsPage() override; static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet); - static WhichRangesContainer GetRanges() { return s_aPageRg; } + static const WhichRangesContainer & GetRanges() { return s_aPageRg; } virtual bool FillItemSet( SfxItemSet *rSet) override; diff --git a/sw/source/uibase/inc/frmpage.hxx b/sw/source/uibase/inc/frmpage.hxx index 0ee921dc05aa..567b11a79c81 100644 --- a/sw/source/uibase/inc/frmpage.hxx +++ b/sw/source/uibase/inc/frmpage.hxx @@ -197,7 +197,7 @@ public: virtual ~SwFramePage() override; static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet); - static WhichRangesContainer GetRanges() { return s_aPageRg; } + static const WhichRangesContainer & GetRanges() { return s_aPageRg; } virtual bool FillItemSet(SfxItemSet *rSet) override; virtual void Reset(const SfxItemSet *rSet) override; @@ -324,7 +324,7 @@ public: virtual ~SwFrameAddPage() override; static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet); - static WhichRangesContainer GetRanges() { return s_aAddPgRg; } + static const WhichRangesContainer & GetRanges() { return s_aAddPgRg; } virtual bool FillItemSet(SfxItemSet *rSet) override; virtual void Reset(const SfxItemSet *rSet) override; diff --git a/sw/source/uibase/inc/numpara.hxx b/sw/source/uibase/inc/numpara.hxx index f6da0b9f7174..cb6524f3eeff 100644 --- a/sw/source/uibase/inc/numpara.hxx +++ b/sw/source/uibase/inc/numpara.hxx @@ -70,7 +70,7 @@ public: static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet ); - static WhichRangesContainer GetRanges() { return s_aPageRg; } + static const WhichRangesContainer & GetRanges() { return s_aPageRg; } virtual bool FillItemSet( SfxItemSet* rSet ) override; virtual void Reset( const SfxItemSet* rSet ) override; diff --git a/sw/source/uibase/inc/pgfnote.hxx b/sw/source/uibase/inc/pgfnote.hxx index 0abb09a80a9d..77b367230c67 100644 --- a/sw/source/uibase/inc/pgfnote.hxx +++ b/sw/source/uibase/inc/pgfnote.hxx @@ -32,7 +32,7 @@ public: static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet); virtual ~SwFootNotePage() override; - static WhichRangesContainer GetRanges() { return s_aPageRg; } + static const WhichRangesContainer & GetRanges() { return s_aPageRg; } virtual bool FillItemSet(SfxItemSet *rSet) override; virtual void Reset(const SfxItemSet *rSet) override; diff --git a/sw/source/uibase/inc/pggrid.hxx b/sw/source/uibase/inc/pggrid.hxx index 58d5c9467188..52964df5b5cc 100644 --- a/sw/source/uibase/inc/pggrid.hxx +++ b/sw/source/uibase/inc/pggrid.hxx @@ -76,7 +76,7 @@ public: virtual ~SwTextGridPage() override; static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet); - static WhichRangesContainer GetRanges(); + static const WhichRangesContainer & GetRanges(); virtual bool FillItemSet(SfxItemSet *rSet) override; virtual void Reset(const SfxItemSet *rSet) override; diff --git a/sw/source/uibase/inc/swuiccoll.hxx b/sw/source/uibase/inc/swuiccoll.hxx index 74e6920b0275..8bdf59a22e40 100644 --- a/sw/source/uibase/inc/swuiccoll.hxx +++ b/sw/source/uibase/inc/swuiccoll.hxx @@ -56,7 +56,7 @@ public: virtual ~SwCondCollPage() override; static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet *rSet); - static WhichRangesContainer GetRanges() { return s_aPageRg; } + static const WhichRangesContainer & GetRanges() { return s_aPageRg; } virtual bool FillItemSet( SfxItemSet *rSet) override; virtual void Reset (const SfxItemSet *rSet) override; diff --git a/sw/source/uibase/inc/wrap.hxx b/sw/source/uibase/inc/wrap.hxx index f9ee8a69131f..d2142deabc6a 100644 --- a/sw/source/uibase/inc/wrap.hxx +++ b/sw/source/uibase/inc/wrap.hxx @@ -96,7 +96,7 @@ public: virtual bool FillItemSet(SfxItemSet *rSet) override; virtual void Reset(const SfxItemSet *rSet) override; - static WhichRangesContainer GetRanges() { return s_aWrapPageRg; } + static const WhichRangesContainer & GetRanges() { return s_aWrapPageRg; } void SetNewFrame(bool bNewFrame) { m_bNew = bNewFrame; } void SetFormatUsed(bool bFormat, bool bDrawMode) { m_bFormat = bFormat; m_bDrawMode = bDrawMode; } void SetShell(SwWrtShell* pSh) { m_pWrtSh = pSh; } |