diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-20 13:30:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-21 06:09:01 +0100 |
commit | 24158311c115c2db6dd05a751f75a5c084e2c0d1 (patch) | |
tree | d6e69417f050d4ed5d3bd0fd0c51c53090106ba6 /sw/source/uibase/utlui | |
parent | 490287a1b22411f4ac32127c93228e06dad4ff22 (diff) |
TypedWhichId in svx part 1
and teach the idl compiler how to ignore the TypeWhichId<T1> part
of the define
Change-Id: I030f54080924d51e9f0ac09b19e14106648024db
Reviewed-on: https://gerrit.libreoffice.org/46849
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r-- | sw/source/uibase/utlui/uitool.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx index 5d31d1d20909..5ff91b633337 100644 --- a/sw/source/uibase/utlui/uitool.cxx +++ b/sw/source/uibase/utlui/uitool.cxx @@ -220,8 +220,8 @@ void FillHdFt(SwFrameFormat* pFormat, const SfxItemSet& rSet) SwAttrSet aSet(pFormat->GetAttrSet()); aSet.Put(rSet); - const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(rSet.Get(SID_ATTR_PAGE_SIZE)); - const SfxBoolItem& rDynamic = static_cast<const SfxBoolItem&>(rSet.Get(SID_ATTR_PAGE_DYNAMIC)); + const SvxSizeItem& rSize = rSet.Get(SID_ATTR_PAGE_SIZE); + const SfxBoolItem& rDynamic = rSet.Get(SID_ATTR_PAGE_DYNAMIC); // Convert size SwFormatFrameSize aFrameSize(rDynamic.GetValue() ? ATT_MIN_SIZE : ATT_FIX_SIZE, @@ -274,7 +274,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // PageData if(rSet.GetItemState(SID_ATTR_PAGE) == SfxItemState::SET) { - const SvxPageItem& rPageItem = static_cast<const SvxPageItem&>(rSet.Get(SID_ATTR_PAGE)); + const SvxPageItem& rPageItem = rSet.Get(SID_ATTR_PAGE); const SvxPageUsage nUse = rPageItem.GetPageUsage(); if(nUse != SvxPageUsage::NONE) @@ -287,7 +287,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) // Size if(rSet.GetItemState(SID_ATTR_PAGE_SIZE) == SfxItemState::SET) { - const SvxSizeItem& rSizeItem = static_cast<const SvxSizeItem&>(rSet.Get(SID_ATTR_PAGE_SIZE)); + const SvxSizeItem& rSizeItem = rSet.Get(SID_ATTR_PAGE_SIZE); SwFormatFrameSize aSize(ATT_FIX_SIZE); aSize.SetSize(rSizeItem.GetSize()); rMaster.SetFormatAttr(aSize); @@ -298,7 +298,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) false, &pItem ) ) { const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet(); - const SfxBoolItem& rHeaderOn = static_cast<const SfxBoolItem&>(rHeaderSet.Get(SID_ATTR_PAGE_ON)); + const SfxBoolItem& rHeaderOn = rHeaderSet.Get(SID_ATTR_PAGE_ON); if(rHeaderOn.GetValue()) { @@ -313,8 +313,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) ::FillHdFt(pHeaderFormat, rHeaderSet); - rPageDesc.ChgHeaderShare(static_cast<const SfxBoolItem&>( - rHeaderSet.Get(SID_ATTR_PAGE_SHARED)).GetValue()); + rPageDesc.ChgHeaderShare(rHeaderSet.Get(SID_ATTR_PAGE_SHARED).GetValue()); if (nFirstShare < 0) { rPageDesc.ChgFirstShare(static_cast<const SfxBoolItem&>( @@ -338,7 +337,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) false, &pItem ) ) { const SfxItemSet& rFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet(); - const SfxBoolItem& rFooterOn = static_cast<const SfxBoolItem&>(rFooterSet.Get(SID_ATTR_PAGE_ON)); + const SfxBoolItem& rFooterOn = rFooterSet.Get(SID_ATTR_PAGE_ON); if(rFooterOn.GetValue()) { @@ -353,8 +352,7 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc ) ::FillHdFt(pFooterFormat, rFooterSet); - rPageDesc.ChgFooterShare(static_cast<const SfxBoolItem&>( - rFooterSet.Get(SID_ATTR_PAGE_SHARED)).GetValue()); + rPageDesc.ChgFooterShare(rFooterSet.Get(SID_ATTR_PAGE_SHARED).GetValue()); if (nFirstShare < 0) { rPageDesc.ChgFirstShare(static_cast<const SfxBoolItem&>( |