summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-12-20 15:53:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-12-21 11:40:19 +0100
commit956dd4a202a0897b7ca1f8abd285af2cad47abb2 (patch)
treee691b573d43273755294df78c624e5a380c35a62 /sw
parent648c8001783603d708af9e9552a51d2334fc6c2e (diff)
TypedWhichId in svx part 2
Change-Id: Id927679c9f07f1dd820f4fdca9a45eb7aede037c Reviewed-on: https://gerrit.libreoffice.org/46850 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/unocore/unoobj2.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
-rw-r--r--sw/source/ui/chrdlg/tblnumfm.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx4
-rw-r--r--sw/source/uibase/shells/tabsh.cxx6
-rw-r--r--sw/source/uibase/uiview/pview.cxx6
-rw-r--r--sw/source/uibase/uiview/viewtab.cxx4
7 files changed, 11 insertions, 15 deletions
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 8d13fa4dc7e7..313942cbf48e 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1080,7 +1080,7 @@ lcl_IsStartNodeInFormat(const bool bHeader, SwStartNode const *const pSttNode,
const SfxItemSet& rSet = pFrameFormat->GetAttrSet();
const SfxPoolItem* pItem;
if (SfxItemState::SET == rSet.GetItemState(
- static_cast<sal_uInt16>(bHeader ? RES_HEADER : RES_FOOTER),
+ bHeader ? sal_uInt16(RES_HEADER) : sal_uInt16(RES_FOOTER),
true, &pItem))
{
SfxPoolItem *const pItemNonConst(const_cast<SfxPoolItem *>(pItem));
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index f5989402cdab..83c0439efd69 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1635,7 +1635,7 @@ void SwXStyle::SetPropertyValue<sal_uInt16(XATTR_FILLGRADIENT)>(const SfxItemPro
SetPropertyValue<HINT_BEGIN>(rEntry, rPropSet, aValue, o_rStyleBase);
}
template<>
-void SwXStyle::SetPropertyValue<RES_BACKGROUND>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
+void SwXStyle::SetPropertyValue<sal_uInt16(RES_BACKGROUND)>(const SfxItemPropertySimpleEntry& rEntry, const SfxItemPropertySet&, const uno::Any& rValue, SwStyleBase_Impl& o_rStyleBase)
{
SfxItemSet& rStyleSet = o_rStyleBase.GetItemSet();
const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rStyleSet, RES_BACKGROUND, true, m_pDoc->IsInXMLImport()));
diff --git a/sw/source/ui/chrdlg/tblnumfm.cxx b/sw/source/ui/chrdlg/tblnumfm.cxx
index 967fc154afae..4c254aa884cd 100644
--- a/sw/source/ui/chrdlg/tblnumfm.cxx
+++ b/sw/source/ui/chrdlg/tblnumfm.cxx
@@ -40,7 +40,7 @@ SwNumFormatDlg::SwNumFormatDlg(vcl::Window* pParent, const SfxItemSet& rSet)
{
VclPtr<SfxTabPage> pNewPage = (*fnCreatePage)( get_content_area(), &rSet );
SfxAllItemSet aSet(*(rSet.GetPool()));
- aSet.Put ( SvxNumberInfoItem( static_cast<const SvxNumberInfoItem&>(pNewPage->GetItemSet().Get( SID_ATTR_NUMBERFORMAT_INFO ))));
+ aSet.Put ( SvxNumberInfoItem( pNewPage->GetItemSet().Get( SID_ATTR_NUMBERFORMAT_INFO ) ));
pNewPage->PageCreated(aSet);
SetTabPage(pNewPage);
}
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index 9d907536b750..173c8d69d372 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -801,7 +801,7 @@ void SwBaseShell::Execute(SfxRequest &rReq)
if(SfxItemState::SET == pArgs->GetItemState(nSlot))
nCount = static_cast<const SfxUInt16Item &>(pArgs->Get(nSlot)).GetValue();
else
- nCount = static_cast<const SfxUInt16Item &>(pArgs->Get(SID_ATTR_COLUMNS)).GetValue();
+ nCount = pArgs->Get(SID_ATTR_COLUMNS).GetValue();
sal_uInt16 nGutterWidth = DEF_GUTTER_WIDTH;
aFormatCol.Init(nCount ? nCount : 1, nGutterWidth, USHRT_MAX);
@@ -2298,7 +2298,7 @@ void SwBaseShell::ExecBckCol(SfxRequest& rReq)
if(pArgs)
{
- const SvxColorItem& rNewColorItem = static_cast<const SvxColorItem&>(pArgs->Get(SID_BACKGROUND_COLOR));
+ const SvxColorItem& rNewColorItem = pArgs->Get(SID_BACKGROUND_COLOR);
const Color& rNewColor = rNewColorItem.GetValue();
aBrushItem.SetColor(rNewColor);
GetView().GetViewFrame()->GetBindings().SetState(rNewColorItem);
diff --git a/sw/source/uibase/shells/tabsh.cxx b/sw/source/uibase/shells/tabsh.cxx
index abe8de4389af..818a1074ba73 100644
--- a/sw/source/uibase/shells/tabsh.cxx
+++ b/sw/source/uibase/shells/tabsh.cxx
@@ -1421,15 +1421,13 @@ void SwTableShell::ExecTableStyle(SfxRequest& rReq)
case SID_FRAME_LINECOLOR:
if ( rReq.GetSlot() == SID_FRAME_LINESTYLE )
{
- const SvxLineItem &rLineItem = static_cast<const SvxLineItem&>(pArgs->
- Get( SID_FRAME_LINESTYLE ));
+ const SvxLineItem &rLineItem = pArgs->Get( SID_FRAME_LINESTYLE );
const SvxBorderLine* pBorderLine = rLineItem.GetLine();
rSh.SetTabLineStyle( nullptr, true, pBorderLine);
}
else
{
- const SvxColorItem &rNewColorItem = static_cast<const SvxColorItem&>(pArgs->
- Get( SID_FRAME_LINECOLOR ));
+ const SvxColorItem &rNewColorItem = pArgs->Get( SID_FRAME_LINECOLOR );
rSh.SetTabLineStyle( &rNewColorItem.GetValue() );
}
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 5a7aa7de520b..5eb755d5cb9c 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -704,10 +704,8 @@ void SwPagePreview::Execute( SfxRequest &rReq )
const SfxItemSet *pArgs = rReq.GetArgs();
if( pArgs && pArgs->Count() >= 2 )
{
- sal_uInt8 nCols = (sal_uInt8)static_cast<const SfxUInt16Item &>(pArgs->Get(
- SID_ATTR_TABLE_COLUMN)).GetValue();
- sal_uInt8 nRows = (sal_uInt8)static_cast<const SfxUInt16Item &>(pArgs->Get(
- SID_ATTR_TABLE_ROW)).GetValue();
+ sal_uInt8 nCols = (sal_uInt8)pArgs->Get(SID_ATTR_TABLE_COLUMN).GetValue();
+ sal_uInt8 nRows = (sal_uInt8)pArgs->Get(SID_ATTR_TABLE_ROW).GetValue();
m_pViewWin->CalcWish( nRows, nCols );
}
diff --git a/sw/source/uibase/uiview/viewtab.cxx b/sw/source/uibase/uiview/viewtab.cxx
index ad5611a1e628..06ed70fa4def 100644
--- a/sw/source/uibase/uiview/viewtab.cxx
+++ b/sw/source/uibase/uiview/viewtab.cxx
@@ -829,8 +829,8 @@ void SwView::ExecTabWin( SfxRequest const & rReq )
{
OSL_ENSURE(aColItem.Count(), "ColDesc is empty!!");
- const bool bSingleLine = static_cast<const SfxBoolItem&>(rReq.
- GetArgs()->Get(SID_RULER_ACT_LINE_ONLY)).GetValue();
+ const bool bSingleLine = rReq.
+ GetArgs()->Get(SID_RULER_ACT_LINE_ONLY).GetValue();
SwTabCols aTabCols;
if ( m_bSetTabColFromDoc )