summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-12-20 13:30:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-21 06:09:01 +0100
commit24158311c115c2db6dd05a751f75a5c084e2c0d1 (patch)
treed6e69417f050d4ed5d3bd0fd0c51c53090106ba6 /sw
parent490287a1b22411f4ac32127c93228e06dad4ff22 (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')
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx4
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/core/unocore/unotbl.cxx3
-rw-r--r--sw/source/ui/frmdlg/column.cxx3
-rw-r--r--sw/source/ui/misc/pgfnote.cxx3
-rw-r--r--sw/source/ui/misc/pggrid.cxx3
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx3
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx2
-rw-r--r--sw/source/uibase/shells/tabsh.cxx3
-rw-r--r--sw/source/uibase/shells/textfld.cxx2
-rw-r--r--sw/source/uibase/shells/textsh.cxx2
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx5
-rw-r--r--sw/source/uibase/utlui/uitool.cxx18
13 files changed, 22 insertions, 31 deletions
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index fbe12fd69018..36208de5ca26 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -923,7 +923,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
if( !aUnions.empty() )
{
SvxBoxItem aSetBox (static_cast<const SvxBoxItem &>( rSet.Get(RES_BOX )));
- SvxBoxInfoItem aSetBoxInfo(static_cast<const SvxBoxInfoItem&>( rSet.Get(SID_ATTR_BORDER_INNER)));
+ SvxBoxInfoItem aSetBoxInfo( rSet.Get(SID_ATTR_BORDER_INNER) );
bool bTopSet = false,
bBottomSet = false,
@@ -1112,7 +1112,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet )
if ( bRTLTab )
{
SvxBoxItem aTempBox (static_cast<const SvxBoxItem &>( rSet.Get(RES_BOX )));
- SvxBoxInfoItem aTempBoxInfo(static_cast<const SvxBoxInfoItem&>( rSet.Get(SID_ATTR_BORDER_INNER)));
+ SvxBoxInfoItem aTempBoxInfo( rSet.Get(SID_ATTR_BORDER_INNER) );
aTempBox.SetLine( aSetBox.GetRight(), SvxBoxItemLine::RIGHT);
aSetBox.SetLine( aSetBox.GetLeft(), SvxBoxItemLine::RIGHT);
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 10160dd3d8a8..f5989402cdab 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -2547,7 +2547,7 @@ uno::Sequence<beans::PropertyState> SwXStyle::getPropertyStates(const uno::Seque
if(SfxStyleFamily::Page == m_rEntry.m_eFamily && SID_ATTR_PAGE_SIZE == pEntry->nWID && beans::PropertyState_DIRECT_VALUE == pStates[i])
{
- const SvxSizeItem& rSize = static_cast <const SvxSizeItem&>( rSet.Get(SID_ATTR_PAGE_SIZE));
+ const SvxSizeItem& rSize = rSet.Get(SID_ATTR_PAGE_SIZE);
sal_uInt8 nMemberId = pEntry->nMemberId & 0x7f;
if((LONG_MAX == rSize.GetSize().Width() && (MID_SIZE_WIDTH == nMemberId || MID_SIZE_SIZE == nMemberId)) ||
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index cd722ea0f880..350656ff5365 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -2821,8 +2821,7 @@ uno::Any SwXTextTable::getPropertyValue(const OUString& rPropertyName)
SID_ATTR_BORDER_INNER, SID_ATTR_BORDER_INNER>{});
aSet.Put(SvxBoxInfoItem( SID_ATTR_BORDER_INNER ));
SwDoc::GetTabBorders(rCursor, aSet);
- const SvxBoxInfoItem& rBoxInfoItem =
- static_cast<const SvxBoxInfoItem&>(aSet.Get(SID_ATTR_BORDER_INNER));
+ const SvxBoxInfoItem& rBoxInfoItem = aSet.Get(SID_ATTR_BORDER_INNER);
const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX));
if (FN_UNO_TABLE_BORDER == pEntry->nWID)
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index af6561a7a594..6242abbb954f 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -1218,8 +1218,7 @@ void SwColumnPage::ActivatePage(const SfxItemSet& rSet)
{
if( SfxItemState::SET == rSet.GetItemState( SID_ATTR_PAGE_SIZE ))
{
- const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(rSet.Get(
- SID_ATTR_PAGE_SIZE));
+ const SvxSizeItem& rSize = rSet.Get(SID_ATTR_PAGE_SIZE);
sal_uInt16 nActWidth;
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index a05ee2b06086..1de19dfc3340 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -303,8 +303,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
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() )
{
diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx
index 245ad05657c7..3c39eb3ed1ab 100644
--- a/sw/source/ui/misc/pggrid.cxx
+++ b/sw/source/ui/misc/pggrid.cxx
@@ -307,8 +307,7 @@ void SwTextGridPage::UpdatePageSize(const SfxItemSet& rSet)
if( SfxItemState::SET != rSet.GetItemState( SID_ATTR_PAGE_SIZE ))
return;
- const SvxSizeItem& rSize = static_cast<const SvxSizeItem&>(rSet.Get(
- SID_ATTR_PAGE_SIZE));
+ const SvxSizeItem& rSize = rSet.Get(SID_ATTR_PAGE_SIZE);
const SvxLRSpaceItem& rLRSpace = static_cast<const SvxLRSpaceItem&>(rSet.Get(
RES_LR_SPACE ));
const SvxULSpaceItem& rULSpace = static_cast<const SvxULSpaceItem&>(rSet.Get(
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 7e4c3cdf5629..c7c481f35c3d 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -145,8 +145,7 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
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() )
{
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index b19c90da46bb..33b039b790b0 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -1119,7 +1119,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl, SvSimpleTable*, void)
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- OUString sMsg(static_cast<const SvxPostItTextItem&>(pOutSet->Get(SID_ATTR_POSTIT_TEXT)).GetValue());
+ OUString sMsg(pOutSet->Get(SID_ATTR_POSTIT_TEXT).GetValue());
// insert / change comment
pSh->SetRedlineComment(sMsg);
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index 17b3fba4a22b..abe8de4389af 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -914,8 +914,7 @@ void SwTableShell::Execute(SfxRequest &rReq)
// -->after inserting,reset the inner table borders
if ( bSetInnerBorders )
{
- const SvxBoxInfoItem aBoxInfo(static_cast<const SvxBoxInfoItem&>(
- aCoreSet.Get(SID_ATTR_BORDER_INNER)));
+ const SvxBoxInfoItem aBoxInfo(aCoreSet.Get(SID_ATTR_BORDER_INNER));
SfxItemSet aSet( GetPool(), svl::Items<SID_ATTR_BORDER_INNER,
SID_ATTR_BORDER_INNER>{});
aSet.Put( aBoxInfo );
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index 5e4dfeaef768..cfa8661a620d 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -611,7 +611,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- OUString sMsg(static_cast<const SvxPostItTextItem&>(pOutSet->Get(SID_ATTR_POSTIT_TEXT)).GetValue());
+ OUString sMsg(pOutSet->Get(SID_ATTR_POSTIT_TEXT).GetValue());
// Insert or change a comment
rSh.SetRedlineComment(sMsg);
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index f321650318e2..98f453e299ab 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -866,7 +866,7 @@ SfxItemSet SwTextShell::CreateInsertFrameItemSet(SwFlyFrameAttrMgr& rMgr)
aSet.SetParent( rMgr.GetAttrSet().GetParent() );
// Delete minimum size in columns.
- SvxBoxInfoItem aBoxInfo(static_cast<const SvxBoxInfoItem &>(aSet.Get(SID_ATTR_BORDER_INNER)));
+ SvxBoxInfoItem aBoxInfo(aSet.Get(SID_ATTR_BORDER_INNER));
const SvxBoxItem& rBox = static_cast<const SvxBoxItem&>(aSet.Get(RES_BOX));
aBoxInfo.SetMinDist(false);
aBoxInfo.SetDefDist(rBox.GetDistance(SvxBoxItemLine::LEFT));
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index dd2ac2be7bd5..ad5611a1e628 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -402,7 +402,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
case SID_ATTR_PAGE_LRSPACE:
if ( pReqArgs )
{
- const SvxLongLRSpaceItem aLongLR( static_cast<const SvxLongLRSpaceItem&>(pReqArgs->Get( SID_ATTR_PAGE_LRSPACE )) );
+ const SvxLongLRSpaceItem aLongLR( pReqArgs->Get( SID_ATTR_PAGE_LRSPACE ) );
SwPageDesc aDesc( rDesc );
{
@@ -543,8 +543,7 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
case SID_ATTR_PAGE_ULSPACE:
if ( pReqArgs )
{
- SvxLongULSpaceItem aLongULSpace(
- static_cast<const SvxLongULSpaceItem&>(pReqArgs->Get( SID_ATTR_PAGE_ULSPACE ) ) );
+ SvxLongULSpaceItem aLongULSpace( pReqArgs->Get( SID_ATTR_PAGE_ULSPACE ) );
SwPageDesc aDesc( rDesc );
{
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&>(