summaryrefslogtreecommitdiff
path: root/cui/source/dialogs
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-26 15:28:10 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-26 15:33:29 +0100
commit02b4e4cc294bca5256c886374bc9c97420980bdd (patch)
tree0bb1188ed96ee083e9d0cc606ac377496e90f192 /cui/source/dialogs
parentd3d34a289b78a54ee4047e7a042bb9b13a5a4c9a (diff)
const_cast: convert some C-style casts and remove some redundant ones
Change-Id: I302db31913a60a677b8dc226e48bd8f43b055a1e
Diffstat (limited to 'cui/source/dialogs')
-rw-r--r--cui/source/dialogs/hltpbase.cxx2
-rw-r--r--cui/source/dialogs/iconcdlg.cxx6
-rw-r--r--cui/source/dialogs/linkdlg.cxx2
3 files changed, 5 insertions, 5 deletions
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index c8e4683b2fa5..92c9703cc7f5 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -369,7 +369,7 @@ SvxMacroTableDtor* SvxHyperlinkTabPageBase::GetMacroTable()
const SvxHyperlinkItem *pHyperlinkItem = static_cast<const SvxHyperlinkItem *>(
GetItemSet().GetItem (SID_HYPERLINK_GETLINK));
- return ( (SvxMacroTableDtor*)pHyperlinkItem->GetMacroTbl() );
+ return const_cast<SvxMacroTableDtor*>(pHyperlinkItem->GetMacroTbl());
}
// try to detect the current protocol that is used in rStrURL
diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx
index 9832ce92d329..f33f839d2527 100644
--- a/cui/source/dialogs/iconcdlg.cxx
+++ b/cui/source/dialogs/iconcdlg.cxx
@@ -230,7 +230,7 @@ IconChoiceDialog ::~IconChoiceDialog ()
}
if ( pData->bOnDemand )
- delete (SfxItemSet*)&pData->pPage->GetItemSet();
+ delete &pData->pPage->GetItemSet();
delete pData->pPage;
}
delete pData;
@@ -403,7 +403,7 @@ IMPL_LINK_NOARG(IconChoiceDialog, ResetHdl)
{
// CSet on AIS has problems here, therefore separated
const SfxItemSet* _pSet = &( pData->pPage->GetItemSet() );
- pData->pPage->Reset( *(SfxItemSet*)_pSet );
+ pData->pPage->Reset( *const_cast<SfxItemSet*>(_pSet) );
}
else
pData->pPage->Reset( *pSet );
@@ -558,7 +558,7 @@ void IconChoiceDialog::ResetPageImpl ()
{
// CSet on AIS has problems here, therefore separated
const SfxItemSet* _pSet = &pData->pPage->GetItemSet();
- pData->pPage->Reset( *(SfxItemSet*)_pSet );
+ pData->pPage->Reset( *const_cast<SfxItemSet*>(_pSet) );
}
else
pData->pPage->Reset( *pSet );
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index 2e60a3d6d0e8..b66020d1b9a7 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -632,7 +632,7 @@ void SvBaseLinksDlg::InsertEntry( const SvBaseLink& rLink, sal_uLong nPos, bool
{
OUString aEntry, sFileNm, sLinkNm, sTypeNm, sFilter;
- pLinkMgr->GetDisplayNames( (SvBaseLink*)&rLink, &sTypeNm, &sFileNm, &sLinkNm, &sFilter );
+ pLinkMgr->GetDisplayNames( &rLink, &sTypeNm, &sFileNm, &sLinkNm, &sFilter );
// GetTab(0) gives the position of the bitmap which is automatically inserted by the TabListBox.
// So the first text column's width is Tab(2)-Tab(1).