diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-07-19 11:04:45 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-07-19 16:33:01 +0200 |
commit | b1668edf7fa3ad8c32bcc4d73821770f2df011ca (patch) | |
tree | cb93a00ca59f770e616668af15fdc6a50e1627a1 /sw/source/ui/misc | |
parent | 5b3c530016927d3e91e3124e124f7b428ab285ac (diff) |
Move svl::Items to include/svl/whichranges.hxx, and unify its usage
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed
to explicitly use 'value' in WhichRangesContainer's ctor, or create an
instance for use in SfxItemSet ctor (svl::Items is already defined as
a template value of corresponding type).
Instead of
WhichRangesContainer Foo(svl::Items<1, 2>::value);
SfxItemSet Bar(rItemPool, svl::Items<1, 2>{});
now use:
WhichRangesContainer Foo(svl::Items<1, 2>);
SfxItemSet Bar(rItemPool, svl::Items<1, 2>);
Change-Id: I4681d952b6442732025e5a26768098878907a238
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r-- | sw/source/ui/misc/docfnote.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/insfnote.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/pgfnote.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/pggrid.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/misc/titlepage.cxx | 2 |
6 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx index dbc733d87d1e..242539430c1b 100644 --- a/sw/source/ui/misc/docfnote.cxx +++ b/sw/source/ui/misc/docfnote.cxx @@ -54,7 +54,7 @@ void SwFootNoteOptionDlg::PageCreated(const OString& /*rId*/, SfxTabPage &rPage) IMPL_LINK(SwFootNoteOptionDlg, OkHdl, weld::Button&, rBtn, void) { - SfxItemSet aDummySet(rSh.GetAttrPool(), svl::Items<1, 1>{} ); + SfxItemSet aDummySet(rSh.GetAttrPool(), svl::Items<1, 1> ); SfxTabPage *pPage = GetTabPage("footnotes"); if ( pPage ) pPage->FillItemSet( &aDummySet ); diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index e16564a24b59..e958762f975a 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -530,7 +530,7 @@ IMPL_LINK(SwGlossaryDlg, MenuHdl, const OString&, rItemIdent, void) } else if (rItemIdent == "macro") { - SfxItemSet aSet( m_pShell->GetAttrPool(), svl::Items<RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG>{} ); + SfxItemSet aSet( m_pShell->GetAttrPool(), svl::Items<RES_FRMMACRO, RES_FRMMACRO, SID_EVENTCONFIG, SID_EVENTCONFIG> ); SvxMacro aStart(OUString(), OUString(), STARBASIC); SvxMacro aEnd(OUString(), OUString(), STARBASIC); diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index a7b16b1e1868..4052882a65a1 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -50,7 +50,7 @@ void SwInsFootNoteDlg::Apply() if (m_rSh.SetCurFootnote( aNote ) && m_bExtCharAvailable) { m_rSh.Right(CRSR_SKIP_CHARS, true, 1, false ); - SfxItemSet aSet(m_rSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>{}); + SfxItemSet aSet(m_rSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>); m_rSh.GetCurAttr(aSet); const SvxFontItem &rFont = aSet.Get( RES_CHRATR_FONT ); SvxFontItem aFont( rFont.GetFamily(), m_aFontName, @@ -92,7 +92,7 @@ IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl, weld::Button&, void) { m_xNumberCharBtn->set_active(true); - SfxItemSet aSet(m_rSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>{}); + SfxItemSet aSet(m_rSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>); m_rSh.GetCurAttr( aSet ); const SvxFontItem &rFont = aSet.Get( RES_CHRATR_FONT ); @@ -200,7 +200,7 @@ void SwInsFootNoteDlg::Init() sNumStr = aFootnoteNote.GetNumStr(); m_rSh.Right(CRSR_SKIP_CHARS, true, 1, false ); - SfxItemSet aSet(m_rSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>{}); + SfxItemSet aSet(m_rSh.GetAttrPool(), svl::Items<RES_CHRATR_FONT, RES_CHRATR_FONT>); m_rSh.GetCurAttr(aSet); const SvxFontItem &rFont = aSet.Get( RES_CHRATR_FONT ); aFont = m_xNumberCharEdit->get_font(); diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index e644feffd109..741cd51802d4 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star; -const WhichRangesContainer SwFootNotePage::aPageRg(svl::Items<FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO>::value); +const WhichRangesContainer SwFootNotePage::aPageRg(svl::Items<FN_PARAM_FTN_INFO, FN_PARAM_FTN_INFO>); // handler to switch between the different possibilities how the footnote // region's height can be set. diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index 34771ba1313f..32186b8a8895 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -325,7 +325,7 @@ void SwTextGridPage::SetLinesOrCharsRanges(weld::Label& rField, const sal_Int32 WhichRangesContainer SwTextGridPage::GetRanges() { - return WhichRangesContainer(svl::Items<RES_TEXTGRID, RES_TEXTGRID>::value); + return WhichRangesContainer(svl::Items<RES_TEXTGRID, RES_TEXTGRID>); } IMPL_LINK(SwTextGridPage, CharorLineChangedHdl, weld::SpinButton&, rField, void) diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx index 03a630a13a28..b5fce662d5cc 100644 --- a/sw/source/ui/misc/titlepage.cxx +++ b/sw/source/ui/misc/titlepage.cxx @@ -22,7 +22,7 @@ namespace bool lcl_GetPageDesc(SwWrtShell& rSh, sal_uInt16 &rPageNo, std::unique_ptr<const SwFormatPageDesc>* ppPageFormatDesc) { bool bRet = false; - SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_PAGEDESC, RES_PAGEDESC>{}); + SfxItemSet aSet(rSh.GetAttrPool(), svl::Items<RES_PAGEDESC, RES_PAGEDESC>); if (rSh.GetCurAttr(aSet)) { const SfxPoolItem* pItem(nullptr); |