summaryrefslogtreecommitdiff
path: root/sw/source/ui/config
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-28 19:07:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-03-28 19:09:27 +0100
commit2828d92eee63a4a5306ef64482bc7d1db3459406 (patch)
tree0fe6e09f55f278bf9c32d36e9375fb7258b6ed0a /sw/source/ui/config
parent85f28ec44a2c169c91dac9346e9c71feda6a6cab (diff)
Clean up C-style casts from pointers to void
Change-Id: I2ec58d0bfe13fae4fc2141f9b017b5a72e0ba2c2
Diffstat (limited to 'sw/source/ui/config')
-rw-r--r--sw/source/ui/config/optload.cxx10
-rw-r--r--sw/source/ui/config/optpage.cxx16
2 files changed, 13 insertions, 13 deletions
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 7915bc90efb2..05adb529f089 100644
--- a/sw/source/ui/config/optload.cxx
+++ b/sw/source/ui/config/optload.cxx
@@ -252,7 +252,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet)
const SfxPoolItem* pItem;
if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem))
- m_pWrtShell = (SwWrtShell*)static_cast<const SwPtrItem*>(pItem)->GetValue();
+ m_pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING;
m_nOldLinkMode = GLOBALSETTING;
@@ -538,7 +538,7 @@ bool SwCaptionOptPage::FillItemSet( SfxItemSet* )
while (pEntry)
{
- InsCaptionOpt* pData = (InsCaptionOpt*)pEntry->GetUserData();
+ InsCaptionOpt* pData = static_cast<InsCaptionOpt*>(pEntry->GetUserData());
bRet |= pModOpt->SetCapOption(bHTMLMode, pData);
pEntry = m_pCheckLB->Next(pEntry);
}
@@ -621,7 +621,7 @@ void SwCaptionOptPage::DelUserData()
while (pEntry)
{
- delete (InsCaptionOpt*)pEntry->GetUserData();
+ delete static_cast<InsCaptionOpt*>(pEntry->GetUserData());
pEntry->SetUserData(0);
pEntry = m_pCheckLB->Next(pEntry);
}
@@ -646,7 +646,7 @@ IMPL_LINK_NOARG(SwCaptionOptPage, ShowEntryHdl)
SwWrtShell *pSh = ::GetActiveWrtShell();
- InsCaptionOpt* pOpt = (InsCaptionOpt*)pSelEntry->GetUserData();
+ InsCaptionOpt* pOpt = static_cast<InsCaptionOpt*>(pSelEntry->GetUserData());
m_pCategoryBox->Clear();
m_pCategoryBox->InsertEntry(m_sNone);
@@ -752,7 +752,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry)
{
if (pEntry)
{
- InsCaptionOpt* pOpt = (InsCaptionOpt*)pEntry->GetUserData();
+ InsCaptionOpt* pOpt = static_cast<InsCaptionOpt*>(pEntry->GetUserData());
pOpt->UseCaption() = m_pCheckLB->IsChecked(m_pCheckLB->GetModel()->GetAbsPos(pEntry));
const OUString aName( m_pCategoryBox->GetText() );
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index ae130f3514c2..eba0445ab18d 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -763,7 +763,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_PRINTER, false, &pItem))
{
- pPrt = (SfxPrinter*)static_cast<const SwPtrItem*>(pItem)->GetValue();
+ pPrt = static_cast<SfxPrinter*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
}
else
{
@@ -800,12 +800,12 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
}
if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_STDFONTS, false, &pItem))
{
- pFontConfig = (SwStdFontConfig*)static_cast<const SwPtrItem*>(pItem)->GetValue();
+ pFontConfig = static_cast<SwStdFontConfig*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
}
if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem))
{
- pWrtShell = (SwWrtShell*)static_cast<const SwPtrItem*>(pItem)->GetValue();
+ pWrtShell = static_cast<SwWrtShell*>(static_cast<const SwPtrItem*>(pItem)->GetValue());
}
OUString sStdBackup;
OUString sOutBackup;
@@ -1745,7 +1745,7 @@ bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet* )
sal_Int32 nPos = pInsertLB->GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
- pAttr = (CharAttr *)pInsertLB->GetEntryData(nPos);
+ pAttr = static_cast<CharAttr *>(pInsertLB->GetEntryData(nPos));
aInsertedAttr.nItemId = pAttr->nItemId;
aInsertedAttr.nAttr = pAttr->nAttr;
@@ -1771,7 +1771,7 @@ bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet* )
nPos = pDeletedLB->GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
- pAttr = (CharAttr *)pDeletedLB->GetEntryData(nPos);
+ pAttr = static_cast<CharAttr *>(pDeletedLB->GetEntryData(nPos));
aDeletedAttr.nItemId = pAttr->nItemId;
aDeletedAttr.nAttr = pAttr->nAttr;
@@ -1797,7 +1797,7 @@ bool SwRedlineOptionsTabPage::FillItemSet( SfxItemSet* )
nPos = pChangedLB->GetSelectEntryPos();
if (nPos != LISTBOX_ENTRY_NOTFOUND)
{
- pAttr = (CharAttr *)pChangedLB->GetEntryData(nPos);
+ pAttr = static_cast<CharAttr *>(pChangedLB->GetEntryData(nPos));
aChangedAttr.nItemId = pAttr->nItemId;
aChangedAttr.nAttr = pAttr->nAttr;
@@ -2028,7 +2028,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, AttribHdl, ListBox *, pLB )
if( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = 0;
- CharAttr* pAttr = ( CharAttr* ) pLB->GetEntryData( nPos );
+ CharAttr* pAttr = static_cast<CharAttr*>(pLB->GetEntryData( nPos ));
//switch off preview background color
pPrev->ResetColor();
switch (pAttr->nItemId)
@@ -2104,7 +2104,7 @@ IMPL_LINK( SwRedlineOptionsTabPage, ColorHdl, ColorListBox *, pColorLB )
if( nPos == LISTBOX_ENTRY_NOTFOUND )
nPos = 0;
- CharAttr* pAttr = ( CharAttr* ) pLB->GetEntryData( nPos );
+ CharAttr* pAttr = static_cast<CharAttr*>(pLB->GetEntryData( nPos ));
if( pAttr->nItemId == SID_ATTR_BRUSH )
{