summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-15 16:40:37 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-16 08:25:02 +0100
commitb8512a1cc771b0bce7305ed5930524e1527b1cc1 (patch)
tree5459737688a820bd2f15c01093c61e9823441876 /sfx2
parenta47baea83f761937f5b8b5ed0ee142d3e04386d4 (diff)
use more TypedWhichId in sfxsids
Change-Id: I136427319ce2f1117501517efec2f03019bbf71e Reviewed-on: https://gerrit.libreoffice.org/51339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/dinfdlg.cxx16
-rw-r--r--sfx2/source/doc/objserv.cxx4
2 files changed, 9 insertions, 11 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx
index 415e8af27ad9..141e43ce2742 100644
--- a/sfx2/source/dialog/dinfdlg.cxx
+++ b/sfx2/source/dialog/dinfdlg.cxx
@@ -699,7 +699,7 @@ bool SfxDocumentDescPage::FillItemSet(SfxItemSet *rSet)
void SfxDocumentDescPage::Reset(const SfxItemSet *rSet)
{
- m_pInfoItem = const_cast<SfxDocumentInfoItem*>(&static_cast<const SfxDocumentInfoItem &>(rSet->Get(SID_DOCINFO)));
+ m_pInfoItem = const_cast<SfxDocumentInfoItem*>(&rSet->Get(SID_DOCINFO));
m_pTitleEd->SetText( m_pInfoItem->getTitle() );
m_pThemaEd->SetText( m_pInfoItem->getSubject() );
@@ -1006,8 +1006,7 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet )
void SfxDocumentPage::Reset( const SfxItemSet* rSet )
{
// Determine the document information
- const SfxDocumentInfoItem& rInfoItem =
- static_cast<const SfxDocumentInfoItem &>(rSet->Get(SID_DOCINFO));
+ const SfxDocumentInfoItem& rInfoItem = rSet->Get(SID_DOCINFO);
// template data
if ( rInfoItem.HasTemplate() )
@@ -1166,8 +1165,7 @@ SfxDocumentInfoDialog::SfxDocumentInfoDialog( vcl::Window* pParent,
"sfx/ui/documentpropertiesdialog.ui", &rItemSet)
, m_nDocInfoId(0)
{
- const SfxDocumentInfoItem& rInfoItem =
- static_cast<const SfxDocumentInfoItem &>(rItemSet.Get( SID_DOCINFO ));
+ const SfxDocumentInfoItem& rInfoItem = rItemSet.Get( SID_DOCINFO );
#ifdef DBG_UTIL
const SfxStringItem* pURLItem = rItemSet.GetItem<SfxStringItem>(SID_BASEURL, false);
@@ -2191,7 +2189,7 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet )
{
if ( SfxItemState::SET !=
GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) )
- pInfo = const_cast<SfxDocumentInfoItem*>(&static_cast<const SfxDocumentInfoItem& >(rSet->Get( SID_DOCINFO )));
+ pInfo = const_cast<SfxDocumentInfoItem*>(&rSet->Get( SID_DOCINFO ));
else
{
bMustDelete = true;
@@ -2234,7 +2232,7 @@ bool SfxCustomPropertiesPage::FillItemSet( SfxItemSet* rSet )
void SfxCustomPropertiesPage::Reset( const SfxItemSet* rItemSet )
{
m_pPropertiesCtrl->ClearAllLines();
- const SfxDocumentInfoItem& rInfoItem = static_cast<const SfxDocumentInfoItem &>(rItemSet->Get(SID_DOCINFO));
+ const SfxDocumentInfoItem& rInfoItem = rItemSet->Get(SID_DOCINFO);
std::vector< CustomProperty* > aCustomProps = rInfoItem.GetCustomProperties();
m_pPropertiesCtrl->SetCustomProperties(aCustomProps);
}
@@ -2659,7 +2657,7 @@ bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet )
{
if ( SfxItemState::SET !=
GetTabDialog()->GetExampleSet()->GetItemState( SID_DOCINFO, true, &pItem ) )
- pInfo = const_cast<SfxDocumentInfoItem*>(&static_cast<const SfxDocumentInfoItem& >(rSet->Get( SID_DOCINFO )));
+ pInfo = const_cast<SfxDocumentInfoItem*>(&rSet->Get( SID_DOCINFO ));
else
{
bMustDelete = true;
@@ -2721,7 +2719,7 @@ bool SfxCmisPropertiesPage::FillItemSet( SfxItemSet* rSet )
void SfxCmisPropertiesPage::Reset( const SfxItemSet* rItemSet )
{
m_pPropertiesCtrl.ClearAllLines();
- const SfxDocumentInfoItem& rInfoItem = static_cast<const SfxDocumentInfoItem& >(rItemSet->Get(SID_DOCINFO));
+ const SfxDocumentInfoItem& rInfoItem = rItemSet->Get(SID_DOCINFO);
uno::Sequence< document::CmisProperty > aCmisProps = rInfoItem.GetCmisProperties();
for ( sal_Int32 i = 0; i < aCmisProps.getLength(); i++ )
{
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index c8c6a06f7540..601b5f5889f8 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1106,13 +1106,13 @@ void SfxObjectShell::ExecProps_Impl(SfxRequest &rReq)
{
case SID_MODIFIED:
{
- SetModified( static_cast<const SfxBoolItem&>(rReq.GetArgs()->Get(SID_MODIFIED)).GetValue() );
+ SetModified( rReq.GetArgs()->Get(SID_MODIFIED).GetValue() );
rReq.Done();
break;
}
case SID_DOCTITLE:
- SetTitle( static_cast<const SfxStringItem&>(rReq.GetArgs()->Get(SID_DOCTITLE)).GetValue() );
+ SetTitle( rReq.GetArgs()->Get(SID_DOCTITLE).GetValue() );
rReq.Done();
break;