[Libreoffice-commits] core.git: 2 commits - sw/inc sw/source
Noel Grandin
noel at peralex.com
Wed Nov 26 01:47:31 PST 2014
sw/inc/pagedesc.hxx | 2
sw/inc/unotbl.hxx | 15 ++---
sw/source/core/inc/frame.hxx | 4 -
sw/source/core/inc/layfrm.hxx | 6 +-
sw/source/core/inc/txtfrm.hxx | 6 +-
sw/source/core/text/frmform.cxx | 4 -
sw/source/core/txtnode/atrflyin.cxx | 18 +++---
sw/source/core/txtnode/atrftn.cxx | 6 +-
sw/source/core/txtnode/fmtatr2.cxx | 7 +-
sw/source/core/txtnode/fntcache.cxx | 2
sw/source/core/txtnode/fntcap.cxx | 2
sw/source/core/txtnode/ndhints.cxx | 4 -
sw/source/core/txtnode/ndtxt.cxx | 10 +--
sw/source/core/txtnode/swfntcch.cxx | 2
sw/source/core/txtnode/swfont.cxx | 14 ++---
sw/source/core/txtnode/thints.cxx | 74 +++++++++++++--------------
sw/source/core/txtnode/txtedt.cxx | 4 -
sw/source/core/undo/SwUndoFmt.cxx | 28 +++++-----
sw/source/core/undo/SwUndoPageDesc.cxx | 18 +++---
sw/source/core/undo/unattr.cxx | 4 -
sw/source/core/undo/undel.cxx | 6 +-
sw/source/core/undo/undobj.cxx | 4 -
sw/source/core/undo/undobj1.cxx | 4 -
sw/source/core/undo/undraw.cxx | 14 ++---
sw/source/core/undo/unfmco.cxx | 4 -
sw/source/core/undo/unins.cxx | 6 +-
sw/source/core/undo/unspnd.cxx | 2
sw/source/core/undo/untbl.cxx | 53 +++++++++----------
sw/source/core/undo/untblk.cxx | 2
sw/source/core/unocore/SwXTextDefaults.cxx | 6 +-
sw/source/core/unocore/unocrsrhelper.cxx | 4 -
sw/source/core/unocore/unodraw.cxx | 4 -
sw/source/core/unocore/unoevent.cxx | 8 +-
sw/source/core/unocore/unofield.cxx | 68 ++++++++++++------------
sw/source/core/unocore/unoframe.cxx | 42 +++++++--------
sw/source/core/unocore/unoobj.cxx | 2
sw/source/core/unocore/unoobj2.cxx | 10 +--
sw/source/core/unocore/unosett.cxx | 6 +-
sw/source/core/unocore/unostyle.cxx | 36 ++++++-------
sw/source/core/unocore/unotbl.cxx | 20 +++----
sw/source/filter/html/css1atr.cxx | 44 ++++++++--------
sw/source/filter/html/htmlctxt.cxx | 8 +-
sw/source/filter/html/htmldrawwriter.cxx | 10 +--
sw/source/filter/html/htmlfld.cxx | 2
sw/source/filter/html/htmlfldw.cxx | 14 ++---
sw/source/filter/html/htmlflywriter.cxx | 8 +-
sw/source/filter/html/htmlform.cxx | 4 -
sw/source/filter/html/htmlgrin.cxx | 2
sw/source/filter/html/htmlnumreader.cxx | 2
sw/source/filter/html/htmlsect.cxx | 6 +-
sw/source/filter/html/htmltab.cxx | 10 +--
sw/source/filter/html/htmltabw.cxx | 4 -
sw/source/filter/html/svxcss1.cxx | 14 ++---
sw/source/filter/html/swhtml.cxx | 8 +-
sw/source/filter/html/wrthtml.cxx | 18 +++---
sw/source/filter/writer/wrtswtbl.cxx | 2
sw/source/filter/ww8/docxattributeoutput.cxx | 2
sw/source/filter/ww8/docxexport.cxx | 2
sw/source/filter/ww8/rtfattributeoutput.cxx | 2
sw/source/filter/ww8/rtfexport.cxx | 2
sw/source/filter/ww8/wrtw8nds.cxx | 10 +--
sw/source/filter/ww8/wrtww8.cxx | 2
sw/source/filter/ww8/wrtww8gr.cxx | 2
sw/source/filter/ww8/ww8atr.cxx | 10 +--
sw/source/filter/ww8/ww8graf.cxx | 4 -
sw/source/filter/ww8/ww8par.cxx | 4 -
sw/source/filter/ww8/ww8par6.cxx | 2
sw/source/filter/xml/xmlfmt.cxx | 2
sw/source/filter/xml/xmlfmte.cxx | 4 -
sw/source/filter/xml/xmliteme.cxx | 2
sw/source/filter/xml/xmltbli.cxx | 4 -
sw/source/filter/xml/xmltexte.cxx | 2
sw/source/ui/chrdlg/chardlg.cxx | 4 -
sw/source/ui/chrdlg/numpara.cxx | 8 +-
sw/source/ui/config/optload.cxx | 6 +-
sw/source/ui/config/optpage.cxx | 12 ++--
sw/source/ui/dbui/dbinsdlg.cxx | 2
sw/source/ui/dialog/uiregionsw.cxx | 2
sw/source/ui/fldui/fldvar.cxx | 2
sw/source/ui/index/swuiidxmrk.cxx | 2
sw/source/ui/misc/num.cxx | 2
sw/source/ui/misc/titlepage.cxx | 2
sw/source/ui/table/tabledlg.cxx | 34 ++++++------
sw/source/uibase/app/apphdl.cxx | 2
sw/source/uibase/app/docsh.cxx | 8 +-
sw/source/uibase/app/docsh2.cxx | 2
sw/source/uibase/app/docst.cxx | 18 +++---
sw/source/uibase/app/docstyle.cxx | 4 -
sw/source/uibase/dialog/regionsw.cxx | 18 +++---
sw/source/uibase/docvw/edtwin2.cxx | 4 -
sw/source/uibase/frmdlg/colex.cxx | 2
sw/source/uibase/misc/redlndlg.cxx | 2
sw/source/uibase/ribbar/workctrl.cxx | 2
sw/source/uibase/shells/basesh.cxx | 10 +--
sw/source/uibase/shells/drawsh.cxx | 2
sw/source/uibase/shells/drwtxtsh.cxx | 8 +-
sw/source/uibase/shells/textfld.cxx | 2
sw/source/uibase/shells/textsh.cxx | 6 +-
sw/source/uibase/shells/textsh2.cxx | 10 +--
sw/source/uibase/shells/txtcrsr.cxx | 4 -
sw/source/uibase/uiview/pview.cxx | 8 +-
sw/source/uibase/uiview/view2.cxx | 38 ++++++-------
sw/source/uibase/uiview/viewdraw.cxx | 4 -
sw/source/uibase/uiview/viewsrch.cxx | 2
sw/source/uibase/uno/unotxvw.cxx | 4 -
sw/source/uibase/utlui/content.cxx | 4 -
sw/source/uibase/utlui/numfmtlb.cxx | 2
sw/source/uibase/utlui/uitool.cxx | 12 ++--
sw/source/uibase/utlui/zoomctrl.cxx | 2
109 files changed, 501 insertions(+), 498 deletions(-)
New commits:
commit 5be1635d45e28e047af0cde4e387b07a3131cc9d
Author: Noel Grandin <noel at peralex.com>
Date: Wed Nov 26 10:27:15 2014 +0200
loplugin: cstylecast
Change-Id: Idce7220056f7bc339a5060fd0bd6fbbbdde4f6ff
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index cd96b26..472568b 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -973,11 +973,11 @@ inline void SwFrm::ResetRetouche() const
inline SwLayoutFrm *SwFrm::GetNextLayoutLeaf()
{
- return (SwLayoutFrm*)((const SwFrm*)this)->GetNextLayoutLeaf();
+ return (SwLayoutFrm*)static_cast<const SwFrm*>(this)->GetNextLayoutLeaf();
}
inline SwLayoutFrm *SwFrm::GetPrevLayoutLeaf()
{
- return (SwLayoutFrm*)((const SwFrm*)this)->GetPrevLayoutLeaf();
+ return (SwLayoutFrm*)static_cast<const SwFrm*>(this)->GetPrevLayoutLeaf();
}
inline const SwLayoutFrm *SwFrm::GetNextLayoutLeaf() const
{
diff --git a/sw/source/core/inc/layfrm.hxx b/sw/source/core/inc/layfrm.hxx
index d074034..c4d3772 100644
--- a/sw/source/core/inc/layfrm.hxx
+++ b/sw/source/core/inc/layfrm.hxx
@@ -195,17 +195,17 @@ public:
*/
inline SwCntntFrm* SwLayoutFrm::ContainsCntnt()
{
- return (SwCntntFrm*)(((const SwLayoutFrm*)this)->ContainsCntnt());
+ return (SwCntntFrm*)(static_cast<const SwLayoutFrm*>(this)->ContainsCntnt());
}
inline SwCellFrm* SwLayoutFrm::FirstCell()
{
- return (SwCellFrm*)(((const SwLayoutFrm*)this)->FirstCell());
+ return (SwCellFrm*)(static_cast<const SwLayoutFrm*>(this)->FirstCell());
}
inline SwFrm* SwLayoutFrm::ContainsAny( const bool _bInvestigateFtnForSections )
{
- return (SwFrm*)(((const SwLayoutFrm*)this)->ContainsAny( _bInvestigateFtnForSections ));
+ return (SwFrm*)(static_cast<const SwLayoutFrm*>(this)->ContainsAny( _bInvestigateFtnForSections ));
}
/**
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx
index d76fc92..3317c27 100644
--- a/sw/source/core/inc/txtfrm.hxx
+++ b/sw/source/core/inc/txtfrm.hxx
@@ -670,9 +670,9 @@ inline bool SwTxtFrm::HasPara() const
/// 9104: Frm().Height() - Prt().Height(), see widorp.cxx and 7455, 6114, 7908
inline SwTwips SwTxtFrm::GetRstHeight() const
{
- return !GetUpper() ? 0 : ((const SwFrm*)GetUpper())->Frm().Top()
- + ((const SwFrm*)GetUpper())->Prt().Top()
- + ((const SwFrm*)GetUpper())->Prt().Height()
+ return !GetUpper() ? 0 : static_cast<const SwFrm*>(GetUpper())->Frm().Top()
+ + static_cast<const SwFrm*>(GetUpper())->Prt().Top()
+ + static_cast<const SwFrm*>(GetUpper())->Prt().Height()
- Frm().Top() - (Frm().Height() - Prt().Height());
}
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index 71b353f..2edea7c 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -1574,7 +1574,7 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
return;
// If necessary the pPara
- sal_uInt16 nOld = ((const SwTxtMargin&)rLine).GetDropHeight();
+ sal_uInt16 nOld = static_cast<const SwTxtMargin&>(rLine).GetDropHeight();
bool bShrink = false;
bool bGrow = false;
bool bGoOn = rLine.IsOnceMore();
@@ -1593,7 +1593,7 @@ void SwTxtFrm::FormatOnceMore( SwTxtFormatter &rLine, SwTxtFormatInfo &rInf )
bGoOn = rLine.IsOnceMore();
if( bGoOn )
{
- const sal_uInt16 nNew = ((const SwTxtMargin&)rLine).GetDropHeight();
+ const sal_uInt16 nNew = static_cast<const SwTxtMargin&>(rLine).GetDropHeight();
if( nOld == nNew )
bGoOn = false;
else
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 6e63fbd..a2c4fac 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -989,10 +989,10 @@ const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, sal_uInt16 nDeep )
bool swhtml_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
{
- return ((const SvxFontItem &)r1).GetFamilyName() ==
- ((const SvxFontItem &)r2).GetFamilyName() &&
- ((const SvxFontItem &)r1).GetFamily() ==
- ((const SvxFontItem &)r2).GetFamily();
+ return static_cast<const SvxFontItem &>(r1).GetFamilyName() ==
+ static_cast<const SvxFontItem &>(r2).GetFamilyName() &&
+ static_cast<const SvxFontItem &>(r1).GetFamily() ==
+ static_cast<const SvxFontItem &>(r2).GetFamily();
}
void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
@@ -2393,7 +2393,7 @@ static Writer& OutCSS1_SvxCaseMap( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
- switch( ((const SvxCaseMapItem&)rHt).GetCaseMap() )
+ switch( static_cast<const SvxCaseMapItem&>(rHt).GetCaseMap() )
{
case SVX_CASEMAP_NOT_MAPPED:
rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_font_variant, sCSS1_PV_normal );
@@ -2428,7 +2428,7 @@ static Writer& OutCSS1_SvxColor( Writer& rWrt, const SfxPoolItem& rHt )
OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"write color as Hint?" );
- Color aColor( ((const SvxColorItem&)rHt).GetValue() );
+ Color aColor( static_cast<const SvxColorItem&>(rHt).GetValue() );
if( COL_AUTO == aColor.GetColor() )
aColor.SetColor( COL_BLACK );
@@ -2473,7 +2473,7 @@ static Writer& OutCSS1_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
// MS IE3b1 has problems with single quotes
sal_uInt16 nMode = rHTMLWrt.nCSS1OutMode & CSS1_OUTMODE_ANY_ON;
sal_Unicode cQuote = nMode == CSS1_OUTMODE_RULE_ON ? '\"' : '\'';
- SwHTMLWriter::PrepareFontList( ((const SvxFontItem&)rHt), sOut, cQuote,
+ SwHTMLWriter::PrepareFontList( static_cast<const SvxFontItem&>(rHt), sOut, cQuote,
true );
rHTMLWrt.OutCSS1_Property( sCSS1_P_font_family, sOut );
@@ -2500,7 +2500,7 @@ static Writer& OutCSS1_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsCSS1Script( nScript ) )
return rWrt;
- sal_uInt32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
+ sal_uInt32 nHeight = static_cast<const SvxFontHeightItem&>(rHt).GetHeight();
OString sHeight(OString::number(nHeight/20) + OString(sCSS1_UNIT_pt));
rHTMLWrt.OutCSS1_PropertyAscii(sCSS1_P_font_size, sHeight);
@@ -2521,7 +2521,7 @@ static Writer& OutCSS1_SvxPosture( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
const sal_Char *pStr = 0;
- switch( ((const SvxPostureItem&)rHt).GetPosture() )
+ switch( static_cast<const SvxPostureItem&>(rHt).GetPosture() )
{
case ITALIC_NONE: pStr = sCSS1_PV_normal; break;
case ITALIC_OBLIQUE: pStr = sCSS1_PV_oblique; break;
@@ -2549,7 +2549,7 @@ static Writer& OutCSS1_SvxKerning( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
- sal_Int16 nValue = ((const SvxKerningItem&)rHt).GetValue();
+ sal_Int16 nValue = static_cast<const SvxKerningItem&>(rHt).GetValue();
if( nValue )
{
OStringBuffer sOut;
@@ -2596,7 +2596,7 @@ static Writer& OutCSS1_SvxLanguage( Writer& rWrt, const SfxPoolItem& rHt )
OSL_ENSURE( !rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT),
"write Language as Hint?" );
- LanguageType eLang = ((const SvxLanguageItem &)rHt).GetLanguage();
+ LanguageType eLang = static_cast<const SvxLanguageItem &>(rHt).GetLanguage();
if( LANGUAGE_DONTKNOW == eLang )
return rWrt;
@@ -2635,7 +2635,7 @@ static Writer& OutCSS1_SvxHidden( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
- if ( ((const SvxCharHiddenItem&)rHt).GetValue() )
+ if ( static_cast<const SvxCharHiddenItem&>(rHt).GetValue() )
rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_display, sCSS1_PV_none );
return rWrt;
@@ -2655,7 +2655,7 @@ static Writer& OutCSS1_SvxFontWeight( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
const sal_Char *pStr = 0;
- switch( ((const SvxWeightItem&)rHt).GetWeight() )
+ switch( static_cast<const SvxWeightItem&>(rHt).GetWeight() )
{
case WEIGHT_ULTRALIGHT: pStr = sCSS1_PV_extra_light; break;
case WEIGHT_LIGHT: pStr = sCSS1_PV_light; break;
@@ -2758,7 +2758,7 @@ static Writer& OutCSS1_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
const sal_Char* pStr = 0;
- switch( ((const SvxAdjustItem&)rHt).GetAdjust() )
+ switch( static_cast<const SvxAdjustItem&>(rHt).GetAdjust() )
{
case SVX_ADJUST_LEFT: pStr = sCSS1_PV_left; break;
case SVX_ADJUST_RIGHT: pStr = sCSS1_PV_right; break;
@@ -2778,7 +2778,7 @@ static Writer& OutCSS1_SvxFmtSplit( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
- const sal_Char *pStr = ((const SvxFmtSplitItem&)rHt).GetValue()
+ const sal_Char *pStr = static_cast<const SvxFmtSplitItem&>(rHt).GetValue()
? sCSS1_PV_auto
: sCSS1_PV_avoid;
rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_page_break_inside, pStr );
@@ -2790,7 +2790,7 @@ static Writer& OutCSS1_SwFmtLayoutSplit( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
- const sal_Char *pStr = ((const SwFmtLayoutSplit&)rHt).GetValue()
+ const sal_Char *pStr = static_cast<const SwFmtLayoutSplit&>(rHt).GetValue()
? sCSS1_PV_auto
: sCSS1_PV_avoid;
rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_page_break_inside, pStr );
@@ -2802,7 +2802,7 @@ static Writer& OutCSS1_SvxWidows( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
- OString aStr(OString::number(((const SvxWidowsItem&)rHt).GetValue()));
+ OString aStr(OString::number(static_cast<const SvxWidowsItem&>(rHt).GetValue()));
rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_widows, aStr );
return rWrt;
@@ -2812,7 +2812,7 @@ static Writer& OutCSS1_SvxOrphans( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
- OString aStr(OString::number(((const SvxOrphansItem&)rHt).GetValue()));
+ OString aStr(OString::number(static_cast<const SvxOrphansItem&>(rHt).GetValue()));
rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_orphans, aStr );
return rWrt;
@@ -3157,9 +3157,9 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
return rWrt;
// start getting a few values
-// const Brush &rBrush = ((const SvxBrushItem &)rHt).GetBrush();
- const Color & rColor = ((const SvxBrushItem &)rHt).GetColor();
- SvxGraphicPosition ePos = ((const SvxBrushItem &)rHt).GetGraphicPos();
+// const Brush &rBrush = static_cast<const SvxBrushItem &>(rHt).GetBrush();
+ const Color & rColor = static_cast<const SvxBrushItem &>(rHt).GetColor();
+ SvxGraphicPosition ePos = static_cast<const SvxBrushItem &>(rHt).GetGraphicPos();
// get the color
bool bColor = false;
@@ -3176,7 +3176,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
OUString aGraphicInBase64;
// Embedded Grafic -> export WriteEmbedded
- const Graphic* pGrf = ((const SvxBrushItem &)rHt).GetGraphic();
+ const Graphic* pGrf = static_cast<const SvxBrushItem &>(rHt).GetGraphic();
if( pGrf )
{
sal_uLong nErr = XOutBitmap::GraphicToBase64(*pGrf, aGraphicInBase64);
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index aceeb35..4845703 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -601,7 +601,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
{
sal_uInt16 nUpper = 0, nLower = 0;
GetULSpaceFromContext( nUpper, nLower );
- SvxULSpaceItem aULSpace( *((const SvxULSpaceItem *)pItem) );
+ SvxULSpaceItem aULSpace( *static_cast<const SvxULSpaceItem *>(pItem) );
if( !rPropInfo.bTopMargin )
aULSpace.SetUpper( nUpper );
if( !rPropInfo.bBottomMargin )
@@ -622,17 +622,17 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
break;
case RES_CHRATR_FONTSIZE:
// es werden keine Attribute mit %-Angaben gesetzt
- if( ((const SvxFontHeightItem *)pItem)->GetProp() == 100 )
+ if( static_cast<const SvxFontHeightItem *>(pItem)->GetProp() == 100 )
ppAttr = &aAttrTab.pFontHeight;
break;
case RES_CHRATR_CJK_FONTSIZE:
// es werden keine Attribute mit %-Angaben gesetzt
- if( ((const SvxFontHeightItem *)pItem)->GetProp() == 100 )
+ if( static_cast<const SvxFontHeightItem *>(pItem)->GetProp() == 100 )
ppAttr = &aAttrTab.pFontHeightCJK;
break;
case RES_CHRATR_CTL_FONTSIZE:
// es werden keine Attribute mit %-Angaben gesetzt
- if( ((const SvxFontHeightItem *)pItem)->GetProp() == 100 )
+ if( static_cast<const SvxFontHeightItem *>(pItem)->GetProp() == 100 )
ppAttr = &aAttrTab.pFontHeightCTL;
break;
diff --git a/sw/source/filter/html/htmldrawwriter.cxx b/sw/source/filter/html/htmldrawwriter.cxx
index db80f95..ccc67a7 100644
--- a/sw/source/filter/html/htmldrawwriter.cxx
+++ b/sw/source/filter/html/htmldrawwriter.cxx
@@ -193,7 +193,7 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
// LOOP
sal_Int32 nCount =
- ((const SdrTextAniCountItem&)rItemSet.Get( SDRATTR_TEXT_ANICOUNT ))
+ static_cast<const SdrTextAniCountItem&>(rItemSet.Get( SDRATTR_TEXT_ANICOUNT ))
.GetValue();
if( 0==nCount )
nCount = SDRTEXTANI_SLIDE==eAniKind ? 1 : -1;
@@ -202,14 +202,14 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
// SCROLLDELAY
sal_uInt16 nDelay =
- ((const SdrTextAniDelayItem&)rItemSet.Get( SDRATTR_TEXT_ANIDELAY ))
+ static_cast<const SdrTextAniDelayItem&>(rItemSet.Get( SDRATTR_TEXT_ANIDELAY ))
.GetValue();
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_scrolldelay).
append("=\"").append(static_cast<sal_Int32>(nDelay)).append("\"");
// SCROLLAMOUNT
sal_Int16 nAmount =
- ((const SdrTextAniAmountItem&)rItemSet.Get( SDRATTR_TEXT_ANIAMOUNT ))
+ static_cast<const SdrTextAniAmountItem&>(rItemSet.Get( SDRATTR_TEXT_ANIAMOUNT ))
.GetValue();
if( nAmount < 0 )
{
@@ -268,11 +268,11 @@ Writer& OutHTML_DrawFrmFmtAsMarquee( Writer& rWrt,
// BGCOLOR
drawing::FillStyle eFillStyle =
- ((const XFillStyleItem&)rItemSet.Get(XATTR_FILLSTYLE)).GetValue();
+ static_cast<const XFillStyleItem&>(rItemSet.Get(XATTR_FILLSTYLE)).GetValue();
if( drawing::FillStyle_SOLID==eFillStyle )
{
const Color& rFillColor =
- ((const XFillColorItem&)rItemSet.Get(XATTR_FILLCOLOR)).GetColorValue();
+ static_cast<const XFillColorItem&>(rItemSet.Get(XATTR_FILLCOLOR)).GetColorValue();
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_bgcolor).append("=");
rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index eb3a17e..c2156b6 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -629,7 +629,7 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag
break;
if( RES_TXTATR_FIELD == pAttr->pItem->Which() &&
- RES_SCRIPTFLD == ((const SwFmtFld *)pAttr->pItem)->GetField()->GetTyp()->Which() )
+ RES_SCRIPTFLD == static_cast<const SwFmtFld *>(pAttr->pItem)->GetField()->GetTyp()->Which() )
{
bMoveFwd = false;
break;
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index 4266b85..69633d3 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -104,7 +104,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
;
}
OSL_ENSURE( pSubStr, "ubekannter Subtyp fuer SwExtUserField" );
- bFixed = ((const SwExtUserField*)pFld)->IsFixed();
+ bFixed = static_cast<const SwExtUserField*>(pFld)->IsFixed();
break;
case RES_AUTHORFLD:
@@ -115,7 +115,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case AF_SHORTCUT: pFmtStr = OOO_STRING_SW_HTML_FF_shortcut; break;
}
OSL_ENSURE( pFmtStr, "ubekanntes Format fuer SwAuthorField" );
- bFixed = ((const SwAuthorField*)pFld)->IsFixed();
+ bFixed = static_cast<const SwAuthorField*>(pFld)->IsFixed();
break;
case RES_DATETIMEFLD:
@@ -143,7 +143,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
if( (SvxExtNumType)nFmt==SVX_NUM_CHAR_SPECIAL )
{
- aValue = ((const SwPageNumberField *)pFld)->GetUserString();
+ aValue = static_cast<const SwPageNumberField *>(pFld)->GetUserString();
}
else
{
@@ -198,7 +198,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
break;
}
}
- bFixed = ((const SwDocInfoField*)pFld)->IsFixed();
+ bFixed = static_cast<const SwDocInfoField*>(pFld)->IsFixed();
if( bNumFmt )
{
if( bFixed )
@@ -206,7 +206,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
// Fuer ein fixes Feld och den Num-Value ausgeben.
// Fixe Felder ohne Zahlenformate sollte es
// eigentlich nicht geben. OSL_ENSURE(ist unten.
- dNumValue = ((const SwDocInfoField*)pFld)->GetValue();
+ dNumValue = static_cast<const SwDocInfoField*>(pFld)->GetValue();
bNumValue = true;
}
else if( !nFmt )
@@ -249,7 +249,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
default:
;
}
- bFixed = ((const SwFileNameField*)pFld)->IsFixed();
+ bFixed = static_cast<const SwFileNameField*>(pFld)->IsFixed();
OSL_ENSURE( pFmtStr, "unbekanntes Format fuer SwFileNameField" );
break;
}
@@ -512,7 +512,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine( true );
- bool bURL = ((const SwScriptField *)pFld)->IsCodeURL();
+ bool bURL = static_cast<const SwScriptField *>(pFld)->IsCodeURL();
const OUString& rType = pFld->GetPar1();
OUString aContents, aURL;
if(bURL)
diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx
index 90c6a04..183787e 100644
--- a/sw/source/filter/html/htmlflywriter.cxx
+++ b/sw/source/filter/html/htmlflywriter.cxx
@@ -214,7 +214,7 @@ sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
if( SfxItemState::SET == rItemSet.GetItemState( RES_COL,
true, &pItem ) &&
- ((const SwFmtCol *)pItem)->GetNumCols() > 1 )
+ static_cast<const SwFmtCol *>(pItem)->GetNumCols() > 1 )
{
// spaltiger Rahmen
eType = HTML_FRMTYPE_MULTICOL;
@@ -676,7 +676,7 @@ OString SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( (nFrmOpts & HTML_FRMOPT_SIZE) &&
SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) &&
( (nFrmOpts & HTML_FRMOPT_ANYSIZE) ||
- ATT_FIX_SIZE == ((const SwFmtFrmSize *)pItem)->GetHeightSizeType()) )
+ ATT_FIX_SIZE == static_cast<const SwFmtFrmSize *>(pItem)->GetHeightSizeType()) )
{
const SwFmtFrmSize *pFSItem = (const SwFmtFrmSize *)pItem;
sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent();
@@ -942,7 +942,7 @@ void SwHTMLWriter::writeFrameFormatOptions(HtmlWriter& aHtml, const SwFrmFmt& rF
if( (nFrameOptions & HTML_FRMOPT_SIZE) &&
SfxItemState::SET == rItemSet.GetItemState( RES_FRM_SIZE, true, &pItem ) &&
( (nFrameOptions & HTML_FRMOPT_ANYSIZE) ||
- ATT_FIX_SIZE == ((const SwFmtFrmSize *)pItem)->GetHeightSizeType()) )
+ ATT_FIX_SIZE == static_cast<const SwFmtFrmSize *>(pItem)->GetHeightSizeType()) )
{
const SwFmtFrmSize *pFSItem = (const SwFmtFrmSize *)pItem;
sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent();
@@ -1372,7 +1372,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// Events
if (SfxItemState::SET == rItemSet.GetItemState(RES_FRMMACRO, true, &pItem))
{
- const SvxMacroTableDtor& rMacTable = ((const SvxMacroItem *)pItem)->GetMacroTable();
+ const SvxMacroTableDtor& rMacTable = static_cast<const SvxMacroItem *>(pItem)->GetMacroTable();
if (!rMacTable.empty())
{
HtmlWriterHelper::applyEvents(aHtml, rMacTable, aImageEventTable, rHTMLWrt.bCfgStarBasic);
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index f0317e2..c6d0701 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -974,7 +974,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
&pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
- const Color &rColor = ((const SvxBrushItem *)pItem)->GetColor();
+ const Color &rColor = static_cast<const SvxBrushItem *>(pItem)->GetColor();
/// copy color, if color is not "no fill"/"auto fill"
if( rColor.GetColor() != COL_TRANSPARENT )
{
@@ -990,7 +990,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
&pItem ) &&
xPropSetInfo->hasPropertyByName( sPropName ) )
{
- aTmp <<= (sal_Int32)((const SvxColorItem *)pItem)->GetValue()
+ aTmp <<= (sal_Int32)static_cast<const SvxColorItem *>(pItem)->GetValue()
.GetRGBColor();
rFCompPropSet->setPropertyValue( sPropName, aTmp );
}
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 5755bcd..d33b337 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -485,7 +485,7 @@ IMAGE_SETEVENT:
if( aAttrTab.pINetFmt )
{
const OUString& rURL =
- ((const SwFmtINetFmt&)aAttrTab.pINetFmt->GetItem()).GetValue();
+ static_cast<const SwFmtINetFmt&>(aAttrTab.pINetFmt->GetItem()).GetValue();
pCSS1Parser->SetATagStyles();
sal_uInt16 nPoolId = static_cast< sal_uInt16 >(pDoc->IsVisitedURL( rURL )
diff --git a/sw/source/filter/html/htmlnumreader.cxx b/sw/source/filter/html/htmlnumreader.cxx
index 492c1d2..8d774d4 100644
--- a/sw/source/filter/html/htmlnumreader.cxx
+++ b/sw/source/filter/html/htmlnumreader.cxx
@@ -289,7 +289,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
if( aPropInfo.bTextIndent )
{
short nTextIndent =
- ((const SvxLRSpaceItem &)aItemSet.Get( RES_LR_SPACE ))
+ static_cast<const SvxLRSpaceItem &>(aItemSet.Get( RES_LR_SPACE ))
.GetTxtFirstLineOfst();
aNumFmt.SetFirstLineOffset( nTextIndent );
bChangeNumFmt = true;
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 4f9c9ef..89ae517 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -441,7 +441,7 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader,
if( pTxtNode )
{
const SvxULSpaceItem& rULSpace =
- ((const SvxULSpaceItem&)pTxtNode
+ static_cast<const SvxULSpaceItem&>(pTxtNode
->SwCntntNode::GetAttr( RES_UL_SPACE ));
// Der untere Absatz-Abstand wird zum Abstand zur
@@ -474,7 +474,7 @@ void SwHTMLParser::FixHeaderFooterDistance( bool bHeader,
if( pTxtNode )
{
const SvxULSpaceItem& rULSpace =
- ((const SvxULSpaceItem&)pTxtNode
+ static_cast<const SvxULSpaceItem&>(pTxtNode
->SwCntntNode::GetAttr( RES_UL_SPACE ));
// Der obere Absatz-Abstand wird zum Abstand zur
@@ -769,7 +769,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet,
sal_uInt16 nFlags )
{
RndStdIds eAnchorId =
- ((const SwFmtAnchor&)rItemSet.Get( RES_ANCHOR )).GetAnchorId();
+ static_cast<const SwFmtAnchor&>(rItemSet.Get( RES_ANCHOR )).GetAnchorId();
// Den Rahmen anlegen
SwFlyFrmFmt* pFlyFmt = pDoc->MakeFlySection( eAnchorId, pPam->GetPoint(),
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index bd41531..093c708 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -1508,7 +1508,7 @@ void HTMLTable::FixFrameFmt( SwTableBox *pBox,
SfxItemState::SET==pCNd->GetpSwAttrSet()->GetItemState(
RES_PARATR_ADJUST, false, &pItem ) )
{
- eAdjust = ((const SvxAdjustItem *)pItem)
+ eAdjust = static_cast<const SvxAdjustItem *>(pItem)
->GetAdjust();
}
}
@@ -2961,7 +2961,7 @@ SvxBrushItem* SwHTMLParser::CreateBrushItem( const Color *pColor,
if( SfxItemState::SET == aItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ) )
{
- pBrushItem = new SvxBrushItem( *((const SvxBrushItem *)pItem) );
+ pBrushItem = new SvxBrushItem( *static_cast<const SvxBrushItem *>(pItem) );
}
}
@@ -3504,7 +3504,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
RES_PARATR_SPLIT, false, &pItem ) )
{
aItemSet.Put(
- SwFmtLayoutSplit( ((const SvxFmtSplitItem *)pItem)
+ SwFmtLayoutSplit( static_cast<const SvxFmtSplitItem *>(pItem)
->GetValue() ) );
aItemSet.ClearItem( RES_PARATR_SPLIT );
}
@@ -3703,7 +3703,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
if( nSpace )
aFrmSet.Put( SvxULSpaceItem(nSpace,nSpace, RES_UL_SPACE) );
- RndStdIds eAnchorId = ((const SwFmtAnchor&)aFrmSet.
+ RndStdIds eAnchorId = static_cast<const SwFmtAnchor&>(aFrmSet.
Get( RES_ANCHOR )).
GetAnchorId();
SwFrmFmt *pFrmFmt = pDoc->MakeFlySection(
@@ -3924,7 +3924,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
// in der Zelle kann sich ein Bereich befinden!
eTabAdjust = aAttrTab.pAdjust
- ? ((const SvxAdjustItem&)aAttrTab.pAdjust->GetItem()).
+ ? static_cast<const SvxAdjustItem&>(aAttrTab.pAdjust->GetItem()).
GetAdjust()
: SVX_ADJUST_END;
}
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index e3adc94..4db0fc7 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -438,12 +438,12 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
bool bNumFmt = false, bValue = false;
if( SfxItemState::SET==rItemSet.GetItemState( RES_BOXATR_FORMAT, false, &pItem ) )
{
- nNumFmt = ((const SwTblBoxNumFormat *)pItem)->GetValue();
+ nNumFmt = static_cast<const SwTblBoxNumFormat *>(pItem)->GetValue();
bNumFmt = true;
}
if( SfxItemState::SET==rItemSet.GetItemState( RES_BOXATR_VALUE, false, &pItem ) )
{
- nValue = ((const SwTblBoxValue *)pItem)->GetValue();
+ nValue = static_cast<const SwTblBoxValue *>(pItem)->GetValue();
bValue = true;
if( !bNumFmt )
nNumFmt = pBox->GetFrmFmt()->GetTblBoxNumFmt().GetValue();
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index b660bea..f97b962 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -2003,7 +2003,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
&pItem ) )
{
- SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
+ SvxLRSpaceItem aLRItem( *static_cast<const SvxLRSpaceItem*>(pItem) );
aLRItem.SetTxtFirstLineOfst( nIndent );
rItemSet.Put( aLRItem );
}
@@ -2058,7 +2058,7 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
&pItem ) )
{
- SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
+ SvxLRSpaceItem aLRItem( *static_cast<const SvxLRSpaceItem*>(pItem) );
aLRItem.SetTxtLeft( (sal_uInt16)nLeft );
rItemSet.Put( aLRItem );
}
@@ -2113,7 +2113,7 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
&pItem ) )
{
- SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
+ SvxLRSpaceItem aLRItem( *static_cast<const SvxLRSpaceItem*>(pItem) );
aLRItem.SetRight( (sal_uInt16)nRight );
rItemSet.Put( aLRItem );
}
@@ -2171,7 +2171,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nULSpace, false,
&pItem ) )
{
- SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
+ SvxULSpaceItem aULItem( *static_cast<const SvxULSpaceItem*>(pItem) );
aULItem.SetUpper( nUpper );
rItemSet.Put( aULItem );
}
@@ -2229,7 +2229,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nULSpace, false,
&pItem ) )
{
- SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
+ SvxULSpaceItem aULItem( *static_cast<const SvxULSpaceItem*>(pItem) );
aULItem.SetLower( nLower );
rItemSet.Put( aULItem );
}
@@ -2332,7 +2332,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nLRSpace, false,
&pItem ) )
{
- SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
+ SvxLRSpaceItem aLRItem( *static_cast<const SvxLRSpaceItem*>(pItem) );
if( bSetMargins[3] )
aLRItem.SetLeft( (sal_uInt16)nMargins[3] );
if( bSetMargins[1] )
@@ -2361,7 +2361,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
if( SfxItemState::SET == rItemSet.GetItemState( aItemIds.nULSpace, false,
&pItem ) )
{
- SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
+ SvxULSpaceItem aULItem( *static_cast<const SvxULSpaceItem*>(pItem) );
if( bSetMargins[0] )
aULItem.SetUpper( (sal_uInt16)nMargins[0] );
if( bSetMargins[2] )
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 37ad019..2edd0df 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -1688,7 +1688,7 @@ void SwHTMLParser::NextToken( int nToken )
Show(); // show what we have up to here
SvxAdjust eAdjust = aAttrTab.pAdjust
- ? ((const SvxAdjustItem&)aAttrTab.pAdjust->GetItem()).
+ ? static_cast<const SvxAdjustItem&>(aAttrTab.pAdjust->GetItem()).
GetAdjust()
: SVX_ADJUST_END;
BuildTable( eAdjust );
@@ -2348,7 +2348,7 @@ bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, bool bUpdateNum )
{
bool bFont = (nIdx % 5) == 0;
const SfxPoolItem& rItem =
- ((const SwCntntNode *)pTxtNd)->GetAttr( nWhich );
+ static_cast<const SwCntntNode *>(pTxtNd)->GetAttr( nWhich );
if( bFont ? swhtml_css1atr_equalFontItems(rItem,pHt->GetAttr())
: rItem == pHt->GetAttr() )
{
@@ -2852,7 +2852,7 @@ void SwHTMLParser::_SetAttr( bool bChkEnd, bool bBeforeTable,
{
sal_uInt16 nFldWhich =
pPostIts
- ? ((const SwFmtFld *)pAttr->pItem)->GetField()->GetTyp()->Which()
+ ? static_cast<const SwFmtFld *>(pAttr->pItem)->GetField()->GetTyp()->Which()
: 0;
if( pPostIts && (RES_POSTITFLD == nFldWhich ||
RES_SCRIPTFLD == nFldWhich) )
@@ -4910,7 +4910,7 @@ void SwHTMLParser::InsertSpacer()
// der Rahmen anlegen
RndStdIds eAnchorId =
- ((const SwFmtAnchor &)aFrmSet.Get(RES_ANCHOR)).GetAnchorId();
+ static_cast<const SwFmtAnchor &>(aFrmSet.Get(RES_ANCHOR)).GetAnchorId();
SwFrmFmt *pFlyFmt = pDoc->MakeFlySection( eAnchorId,
pPam->GetPoint(), &aFrmSet );
// Ggf Frames anlegen und auto-geb. Rahmen registrieren
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index caf0584..c62e000 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -173,7 +173,7 @@ void SwHTMLWriter::SetupFilterOptions(SfxMedium& rMedium)
return;
- OUString sFilterOptions = ((const SfxStringItem*)pItem)->GetValue();
+ OUString sFilterOptions = static_cast<const SfxStringItem*>(pItem)->GetValue();
if (sFilterOptions == "SkipImages")
{
mbSkipImages = true;
@@ -313,7 +313,7 @@ sal_uLong SwHTMLWriter::WriteStream()
nCSS1Script = CSS1_OUTMODE_WESTERN;
break;
}
- eLang = ((const SvxLanguageItem&)pDoc
+ eLang = static_cast<const SvxLanguageItem&>(pDoc
->GetDefault(GetLangWhichIdFromScript(nCSS1Script))).GetLanguage();
nFootNote = nEndNote = 0;
@@ -396,7 +396,7 @@ sal_uLong SwHTMLWriter::WriteStream()
SfxItemState::SET == rPageItemSet.GetItemState( RES_HEADER, true, &pItem) )
{
const SwFrmFmt *pHeaderFmt =
- ((const SwFmtHeader *)pItem)->GetHeaderFmt();
+ static_cast<const SwFmtHeader *>(pItem)->GetHeaderFmt();
if( pHeaderFmt )
OutHTML_HeaderFooter( *this, *pHeaderFmt, true );
}
@@ -416,7 +416,7 @@ sal_uLong SwHTMLWriter::WriteStream()
SfxItemState::SET == rPageItemSet.GetItemState( RES_FOOTER, true, &pItem) )
{
const SwFrmFmt *pFooterFmt =
- ((const SwFmtFooter *)pItem)->GetFooterFmt();
+ static_cast<const SwFmtFooter *>(pItem)->GetFooterFmt();
if( pFooterFmt )
OutHTML_HeaderFooter( *this, *pFooterFmt, false );
}
@@ -522,7 +522,7 @@ static const SwFmtCol *lcl_html_GetFmtCol( const SwSection& rSection,
const SfxPoolItem* pItem;
if( FILE_LINK_SECTION != rSection.GetType() &&
SfxItemState::SET == rFmt.GetAttrSet().GetItemState(RES_COL,false,&pItem) &&
- ((const SwFmtCol *)pItem)->GetNumCols() > 1 )
+ static_cast<const SwFmtCol *>(pItem)->GetNumCols() > 1 )
{
pCol = (const SwFmtCol *)pItem;
}
@@ -860,7 +860,7 @@ static void OutBodyColor( const sal_Char* pTag, const SwFmt *pFmt,
if( COL_AUTO == aColor.GetColor() )
aColor.SetColor( COL_BLACK );
- Color aRefColor( ((const SvxColorItem*)pRefItem)->GetValue() );
+ Color aRefColor( static_cast<const SvxColorItem*>(pRefItem)->GetValue() );
if( COL_AUTO == aRefColor.GetColor() )
aRefColor.SetColor( COL_BLACK );
@@ -919,7 +919,7 @@ sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
break;
const sal_uInt16 nFldWhich =
- ((const SwFmtFld&)pHt->GetAttr()).GetField()->GetTyp()->Which();
+ static_cast<const SwFmtFld&>(pHt->GetAttr()).GetField()->GetTyp()->Which();
if( RES_POSTITFLD!=nFldWhich &&
RES_SCRIPTFLD!=nFldWhich )
break;
@@ -986,7 +986,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
SwNode *pNd = pDoc->GetNodes()[ nNodeIdx ];
if( pNd->IsCntntNode() )
{
- pPageDesc = ((const SwFmtPageDesc &)pNd->GetCntntNode()
+ pPageDesc = static_cast<const SwFmtPageDesc &>(pNd->GetCntntNode()
->GetAttr(RES_PAGEDESC)).GetPageDesc();
break;
}
@@ -1236,7 +1236,7 @@ void SwHTMLWriter::OutBackground( const SfxItemSet& rItemSet, bool bGraphic )
if( SfxItemState::SET == rItemSet.GetItemState( RES_BACKGROUND, false,
&pItem ))
{
- OutBackground( ((const SvxBrushItem*)pItem), bGraphic );
+ OutBackground( static_cast<const SvxBrushItem*>(pItem), bGraphic );
}
}
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 7cd25b9..fb5d2af 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -42,7 +42,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
if( SfxItemState::SET == rItemSet.GetItemState( RES_VERT_ORIENT, false, &pItem ) )
{
sal_Int16 eBoxVertOri =
- ((const SwFmtVertOrient *)pItem)->GetVertOrient();
+ static_cast<const SwFmtVertOrient *>(pItem)->GetVertOrient();
if( text::VertOrientation::CENTER==eBoxVertOri || text::VertOrientation::BOTTOM==eBoxVertOri)
eCellVertOri = eBoxVertOri;
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 8926a7a..81db98a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -6974,7 +6974,7 @@ static void impl_WriteTabElement( FSHelperPtr pSerializer,
void DocxAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
{
const SfxPoolItem* pLR = m_rExport.HasItem( RES_LR_SPACE );
- long nCurrentLeft = pLR ? ((const SvxLRSpaceItem*)pLR)->GetTxtLeft() : 0;
+ long nCurrentLeft = pLR ? static_cast<const SvxLRSpaceItem*>(pLR)->GetTxtLeft() : 0;
sal_uInt16 nCount = rTabStop.Count();
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 5b4c381..5d3be74 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -218,7 +218,7 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt )
{
if (const SwFmt *pParent = rFmt.DerivedFrom())
{
- if (((const SwTxtFmtColl*)pParent)->IsAssignedToListLevelOfOutlineStyle())
+ if (static_cast<const SwTxtFmtColl*>(pParent)->IsAssignedToListLevelOfOutlineStyle())
{
::sax_fastparser::FSHelperPtr pSerializer = m_pAttrOutput->GetSerializer( );
// Level 9 disables the outline
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 84b031a..51a4c62 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2222,7 +2222,7 @@ void RtfAttributeOutput::CharUnderline(const SvxUnderlineItem& rUnderline)
const SfxPoolItem* pItem = m_rExport.HasItem(RES_CHRATR_WORDLINEMODE);
bool bWord = false;
if (pItem)
- bWord = ((const SvxWordLineModeItem*)pItem)->GetValue() ? true : false;
+ bWord = static_cast<const SvxWordLineModeItem*>(pItem)->GetValue() ? true : false;
switch (rUnderline.GetLineStyle())
{
case UNDERLINE_SINGLE:
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index b0261af..5949a28 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -754,7 +754,7 @@ bool RtfExport::DisallowInheritingOutlineNumbering(const SwFmt& rFmt)
{
if (const SwFmt* pParent = rFmt.DerivedFrom())
{
- if (((const SwTxtFmtColl*)pParent)->IsAssignedToListLevelOfOutlineStyle())
+ if (static_cast<const SwTxtFmtColl*>(pParent)->IsAssignedToListLevelOfOutlineStyle())
{
// Level 9 disables the outline
Strm().WriteCharPtr(OOO_STRING_SVTOOLS_RTF_LEVEL).WriteInt32(9);
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index a5f6c0b..3dac906 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -1577,7 +1577,7 @@ OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nAktPos,
m_rExport.m_aCurrentCharPropStarts.push( nAktPos );
const SfxPoolItem &rItem = GetItem(RES_CHRATR_CASEMAP);
- if (SVX_CASEMAP_TITEL == ((const SvxCaseMapItem&)rItem).GetValue())
+ if (SVX_CASEMAP_TITEL == static_cast<const SvxCaseMapItem&>(rItem).GetValue())
{
sal_uInt16 nScriptType = i18n::ScriptType::LATIN;
if (g_pBreakIt->GetBreakIter().is())
@@ -1587,14 +1587,14 @@ OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nAktPos,
switch (nScriptType)
{
case i18n::ScriptType::ASIAN:
- nLanguage = ((const SvxLanguageItem&)GetItem(RES_CHRATR_CJK_LANGUAGE)).GetLanguage();
+ nLanguage = static_cast<const SvxLanguageItem&>(GetItem(RES_CHRATR_CJK_LANGUAGE)).GetLanguage();
break;
case i18n::ScriptType::COMPLEX:
- nLanguage = ((const SvxLanguageItem&)GetItem(RES_CHRATR_CTL_LANGUAGE)).GetLanguage();
+ nLanguage = static_cast<const SvxLanguageItem&>(GetItem(RES_CHRATR_CTL_LANGUAGE)).GetLanguage();
break;
case i18n::ScriptType::LATIN:
default:
- nLanguage = ((const SvxLanguageItem&)GetItem(RES_CHRATR_LANGUAGE)).GetLanguage();
+ nLanguage = static_cast<const SvxLanguageItem&>(GetItem(RES_CHRATR_LANGUAGE)).GetLanguage();
break;
}
@@ -2806,7 +2806,7 @@ bool MSWordExportBase::NoPageBreakSection( const SfxItemSet* pSet )
bNoPageBreak = true;
else
{
- SvxBreak eBreak = ((const SvxFmtBreakItem*)pI)->GetBreak();
+ SvxBreak eBreak = static_cast<const SvxFmtBreakItem*>(pI)->GetBreak();
switch (eBreak)
{
case SVX_BREAK_PAGE_BEFORE:
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 16083af..59aaf3e 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3227,7 +3227,7 @@ void WW8Export::ExportDocument_Impl()
if (pStdTxtFmtColl && SfxItemState::SET == pStdTxtFmtColl->GetItemState(
RES_PARATR_HYPHENZONE, false, &pItem))
{
- pDop->fAutoHyphen = ((const SvxHyphenZoneItem*)pItem)->IsHyphen();
+ pDop->fAutoHyphen = static_cast<const SvxHyphenZoneItem*>(pItem)->IsHyphen();
}
StoreDoc1();
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index c0f0717..9bff119 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -445,7 +445,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
SwTwips nHeight = rFlyFmt.GetFrmSize().GetHeight();
nHeight/=20; //nHeight was in twips, want it in half points, but
//then half of total height.
- long nFontHeight = ((const SvxFontHeightItem&)
+ long nFontHeight = static_cast<const SvxFontHeightItem&>(
GetItem(RES_CHRATR_FONTSIZE)).GetHeight();
nHeight-=nFontHeight/20;
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index a56517a..7d7bfc9 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -736,7 +736,7 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt)
{
if (const SwFmt *pParent = rFmt.DerivedFrom())
{
- if (((const SwTxtFmtColl*)pParent)->IsAssignedToListLevelOfOutlineStyle())
+ if (static_cast<const SwTxtFmtColl*>(pParent)->IsAssignedToListLevelOfOutlineStyle())
{
if (bWrtWW8)
{
@@ -769,8 +769,8 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
{
int nLvl = MAXLEVEL;
- if (((const SwTxtFmtColl&)rFmt).IsAssignedToListLevelOfOutlineStyle())
- nLvl = ((const SwTxtFmtColl&)rFmt).GetAssignedOutlineStyleLevel();
+ if (static_cast<const SwTxtFmtColl&>(rFmt).IsAssignedToListLevelOfOutlineStyle())
+ nLvl = static_cast<const SwTxtFmtColl&>(rFmt).GetAssignedOutlineStyleLevel();
if (nLvl >= 0 && nLvl < MAXLEVEL)
{
@@ -1284,7 +1284,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
const SfxPoolItem* pItem = m_rWW8Export.HasItem( RES_CHRATR_WORDLINEMODE );
bool bWord = false;
if (pItem)
- bWord = ((const SvxWordLineModeItem*)pItem)->GetValue() ? true : false;
+ bWord = static_cast<const SvxWordLineModeItem*>(pItem)->GetValue() ? true : false;
// WW95 - parameters: 0 = none, 1 = single, 2 = by Word,
// 3 = double, 4 = dotted, 5 = hidden
@@ -3340,7 +3340,7 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn)
const SwSectionNode* pSectNd = rFtn.GetTxtFtn()->GetTxtNode().
FindSectionNode();
while( pSectNd && FTNEND_ATPGORDOCEND ==
- ((const SwFmtFtnEndAtTxtEnd&)pSectNd->GetSection().GetFmt()->
+ static_cast<const SwFmtFtnEndAtTxtEnd&>(pSectNd->GetSection().GetFmt()->
GetFmtAttr( nWh, true)).GetValue() )
pSectNd = pSectNd->StartOfSectionNode()->FindSectionNode();
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 53f3839..82ed68c 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -1547,7 +1547,7 @@ sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
return nOutsideThick;
}
-#define WW8ITEMVALUE(ItemSet,Id,Cast) ((const Cast&)(ItemSet).Get(Id)).GetValue()
+#define WW8ITEMVALUE(ItemSet,Id,Cast) static_cast<const Cast&>((ItemSet).Get(Id)).GetValue()
void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
SfxItemSet& rFlySet, MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType,
@@ -1749,7 +1749,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
eState = rOldSet.GetItemState(XATTR_FILLSTYLE, true, &pItem);
if (eState == SfxItemState::SET)
{
- const drawing::FillStyle eFill = ((const XFillStyleItem*)pItem)->GetValue();
+ const drawing::FillStyle eFill = static_cast<const XFillStyleItem*>(pItem)->GetValue();
switch (eFill)
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index d2d30be..d069e20 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1737,7 +1737,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
bFound = pSty->GetAttrSet().GetItemState(RES_PARATR_TABSTOP, false,
&pTabs) == SfxItemState::SET;
if( bFound )
- aAttr = *((const SvxTabStopItem*)pTabs);
+ aAttr = *static_cast<const SvxTabStopItem*>(pTabs);
else
{
sal_uInt16 nOldTabBase = nTabBase;
@@ -5522,7 +5522,7 @@ namespace
const SfxPoolItem *pPasswordItem;
if(pSet && SfxItemState::SET == pSet->GetItemState(SID_PASSWORD, true, &pPasswordItem))
- aPassw = ((const SfxStringItem *)pPasswordItem)->GetValue();
+ aPassw = static_cast<const SfxStringItem *>(pPasswordItem)->GetValue();
else
{
try
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index c3a468b..cad7b49 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -4384,7 +4384,7 @@ void SwWW8ImplReader::Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short n
nLang = SVBT16ToShort( pLang );
else
{
- nLang = ((const SvxLanguageItem *)
+ nLang = static_cast<const SvxLanguageItem *>(
GetFmtAttr(RES_CHRATR_CJK_LANGUAGE))->GetLanguage();
}
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index 6276c77..9a638be 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -1011,7 +1011,7 @@ void SwXMLImport::UpdateTxtCollConditions( SwDoc *pDoc )
if( pColl && RES_CONDTXTFMTCOLL == pColl->Which() )
{
const SwFmtCollConditions& rConditions =
- ((const SwConditionTxtFmtColl *)pColl)->GetCondColls();
+ static_cast<const SwConditionTxtFmtColl *>(pColl)->GetCondColls();
bool bSendModify = false;
for( size_t j=0; j < rConditions.size() && !bSendModify; ++j )
{
diff --git a/sw/source/filter/xml/xmlfmte.cxx b/sw/source/filter/xml/xmlfmte.cxx
index 48196c2..d34ca35 100644
--- a/sw/source/filter/xml/xmlfmte.cxx
+++ b/sw/source/filter/xml/xmlfmte.cxx
@@ -87,7 +87,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
{
OUString sName;
const SwPageDesc *pPageDesc =
- ((const SwFmtPageDesc *)pItem)->GetPageDesc();
+ static_cast<const SwFmtPageDesc *>(pItem)->GetPageDesc();
if( pPageDesc )
SwStyleNameMapper::FillProgName(
pPageDesc->GetName(),
@@ -109,7 +109,7 @@ void SwXMLExport::ExportFmt( const SwFmt& rFmt, enum XMLTokenEnum eFamily )
false, &pItem ) )
{
sal_Int32 nFormat = (sal_Int32)
- ((const SwTblBoxNumFormat *)pItem)->GetValue();
+ static_cast<const SwTblBoxNumFormat *>(pItem)->GetValue();
if ( (nFormat != -1) && (nFormat != NUMBERFORMAT_TEXT) )
{
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index 254129b..b13d83e 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -130,7 +130,7 @@ void SwXMLTableItemMapper_Impl::handleSpecialItem(
&pItem ) )
{
sal_Int16 eHoriOrient =
- ((const SwFmtHoriOrient *)pItem)->GetHoriOrient();
+ static_cast<const SwFmtHoriOrient *>(pItem)->GetHoriOrient();
bool bExport = false;
sal_uInt16 nMemberId =
static_cast<sal_uInt16>( rEntry.nMemberId & MID_SW_FLAG_MASK );
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index a9a9a50..673027b 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -797,7 +797,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false,
&pItem ) )
{
- const SwFmtFrmSize *pSize = ((const SwFmtFrmSize *)pItem);
+ const SwFmtFrmSize *pSize = static_cast<const SwFmtFrmSize *>(pItem);
nWidth = pSize->GetWidth();
bRelWidth = ATT_VAR_SIZE == pSize->GetHeightSizeType();
}
@@ -2676,7 +2676,7 @@ void SwXMLTableContext::MakeTable()
if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_HORI_ORIENT, false,
&pItem ) )
{
- eHoriOrient = ((const SwFmtHoriOrient *)pItem)->GetHoriOrient();
+ eHoriOrient = static_cast<const SwFmtHoriOrient *>(pItem)->GetHoriOrient();
switch( eHoriOrient )
{
case text::HoriOrientation::FULL:
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 79ea895..3d9dab5 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -99,7 +99,7 @@ void SwXMLTextParagraphExport::exportStyleContent(
if( pColl && RES_CONDTXTFMTCOLL == pColl->Which() )
{
const SwFmtCollConditions& rConditions =
- ((const SwConditionTxtFmtColl *)pColl)->GetCondColls();
+ static_cast<const SwConditionTxtFmtColl *>(pColl)->GetCondColls();
for( size_t i=0; i < rConditions.size(); ++i )
{
const SwCollCondition& rCond = rConditions[i];
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 4e68e20..63d8260 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -156,7 +156,7 @@ SwCharURLPage::SwCharURLPage(vcl::Window* pParent, const SfxItemSet& rCoreSet)
( 0 != ( pShell = SfxObjectShell::Current()) &&
0 != (pItem = pShell->GetItem(SID_HTML_MODE))))
{
- sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
if(HTMLMODE_ON & nHtmlMode)
m_pCharStyleContainer->Hide();
}
@@ -227,7 +227,7 @@ void SwCharURLPage::Reset(const SfxItemSet* rSet)
}
if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_SELECTION, false, &pItem))
{
- m_pTextED->SetText(((const SfxStringItem*)pItem)->GetValue());
+ m_pTextED->SetText(static_cast<const SfxStringItem*>(pItem)->GetValue());
m_pTextFT->Enable( false );
m_pTextED->Enable( false );
}
diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx
index b9ee893..5fbe8425 100644
--- a/sw/source/ui/chrdlg/numpara.cxx
+++ b/sw/source/ui/chrdlg/numpara.cxx
@@ -73,7 +73,7 @@ SwParagraphNumTabPage::SwParagraphNumTabPage(vcl::Window* pParent, const SfxItem
( 0 != ( pObjSh = SfxObjectShell::Current()) &&
0 != (pItem = pObjSh->GetItem(SID_HTML_MODE))))
{
- const sal_uInt16 nHtmlMode = ((const SfxUInt16Item*)pItem)->GetValue();
+ const sal_uInt16 nHtmlMode = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
if (HTMLMODE_ON & nHtmlMode)
m_pCountParaFram->Hide();
@@ -167,7 +167,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet )
sal_Int16 nOutlineLv;
if( eItemState >= SfxItemState::DEFAULT )
{
- nOutlineLv = ((const SfxUInt16Item &)rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) )).GetValue();
+ nOutlineLv = static_cast<const SfxUInt16Item &>(rSet->Get( GetWhich(SID_ATTR_PARA_OUTLINE_LEVEL) )).GetValue();
m_pOutlineLvLB->SelectEntryPos( nOutlineLv ) ;
}
else
@@ -180,7 +180,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet )
if( eItemState >= SfxItemState::DEFAULT )
{
- OUString aStyle = ((const SfxStringItem &)rSet->Get( GetWhich(SID_ATTR_PARA_NUMRULE) )).GetValue();
+ OUString aStyle = static_cast<const SfxStringItem &>(rSet->Get( GetWhich(SID_ATTR_PARA_NUMRULE) )).GetValue();
if(aStyle.isEmpty())
aStyle = m_pNumberStyleLB->GetEntry(0);
@@ -221,7 +221,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet* rSet )
eItemState = rSet->GetItemState( FN_NUMBER_NEWSTART_AT);
if( eItemState > SfxItemState::DEFAULT )
{
- const sal_uInt16 nNewStart = ((const SfxUInt16Item&)rSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
+ const sal_uInt16 nNewStart = static_cast<const SfxUInt16Item&>(rSet->Get(FN_NUMBER_NEWSTART_AT)).GetValue();
const bool bNotMax = USHRT_MAX != nNewStart;
m_pNewStartNumberCB->Check(bNotMax);
m_pNewStartNF->SetValue(bNotMax ? nNewStart : 1);
diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx
index 9349881..5787104 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*)((const SwPtrItem*)pItem)->GetValue();
+ m_pWrtShell = (SwWrtShell*)static_cast<const SwPtrItem*>(pItem)->GetValue();
SwFldUpdateFlags eFldFlags = AUTOUPD_GLOBALSETTING;
m_nOldLinkMode = GLOBALSETTING;
@@ -312,7 +312,7 @@ void SwLoadOptPage::Reset( const SfxItemSet* rSet)
if(SfxItemState::SET == rSet->GetItemState(SID_ATTR_APPLYCHARUNIT, false, &pItem))
{
- bool bUseCharUnit = ((const SfxBoolItem*)pItem)->GetValue();
+ bool bUseCharUnit = static_cast<const SfxBoolItem*>(pItem)->GetValue();
m_pUseCharUnit->Check(bUseCharUnit);
}
else
@@ -558,7 +558,7 @@ void SwCaptionOptPage::Reset( const SfxItemSet* rSet)
const SfxPoolItem* pItem;
if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem))
{
- bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
+ bHTMLMode = 0 != (static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON);
}
DelUserData();
diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx
index c2b594b..3e65294 100644
--- a/sw/source/ui/config/optpage.cxx
+++ b/sw/source/ui/config/optpage.cxx
@@ -752,7 +752,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
FONT_GROUP_CJK == nFontGroup ? SID_ATTR_CHAR_CJK_LANGUAGE : SID_ATTR_CHAR_CTL_LANGUAGE;
if( SfxItemState::SET == rSet->GetItemState(nLangSlot, false, &pLang))
- eLanguage = ((const SvxLanguageItem*)pLang)->GetValue();
+ eLanguage = static_cast<const SvxLanguageItem*>(pLang)->GetValue();
OUString sToReplace = sScriptWestern;
if(FONT_GROUP_CJK == nFontGroup )
@@ -770,7 +770,7 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_PRINTER, false, &pItem))
{
- pPrt = (SfxPrinter*)((const SwPtrItem*)pItem)->GetValue();
+ pPrt = (SfxPrinter*)static_cast<const SwPtrItem*>(pItem)->GetValue();
}
else
{
@@ -807,12 +807,12 @@ void SwStdFontTabPage::Reset( const SfxItemSet* rSet)
}
if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_STDFONTS, false, &pItem))
{
- pFontConfig = (SwStdFontConfig*)((const SwPtrItem*)pItem)->GetValue();
+ pFontConfig = (SwStdFontConfig*)static_cast<const SwPtrItem*>(pItem)->GetValue();
}
if(SfxItemState::SET == rSet->GetItemState(FN_PARAM_WRTSHELL, false, &pItem))
{
- pWrtShell = (SwWrtShell*)((const SwPtrItem*)pItem)->GetValue();
+ pWrtShell = (SwWrtShell*)static_cast<const SwPtrItem*>(pItem)->GetValue();
}
OUString sStdBackup;
OUString sOutBackup;
@@ -1211,7 +1211,7 @@ void SwTableOptionsTabPage::Reset( const SfxItemSet* rSet)
const SfxPoolItem* pItem;
if(SfxItemState::SET == rSet->GetItemState(SID_HTML_MODE, false, &pItem))
{
- bHTMLMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
+ bHTMLMode = 0 != (static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON);
}
// hide certain controls for html
@@ -1421,7 +1421,7 @@ void SwShdwCrsrOptionsTabPage::Reset( const SfxItemSet* rSet )
}
if( SfxItemState::SET == rSet->GetItemState( FN_PARAM_CRSR_IN_PROTECTED, false, &pItem ))
- m_pCrsrInProtCB->Check(((const SfxBoolItem*)pItem)->GetValue());
+ m_pCrsrInProtCB->Check(static_cast<const SfxBoolItem*>(pItem)->GetValue());
m_pCrsrInProtCB->SaveValue();
const SwDocDisplayItem* pDocDisplayAttr = 0;
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index a2eb4d6..04cc190 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -1438,7 +1438,7 @@ void SwInsertDBColAutoPilot::SetTabSet()
}
if( SfxItemState::SET == pTblSet->GetItemState( FN_PARAM_TABLE_NAME, false,
- &pItem ) && ((const SfxStringItem*)pItem)->GetValue() ==
+ &pItem ) && static_cast<const SfxStringItem*>(pItem)->GetValue() ==
rSh.GetTableFmt()->GetName() )
pTblSet->ClearItem( FN_PARAM_TABLE_NAME );
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index b0c0903..8c6c7d1e 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1464,7 +1464,7 @@ short SwInsertSectionTabDialog::Ok()
if(SfxItemState::SET == pOutputItemSet->GetItemState(RES_COL, false, &pCol))
{
aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS,
- ((const SwFmtCol*)pCol)->GetColumns().size()));
+ static_cast<const SwFmtCol*>(pCol)->GetColumns().size()));
}
aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_NAME,
m_pSectionData->GetSectionName()));
diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx
index 7f935c0..7df0add 100644
--- a/sw/source/ui/fldui/fldvar.cxx
+++ b/sw/source/ui/fldui/fldvar.cxx
@@ -610,7 +610,7 @@ void SwFldVarPage::UpdateSubType()
break;
case TYP_GETFLD:
- if (GetCurField() && aList[i] == ((const SwFormulaField*)GetCurField())->GetFormula())
+ if (GetCurField() && aList[i] == static_cast<const SwFormulaField*>(GetCurField())->GetFormula())
bInsert = true;
break;
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 5cf90a4..26a4389 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -328,7 +328,7 @@ void SwIndexMarkPane::UpdateLanguageDependenciesForPhoneticReading()
}
SfxItemSet aLangSet(pSh->GetAttrPool(), nWhich, nWhich);
pSh->GetCurAttr(aLangSet);
- nLangForPhoneticReading = ((const SvxLanguageItem&)aLangSet.Get(nWhich)).GetLanguage();
+ nLangForPhoneticReading = static_cast<const SvxLanguageItem&>(aLangSet.Get(nWhich)).GetLanguage();
}
}
diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx
index cd2ed14..459c038 100644
--- a/sw/source/ui/misc/num.cxx
+++ b/sw/source/ui/misc/num.cxx
@@ -368,7 +368,7 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& )
const SfxItemSet* pExampleSet = GetTabDialog()->GetExampleSet();
if(pExampleSet && pExampleSet->GetItemState(FN_PARAM_NUM_PRESET, false, &pItem) != SfxItemState::UNKNOWN)
{
- bPreset = ((const SfxBoolItem*)pItem)->GetValue();
+ bPreset = static_cast<const SfxBoolItem*>(pItem)->GetValue();
}
bModified = (!pActNum->GetNumFmt( 0 ) || bPreset);
if(*pActNum != *pSaveNum ||
diff --git a/sw/source/ui/misc/titlepage.cxx b/sw/source/ui/misc/titlepage.cxx
index 1ddc306..d29f24c 100644
--- a/sw/source/ui/misc/titlepage.cxx
+++ b/sw/source/ui/misc/titlepage.cxx
@@ -38,7 +38,7 @@ namespace
const SfxPoolItem* pItem(0);
if (SfxItemState::SET == aSet.GetItemState( RES_PAGEDESC, true, &pItem ) && pItem)
{
- ::boost::optional<sal_uInt16> oNumOffset = ((const SwFmtPageDesc *)pItem)->GetNumOffset();
+ ::boost::optional<sal_uInt16> oNumOffset = static_cast<const SwFmtPageDesc *>(pItem)->GetNumOffset();
if (oNumOffset)
rPageNo = oNumOffset.get();
if (ppPageFmtDesc)
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index d70b4fd..2d0ff78 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -97,7 +97,7 @@ SwFormatTablePage::SwFormatTablePage(vcl::Window* pParent, const SfxItemSet& rSe
const SfxPoolItem* pItem;
if(SfxItemState::SET == rSet.GetItemState(SID_HTML_MODE, false, &pItem))
- bHtmlMode = 0 != (((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON);
+ bHtmlMode = 0 != (static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON);
bool bCTL = SW_MOD()->GetCTLOptions().IsCTLFontEnabled();
get<VclContainer>("properties")->Show(!bHtmlMode && bCTL);
@@ -447,13 +447,13 @@ void SwFormatTablePage::Reset( const SfxItemSet* )
//Name
if(SfxItemState::SET == rSet.GetItemState( FN_PARAM_TABLE_NAME, false, &pItem ))
{
- m_pNameED->SetText(((const SfxStringItem*)pItem)->GetValue());
+ m_pNameED->SetText(static_cast<const SfxStringItem*>(pItem)->GetValue());
m_pNameED->SaveValue();
}
if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem ))
{
- pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue();
+ pTblData = (SwTableRep*)static_cast<const SwPtrItem*>( pItem)->GetValue();
nMinTableWidth = pTblData->GetColCount() * MINLAY;
if(pTblData->GetWidthPercent())
@@ -545,9 +545,9 @@ void SwFormatTablePage::Reset( const SfxItemSet* )
if(SfxItemState::SET == rSet.GetItemState( RES_UL_SPACE, false,&pItem ))
{
m_pTopMF->SetValue(m_pTopMF->Normalize(
- ((const SvxULSpaceItem*)pItem)->GetUpper()), FUNIT_TWIP);
+ static_cast<const SvxULSpaceItem*>(pItem)->GetUpper()), FUNIT_TWIP);
m_pBottomMF->SetValue(m_pBottomMF->Normalize(
- ((const SvxULSpaceItem*)pItem)->GetLower()), FUNIT_TWIP);
+ static_cast<const SvxULSpaceItem*>(pItem)->GetLower()), FUNIT_TWIP);
m_pTopMF->SaveValue();
m_pBottomMF->SaveValue();
}
@@ -746,7 +746,7 @@ SwTableColumnPage::SwTableColumnPage(vcl::Window* pParent, const SfxItemSet& rSe
const SfxPoolItem* pItem;
Init((SfxItemState::SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem )
- && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON));
+ && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON));
}
//Description: Page column configuration
@@ -767,7 +767,7 @@ void SwTableColumnPage::Reset( const SfxItemSet* )
const SfxPoolItem* pItem;
if(SfxItemState::SET == rSet.GetItemState( FN_TABLE_REP, false, &pItem ))
{
- pTblData = (SwTableRep*)((const SwPtrItem*) pItem)->GetValue();
+ pTblData = (SwTableRep*)static_cast<const SwPtrItem*>( pItem)->GetValue();
nNoOfVisibleCols = pTblData->GetColCount();
nNoOfCols = pTblData->GetAllColCount();
nTableWidth = pTblData->GetAlign() != text::HoriOrientation::FULL &&
@@ -1300,7 +1300,7 @@ SwTextFlowPage::SwTextFlowPage(vcl::Window* pParent, const SfxItemSet& rSet)
#ifndef SW_FILEFORMAT_40
const SfxPoolItem *pItem;
if(SfxItemState::SET == rSet.GetItemState( SID_HTML_MODE, false,&pItem )
- && ((const SfxUInt16Item*)pItem)->GetValue() & HTMLMODE_ON)
+ && static_cast<const SfxUInt16Item*>(pItem)->GetValue() & HTMLMODE_ON)
#endif
{
m_pKeepCB->Hide();
@@ -1459,12 +1459,12 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet )
if(SfxItemState::SET == rSet->GetItemState( RES_KEEP, false, &pItem ))
{
- m_pKeepCB->Check( ((const SvxFmtKeepItem*)pItem)->GetValue() );
+ m_pKeepCB->Check( static_cast<const SvxFmtKeepItem*>(pItem)->GetValue() );
m_pKeepCB->SaveValue();
}
if(SfxItemState::SET == rSet->GetItemState( RES_LAYOUT_SPLIT, false, &pItem ))
{
- m_pSplitCB->Check( ((const SwFmtLayoutSplit*)pItem)->GetValue() );
+ m_pSplitCB->Check( static_cast<const SwFmtLayoutSplit*>(pItem)->GetValue() );
}
else
m_pSplitCB->Check();
@@ -1474,7 +1474,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet )
if(SfxItemState::SET == rSet->GetItemState( RES_ROW_SPLIT, false, &pItem ))
{
- m_pSplitRowCB->Check( ((const SwFmtRowSplit*)pItem)->GetValue() );
+ m_pSplitRowCB->Check( static_cast<const SwFmtRowSplit*>(pItem)->GetValue() );
}
else
m_pSplitRowCB->SetState(TRISTATE_INDET);
@@ -1485,10 +1485,10 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet )
if(SfxItemState::SET == rSet->GetItemState( RES_PAGEDESC, false, &pItem ))
{
OUString sPageDesc;
- const SwPageDesc* pDesc = ((const SwFmtPageDesc*)pItem)->GetPageDesc();
+ const SwPageDesc* pDesc = static_cast<const SwFmtPageDesc*>(pItem)->GetPageDesc();
- //m_pPageNoNF->SetValue(((const SwFmtPageDesc*)pItem)->GetNumOffset());
- ::boost::optional<sal_uInt16> oNumOffset = ((const SwFmtPageDesc*)pItem)->GetNumOffset();
+ //m_pPageNoNF->SetValue(static_cast<const SwFmtPageDesc*>(pItem)->GetNumOffset());
+ ::boost::optional<sal_uInt16> oNumOffset = static_cast<const SwFmtPageDesc*>(pItem)->GetNumOffset();
if (oNumOffset)
m_pPageNoNF->SetValue(oNumOffset.get());
else
@@ -1587,7 +1587,7 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet )
if(SfxItemState::SET == rSet->GetItemState( FN_PARAM_TABLE_HEADLINE, false, &pItem ))
{
- sal_uInt16 nRep = ((const SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nRep = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
m_pHeadLineCB->Check( nRep > 0 );
m_pHeadLineCB->SaveValue();
m_pRepeatHeaderNF->SetValue( nRep );
@@ -1596,13 +1596,13 @@ void SwTextFlowPage::Reset( const SfxItemSet* rSet )
}
if ( rSet->GetItemState(FN_TABLE_BOX_TEXTORIENTATION) > SfxItemState::DEFAULT )
{
- sal_uLong nDirection = ((const SvxFrameDirectionItem&)rSet->Get(FN_TABLE_BOX_TEXTORIENTATION)).GetValue();
+ sal_uLong nDirection = static_cast<const SvxFrameDirectionItem&>(rSet->Get(FN_TABLE_BOX_TEXTORIENTATION)).GetValue();
m_pTextDirectionLB->SelectEntryPos(m_pTextDirectionLB->GetEntryPos( (const void*)nDirection ));
}
if ( rSet->GetItemState(FN_TABLE_SET_VERT_ALIGN) > SfxItemState::DEFAULT )
{
- sal_uInt16 nVert = ((const SfxUInt16Item&)rSet->Get(FN_TABLE_SET_VERT_ALIGN)).GetValue();
+ sal_uInt16 nVert = static_cast<const SfxUInt16Item&>(rSet->Get(FN_TABLE_SET_VERT_ALIGN)).GetValue();
sal_uInt16 nPos = 0;
switch(nVert)
{
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 3f9d862..ea6574b 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 29670f3..bd6b96c 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 bab7224..0481707 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 aebf6ed..93c717c 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 6460202..3c53dcb 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 db1d54f..43c72f6 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 7cdc9d6..c99197e 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 59bc6f9..8068fa1 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 f4f754d..4610db7 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 5cf0161..1a2862d 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 c2cfbea..4bbccb4 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 2b0aab0..7102206 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 92a20bc..ebcb72d 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 c38a45e..8aa84b5 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 ffe5dd3..e7d655c 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 8e1f349..eb45bc4 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 151212e..871eb5a 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 a397bb9..c15d167 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 );
}
}
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list