summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-26 10:27:15 +0200
committerNoel Grandin <noel@peralex.com>2014-11-26 11:46:38 +0200
commit5be1635d45e28e047af0cde4e387b07a3131cc9d (patch)
treed2bd0d9f133c10e563655081174d1481a68e09b3 /sw/source/uibase
parentb61ca31e53f0a56667a5e00e966681be29ea7bf7 (diff)
loplugin: cstylecast
Change-Id: Idce7220056f7bc339a5060fd0bd6fbbbdde4f6ff
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/app/apphdl.cxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx8
-rw-r--r--sw/source/uibase/app/docsh2.cxx2
-rw-r--r--sw/source/uibase/app/docst.cxx18
-rw-r--r--sw/source/uibase/app/docstyle.cxx4
-rw-r--r--sw/source/uibase/dialog/regionsw.cxx18
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx4
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx2
-rw-r--r--sw/source/uibase/misc/redlndlg.cxx2
-rw-r--r--sw/source/uibase/ribbar/workctrl.cxx2
-rw-r--r--sw/source/uibase/shells/basesh.cxx10
-rw-r--r--sw/source/uibase/shells/drawsh.cxx2
-rw-r--r--sw/source/uibase/shells/drwtxtsh.cxx8
-rw-r--r--sw/source/uibase/shells/textfld.cxx2
-rw-r--r--sw/source/uibase/shells/textsh.cxx6
-rw-r--r--sw/source/uibase/shells/textsh2.cxx10
-rw-r--r--sw/source/uibase/shells/txtcrsr.cxx4
-rw-r--r--sw/source/uibase/uiview/pview.cxx8
-rw-r--r--sw/source/uibase/uiview/view2.cxx38
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx4
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx2
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx4
-rw-r--r--sw/source/uibase/utlui/content.cxx4
-rw-r--r--sw/source/uibase/utlui/numfmtlb.cxx2
-rw-r--r--sw/source/uibase/utlui/uitool.cxx12
-rw-r--r--sw/source/uibase/utlui/zoomctrl.cxx2
26 files changed, 90 insertions, 90 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 3f9d862da737..ea6574b765c4 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -605,7 +605,7 @@ void SwModule::ExecOther(SfxRequest& rReq)
case SID_ATTR_METRIC:
if(pArgs && SfxItemState::SET == pArgs->GetItemState(nWhich, false, &pItem))
{
- FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue();
+ FieldUnit eUnit = (FieldUnit)static_cast<const SfxUInt16Item*>(pItem)->GetValue();
switch( eUnit )
{
case FUNIT_MM:
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 29670f3d091a..bd6b96c86c5c 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -162,7 +162,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
const SfxItemSet* pMedSet;
if( 0 != ( pMedSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
pMedSet->GetItemState( FN_API_CALL, true, &pApiItem ) )
- bAPICall = ((const SfxBoolItem*)pApiItem)->GetValue();
+ bAPICall = static_cast<const SfxBoolItem*>(pApiItem)->GetValue();
const SfxFilter* pFlt = rMedium.GetFilter();
if( !pFlt )
@@ -206,7 +206,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPassItem;
if(pSet && SfxItemState::SET == pSet->GetItemState(SID_PASSWORD, true, &pPassItem))
- aPasswd = ((const SfxStringItem *)pPassItem)->GetValue();
+ aPasswd = static_cast<const SfxStringItem *>(pPassItem)->GetValue();
}
if (!(*ppRdr)->CheckPasswd( aPasswd, *pRead ))
@@ -232,7 +232,7 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr,
const SfxPoolItem* pItem;
if( 0 != ( pSet = rMedium.GetItemSet() ) && SfxItemState::SET ==
pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
- aOpt.ReadUserData( ((const SfxStringItem*)pItem)->GetValue() );
+ aOpt.ReadUserData( static_cast<const SfxStringItem*>(pItem)->GetValue() );
if( pRead )
pRead->GetReaderOpt().SetASCIIOpts( aOpt );
@@ -703,7 +703,7 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium )
{
if( SfxItemState::SET == pSet->GetItemState( SID_FILE_FILTEROPTIONS,
true, &pItem ) )
- sItemOpt = ((const SfxStringItem*)pItem)->GetValue();
+ sItemOpt = static_cast<const SfxStringItem*>(pItem)->GetValue();
}
if(!sItemOpt.isEmpty())
aOpt.ReadUserData( sItemOpt );
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index bab7224ae7e8..0481707ca3ad 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -862,7 +862,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
OUString aFileName, aTemplateName;
if( pArgs && SfxItemState::SET == pArgs->GetItemState( nWhich, false, &pItem ) )
{
- aFileName = ((const SfxStringItem*)pItem)->GetValue();
+ aFileName = static_cast<const SfxStringItem*>(pItem)->GetValue();
SFX_ITEMSET_ARG( pArgs, pTemplItem, SfxStringItem, SID_TEMPLATE_NAME, false );
if ( pTemplItem )
aTemplateName = pTemplItem->GetValue();
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index aebf6ede5e90..93c717cce510 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -279,20 +279,20 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
if( pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_FAMILY,
false, &pItem ))
{
- const sal_uInt16 nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
+ const sal_uInt16 nFamily = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
OUString sName;
sal_uInt16 nMask = 0;
if( SfxItemState::SET == pArgs->GetItemState( SID_STYLE_NEW,
false, &pItem ))
- sName = ((const SfxStringItem*)pItem)->GetValue();
+ sName = static_cast<const SfxStringItem*>(pItem)->GetValue();
if( SfxItemState::SET == pArgs->GetItemState( SID_STYLE_MASK,
false, &pItem ))
- nMask = ((const SfxUInt16Item*)pItem)->GetValue();
+ nMask = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
OUString sParent;
if( SfxItemState::SET == pArgs->GetItemState( SID_STYLE_REFERENCE,
false, &pItem ))
- sParent = ((const SfxStringItem*)pItem)->GetValue();
+ sParent = static_cast<const SfxStringItem*>(pItem)->GetValue();
if (sName.isEmpty() && mxBasePool.get())
sName = SfxStyleDialog::GenerateUnusedName(*mxBasePool);
@@ -385,15 +385,15 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
SwWrtShell* pShell = GetWrtShell();
if( SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem ))
- aParam = ((const SfxStringItem*)pItem)->GetValue();
+ aParam = static_cast<const SfxStringItem*>(pItem)->GetValue();
if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_FAMILY,
false, &pItem ))
- nFamily = ((const SfxUInt16Item*)pItem)->GetValue();
+ nFamily = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_FAMILYNAME, false, &pItem ))
{
- OUString aFamily = ((const SfxStringItem*)pItem)->GetValue();
+ OUString aFamily = static_cast<const SfxStringItem*>(pItem)->GetValue();
if(aFamily.equalsAscii("CharacterStyles"))
nFamily = SFX_STYLE_FAMILY_CHAR;
else
@@ -412,7 +412,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
if( SfxItemState::SET == pArgs->GetItemState(SID_STYLE_MASK,
false, &pItem ))
- nMask = ((const SfxUInt16Item*)pItem)->GetValue();
+ nMask = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
if( SfxItemState::SET == pArgs->GetItemState(FN_PARAM_WRTSHELL,
false, &pItem ))
pActShell = pShell = (SwWrtShell*)static_cast<const SwPtrItem*>(pItem)->GetValue();
@@ -445,7 +445,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
case SFX_STYLE_FAMILY_PSEUDO:
if(SfxItemState::SET == pArgs->GetItemState(SID_STYLE_UPD_BY_EX_NAME, false, &pItem))
{
- aParam = ((const SfxStringItem*)pItem)->GetValue();
+ aParam = static_cast<const SfxStringItem*>(pItem)->GetValue();
}
break;
}
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index 64602029cb70..3c53dcb2bdf0 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -1330,7 +1330,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
const SfxPoolItem* pAutoUpdate;
if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate ))
{
- pColl->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
+ pColl->SetAutoUpdateFmt(static_cast<const SfxBoolItem*>(pAutoUpdate)->GetValue());
}
const SwCondCollItem* pCondItem;
@@ -1455,7 +1455,7 @@ void SwDocStyleSheet::SetItemSet( const SfxItemSet& rSet,
const SfxPoolItem* pAutoUpdate;
if(SfxItemState::SET == rSet.GetItemState(SID_ATTR_AUTO_STYLE_UPDATE,false, &pAutoUpdate ))
{
- pFrmFmt->SetAutoUpdateFmt(((const SfxBoolItem*)pAutoUpdate)->GetValue());
+ pFrmFmt->SetAutoUpdateFmt(static_cast<const SfxBoolItem*>(pAutoUpdate)->GetValue());
}
pFmt = pFrmFmt;
}
diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx
index db1d54f84217..43c72f627a0e 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -96,7 +96,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
if ( SfxItemState::SET ==
pSet->GetItemState(FN_PARAM_REGION_NAME, true, &pItem) )
{
- const OUString sRemoveWhenUniStringIsGone = ((const SfxStringItem *)pItem)->GetValue();
+ const OUString sRemoveWhenUniStringIsGone = static_cast<const SfxStringItem *>(pItem)->GetValue();
aTmpStr = rSh.GetUniqueSectionName(&sRemoveWhenUniStringIsGone);
}
else
@@ -127,12 +127,12 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
}
const bool bHidden = SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_HIDDEN, true, &pItem) &&
- ((const SfxBoolItem *)pItem)->GetValue();
+ static_cast<const SfxBoolItem *>(pItem)->GetValue();
const bool bProtect = SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_PROTECT, true, &pItem) &&
- ((const SfxBoolItem *)pItem)->GetValue();
+ static_cast<const SfxBoolItem *>(pItem)->GetValue();
// #114856# edit in readonly sections
const bool bEditInReadonly = SfxItemState::SET == pSet->GetItemState(FN_PARAM_REGION_EDIT_IN_READONLY, true, &pItem) &&
- ((const SfxBoolItem *)pItem)->GetValue();
+ static_cast<const SfxBoolItem *>(pItem)->GetValue();
aSection.SetProtectFlag(bProtect);
aSection.SetHidden(bHidden);
@@ -141,16 +141,16 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
if(SfxItemState::SET ==
pSet->GetItemState(FN_PARAM_REGION_CONDITION, true, &pItem))
- aSection.SetCondition(((const SfxStringItem *)pItem)->GetValue());
+ aSection.SetCondition(static_cast<const SfxStringItem *>(pItem)->GetValue());
OUString aFile, aSub;
if(SfxItemState::SET ==
pSet->GetItemState(FN_PARAM_1, true, &pItem))
- aFile = ((const SfxStringItem *)pItem)->GetValue();
+ aFile = static_cast<const SfxStringItem *>(pItem)->GetValue();
if(SfxItemState::SET ==
pSet->GetItemState(FN_PARAM_3, true, &pItem))
- aSub = ((const SfxStringItem *)pItem)->GetValue();
+ aSub = static_cast<const SfxStringItem *>(pItem)->GetValue();
if(!aFile.isEmpty() || !aSub.isEmpty())
{
@@ -162,7 +162,7 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq)
pSet->GetItemState(FN_PARAM_2, true, &pItem))
{
sLinkFileName = comphelper::string::setToken(sLinkFileName, 1, sfx2::cTokenSeparator,
- ((const SfxStringItem *)pItem)->GetValue());
+ static_cast<const SfxStringItem *>(pItem)->GetValue());
}
sLinkFileName += aSub;
@@ -223,7 +223,7 @@ void SwBaseShell::EditRegionDialog(SfxRequest& rReq)
OSL_ENSURE(pEditRegionDlg, "Dialog creation failed!");
if(pItem && pItem->ISA(SfxStringItem))
{
- pEditRegionDlg->SelectSection(((const SfxStringItem*)pItem)->GetValue());
+ pEditRegionDlg->SelectSection(static_cast<const SfxStringItem*>(pItem)->GetValue());
}
pEditRegionDlg->Execute();
}
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index 7cdc9d6e4f5a..c99197eb074f 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -281,7 +281,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
{
sTxt = SW_RESSTR(STR_CONTENT_TYPE_SINGLE_REFERENCE);
sTxt += ": ";
- sTxt += ((const SwFmtRefMark*)aCntntAtPos.aFnd.pAttr)->GetRefName();
+ sTxt += static_cast<const SwFmtRefMark*>(aCntntAtPos.aFnd.pAttr)->GetRefName();
}
break;
@@ -328,7 +328,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
break;
case RES_MACROFLD:
- sTxt = ((const SwMacroField*)pFld)->GetMacro();
+ sTxt = static_cast<const SwMacroField*>(pFld)->GetMacro();
break;
case RES_GETREFFLD:
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 59bc6f9fb77b..8068fa1f46f5 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -597,7 +597,7 @@ void SwPageGridExample::UpdateExample( const SfxItemSet& rSet )
DELETEZ(pGridItem);
//get the grid information
if(SfxItemState::DEFAULT <= rSet.GetItemState(RES_TEXTGRID, true))
- pGridItem = (SwTextGridItem*)((const SwTextGridItem&)rSet.Get(RES_TEXTGRID)).Clone();
+ pGridItem = (SwTextGridItem*)static_cast<const SwTextGridItem&>(rSet.Get(RES_TEXTGRID)).Clone();
if( SfxItemState::DEFAULT <= rSet.GetItemState( RES_FRAMEDIR, true ))
{
const SvxFrameDirectionItem& rDirItem =
diff --git a/sw/source/uibase/misc/redlndlg.cxx b/sw/source/uibase/misc/redlndlg.cxx
index f4f754d71ccd..4610db7bc42e 100644
--- a/sw/source/uibase/misc/redlndlg.cxx
+++ b/sw/source/uibase/misc/redlndlg.cxx
@@ -1108,7 +1108,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl)
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- OUString sMsg(((const SvxPostItTextItem&)pOutSet->Get(SID_ATTR_POSTIT_TEXT)).GetValue());
+ OUString sMsg(static_cast<const SvxPostItTextItem&>(pOutSet->Get(SID_ATTR_POSTIT_TEXT)).GetValue());
// insert / change comment
pSh->SetRedlineComment(sMsg);
diff --git a/sw/source/uibase/ribbar/workctrl.cxx b/sw/source/uibase/ribbar/workctrl.cxx
index 5cf01617207f..1a2862ddfe65 100644
--- a/sw/source/uibase/ribbar/workctrl.cxx
+++ b/sw/source/uibase/ribbar/workctrl.cxx
@@ -682,7 +682,7 @@ void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() );
if(SfxItemState::DEFAULT <= eState)
{
- OUString sZoom(unicode::formatPercent(((const SfxUInt16Item*)pState)->GetValue(),
+ OUString sZoom(unicode::formatPercent(static_cast<const SfxUInt16Item*>(pState)->GetValue(),
Application::GetSettings().GetUILanguageTag()));
pBox->SetText(sZoom);
pBox->SaveValue();
diff --git a/sw/source/uibase/shells/basesh.cxx b/sw/source/uibase/shells/basesh.cxx
index c2cfbea258cf..4bbccb4b2eaa 100644
--- a/sw/source/uibase/shells/basesh.cxx
+++ b/sw/source/uibase/shells/basesh.cxx
@@ -2101,11 +2101,11 @@ void SwBaseShell::GetTxtFontCtrlState( SfxItemSet& rSet )
vcl::Font aFont;
if(pI && pI->ISA(SvxFontItem))
{
- aFont.SetName( ((const SvxFontItem*)pI)->GetFamilyName());
- aFont.SetStyleName(((const SvxFontItem*)pI)->GetStyleName());
- aFont.SetFamily(((const SvxFontItem*)pI)->GetFamily());
- aFont.SetPitch(((const SvxFontItem*)pI)->GetPitch());
- aFont.SetCharSet(((const SvxFontItem*)pI)->GetCharSet());
+ aFont.SetName( static_cast<const SvxFontItem*>(pI)->GetFamilyName());
+ aFont.SetStyleName(static_cast<const SvxFontItem*>(pI)->GetStyleName());
+ aFont.SetFamily(static_cast<const SvxFontItem*>(pI)->GetFamily());
+ aFont.SetPitch(static_cast<const SvxFontItem*>(pI)->GetPitch());
+ aFont.SetCharSet(static_cast<const SvxFontItem*>(pI)->GetCharSet());
}
bool bVertical = rSh.IsInVerticalText();
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index 2b0aab006f03..7102206994ba 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -293,7 +293,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
if (pArgs)
{
pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
- ((const SfxBoolItem&)(pArgs->Get(SID_FONTWORK))).GetValue());
+ static_cast<const SfxBoolItem&>((pArgs->Get(SID_FONTWORK))).GetValue());
}
else
pVFrame->ToggleChildWindow( SvxFontWorkChildWindow::GetChildWindowId() );
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx b/sw/source/uibase/shells/drwtxtsh.cxx
index 92a20bc8b45c..ebcb72d99b03 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -188,7 +188,7 @@ void SwDrawTextShell::ExecFontWork(SfxRequest& rReq)
if ( rReq.GetArgs() )
{
pVFrame->SetChildWindow(SvxFontWorkChildWindow::GetChildWindowId(),
- ((const SfxBoolItem&) (rReq.GetArgs()->
+ static_cast<const SfxBoolItem&>( (rReq.GetArgs()->
Get(SID_FONTWORK))).GetValue());
}
else
@@ -417,7 +417,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
if(pNewAttrs)
{
pNewAttrs->GetItemState(nSlot, false, &pItem );
- pOLV->InsertText(((const SfxStringItem *)pItem)->GetValue());
+ pOLV->InsertText(static_cast<const SfxStringItem *>(pItem)->GetValue());
}
break;
}
@@ -700,7 +700,7 @@ void SwDrawTextShell::InsertSymbol(SfxRequest& rReq)
OUString sFontName;
if ( pItem )
{
- sSym = ((const SfxStringItem*)pItem)->GetValue();
+ sSym = static_cast<const SfxStringItem*>(pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
@@ -860,7 +860,7 @@ void SwDrawTextShell::GetStatePropPanelAttr(SfxItemSet &rSet)
//if(SfxItemState::DONTCARE != eVState && SfxItemState::DONTCARE != eHState)
if(SfxItemState::DONTCARE != eVState)
{
- SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
+ SdrTextVertAdjust eTVA = (SdrTextVertAdjust)static_cast<const SdrTextVertAdjustItem&>(aAttrs.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) ||
(nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER) ||
(nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM);
diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx
index c38a45ec7eb8..8aa84b57dfeb 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -518,7 +518,7 @@ void SwTextShell::ExecField(SfxRequest &rReq)
if ( pDlg->Execute() == RET_OK )
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- OUString sMsg(((const SvxPostItTextItem&)pOutSet->Get(SID_ATTR_POSTIT_TEXT)).GetValue());
+ OUString sMsg(static_cast<const SvxPostItTextItem&>(pOutSet->Get(SID_ATTR_POSTIT_TEXT)).GetValue());
// Insert or change a comment
rSh.SetRedlineComment(sMsg);
diff --git a/sw/source/uibase/shells/textsh.cxx b/sw/source/uibase/shells/textsh.cxx
index ffe5dd381c77..e7d655cfa73c 100644
--- a/sw/source/uibase/shells/textsh.cxx
+++ b/sw/source/uibase/shells/textsh.cxx
@@ -151,7 +151,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
{
case FN_INSERT_STRING:
if( pItem )
- rSh.InsertByWord(((const SfxStringItem *)pItem)->GetValue());
+ rSh.InsertByWord(static_cast<const SfxStringItem *>(pItem)->GetValue());
break;
case FN_INSERT_SOFT_HYPHEN:
@@ -228,7 +228,7 @@ void SwTextShell::ExecInsert(SfxRequest &rReq)
case SID_HYPERLINK_SETLINK:
if (pItem)
- InsertHyperlink(*((const SvxHyperlinkItem *)pItem));
+ InsertHyperlink(*static_cast<const SvxHyperlinkItem *>(pItem));
rReq.Done();
break;
@@ -973,7 +973,7 @@ void SwTextShell::InsertSymbol( SfxRequest& rReq )
OUString aChars, aFontName;
if ( pItem )
{
- aChars = ((const SfxStringItem*)pItem)->GetValue();
+ aChars = static_cast<const SfxStringItem*>(pItem)->GetValue();
const SfxPoolItem* pFtItem = NULL;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = PTR_CAST( SfxStringItem, pFtItem );
diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx
index 8e1f349e6320..eb45bc4ceea9 100644
--- a/sw/source/uibase/shells/textsh2.cxx
+++ b/sw/source/uibase/shells/textsh2.cxx
@@ -107,22 +107,22 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
// get the data source name
pArgs->GetItemState(FN_DB_DATA_SOURCE_ANY, false, &pSourceItem);
if(pSourceItem)
- ((const SfxUsrAnyItem*)pSourceItem)->GetValue() >>= sSourceArg;
+ static_cast<const SfxUsrAnyItem*>(pSourceItem)->GetValue() >>= sSourceArg;
// get the command
pArgs->GetItemState(FN_DB_DATA_COMMAND_ANY, false, &pCommandItem);
if(pCommandItem)
- ((const SfxUsrAnyItem*)pCommandItem)->GetValue() >>= sCommandArg;
+ static_cast<const SfxUsrAnyItem*>(pCommandItem)->GetValue() >>= sCommandArg;
// get the command type
pArgs->GetItemState(FN_DB_DATA_COMMAND_TYPE_ANY, false, &pCommandTypeItem);
if(pCommandTypeItem)
- ((const SfxUsrAnyItem*)pCommandTypeItem)->GetValue() >>= nCommandTypeArg;
+ static_cast<const SfxUsrAnyItem*>(pCommandTypeItem)->GetValue() >>= nCommandTypeArg;
Reference<XConnection> xConnection;
pArgs->GetItemState(FN_DB_CONNECTION_ANY, false, &pConnectionItem);
if ( pConnectionItem )
- ((const SfxUsrAnyItem*)pConnectionItem)->GetValue() >>= xConnection;
+ static_cast<const SfxUsrAnyItem*>(pConnectionItem)->GetValue() >>= xConnection;
// may be we even get no connection
if ( !xConnection.is() )
{
@@ -136,7 +136,7 @@ void SwTextShell::ExecDB(SfxRequest &rReq)
Reference<XResultSet> xCursor;
pArgs->GetItemState(FN_DB_DATA_CURSOR_ANY, false, &pCursorItem);
if ( pCursorItem )
- ((const SfxUsrAnyItem*)pCursorItem)->GetValue() >>= xCursor;
+ static_cast<const SfxUsrAnyItem*>(pCursorItem)->GetValue() >>= xCursor;
switch (rReq.GetSlot())
{
diff --git a/sw/source/uibase/shells/txtcrsr.cxx b/sw/source/uibase/shells/txtcrsr.cxx
index 151212e4198d..871eb5acc900 100644
--- a/sw/source/uibase/shells/txtcrsr.cxx
+++ b/sw/source/uibase/shells/txtcrsr.cxx
@@ -57,9 +57,9 @@ void SwTextShell::ExecBasicMove(SfxRequest &rReq)
{
const SfxPoolItem *pItem;
if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_MOVE_COUNT, true, &pItem))
- nCount = ((const SfxInt32Item *)pItem)->GetValue();
+ nCount = static_cast<const SfxInt32Item *>(pItem)->GetValue();
if(SfxItemState::SET == pArgs->GetItemState(FN_PARAM_MOVE_SELECTION, true, &pItem))
- bSelect = ((const SfxBoolItem *)pItem)->GetValue();
+ bSelect = static_cast<const SfxBoolItem *>(pItem)->GetValue();
}
switch(rReq.GetSlot())
{
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index a397bb9dadc8..c15d1670f3bc 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -775,11 +775,11 @@ void SwPagePreview::Execute( SfxRequest &rReq )
sal_uInt16 nZoomFactor = USHRT_MAX;
if(SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOM, true, &pItem))
{
- eType = ((const SvxZoomItem *)pItem)->GetType();
- nZoomFactor = ((const SvxZoomItem *)pItem)->GetValue();
+ eType = static_cast<const SvxZoomItem *>(pItem)->GetType();
+ nZoomFactor = static_cast<const SvxZoomItem *>(pItem)->GetValue();
}
else if(SfxItemState::SET == pArgs->GetItemState(FN_PREVIEW_ZOOM, true, &pItem))
- nZoomFactor = ((const SfxUInt16Item *)pItem)->GetValue();
+ nZoomFactor = static_cast<const SfxUInt16Item *>(pItem)->GetValue();
if(USHRT_MAX != nZoomFactor)
SetZoom(eType, nZoomFactor);
}
@@ -792,7 +792,7 @@ void SwPagePreview::Execute( SfxRequest &rReq )
if ( pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ) )
{
- const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = static_cast<const SvxZoomSliderItem *>(pItem)->GetValue();
SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom );
}
}
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 83470b960b3e..1cffd55052b9 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -579,7 +579,7 @@ void SwView::Execute(SfxRequest &rReq)
Sequence <sal_Int8> aPasswd = pIDRA->GetRedlinePassword();
if( aPasswd.getLength() )
{
- OSL_ENSURE( !((const SfxBoolItem*)pItem)->GetValue(), "SwView::Execute(): password set an redlining off doesn't match!" );
+ OSL_ENSURE( !static_cast<const SfxBoolItem*>(pItem)->GetValue(), "SwView::Execute(): password set an redlining off doesn't match!" );
// xmlsec05: new password dialog
vcl::Window* pParent;
const SfxPoolItem* pParentItem;
@@ -602,7 +602,7 @@ void SwView::Execute(SfxRequest &rReq)
}
}
- const sal_uInt16 nOn = ((const SfxBoolItem*)pItem)->GetValue()
+ const sal_uInt16 nOn = static_cast<const SfxBoolItem*>(pItem)->GetValue()
? nsRedlineMode_t::REDLINE_ON : 0;
const sal_uInt16 nMode = m_pWrtShell->GetRedlineMode();
m_pWrtShell->SetRedlineModeAndCheckInsMode( (nMode & ~nsRedlineMode_t::REDLINE_ON) | nOn);
@@ -660,7 +660,7 @@ void SwView::Execute(SfxRequest &rReq)
{
sal_uInt16 nMode = ( ~(nsRedlineMode_t::REDLINE_SHOW_INSERT | nsRedlineMode_t::REDLINE_SHOW_DELETE)
& m_pWrtShell->GetRedlineMode() ) | nsRedlineMode_t::REDLINE_SHOW_INSERT;
- if( ((const SfxBoolItem*)pItem)->GetValue() )
+ if( static_cast<const SfxBoolItem*>(pItem)->GetValue() )
nMode |= nsRedlineMode_t::REDLINE_SHOW_DELETE;
m_pWrtShell->SetRedlineModeAndCheckInsMode( nMode );
@@ -759,20 +759,20 @@ void SwView::Execute(SfxRequest &rReq)
if( pArgs )
{
if( SfxItemState::SET == pArgs->GetItemState( SID_FILE_NAME, false, &pItem ))
- sFileName = ((const SfxStringItem*)pItem)->GetValue();
+ sFileName = static_cast<const SfxStringItem*>(pItem)->GetValue();
bHasFileName = !sFileName.isEmpty();
if( SfxItemState::SET == pArgs->GetItemState( SID_FILTER_NAME, false, &pItem ))
- sFilterName = ((const SfxStringItem*)pItem)->GetValue();
+ sFilterName = static_cast<const SfxStringItem*>(pItem)->GetValue();
if( SfxItemState::SET == pArgs->GetItemState( SID_VERSION, false, &pItem ))
{
- nVersion = ((const SfxInt16Item *)pItem)->GetValue();
+ nVersion = static_cast<const SfxInt16Item *>(pItem)->GetValue();
m_pViewImpl->SetParam( nVersion );
}
if( SfxItemState::SET == pArgs->GetItemState( SID_NO_ACCEPT_DIALOG, false, &pItem ))
{
- bNoAcceptDialog = ((const SfxBoolItem *)pItem)->GetValue();
+ bNoAcceptDialog = static_cast<const SfxBoolItem *>(pItem)->GetValue();
}
}
@@ -1026,7 +1026,7 @@ void SwView::Execute(SfxRequest &rReq)
if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_DEFTABSTOP, false, &pItem))
{
SvxTabStopItem aDefTabs( 0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
- const sal_uInt16 nTab = ((const SfxUInt16Item*)pItem)->GetValue();
+ const sal_uInt16 nTab = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
MakeDefTabs( nTab, aDefTabs );
m_pWrtShell->SetDefault( aDefTabs );
}
@@ -1109,7 +1109,7 @@ void SwView::Execute(SfxRequest &rReq)
bool bShow = false;
if( pArgs &&
SfxItemState::SET == pArgs->GetItemState(nSlot, false, &pItem ))
- bShow = ((const SfxBoolItem*)pItem)->GetValue();
+ bShow = static_cast<const SfxBoolItem*>(pItem)->GetValue();
if((bShow && m_bInMailMerge) != GetViewFrame()->HasChildWindow(nSlot))
GetViewFrame()->ToggleChildWindow(nSlot);
//if fields have been successfully inserted call the "real"
@@ -1185,7 +1185,7 @@ void SwView::Execute(SfxRequest &rReq)
SfxViewFrame* pViewFrame = GetViewFrame();
if (rReq.GetArgs() != NULL)
pViewFrame->SetChildWindow (FN_SPELL_GRAMMAR_DIALOG,
- ((const SfxBoolItem&) (rReq.GetArgs()->
+ static_cast<const SfxBoolItem&>( (rReq.GetArgs()->
Get(FN_SPELL_GRAMMAR_DIALOG))).GetValue());
else
pViewFrame->ToggleChildWindow(FN_SPELL_GRAMMAR_DIALOG);
@@ -1549,7 +1549,7 @@ void SwView::StateStatusLine(SfxItemSet &rSet)
aSet.GetItemState(RES_PARATR_NUMRULE, true))
{
const OUString& rNumStyle =
- ((const SfxStringItem &)
+ static_cast<const SfxStringItem &>(
aSet.Get(RES_PARATR_NUMRULE)).GetValue();
if(!rNumStyle.isEmpty())
{
@@ -1719,15 +1719,15 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
const SfxPoolItem* pViewLayoutItem = 0;
if ( pSet && SfxItemState::SET == pSet->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pViewLayoutItem))
{
- const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pViewLayoutItem)->GetValue();
- const bool bBookMode = ((const SvxViewLayoutItem *)pViewLayoutItem)->IsBookMode();
+ const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem *>(pViewLayoutItem)->GetValue();
+ const bool bBookMode = static_cast<const SvxViewLayoutItem *>(pViewLayoutItem)->IsBookMode();
SetViewLayout( nColumns, bBookMode );
}
if ( pSet && SfxItemState::SET == pSet->GetItemState(SID_ATTR_ZOOM, true, &pItem))
{
- enum SvxZoomType eType = ((const SvxZoomItem *)pItem)->GetType();
- SetZoom( eType, ((const SvxZoomItem *)pItem)->GetValue() );
+ enum SvxZoomType eType = static_cast<const SvxZoomItem *>(pItem)->GetType();
+ SetZoom( eType, static_cast<const SvxZoomItem *>(pItem)->GetValue() );
}
bUp = true;
if ( pItem )
@@ -1744,10 +1744,10 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if ( SfxItemState::SET == pArgs->GetItemState(SID_ATTR_VIEWLAYOUT, true, &pItem ))
{
- const sal_uInt16 nColumns = ((const SvxViewLayoutItem *)pItem)->GetValue();
+ const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem *>(pItem)->GetValue();
const bool bBookMode = (0 == nColumns || 0 != (nColumns % 2)) ?
false :
- ((const SvxViewLayoutItem *)pItem)->IsBookMode();
+ static_cast<const SvxViewLayoutItem *>(pItem)->IsBookMode();
SetViewLayout( nColumns, bBookMode );
}
@@ -1766,7 +1766,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if ( SfxItemState::SET == pArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem ))
{
- const sal_uInt16 nCurrentZoom = ((const SvxZoomSliderItem *)pItem)->GetValue();
+ const sal_uInt16 nCurrentZoom = static_cast<const SvxZoomSliderItem *>(pItem)->GetValue();
SetZoom( SVX_ZOOM_PERCENT, nCurrentZoom );
}
@@ -1782,7 +1782,7 @@ void SwView::ExecuteStatusLine(SfxRequest &rReq)
{
if (SfxItemState::SET == pArgs->GetItemState( nWhich, true, &pItem))
{
- switch ( ((const SfxUInt16Item *)pItem)->GetValue() )
+ switch ( static_cast<const SfxUInt16Item *>(pItem)->GetValue() )
{
case 0: rSh.EnterStdMode(); break;
case 1: rSh.EnterExtMode(); break;
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 0d3661e80ed2..1decd9275a92 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -538,7 +538,7 @@ bool SwView::BeginTextEdit(SdrObject* pObj, SdrPageView* pPV, vcl::Window* pWin,
pOutliner->SetControlWord(nCntrl);
const SfxPoolItem& rItem = pSh->GetDoc()->GetDefault(RES_CHRATR_LANGUAGE);
- pOutliner->SetDefaultLanguage(((const SvxLanguageItem&)rItem).GetLanguage());
+ pOutliner->SetDefaultLanguage(static_cast<const SvxLanguageItem&>(rItem).GetLanguage());
if( bIsNewObj )
pOutliner->SetVertical( SID_DRAW_TEXT_VERTICAL == m_nDrawSfxId ||
@@ -751,7 +751,7 @@ bool SwView::IsDrawTextHyphenate()
EE_PARA_HYPHENATE, EE_PARA_HYPHENATE );
if( pSdrView->GetAttributes( aNewAttr ) &&
aNewAttr.GetItemState( EE_PARA_HYPHENATE ) >= SfxItemState::DEFAULT )
- bHyphenate = ((const SfxBoolItem&)aNewAttr.Get( EE_PARA_HYPHENATE )).
+ bHyphenate = static_cast<const SfxBoolItem&>(aNewAttr.Get( EE_PARA_HYPHENATE )).
GetValue();
return bHyphenate;
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 1a96ef53906b..ae721da903e2 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -89,7 +89,7 @@ void SwView::ExecSearch(SfxRequest& rReq, bool bNoMessage)
const SfxPoolItem* pItem = 0;
bool bQuiet = false;
if(pArgs && SfxItemState::SET == pArgs->GetItemState(SID_SEARCH_QUIET, false, &pItem))
- bQuiet = ((const SfxBoolItem*) pItem)->GetValue();
+ bQuiet = static_cast<const SfxBoolItem*>( pItem)->GetValue();
bool bApi = bQuiet || bNoMessage;
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index e4fe0327d031..2379cb273602 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -1335,7 +1335,7 @@ sal_Bool SwXTextViewCursor::screenDown()
SfxRequest aReq(FN_PAGEDOWN, SfxCallMode::SLOT, m_pView->GetPool());
m_pView->Execute(aReq);
const SfxPoolItem* pRet = aReq.GetReturnValue();
- bRet = pRet && ((const SfxBoolItem*)pRet)->GetValue();
+ bRet = pRet && static_cast<const SfxBoolItem*>(pRet)->GetValue();
}
else
throw uno::RuntimeException();
@@ -1352,7 +1352,7 @@ sal_Bool SwXTextViewCursor::screenUp()
SfxRequest aReq(FN_PAGEUP, SfxCallMode::SLOT, m_pView->GetPool());
m_pView->Execute(aReq);
const SfxPoolItem* pRet = aReq.GetReturnValue();
- bRet = pRet && ((const SfxBoolItem*)pRet)->GetValue();
+ bRet = pRet && static_cast<const SfxBoolItem*>(pRet)->GetValue();
}
else
throw uno::RuntimeException();
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index ef1fd2e90735..7567a201ef48 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -116,12 +116,12 @@ namespace
{
static bool lcl_IsContent(const SvTreeListEntry* pEntry)
{
- return ((const SwTypeNumber*)pEntry->GetUserData())->GetTypeId() == CTYPE_CNT;
+ return static_cast<const SwTypeNumber*>(pEntry->GetUserData())->GetTypeId() == CTYPE_CNT;
}
static bool lcl_IsContentType(const SvTreeListEntry* pEntry)
{
- return ((const SwTypeNumber*)pEntry->GetUserData())->GetTypeId() == CTYPE_CTT;
+ return static_cast<const SwTypeNumber*>(pEntry->GetUserData())->GetTypeId() == CTYPE_CTT;
}
static bool lcl_FindShell(SwWrtShell* pShell)
diff --git a/sw/source/uibase/utlui/numfmtlb.cxx b/sw/source/uibase/utlui/numfmtlb.cxx
index 89630e93894c..d7eb8d662716 100644
--- a/sw/source/uibase/utlui/numfmtlb.cxx
+++ b/sw/source/uibase/utlui/numfmtlb.cxx
@@ -429,7 +429,7 @@ IMPL_LINK( NumFormatListBox, SelectHdl, ListBox *, pBox )
if( bShowLanguageControl && SfxItemState::SET == pOutSet->GetItemState(
SID_ATTR_NUMBERFORMAT_ADD_AUTO, false, &pItem ))
{
- bUseAutomaticLanguage = ((const SfxBoolItem*)pItem)->GetValue();
+ bUseAutomaticLanguage = static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
}
else
diff --git a/sw/source/uibase/utlui/uitool.cxx b/sw/source/uibase/utlui/uitool.cxx
index b354bb2af5d2..6eedf32f2c7c 100644
--- a/sw/source/uibase/utlui/uitool.cxx
+++ b/sw/source/uibase/utlui/uitool.cxx
@@ -297,11 +297,11 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
::FillHdFt(pHeaderFmt, rHeaderSet);
- rPageDesc.ChgHeaderShare(((const SfxBoolItem&)
+ rPageDesc.ChgHeaderShare(static_cast<const SfxBoolItem&>(
rHeaderSet.Get(SID_ATTR_PAGE_SHARED)).GetValue());
if (nFirstShare < 0)
{
- rPageDesc.ChgFirstShare(((const SfxBoolItem&)
+ rPageDesc.ChgFirstShare(static_cast<const SfxBoolItem&>(
rHeaderSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
nFirstShare = rPageDesc.IsFirstShared() ? 1 : 0;
}
@@ -337,11 +337,11 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
::FillHdFt(pFooterFmt, rFooterSet);
- rPageDesc.ChgFooterShare(((const SfxBoolItem&)
+ rPageDesc.ChgFooterShare(static_cast<const SfxBoolItem&>(
rFooterSet.Get(SID_ATTR_PAGE_SHARED)).GetValue());
if (nFirstShare < 0)
{
- rPageDesc.ChgFirstShare(((const SfxBoolItem&)
+ rPageDesc.ChgFirstShare(static_cast<const SfxBoolItem&>(
rFooterSet.Get(SID_ATTR_PAGE_SHARED_FIRST)).GetValue());
nFirstShare = rPageDesc.IsFirstShared() ? 1 : 0;
}
@@ -370,13 +370,13 @@ void ItemSetToPageDesc( const SfxItemSet& rSet, SwPageDesc& rPageDesc )
if(SfxItemState::SET == rSet.GetItemState(
SID_SWREGISTER_MODE, false, &pItem))
{
- bool bSet = ((const SfxBoolItem*)pItem)->GetValue();
+ bool bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
if(!bSet)
rPageDesc.SetRegisterFmtColl(0);
else if(SfxItemState::SET == rSet.GetItemState(
SID_SWREGISTER_COLLECTION, false, &pItem))
{
- const OUString& rColl = ((const SfxStringItem*)pItem)->GetValue();
+ const OUString& rColl = static_cast<const SfxStringItem*>(pItem)->GetValue();
SwDoc& rDoc = *rMaster.GetDoc();
SwTxtFmtColl* pColl = rDoc.FindTxtFmtCollByName( rColl );
if( !pColl )
diff --git a/sw/source/uibase/utlui/zoomctrl.cxx b/sw/source/uibase/utlui/zoomctrl.cxx
index 3faa4a64f29e..e4990cc9fcd7 100644
--- a/sw/source/uibase/utlui/zoomctrl.cxx
+++ b/sw/source/uibase/utlui/zoomctrl.cxx
@@ -45,7 +45,7 @@ void SwZoomControl::StateChanged( sal_uInt16 nSID, SfxItemState eState,
{
if(SfxItemState::DEFAULT == eState && pState->ISA( SfxStringItem ))
{
- sPreviewZoom = ((const SfxStringItem*)pState)->GetValue();
+ sPreviewZoom = static_cast<const SfxStringItem*>(pState)->GetValue();
GetStatusBar().SetItemText( GetId(), sPreviewZoom );
}
else