summaryrefslogtreecommitdiff
path: root/sw/source/ui/misc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-11-24 10:39:58 +0200
committerNoel Grandin <noel@peralex.com>2014-11-25 10:09:52 +0200
commit1f1c7a4b0d582dffa920c7a51a55ea32c4d203fe (patch)
tree454c20df0bbf835639e594fb8ceebb339b846010 /sw/source/ui/misc
parentef4cd4a718d428ccc5c4958545a6af7564f186e4 (diff)
loplugin: cstylecast
Change-Id: I74d655f24396c35305e90e26c91e45c6fc44df75
Diffstat (limited to 'sw/source/ui/misc')
-rw-r--r--sw/source/ui/misc/docfnote.cxx4
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/misc/linenum.cxx2
-rw-r--r--sw/source/ui/misc/outline.cxx12
-rw-r--r--sw/source/ui/misc/pgfnote.cxx4
5 files changed, 12 insertions, 12 deletions
diff --git a/sw/source/ui/misc/docfnote.cxx b/sw/source/ui/misc/docfnote.cxx
index 74188d14fa7f..b938a07761fe 100644
--- a/sw/source/ui/misc/docfnote.cxx
+++ b/sw/source/ui/misc/docfnote.cxx
@@ -53,7 +53,7 @@ SwFootNoteOptionDlg::SwFootNoteOptionDlg(vcl::Window *pParent, SwWrtShell &rS)
void SwFootNoteOptionDlg::PageCreated( sal_uInt16 /*nId*/, SfxTabPage &rPage )
{
- ((SwEndNoteOptionPage&)rPage).SetShell( rSh );
+ static_cast<SwEndNoteOptionPage&>(rPage).SetShell( rSh );
}
IMPL_LINK( SwFootNoteOptionDlg, OkHdl, Button *, pBtn )
@@ -339,7 +339,7 @@ static SwCharFmt* lcl_GetCharFormat( SwWrtShell* pSh, const OUString& rCharFmtNa
pBase = pPool->Find(rCharFmtName, SFX_STYLE_FAMILY_CHAR);
if(!pBase)
pBase = &pPool->Make(rCharFmtName, SFX_STYLE_FAMILY_CHAR);
- pFmt = ((SwDocStyleSheet*)pBase)->GetCharFmt();
+ pFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt();
}
return pFmt;
}
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 179c64a5693f..f5f1d18cb707 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -530,7 +530,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn )
if ( pMacroDlg && pMacroDlg->Execute() == RET_OK &&
SfxItemState::SET == pMacroDlg->GetOutputItemSet()->GetItemState( RES_FRMMACRO, false, &pItem ) )
{
- const SvxMacroTableDtor& rTbl = ((SvxMacroItem*)pItem)->GetMacroTable();
+ const SvxMacroTableDtor& rTbl = static_cast<const SvxMacroItem*>(pItem)->GetMacroTable();
pGlossaryHdl->SetMacros( m_pShortNameEdit->GetText(),
rTbl.Get( SW_EVENT_START_INS_GLOSSARY ),
rTbl.Get( SW_EVENT_END_INS_GLOSSARY ) );
diff --git a/sw/source/ui/misc/linenum.cxx b/sw/source/ui/misc/linenum.cxx
index b28b2a754bfb..e4f86d4dc293 100644
--- a/sw/source/ui/misc/linenum.cxx
+++ b/sw/source/ui/misc/linenum.cxx
@@ -185,7 +185,7 @@ IMPL_LINK_NOARG(SwLineNumberingDlg, OKHdl)
pBase = pPool->Find(sCharFmtName, SFX_STYLE_FAMILY_CHAR);
if(!pBase)
pBase = &pPool->Make(sCharFmtName, SFX_STYLE_FAMILY_CHAR);
- pCharFmt = ((SwDocStyleSheet*)pBase)->GetCharFmt();
+ pCharFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt();
}
if (pCharFmt)
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 5b52fc15227d..930c73726911 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -200,12 +200,12 @@ void SwOutlineTabDialog::PageCreated(sal_uInt16 nPageId, SfxTabPage& rPage)
{
if (nPageId == m_nNumPosId)
{
- ((SwNumPositionTabPage&)rPage).SetWrtShell(&rWrtSh);
- ((SwNumPositionTabPage&)rPage).SetOutlineTabDialog(this);
+ static_cast<SwNumPositionTabPage&>(rPage).SetWrtShell(&rWrtSh);
+ static_cast<SwNumPositionTabPage&>(rPage).SetOutlineTabDialog(this);
}
else if (nPageId == m_nOutlineId)
{
- ((SwOutlineSettingsTabPage&)rPage).SetWrtShell(&rWrtSh);
+ static_cast<SwOutlineSettingsTabPage&>(rPage).SetWrtShell(&rWrtSh);
}
}
@@ -717,7 +717,7 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, CharFmtHdl)
pBase = pPool->Find(sEntry, SFX_STYLE_FAMILY_CHAR);
if(!pBase)
pBase = &pPool->Make(sEntry, SFX_STYLE_FAMILY_PAGE);
- pFmt = ((SwDocStyleSheet*)pBase)->GetCharFmt();
+ pFmt = static_cast<SwDocStyleSheet*>(pBase)->GetCharFmt();
}
}
@@ -746,8 +746,8 @@ void SwOutlineSettingsTabPage::SetWrtShell(SwWrtShell* pShell)
{
pSh = pShell;
// query this document's NumRules
- pNumRule = ((SwOutlineTabDialog*)GetTabDialog())->GetNumRule();
- pCollNames = ((SwOutlineTabDialog*)GetTabDialog())->GetCollNames();
+ pNumRule = static_cast<SwOutlineTabDialog*>(GetTabDialog())->GetNumRule();
+ pCollNames = static_cast<SwOutlineTabDialog*>(GetTabDialog())->GetCollNames();
m_pPreviewWIN->SetNumRule(pNumRule);
m_pPreviewWIN->SetOutlineNames(pCollNames);
diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx
index e81e2c34d6f4..bf3632ed2dbb 100644
--- a/sw/source/ui/misc/pgfnote.cxx
+++ b/sw/source/ui/misc/pgfnote.cxx
@@ -310,7 +310,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
const SfxPoolItem* pItem;
if( SfxItemState::SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_HEADERSET), false, &pItem ) )
{
- const SfxItemSet& rHeaderSet = ((SvxSetItem*)pItem)->GetItemSet();
+ const SfxItemSet& rHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
const SfxBoolItem& rHeaderOn =
(const SfxBoolItem&)rHeaderSet.Get( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_ON ) );
@@ -325,7 +325,7 @@ void SwFootNotePage::ActivatePage(const SfxItemSet& rSet)
if( SfxItemState::SET == rSet.GetItemState( rSet.GetPool()->GetWhich( SID_ATTR_PAGE_FOOTERSET),
false, &pItem ) )
{
- const SfxItemSet& rFooterSet = ((SvxSetItem*)pItem)->GetItemSet();
+ const SfxItemSet& rFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
const SfxBoolItem& rFooterOn =
(const SfxBoolItem&)rFooterSet.Get( SID_ATTR_PAGE_ON );