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 /editeng | |
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 'editeng')
-rw-r--r-- | editeng/source/editeng/editdoc.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/editobj.cxx | 4 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 2 | ||||
-rw-r--r-- | editeng/source/items/textitem.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unofdesc.cxx | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index adaff884bcae..a30111e33e66 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1781,7 +1781,7 @@ void ContentNode::dumpAsXml(xmlTextWriterPtr pWriter) const ContentAttribs::ContentAttribs( SfxItemPool& rPool ) : pStyle(nullptr) -, aAttribSet( rPool, svl::Items<EE_PARA_START, EE_CHAR_END>{} ) +, aAttribSet( rPool, svl::Items<EE_PARA_START, EE_CHAR_END> ) { } @@ -2013,7 +2013,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, S void EditDoc::CreateDefFont( bool bUseStyles ) { - SfxItemSet aTmpSet( GetItemPool(), svl::Items<EE_PARA_START, EE_CHAR_END>{} ); + SfxItemSet aTmpSet( GetItemPool(), svl::Items<EE_PARA_START, EE_CHAR_END> ); CreateFont( aDefFont, aTmpSet ); aDefFont.SetVertical( IsVertical() ); aDefFont.SetOrientation( Degree10(IsVertical() ? (IsTopToBottom() ? 2700 : 900) : 0) ); diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx index e5c5cbdf4760..7dd9bdd2459d 100644 --- a/editeng/source/editeng/editobj.cxx +++ b/editeng/source/editeng/editobj.cxx @@ -93,7 +93,7 @@ const XParaPortion& XParaPortionList::operator [](size_t i) const ContentInfo::ContentInfo( SfxItemPool& rPool ) : eFamily(SfxStyleFamily::Para), - aParaAttribs(rPool, svl::Items<EE_PARA_START, EE_CHAR_END>{}) + aParaAttribs(rPool, svl::Items<EE_PARA_START, EE_CHAR_END>) { } @@ -102,7 +102,7 @@ ContentInfo::ContentInfo( const ContentInfo& rCopyFrom, SfxItemPool& rPoolToUse maText(rCopyFrom.maText), aStyle(rCopyFrom.aStyle), eFamily(rCopyFrom.eFamily), - aParaAttribs(rPoolToUse, svl::Items<EE_PARA_START, EE_CHAR_END>{}) + aParaAttribs(rPoolToUse, svl::Items<EE_PARA_START, EE_CHAR_END>) { // this should ensure that the Items end up in the correct Pool! aParaAttribs.Set( rCopyFrom.GetParaAttribs() ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index fdc33305fd23..091bad24e080 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -728,7 +728,7 @@ const SfxItemSet& ImpEditEngine::GetEmptyItemSet() const { if ( !pEmptyItemSet ) { - pEmptyItemSet = std::make_unique<SfxItemSet>(const_cast<SfxItemPool&>(aEditDoc.GetItemPool()), svl::Items<EE_ITEMS_START, EE_ITEMS_END>{}); + pEmptyItemSet = std::make_unique<SfxItemSet>(const_cast<SfxItemPool&>(aEditDoc.GetItemPool()), svl::Items<EE_ITEMS_START, EE_ITEMS_END>); for ( sal_uInt16 nWhich = EE_ITEMS_START; nWhich <= EE_CHAR_END; nWhich++) { pEmptyItemSet->ClearItem( nWhich ); diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 6bfb782e3e19..3fd992617695 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -2406,7 +2406,7 @@ bool SvxCharReliefItem::QueryValue( css::uno::Any& rVal, SvxScriptSetItem::SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ) : SfxSetItem( nSlotId, SfxItemSet( rPool, - svl::Items<SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT>{} )) + svl::Items<SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONT> )) { sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nLatin, nAsian, nComplex ); diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx index 0cfd7a710dcf..238bdc82320f 100644 --- a/editeng/source/uno/unofdesc.cxx +++ b/editeng/source/uno/unofdesc.cxx @@ -197,7 +197,7 @@ uno::Any SvxUnoFontDescriptor::getPropertyDefault( SfxItemPool* pPool ) svl::Items< EE_CHAR_FONTINFO, EE_CHAR_FONTHEIGHT, EE_CHAR_WEIGHT, EE_CHAR_ITALIC, - EE_CHAR_WLM, EE_CHAR_WLM>{}); + EE_CHAR_WLM, EE_CHAR_WLM>); uno::Any aAny; |