summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-02-02 12:19:04 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-02-03 16:04:03 +0100
commita4fbb496ef001d62fce0ad3cdd7a829f99aa182e (patch)
tree46251b839097ec9486da8da98bacf507ba4692e9 /cui
parentaa7f880e8a847686bc4ec2d8ca5f74f39c32abac (diff)
more TypedWhichId in SfxShell and SfxTabDialog
and remove some unnecessary local copies of pool items Change-Id: Ifdac8d84658fd4b803267038592d7da370e23a0d Reviewed-on: https://gerrit.libreoffice.org/49138 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/zoom.cxx2
-rw-r--r--cui/source/tabpages/border.cxx7
-rw-r--r--cui/source/tabpages/numfmt.cxx3
-rw-r--r--cui/source/tabpages/page.cxx2
4 files changed, 6 insertions, 8 deletions
diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx
index 35dd7c56379f..3695c2feab8c 100644
--- a/cui/source/dialogs/zoom.cxx
+++ b/cui/source/dialogs/zoom.cxx
@@ -179,7 +179,7 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
SfxObjectShell* pShell = SfxObjectShell::Current();
if (pShell)
- pOldUserItem = static_cast<const SfxUInt16Item*>(pShell->GetItem(SID_ATTR_ZOOM_USER));
+ pOldUserItem = pShell->GetItem(SID_ATTR_ZOOM_USER);
if (pOldUserItem)
nValue = pOldUserItem->GetValue();
diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index 8ef8cdf63fb7..1ba445c9c224 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -432,7 +432,7 @@ void SvxBorderTabPage::Reset( const SfxItemSet* rSet )
pBoxItem = static_cast<const SvxBoxItem*>(GetItem( *rSet, SID_ATTR_BORDER_OUTER ));
- pBoxInfoItem = static_cast<const SvxBoxInfoItem*>(GetItem( *rSet, SID_ATTR_BORDER_INNER, false ));
+ pBoxInfoItem = GetItem( *rSet, SID_ATTR_BORDER_INNER, false );
eCoreUnit = rSet->GetPool()->GetMetric( nWhichBox );
@@ -707,8 +707,7 @@ bool SvxBorderTabPage::FillItemSet( SfxItemSet* rCoreAttrs )
|| m_pFrameSel->GetFrameBorderState( svx::FrameBorderType::Left ) != svx::FrameBorderState::Hide
|| m_pFrameSel->GetFrameBorderState( svx::FrameBorderType::Right ) != svx::FrameBorderState::Hide )
{
- const SvxBoxInfoItem* pOldBoxInfoItem = static_cast<const SvxBoxInfoItem*>(GetOldItem(
- *rCoreAttrs, SID_ATTR_BORDER_INNER ));
+ const SvxBoxInfoItem* pOldBoxInfoItem = GetOldItem( *rCoreAttrs, SID_ATTR_BORDER_INNER );
if (
!pOldBoxItem ||
m_pLeftMF->IsValueChangedFromSaved() ||
@@ -1224,7 +1223,7 @@ void SvxBorderTabPage::UpdateRemoveAdjCellBorderCB( sal_uInt16 nPreset )
if( !bIsCalcDoc )
return;
const SfxItemSet& rOldSet = GetItemSet();
- const SvxBoxInfoItem* pOldBoxInfoItem = static_cast<const SvxBoxInfoItem*>(GetOldItem( rOldSet, SID_ATTR_BORDER_INNER ));
+ const SvxBoxInfoItem* pOldBoxInfoItem = GetOldItem( rOldSet, SID_ATTR_BORDER_INNER );
const SvxBoxItem* pOldBoxItem = static_cast<const SvxBoxItem*>(GetOldItem( rOldSet, SID_ATTR_BORDER_OUTER ));
if( !pOldBoxInfoItem || !pOldBoxItem )
return;
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 0466d11eec2d..ea4f176b4c05 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -483,8 +483,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet* rSet )
eState = rSet->GetItemState( GetWhich( SID_ATTR_NUMBERFORMAT_VALUE ) );
if ( SfxItemState::DONTCARE != eState )
- pValFmtAttr = static_cast<const SfxUInt32Item*>(
- GetItem( *rSet, SID_ATTR_NUMBERFORMAT_VALUE ));
+ pValFmtAttr = GetItem( *rSet, SID_ATTR_NUMBERFORMAT_VALUE );
eValType = pNumItem->GetValueType();
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index e0291797d66e..214eef745e01 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -1409,7 +1409,7 @@ DeactivateRC SvxPageDescPage::DeactivatePage( SfxItemSet* _pSet )
GetCoreValue( *m_pPaperHeightEdit, eUnit ) );
// put, if current size is different to the value in _pSet
- const SvxSizeItem* pSize = static_cast<const SvxSizeItem*>(GetItem( *_pSet, SID_ATTR_PAGE_SIZE ));
+ const SvxSizeItem* pSize = GetItem( *_pSet, SID_ATTR_PAGE_SIZE );
if ( aSize.Width() && ( !pSize || !IsEqualSize_Impl( pSize, aSize ) ) )
_pSet->Put( SvxSizeItem( nWh, aSize ) );
}