summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-07-10 10:19:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-07-15 14:41:13 +0200
commit5d0a231b29dfd4d587c7a4d1bbda6a511f94ec77 (patch)
treeebc1d470fd891fe0f9e68a002055c4d3a8dd4884 /cui
parentdf9ca514d4e9ea87bbf0a96d99181ed8965cd45a (diff)
WhichRangesContainer, reduce malloc in SfxItemSet
SfxItemSet shows up in perf profiles frequently, and the hottest part is the malloc of the two arrays we need. But most of the time, one of those arrays is a compile-time constant. So this change introduces (*) WhichRangesContainer, which manages whether the SfxItemSet owns the array it points at or not. (*) a static const member in svl::Items (idea from mkaganski) to store the data. Change-Id: Icb8cdbc4d54fd76739565c575e16a744515e5355 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118703 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/iconcdlg.cxx11
-rw-r--r--cui/source/dialogs/postdlg.cxx10
-rw-r--r--cui/source/dialogs/srchxtra.cxx2
-rw-r--r--cui/source/factory/dlgfact.cxx10
-rw-r--r--cui/source/factory/dlgfact.hxx10
-rw-r--r--cui/source/inc/TextColumnsPage.hxx4
-rw-r--r--cui/source/inc/align.hxx4
-rw-r--r--cui/source/inc/backgrnd.hxx4
-rw-r--r--cui/source/inc/border.hxx4
-rw-r--r--cui/source/inc/chardlg.hxx16
-rw-r--r--cui/source/inc/connect.hxx4
-rw-r--r--cui/source/inc/cuihyperdlg.hxx4
-rw-r--r--cui/source/inc/cuitabarea.hxx12
-rw-r--r--cui/source/inc/cuitabline.hxx4
-rw-r--r--cui/source/inc/labdlg.hxx4
-rw-r--r--cui/source/inc/macropg.hxx2
-rw-r--r--cui/source/inc/measure.hxx4
-rw-r--r--cui/source/inc/numfmt.hxx4
-rw-r--r--cui/source/inc/optasian.hxx2
-rw-r--r--cui/source/inc/page.hxx4
-rw-r--r--cui/source/inc/paragrph.hxx14
-rw-r--r--cui/source/inc/postdlg.hxx2
-rw-r--r--cui/source/inc/srchxtra.hxx2
-rw-r--r--cui/source/inc/swpossizetabpage.hxx2
-rw-r--r--cui/source/inc/tabstpge.hxx4
-rw-r--r--cui/source/inc/textanim.hxx4
-rw-r--r--cui/source/inc/textattr.hxx4
-rw-r--r--cui/source/inc/transfrm.hxx12
-rw-r--r--cui/source/options/optasian.cxx5
-rw-r--r--cui/source/tabpages/TextColumnsPage.cxx4
-rw-r--r--cui/source/tabpages/align.cxx24
-rw-r--r--cui/source/tabpages/backgrnd.cxx8
-rw-r--r--cui/source/tabpages/border.cxx16
-rw-r--r--cui/source/tabpages/chardlg.cxx90
-rw-r--r--cui/source/tabpages/connect.cxx8
-rw-r--r--cui/source/tabpages/labdlg.cxx21
-rw-r--r--cui/source/tabpages/measure.cxx8
-rw-r--r--cui/source/tabpages/numfmt.cxx18
-rw-r--r--cui/source/tabpages/page.cxx19
-rw-r--r--cui/source/tabpages/paragrph.cxx45
-rw-r--r--cui/source/tabpages/swpossizetabpage.cxx40
-rw-r--r--cui/source/tabpages/tabstpge.cxx8
-rw-r--r--cui/source/tabpages/textanim.cxx8
-rw-r--r--cui/source/tabpages/textattr.cxx13
-rw-r--r--cui/source/tabpages/tparea.cxx12
-rw-r--r--cui/source/tabpages/tpline.cxx12
-rw-r--r--cui/source/tabpages/tpshadow.cxx18
-rw-r--r--cui/source/tabpages/tptrans.cxx15
-rw-r--r--cui/source/tabpages/transfrm.cxx58
49 files changed, 233 insertions, 380 deletions
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 8eeed40dc181..6e6ffaf5c53a 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -226,7 +226,7 @@ void SvxHpLinkDlg::ResetPageImpl ()
|
\**********************************************************************/
-const sal_uInt16* SvxHpLinkDlg::GetInputRanges( const SfxItemPool& )
+WhichRangesContainer SvxHpLinkDlg::GetInputRanges( const SfxItemPool& )
{
if ( pSet )
{
@@ -234,13 +234,10 @@ const sal_uInt16* SvxHpLinkDlg::GetInputRanges( const SfxItemPool& )
return pSet->GetRanges();
}
- if ( pRanges )
- return pRanges.get();
+ if ( !pRanges.empty() )
+ return pRanges;
- pRanges.reset(new sal_uInt16[1]);
- pRanges[0] = 0;
-
- return pRanges.get();
+ return WhichRangesContainer();
}
diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx
index fe9f2e065bf3..7e8541c5c615 100644
--- a/cui/source/dialogs/postdlg.cxx
+++ b/cui/source/dialogs/postdlg.cxx
@@ -116,15 +116,9 @@ void SvxPostItDialog::ShowLastAuthor(std::u16string_view rAuthor, std::u16string
m_xLastEditFT->set_label( sTxt );
}
-const sal_uInt16* SvxPostItDialog::GetRanges()
+WhichRangesContainer SvxPostItDialog::GetRanges()
{
- static const sal_uInt16 pRanges[] =
- {
- SID_ATTR_POSTIT_AUTHOR,
- SID_ATTR_POSTIT_TEXT,
- 0
- };
- return pRanges;
+ return WhichRangesContainer(svl::Items<SID_ATTR_POSTIT_AUTHOR, SID_ATTR_POSTIT_TEXT>::value);
}
void SvxPostItDialog::EnableTravel(bool bNext, bool bPrev)
diff --git a/cui/source/dialogs/srchxtra.cxx b/cui/source/dialogs/srchxtra.cxx
index 513501700970..384acbc1d566 100644
--- a/cui/source/dialogs/srchxtra.cxx
+++ b/cui/source/dialogs/srchxtra.cxx
@@ -105,7 +105,7 @@ void SvxSearchFormatDialog::PageCreated(const OString& rId, SfxTabPage& rPage)
}
SvxSearchAttributeDialog::SvxSearchAttributeDialog(weld::Window* pParent,
- SearchAttrItemList& rLst, const sal_uInt16* pWhRanges)
+ SearchAttrItemList& rLst, const WhichRangesContainer& pWhRanges)
: GenericDialogController(pParent, "cui/ui/searchattrdialog.ui", "SearchAttrDialog")
, rList(rLst)
, m_xAttrLB(m_xBuilder->weld_tree_view("treeview"))
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index f49e3228134f..5085a2dc4bce 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -364,7 +364,7 @@ const SfxItemSet* CuiAbstractTabController_Impl::GetOutputItemSet() const
return m_xDlg->GetOutputItemSet();
}
-const sal_uInt16* CuiAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
+WhichRangesContainer CuiAbstractTabController_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return m_xDlg->GetInputRanges( pItem );
}
@@ -665,7 +665,7 @@ const SfxItemSet* AbstractSvxTransformTabDialog_Impl::GetOutputItemSet() const
return m_xDlg->GetOutputItemSet();
}
-const sal_uInt16* AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+WhichRangesContainer AbstractSvxTransformTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return m_xDlg->GetInputRanges( pItem );
}
@@ -697,7 +697,7 @@ const SfxItemSet* AbstractSvxCaptionDialog_Impl::GetOutputItemSet() const
return m_xDlg->GetOutputItemSet();
}
-const sal_uInt16* AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+WhichRangesContainer AbstractSvxCaptionDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return m_xDlg->GetInputRanges( pItem );
}
@@ -890,7 +890,7 @@ const SfxItemSet* AbstractSvxAreaTabDialog_Impl::GetOutputItemSet() const
return m_xDlg->GetOutputItemSet();
}
-const sal_uInt16* AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
+WhichRangesContainer AbstractSvxAreaTabDialog_Impl::GetInputRanges(const SfxItemPool& pItem )
{
return m_xDlg->GetInputRanges( pItem );
}
@@ -1189,7 +1189,7 @@ VclPtr<SfxAbstractTabDialog> AbstractDialogFactory_Impl::CreateTabItemDialog(wel
VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateSvxSearchAttributeDialog(weld::Window* pParent,
SearchAttrItemList& rLst,
- const sal_uInt16* pWhRanges )
+ const WhichRangesContainer& pWhRanges )
{
return VclPtr<CuiAbstractController_Impl>::Create(std::make_unique<SvxSearchAttributeDialog>(pParent, rLst, pWhRanges));
}
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 39e540c46352..c0b1f7714418 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -162,7 +162,7 @@ public:
virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
virtual void SetCurPageId( const OString &rName ) override;
virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
+ virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
virtual void SetInputSet( const SfxItemSet* pInSet ) override;
virtual void SetText( const OUString& rStr ) override;
@@ -383,7 +383,7 @@ public:
virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) override;
virtual void SetCurPageId( const OString& rName ) override;
virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
+ virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
virtual void SetInputSet( const SfxItemSet* pInSet ) override;
virtual void SetText( const OUString& rStr ) override;
};
@@ -401,7 +401,7 @@ public:
virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) override;
virtual void SetCurPageId( const OString& rName ) override;
virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual const sal_uInt16* GetInputRanges( const SfxItemPool& pItem ) override;
+ virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
virtual void SetInputSet( const SfxItemSet* pInSet ) override;
virtual void SetText( const OUString& rStr ) override;
};
@@ -576,7 +576,7 @@ public:
virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
virtual void SetCurPageId(const OString& rName) override;
virtual const SfxItemSet* GetOutputItemSet() const override;
- virtual const sal_uInt16* GetInputRanges(const SfxItemPool& pItem) override;
+ virtual WhichRangesContainer GetInputRanges( const SfxItemPool& pItem ) override;
virtual void SetInputSet(const SfxItemSet* pInSet) override;
virtual void SetText(const OUString& rStr) override;
};
@@ -851,7 +851,7 @@ public:
virtual VclPtr<VclAbstractDialog> CreateSvxSearchAttributeDialog(weld::Window* pParent,
SearchAttrItemList& rLst,
- const sal_uInt16* pWhRanges) override;
+ const WhichRangesContainer& pWhRanges) override;
virtual VclPtr<AbstractSvxSearchSimilarityDialog> CreateSvxSearchSimilarityDialog( weld::Window* pParent,
bool bRelax,
sal_uInt16 nOther,
diff --git a/cui/source/inc/TextColumnsPage.hxx b/cui/source/inc/TextColumnsPage.hxx
index 6153cd27a520..af45c23c93ca 100644
--- a/cui/source/inc/TextColumnsPage.hxx
+++ b/cui/source/inc/TextColumnsPage.hxx
@@ -19,7 +19,7 @@
class SvxTextColumnsPage : public SfxTabPage
{
private:
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
std::unique_ptr<weld::SpinButton> m_xColumnsNumber;
std::unique_ptr<weld::MetricSpinButton> m_xColumnsSpacing;
@@ -31,7 +31,7 @@ public:
static std::unique_ptr<SfxTabPage>
Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*);
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static 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 61d31cd00a65..2be30aec6c71 100644
--- a/cui/source/inc/align.hxx
+++ b/cui/source/inc/align.hxx
@@ -45,14 +45,14 @@ namespace svx {
class AlignmentTabPage : public SfxTabPage
{
- static const sal_uInt16 s_pRanges[];
+ static const WhichRangesContainer s_pRanges;
public:
virtual ~AlignmentTabPage() override;
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 const sal_uInt16* GetRanges() { return s_pRanges; }
+ static 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 5673b2f6067b..450fbdaaa27f 100644
--- a/cui/source/inc/backgrnd.hxx
+++ b/cui/source/inc/backgrnd.hxx
@@ -37,7 +37,7 @@ class SvxBrushItem;
class SvxBkgTabPage : public SvxAreaTabPage
{
- static const sal_uInt16 pPageRanges[];
+ static const WhichRangesContainer pPageRanges;
std::unique_ptr<weld::ComboBox> m_xTblLBox;
bool bHighlighting : 1;
@@ -53,7 +53,7 @@ public:
virtual ~SvxBkgTabPage() override;
// returns the area of the which-values
- static const sal_uInt16* GetRanges() { return pPageRanges; }
+ static WhichRangesContainer GetRanges() { return pPageRanges; }
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 1bac9a24bfbf..708f79083380 100644
--- a/cui/source/inc/border.hxx
+++ b/cui/source/inc/border.hxx
@@ -75,14 +75,14 @@ private:
class SvxBorderTabPage : public SfxTabPage
{
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
public:
SvxBorderTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs);
virtual ~SvxBorderTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController,
const SfxItemSet* rAttrSet);
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static 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 31bf955b13ae..281a86b4d826 100644
--- a/cui/source/inc/chardlg.hxx
+++ b/cui/source/inc/chardlg.hxx
@@ -61,7 +61,7 @@ struct SvxCharNamePage_Impl;
class SvxCharNamePage : public SvxCharBasePage
{
private:
- static const sal_uInt16 pNameRanges[];
+ static const WhichRangesContainer pNameRanges;
std::unique_ptr<SvxCharNamePage_Impl> m_pImpl;
@@ -140,7 +140,7 @@ public:
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
virtual ~SvxCharNamePage() override;
- static const sal_uInt16* GetRanges() { return pNameRanges; }
+ static WhichRangesContainer GetRanges() { return pNameRanges; }
virtual void Reset( const SfxItemSet* rSet ) override;
virtual bool FillItemSet( SfxItemSet* rSet ) override;
@@ -159,7 +159,7 @@ public:
class SvxCharEffectsPage : public SvxCharBasePage
{
private:
- static const sal_uInt16 pEffectsRanges[];
+ static const WhichRangesContainer pEffectsRanges;
bool m_bOrigFontColor;
bool m_bNewFontColor;
bool m_bEnableNoneFontColor;
@@ -220,7 +220,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
public:
- static const sal_uInt16* GetRanges() { return pEffectsRanges; }
+ static WhichRangesContainer GetRanges() { return pEffectsRanges; }
virtual void Reset( const SfxItemSet* rSet ) override;
virtual bool FillItemSet( SfxItemSet* rSet ) override;
@@ -233,7 +233,7 @@ public:
// class SvxCharPositionPage ---------------------------------------------
class SvxCharPositionPage : public SvxCharBasePage
{
- static const sal_uInt16 pPositionRanges[];
+ static const WhichRangesContainer pPositionRanges;
private:
short m_nSuperEsc;
@@ -289,7 +289,7 @@ public:
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
public:
- static const sal_uInt16* GetRanges() { return pPositionRanges; }
+ static WhichRangesContainer GetRanges() { return pPositionRanges; }
virtual void Reset( const SfxItemSet* rSet ) override;
virtual bool FillItemSet( SfxItemSet* rSet ) override;
@@ -303,7 +303,7 @@ public:
class SvxCharTwoLinesPage : public SvxCharBasePage
{
private:
- static const sal_uInt16 pTwoLinesRanges[];
+ static const WhichRangesContainer pTwoLinesRanges;
sal_uInt16 m_nStartBracketPosition;
sal_uInt16 m_nEndBracketPosition;
@@ -328,7 +328,7 @@ public:
virtual void ActivatePage( const SfxItemSet& rSet ) override;
virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
- static const sal_uInt16* GetRanges() { return pTwoLinesRanges; }
+ static 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 ea97a266c882..8b7119f0dcaf 100644
--- a/cui/source/inc/connect.hxx
+++ b/cui/source/inc/connect.hxx
@@ -30,7 +30,7 @@ class SdrView;
class SvxConnectionPage : public SfxTabPage
{
private:
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
const SfxItemSet& rOutAttrs;
SfxItemSet aAttrSet;
const SdrView* pView;
@@ -61,7 +61,7 @@ public:
virtual ~SvxConnectionPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static WhichRangesContainer GetRanges() { return pRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx
index 9d6e1ee358d1..b43361edfea1 100644
--- a/cui/source/inc/cuihyperdlg.hxx
+++ b/cui/source/inc/cuihyperdlg.hxx
@@ -72,7 +72,7 @@ private:
const SfxItemSet* pSet;
std::unique_ptr<SfxItemSet> pOutSet;
std::unique_ptr<SfxItemSet> pExampleSet;
- std::unique_ptr<sal_uInt16[]> pRanges;
+ WhichRangesContainer pRanges;
SvxHlinkCtrl maCtrl; ///< Controller
std::unique_ptr<SfxItemSet> mpItemSet;
@@ -120,7 +120,7 @@ public:
void ShowPage( const OString& rId );
/// gives via map converted local slots if applicable
- const sal_uInt16* GetInputRanges( const SfxItemPool& );
+ WhichRangesContainer GetInputRanges( const SfxItemPool& );
void SetInputSet( const SfxItemSet* pInSet );
void Start();
diff --git a/cui/source/inc/cuitabarea.hxx b/cui/source/inc/cuitabarea.hxx
index 651604bb3c37..3f18d069f6e4 100644
--- a/cui/source/inc/cuitabarea.hxx
+++ b/cui/source/inc/cuitabarea.hxx
@@ -126,7 +126,7 @@ public:
class SvxTransparenceTabPage : public SfxTabPage
{
- static const sal_uInt16 pTransparenceRanges[];
+ static const WhichRangesContainer pTransparenceRanges;
const SfxItemSet& rOutAttrs;
@@ -188,7 +188,7 @@ public:
virtual ~SvxTransparenceTabPage() override;
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet*);
- static const sal_uInt16* GetRanges() { return pTransparenceRanges; }
+ static WhichRangesContainer GetRanges() { return pTransparenceRanges; }
virtual bool FillItemSet(SfxItemSet*) override;
virtual void Reset(const SfxItemSet*) override;
@@ -205,7 +205,7 @@ public:
class SvxAreaTabPage : public SfxTabPage
{
- static const sal_uInt16 pAreaRanges[];
+ static const WhichRangesContainer pAreaRanges;
private:
std::unique_ptr<SfxTabPage> m_xFillTabPage;
ButtonBox maBox;
@@ -264,7 +264,7 @@ public:
virtual ~SvxAreaTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pAreaRanges; }
+ static WhichRangesContainer GetRanges() { return pAreaRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -290,7 +290,7 @@ public:
class SvxShadowTabPage : public SvxTabPage
{
- static const sal_uInt16 pShadowRanges[];
+ static const WhichRangesContainer pShadowRanges;
private:
const SfxItemSet& m_rOutAttrs;
@@ -324,7 +324,7 @@ public:
virtual ~SvxShadowTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pShadowRanges; }
+ static 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 db74b0f65970..704852b187fe 100644
--- a/cui/source/inc/cuitabline.hxx
+++ b/cui/source/inc/cuitabline.hxx
@@ -87,7 +87,7 @@ struct SvxBmpItemInfo
class SvxLineTabPage : public SfxTabPage
{
- static const sal_uInt16 pLineRanges[];
+ static const WhichRangesContainer pLineRanges;
private:
//#58425# symbols on a line (e. g. StarChart) ->
/** a list of symbols to be shown in menu. Symbol at position SID_ATTR_SYMBOLTYPE is to be shown in preview.
@@ -206,7 +206,7 @@ public:
void Construct();
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pLineRanges; }
+ static 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 1a5d58a8357f..8146ec388f53 100644
--- a/cui/source/inc/labdlg.hxx
+++ b/cui/source/inc/labdlg.hxx
@@ -34,7 +34,7 @@ const sal_uInt16 CAPTYPE_BITMAPS_COUNT = 3;
class SvxCaptionTabPage : public SfxTabPage
{
private:
- static const sal_uInt16 pCaptionRanges[];
+ static const WhichRangesContainer pCaptionRanges;
Image m_aBmpCapTypes[CAPTYPE_BITMAPS_COUNT];
@@ -81,7 +81,7 @@ public:
virtual ~SvxCaptionTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pCaptionRanges; }
+ static 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 2c1bd1a1259a..f6a6e8a17ae2 100644
--- a/cui/source/inc/macropg.hxx
+++ b/cui/source/inc/macropg.hxx
@@ -101,7 +101,7 @@ public:
// class SvxMacroAssignDlg --------------------------------------------------
-typedef const sal_uInt16* (*GetTabPageRanges)(); // gives international Which-values
+typedef 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 6a41fb122854..7e18c6485556 100644
--- a/cui/source/inc/measure.hxx
+++ b/cui/source/inc/measure.hxx
@@ -28,7 +28,7 @@ class SdrView;
class SvxMeasurePage : public SvxTabPage
{
private:
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
const SfxItemSet& rOutAttrs;
SfxItemSet aAttrSet;
@@ -70,7 +70,7 @@ public:
virtual ~SvxMeasurePage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static 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 7a4fd4605c6b..b4bddde39aaa 100644
--- a/cui/source/inc/numfmt.hxx
+++ b/cui/source/inc/numfmt.hxx
@@ -56,7 +56,7 @@ public:
class SvxNumberFormatTabPage : public SfxTabPage
{
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
public:
SvxNumberFormatTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs);
@@ -64,7 +64,7 @@ public:
const SfxItemSet* rAttrSet );
virtual ~SvxNumberFormatTabPage() override;
// Returns area information.
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static 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 6da4646ecc17..9d9815ea49f0 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 const sal_uInt16* GetRanges();
+ static WhichRangesContainer GetRanges();
virtual bool FillItemSet(SfxItemSet* rSet) override;
virtual void Reset(const SfxItemSet* rSet) override;
};
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index f38283c1c61d..02af8079a88c 100644
--- a/cui/source/inc/page.hxx
+++ b/cui/source/inc/page.hxx
@@ -64,7 +64,7 @@ typedef sal_uInt16 MarginPosition;
class SvxPageDescPage : public SfxTabPage
{
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
private:
OUString sStandardRegister;
tools::Long nFirstLeftMargin;
@@ -174,7 +174,7 @@ public:
virtual ~SvxPageDescPage() override;
// returns the range of the Which values
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static 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 a187bba92787..73cc5faf32cd 100644
--- a/cui/source/inc/paragrph.hxx
+++ b/cui/source/inc/paragrph.hxx
@@ -40,7 +40,7 @@ class SvxLineSpacingItem;
class SvxStdParagraphTabPage: public SfxTabPage
{
- static const sal_uInt16 pStdRanges[];
+ static const WhichRangesContainer pStdRanges;
private:
tools::Long nWidth;
@@ -102,7 +102,7 @@ public:
DECL_LINK(ELRLoseFocusHdl, weld::MetricSpinButton&, void);
- static const sal_uInt16* GetRanges() { return pStdRanges; }
+ static WhichRangesContainer GetRanges() { return pStdRanges; }
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -121,7 +121,7 @@ public:
class SvxParaAlignTabPage : public SfxTabPage
{
- static const sal_uInt16 pAlignRanges[];
+ static const WhichRangesContainer pAlignRanges;
SvxParaPrevWindow m_aExampleWin;
@@ -163,7 +163,7 @@ public:
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
virtual ~SvxParaAlignTabPage() override;
- static const sal_uInt16* GetRanges() { return pAlignRanges; }
+ static WhichRangesContainer GetRanges() { return pAlignRanges; }
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -189,7 +189,7 @@ public:
class SvxExtParagraphTabPage: public SfxTabPage
{
- static const sal_uInt16 pExtRanges[];
+ static const WhichRangesContainer pExtRanges;
public:
SvxExtParagraphTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
@@ -197,7 +197,7 @@ public:
const SfxItemSet* rSet );
virtual ~SvxExtParagraphTabPage() override;
- static const sal_uInt16* GetRanges() { return pExtRanges; }
+ static WhichRangesContainer GetRanges() { return pExtRanges; }
virtual bool FillItemSet( SfxItemSet* rSet ) override;
virtual void Reset( const SfxItemSet* rSet ) override;
@@ -289,7 +289,7 @@ public:
static std::unique_ptr<SfxTabPage> Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
virtual ~SvxAsianTabPage() override;
- static const sal_uInt16* GetRanges();
+ static 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 b294fbcc77df..66fd07af6255 100644
--- a/cui/source/inc/postdlg.hxx
+++ b/cui/source/inc/postdlg.hxx
@@ -44,7 +44,7 @@ public:
bool bPrevNext);
virtual ~SvxPostItDialog() override;
- static const sal_uInt16* GetRanges();
+ static WhichRangesContainer GetRanges();
const SfxItemSet* GetOutputItemSet() const { return m_xOutSet.get(); }
void SetPrevHdl( const Link<SvxPostItDialog&,void>& rLink )
diff --git a/cui/source/inc/srchxtra.hxx b/cui/source/inc/srchxtra.hxx
index 4da71f3c9601..e95fccd413fd 100644
--- a/cui/source/inc/srchxtra.hxx
+++ b/cui/source/inc/srchxtra.hxx
@@ -42,7 +42,7 @@ class SvxSearchAttributeDialog : public weld::GenericDialogController
{
public:
SvxSearchAttributeDialog(weld::Window* pParent, SearchAttrItemList& rLst,
- const sal_uInt16* pWhRanges);
+ const WhichRangesContainer& pWhRanges);
virtual ~SvxSearchAttributeDialog() override;
private:
diff --git a/cui/source/inc/swpossizetabpage.hxx b/cui/source/inc/swpossizetabpage.hxx
index 18e48481a3ce..eb73196986bf 100644
--- a/cui/source/inc/swpossizetabpage.hxx
+++ b/cui/source/inc/swpossizetabpage.hxx
@@ -112,7 +112,7 @@ public:
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
virtual ~SvxSwPosSizeTabPage() override;
- static const sal_uInt16* GetRanges();
+ static 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 ddd7775b24da..207b8b70503d 100644
--- a/cui/source/inc/tabstpge.hxx
+++ b/cui/source/inc/tabstpge.hxx
@@ -58,14 +58,14 @@ public:
class SvxTabulatorTabPage : public SfxTabPage
{
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
public:
SvxTabulatorTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet );
virtual ~SvxTabulatorTabPage() override;
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static 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 4f7785887a6c..8f4767e22fe8 100644
--- a/cui/source/inc/textanim.hxx
+++ b/cui/source/inc/textanim.hxx
@@ -34,7 +34,7 @@ class SdrView;
class SvxTextAnimationPage : public SfxTabPage
{
private:
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
SdrTextAniKind eAniKind;
FieldUnit eFUnit;
@@ -80,7 +80,7 @@ public:
virtual ~SvxTextAnimationPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static 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 fe00b6302c3f..d48e87b7d759 100644
--- a/cui/source/inc/textattr.hxx
+++ b/cui/source/inc/textattr.hxx
@@ -32,7 +32,7 @@ class SdrView;
class SvxTextAttrPage : public SvxTabPage
{
private:
- static const sal_uInt16 pRanges[];
+ static const WhichRangesContainer pRanges;
const SfxItemSet& rOutAttrs;
SdrObjKind m_eObjKind;
@@ -77,7 +77,7 @@ public:
virtual ~SvxTextAttrPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pRanges; }
+ static 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 f3a6ba0a0e21..30b789dc73c4 100644
--- a/cui/source/inc/transfrm.hxx
+++ b/cui/source/inc/transfrm.hxx
@@ -60,7 +60,7 @@ public:
class SvxPositionSizeTabPage : public SvxTabPage
{
- static const sal_uInt16 pPosSizeRanges[];
+ static const WhichRangesContainer pPosSizeRanges;
private:
const SfxItemSet& mrOutAttrs;
@@ -132,7 +132,7 @@ public:
virtual ~SvxPositionSizeTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pPosSizeRanges; }
+ static WhichRangesContainer GetRanges() { return pPosSizeRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -160,7 +160,7 @@ public:
\************************************************************************/
class SvxAngleTabPage : public SvxTabPage
{
- static const sal_uInt16 pAngleRanges[];
+ static const WhichRangesContainer pAngleRanges;
private:
const SdrView* pView;
@@ -188,7 +188,7 @@ public:
virtual ~SvxAngleTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pAngleRanges; }
+ static WhichRangesContainer GetRanges() { return pAngleRanges; }
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet * ) override;
@@ -209,7 +209,7 @@ public:
\************************************************************************/
class SvxSlantTabPage : public SfxTabPage
{
- static const sal_uInt16 pSlantRanges[];
+ static const WhichRangesContainer pSlantRanges;
private:
const SdrView* pView;
@@ -232,7 +232,7 @@ public:
virtual ~SvxSlantTabPage() override;
static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* );
- static const sal_uInt16* GetRanges() { return pSlantRanges; }
+ static 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 a5294c0b4b70..94a192cfddc7 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -375,11 +375,10 @@ IMPL_LINK(SvxAsianLayoutPage, ModifyHdl, weld::Entry&, rEdit, void)
pImpl->aConfig.SetStartEndChars( aLocale, bEnable ? &sStart : nullptr, bEnable ? &sEnd : nullptr);
}
-const sal_uInt16* SvxAsianLayoutPage::GetRanges()
+WhichRangesContainer SvxAsianLayoutPage::GetRanges()
{
//no items are used
- static const sal_uInt16 pAsianLayoutRanges[] = { 0 };
- return pAsianLayoutRanges;
+ return WhichRangesContainer();
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/tabpages/TextColumnsPage.cxx b/cui/source/tabpages/TextColumnsPage.cxx
index db83722e6be1..9c5c27404f3d 100644
--- a/cui/source/tabpages/TextColumnsPage.cxx
+++ b/cui/source/tabpages/TextColumnsPage.cxx
@@ -16,8 +16,8 @@
#include <TextColumnsPage.hxx>
-const sal_uInt16 SvxTextColumnsPage::pRanges[]
- = { SDRATTR_TEXTCOLUMNS_FIRST, SDRATTR_TEXTCOLUMNS_LAST, 0 };
+const WhichRangesContainer SvxTextColumnsPage::pRanges(
+ svl::Items<SDRATTR_TEXTCOLUMNS_FIRST, SDRATTR_TEXTCOLUMNS_LAST>::value);
SvxTextColumnsPage::SvxTextColumnsPage(weld::Container* pPage, weld::DialogController* pController,
const SfxItemSet& rInAttrs)
diff --git a/cui/source/tabpages/align.cxx b/cui/source/tabpages/align.cxx
index 5937a2b28995..b178630ab61e 100644
--- a/cui/source/tabpages/align.cxx
+++ b/cui/source/tabpages/align.cxx
@@ -39,19 +39,17 @@
namespace svx {
-const sal_uInt16 AlignmentTabPage::s_pRanges[] =
-{
- SID_ATTR_ALIGN_HOR_JUSTIFY,SID_ATTR_ALIGN_VER_JUSTIFY,
- SID_ATTR_ALIGN_STACKED,SID_ATTR_ALIGN_LINEBREAK,
- SID_ATTR_ALIGN_INDENT,SID_ATTR_ALIGN_INDENT,
- SID_ATTR_ALIGN_DEGREES,SID_ATTR_ALIGN_DEGREES,
- SID_ATTR_ALIGN_LOCKPOS,SID_ATTR_ALIGN_LOCKPOS,
- SID_ATTR_ALIGN_HYPHENATION,SID_ATTR_ALIGN_HYPHENATION,
- SID_ATTR_ALIGN_ASIANVERTICAL,SID_ATTR_ALIGN_ASIANVERTICAL,
- SID_ATTR_FRAMEDIRECTION,SID_ATTR_FRAMEDIRECTION,
- SID_ATTR_ALIGN_SHRINKTOFIT,SID_ATTR_ALIGN_SHRINKTOFIT,
- 0
-};
+const WhichRangesContainer AlignmentTabPage::s_pRanges(
+ svl::Items<
+ SID_ATTR_ALIGN_HOR_JUSTIFY, SID_ATTR_ALIGN_VER_JUSTIFY,
+ SID_ATTR_ALIGN_STACKED, SID_ATTR_ALIGN_LINEBREAK,
+ SID_ATTR_ALIGN_INDENT, SID_ATTR_ALIGN_INDENT,
+ SID_ATTR_ALIGN_DEGREES, SID_ATTR_ALIGN_DEGREES,
+ SID_ATTR_ALIGN_LOCKPOS, SID_ATTR_ALIGN_LOCKPOS,
+ SID_ATTR_ALIGN_HYPHENATION, SID_ATTR_ALIGN_HYPHENATION,
+ SID_ATTR_ALIGN_ASIANVERTICAL, SID_ATTR_ALIGN_ASIANVERTICAL,
+ SID_ATTR_FRAMEDIRECTION, SID_ATTR_FRAMEDIRECTION,
+ SID_ATTR_ALIGN_SHRINKTOFIT, SID_ATTR_ALIGN_SHRINKTOFIT>::value);
namespace {
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 3aac1fae51a7..229891a082fc 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -36,12 +36,10 @@ using namespace css;
#define TBL_DEST_ROW 1
#define TBL_DEST_TBL 2
-const sal_uInt16 SvxBkgTabPage::pPageRanges[] =
-{
+const WhichRangesContainer SvxBkgTabPage::pPageRanges(svl::Items<
SID_ATTR_BRUSH, SID_ATTR_BRUSH,
- SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR,
- 0
-};
+ SID_ATTR_BRUSH_CHAR, SID_ATTR_BRUSH_CHAR
+>::value);
static sal_uInt16 lcl_GetTableDestSlot(sal_Int32 nTblDest)
{
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index cad792327f74..430cc4e55295 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -69,15 +69,13 @@ using ::com::sun::star::uno::UNO_QUERY;
// static ----------------------------------------------------------------
-const sal_uInt16 SvxBorderTabPage::pRanges[] =
-{
- SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW,
- SID_ATTR_ALIGN_MARGIN, SID_ATTR_ALIGN_MARGIN,
- SID_ATTR_BORDER_CONNECT, SID_ATTR_BORDER_CONNECT,
- SID_SW_COLLAPSING_BORDERS, SID_SW_COLLAPSING_BORDERS,
- SID_ATTR_BORDER_DIAG_TLBR, SID_ATTR_BORDER_DIAG_BLTR,
- 0
-};
+const WhichRangesContainer SvxBorderTabPage::pRanges(
+ svl::Items<
+ SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_SHADOW,
+ SID_ATTR_ALIGN_MARGIN, SID_ATTR_ALIGN_MARGIN,
+ SID_ATTR_BORDER_CONNECT, SID_ATTR_BORDER_CONNECT,
+ SID_SW_COLLAPSING_BORDERS, SID_SW_COLLAPSING_BORDERS,
+ SID_ATTR_BORDER_DIAG_TLBR, SID_ATTR_BORDER_DIAG_BLTR>::value);
static void lcl_SetDecimalDigitsTo1(weld::MetricSpinButton& rField)
{
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index a4cc33265a18..0bb9460745dd 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -65,65 +65,37 @@ using namespace ::com::sun::star;
// static ----------------------------------------------------------------
-const sal_uInt16 SvxCharNamePage::pNameRanges[] =
-{
- SID_ATTR_CHAR_FONT,
- SID_ATTR_CHAR_WEIGHT,
- SID_ATTR_CHAR_FONTHEIGHT,
- SID_ATTR_CHAR_FONTHEIGHT,
- SID_ATTR_CHAR_COLOR,
- SID_ATTR_CHAR_COLOR,
- SID_ATTR_CHAR_LANGUAGE,
- SID_ATTR_CHAR_LANGUAGE,
- SID_ATTR_CHAR_CJK_FONT,
- SID_ATTR_CHAR_CJK_WEIGHT,
- SID_ATTR_CHAR_CTL_FONT,
- SID_ATTR_CHAR_CTL_WEIGHT,
- 0
-};
-
-const sal_uInt16 SvxCharEffectsPage::pEffectsRanges[] =
-{
- SID_ATTR_CHAR_SHADOWED,
- SID_ATTR_CHAR_UNDERLINE,
- SID_ATTR_CHAR_COLOR,
- SID_ATTR_CHAR_COLOR,
- SID_ATTR_CHAR_CASEMAP,
- SID_ATTR_CHAR_CASEMAP,
- SID_ATTR_FLASH,
- SID_ATTR_FLASH,
- SID_ATTR_CHAR_EMPHASISMARK,
- SID_ATTR_CHAR_EMPHASISMARK,
- SID_ATTR_CHAR_RELIEF,
- SID_ATTR_CHAR_RELIEF,
- SID_ATTR_CHAR_HIDDEN,
- SID_ATTR_CHAR_HIDDEN,
- SID_ATTR_CHAR_OVERLINE,
- SID_ATTR_CHAR_OVERLINE,
- 0
-};
-
-const sal_uInt16 SvxCharPositionPage::pPositionRanges[] =
-{
- SID_ATTR_CHAR_KERNING,
- SID_ATTR_CHAR_KERNING,
- SID_ATTR_CHAR_ESCAPEMENT,
- SID_ATTR_CHAR_ESCAPEMENT,
- SID_ATTR_CHAR_AUTOKERN,
- SID_ATTR_CHAR_AUTOKERN,
- SID_ATTR_CHAR_ROTATED,
- SID_ATTR_CHAR_SCALEWIDTH,
- SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
- SID_ATTR_CHAR_WIDTH_FIT_TO_LINE,
- 0
-};
-
-const sal_uInt16 SvxCharTwoLinesPage::pTwoLinesRanges[] =
-{
- SID_ATTR_CHAR_TWO_LINES,
- SID_ATTR_CHAR_TWO_LINES,
- 0
-};
+const WhichRangesContainer SvxCharNamePage::pNameRanges(svl::Items<
+ SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_WEIGHT,
+ SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_FONTHEIGHT,
+ SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_COLOR,
+ SID_ATTR_CHAR_LANGUAGE, SID_ATTR_CHAR_LANGUAGE,
+ SID_ATTR_CHAR_CJK_FONT, SID_ATTR_CHAR_CJK_WEIGHT,
+ SID_ATTR_CHAR_CTL_FONT, SID_ATTR_CHAR_CTL_WEIGHT
+>::value);
+
+const WhichRangesContainer SvxCharEffectsPage::pEffectsRanges(svl::Items<
+ SID_ATTR_CHAR_SHADOWED, SID_ATTR_CHAR_UNDERLINE,
+ SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_COLOR,
+ SID_ATTR_CHAR_CASEMAP, SID_ATTR_CHAR_CASEMAP,
+ SID_ATTR_FLASH, SID_ATTR_FLASH,
+ SID_ATTR_CHAR_EMPHASISMARK, SID_ATTR_CHAR_EMPHASISMARK,
+ SID_ATTR_CHAR_RELIEF, SID_ATTR_CHAR_RELIEF,
+ SID_ATTR_CHAR_HIDDEN, SID_ATTR_CHAR_HIDDEN,
+ SID_ATTR_CHAR_OVERLINE, SID_ATTR_CHAR_OVERLINE
+>::value);
+
+const WhichRangesContainer SvxCharPositionPage::pPositionRanges(svl::Items<
+ SID_ATTR_CHAR_KERNING, SID_ATTR_CHAR_KERNING,
+ SID_ATTR_CHAR_ESCAPEMENT, SID_ATTR_CHAR_ESCAPEMENT,
+ SID_ATTR_CHAR_AUTOKERN, SID_ATTR_CHAR_AUTOKERN,
+ SID_ATTR_CHAR_ROTATED, SID_ATTR_CHAR_SCALEWIDTH,
+ SID_ATTR_CHAR_WIDTH_FIT_TO_LINE, SID_ATTR_CHAR_WIDTH_FIT_TO_LINE
+>::value);
+
+const WhichRangesContainer SvxCharTwoLinesPage::pTwoLinesRanges(svl::Items<
+ SID_ATTR_CHAR_TWO_LINES, SID_ATTR_CHAR_TWO_LINES
+>::value);
// C-Function ------------------------------------------------------------
diff --git a/cui/source/tabpages/connect.cxx b/cui/source/tabpages/connect.cxx
index 70b38bbc95af..ffe14bea9754 100644
--- a/cui/source/tabpages/connect.cxx
+++ b/cui/source/tabpages/connect.cxx
@@ -33,12 +33,8 @@
#include <connect.hxx>
-const sal_uInt16 SvxConnectionPage::pRanges[] =
-{
- SDRATTR_EDGE_FIRST,
- SDRATTR_EDGE_LAST,
- 0
-};
+const WhichRangesContainer SvxConnectionPage::pRanges(
+ svl::Items<SDRATTR_EDGE_FIRST, SDRATTR_EDGE_LAST>::value);
/*************************************************************************
|*
diff --git a/cui/source/tabpages/labdlg.cxx b/cui/source/tabpages/labdlg.cxx
index c230797d9c4a..a9af513ba3f5 100644
--- a/cui/source/tabpages/labdlg.cxx
+++ b/cui/source/tabpages/labdlg.cxx
@@ -49,20 +49,13 @@
// static ----------------------------------------------------------------
-const sal_uInt16 SvxCaptionTabPage::pCaptionRanges[] =
-{
- SDRATTR_CAPTIONTYPE,
- SDRATTR_CAPTIONFIXEDANGLE,
- SDRATTR_CAPTIONANGLE,
- SDRATTR_CAPTIONGAP,
- SDRATTR_CAPTIONESCDIR,
- SDRATTR_CAPTIONESCISREL,
- SDRATTR_CAPTIONESCREL,
- SDRATTR_CAPTIONESCABS,
- SDRATTR_CAPTIONLINELEN,
- SDRATTR_CAPTIONFITLINELEN,
- 0
-};
+const WhichRangesContainer SvxCaptionTabPage::pCaptionRanges(
+ svl::Items<
+ SDRATTR_CAPTIONTYPE, SDRATTR_CAPTIONFIXEDANGLE,
+ SDRATTR_CAPTIONANGLE, SDRATTR_CAPTIONGAP,
+ SDRATTR_CAPTIONESCDIR, SDRATTR_CAPTIONESCISREL,
+ SDRATTR_CAPTIONESCREL, SDRATTR_CAPTIONESCABS,
+ SDRATTR_CAPTIONLINELEN, SDRATTR_CAPTIONFITLINELEN>::value);
SvxCaptionTabPage::SvxCaptionTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs)
: SfxTabPage(pPage, pController, "cui/ui/calloutpage.ui", "CalloutPage", &rInAttrs)
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index a543ebc07b01..c27f904ef970 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -36,12 +36,8 @@
#include <measure.hxx>
-const sal_uInt16 SvxMeasurePage::pRanges[] =
-{
- SDRATTR_MEASURE_FIRST,
- SDRATTR_MEASURE_LAST,
- 0
-};
+const WhichRangesContainer SvxMeasurePage::pRanges(
+ svl::Items<SDRATTR_MEASURE_FIRST, SDRATTR_MEASURE_LAST>::value);
/*************************************************************************
|*
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index de987adb754d..6f889f747517 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -54,18 +54,12 @@ using ::com::sun::star::uno::UNO_QUERY;
// static ----------------------------------------------------------------
-const sal_uInt16 SvxNumberFormatTabPage::pRanges[] =
-{
- SID_ATTR_NUMBERFORMAT_VALUE,
- SID_ATTR_NUMBERFORMAT_INFO,
- SID_ATTR_NUMBERFORMAT_NOLANGUAGE,
- SID_ATTR_NUMBERFORMAT_NOLANGUAGE,
- SID_ATTR_NUMBERFORMAT_ONE_AREA,
- SID_ATTR_NUMBERFORMAT_ONE_AREA,
- SID_ATTR_NUMBERFORMAT_SOURCE,
- SID_ATTR_NUMBERFORMAT_SOURCE,
- 0
-};
+const WhichRangesContainer SvxNumberFormatTabPage::pRanges(
+ svl::Items<
+ SID_ATTR_NUMBERFORMAT_VALUE, SID_ATTR_NUMBERFORMAT_INFO,
+ SID_ATTR_NUMBERFORMAT_NOLANGUAGE, SID_ATTR_NUMBERFORMAT_NOLANGUAGE,
+ SID_ATTR_NUMBERFORMAT_ONE_AREA, SID_ATTR_NUMBERFORMAT_ONE_AREA,
+ SID_ATTR_NUMBERFORMAT_SOURCE, SID_ATTR_NUMBERFORMAT_SOURCE>::value);
/*************************************************************************
#* Method: SvxNumberPreview
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index d7bc0cc6a9d7..84e3b38af282 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -60,16 +60,11 @@
// #i19922# - tdf#126051 see svx/source/dialog/hdft.cxx and sw/source/uibase/sidebar/PageMarginControl.hxx
const tools::Long MINBODY = 56; // 1mm in twips rounded
-const sal_uInt16 SvxPageDescPage::pRanges[] =
-{
- SID_ATTR_BORDER_OUTER,
- SID_ATTR_BORDER_SHADOW,
- SID_ATTR_LRSPACE,
- SID_ATTR_PAGE_SHARED,
- SID_SWREGISTER_COLLECTION,
- SID_SWREGISTER_MODE,
- 0
-};
+const WhichRangesContainer SvxPageDescPage::pRanges(
+ svl::Items<
+ SID_ATTR_BORDER_OUTER, SID_ATTR_BORDER_SHADOW,
+ SID_ATTR_LRSPACE, SID_ATTR_PAGE_SHARED,
+ SID_SWREGISTER_COLLECTION, SID_SWREGISTER_MODE>::value);
// ------- Mapping page layout ------------------------------------------
const SvxPageUsage aArr[] =
@@ -1287,7 +1282,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
{
// aBspWin.SetHdColor(rItem.GetColor());
const SvxBrushItem& rItem = static_cast< const SvxBrushItem& >(rHeaderSet.Get(nWhich));
- SfxItemSet aTempSet(*rHeaderSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
+ SfxItemSet aTempSet(*rHeaderSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>::value);
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aHeaderFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet);
@@ -1342,7 +1337,7 @@ void SvxPageDescPage::InitHeadFoot_Impl( const SfxItemSet& rSet )
{
// aBspWin.SetFtColor(rItem.GetColor());
const SvxBrushItem& rItem = static_cast<const SvxBrushItem&>(rFooterSet.Get(nWhich));
- SfxItemSet aTempSet(*rFooterSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{});
+ SfxItemSet aTempSet(*rFooterSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>::value);
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
aFooterFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet);
diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx
index 83613a78938a..8b3a14f0d38f 100644
--- a/cui/source/tabpages/paragrph.cxx
+++ b/cui/source/tabpages/paragrph.cxx
@@ -51,32 +51,20 @@
#include <svl/eitem.hxx>
#include <svl/intitem.hxx>
-const sal_uInt16 SvxStdParagraphTabPage::pStdRanges[] =
-{
- SID_ATTR_PARA_LINESPACE, // 10033
- SID_ATTR_PARA_LINESPACE,
- SID_ATTR_LRSPACE, // 10048 -
- SID_ATTR_ULSPACE, // 10049
- SID_ATTR_PARA_REGISTER, // 10413
- SID_ATTR_PARA_REGISTER,
- 0
-};
+const WhichRangesContainer SvxStdParagraphTabPage::pStdRanges(
+ svl::Items<
+ SID_ATTR_PARA_LINESPACE, SID_ATTR_PARA_LINESPACE, // 10033
+ SID_ATTR_LRSPACE, SID_ATTR_ULSPACE, // 10048 - 10049
+ SID_ATTR_PARA_REGISTER, SID_ATTR_PARA_REGISTER // 10413
+ >::value);
-const sal_uInt16 SvxParaAlignTabPage::pAlignRanges[] =
-{
- SID_ATTR_PARA_ADJUST, // 10027
- SID_ATTR_PARA_ADJUST,
- 0
-};
+const WhichRangesContainer SvxParaAlignTabPage::pAlignRanges(
+ svl::Items<SID_ATTR_PARA_ADJUST, SID_ATTR_PARA_ADJUST>::value); // 10027
-const sal_uInt16 SvxExtParagraphTabPage::pExtRanges[] =
-{
- SID_ATTR_PARA_PAGEBREAK, // 10037 -
- SID_ATTR_PARA_WIDOWS, // 10041
- SID_ATTR_PARA_MODEL, // 10065 -
- SID_ATTR_PARA_KEEP, // 10066
- 0
-};
+const WhichRangesContainer SvxExtParagraphTabPage::pExtRanges(svl::Items<
+ SID_ATTR_PARA_PAGEBREAK, SID_ATTR_PARA_WIDOWS, // 10037 - 10041
+ SID_ATTR_PARA_MODEL, SID_ATTR_PARA_KEEP // 10065 - 10066
+>::value);
#define MAX_DURCH 5670 // 10 cm makes sense as maximum interline lead
// according to BP
@@ -2229,14 +2217,9 @@ std::unique_ptr<SfxTabPage> SvxAsianTabPage::Create(weld::Container* pPage, weld
return std::make_unique<SvxAsianTabPage>(pPage, pController, *rSet);
}
-const sal_uInt16* SvxAsianTabPage::GetRanges()
+WhichRangesContainer SvxAsianTabPage::GetRanges()
{
- static const sal_uInt16 pRanges[] =
- {
- SID_ATTR_PARA_SCRIPTSPACE, SID_ATTR_PARA_FORBIDDEN_RULES,
- 0
- };
- return pRanges;
+ return WhichRangesContainer(svl::Items<SID_ATTR_PARA_SCRIPTSPACE, SID_ATTR_PARA_FORBIDDEN_RULES>::value);
}
bool SvxAsianTabPage::FillItemSet( SfxItemSet* rSet )
diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx
index 564976c7fb8b..ac9a0da25866 100644
--- a/cui/source/tabpages/swpossizetabpage.cxx
+++ b/cui/source/tabpages/swpossizetabpage.cxx
@@ -719,33 +719,21 @@ std::unique_ptr<SfxTabPage> SvxSwPosSizeTabPage::Create(weld::Container* pPage,
return std::make_unique<SvxSwPosSizeTabPage>(pPage, pController, *rSet);
}
-const sal_uInt16* SvxSwPosSizeTabPage::GetRanges()
+WhichRangesContainer SvxSwPosSizeTabPage::GetRanges()
{
- static const sal_uInt16 pSwPosRanges[] =
- {
- SID_ATTR_TRANSFORM_POS_X,
- SID_ATTR_TRANSFORM_POS_Y,
- SID_ATTR_TRANSFORM_PROTECT_POS,
- SID_ATTR_TRANSFORM_PROTECT_POS,
- SID_ATTR_TRANSFORM_INTERN,
- SID_ATTR_TRANSFORM_INTERN,
- SID_ATTR_TRANSFORM_ANCHOR,
- SID_ATTR_TRANSFORM_VERT_ORIENT,
- SID_ATTR_TRANSFORM_WIDTH,
- SID_ATTR_TRANSFORM_SIZE_POINT,
- SID_ATTR_TRANSFORM_PROTECT_POS,
- SID_ATTR_TRANSFORM_INTERN,
- SID_ATTR_TRANSFORM_AUTOWIDTH,
- SID_ATTR_TRANSFORM_VERT_ORIENT,
- SID_HTML_MODE,
- SID_HTML_MODE,
- SID_SW_FOLLOW_TEXT_FLOW,
- SID_SW_FOLLOW_TEXT_FLOW,
- SID_ATTR_TRANSFORM_HORI_POSITION,
- SID_ATTR_TRANSFORM_VERT_POSITION,
- 0
- };
- return pSwPosRanges;
+ static const WhichRangesContainer ranges(svl::Items<
+ SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y,
+ SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_PROTECT_POS,
+ SID_ATTR_TRANSFORM_INTERN, SID_ATTR_TRANSFORM_INTERN,
+ SID_ATTR_TRANSFORM_ANCHOR, SID_ATTR_TRANSFORM_VERT_ORIENT,
+ SID_ATTR_TRANSFORM_WIDTH, SID_ATTR_TRANSFORM_SIZE_POINT,
+ SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_INTERN,
+ SID_ATTR_TRANSFORM_AUTOWIDTH, SID_ATTR_TRANSFORM_VERT_ORIENT,
+ SID_HTML_MODE, SID_HTML_MODE,
+ SID_SW_FOLLOW_TEXT_FLOW, SID_SW_FOLLOW_TEXT_FLOW,
+ SID_ATTR_TRANSFORM_HORI_POSITION, SID_ATTR_TRANSFORM_VERT_POSITION
+ >::value);
+ return ranges;
}
bool SvxSwPosSizeTabPage::FillItemSet( SfxItemSet* rSet)
diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx
index 712a88e86a7e..bfc1feb108f6 100644
--- a/cui/source/tabpages/tabstpge.cxx
+++ b/cui/source/tabpages/tabstpge.cxx
@@ -32,12 +32,8 @@
constexpr FieldUnit eDefUnit = FieldUnit::MM_100TH;
-const sal_uInt16 SvxTabulatorTabPage::pRanges[] =
-{
- SID_ATTR_TABSTOP,
- SID_ATTR_TABSTOP_OFFSET,
- 0
-};
+const WhichRangesContainer SvxTabulatorTabPage::pRanges(
+ svl::Items<SID_ATTR_TABSTOP, SID_ATTR_TABSTOP_OFFSET>::value);
static void FillUpWithDefTabs_Impl( tools::Long nDefDist, SvxTabStopItem& rTabs )
{
diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx
index 43b69d77afd6..4adce8ed9d4a 100644
--- a/cui/source/tabpages/textanim.cxx
+++ b/cui/source/tabpages/textanim.cxx
@@ -29,12 +29,8 @@
#include <svx/sdtayitm.hxx>
#include <svtools/unitconv.hxx>
-const sal_uInt16 SvxTextAnimationPage::pRanges[] =
-{
- SDRATTR_TEXT_ANIKIND,
- SDRATTR_TEXT_ANIAMOUNT,
- 0
-};
+const WhichRangesContainer SvxTextAnimationPage::pRanges(
+ svl::Items<SDRATTR_TEXT_ANIKIND, SDRATTR_TEXT_ANIAMOUNT>::value);
/*************************************************************************
|*
diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx
index 2e2c42bfa540..3abf4fe0d65c 100644
--- a/cui/source/tabpages/textattr.cxx
+++ b/cui/source/tabpages/textattr.cxx
@@ -35,14 +35,11 @@
using namespace ::com::sun::star;
-const sal_uInt16 SvxTextAttrPage::pRanges[] =
-{
- SDRATTR_MISC_FIRST
- , SDRATTR_TEXT_HORZADJUST
- , SDRATTR_TEXT_WORDWRAP
- , SDRATTR_TEXT_WORDWRAP
- , 0
-};
+const WhichRangesContainer SvxTextAttrPage::pRanges(
+ svl::Items<
+ SDRATTR_MISC_FIRST ,SDRATTR_TEXT_HORZADJUST,
+ SDRATTR_TEXT_WORDWRAP, SDRATTR_TEXT_WORDWRAP
+>::value);
/*************************************************************************
|*
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index fe751bc37436..bcc77512ebd7 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -46,14 +46,10 @@ enum FillType
}
-const sal_uInt16 SvxAreaTabPage::pAreaRanges[] =
-{
- XATTR_GRADIENTSTEPCOUNT,
- XATTR_GRADIENTSTEPCOUNT,
- SID_ATTR_FILL_STYLE,
- SID_ATTR_FILL_BITMAP,
- 0
-};
+const WhichRangesContainer SvxAreaTabPage::pAreaRanges(
+ svl::Items<
+ XATTR_GRADIENTSTEPCOUNT, XATTR_GRADIENTSTEPCOUNT,
+ SID_ATTR_FILL_STYLE, SID_ATTR_FILL_BITMAP>::value);
namespace
{
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 609946a0287d..e996c65a8580 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -71,14 +71,10 @@ using namespace com::sun::star;
// static ----------------------------------------------------------------
-const sal_uInt16 SvxLineTabPage::pLineRanges[] =
-{
- XATTR_LINETRANSPARENCE,
- XATTR_LINETRANSPARENCE,
- SID_ATTR_LINE_STYLE,
- SID_ATTR_LINE_ENDCENTER,
- 0
-};
+const WhichRangesContainer SvxLineTabPage::pLineRanges(svl::Items<
+ XATTR_LINETRANSPARENCE, XATTR_LINETRANSPARENCE,
+ SID_ATTR_LINE_STYLE, SID_ATTR_LINE_ENDCENTER
+>::value);
SvxLineTabPage::SvxLineTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs)
: SfxTabPage(pPage, pController, "cui/ui/linetabpage.ui", "LineTabPage", &rInAttrs)
diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx
index cca27ae0edb1..8e0c86eaea59 100644
--- a/cui/source/tabpages/tpshadow.cxx
+++ b/cui/source/tabpages/tpshadow.cxx
@@ -41,18 +41,12 @@
using namespace com::sun::star;
-const sal_uInt16 SvxShadowTabPage::pShadowRanges[] =
-{
- SDRATTR_SHADOWCOLOR,
- SDRATTR_SHADOWTRANSPARENCE,
- SDRATTR_SHADOWBLUR,
- SID_ATTR_FILL_SHADOW,
- SID_ATTR_FILL_SHADOW,
- SID_ATTR_SHADOW_TRANSPARENCE,
- SID_ATTR_SHADOW_BLUR,
- SID_ATTR_SHADOW_YDISTANCE,
- 0
-};
+const WhichRangesContainer SvxShadowTabPage::pShadowRanges(svl::Items<
+ SDRATTR_SHADOWCOLOR, SDRATTR_SHADOWTRANSPARENCE,
+ SDRATTR_SHADOWBLUR, SID_ATTR_FILL_SHADOW,
+ SID_ATTR_FILL_SHADOW, SID_ATTR_SHADOW_TRANSPARENCE,
+ SID_ATTR_SHADOW_BLUR, SID_ATTR_SHADOW_YDISTANCE
+>::value);
SvxShadowTabPage::SvxShadowTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs)
: SvxTabPage(pPage, pController, "cui/ui/shadowtabpage.ui", "ShadowTabPage", rInAttrs)
diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx
index 3f7d9f6a76bd..594a41ecf704 100644
--- a/cui/source/tabpages/tptrans.cxx
+++ b/cui/source/tabpages/tptrans.cxx
@@ -33,16 +33,11 @@
using namespace com::sun::star;
-const sal_uInt16 SvxTransparenceTabPage::pTransparenceRanges[] =
-{
- XATTR_FILLTRANSPARENCE,
- XATTR_FILLTRANSPARENCE,
- SDRATTR_SHADOWTRANSPARENCE,
- SDRATTR_SHADOWTRANSPARENCE,
- XATTR_FILLFLOATTRANSPARENCE,
- XATTR_FILLFLOATTRANSPARENCE,
- 0
-};
+const WhichRangesContainer SvxTransparenceTabPage::pTransparenceRanges(svl::Items<
+ XATTR_FILLTRANSPARENCE, XATTR_FILLTRANSPARENCE,
+ SDRATTR_SHADOWTRANSPARENCE, SDRATTR_SHADOWTRANSPARENCE,
+ XATTR_FILLFLOATTRANSPARENCE, XATTR_FILLFLOATTRANSPARENCE
+>::value);
/*************************************************************************
|*
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 94ff0ef49d20..6737aba40f67 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -43,44 +43,26 @@
// static ----------------------------------------------------------------
-const sal_uInt16 SvxPositionSizeTabPage::pPosSizeRanges[] =
-{
- SID_ATTR_TRANSFORM_POS_X,
- SID_ATTR_TRANSFORM_POS_Y,
- SID_ATTR_TRANSFORM_PROTECT_POS,
- SID_ATTR_TRANSFORM_PROTECT_POS,
- SID_ATTR_TRANSFORM_INTERN,
- SID_ATTR_TRANSFORM_INTERN,
- SID_ATTR_TRANSFORM_ANCHOR,
- SID_ATTR_TRANSFORM_VERT_ORIENT,
- SID_ATTR_TRANSFORM_WIDTH,
- SID_ATTR_TRANSFORM_SIZE_POINT,
- SID_ATTR_TRANSFORM_PROTECT_POS,
- SID_ATTR_TRANSFORM_INTERN,
- SID_ATTR_TRANSFORM_AUTOWIDTH,
- SID_ATTR_TRANSFORM_AUTOHEIGHT,
- 0
-};
-
-const sal_uInt16 SvxAngleTabPage::pAngleRanges[] =
-{
- SID_ATTR_TRANSFORM_ROT_X,
- SID_ATTR_TRANSFORM_ANGLE,
- SID_ATTR_TRANSFORM_INTERN,
- SID_ATTR_TRANSFORM_INTERN,
- 0
-};
-
-const sal_uInt16 SvxSlantTabPage::pSlantRanges[] =
-{
- SDRATTR_CORNER_RADIUS,
- SDRATTR_CORNER_RADIUS,
- SID_ATTR_TRANSFORM_SHEAR,
- SID_ATTR_TRANSFORM_SHEAR_VERTICAL,
- SID_ATTR_TRANSFORM_INTERN,
- SID_ATTR_TRANSFORM_INTERN,
- 0
-};
+const WhichRangesContainer SvxPositionSizeTabPage::pPosSizeRanges(svl::Items<
+ SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_POS_Y,
+ SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_PROTECT_POS,
+ SID_ATTR_TRANSFORM_INTERN, SID_ATTR_TRANSFORM_INTERN,
+ SID_ATTR_TRANSFORM_ANCHOR, SID_ATTR_TRANSFORM_VERT_ORIENT,
+ SID_ATTR_TRANSFORM_WIDTH, SID_ATTR_TRANSFORM_SIZE_POINT,
+ SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_INTERN,
+ SID_ATTR_TRANSFORM_AUTOWIDTH, SID_ATTR_TRANSFORM_AUTOHEIGHT
+>::value);
+
+const WhichRangesContainer SvxAngleTabPage::pAngleRanges(svl::Items<
+ SID_ATTR_TRANSFORM_ROT_X, SID_ATTR_TRANSFORM_ANGLE,
+ SID_ATTR_TRANSFORM_INTERN, SID_ATTR_TRANSFORM_INTERN
+>::value);
+
+const WhichRangesContainer SvxSlantTabPage::pSlantRanges(svl::Items<
+ SDRATTR_CORNER_RADIUS, SDRATTR_CORNER_RADIUS,
+ SID_ATTR_TRANSFORM_SHEAR, SID_ATTR_TRANSFORM_SHEAR_VERTICAL,
+ SID_ATTR_TRANSFORM_INTERN, SID_ATTR_TRANSFORM_INTERN
+>::value);
/*************************************************************************
|*