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 /starmath | |
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 'starmath')
-rw-r--r-- | starmath/qa/cppunit/test_starmath.cxx | 8 | ||||
-rw-r--r-- | starmath/source/document.cxx | 2 | ||||
-rw-r--r-- | starmath/source/smmod.cxx | 2 | ||||
-rw-r--r-- | starmath/source/unomodel.cxx | 2 | ||||
-rw-r--r-- | starmath/source/view.cxx | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/starmath/qa/cppunit/test_starmath.cxx b/starmath/qa/cppunit/test_starmath.cxx index ba1d6c81e56d..f3719b886bad 100644 --- a/starmath/qa/cppunit/test_starmath.cxx +++ b/starmath/qa/cppunit/test_starmath.cxx @@ -486,7 +486,7 @@ void Test::viewZoom() } { - SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{}); + SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>); aSet.Put(SvxZoomItem(SvxZoomType::OPTIMAL, 0)); SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet); m_pViewShell->Execute(aZoom); @@ -532,7 +532,7 @@ void Test::viewZoom() nFinalZoom = rGraphicWindow.GetZoom(); CPPUNIT_ASSERT_MESSAGE("Should not be optimal zoom", nFinalZoom != nOptimalZoom); - SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{}); + SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>); aSet.Put(SvxZoomItem(SvxZoomType::PERCENT, 50)); SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet); m_pViewShell->Execute(aZoom); @@ -541,7 +541,7 @@ void Test::viewZoom() } { - SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{}); + SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>); aSet.Put(SvxZoomItem(SvxZoomType::PERCENT, 5)); SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet); m_pViewShell->Execute(aZoom); @@ -550,7 +550,7 @@ void Test::viewZoom() } { - SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{}); + SfxItemSet aSet(SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>); aSet.Put(SvxZoomItem(SvxZoomType::PERCENT, 1000)); SfxRequest aZoom(SID_ATTR_ZOOM, SfxCallMode::SYNCHRON, aSet); m_pViewShell->Execute(aZoom); diff --git a/starmath/source/document.cxx b/starmath/source/document.cxx index 2b924341265f..23a0caf847fb 100644 --- a/starmath/source/document.cxx +++ b/starmath/source/document.cxx @@ -495,7 +495,7 @@ Printer* SmDocShell::GetPrt() svl::Items< SID_PRINTTITLE, SID_PRINTZOOM, SID_NO_RIGHT_SPACES, SID_SAVE_ONLY_USED_SYMBOLS, - SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS>{}); + SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS>); SmModule *pp = SM_MOD(); pp->GetConfig()->ConfigToItemSet(*pOptions); mpPrinter = VclPtr<SfxPrinter>::Create(std::move(pOptions)); diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx index d4f197406bcc..10a1a3f2216b 100644 --- a/starmath/source/smmod.cxx +++ b/starmath/source/smmod.cxx @@ -212,7 +212,7 @@ std::unique_ptr<SfxItemSet> SmModule::CreateItemSet( sal_uInt16 nId ) SID_PRINTTITLE, SID_PRINTZOOM, SID_NO_RIGHT_SPACES, SID_SAVE_ONLY_USED_SYMBOLS, SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS, - SID_SMEDITWINDOWZOOM, SID_SMEDITWINDOWZOOM>{}); + SID_SMEDITWINDOWZOOM, SID_SMEDITWINDOWZOOM>); GetConfig()->ConfigToItemSet(*pRet); } diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index f66f9a3a7648..b2e38bf645f9 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -612,7 +612,7 @@ void SmModel::_setPropertyValues(const PropertyMapEntry** ppEntries, const Any* SID_NO_RIGHT_SPACES, SID_NO_RIGHT_SPACES, SID_SAVE_ONLY_USED_SYMBOLS, SID_SAVE_ONLY_USED_SYMBOLS, SID_AUTO_CLOSE_BRACKETS, SID_AUTO_CLOSE_BRACKETS, - SID_SMEDITWINDOWZOOM, SID_SMEDITWINDOWZOOM>{} ); + SID_SMEDITWINDOWZOOM, SID_SMEDITWINDOWZOOM> ); SmModule *pp = SM_MOD(); pp->GetConfig()->ConfigToItemSet(*pItemSet); VclPtr<SfxPrinter> pPrinter = SfxPrinter::Create ( aStream, std::move(pItemSet) ); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index 338c667cdbd7..ef05e243f798 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1852,7 +1852,7 @@ void SmViewShell::Execute(SfxRequest& rReq) } else { - SfxItemSet aSet( SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>{}); + SfxItemSet aSet( SmDocShell::GetPool(), svl::Items<SID_ATTR_ZOOM, SID_ATTR_ZOOM>); aSet.Put( SvxZoomItem( SvxZoomType::PERCENT, mxGraphicWindow->GetZoom())); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); ScopedVclPtr<AbstractSvxZoomDialog> xDlg(pFact->CreateSvxZoomDialog(GetViewFrame()->GetWindow().GetFrameWeld(), aSet)); |