summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx4
-rw-r--r--sw/source/ui/chrdlg/numpara.cxx8
-rw-r--r--sw/source/ui/config/optload.cxx6
-rw-r--r--sw/source/ui/config/optpage.cxx12
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2
-rw-r--r--sw/source/ui/fldui/fldvar.cxx2
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx2
-rw-r--r--sw/source/ui/misc/num.cxx2
-rw-r--r--sw/source/ui/misc/titlepage.cxx2
-rw-r--r--sw/source/ui/table/tabledlg.cxx34
11 files changed, 38 insertions, 38 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 4e68e202bff2..63d82606d06d 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 b9ee893ab9e9..5fbe842596d0 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 934988141b87..57871047c656 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 c2b594be1144..3e6529482b54 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 a2eb4d63339a..04cc19061458 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 b0c0903db8ee..8c6c7d1e1853 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 7f935c00ddd8..7df0addd74f5 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 5cf90a486e9b..26a43894a9e9 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 cd2ed1473548..459c038c6da3 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 1ddc306861d2..d29f24c446a3 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 d70b4fdbff50..2d0ff785646c 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)
{