[Libreoffice-commits] core.git: 8 commits - basctl/source chart2/source cui/source dbaccess/source desktop/source filter/source forms/source lotuswordpro/source oox/source reportdesign/source sc/inc sc/source vbahelper/source writerfilter/source
Noel Grandin
noel at peralex.com
Thu Oct 23 03:37:59 PDT 2014
basctl/source/basicide/basicbox.cxx | 2
basctl/source/basicide/baside2.cxx | 8
basctl/source/basicide/baside2b.cxx | 16
basctl/source/basicide/baside3.cxx | 2
basctl/source/basicide/basides1.cxx | 22
basctl/source/basicide/basides2.cxx | 4
basctl/source/basicide/basobj2.cxx | 6
basctl/source/basicide/basobj3.cxx | 4
basctl/source/basicide/iderdll.cxx | 2
basctl/source/basicide/macrodlg.cxx | 8
basctl/source/basicide/moduldl2.cxx | 2
basctl/source/dlged/dlged.cxx | 4
basctl/source/dlged/dlgedobj.cxx | 2
basctl/source/dlged/managelang.cxx | 2
chart2/source/controller/dialogs/dlg_ObjectProperties.cxx | 2
chart2/source/controller/dialogs/res_DataLabel.cxx | 10
chart2/source/controller/dialogs/res_ErrorBar.cxx | 8
chart2/source/controller/dialogs/res_LegendPosition.cxx | 2
chart2/source/controller/dialogs/res_Trendline.cxx | 6
chart2/source/controller/dialogs/tp_3D_SceneIllumination.cxx | 48 -
chart2/source/controller/dialogs/tp_AxisLabel.cxx | 2
chart2/source/controller/dialogs/tp_AxisPositions.cxx | 8
chart2/source/controller/dialogs/tp_LegendPosition.cxx | 2
chart2/source/controller/dialogs/tp_PointGeometry.cxx | 2
chart2/source/controller/dialogs/tp_PolarOptions.cxx | 2
chart2/source/controller/dialogs/tp_Scale.cxx | 40 -
chart2/source/controller/dialogs/tp_SeriesToAxis.cxx | 10
chart2/source/controller/dialogs/tp_TitleRotation.cxx | 6
chart2/source/controller/drawinglayer/DrawViewWrapper.cxx | 2
chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx | 2
chart2/source/controller/main/ChartController_Position.cxx | 10
chart2/source/controller/main/DrawCommandDispatch.cxx | 2
chart2/source/controller/main/SelectionHelper.cxx | 2
chart2/source/model/main/ChartModel.cxx | 3
chart2/source/view/diagram/VDiagram.cxx | 2
cui/source/customize/cfg.cxx | 32 -
cui/source/customize/macropg.cxx | 4
cui/source/dialogs/SpellDialog.cxx | 2
cui/source/dialogs/about.cxx | 10
cui/source/dialogs/cuicharmap.cxx | 4
cui/source/dialogs/cuigaldlg.cxx | 6
cui/source/dialogs/cuihyperdlg.cxx | 20
cui/source/dialogs/hlinettp.cxx | 2
cui/source/dialogs/hltpbase.cxx | 30 -
cui/source/dialogs/hyphen.cxx | 4
cui/source/dialogs/pastedlg.cxx | 4
cui/source/dialogs/postdlg.cxx | 6
cui/source/dialogs/sdrcelldlg.cxx | 4
cui/source/dialogs/srchxtra.cxx | 22
cui/source/dialogs/zoom.cxx | 6
cui/source/inc/hltpbase.hxx | 2
cui/source/options/cuisrchdlg.cxx | 4
cui/source/options/fontsubs.cxx | 4
cui/source/options/optHeaderTabListbox.cxx | 4
cui/source/options/optfltr.cxx | 10
cui/source/options/optgdlg.cxx | 16
cui/source/options/optgenrl.cxx | 2
cui/source/options/optlingu.cxx | 54 +-
cui/source/options/optmemory.cxx | 2
cui/source/options/optsave.cxx | 30 -
cui/source/options/treeopt.cxx | 22
cui/source/options/webconninfo.cxx | 8
cui/source/tabpages/autocdlg.cxx | 34 -
cui/source/tabpages/backgrnd.cxx | 36 -
cui/source/tabpages/border.cxx | 30 -
cui/source/tabpages/chardlg.cxx | 150 +++---
cui/source/tabpages/connect.cxx | 20
cui/source/tabpages/grfpage.cxx | 22
cui/source/tabpages/labdlg.cxx | 28 -
cui/source/tabpages/macroass.cxx | 19
cui/source/tabpages/measure.cxx | 38 -
cui/source/tabpages/numfmt.cxx | 30 -
cui/source/tabpages/numpages.cxx | 78 +--
cui/source/tabpages/page.cxx | 115 ++--
cui/source/tabpages/paragrph.cxx | 92 +--
cui/source/tabpages/swpossizetabpage.cxx | 4
cui/source/tabpages/tabarea.cxx | 116 ++--
cui/source/tabpages/tabline.cxx | 68 +-
cui/source/tabpages/tabstpge.cxx | 18
cui/source/tabpages/textanim.cxx | 18
cui/source/tabpages/textattr.cxx | 28 -
cui/source/tabpages/tparea.cxx | 122 ++--
cui/source/tabpages/tpbitmap.cxx | 10
cui/source/tabpages/tpcolor.cxx | 14
cui/source/tabpages/tpgradnt.cxx | 10
cui/source/tabpages/tphatch.cxx | 18
cui/source/tabpages/tpline.cxx | 74 +-
cui/source/tabpages/tplnedef.cxx | 8
cui/source/tabpages/tplneend.cxx | 6
cui/source/tabpages/tpshadow.cxx | 44 -
cui/source/tabpages/transfrm.cxx | 26 -
dbaccess/source/ui/misc/charsets.cxx | 2
desktop/source/app/app.cxx | 2
desktop/source/deployment/gui/dp_gui_dialog2.cxx | 4
filter/source/svg/svgexport.cxx | 2
forms/source/component/DatabaseForm.cxx | 12
forms/source/component/Edit.cxx | 6
forms/source/component/File.cxx | 2
forms/source/component/Filter.cxx | 2
forms/source/component/Grid.cxx | 2
forms/source/component/clickableimage.cxx | 2
forms/source/component/formcontrolfont.cxx | 2
forms/source/richtext/richtextmodel.cxx | 2
lotuswordpro/source/filter/bencont.cxx | 6
lotuswordpro/source/filter/benlist.cxx | 4
lotuswordpro/source/filter/benobj.cxx | 2
lotuswordpro/source/filter/bento.hxx | 2
lotuswordpro/source/filter/lwpfootnote.cxx | 4
lotuswordpro/source/filter/lwplayout.cxx | 2
lotuswordpro/source/filter/lwppagelayout.cxx | 6
lotuswordpro/source/filter/lwptablelayout.cxx | 18
lotuswordpro/source/filter/lwptblcell.cxx | 2
lotuswordpro/source/filter/lwptblcell.hxx | 2
lotuswordpro/source/filter/lwptblformula.cxx | 6
lotuswordpro/source/filter/tocread.cxx | 4
lotuswordpro/source/filter/xfilter/xfframe.cxx | 4
lotuswordpro/source/filter/xfilter/xfliststyle.cxx | 10
lotuswordpro/source/filter/xfilter/xfparastyle.cxx | 2
lotuswordpro/source/filter/xfilter/xfstylecont.cxx | 4
oox/source/export/shapes.cxx | 4
reportdesign/source/filter/xml/xmlfilter.cxx | 4
reportdesign/source/ui/report/ReportController.cxx | 4
reportdesign/source/ui/report/ReportSection.cxx | 2
sc/inc/chgtrack.hxx | 31 -
sc/inc/document.hxx | 2
sc/source/core/data/attarray.cxx | 106 ++--
sc/source/core/data/attrib.cxx | 22
sc/source/core/data/column.cxx | 12
sc/source/core/data/column2.cxx | 48 -
sc/source/core/data/column3.cxx | 2
sc/source/core/data/docpool.cxx | 26 -
sc/source/core/data/documen2.cxx | 6
sc/source/core/data/documen3.cxx | 10
sc/source/core/data/documen5.cxx | 16
sc/source/core/data/documen6.cxx | 2
sc/source/core/data/documen8.cxx | 20
sc/source/core/data/documen9.cxx | 10
sc/source/core/data/document.cxx | 38 -
sc/source/core/data/document10.cxx | 2
sc/source/core/data/dpobject.cxx | 2
sc/source/core/data/dpoutput.cxx | 6
sc/source/core/data/drwlayer.cxx | 24
sc/source/core/data/fillinfo.cxx | 48 -
sc/source/core/data/formulacell.cxx | 2
sc/source/core/data/global.cxx | 10
sc/source/core/data/patattr.cxx | 249 ++++------
sc/source/core/data/stlpool.cxx | 38 -
sc/source/core/data/stlsheet.cxx | 16
sc/source/core/data/table1.cxx | 4
sc/source/core/data/table2.cxx | 8
sc/source/core/data/table4.cxx | 12
sc/source/core/data/table5.cxx | 4
sc/source/core/data/validat.cxx | 2
sc/source/core/tool/autoform.cxx | 124 ++--
sc/source/core/tool/charthelper.cxx | 14
sc/source/core/tool/chartlock.cxx | 2
sc/source/core/tool/chgtrack.cxx | 138 ++---
sc/source/core/tool/compiler.cxx | 2
sc/source/core/tool/defaultsoptions.cxx | 2
sc/source/core/tool/detfunc.cxx | 18
sc/source/core/tool/docoptio.cxx | 2
sc/source/core/tool/editutil.cxx | 18
sc/source/core/tool/formulaopt.cxx | 2
sc/source/core/tool/interpr1.cxx | 10
sc/source/core/tool/interpr4.cxx | 2
sc/source/core/tool/printopt.cxx | 2
sc/source/core/tool/progress.cxx | 2
sc/source/core/tool/token.cxx | 4
sc/source/core/tool/viewopti.cxx | 2
sc/source/filter/xml/XMLCalculationSettingsContext.hxx | 14
sc/source/filter/xml/XMLCellRangeSourceContext.hxx | 6
sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx | 2
sc/source/filter/xml/XMLConsolidationContext.hxx | 6
sc/source/filter/xml/XMLDDELinksContext.hxx | 32 -
sc/source/filter/xml/XMLDetectiveContext.hxx | 15
sc/source/filter/xml/XMLEmptyContext.hxx | 6
sc/source/filter/xml/XMLExportDataPilot.cxx | 2
sc/source/filter/xml/XMLTableShapesContext.cxx | 2
sc/source/filter/xml/XMLTableShapesContext.hxx | 7
sc/source/filter/xml/XMLTableSourceContext.hxx | 7
sc/source/filter/xml/XMLTrackedChangesContext.cxx | 36 -
sc/source/filter/xml/XMLTrackedChangesContext.hxx | 6
sc/source/filter/xml/xmlannoi.cxx | 4
sc/source/filter/xml/xmlannoi.hxx | 6
sc/source/filter/xml/xmlbodyi.cxx | 1
sc/source/filter/xml/xmlbodyi.hxx | 6
sc/source/filter/xml/xmlcoli.cxx | 6
sc/source/filter/xml/xmlcoli.hxx | 10
sc/source/filter/xml/xmlcondformat.hxx | 36 -
sc/source/filter/xml/xmlconti.hxx | 7
sc/source/filter/xml/xmlcvali.cxx | 12
sc/source/filter/xml/xmlcvali.hxx | 7
sc/source/filter/xml/xmldpimp.hxx | 82 +--
sc/source/filter/xml/xmldrani.hxx | 42 -
sc/source/filter/xml/xmlexprt.cxx | 2
sc/source/filter/xml/xmlfilti.hxx | 32 -
sc/source/filter/xml/xmlfonte.cxx | 4
sc/source/filter/xml/xmlimprt.cxx | 24
sc/source/filter/xml/xmlimprt.hxx | 7
sc/source/filter/xml/xmllabri.hxx | 11
sc/source/filter/xml/xmlnexpi.hxx | 14
sc/source/filter/xml/xmlrowi.cxx | 6
sc/source/filter/xml/xmlrowi.hxx | 10
sc/source/filter/xml/xmlsceni.hxx | 4
sc/source/filter/xml/xmlsorti.hxx | 8
sc/source/filter/xml/xmlstyli.cxx | 6
sc/source/filter/xml/xmlstyli.hxx | 12
sc/source/filter/xml/xmlsubti.cxx | 6
sc/source/filter/xml/xmltabi.hxx | 6
sc/source/ui/Accessibility/AccessibleCell.cxx | 12
sc/source/ui/Accessibility/AccessibleCellBase.cxx | 2
sc/source/ui/Accessibility/AccessiblePreviewCell.cxx | 4
sc/source/ui/Accessibility/AccessiblePreviewTable.cxx | 8
sc/source/ui/Accessibility/AccessibleText.cxx | 10
sc/source/ui/app/client.cxx | 4
sc/source/ui/app/drwtrans.cxx | 12
sc/source/ui/app/inputhdl.cxx | 14
sc/source/ui/app/inputwin.cxx | 8
sc/source/ui/app/scmod.cxx | 74 +-
sc/source/ui/app/seltrans.cxx | 2
sc/source/ui/app/transobj.cxx | 4
sc/source/ui/app/uiitems.cxx | 24
sc/source/ui/cctrl/tbzoomsliderctrl.cxx | 2
vbahelper/source/vbahelper/vbacolorformat.cxx | 2
vbahelper/source/vbahelper/vbafontbase.cxx | 8
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 4
226 files changed, 1903 insertions(+), 1902 deletions(-)
New commits:
commit feba02c3a408c34b3b4e203167ea7094efbe7449
Author: Noel Grandin <noel at peralex.com>
Date: Thu Oct 23 08:57:36 2014 +0200
loplugin: cstylecast
Change-Id: I71cdd9154a8a5955e2915858cec33ec4e9ef4987
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index aff5ba2..6ad4cc2 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -588,8 +588,8 @@ bool ScAccessibleCell::IsDropdown()
if( pData && pData->HasSelectionList() )
return true;
}
- ScMergeFlagAttr* pAttr;
- pAttr = static_cast<ScMergeFlagAttr*>(mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG ));
+ const ScMergeFlagAttr* pAttr;
+ pAttr = static_cast<const ScMergeFlagAttr*>(mpDoc->GetAttr( nPosX, nPosY, nTab, ATTR_MERGE_FLAG ));
if( pAttr->HasAutoFilter() )
{
return true;
diff --git a/sc/source/ui/Accessibility/AccessibleCellBase.cxx b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
index 4295f68..7024fe5 100644
--- a/sc/source/ui/Accessibility/AccessibleCellBase.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCellBase.cxx
@@ -256,7 +256,7 @@ sal_Bool SAL_CALL
}
if (IsEditable(xParentStates))
{
- ScDocShell* pDocShell = (ScDocShell*) mpDoc->GetDocumentShell();
+ ScDocShell* pDocShell = static_cast<ScDocShell*>(mpDoc->GetDocumentShell());
bResult = pDocShell->GetDocFunc().SetValueCell(maCellAddress, fValue, false);
}
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index b6f2dd5..df7fb57 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -271,8 +271,8 @@ bool ScAccessiblePreviewCell::IsOpaque(
bool bOpaque(true);
if (mpDoc)
{
- const SvxBrushItem* pItem = (const SvxBrushItem*)mpDoc->GetAttr(
- maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), ATTR_BACKGROUND);
+ const SvxBrushItem* pItem = static_cast<const SvxBrushItem*>(mpDoc->GetAttr(
+ maCellAddress.Col(), maCellAddress.Row(), maCellAddress.Tab(), ATTR_BACKGROUND));
if (pItem)
bOpaque = pItem->GetColor() != COL_TRANSPARENT;
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
index f8cda3b..b1d1b5b 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewTable.cxx
@@ -204,8 +204,8 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleRowExtentAt( sal_Int32
else
{
ScDocument& rDoc = mpViewShell->GetDocument();
- const ScMergeAttr* pItem = (const ScMergeAttr*)rDoc.GetAttr(
- static_cast<SCCOL>(rColInfo.nDocIndex), static_cast<SCROW>(rRowInfo.nDocIndex), mpTableInfo->GetTab(), ATTR_MERGE );
+ const ScMergeAttr* pItem = static_cast<const ScMergeAttr*>(rDoc.GetAttr(
+ static_cast<SCCOL>(rColInfo.nDocIndex), static_cast<SCROW>(rRowInfo.nDocIndex), mpTableInfo->GetTab(), ATTR_MERGE ));
if ( pItem && pItem->GetRowMerge() > 0 )
nRows = pItem->GetRowMerge();
}
@@ -238,8 +238,8 @@ sal_Int32 SAL_CALL ScAccessiblePreviewTable::getAccessibleColumnExtentAt( sal_In
else
{
ScDocument& rDoc = mpViewShell->GetDocument();
- const ScMergeAttr* pItem = (const ScMergeAttr*)rDoc.GetAttr(
- static_cast<SCCOL>(rColInfo.nDocIndex), static_cast<SCROW>(rRowInfo.nDocIndex), mpTableInfo->GetTab(), ATTR_MERGE );
+ const ScMergeAttr* pItem = static_cast<const ScMergeAttr*>(rDoc.GetAttr(
+ static_cast<SCCOL>(rColInfo.nDocIndex), static_cast<SCROW>(rRowInfo.nDocIndex), mpTableInfo->GetTab(), ATTR_MERGE ));
if ( pItem && pItem->GetColMerge() > 0 )
nColumns = pItem->GetColMerge();
}
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 9a60283..94b2833 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -1303,7 +1303,7 @@ ScDocShell* ScAccessiblePreviewCellTextData::GetDocShell(ScPreviewShell* pViewSh
{
ScDocShell* pDocSh = NULL;
if (pViewShell)
- pDocSh = (ScDocShell*) pViewShell->GetDocument().GetDocumentShell();
+ pDocSh = static_cast<ScDocShell*>( pViewShell->GetDocument().GetDocumentShell());
return pDocSh;
}
@@ -1411,7 +1411,7 @@ ScDocShell* ScAccessiblePreviewHeaderCellTextData::GetDocShell(ScPreviewShell* p
{
ScDocShell* pDocSh = NULL;
if (pViewShell)
- pDocSh = (ScDocShell*) pViewShell->GetDocument().GetDocumentShell();
+ pDocSh = static_cast<ScDocShell*>(pViewShell->GetDocument().GetDocumentShell());
return pDocSh;
}
@@ -1429,7 +1429,7 @@ ScAccessibleHeaderTextData::ScAccessibleHeaderTextData(ScPreviewShell* pViewShel
meAdjust(eAdjust)
{
if (pViewShell)
- mpDocSh = (ScDocShell*) pViewShell->GetDocument().GetDocumentShell();
+ mpDocSh = static_cast<ScDocShell*>(pViewShell->GetDocument().GetDocumentShell());
if (mpDocSh)
mpDocSh->GetDocument().AddUnoObject(*this);
}
@@ -1482,7 +1482,7 @@ SvxTextForwarder* ScAccessibleHeaderTextData::GetTextForwarder()
// -> use global pool from module
SfxItemSet aDefaults( pHdrEngine->GetEmptyItemSet() );
- const ScPatternAttr& rPattern = (const ScPatternAttr&)SC_MOD()->GetPool().GetDefaultItem(ATTR_PATTERN);
+ const ScPatternAttr& rPattern = static_cast<const ScPatternAttr&>(SC_MOD()->GetPool().GetDefaultItem(ATTR_PATTERN));
rPattern.FillEditItemSet( &aDefaults );
// FillEditItemSet adjusts font height to 1/100th mm,
// but for header/footer twips is needed, as in the PatternAttr:
@@ -1544,7 +1544,7 @@ ScAccessibleNoteTextData::ScAccessibleNoteTextData(ScPreviewShell* pViewShell,
mbDataValid(false)
{
if (pViewShell)
- mpDocSh = (ScDocShell*) pViewShell->GetDocument().GetDocumentShell();
+ mpDocSh = static_cast<ScDocShell*>(pViewShell->GetDocument().GetDocumentShell());
if (mpDocSh)
mpDocSh->GetDocument().AddUnoObject(*this);
}
diff --git a/sc/source/ui/app/client.cxx b/sc/source/ui/app/client.cxx
index a2c7fd0..d5ddc28 100644
--- a/sc/source/ui/app/client.cxx
+++ b/sc/source/ui/app/client.cxx
@@ -68,8 +68,8 @@ SdrOle2Obj* ScClient::GetDrawObj()
if ( pObject->GetObjIdentifier() == OBJ_OLE2 )
{
// name from InfoObject is PersistName
- if ( ((SdrOle2Obj*)pObject)->GetPersistName() == aName )
- pOle2Obj = (SdrOle2Obj*)pObject;
+ if ( static_cast<SdrOle2Obj*>(pObject)->GetPersistName() == aName )
+ pOle2Obj = static_cast<SdrOle2Obj*>(pObject);
}
pObject = aIter.Next();
}
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index c2f2f1a..afbc7ae 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -110,7 +110,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
// if object has no persistence it must be copied as a part of document
try
{
- uno::Reference< embed::XEmbedPersist > xPersObj( ((SdrOle2Obj*)pObject)->GetObjRef(), uno::UNO_QUERY );
+ uno::Reference< embed::XEmbedPersist > xPersObj( static_cast<SdrOle2Obj*>(pObject)->GetObjRef(), uno::UNO_QUERY );
if ( xPersObj.is() && xPersObj->hasEntry() )
bOleObj = true;
}
@@ -124,7 +124,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain
if (nSdrObjKind == OBJ_GRAF)
{
bGraphic = true;
- if ( ((SdrGrafObj*)pObject)->GetGraphic().GetType() == GRAPHIC_BITMAP )
+ if ( static_cast<SdrGrafObj*>(pObject)->GetGraphic().GetType() == GRAPHIC_BITMAP )
bGrIsBit = true;
}
@@ -418,7 +418,7 @@ bool ScDrawTransferObj::GetData( const css::datatransfer::DataFlavor& rFlavor, c
SdrObject* pObject = aIter.Next();
if (pObject && pObject->GetObjIdentifier() == OBJ_GRAF)
{
- SdrGrafObj* pGraphObj = (SdrGrafObj*) pObject;
+ SdrGrafObj* pGraphObj = static_cast<SdrGrafObj*>(pObject);
bOK = SetGraphic( pGraphObj->GetGraphic(), rFlavor );
}
}
@@ -467,7 +467,7 @@ bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
// for the changed pool defaults from drawing layer pool set those
// attributes as hard attributes to preserve them for saving
const SfxItemPool& rItemPool = pModel->GetItemPool();
- const SvxFontHeightItem& rDefaultFontHeight = (const SvxFontHeightItem&)rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT);
+ const SvxFontHeightItem& rDefaultFontHeight = static_cast<const SvxFontHeightItem&>(rItemPool.GetDefaultItem(EE_CHAR_FONTHEIGHT));
// SW should have no MasterPages
OSL_ENSURE(0L == pModel->GetMasterPageCount(), "SW with MasterPages (!)");
@@ -480,7 +480,7 @@ bool ScDrawTransferObj::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObj
while(aIter.IsMore())
{
SdrObject* pObj = aIter.Next();
- const SvxFontHeightItem& rItem = (const SvxFontHeightItem&)pObj->GetMergedItem(EE_CHAR_FONTHEIGHT);
+ const SvxFontHeightItem& rItem = static_cast<const SvxFontHeightItem&>(pObj->GetMergedItem(EE_CHAR_FONTHEIGHT));
if(rItem.GetHeight() == rDefaultFontHeight.GetHeight())
{
@@ -690,7 +690,7 @@ SdrOle2Obj* ScDrawTransferObj::GetSingleObject()
SdrObject* pObject = aIter.Next();
if (pObject && pObject->GetObjIdentifier() == OBJ_OLE2)
{
- return (SdrOle2Obj*) pObject;
+ return static_cast<SdrOle2Obj*>(pObject);
}
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 1a8fb0f..f2d89bc 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -694,7 +694,7 @@ void ScInputHandler::UpdateSpellSettings( bool bFromStartTab )
pEngine->SetSpeller( xXSpellChecker1 );
}
- bool bHyphen = pLastPattern && ((const SfxBoolItem&)pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue();
+ bool bHyphen = pLastPattern && static_cast<const SfxBoolItem&>(pLastPattern->GetItem(ATTR_HYPHENATE)).GetValue();
if ( bHyphen ) {
com::sun::star::uno::Reference<com::sun::star::linguistic2::XHyphenator> xXHyphenator( LinguMgr::GetHyphenator() );
pEngine->SetHyphenator( xXHyphenator );
@@ -1769,8 +1769,8 @@ void ScInputHandler::UpdateAdjust( sal_Unicode cTyped )
}
bool bAsianVertical = pLastPattern &&
- ((const SfxBoolItem&)pLastPattern->GetItem( ATTR_STACKED )).GetValue() &&
- ((const SfxBoolItem&)pLastPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
+ static_cast<const SfxBoolItem&>(pLastPattern->GetItem( ATTR_STACKED )).GetValue() &&
+ static_cast<const SfxBoolItem&>(pLastPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
if ( bAsianVertical )
{
// Always edit at top of cell -> LEFT when editing vertically
@@ -1888,7 +1888,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
if ( SfxItemState::SET == rAttrSet.GetItemState( ATTR_VALUE_FORMAT, true, &pItem ) )
{
- sal_uLong nFormat = ((const SfxUInt32Item*)pItem)->GetValue();
+ sal_uLong nFormat = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
bCellHasPercentFormat = ( NUMBERFORMAT_PERCENT ==
rDoc.GetFormatTable()->GetType( nFormat ) );
}
@@ -1897,7 +1897,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
// Validity specified?
if ( SfxItemState::SET == rAttrSet.GetItemState( ATTR_VALIDDATA, true, &pItem ) )
- nValidation = ((const SfxUInt32Item*)pItem)->GetValue();
+ nValidation = static_cast<const SfxUInt32Item*>(pItem)->GetValue();
else
nValidation = 0;
@@ -1918,7 +1918,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
// Background color must be known for automatic font color.
// For transparent cell background, the document background color must be used.
- Color aBackCol = ((const SvxBrushItem&)
+ Color aBackCol = static_cast<const SvxBrushItem&>(
pPattern->GetItem( ATTR_BACKGROUND )).GetColor();
ScModule* pScMod = SC_MOD();
if ( aBackCol.GetTransparency() > 0 ||
@@ -1927,7 +1927,7 @@ bool ScInputHandler::StartTable( sal_Unicode cTyped, bool bFromCommand, bool bIn
pEngine->SetBackgroundColor( aBackCol );
// Adjustment
- eAttrAdjust = (SvxCellHorJustify)((const SvxHorJustifyItem&)pPattern->
+ eAttrAdjust = (SvxCellHorJustify)static_cast<const SvxHorJustifyItem&>(pPattern->
GetItem(ATTR_HOR_JUSTIFY)).GetValue();
if ( eAttrAdjust == SVX_HOR_JUSTIFY_REPEAT &&
static_cast<const SfxBoolItem&>(pPattern->GetItem(ATTR_LINEBREAK)).GetValue() )
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 96b4080..3e72f64 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -271,7 +271,7 @@ ScInputWindow::~ScInputWindow()
SfxViewShell* pSh = SfxViewShell::GetFirst( &aScType );
while ( pSh )
{
- ScInputHandler* pHdl = ((ScTabViewShell*)pSh)->GetInputHandler();
+ ScInputHandler* pHdl = static_cast<ScTabViewShell*>(pSh)->GetInputHandler();
if ( pHdl && pHdl->GetInputWindow() == this )
{
pHdl->SetInputWindow( NULL );
@@ -1782,7 +1782,7 @@ void ScTextWnd::StartEditEngine()
// SfxObjectShell* pObjSh = SfxObjectShell::Current();
if ( pObjSh && pObjSh->ISA(ScDocShell) )
{
- ScDocument& rDoc = ((ScDocShell*)pObjSh)->GetDocument(); // any document
+ ScDocument& rDoc = static_cast<ScDocShell*>(pObjSh)->GetDocument(); // any document
sal_uInt8 nScript = rDoc.GetStringScriptType( aString );
if ( nScript & SCRIPTTYPE_COMPLEX )
Invalidate();
@@ -1882,7 +1882,7 @@ void ScTextWnd::SetTextString( const OUString& rNewString )
if ( pObjSh && pObjSh->ISA(ScDocShell) )
{
// any document can be used (used only for its break iterator)
- ScDocument& rDoc = ((ScDocShell*)pObjSh)->GetDocument();
+ ScDocument& rDoc = static_cast<ScDocShell*>(pObjSh)->GetDocument();
nOldScript = rDoc.GetStringScriptType( aString );
nNewScript = rDoc.GetStringScriptType( rNewString );
}
@@ -2119,7 +2119,7 @@ void ScPosWnd::FillRangeNames()
SfxObjectShell* pObjSh = SfxObjectShell::Current();
if ( pObjSh && pObjSh->ISA(ScDocShell) )
{
- ScDocument& rDoc = ((ScDocShell*)pObjSh)->GetDocument();
+ ScDocument& rDoc = static_cast<ScDocShell*>(pObjSh)->GetDocument();
InsertEntry(ScGlobal::GetRscString( STR_MANAGE_NAMES ));
SetSeparatorPos(0);
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 7922e40..abbcb21 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -231,7 +231,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3
{
if ( pObjSh->Type() == TYPE(ScDocShell) )
{
- ScDocShell* pDocSh = ((ScDocShell*)pObjSh);
+ ScDocShell* pDocSh = static_cast<ScDocShell*>(pObjSh);
if ( bArrows )
ScDetectiveFunc( &pDocSh->GetDocument(), 0 ).UpdateAllArrowColors();
if ( bComments )
@@ -248,7 +248,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3
{
if ( pViewShell->ISA(ScTabViewShell) )
{
- ScTabViewShell* pViewSh = (ScTabViewShell*)pViewShell;
+ ScTabViewShell* pViewSh = static_cast<ScTabViewShell*>(pViewShell);
pViewSh->PaintGrid();
pViewSh->PaintTop();
pViewSh->PaintLeft();
@@ -275,7 +275,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3
{
if ( pObjSh->Type() == TYPE(ScDocShell) )
{
- ScDocShell* pDocSh = ((ScDocShell*)pObjSh);
+ ScDocShell* pDocSh = static_cast<ScDocShell*>(pObjSh);
OutputDevice* pPrinter = pDocSh->GetPrinter();
if ( pPrinter )
pPrinter->SetDigitLanguage( GetOptDigitLanguage() );
@@ -295,7 +295,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3
{
if ( pSh->ISA( ScTabViewShell ) )
{
- ScTabViewShell* pViewSh = (ScTabViewShell*)pSh;
+ ScTabViewShell* pViewSh = static_cast<ScTabViewShell*>(pSh);
// set ref-device for EditEngine (re-evaluates digit settings)
ScInputHandler* pHdl = GetInputHdl(pViewSh);
@@ -307,7 +307,7 @@ void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt3
}
else if ( pSh->ISA( ScPreviewShell ) )
{
- ScPreviewShell* pPreviewSh = (ScPreviewShell*)pSh;
+ ScPreviewShell* pPreviewSh = static_cast<ScPreviewShell*>(pSh);
ScPreview* pPreview = pPreviewSh->GetPreview();
pPreview->SetDigitLanguage( GetOptDigitLanguage() );
@@ -395,7 +395,7 @@ void ScModule::Execute( SfxRequest& rReq )
bool bSet;
const SfxPoolItem* pItem;
if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, &pItem ) )
- bSet = ((const SfxBoolItem*)pItem)->GetValue();
+ bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
else
{ // Toggle
ScDocShell* pDocSh = PTR_CAST(ScDocShell, SfxObjectShell::Current());
@@ -417,7 +417,7 @@ void ScModule::Execute( SfxRequest& rReq )
const SfxPoolItem* pItem;
if ( pReqArgs && SfxItemState::SET == pReqArgs->GetItemState( nSlot, true, &pItem ) )
{
- FieldUnit eUnit = (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue();
+ FieldUnit eUnit = (FieldUnit)static_cast<const SfxUInt16Item*>(pItem)->GetValue();
switch( eUnit )
{
case FUNIT_MM: // Just the units that are also in the dialog
@@ -475,7 +475,7 @@ void ScModule::Execute( SfxRequest& rReq )
case SID_PSZ_FUNCTION:
if (pReqArgs)
{
- const SfxUInt16Item& rItem = (const SfxUInt16Item&)pReqArgs->Get(SID_PSZ_FUNCTION);
+ const SfxUInt16Item& rItem = static_cast<const SfxUInt16Item&>(pReqArgs->Get(SID_PSZ_FUNCTION));
OSL_ENSURE(rItem.ISA(SfxUInt16Item),"wrong Parameter");
ScAppOptions aNewOpts( GetAppOptions() );
@@ -505,7 +505,7 @@ void ScModule::Execute( SfxRequest& rReq )
if ( pDocSh )
{
ScDocument& rDoc = pDocSh->GetDocument();
- LanguageType eNewLang = ((SvxLanguageItem*)pItem)->GetLanguage();
+ LanguageType eNewLang = static_cast<const SvxLanguageItem*>(pItem)->GetLanguage();
LanguageType eLatin, eCjk, eCtl;
rDoc.GetLanguage( eLatin, eCjk, eCtl );
LanguageType eOld = ( nSlot == SID_ATTR_CHAR_CJK_LANGUAGE ) ? eCjk :
@@ -780,9 +780,9 @@ void ScModule::RecentFunctionsChanged()
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
if ( pViewFrm && pViewFrm->HasChildWindow(nFuncListID) )
{
- ScFunctionChildWindow* pWnd =(ScFunctionChildWindow*)pViewFrm->GetChildWindow( nFuncListID );
+ ScFunctionChildWindow* pWnd = static_cast<ScFunctionChildWindow*>(pViewFrm->GetChildWindow( nFuncListID ));
- ScFunctionDockWin* pFuncList=(ScFunctionDockWin*)pWnd->GetWindow();
+ ScFunctionDockWin* pFuncList = static_cast<ScFunctionDockWin*>(pWnd->GetWindow());
pFuncList->InitLRUList();
}
@@ -979,13 +979,13 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if (rOptSet.HasItem(SID_ATTR_METRIC, &pItem))
{
PutItem( *pItem );
- pAppCfg->SetAppMetric( (FieldUnit)((const SfxUInt16Item*)pItem)->GetValue() );
+ pAppCfg->SetAppMetric( (FieldUnit)static_cast<const SfxUInt16Item*>(pItem)->GetValue() );
bSaveAppOptions = true;
}
if (rOptSet.HasItem(SCITEM_USERLIST, &pItem))
{
- ScGlobal::SetUserList( ((const ScUserListItem*)pItem)->GetUserList() );
+ ScGlobal::SetUserList( static_cast<const ScUserListItem*>(pItem)->GetUserList() );
bSaveAppOptions = true;
}
@@ -1011,14 +1011,14 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// DefaultsOptions
if (rOptSet.HasItem(SID_SCDEFAULTSOPTIONS, &pItem))
{
- const ScDefaultsOptions& rOpt = ((const ScTpDefaultsItem*)pItem)->GetDefaultsOptions();
+ const ScDefaultsOptions& rOpt = static_cast<const ScTpDefaultsItem*>(pItem)->GetDefaultsOptions();
SetDefaultsOptions( rOpt );
}
// FormulaOptions
if (rOptSet.HasItem(SID_SCFORMULAOPTIONS, &pItem))
{
- const ScFormulaOptions& rOpt = ((const ScTpFormulaItem*)pItem)->GetFormulaOptions();
+ const ScFormulaOptions& rOpt = static_cast<const ScTpFormulaItem*>(pItem)->GetFormulaOptions();
if (!pFormulaCfg || (*pFormulaCfg != rOpt))
// Formula options have changed. Repaint the column headers.
@@ -1049,7 +1049,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// ViewOptions
if (rOptSet.HasItem(SID_SCVIEWOPTIONS, &pItem))
{
- const ScViewOptions& rNewOpt = ((const ScTpViewItem*)pItem)->GetViewOptions();
+ const ScViewOptions& rNewOpt = static_cast<const ScTpViewItem*>(pItem)->GetViewOptions();
if ( pViewSh )
{
@@ -1081,7 +1081,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// Evaluate after ViewOptions, as GridOptions is a member of ViewOptions
if ( rOptSet.HasItem(SID_ATTR_GRID_OPTIONS,&pItem) )
{
- ScGridOptions aNewGridOpt( (const SvxGridItem&)*pItem );
+ ScGridOptions aNewGridOpt( static_cast<const SvxGridItem&>(*pItem ));
if ( pViewSh )
{
@@ -1111,7 +1111,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// DocOptions
if ( rOptSet.HasItem(SID_SCDOCOPTIONS,&pItem) )
{
- const ScDocOptions& rNewOpt = ((const ScTpCalcItem*)pItem)->GetDocOptions();
+ const ScDocOptions& rNewOpt = static_cast<const ScTpCalcItem*>(pItem)->GetDocOptions();
if ( pDoc )
{
@@ -1139,7 +1139,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// Set TabDistance after the actual DocOptions
if ( rOptSet.HasItem(SID_ATTR_DEFTABSTOP,&pItem) )
{
- sal_uInt16 nTabDist = ((SfxUInt16Item*)pItem)->GetValue();
+ sal_uInt16 nTabDist = static_cast<const SfxUInt16Item*>(pItem)->GetValue();
ScDocOptions aOpt(GetDocOptions());
aOpt.SetTabDistance(nTabDist);
SetDocOptions( aOpt );
@@ -1158,7 +1158,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// AutoSpell after the DocOptions (due to being a member)
if ( rOptSet.HasItem(SID_AUTOSPELL_CHECK,&pItem) ) // At DocOptions
{
- bool bDoAutoSpell = ((const SfxBoolItem*)pItem)->GetValue();
+ bool bDoAutoSpell = static_cast<const SfxBoolItem*>(pItem)->GetValue();
if (pDoc)
{
@@ -1193,32 +1193,32 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
// InputOptions
if ( rOptSet.HasItem(SID_SC_INPUT_SELECTIONPOS,&pItem) )
{
- pInputCfg->SetMoveDir( ((const SfxUInt16Item*)pItem)->GetValue() );
+ pInputCfg->SetMoveDir( static_cast<const SfxUInt16Item*>(pItem)->GetValue() );
bSaveInputOptions = true;
}
if ( rOptSet.HasItem(SID_SC_INPUT_SELECTION,&pItem) )
{
- pInputCfg->SetMoveSelection( ((const SfxBoolItem*)pItem)->GetValue() );
+ pInputCfg->SetMoveSelection( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
bSaveInputOptions = true;
}
if ( rOptSet.HasItem(SID_SC_INPUT_EDITMODE,&pItem) )
{
- pInputCfg->SetEnterEdit( ((const SfxBoolItem*)pItem)->GetValue() );
+ pInputCfg->SetEnterEdit( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
bSaveInputOptions = true;
}
if ( rOptSet.HasItem(SID_SC_INPUT_FMT_EXPAND,&pItem) )
{
- pInputCfg->SetExtendFormat( ((const SfxBoolItem*)pItem)->GetValue() );
+ pInputCfg->SetExtendFormat( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
bSaveInputOptions = true;
}
if ( rOptSet.HasItem(SID_SC_INPUT_RANGEFINDER,&pItem) )
{
- pInputCfg->SetRangeFinder( ((const SfxBoolItem*)pItem)->GetValue() );
+ pInputCfg->SetRangeFinder( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
bSaveInputOptions = true;
}
if ( rOptSet.HasItem(SID_SC_INPUT_REF_EXPAND,&pItem) )
{
- pInputCfg->SetExpandRefs( ((const SfxBoolItem*)pItem)->GetValue() );
+ pInputCfg->SetExpandRefs( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
bSaveInputOptions = true;
}
if (rOptSet.HasItem(SID_SC_OPT_SORT_REF_UPDATE, &pItem))
@@ -1229,13 +1229,13 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
if ( rOptSet.HasItem(SID_SC_INPUT_MARK_HEADER,&pItem) )
{
- pInputCfg->SetMarkHeader( ((const SfxBoolItem*)pItem)->GetValue() );
+ pInputCfg->SetMarkHeader( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
bSaveInputOptions = true;
bUpdateMarks = true;
}
if ( rOptSet.HasItem(SID_SC_INPUT_TEXTWYSIWYG,&pItem) )
{
- bool bNew = ((const SfxBoolItem*)pItem)->GetValue();
+ bool bNew = static_cast<const SfxBoolItem*>(pItem)->GetValue();
if ( bNew != pInputCfg->GetTextWysiwyg() )
{
pInputCfg->SetTextWysiwyg( bNew );
@@ -1245,20 +1245,20 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
}
if( rOptSet.HasItem( SID_SC_INPUT_REPLCELLSWARN, &pItem ) )
{
- pInputCfg->SetReplaceCellsWarn( ((const SfxBoolItem*)pItem)->GetValue() );
+ pInputCfg->SetReplaceCellsWarn( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
bSaveInputOptions = true;
}
if( rOptSet.HasItem( SID_SC_INPUT_LEGACY_CELL_SELECTION, &pItem ) )
{
- pInputCfg->SetLegacyCellSelection( ((const SfxBoolItem*)pItem)->GetValue() );
+ pInputCfg->SetLegacyCellSelection( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
bSaveInputOptions = true;
}
// PrintOptions
if ( rOptSet.HasItem(SID_SCPRINTOPTIONS,&pItem) )
{
- const ScPrintOptions& rNewOpt = ((const ScTpPrintItem*)pItem)->GetPrintOptions();
+ const ScPrintOptions& rNewOpt = static_cast<const ScTpPrintItem*>(pItem)->GetPrintOptions();
SetPrintOptions( rNewOpt );
// broadcast causes all previews to recalc page numbers
@@ -1321,7 +1321,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
{
if ( pObjSh->Type() == TYPE(ScDocShell) )
{
- ScDocShell* pOneDocSh = ((ScDocShell*)pObjSh);
+ ScDocShell* pOneDocSh = static_cast<ScDocShell*>(pObjSh);
pOneDocSh->CalcOutputFactor();
SCTAB nTabCount = pOneDocSh->GetDocument().GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
@@ -1335,7 +1335,7 @@ void ScModule::ModifyOptions( const SfxItemSet& rOptSet )
SfxViewShell* pSh = SfxViewShell::GetFirst( &aScType );
while ( pSh )
{
- ScTabViewShell* pOneViewSh = (ScTabViewShell*)pSh;
+ ScTabViewShell* pOneViewSh = static_cast<ScTabViewShell*>(pSh);
// set ref-device for EditEngine
ScInputHandler* pHdl = GetInputHdl(pOneViewSh);
@@ -1553,7 +1553,7 @@ void ScModule::SetRefDialog( sal_uInt16 nId, bool bVis, SfxViewFrame* pViewFrm )
// store the dialog id also in the view shell
SfxViewShell* pViewSh = pViewFrm->GetViewShell();
if ( pViewSh && pViewSh->ISA( ScTabViewShell ) )
- ((ScTabViewShell*)pViewSh)->SetCurRefDlgId( nCurRefDlgId );
+ static_cast<ScTabViewShell*>(pViewSh)->SetCurRefDlgId( nCurRefDlgId );
else
{
// no ScTabViewShell - possible for example from a Basic macro
@@ -2182,7 +2182,7 @@ IMPL_LINK( ScModule, CalcFieldValueHdl, EditFieldInfo*, pInfo )
if (pField && pField->ISA(SvxURLField))
{
// URLField
- const SvxURLField* pURLField = (const SvxURLField*) pField;
+ const SvxURLField* pURLField = static_cast<const SvxURLField*>(pField);
OUString aURL = pURLField->GetURL();
switch ( pURLField->GetFormat() )
@@ -2293,7 +2293,7 @@ void ScModule::PushNewAnyRefDlg( ScAnyRefModalDlg* pNewDlg )
{
if ( pViewShell->ISA(ScTabViewShell) )
{
- ScTabViewShell* pViewSh = (ScTabViewShell*)pViewShell;
+ ScTabViewShell* pViewSh = static_cast<ScTabViewShell*>(pViewShell);
pViewSh->SetInRefMode( true );
}
pViewShell = SfxViewShell::GetNext( *pViewShell );
@@ -2313,7 +2313,7 @@ void ScModule::PopAnyRefDlg()
{
if ( pViewShell->ISA(ScTabViewShell) )
{
- ScTabViewShell* pViewSh = (ScTabViewShell*)pViewShell;
+ ScTabViewShell* pViewSh = static_cast<ScTabViewShell*>(pViewShell);
pViewSh->SetInRefMode( false );
}
pViewShell = SfxViewShell::GetNext( *pViewShell );
diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx
index 0ad7efe..c965c1d 100644
--- a/sc/source/ui/app/seltrans.cxx
+++ b/sc/source/ui/app/seltrans.cxx
@@ -92,7 +92,7 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView
if ( nSdrObjKind == OBJ_GRAF )
{
- if ( ((SdrGrafObj*)pObj)->GetGraphic().GetType() == GRAPHIC_BITMAP )
+ if ( static_cast<SdrGrafObj*>(pObj)->GetGraphic().GetType() == GRAPHIC_BITMAP )
eMode = SC_SELTRANS_DRAW_BITMAP;
else
eMode = SC_SELTRANS_DRAW_GRAPHIC;
diff --git a/sc/source/ui/app/transobj.cxx b/sc/source/ui/app/transobj.cxx
index 02733c1..cb822e2 100644
--- a/sc/source/ui/app/transobj.cxx
+++ b/sc/source/ui/app/transobj.cxx
@@ -664,7 +664,7 @@ void ScTransferObj::InitDocShell(bool bLimitToPageSize)
if (pStyleSheet)
{
const SfxItemSet& rSourceSet = pStyleSheet->GetItemSet();
- aPaperSize = ((const SvxSizeItem&) rSourceSet.Get(ATTR_PAGE_SIZE)).GetSize();
+ aPaperSize = static_cast<const SvxSizeItem&>( rSourceSet.Get(ATTR_PAGE_SIZE)).GetSize();
// CopyStyleFrom kopiert SetItems mit richtigem Pool
ScStyleSheetPool* pDestPool = rDestDoc.GetStyleSheetPool();
@@ -798,7 +798,7 @@ void ScTransferObj::StripRefs( ScDocument* pDoc,
ScAddress aPos(nCol, nRow, nDestTab);
if (nErrCode)
{
- if ( ((const SvxHorJustifyItem*) pDestDoc->GetAttr(
+ if ( static_cast<const SvxHorJustifyItem*>(pDestDoc->GetAttr(
nCol,nRow,nDestTab, ATTR_HOR_JUSTIFY))->GetValue() ==
SVX_HOR_JUSTIFY_STANDARD )
pDestDoc->ApplyAttr( nCol,nRow,nDestTab,
diff --git a/sc/source/ui/app/uiitems.cxx b/sc/source/ui/app/uiitems.cxx
index e2c3e89..f8618a0 100644
--- a/sc/source/ui/app/uiitems.cxx
+++ b/sc/source/ui/app/uiitems.cxx
@@ -79,10 +79,10 @@ bool ScInputStatusItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- return ( (aStartPos == ((ScInputStatusItem&)rItem).aStartPos)
- && (aEndPos == ((ScInputStatusItem&)rItem).aEndPos)
- && (aCursorPos == ((ScInputStatusItem&)rItem).aCursorPos)
- && (aString == ((ScInputStatusItem&)rItem).aString) );
+ return (aStartPos == static_cast<const ScInputStatusItem&>(rItem).aStartPos)
+ && (aEndPos == static_cast<const ScInputStatusItem&>(rItem).aEndPos)
+ && (aCursorPos == static_cast<const ScInputStatusItem&>(rItem).aCursorPos)
+ && (aString == static_cast<const ScInputStatusItem&>(rItem).aString);
//TODO: Compare Edit data!
}
@@ -175,7 +175,7 @@ bool ScSortItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScSortItem& rOther = (const ScSortItem&)rItem;
+ const ScSortItem& rOther = static_cast<const ScSortItem&>(rItem);
return ( (pViewData == rOther.pViewData)
&& (theSortData == rOther.theSortData) );
@@ -267,7 +267,7 @@ bool ScQueryItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScQueryItem& rQueryItem = (const ScQueryItem&)rItem;
+ const ScQueryItem& rQueryItem = static_cast<const ScQueryItem&>(rItem);
return ( (pViewData == rQueryItem.pViewData)
&& (bIsAdvanced == rQueryItem.bIsAdvanced)
@@ -320,7 +320,7 @@ bool ScSubTotalItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScSubTotalItem& rSTItem = (const ScSubTotalItem&)rItem;
+ const ScSubTotalItem& rSTItem = static_cast<const ScSubTotalItem&>(rItem);
return ( (pViewData == rSTItem.pViewData)
&& (theSubTotalData == rSTItem.theSubTotalData) );
@@ -370,7 +370,7 @@ bool ScUserListItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScUserListItem& r = (const ScUserListItem&)rItem;
+ const ScUserListItem& r = static_cast<const ScUserListItem&>(rItem);
bool bEqual = false;
if ( !pUserList || !(r.pUserList) )
@@ -422,7 +422,7 @@ bool ScConsolidateItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScConsolidateItem& rCItem = (const ScConsolidateItem&)rItem;
+ const ScConsolidateItem& rCItem = static_cast<const ScConsolidateItem&>(rItem);
return ( theConsData == rCItem.theConsData);
}
@@ -471,7 +471,7 @@ bool ScPivotItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScPivotItem& rPItem = (const ScPivotItem&)rItem;
+ const ScPivotItem& rPItem = static_cast<const ScPivotItem&>(rItem);
OSL_ENSURE( pSaveData && rPItem.pSaveData, "pSaveData" );
return ( *pSaveData == *rPItem.pSaveData &&
aDestRange == rPItem.aDestRange &&
@@ -512,7 +512,7 @@ bool ScSolveItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScSolveItem& rPItem = (const ScSolveItem&)rItem;
+ const ScSolveItem& rPItem = static_cast<const ScSolveItem&>(rItem);
return ( theSolveData == rPItem.theSolveData );
}
@@ -551,7 +551,7 @@ bool ScTabOpItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScTabOpItem& rPItem = (const ScTabOpItem&)rItem;
+ const ScTabOpItem& rPItem = static_cast<const ScTabOpItem&>(rItem);
return ( theTabOpData == rPItem.theTabOpData );
}
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index 6e2e8bc..3a3bcd7 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -58,7 +58,7 @@ void ScZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState
{
sal_uInt16 nId = GetId();
ToolBox& rTbx = GetToolBox();
- ScZoomSliderWnd* pBox = (ScZoomSliderWnd*)(rTbx.GetItemWindow( nId ));
+ ScZoomSliderWnd* pBox = static_cast<ScZoomSliderWnd*>(rTbx.GetItemWindow( nId ));
OSL_ENSURE( pBox ,"Control not found!" );
if ( SfxItemState::DEFAULT != eState || pState->ISA( SfxVoidItem ) )
commit 6a097a7d964a22fbff8bfa9552c77b11447691bb
Author: Noel Grandin <noel at peralex.com>
Date: Wed Oct 22 16:06:44 2014 +0200
loplugin: cstylecast
Change-Id: I8c7cd4c2cdc134556c2c664a22e2048b51a3b98e
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index f078fa2..3f5d5c9 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -148,7 +148,7 @@ bool ScChangeAction::IsVisible() const
if ( IsRejected() || GetType() == SC_CAT_DELETE_TABS || IsDeletedIn() )
return false;
if ( GetType() == SC_CAT_CONTENT )
- return ((ScChangeActionContent*)this)->IsTopContent();
+ return static_cast<const ScChangeActionContent*>(this)->IsTopContent();
return true;
}
@@ -159,7 +159,7 @@ bool ScChangeAction::IsTouchable() const
return false;
// content may reject and be touchable if on top
if ( GetType() == SC_CAT_CONTENT )
- return ((ScChangeActionContent*)this)->IsTopContent();
+ return static_cast<const ScChangeActionContent*>(this)->IsTopContent();
if ( IsRejecting() )
return false;
return true;
@@ -176,13 +176,13 @@ bool ScChangeAction::IsClickable() const
{
ScChangeActionContentCellType eCCT =
ScChangeActionContent::GetContentCellType(
- ((ScChangeActionContent*)this)->GetNewCell() );
+ static_cast<const ScChangeActionContent*>(this)->GetNewCell() );
if ( eCCT == SC_CACCT_MATREF )
return false;
if ( eCCT == SC_CACCT_MATORG )
{ // no Accept-Select if one of the references is in a deleted col/row
const ScChangeActionLinkEntry* pL =
- ((ScChangeActionContent*)this)->GetFirstDependentEntry();
+ static_cast<const ScChangeActionContent*>(this)->GetFirstDependentEntry();
while ( pL )
{
ScChangeAction* p = (ScChangeAction*) pL->GetAction();
@@ -203,10 +203,10 @@ bool ScChangeAction::IsRejectable() const
return false;
if ( GetType() == SC_CAT_CONTENT )
{
- if ( ((ScChangeActionContent*)this)->IsOldMatrixReference() )
+ if ( static_cast<const ScChangeActionContent*>(this)->IsOldMatrixReference() )
return false;
ScChangeActionContent* pNextContent =
- ((ScChangeActionContent*)this)->GetNextContent();
+ static_cast<const ScChangeActionContent*>(this)->GetNextContent();
if ( pNextContent == NULL )
return true; // *this is TopContent
return pNextContent->IsRejected(); // *this is next rejectable
@@ -224,7 +224,7 @@ bool ScChangeAction::IsInternalRejectable() const
if ( GetType() == SC_CAT_CONTENT )
{
ScChangeActionContent* pNextContent =
- ((ScChangeActionContent*)this)->GetNextContent();
+ static_cast<const ScChangeActionContent*>(this)->GetNextContent();
if ( pNextContent == NULL )
return true; // *this is TopContent
return pNextContent->IsRejected(); // *this is next rejectable
@@ -244,10 +244,10 @@ bool ScChangeAction::IsDialogParent() const
{
if ( !IsDialogRoot() )
return false;
- if ( ((ScChangeActionContent*)this)->IsMatrixOrigin() && HasDependent() )
+ if ( static_cast<const ScChangeActionContent*>(this)->IsMatrixOrigin() && HasDependent() )
return true;
ScChangeActionContent* pPrevContent =
- ((ScChangeActionContent*)this)->GetPrevContent();
+ static_cast<const ScChangeActionContent*>(this)->GetPrevContent();
return pPrevContent && pPrevContent->IsVirgin();
}
if ( HasDependent() )
@@ -277,7 +277,7 @@ bool ScChangeAction::IsMasterDelete() const
{
if ( !IsDeleteType() )
return false;
- ScChangeActionDel* pDel = (ScChangeActionDel*) this;
+ const ScChangeActionDel* pDel = static_cast<const ScChangeActionDel*>(this);
return pDel->IsMultiDelete() && (pDel->IsTopDelete() || pDel->IsRejectable());
}
@@ -384,7 +384,7 @@ void ScChangeAction::SetDeletedIn( ScChangeAction* p )
ScChangeActionLinkEntry* pLink1 = AddDeletedIn( p );
ScChangeActionLinkEntry* pLink2;
if ( GetType() == SC_CAT_CONTENT )
- pLink2 = p->AddDeleted( ((ScChangeActionContent*)this)->GetTopContent() );
+ pLink2 = p->AddDeleted( static_cast<ScChangeActionContent*>(this)->GetTopContent() );
else
pLink2 = p->AddDeleted( this );
pLink1->SetLink( pLink2 );
@@ -599,7 +599,7 @@ void ScChangeAction::RejectRestoreContents( ScChangeTrack* pTrack,
if ( p && p->GetType() == SC_CAT_CONTENT )
{
ScChangeActionCellListEntry* pE = new ScChangeActionCellListEntry(
- (ScChangeActionContent*) p, pListContents );
+ static_cast<ScChangeActionContent*>(p), pListContents );
pListContents = pE;
}
}
@@ -853,7 +853,7 @@ bool ScChangeActionDel::IsTopDelete() const
const ScChangeAction* p = GetNext();
if ( !p || p->GetType() != GetType() )
return true;
- return ((ScChangeActionDel*)p)->IsBaseDelete();
+ return static_cast<const ScChangeActionDel*>(p)->IsBaseDelete();
}
bool ScChangeActionDel::IsMultiDelete() const
@@ -863,7 +863,7 @@ bool ScChangeActionDel::IsMultiDelete() const
const ScChangeAction* p = GetNext();
if ( !p || p->GetType() != GetType() )
return false;
- const ScChangeActionDel* pDel = (const ScChangeActionDel*) p;
+ const ScChangeActionDel* pDel = static_cast<const ScChangeActionDel*>(p);
if ( (pDel->GetDx() > GetDx() || pDel->GetDy() > GetDy()) &&
pDel->GetBigRange() == aBigRange )
return true;
@@ -876,7 +876,7 @@ bool ScChangeActionDel::IsTabDeleteCol() const
return false;
const ScChangeAction* p = this;
while ( p && p->GetType() == SC_CAT_DELETE_COLS &&
- !((const ScChangeActionDel*)p)->IsTopDelete() )
+ !static_cast<const ScChangeActionDel*>(p)->IsTopDelete() )
p = p->GetNext();
return p && p->GetType() == SC_CAT_DELETE_TABS;
}
@@ -1270,7 +1270,7 @@ bool ScChangeActionMove::Reject( ScDocument* pDoc )
ScChangeAction* p = pLinkDependent->GetAction();
if ( p && p->GetType() == SC_CAT_CONTENT )
{
- ScChangeActionContent* pContent = (ScChangeActionContent*) p;
+ ScChangeActionContent* pContent = static_cast<ScChangeActionContent*>(p);
if ( !pContent->IsDeletedIn() &&
pContent->GetBigRange().aStart.IsValid( pDoc ) )
pContent->PutNewValueToDoc( pDoc, 0, 0 );
@@ -2367,7 +2367,7 @@ void ScChangeTrack::MasterLinks( ScChangeAction* pAppend )
{
SCSIZE nSlot = ComputeContentSlot(
pAppend->GetBigRange().aStart.Row() );
- ((ScChangeActionContent*)pAppend)->InsertInSlot(
+ static_cast<ScChangeActionContent*>(pAppend)->InsertInSlot(
&ppContentSlots[nSlot] );
}
return ;
@@ -2464,7 +2464,7 @@ void ScChangeTrack::Append( ScChangeAction* pAppend, sal_uLong nAction )
NotifyModified( SC_CTM_APPEND, nAction, nAction );
if ( pAppend->GetType() == SC_CAT_CONTENT )
{
- ScChangeActionContent* pContent = (ScChangeActionContent*) pAppend;
+ ScChangeActionContent* pContent = static_cast<ScChangeActionContent*>(pAppend);
if ( ( pContent = pContent->GetPrevContent() ) != NULL )
{
sal_uLong nMod = pContent->GetActionNumber();
@@ -2903,7 +2903,7 @@ void ScChangeTrack::DeleteGeneratedDelContent( ScChangeActionContent* pContent )
sal_uLong nAct = pContent->GetActionNumber();
aGeneratedMap.erase( nAct );
if ( pFirstGeneratedDelContent == pContent )
- pFirstGeneratedDelContent = (ScChangeActionContent*) pContent->pNext;
+ pFirstGeneratedDelContent = static_cast<ScChangeActionContent*>(pContent->pNext);
if ( pContent->pNext )
pContent->pNext->pPrev = pContent->pPrev;
if ( pContent->pPrev )
@@ -2956,15 +2956,15 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
if ( eActType == SC_CAT_CONTENT )
{
- if ( !(((ScChangeActionContent*)pAct)->GetNextContent() ||
- ((ScChangeActionContent*)pAct)->GetPrevContent()) )
+ if ( !(static_cast<ScChangeActionContent*>(pAct)->GetNextContent() ||
+ static_cast<ScChangeActionContent*>(pAct)->GetPrevContent()) )
{ // Concatenate Contents at same position
ScChangeActionContent* pContent = SearchContentAt(
pAct->GetBigRange().aStart, pAct );
if ( pContent )
{
- pContent->SetNextContent( (ScChangeActionContent*) pAct );
- ((ScChangeActionContent*)pAct)->SetPrevContent( pContent );
+ pContent->SetNextContent( static_cast<ScChangeActionContent*>(pAct) );
+ static_cast<ScChangeActionContent*>(pAct)->SetPrevContent( pContent );
}
}
const ScCellValue& rCell = static_cast<ScChangeActionContent*>(pAct)->GetNewCell();
@@ -3006,7 +3006,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
{
for ( ScChangeActionLinkEntry* pL = pLinkInsertCol; pL; pL = pL->GetNext() )
{
- ScChangeActionIns* pTest = (ScChangeActionIns*) pL->GetAction();
+ ScChangeActionIns* pTest = static_cast<ScChangeActionIns*>(pL->GetAction());
if ( !pTest->IsRejected() &&
pTest->GetBigRange().Intersects( rRange ) )
{
@@ -3020,7 +3020,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
{
for ( ScChangeActionLinkEntry* pL = pLinkInsertRow; pL; pL = pL->GetNext() )
{
- ScChangeActionIns* pTest = (ScChangeActionIns*) pL->GetAction();
+ ScChangeActionIns* pTest = static_cast<ScChangeActionIns*>(pL->GetAction());
if ( !pTest->IsRejected() &&
pTest->GetBigRange().Intersects( rRange ) )
{
@@ -3034,7 +3034,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
{
for ( ScChangeActionLinkEntry* pL = pLinkInsertTab; pL; pL = pL->GetNext() )
{
- ScChangeActionIns* pTest = (ScChangeActionIns*) pL->GetAction();
+ ScChangeActionIns* pTest = static_cast<ScChangeActionIns*>(pL->GetAction());
if ( !pTest->IsRejected() &&
pTest->GetBigRange().Intersects( rRange ) )
{
@@ -3051,7 +3051,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
const ScBigAddress& rPos = rRange.aStart;
for ( ScChangeActionLinkEntry* pL = pLinkMove; pL; pL = pL->GetNext() )
{
- ScChangeActionMove* pTest = (ScChangeActionMove*) pL->GetAction();
+ ScChangeActionMove* pTest = static_cast<ScChangeActionMove*>(pL->GetAction());
if ( !pTest->IsRejected() &&
pTest->GetFromRange().In( rPos ) )
{
@@ -3061,10 +3061,10 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
}
else if ( eActType == SC_CAT_MOVE )
{ // Move FromRange is depending on ToRange
- const ScBigRange& rFromRange = ((ScChangeActionMove*)pAct)->GetFromRange();
+ const ScBigRange& rFromRange = static_cast<ScChangeActionMove*>(pAct)->GetFromRange();
for ( ScChangeActionLinkEntry* pL = pLinkMove; pL; pL = pL->GetNext() )
{
- ScChangeActionMove* pTest = (ScChangeActionMove*) pL->GetAction();
+ ScChangeActionMove* pTest = static_cast<ScChangeActionMove*>(pL->GetAction());
if ( !pTest->IsRejected() &&
pTest->GetBigRange().Intersects( rFromRange ) )
{
@@ -3077,7 +3077,7 @@ void ScChangeTrack::Dependencies( ScChangeAction* pAct )
// ToRange
for ( ScChangeActionLinkEntry* pL = pLinkMove; pL; pL = pL->GetNext() )
{
- ScChangeActionMove* pTest = (ScChangeActionMove*) pL->GetAction();
+ ScChangeActionMove* pTest = static_cast<ScChangeActionMove*>(pL->GetAction());
if ( !pTest->IsRejected() &&
(pTest->GetFromRange().Intersects( rRange ) ||
pTest->GetBigRange().Intersects( rRange )) )
@@ -3117,7 +3117,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove )
NotifyModified( SC_CTM_REMOVE, nAct, nAct );
if ( pRemove->GetType() == SC_CAT_CONTENT )
{
- ScChangeActionContent* pContent = (ScChangeActionContent*) pRemove;
+ ScChangeActionContent* pContent = static_cast<ScChangeActionContent*>(pRemove);
if ( ( pContent = pContent->GetPrevContent() ) != NULL )
{
sal_uLong nMod = pContent->GetActionNumber();
@@ -3131,7 +3131,7 @@ void ScChangeTrack::Remove( ScChangeAction* pRemove )
if ( IsInPasteCut() && pRemove->GetType() == SC_CAT_CONTENT )
{ //! Content is reused
- ScChangeActionContent* pContent = (ScChangeActionContent*) pRemove;
+ ScChangeActionContent* pContent = static_cast<ScChangeActionContent*>(pRemove);
pContent->RemoveAllLinks();
pContent->ClearTrack();
pContent->pNext = pContent->pPrev = NULL;
@@ -3167,10 +3167,10 @@ void ScChangeTrack::Undo( sal_uLong nStartAction, sal_uLong nEndAction, bool bMe
if ( pAct->IsDeleteType() )
{
- if (j == nEndAction || (pAct != pLast && ((ScChangeActionDel*)pAct)->IsTopDelete()))
+ if (j == nEndAction || (pAct != pLast && static_cast<ScChangeActionDel*>(pAct)->IsTopDelete()))
{
SetInDeleteTop( true );
- SetInDeleteRange( ((ScChangeActionDel*)pAct)->GetOverAllRange().MakeRange() );
+ SetInDeleteRange( static_cast<ScChangeActionDel*>(pAct)->GetOverAllRange().MakeRange() );
}
}
UpdateReference( pAct, true );
@@ -3184,7 +3184,7 @@ void ScChangeTrack::Undo( sal_uLong nStartAction, sal_uLong nEndAction, bool bMe
if ( j == nStartAction && pAct->GetType() == SC_CAT_MOVE )
{
- ScChangeActionMove* pMove = (ScChangeActionMove*) pAct;
+ ScChangeActionMove* pMove = static_cast<ScChangeActionMove*>(pAct);
sal_uLong nStart = pMove->GetStartLastCut();
sal_uLong nEnd = pMove->GetEndLastCut();
if ( nStart && nStart <= nEnd )
@@ -3257,10 +3257,10 @@ void ScChangeTrack::MergePrepare( ScChangeAction* pFirstMerge, bool bShared )
{
if ( pAct->IsDeleteType() )
{
- if ( ((ScChangeActionDel*)pAct)->IsTopDelete() )
+ if ( static_cast<ScChangeActionDel*>(pAct)->IsTopDelete() )
{
SetInDeleteTop( true );
- SetInDeleteRange( ((ScChangeActionDel*)pAct)->
+ SetInDeleteRange( static_cast<ScChangeActionDel*>(pAct)->
GetOverAllRange().MakeRange() );
}
}
@@ -3282,10 +3282,10 @@ void ScChangeTrack::MergeOwn( ScChangeAction* pAct, sal_uLong nFirstMerge, bool
SetMergeState( SC_CTMS_OWN );
if ( pAct->IsDeleteType() )
{
- if ( ((ScChangeActionDel*)pAct)->IsTopDelete() )
+ if ( static_cast<ScChangeActionDel*>(pAct)->IsTopDelete() )
{
SetInDeleteTop( true );
- SetInDeleteRange( ((ScChangeActionDel*)pAct)->
+ SetInDeleteRange( static_cast<ScChangeActionDel*>(pAct)->
GetOverAllRange().MakeRange() );
}
}
@@ -3386,7 +3386,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
break;
case SC_CAT_MOVE :
eMode = URM_MOVE;
- ((ScChangeActionMove*)pAct)->GetDelta( nDx, nDy, nDz );
+ static_cast<ScChangeActionMove*>(pAct)->GetDelta( nDx, nDy, nDz );
break;
default:
OSL_FAIL( "ScChangeTrack::UpdateReference: unknown Type" );
@@ -3400,7 +3400,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
if ( bDel )
{ //! For this mechanism we assume:
//! There's only a whole, simple deleted row/column
- ScChangeActionDel* pActDel = (ScChangeActionDel*) pAct;
+ ScChangeActionDel* pActDel = static_cast<ScChangeActionDel*>(pAct);
if ( !bUndo )
{ // Delete
ScChangeActionType eInsType = SC_CAT_NONE; // for Insert Undo "Deletes"
@@ -3469,7 +3469,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
p->SetDeletedIn( pActDel );
// Add GeneratedDelContent to the to-be-deleted list
if ( bGeneratedDelContents )
- pActDel->AddContent( (ScChangeActionContent*) p );
+ pActDel->AddContent( static_cast<ScChangeActionContent*>(p) );
}
bUpdate = false;
}
@@ -3493,13 +3493,13 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
if ( aDelRange.In( p->GetBigRange().aStart ) )
{
pActDel->SetCutOffInsert(
- (ScChangeActionIns*) p, 1 );
+ static_cast<ScChangeActionIns*>(p), 1 );
p->GetBigRange().aStart.IncCol( 1 );
}
else if ( aDelRange.In( p->GetBigRange().aEnd ) )
{
pActDel->SetCutOffInsert(
- (ScChangeActionIns*) p, -1 );
+ static_cast<ScChangeActionIns*>(p), -1 );
p->GetBigRange().aEnd.IncCol( -1 );
}
}
@@ -3510,13 +3510,13 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
if ( aDelRange.In( p->GetBigRange().aStart ) )
{
pActDel->SetCutOffInsert(
- (ScChangeActionIns*) p, 1 );
+ static_cast<ScChangeActionIns*>(p), 1 );
p->GetBigRange().aStart.IncRow( 1 );
}
else if ( aDelRange.In( p->GetBigRange().aEnd ) )
{
pActDel->SetCutOffInsert(
- (ScChangeActionIns*) p, -1 );
+ static_cast<ScChangeActionIns*>(p), -1 );
p->GetBigRange().aEnd.IncRow( -1 );
}
}
@@ -3527,20 +3527,20 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
if ( aDelRange.In( p->GetBigRange().aStart ) )
{
pActDel->SetCutOffInsert(
- (ScChangeActionIns*) p, 1 );
+ static_cast<ScChangeActionIns*>(p), 1 );
p->GetBigRange().aStart.IncTab( 1 );
}
else if ( aDelRange.In( p->GetBigRange().aEnd ) )
{
pActDel->SetCutOffInsert(
- (ScChangeActionIns*) p, -1 );
+ static_cast<ScChangeActionIns*>(p), -1 );
p->GetBigRange().aEnd.IncTab( -1 );
}
}
break;
case SC_CAT_MOVE :
{
- ScChangeActionMove* pMove = (ScChangeActionMove*) p;
+ ScChangeActionMove* pMove = static_cast<ScChangeActionMove*>(p);
short nFrom = 0;
short nTo = 0;
if ( aDelRange.In( pMove->GetBigRange().aStart ) )
@@ -3654,7 +3654,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
if ( p->IsDeletedIn( pActDel ) )
{
if ( p->GetType() != SC_CAT_CONTENT ||
- ((ScChangeActionContent*)p)->IsTopContent() )
+ static_cast<ScChangeActionContent*>(p)->IsTopContent() )
{ // First really remove the TopContent
p->RemoveDeletedIn( pActDel );
// Do NOT delete GeneratedDelContent from the list, we might need
@@ -3686,7 +3686,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
}
else if ( eActType == SC_CAT_MOVE )
{
- ScChangeActionMove* pActMove = (ScChangeActionMove*) pAct;
+ ScChangeActionMove* pActMove = static_cast<ScChangeActionMove*>(pAct);
bool bLastCutMove = ( pActMove == pLastCutMove );
const ScBigRange& rTo = pActMove->GetBigRange();
const ScBigRange& rFrom = pActMove->GetFromRange();
@@ -3706,7 +3706,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
p->SetDeletedIn( pActMove );
// Add GeneratedDelContent to the to-be-deleted list
if ( bGeneratedDelContents )
- pActMove->AddContent( (ScChangeActionContent*) p );
+ pActMove->AddContent( static_cast<ScChangeActionContent*>(p) );
}
}
else if ( bLastCutMove &&
@@ -3715,7 +3715,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
{ // Paste Cut: insert new Content inserted after stays
// Split up the ContentChain
ScChangeActionContent *pHere, *pTmp;
- pHere = (ScChangeActionContent*) p;
+ pHere = static_cast<ScChangeActionContent*>(p);
while ( (pTmp = pHere->GetPrevContent()) != NULL &&
pTmp->GetActionNumber() > nEndLastCut )
pHere = pTmp;
@@ -3747,7 +3747,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
// Move Content into Target if not deleted else to delete (FIXME: What?)
if ( p->IsDeletedIn( pActMove ) )
{
- if ( ((ScChangeActionContent*)p)->IsTopContent() )
+ if ( static_cast<ScChangeActionContent*>(p)->IsTopContent() )
{ // First really remove the TopContent
p->RemoveDeletedIn( pActMove );
// Do NOT delete GeneratedDelContent from the list, we might need
@@ -3758,7 +3758,7 @@ void ScChangeTrack::UpdateReference( ScChangeAction** ppFirstAction,
else if ( ( GetMergeState() != SC_CTMS_PREPARE && GetMergeState() != SC_CTMS_OWN ) || p->GetActionNumber() <= pAct->GetActionNumber() )
p->UpdateReference( this, eMode, rTo, nDx, nDy, nDz );
if ( bActRejected &&
- ((ScChangeActionContent*)p)->IsTopContent() &&
+ static_cast<ScChangeActionContent*>(p)->IsTopContent() &&
rFrom.In( p->GetBigRange() ) )
{ // Recover dependency to write Content
ScChangeActionLinkEntry* pLink =
@@ -3929,7 +3929,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( p->GetType() == SC_CAT_CONTENT )
{
- if ( ((ScChangeActionContent*)p)->IsTopContent() )
+ if ( static_cast<ScChangeActionContent*>(p)->IsTopContent() )
rMap.insert( ::std::make_pair( p->GetActionNumber(), p ) );
}
else
@@ -3943,7 +3943,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( bIsDelete )
{ // Contents of deleted Ranges are only of interest on Delete
- ScChangeActionDel* pDel = (ScChangeActionDel*) pCur;
+ ScChangeActionDel* pDel = const_cast<ScChangeActionDel*>(static_cast<const ScChangeActionDel*>(pCur));
if ( !bAllFlat && bIsMasterDelete && pCur == pAct )
{
// Corresponding Deletes to this Delete to the same level,
@@ -3951,7 +3951,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
ScChangeActionType eType = pDel->GetType();
ScChangeAction* p = pDel;
while ( (p = p->GetPrev()) != NULL && p->GetType() == eType &&
- !((ScChangeActionDel*)p)->IsTopDelete() )
+ !static_cast<ScChangeActionDel*>(p)->IsTopDelete() )
rMap.insert( ::std::make_pair( p->GetActionNumber(), p ) );
// delete this in the map too
rMap.insert( ::std::make_pair( pAct->GetActionNumber(), pAct ) );
@@ -3977,7 +3977,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( p->IsDeleteType() )
{ // Further TopDeletes to same level: it's not rejectable
- if ( ((ScChangeActionDel*)p)->IsTopDelete() )
+ if ( static_cast<ScChangeActionDel*>(p)->IsTopDelete() )
rMap.insert( ::std::make_pair( p->GetActionNumber(), p ) );
}
else
@@ -4024,7 +4024,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
{
if ( p->GetType() == SC_CAT_CONTENT )
{
- if ( ((ScChangeActionContent*)p)->IsTopContent() )
+ if ( static_cast<ScChangeActionContent*>(p)->IsTopContent() )
rMap.insert( ::std::make_pair( p->GetActionNumber(), p ) );
}
else
@@ -4036,14 +4036,14 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
}
else if ( pCur->GetType() == SC_CAT_CONTENT )
{ // All changes at same position
- ScChangeActionContent* pContent = (ScChangeActionContent*) pCur;
+ ScChangeActionContent* pContent = const_cast<ScChangeActionContent*>(static_cast<const ScChangeActionContent*>(pCur));
// All preceding ones
while ( ( pContent = pContent->GetPrevContent() ) != NULL )
{
if ( !pContent->IsRejected() )
rMap.insert( ::std::make_pair( pContent->GetActionNumber(), pContent ) );
}
- pContent = (ScChangeActionContent*) pCur;
+ pContent = const_cast<ScChangeActionContent*>(static_cast<const ScChangeActionContent*>(pCur));
// All succeeding ones
while ( ( pContent = pContent->GetNextContent() ) != NULL )
{
@@ -4075,7 +4075,7 @@ void ScChangeTrack::GetDependents( ScChangeAction* pAct,
if ( bAllFlat )
{
ScChangeAction* p = GetAction(
- ((ScChangeActionReject*)pCur)->GetRejectAction() );
+ static_cast<const ScChangeActionReject*>(pCur)->GetRejectAction() );
if (p != pAct && rMap.find( p->GetActionNumber() ) == rMap.end())
cStack.push( p );
}
@@ -4088,7 +4088,7 @@ bool ScChangeTrack::SelectContent( ScChangeAction* pAct, bool bOldest )
if ( pAct->GetType() != SC_CAT_CONTENT )
return false;
- ScChangeActionContent* pContent = (ScChangeActionContent*) pAct;
+ ScChangeActionContent* pContent = static_cast<ScChangeActionContent*>(pAct);
if ( bOldest )
{
pContent = pContent->GetTopContent();
@@ -4133,7 +4133,7 @@ bool ScChangeTrack::SelectContent( ScChangeAction* pAct, bool bOldest )
if ( p->GetType() == SC_CAT_CONTENT )
{
// we don't need no recursion here, do we?
- bOk &= ((ScChangeActionContent*)p)->Select( pDoc, this,
+ bOk &= static_cast<ScChangeActionContent*>(p)->Select( pDoc, this,
bOldest, &aRejectActions );
}
else
@@ -4277,7 +4277,7 @@ bool ScChangeTrack::Reject(
}
else
bTabDel = bTabDelOk = false;
- ScChangeActionDel* pDel = (ScChangeActionDel*) pAct;
+ ScChangeActionDel* pDel = static_cast<ScChangeActionDel*>(pAct);
if ( bOk )
{
aDelRange = pDel->GetOverAllRange();
@@ -4307,7 +4307,7 @@ bool ScChangeTrack::Reject(
bool bLoop = true;
do
{
- pDel = (ScChangeActionDel*) p;
+ pDel = static_cast<ScChangeActionDel*>(p);
bOk = pDel->Reject( pDoc );
if ( bOk )
{
@@ -4338,7 +4338,7 @@ bool ScChangeTrack::Reject(
else
p = p->GetPrev();
} while ( bOk && bLoop && p && p->GetType() == eActType &&
- !((ScChangeActionDel*)p)->IsTopDelete() );
+ !static_cast<ScChangeActionDel*>(p)->IsTopDelete() );
}
bRejected = bOk;
if ( bOneOk || (bTabDel && bTabDelOk) )
@@ -4367,7 +4367,7 @@ bool ScChangeTrack::Reject(
{
ScChangeActionMove* pReject = new ScChangeActionMove(
pAct->GetBigRange().MakeRange(),
- ((ScChangeActionMove*)pAct)->GetFromRange().MakeRange(), this );
+ static_cast<ScChangeActionMove*>(pAct)->GetFromRange().MakeRange(), this );
pReject->SetRejectAction( pAct->GetActionNumber() );
pReject->SetState( SC_CAS_ACCEPTED );
Append( pReject );
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 6e738d5..d49aaf6 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -2853,7 +2853,7 @@ bool ScCompiler::IsMacro( const OUString& rName )
if (FormulaGrammar::isODFF( GetGrammar()) && aName.startsWithIgnoreAsciiCase("USER."))
aName = aName.copy(5);
- SbxMethod* pMeth = (SbxMethod*) pObj->Find( aName, SbxCLASS_METHOD );
+ SbxMethod* pMeth = static_cast<SbxMethod*>(pObj->Find( aName, SbxCLASS_METHOD ));
if( !pMeth )
{
return false;
diff --git a/sc/source/core/tool/defaultsoptions.cxx b/sc/source/core/tool/defaultsoptions.cxx
index 8047122..7c66d60 100644
--- a/sc/source/core/tool/defaultsoptions.cxx
+++ b/sc/source/core/tool/defaultsoptions.cxx
@@ -85,7 +85,7 @@ bool ScTpDefaultsItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScTpDefaultsItem& rPItem = (const ScTpDefaultsItem&)rItem;
+ const ScTpDefaultsItem& rPItem = static_cast<const ScTpDefaultsItem&>(rItem);
return ( theOptions == rPItem.theOptions );
}
diff --git a/sc/source/core/tool/detfunc.cxx b/sc/source/core/tool/detfunc.cxx
index 835220f..7a8880b 100644
--- a/sc/source/core/tool/detfunc.cxx
+++ b/sc/source/core/tool/detfunc.cxx
@@ -129,7 +129,7 @@ static bool lcl_HasThickLine( SdrObject& rObj )
{
// thin lines get width 0 -> everything greater 0 is a thick line
- return ( ((const XLineWidthItem&)rObj.GetMergedItem(XATTR_LINEWIDTH)).GetValue() > 0 );
+ return static_cast<const XLineWidthItem&>(rObj.GetMergedItem(XATTR_LINEWIDTH)).GetValue() > 0;
}
ScDetectiveData::ScDetectiveData( SdrModel* pModel ) :
@@ -229,7 +229,7 @@ ScCommentData::ScCommentData( ScDocument& rDoc, SdrModel* pModel ) :
// do use the default cell style, so the user has a chance to
// modify the font for the annotations
- ((const ScPatternAttr&)rDoc.GetPool()->GetDefaultItem(ATTR_PATTERN)).
+ static_cast<const ScPatternAttr&>(rDoc.GetPool()->GetDefaultItem(ATTR_PATTERN)).
FillEditItemSet( &aCaptionSet );
// support the best position for the tail connector now that
@@ -416,9 +416,9 @@ bool ScDetectiveFunc::HasArrow( const ScAddress& rStart,
const SfxItemSet& rSet = pObject->GetMergedItemSet();
bool bObjStartAlien =
- lcl_IsOtherTab( ((const XLineStartItem&)rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
+ lcl_IsOtherTab( static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
bool bObjEndAlien =
- lcl_IsOtherTab( ((const XLineEndItem&)rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
+ lcl_IsOtherTab( static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
bool bStartHit = bStartAlien ? bObjStartAlien :
( !bObjStartAlien && aStartRect.IsInside(pObject->GetPoint(0)) );
@@ -442,9 +442,9 @@ bool ScDetectiveFunc::IsNonAlienArrow( SdrObject* pObject )
const SfxItemSet& rSet = pObject->GetMergedItemSet();
bool bObjStartAlien =
- lcl_IsOtherTab( ((const XLineStartItem&)rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
+ lcl_IsOtherTab( static_cast<const XLineStartItem&>(rSet.Get(XATTR_LINESTART)).GetLineStartValue() );
bool bObjEndAlien =
- lcl_IsOtherTab( ((const XLineEndItem&)rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
+ lcl_IsOtherTab( static_cast<const XLineEndItem&>(rSet.Get(XATTR_LINEEND)).GetLineEndValue() );
return !bObjStartAlien && !bObjEndAlien;
}
@@ -744,7 +744,7 @@ void ScDetectiveFunc::DeleteBox( SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nR
if ( pObject->GetLayer() == SC_LAYER_INTERN &&
pObject->Type() == TYPE(SdrRectObj) )
{
- aObjRect = ((SdrRectObj*)pObject)->GetLogicRect();
+ aObjRect = static_cast<SdrRectObj*>(pObject)->GetLogicRect();
aObjRect.Justify();
if ( RectIsPoints( aObjRect, aStartCorner, aEndCorner ) )
ppObj[nDelCount++] = pObject;
@@ -1309,7 +1309,7 @@ bool ScDetectiveFunc::MarkInvalid(bool& rOverflow)
const ScPatternAttr* pPattern = aAttrIter.GetNext( nCol, nRow1, nRow2 );
while ( pPattern && nInsCount < SC_DET_MAXCIRCLE )
{
- sal_uLong nIndex = ((const SfxUInt32Item&)pPattern->GetItem(ATTR_VALIDDATA)).GetValue();
+ sal_uLong nIndex = static_cast<const SfxUInt32Item&>(pPattern->GetItem(ATTR_VALIDDATA)).GetValue();
if (nIndex)
{
const ScValidationData* pData = pDoc->GetValidationEntry( nIndex );
@@ -1596,7 +1596,7 @@ ScDetectiveObjType ScDetectiveFunc::GetDetectiveObjectType( SdrObject* pObject,
FindFrameForObject( pObject, rSource ); // modifies rSource
}
- ColorData nObjColor = ((const XLineColorItem&)pObject->GetMergedItem(XATTR_LINECOLOR)).GetColorValue().GetColor();
+ ColorData nObjColor = static_cast<const XLineColorItem&>(pObject->GetMergedItem(XATTR_LINECOLOR)).GetColorValue().GetColor();
if ( nObjColor == GetErrorColor() && nObjColor != GetArrowColor() )
rRedLine = true;
}
diff --git a/sc/source/core/tool/docoptio.cxx b/sc/source/core/tool/docoptio.cxx
index c3676a5..d070865 100644
--- a/sc/source/core/tool/docoptio.cxx
+++ b/sc/source/core/tool/docoptio.cxx
@@ -125,7 +125,7 @@ bool ScTpCalcItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScTpCalcItem& rPItem = (const ScTpCalcItem&)rItem;
+ const ScTpCalcItem& rPItem = static_cast<const ScTpCalcItem&>(rItem);
return ( theOptions == rPItem.theOptions );
}
diff --git a/sc/source/core/tool/editutil.cxx b/sc/source/core/tool/editutil.cxx
index 59d39c8..7cca6e8 100644
--- a/sc/source/core/tool/editutil.cxx
+++ b/sc/source/core/tool/editutil.cxx
@@ -285,7 +285,7 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT
bool bLayoutRTL = pDoc->IsLayoutRTL( nTab );
long nLayoutSign = bLayoutRTL ? -1 : 1;
- const ScMergeAttr* pMerge = (const ScMergeAttr*)&pPattern->GetItem(ATTR_MERGE);
+ const ScMergeAttr* pMerge = static_cast<const ScMergeAttr*>(&pPattern->GetItem(ATTR_MERGE));
long nCellX = (long) ( pDoc->GetColWidth(nCol,nTab) * nPPTX );
if ( pMerge->GetColMerge() > 1 )
{
@@ -300,11 +300,11 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT
nCellY += (long) pDoc->GetScaledRowHeight( nRow+1, nRow+nCountY-1, nTab, nPPTY);
}
- const SvxMarginItem* pMargin = (const SvxMarginItem*)&pPattern->GetItem(ATTR_MARGIN);
+ const SvxMarginItem* pMargin = static_cast<const SvxMarginItem*>(&pPattern->GetItem(ATTR_MARGIN));
sal_uInt16 nIndent = 0;
- if ( ((const SvxHorJustifyItem&)pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue() ==
+ if ( static_cast<const SvxHorJustifyItem&>(pPattern->GetItem(ATTR_HOR_JUSTIFY)).GetValue() ==
SVX_HOR_JUSTIFY_LEFT )
- nIndent = ((const SfxUInt16Item&)pPattern->GetItem(ATTR_INDENT)).GetValue();
+ nIndent = static_cast<const SfxUInt16Item&>(pPattern->GetItem(ATTR_INDENT)).GetValue();
long nPixDifX = (long) ( ( pMargin->GetLeftMargin() + nIndent ) * nPPTX );
aStartPos.X() += nPixDifX * nLayoutSign;
nCellX -= nPixDifX + (long) ( pMargin->GetRightMargin() * nPPTX ); // wegen Umbruch etc.
@@ -313,12 +313,12 @@ Rectangle ScEditUtil::GetEditArea( const ScPatternAttr* pPattern, bool bForceToT
long nPixDifY;
long nTopMargin = (long) ( pMargin->GetTopMargin() * nPPTY );
- SvxCellVerJustify eJust = (SvxCellVerJustify) ((const SvxVerJustifyItem&)pPattern->
+ SvxCellVerJustify eJust = (SvxCellVerJustify) static_cast<const SvxVerJustifyItem&>(pPattern->
GetItem(ATTR_VER_JUSTIFY)).GetValue();
// asian vertical is always edited top-aligned
- bool bAsianVertical = ((const SfxBoolItem&)pPattern->GetItem( ATTR_STACKED )).GetValue() &&
- ((const SfxBoolItem&)pPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
+ bool bAsianVertical = static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_STACKED )).GetValue() &&
+ static_cast<const SfxBoolItem&>(pPattern->GetItem( ATTR_VERTICAL_ASIAN )).GetValue();
if ( eJust == SVX_VER_JUSTIFY_TOP ||
( bForceToTop && ( SC_MOD()->GetInputOptions().GetTextWysiwyg() || bAsianVertical ) ) )
@@ -692,7 +692,7 @@ ScTabEditEngine::ScTabEditEngine( ScDocument* pDoc )
: ScEditEngineDefaulter( pDoc->GetEnginePool() )
{
SetEditTextObjectPool( pDoc->GetEditPool() );
- Init((const ScPatternAttr&)pDoc->GetPool()->GetDefaultItem(ATTR_PATTERN));
+ Init(static_cast<const ScPatternAttr&>(pDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)));
}
ScTabEditEngine::ScTabEditEngine( const ScPatternAttr& rPattern,
@@ -873,7 +873,7 @@ void ScFieldEditEngine::FieldClicked( const SvxFieldItem& rField, sal_Int32, sal
if ( pFld && pFld->ISA( SvxURLField ) && bExecuteURL )
{
- const SvxURLField* pURLField = (const SvxURLField*) pFld;
+ const SvxURLField* pURLField = static_cast<const SvxURLField*>(pFld);
ScGlobal::OpenURL( pURLField->GetURL(), pURLField->GetTargetFrame() );
}
}
diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx
index cea8940..1abeaa3 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -176,7 +176,7 @@ bool ScTpFormulaItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScTpFormulaItem& rPItem = (const ScTpFormulaItem&)rItem;
+ const ScTpFormulaItem& rPItem = static_cast<const ScTpFormulaItem&>(rItem);
return ( theOptions == rPItem.theOptions );
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 016a026..e099d3a 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -2254,8 +2254,8 @@ void ScInterpreter::ScCell()
sal_Unicode c = 0;
if (aCell.hasString())
{
- const SvxHorJustifyItem* pJustAttr = (const SvxHorJustifyItem*)
- pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_HOR_JUSTIFY );
+ const SvxHorJustifyItem* pJustAttr = static_cast<const SvxHorJustifyItem*>(
+ pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_HOR_JUSTIFY ));
switch( pJustAttr->GetValue() )
{
case SVX_HOR_JUSTIFY_STANDARD:
@@ -2270,8 +2270,8 @@ void ScInterpreter::ScCell()
}
else if( aInfoType.equalsAscii( "PROTECT" ) )
{ // 1 = cell locked
- const ScProtectionAttr* pProtAttr = (const ScProtectionAttr*)
- pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_PROTECTION );
+ const ScProtectionAttr* pProtAttr = static_cast<const ScProtectionAttr*>(
+ pDok->GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_PROTECTION ));
PushInt( pProtAttr->GetProtection() ? 1 : 0 );
}
@@ -8121,7 +8121,7 @@ void ScInterpreter::ScText()
const ScPatternAttr* pPattern = pDok->GetPattern(
aPos.Col(), aPos.Row(), aPos.Tab() );
if ( pPattern )
- eCellLang = ((const SvxLanguageItem&)
+ eCellLang = static_cast<const SvxLanguageItem&>(
pPattern->GetItem( ATTR_LANGUAGE_FORMAT )).GetValue();
else
eCellLang = ScGlobal::eLnge;
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index e1eeb71..e6bff29 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3140,7 +3140,7 @@ void ScInterpreter::ScMacro()
}
bool bVolatileMacro = false;
- SbMethod* pMethod = (SbMethod*)pVar;
+ SbMethod* pMethod = static_cast<SbMethod*>(pVar);
SbModule* pModule = pMethod->GetModule();
bool bUseVBAObjects = pModule->IsVBACompat();
diff --git a/sc/source/core/tool/printopt.cxx b/sc/source/core/tool/printopt.cxx
index 337ca6f..70926e1 100644
--- a/sc/source/core/tool/printopt.cxx
+++ b/sc/source/core/tool/printopt.cxx
@@ -96,7 +96,7 @@ bool ScTpPrintItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScTpPrintItem& rPItem = (const ScTpPrintItem&)rItem;
+ const ScTpPrintItem& rPItem = static_cast<const ScTpPrintItem&>(rItem);
return ( theOptions == rPItem.theOptions );
}
diff --git a/sc/source/core/tool/progress.cxx b/sc/source/core/tool/progress.cxx
index 9cf8977..c0e4a29 100644
--- a/sc/source/core/tool/progress.cxx
+++ b/sc/source/core/tool/progress.cxx
@@ -55,7 +55,7 @@ static bool lcl_IsHiddenDocument( SfxObjectShell* pObjSh )
SfxItemSet* pSet = pMed->GetItemSet();
const SfxPoolItem* pItem;
if ( pSet && SfxItemState::SET == pSet->GetItemState( SID_HIDDEN, true, &pItem ) &&
- ((const SfxBoolItem*)pItem)->GetValue() )
+ static_cast<const SfxBoolItem*>(pItem)->GetValue() )
return true;
}
}
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 6cea8ff..b830d4d 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -1460,13 +1460,13 @@ bool ScTokenArray::ImplGetReference( ScRange& rRange, const ScAddress& rPos, boo
{
if ( pToken->GetType() == svSingleRef )
{
- const ScSingleRefData& rRef = *((const ScSingleRefToken*)pToken)->GetSingleRef();
+ const ScSingleRefData& rRef = *static_cast<const ScSingleRefToken*>(pToken)->GetSingleRef();
rRange.aStart = rRange.aEnd = rRef.toAbs(rPos);
bIs = !bValidOnly || ValidAddress(rRange.aStart);
}
else if ( pToken->GetType() == svDoubleRef )
{
- const ScComplexRefData& rCompl = *((const ScDoubleRefToken*)pToken)->GetDoubleRef();
+ const ScComplexRefData& rCompl = *static_cast<const ScDoubleRefToken*>(pToken)->GetDoubleRef();
const ScSingleRefData& rRef1 = rCompl.Ref1;
const ScSingleRefData& rRef2 = rCompl.Ref2;
rRange.aStart = rRef1.toAbs(rPos);
diff --git a/sc/source/core/tool/viewopti.cxx b/sc/source/core/tool/viewopti.cxx
index 0e105c3..4cc649c 100644
--- a/sc/source/core/tool/viewopti.cxx
+++ b/sc/source/core/tool/viewopti.cxx
@@ -219,7 +219,7 @@ bool ScTpViewItem::operator==( const SfxPoolItem& rItem ) const
{
OSL_ENSURE( SfxPoolItem::operator==( rItem ), "unequal Which or Type" );
- const ScTpViewItem& rPItem = (const ScTpViewItem&)rItem;
+ const ScTpViewItem& rPItem = static_cast<const ScTpViewItem&>(rItem);
return ( theOptions == rPItem.theOptions );
}
diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
index 33af4c0..3788c3c 100644
--- a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
+++ b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx
@@ -22,8 +22,8 @@
#include <xmloff/xmlictxt.hxx>
#include <com/sun/star/util/Date.hpp>
+#include "xmlimprt.hxx"
-class ScXMLImport;
class ScXMLCalculationSettingsContext : public SvXMLImportContext
{
@@ -38,8 +38,8 @@ class ScXMLCalculationSettingsContext : public SvXMLImportContext
bool bMatchWholeCell;
bool bUseRegularExpressions;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLCalculationSettingsContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
@@ -62,8 +62,8 @@ public:
class ScXMLNullDateContext : public SvXMLImportContext
{
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLNullDateContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
@@ -82,8 +82,8 @@ public:
class ScXMLIterationContext : public SvXMLImportContext
{
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLIterationContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
diff --git a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
index 95a93c1..1801db6 100644
--- a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
+++ b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx
@@ -21,8 +21,8 @@
#define INCLUDED_SC_SOURCE_FILTER_XML_XMLCELLRANGESOURCECONTEXT_HXX
#include <xmloff/xmlimp.hxx>
+#include "xmlimprt.hxx"
-class ScXMLImport;
struct ScMyImpCellRangeSource
{
@@ -40,8 +40,8 @@ struct ScMyImpCellRangeSource
class ScXMLCellRangeSourceContext : public SvXMLImportContext
{
private:
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLCellRangeSourceContext(
diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
index 76cfdc1..d75c081 100644
--- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
+++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx
@@ -555,7 +555,7 @@ void ScChangeTrackingExportHelper::AddDeletionAttributes(const ScChangeActionDel
bAll = true;
else
{
- const ScChangeActionDel* pDel = (const ScChangeActionDel*) p;
+ const ScChangeActionDel* pDel = static_cast<const ScChangeActionDel*>(p);
if ( (pDel->GetDx() > pDelAction->GetDx() || pDel->GetDy() > pDelAction->GetDy()) &&
pDel->GetBigRange() == pDelAction->GetBigRange() )
{
diff --git a/sc/source/filter/xml/XMLConsolidationContext.hxx b/sc/source/filter/xml/XMLConsolidationContext.hxx
index ba53c2f..1c9bfd8 100644
--- a/sc/source/filter/xml/XMLConsolidationContext.hxx
+++ b/sc/source/filter/xml/XMLConsolidationContext.hxx
@@ -23,8 +23,8 @@
#include "global.hxx"
#include "address.hxx"
#include <xmloff/xmlimp.hxx>
+#include "xmlimprt.hxx"
-class ScXMLImport;
class ScXMLConsolidationContext : public SvXMLImportContext
{
@@ -37,8 +37,8 @@ private:
bool bTargetAddr;
protected:
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLConsolidationContext(
diff --git a/sc/source/filter/xml/XMLDDELinksContext.hxx b/sc/source/filter/xml/XMLDDELinksContext.hxx
index ce7b102..184a4ce 100644
--- a/sc/source/filter/xml/XMLDDELinksContext.hxx
+++ b/sc/source/filter/xml/XMLDDELinksContext.hxx
@@ -21,15 +21,13 @@
#define INCLUDED_SC_SOURCE_FILTER_XML_XMLDDELINKSCONTEXT_HXX
#include <xmloff/xmlictxt.hxx>
-
+#include "xmlimprt.hxx"
#include <list>
-class ScXMLImport;
-
class ScXMLDDELinksContext : public SvXMLImportContext
{
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDDELinksContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
@@ -68,8 +66,8 @@ class ScXMLDDELinkContext : public SvXMLImportContext
sal_Int32 nRows;
sal_uInt8 nMode;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDDELinkContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
@@ -100,8 +98,8 @@ class ScXMLDDESourceContext : public SvXMLImportContext
{
ScXMLDDELinkContext* pDDELink;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDDESourceContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
@@ -123,8 +121,8 @@ class ScXMLDDETableContext : public SvXMLImportContext
{
ScXMLDDELinkContext* pDDELink;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDDETableContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
@@ -146,8 +144,8 @@ class ScXMLDDEColumnContext : public SvXMLImportContext
{
ScXMLDDELinkContext* pDDELink;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDDEColumnContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
@@ -170,8 +168,8 @@ class ScXMLDDERowContext : public SvXMLImportContext
ScXMLDDELinkContext* pDDELink;
sal_Int32 nRows;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDDERowContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
@@ -200,8 +198,8 @@ class ScXMLDDECellContext : public SvXMLImportContext
ScXMLDDELinkContext* pDDELink;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDDECellContext( ScXMLImport& rImport, sal_uInt16 nPrfx,
const OUString& rLName,
diff --git a/sc/source/filter/xml/XMLDetectiveContext.hxx b/sc/source/filter/xml/XMLDetectiveContext.hxx
index 12b0265..38f22ea 100644
--- a/sc/source/filter/xml/XMLDetectiveContext.hxx
+++ b/sc/source/filter/xml/XMLDetectiveContext.hxx
@@ -24,11 +24,10 @@
#include <com/sun/star/table/CellRangeAddress.hpp>
#include "detfunc.hxx"
#include "detdata.hxx"
+#include "xmlimprt.hxx"
#include <list>
-class ScXMLImport;
-
struct ScMyImpDetectiveObj
{
ScRange aSourceRange;
@@ -78,8 +77,8 @@ class ScXMLDetectiveContext : public SvXMLImportContext
private:
ScMyImpDetectiveObjVec* pDetectiveObjVec;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDetectiveContext(
@@ -105,8 +104,8 @@ private:
ScMyImpDetectiveObj aDetectiveObj;
bool bValid;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDetectiveHighlightedContext(
@@ -132,8 +131,8 @@ private:
ScMyImpDetectiveOp aDetectiveOp;
bool bHasType;
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
ScXMLDetectiveOperationContext(
diff --git a/sc/source/filter/xml/XMLEmptyContext.hxx b/sc/source/filter/xml/XMLEmptyContext.hxx
index be0c9e9..20d6bd0 100644
--- a/sc/source/filter/xml/XMLEmptyContext.hxx
+++ b/sc/source/filter/xml/XMLEmptyContext.hxx
@@ -20,13 +20,13 @@
#define INCLUDED_SC_SOURCE_FILTER_XML_XMLEMPTYCONTEXT_HXX
#include <xmloff/xmlictxt.hxx>
+#include "xmlimprt.hxx"
-class ScXMLImport;
class ScXMLEmptyContext : public SvXMLImportContext
{
- const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); }
- ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); }
+ const ScXMLImport& GetScImport() const { return static_cast<const ScXMLImport&>(GetImport()); }
+ ScXMLImport& GetScImport() { return static_cast<ScXMLImport&>(GetImport()); }
public:
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index cd711d4..99b0867 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -759,7 +759,7 @@ void ScXMLExportDataPilot::WriteDataPilots(const uno::Reference <sheet::XSpreads
const ScPatternAttr* pAttr = aAttrItr.GetNext(nCol, nRow1, nRow2);
while (pAttr)
{
- ScMergeFlagAttr& rItem = (ScMergeFlagAttr&)pAttr->GetItem(ATTR_MERGE_FLAG);
+ const ScMergeFlagAttr& rItem = static_cast<const ScMergeFlagAttr&>(pAttr->GetItem(ATTR_MERGE_FLAG));
if (rItem.HasPivotButton())
{
for (SCROW nButtonRow = nRow1; nButtonRow <= nRow2; ++nButtonRow)
diff --git a/sc/source/filter/xml/XMLTableShapesContext.cxx b/sc/source/filter/xml/XMLTableShapesContext.cxx
index f1eb4a8..7062aa4 100644
--- a/sc/source/filter/xml/XMLTableShapesContext.cxx
+++ b/sc/source/filter/xml/XMLTableShapesContext.cxx
@@ -52,7 +52,7 @@ SvXMLImportContext *ScXMLTableShapesContext::CreateChildContext( sal_uInt16 nPre
uno::Reference<drawing::XShapes> xShapes (rXMLImport.GetTables().GetCurrentXShapes());
if (xShapes.is())
{
- XMLTableShapeImportHelper* pTableShapeImport((XMLTableShapeImportHelper*)rXMLImport.GetShapeImport().get());
+ XMLTableShapeImportHelper* pTableShapeImport(static_cast<XMLTableShapeImportHelper*>(rXMLImport.GetShapeImport().get()));
pTableShapeImport->SetOnTable(true);
pContext = rXMLImport.GetShapeImport()->CreateGroupChildContext(
rXMLImport, nPrefix, rLName, xAttrList, xShapes);
diff --git a/sc/source/filter/xml/XMLTableShapesContext.hxx b/sc/source/filter/xml/XMLTableShapesContext.hxx
index aa6ad50..857ebc8 100644
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list