diff options
author | Noel Grandin <noel@peralex.com> | 2014-10-02 08:15:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-02 08:15:45 +0200 |
commit | cee21bf941df321e3c0e8dfd41a5555e32d33ab9 (patch) | |
tree | ef4608a12d82a2678bd239e7b913da5d0c1ab5e8 /sfx2 | |
parent | 8ff9b1c2ca65f1e5ac41f3ccf15d9ddadda4c240 (diff) |
fix build
after commit 039b887c54fd7e8cd8a4964d1633fdfc300e938e
"loplugin: cstylecast"
Change-Id: If567653833a1f164a72bd9a5a6c0fcf651e9d3c0
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/dinfdlg.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 46723e3ddcc9..cf9aab2da3f5 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -934,13 +934,13 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) GetTabDialog() && GetTabDialog()->GetExampleSet() ) { SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet(); - SfxPoolItem* pItem; + const SfxPoolItem* pItem; if ( pExpSet && SfxItemState::SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) { - SfxDocumentInfoItem* m_pInfoItem = static_cast<SfxDocumentInfoItem*>(pItem); + const SfxDocumentInfoItem* m_pInfoItem = static_cast<const SfxDocumentInfoItem*>(pItem); bool bUseData = ( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); - m_pInfoItem->SetUseUserData( bUseData ); + const_cast<SfxDocumentInfoItem*>(m_pInfoItem)->SetUseUserData( bUseData ); rSet->Put( SfxDocumentInfoItem( *m_pInfoItem ) ); bRet = true; } @@ -949,16 +949,16 @@ bool SfxDocumentPage::FillItemSet( SfxItemSet* rSet ) if ( bHandleDelete ) { SfxItemSet* pExpSet = GetTabDialog()->GetExampleSet(); - SfxPoolItem* pItem; + const SfxPoolItem* pItem; if ( pExpSet && SfxItemState::SET == pExpSet->GetItemState( SID_DOCINFO, true, &pItem ) ) { - SfxDocumentInfoItem* pInfoItem = static_cast<SfxDocumentInfoItem*>(pItem); + const SfxDocumentInfoItem* pInfoItem = static_cast<const SfxDocumentInfoItem*>(pItem); bool bUseAuthor = bEnableUseUserData && m_pUseUserDataCB->IsChecked(); SfxDocumentInfoItem newItem( *pInfoItem ); newItem.resetUserData( bUseAuthor ? SvtUserOptions().GetFullName() : OUString() ); - pInfoItem->SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); + const_cast<SfxDocumentInfoItem*>(pInfoItem)->SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); newItem.SetUseUserData( TRISTATE_TRUE == m_pUseUserDataCB->GetState() ); newItem.SetDeleteUserData( true ); |