[Libreoffice-commits] core.git: include/tools oox/source reportdesign/source svl/source svtools/source svx/source tools/source
Oliver Specht
oliver.specht at cib.de
Thu Oct 1 01:32:51 PDT 2015
include/tools/errinf.hxx | 4
oox/source/export/drawingml.cxx | 2
oox/source/export/shapes.cxx | 2
oox/source/export/vmlexport.cxx | 2
reportdesign/source/core/sdr/ReportDrawPage.cxx | 6 -
reportdesign/source/core/sdr/RptModel.cxx | 2
reportdesign/source/core/sdr/RptPage.cxx | 2
reportdesign/source/core/sdr/UndoEnv.cxx | 4
reportdesign/source/filter/xml/xmlCell.cxx | 2
reportdesign/source/filter/xml/xmlColumn.cxx | 4
reportdesign/source/filter/xml/xmlHelper.cxx | 2
reportdesign/source/filter/xml/xmlRow.cxx | 4
reportdesign/source/filter/xml/xmlStyleImport.cxx | 4
reportdesign/source/filter/xml/xmlTable.cxx | 2
reportdesign/source/filter/xml/xmlfilter.cxx | 2
reportdesign/source/ui/misc/UITools.cxx | 54 ++++++------
reportdesign/source/ui/report/SectionView.cxx | 4
svl/source/items/cenumitm.cxx | 2
svl/source/items/cintitem.cxx | 8 -
svl/source/items/custritm.cxx | 2
svl/source/items/ilstitem.cxx | 2
svl/source/items/itempool.cxx | 4
svl/source/items/itemset.cxx | 2
svl/source/items/poolio.cxx | 10 +-
svtools/source/misc/ehdl.cxx | 7 -
svx/source/accessibility/AccessibleControlShape.cxx | 2
svx/source/accessibility/AccessibleShape.cxx | 2
svx/source/accessibility/ShapeTypeHandler.cxx | 2
svx/source/customshapes/EnhancedCustomShape2d.cxx | 4
svx/source/customshapes/EnhancedCustomShape3d.cxx | 4
svx/source/customshapes/EnhancedCustomShapeEngine.cxx | 12 +-
svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 2
svx/source/dialog/_bmpmask.cxx | 2
svx/source/dialog/_contdlg.cxx | 4
svx/source/dialog/fontwork.cxx | 22 ++--
svx/source/dialog/hdft.cxx | 6 -
svx/source/dialog/imapdlg.cxx | 4
svx/source/dialog/rlrcitem.cxx | 22 ++--
svx/source/dialog/srchctrl.cxx | 4
svx/source/engine3d/dragmt3d.cxx | 4
svx/source/engine3d/obj3d.cxx | 14 +--
svx/source/engine3d/scene3d.cxx | 8 -
svx/source/engine3d/view3d.cxx | 44 ++++-----
svx/source/engine3d/view3d1.cxx | 10 +-
svx/source/fmcomp/fmgridcl.cxx | 2
svx/source/fmcomp/gridcell.cxx | 20 ++--
svx/source/fmcomp/gridctrl.cxx | 2
svx/source/form/filtnav.cxx | 72 ++++++++--------
svx/source/form/fmPropBrw.cxx | 2
svx/source/form/fmdpage.cxx | 4
svx/source/form/fmexpl.cxx | 6 -
svx/source/form/fmobj.cxx | 8 -
svx/source/form/fmpgeimp.cxx | 2
svx/source/form/fmshell.cxx | 6 -
svx/source/form/fmshimp.cxx | 6 -
svx/source/form/fmtextcontrolshell.cxx | 8 -
svx/source/form/fmundo.cxx | 12 +-
svx/source/form/fmview.cxx | 8 -
svx/source/form/fmvwimp.cxx | 4
svx/source/form/navigatortree.cxx | 22 ++--
svx/source/form/navigatortreemodel.cxx | 30 +++---
svx/source/form/tabwin.cxx | 2
svx/source/form/tbxform.cxx | 2
svx/source/gallery2/galmisc.cxx | 2
svx/source/mnuctrls/SmartTagCtl.cxx | 2
svx/source/mnuctrls/clipboardctl.cxx | 2
svx/source/mnuctrls/fntctl.cxx | 2
svx/source/mnuctrls/fntszctl.cxx | 8 -
svx/source/sdr/contact/objectcontactofpageview.cxx | 2
svx/source/sdr/contact/viewcontactofsdrobj.cxx | 6 -
svx/source/sdr/properties/e3dsceneproperties.cxx | 6 -
svx/source/sdr/properties/itemsettools.cxx | 2
svx/source/sdr/properties/properties.cxx | 2
svx/source/sdr/properties/textproperties.cxx | 2
svx/source/sidebar/SelectionAnalyzer.cxx | 4
svx/source/sidebar/text/TextPropertyPanel.cxx | 6 -
svx/source/stbctrls/insctrl.cxx | 2
svx/source/stbctrls/modctrl.cxx | 2
svx/source/stbctrls/pszctrl.cxx | 8 -
svx/source/stbctrls/selctrl.cxx | 2
svx/source/stbctrls/xmlsecctrl.cxx | 2
svx/source/stbctrls/zoomctrl.cxx | 4
svx/source/stbctrls/zoomsliderctrl.cxx | 4
svx/source/svdraw/clonelist.cxx | 8 -
svx/source/svdraw/sdrpagewindow.cxx | 4
svx/source/svdraw/svdcrtv.cxx | 14 +--
svx/source/svdraw/svddrgmt.cxx | 8 -
svx/source/svdraw/svddrgv.cxx | 21 ++--
svx/source/svdraw/svdedtv.cxx | 14 +--
svx/source/svdraw/svdedtv1.cxx | 8 -
svx/source/svdraw/svdedtv2.cxx | 24 ++---
svx/source/svdraw/svdedxv.cxx | 10 +-
svx/source/svdraw/svdfmtf.cxx | 2
svx/source/svdraw/svdhdl.cxx | 6 -
svx/source/svdraw/svditer.cxx | 4
svx/source/svdraw/svdmark.cxx | 8 -
svx/source/svdraw/svdmrkv.cxx | 14 +--
svx/source/svdraw/svdobj.cxx | 6 -
svx/source/svdraw/svdomeas.cxx | 2
svx/source/svdraw/svdopath.cxx | 2
svx/source/svdraw/svdotxat.cxx | 4
svx/source/svdraw/svdotxdr.cxx | 2
svx/source/svdraw/svdpage.cxx | 8 -
svx/source/svdraw/svdpagv.cxx | 2
svx/source/svdraw/svdpntv.cxx | 4
svx/source/svdraw/svdpoev.cxx | 6 -
svx/source/svdraw/svdundo.cxx | 28 +++---
svx/source/svdraw/svdview.cxx | 16 +--
svx/source/svdraw/svdviter.cxx | 2
svx/source/svdraw/svdxcgv.cxx | 8 -
svx/source/tbxctrls/colrctrl.cxx | 2
svx/source/tbxctrls/grafctrl.cxx | 2
svx/source/tbxctrls/layctrl.cxx | 2
svx/source/tbxctrls/lboxctrl.cxx | 4
svx/source/tbxctrls/linectrl.cxx | 6 -
svx/source/tbxctrls/tbcontrl.cxx | 24 ++---
svx/source/toolbars/extrusionbar.cxx | 18 ++--
svx/source/toolbars/fontworkbar.cxx | 14 +--
svx/source/unodraw/UnoGraphicExporter.cxx | 14 +--
svx/source/unodraw/unomod.cxx | 4
svx/source/unodraw/unopage.cxx | 6 -
svx/source/unodraw/unoshap3.cxx | 4
svx/source/unodraw/unoshap4.cxx | 4
svx/source/unodraw/unoshape.cxx | 20 ++--
svx/source/unodraw/unoshtxt.cxx | 18 ++--
svx/source/unogallery/unogaltheme.cxx | 2
tools/source/ref/errinf.cxx | 6 +
127 files changed, 494 insertions(+), 490 deletions(-)
New commits:
commit 85f93697defd9a812a0cda0bc4e9364e28c0339e
Author: Oliver Specht <oliver.specht at cib.de>
Date: Tue Sep 29 15:35:28 2015 +0200
tdf#94559: third step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
oox, reportdesign, svl, svtools, svx, tools
Change-Id: I1f85ff92267a0668eba625fa61b4f07feb8f3d4e
Reviewed-on: https://gerrit.libreoffice.org/19002
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht at cib.de>
diff --git a/include/tools/errinf.hxx b/include/tools/errinf.hxx
index 4a9f07a..04db67a 100644
--- a/include/tools/errinf.hxx
+++ b/include/tools/errinf.hxx
@@ -34,7 +34,7 @@ namespace vcl { class Window; }
class EDcr_Impl;
class ErrHdl_Impl;
-class ErrorInfo
+class TOOLS_DLLPUBLIC ErrorInfo
{
private:
sal_uIntPtr lUserId;
@@ -44,7 +44,7 @@ public:
ErrorInfo( sal_uIntPtr lArgUserId ) :
lUserId( lArgUserId ){}
- virtual ~ErrorInfo(){}
+ virtual ~ErrorInfo();
sal_uIntPtr GetErrorCode() const { return lUserId; }
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index c4021a3..a8e3f88 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2095,7 +2095,7 @@ void DrawingML::WriteText( Reference< XInterface > rXIface, const OUString& pres
uno::Reference<drawing::XShape> xShape(rXIface, uno::UNO_QUERY);
SdrObject* pSdrObject = xShape.is() ? GetSdrObjectFromXShape(xShape) : 0;
- const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, pSdrObject);
+ const SdrTextObj* pTxtObj = dynamic_cast<SdrTextObj*>( pSdrObject );
if (pTxtObj && mpTextExport)
{
const OutlinerParaObject* pParaObj = 0;
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 571177d..2f73d27 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1501,7 +1501,7 @@ ShapeExport& ShapeExport::WriteOLE2Shape( Reference< XShape > xShape )
SdrObject* pSdrOLE2( GetSdrObjectFromXShape( xShape ) );
// The spec doesn't allow <p:pic> here, but PowerPoint requires it.
bool bEcma = mpFB->getVersion() == oox::core::ECMA_DIALECT;
- if ( pSdrOLE2 && pSdrOLE2->ISA( SdrOle2Obj ) && bEcma)
+ if ( pSdrOLE2 && dynamic_cast<const SdrOle2Obj*>( pSdrOLE2) != nullptr && bEcma)
{
const Graphic* pGraphic = static_cast<SdrOle2Obj*>(pSdrOLE2)->GetGraphic();
if ( pGraphic )
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index c71ffa7..6fad390 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -1141,7 +1141,7 @@ sal_Int32 VMLExport::StartShape()
m_pSerializer->startElementNS( XML_v, nShapeElement, XFastAttributeListRef( m_pShapeAttrList ) );
// now check if we have some editeng text (not associated textbox) and we have a text exporter registered
- const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, m_pSdrObject);
+ const SdrTextObj* pTxtObj = dynamic_cast<const SdrTextObj*>( m_pSdrObject );
if (pTxtObj && m_pTextExport && msfilter::util::HasTextBoxContent(m_nShapeType) && !IsWaterMarkShape(m_pSdrObject->GetName()) && !lcl_isTextBox(m_pSdrObject))
{
const OutlinerParaObject* pParaObj = 0;
diff --git a/reportdesign/source/core/sdr/ReportDrawPage.cxx b/reportdesign/source/core/sdr/ReportDrawPage.cxx
index 8ce2ead..f34459c 100644
--- a/reportdesign/source/core/sdr/ReportDrawPage.cxx
+++ b/reportdesign/source/core/sdr/ReportDrawPage.cxx
@@ -74,7 +74,7 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb
OUString sServiceName = pBaseObj->getServiceName();
OSL_ENSURE(!sServiceName.isEmpty(),"No Service Name given!");
- if ( pObj->ISA(OUnoObject) )
+ if ( typeid(*pObj) == typeid(OUnoObject) )
{
OUnoObject& rUnoObj = dynamic_cast<OUnoObject&>(*pObj);
if (rUnoObj.GetObjIdentifier() == OBJ_DLG_FIXEDTEXT)
@@ -89,14 +89,14 @@ uno::Reference< drawing::XShape > OReportDrawPage::_CreateShape( SdrObject *pOb
xShape.set(static_cast<cppu::OWeakObject*>(static_cast<SvxShape_UnoImplHelper *>(pShape)),uno::UNO_QUERY);
pShape->setShapeKind(pObj->GetObjIdentifier());
}
- else if ( pObj->ISA(OCustomShape) )
+ else if ( typeid(*pObj) == typeid(OCustomShape) )
{
SvxCustomShape* pShape = new SvxCustomShape( pObj );
uno::Reference < drawing::XEnhancedCustomShapeDefaulter > xShape2 = pShape;
xShape.set(xShape2,uno::UNO_QUERY);
pShape->setShapeKind(pObj->GetObjIdentifier());
}
- else if ( pObj->ISA(SdrOle2Obj) )
+ else if ( typeid(*pObj) == typeid(SdrOle2Obj) )
{
SdrOle2Obj& rOle2Obj = dynamic_cast<SdrOle2Obj&>(*pObj);
if (!rOle2Obj.GetObjRef().is())
diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx
index 5c50ad7..9be8337 100644
--- a/reportdesign/source/core/sdr/RptModel.cxx
+++ b/reportdesign/source/core/sdr/RptModel.cxx
@@ -117,7 +117,7 @@ OReportPage* OReportModel::getPage(const uno::Reference< report::XSection >& _xS
sal_uInt16 nCount = GetPageCount();
for (sal_uInt16 i = 0; i < nCount && !pPage ; ++i)
{
- OReportPage* pRptPage = PTR_CAST( OReportPage, GetPage(i) );
+ OReportPage* pRptPage = dynamic_cast<OReportPage*>( GetPage(i) );
if ( pRptPage && pRptPage->getSection() == _xSection )
pPage = pRptPage;
}
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index c22864c..3875467 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -119,7 +119,7 @@ SdrObject* OReportPage::RemoveObject(size_t nObjNum)
reportdesign::OSection* pSection = reportdesign::OSection::getImplementation(m_xSection);
uno::Reference< drawing::XShape> xShape(pObj->getUnoShape(),uno::UNO_QUERY);
pSection->notifyElementRemoved(xShape);
- if (pObj->ISA(OUnoObject))
+ if (dynamic_cast< const OUnoObject *>( pObj ) != nullptr)
{
OUnoObject& rUnoObj = dynamic_cast<OUnoObject&>(*pObj);
uno::Reference< container::XChild> xChild(rUnoObj.GetUnoControlModel(),uno::UNO_QUERY);
diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index fc49b37..3ae3b8e 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -162,14 +162,14 @@ void OXUndoEnvironment::Clear(const Accessor& /*_r*/)
sal_uInt16 i;
for (i = 0; i < nCount; i++)
{
- OReportPage* pPage = PTR_CAST( OReportPage, m_pImpl->m_rModel.GetPage(i) );
+ OReportPage* pPage = dynamic_cast<OReportPage*>( m_pImpl->m_rModel.GetPage(i) );
RemoveSection(pPage);
}
nCount = m_pImpl->m_rModel.GetMasterPageCount();
for (i = 0; i < nCount; i++)
{
- OReportPage* pPage = PTR_CAST( OReportPage, m_pImpl->m_rModel.GetMasterPage(i) );
+ OReportPage* pPage = dynamic_cast<OReportPage*>( m_pImpl->m_rModel.GetMasterPage(i) );
RemoveSection(pPage);
}
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx
index 185e7bb..84d7592 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -218,7 +218,7 @@ void OXMLCell::EndElement()
m_xComponent = xFixedLine.get();
m_pContainer->getSection()->add(m_xComponent.get());
m_pContainer->addCell(m_xComponent);
- XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,GetImport().GetAutoStyles()->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_CELL,m_sStyleName)));
+ XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* >(GetImport().GetAutoStyles()->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_CELL,m_sStyleName)));
if ( pAutoStyle )
{
uno::Reference<beans::XPropertySet> xBorderProp = OXMLHelper::createBorderPropertySet();
diff --git a/reportdesign/source/filter/xml/xmlColumn.cxx b/reportdesign/source/filter/xml/xmlColumn.cxx
index e9a558b..c75a951 100644
--- a/reportdesign/source/filter/xml/xmlColumn.cxx
+++ b/reportdesign/source/filter/xml/xmlColumn.cxx
@@ -136,7 +136,7 @@ void OXMLRowColumn::fillStyle(const OUString& _sStyleName)
};
pInfo->add(pMap);
Reference<XPropertySet> xProp = GenericPropertySet_CreateInstance(pInfo);
- XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_COLUMN,_sStyleName)));
+ XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext*>(pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_COLUMN,_sStyleName)));
if ( pAutoStyle )
{
pAutoStyle->FillPropertySet(xProp);
@@ -146,7 +146,7 @@ void OXMLRowColumn::fillStyle(const OUString& _sStyleName)
}
else
{
- pAutoStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_ROW,_sStyleName)));
+ pAutoStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* >(pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_ROW,_sStyleName)));
if ( pAutoStyle )
{
pAutoStyle->FillPropertySet(xProp);
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 47a5e99..673114f 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -252,7 +252,7 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const OUString& _sStyleName,
{
if ( !_xProp.is() || _sStyleName.isEmpty() || !_pAutoStyles )
return;
- XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,_pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_CELL,_sStyleName)));
+ XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext *>(_pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_CELL,_sStyleName)));
if ( pAutoStyle )
{
::com::sun::star::awt::FontDescriptor aFont;
diff --git a/reportdesign/source/filter/xml/xmlRow.cxx b/reportdesign/source/filter/xml/xmlRow.cxx
index 317d0d1..ab711eb 100644
--- a/reportdesign/source/filter/xml/xmlRow.cxx
+++ b/reportdesign/source/filter/xml/xmlRow.cxx
@@ -134,7 +134,7 @@ void OXMLRow::EndElement()
};
pInfo->add(pMap);
Reference<XPropertySet> xProp = GenericPropertySet_CreateInstance(pInfo);
- XMLPropStyleContext* pAutoStyle = PTR_CAST(XMLPropStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_COLUMN,m_sStyleName));
+ XMLPropStyleContext* pAutoStyle = dynamic_cast< const XMLPropStyleContext *>(pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_COLUMN,m_sStyleName));
if ( pAutoStyle )
{
pAutoStyle->FillPropertySet(xProp);
@@ -144,7 +144,7 @@ void OXMLRow::EndElement()
}
else
{
- pAutoStyle = PTR_CAST(XMLPropStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_ROW,m_sStyleName));
+ pAutoStyle = dynamic_cast< const XMLPropStyleContext *>(pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_ROW,m_sStyleName));
if ( pAutoStyle )
{
pAutoStyle->FillPropertySet(xProp);
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 563609c..1dad3e3 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -102,9 +102,9 @@ void OControlStyleContext::FillPropertySet(const Reference< XPropertySet > & rPr
XML_STYLE_FAMILY_DATA_STYLE, m_sDataStyleName)));
if ( !pStyle )
{
- OReportStylesContext* pMyStyles = PTR_CAST(OReportStylesContext,GetOwnImport().GetAutoStyles());
+ OReportStylesContext* pMyStyles = dynamic_cast< OReportStylesContext *>(GetOwnImport().GetAutoStyles());
if ( pMyStyles )
- pStyle = const_cast<SvXMLNumFormatContext*>(PTR_CAST(SvXMLNumFormatContext,pMyStyles->
+ pStyle = const_cast<SvXMLNumFormatContext*>(dynamic_cast< const SvXMLNumFormatContext *>(pMyStyles->
FindStyleChildContext(XML_STYLE_FAMILY_DATA_STYLE, m_sDataStyleName, true)));
else {
OSL_FAIL("not possible to get style");
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx b/reportdesign/source/filter/xml/xmlTable.cxx
index 7b32c7a..2872bc3 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -171,7 +171,7 @@ void OXMLTable::EndElement()
const SvXMLStylesContext* pAutoStyles = GetImport().GetAutoStyles();
if ( pAutoStyles )
{
- XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_TABLE,m_sStyleName)));
+ XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext *>(pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_TABLE_TABLE,m_sStyleName)));
if ( pAutoStyle )
{
pAutoStyle->FillPropertySet(m_xSection.get());
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index f23d38b..addd716 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -641,7 +641,7 @@ SvXMLImportContext* ORptFilter::CreateContext( sal_uInt16 nPrefix,
const SvXMLStylesContext* pAutoStyles = GetAutoStyles();
if ( pAutoStyles )
{
- XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_PAGE_MASTER,OUString("pm1"))));
+ XMLPropStyleContext* pAutoStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext *>(pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_PAGE_MASTER,OUString("pm1"))));
if ( pAutoStyle )
{
pAutoStyle->FillPropertySet(getReportDefinition().get());
diff --git a/reportdesign/source/ui/misc/UITools.cxx b/reportdesign/source/ui/misc/UITools.cxx
index b6fc5c3..e2f7854 100644
--- a/reportdesign/source/ui/misc/UITools.cxx
+++ b/reportdesign/source/ui/misc/UITools.cxx
@@ -378,7 +378,7 @@ namespace
{
vcl::Font aNewFont( _rOriginalFont );
const SfxPoolItem* pItem( NULL );
- if ( SfxItemState::SET == _rItemSet.GetItemState( _nFont,true,&pItem) && pItem->ISA(SvxFontItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( _nFont,true,&pItem) && dynamic_cast< const SvxFontItem *>( pItem ) != nullptr)
{
const SvxFontItem* pFontItem = static_cast<const SvxFontItem*>(pItem);
aNewFont.SetName( pFontItem->GetFamilyName());
@@ -387,48 +387,48 @@ namespace
aNewFont.SetPitch(pFontItem->GetPitch());
aNewFont.SetCharSet(pFontItem->GetCharSet());
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( _nFontHeight,true,&pItem) && pItem->ISA(SvxFontHeightItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( _nFontHeight,true,&pItem) && dynamic_cast< const SvxFontHeightItem *>( pItem ) != nullptr)
{
const SvxFontHeightItem* pFontItem = static_cast<const SvxFontHeightItem*>(pItem);
aNewFont.SetHeight(OutputDevice::LogicToLogic(Size(0, pFontItem->GetHeight()), MAP_TWIP, MAP_POINT).Height());
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( _nPosture,true,&pItem) && pItem->ISA(SvxPostureItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( _nPosture,true,&pItem) && dynamic_cast< const SvxPostureItem *>( pItem ) != nullptr)
{
const SvxPostureItem* pFontItem = static_cast<const SvxPostureItem*>(pItem);
aNewFont.SetItalic(pFontItem->GetPosture());
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( _nWeight,true,&pItem) && pItem->ISA(SvxWeightItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( _nWeight,true,&pItem) && dynamic_cast< const SvxWeightItem *>( pItem ) != nullptr)
{
const SvxWeightItem* pFontItem = static_cast<const SvxWeightItem*>(pItem);
aNewFont.SetWeight(pFontItem->GetWeight());
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_WORDLINEMODE,true,&pItem) && pItem->ISA(SvxWordLineModeItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_WORDLINEMODE,true,&pItem) && dynamic_cast< const SvxWordLineModeItem *>( pItem ) != nullptr)
{
const SvxWordLineModeItem* pFontItem = static_cast<const SvxWordLineModeItem*>(pItem);
aNewFont.SetWordLineMode(pFontItem->GetValue());
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CROSSEDOUT,true,&pItem) && pItem->ISA(SvxCrossedOutItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CROSSEDOUT,true,&pItem) && dynamic_cast< const SvxCrossedOutItem *>( pItem ) != nullptr)
{
const SvxCrossedOutItem* pFontItem = static_cast<const SvxCrossedOutItem*>(pItem);
aNewFont.SetStrikeout(pFontItem->GetStrikeout());
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARROTATE,true,&pItem) && pItem->ISA(SvxCharRotateItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARROTATE,true,&pItem) && dynamic_cast< const SvxCharRotateItem *>( pItem ) != nullptr)
{
const SvxCharRotateItem* pRotateItem = static_cast<const SvxCharRotateItem*>(pItem);
aNewFont.SetOrientation(pRotateItem->GetValue());
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARSCALE_W,true,&pItem) && pItem->ISA(SvxCharScaleWidthItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARSCALE_W,true,&pItem) && dynamic_cast< const SvxCharScaleWidthItem *>( pItem ) != nullptr)
{
const SvxCharScaleWidthItem* pCharItem = static_cast<const SvxCharScaleWidthItem*>(pItem);
aNewFont.SetWidthType(VCLUnoHelper::ConvertFontWidth(pCharItem->GetValue()));
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_UNDERLINE,true,&pItem) && pItem->ISA(SvxUnderlineItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_UNDERLINE,true,&pItem) && dynamic_cast< const SvxUnderlineItem *>( pItem ) != nullptr)
{
const SvxUnderlineItem* pFontItem = static_cast<const SvxUnderlineItem*>(pItem);
aNewFont.SetUnderline(pFontItem->GetLineStyle());
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_COLOR,true,&pItem) && pItem->ISA(SvxColorItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_COLOR,true,&pItem) && dynamic_cast< const SvxColorItem *>( pItem ) != nullptr)
{
const SvxColorItem* pFontItem = static_cast<const SvxColorItem*>(pItem);
aNewFont.SetColor(pFontItem->GetValue().GetColor());
@@ -452,83 +452,83 @@ namespace
lcl_pushBack( _out_rProperties, OUString("FontComplex"), uno::makeAny( aAwtFont ) );
// properties which cannot be represented in an AWT font need to be preserved directly
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_SHADOWED,true,&pItem) && pItem->ISA(SvxShadowedItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_SHADOWED,true,&pItem) && dynamic_cast< const SvxShadowedItem *>( pItem ) != nullptr)
{
const SvxShadowedItem* pFontItem = static_cast<const SvxShadowedItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARSHADOWED, uno::makeAny( pFontItem->GetValue() ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CONTOUR,true,&pItem) && pItem->ISA(SvxContourItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CONTOUR,true,&pItem) && dynamic_cast< const SvxContourItem *>( pItem ) != nullptr)
{
const SvxContourItem* pFontItem = static_cast<const SvxContourItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARCONTOURED, uno::makeAny( pFontItem->GetValue() ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_UNDERLINE,true,&pItem) && pItem->ISA(SvxUnderlineItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_UNDERLINE,true,&pItem) && dynamic_cast< const SvxUnderlineItem *>( pItem ) != nullptr)
{
const SvxUnderlineItem* pFontItem = static_cast<const SvxUnderlineItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARUNDERLINECOLOR, uno::makeAny( pFontItem->GetColor().GetColor() ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_HORJUSTIFY,true,&pItem) && pItem->ISA(SvxHorJustifyItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_HORJUSTIFY,true,&pItem) && dynamic_cast< const SvxHorJustifyItem *>( pItem ) != nullptr)
{
const SvxHorJustifyItem* pJustifyItem = static_cast<const SvxHorJustifyItem*>(pItem);
uno::Any aValue;
pJustifyItem->QueryValue(aValue,MID_HORJUST_ADJUST);
lcl_pushBack( _out_rProperties, PROPERTY_PARAADJUST, aValue );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_VERJUSTIFY,true,&pItem) && pItem->ISA(SvxVerJustifyItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_VERJUSTIFY,true,&pItem) && dynamic_cast< const SvxVerJustifyItem *>( pItem ) != nullptr)
{
const SvxVerJustifyItem* pJustifyItem = static_cast<const SvxVerJustifyItem*>(pItem);
uno::Any aValue;
pJustifyItem->QueryValue(aValue,MID_HORJUST_ADJUST);
lcl_pushBack( _out_rProperties, PROPERTY_VERTICALALIGN, aValue );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARRELIEF,true,&pItem) && pItem->ISA(SvxCharReliefItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARRELIEF,true,&pItem) && dynamic_cast< const SvxCharReliefItem *>( pItem ) != nullptr)
{
const SvxCharReliefItem* pFontItem = static_cast<const SvxCharReliefItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARRELIEF, uno::makeAny( static_cast< sal_Int16 >( pFontItem->GetEnumValue() ) ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARHIDDEN,true,&pItem) && pItem->ISA(SvxCharHiddenItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CHARHIDDEN,true,&pItem) && dynamic_cast< const SvxCharHiddenItem *>( pItem ) != nullptr)
{
const SvxCharHiddenItem* pFontItem = static_cast<const SvxCharHiddenItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARHIDDEN, uno::makeAny( pFontItem->GetValue() ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_AUTOKERN,true,&pItem) && pItem->ISA(SvxAutoKernItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_AUTOKERN,true,&pItem) && dynamic_cast< const SvxAutoKernItem *>( pItem ) != nullptr)
{
const SvxAutoKernItem* pFontItem = static_cast<const SvxAutoKernItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARAUTOKERNING, uno::makeAny( pFontItem->GetValue() ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_BRUSH,true,&pItem) && pItem->ISA(SvxBrushItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_BRUSH,true,&pItem) && dynamic_cast< const SvxBrushItem *>( pItem ) != nullptr)
{
const SvxBrushItem* pFontItem = static_cast<const SvxBrushItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CONTROLBACKGROUND, uno::makeAny( pFontItem->GetColor().GetColor() ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_BLINK,true,&pItem) && pItem->ISA(SvxBlinkItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_BLINK,true,&pItem) && dynamic_cast< const SvxBlinkItem *>( pItem ) != nullptr)
{
const SvxBlinkItem* pFontItem = static_cast<const SvxBlinkItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARFLASH, uno::makeAny( pFontItem->GetValue() ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_EMPHASISMARK,true,&pItem) && pItem->ISA(SvxEmphasisMarkItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_EMPHASISMARK,true,&pItem) && dynamic_cast< const SvxEmphasisMarkItem *>( pItem ) != nullptr)
{
const SvxEmphasisMarkItem* pFontItem = static_cast<const SvxEmphasisMarkItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHAREMPHASIS, uno::makeAny( static_cast< sal_Int16 >( pFontItem->GetEmphasisMark() ) ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_TWOLINES,true,&pItem) && pItem->ISA(SvxTwoLinesItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_TWOLINES,true,&pItem) && dynamic_cast< const SvxTwoLinesItem *>( pItem ) != nullptr)
{
const SvxTwoLinesItem* pFontItem = static_cast<const SvxTwoLinesItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARCOMBINEISON, uno::makeAny( pFontItem->GetValue() ) );
lcl_pushBack( _out_rProperties, PROPERTY_CHARCOMBINEPREFIX, uno::makeAny( OUString( pFontItem->GetStartBracket() ) ) );
lcl_pushBack( _out_rProperties, PROPERTY_CHARCOMBINESUFFIX, uno::makeAny( OUString( pFontItem->GetEndBracket() ) ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_COLOR,true,&pItem) && pItem->ISA(SvxColorItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_COLOR,true,&pItem) && dynamic_cast< const SvxColorItem *>( pItem ) != nullptr)
{
const SvxColorItem* pFontItem = static_cast<const SvxColorItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARCOLOR, uno::makeAny( pFontItem->GetValue().GetColor() ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_KERNING,true,&pItem) && pItem->ISA(SvxKerningItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_KERNING,true,&pItem) && dynamic_cast< const SvxKerningItem *>( pItem ) != nullptr)
{
const SvxKerningItem* pFontItem = static_cast<const SvxKerningItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARKERNING, uno::makeAny( pFontItem->GetValue() ) );
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CASEMAP,true,&pItem) && pItem->ISA(SvxCaseMapItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_CASEMAP,true,&pItem) && dynamic_cast< const SvxCaseMapItem *>( pItem ) != nullptr)
{
const SvxCaseMapItem* pFontItem = static_cast<const SvxCaseMapItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARCASEMAP, uno::makeAny( pFontItem->GetValue() ) );
@@ -543,14 +543,14 @@ namespace
};
for(size_t k = 0; k < sizeof(pItems)/sizeof(pItems[0]);++k)
{
- if ( SfxItemState::SET == _rItemSet.GetItemState( pItems[k].nWhich,true,&pItem) && pItem->ISA(SvxLanguageItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( pItems[k].nWhich,true,&pItem) && dynamic_cast< const SvxLanguageItem *>( pItem ) != nullptr)
{
const SvxLanguageItem* pFontItem = static_cast<const SvxLanguageItem*>(pItem);
lang::Locale aCharLocale( LanguageTag( pFontItem->GetLanguage()).getLocale());
lcl_pushBack( _out_rProperties, pItems[k].sPropertyName, uno::makeAny( aCharLocale ) );
}
}
- if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_ESCAPEMENT,true,&pItem) && pItem->ISA(SvxEscapementItem))
+ if ( SfxItemState::SET == _rItemSet.GetItemState( ITEMID_ESCAPEMENT,true,&pItem) && dynamic_cast< const SvxEscapementItem *>( pItem ) != nullptr)
{
const SvxEscapementItem* pFontItem = static_cast<const SvxEscapementItem*>(pItem);
lcl_pushBack( _out_rProperties, PROPERTY_CHARESCAPEMENT, uno::makeAny( pFontItem->GetEsc() ) );
diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx
index 326d1d2..1694085 100644
--- a/reportdesign/source/ui/report/SectionView.cxx
+++ b/reportdesign/source/ui/report/SectionView.cxx
@@ -176,7 +176,7 @@ void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo )
for (size_t i = 0; i<nCount; ++i)
{
SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
- if ( pObj->ISA(OCustomShape) )
+ if ( dynamic_cast< const OCustomShape *>( pObj ) != nullptr )
{
AddUndo( new SdrUndoObjectLayerChange( *pObj, pObj->GetLayer(), _nLayerNo) );
pObj->SetLayer( _nLayerNo );
@@ -209,7 +209,7 @@ bool OSectionView::OnlyShapesMarked() const
for (size_t i = 0; i<nCount; ++i)
{
SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj();
- if ( !pObj->ISA(OCustomShape) )
+ if ( dynamic_cast< const OCustomShape *>( pObj ) == nullptr )
{
return false;
}
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx
index d7e88a9..595c80e 100644
--- a/svl/source/items/cenumitm.cxx
+++ b/svl/source/items/cenumitm.cxx
@@ -159,7 +159,7 @@ SfxBoolItem::SfxBoolItem(sal_uInt16 const nWhich, SvStream & rStream)
// virtual
bool SfxBoolItem::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(SfxBoolItem),
+ DBG_ASSERT(dynamic_cast<const SfxBoolItem*>( &rItem ) != nullptr,
"SfxBoolItem::operator ==(): Bad type");
return m_bValue == static_cast< SfxBoolItem const * >(&rItem)->m_bValue;
}
diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx
index 24fb8c7..f7a1a7a 100644
--- a/svl/source/items/cintitem.cxx
+++ b/svl/source/items/cintitem.cxx
@@ -27,7 +27,7 @@ TYPEINIT1_AUTOFACTORY(CntByteItem, SfxPoolItem);
// virtual
bool CntByteItem::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntByteItem),
+ DBG_ASSERT(dynamic_cast<const CntByteItem*>( &rItem ) != nullptr,
"CntByteItem::operator ==(): Bad type");
return m_nValue == (static_cast< const CntByteItem * >(&rItem))->m_nValue;
}
@@ -98,7 +98,7 @@ CntUInt16Item::CntUInt16Item(sal_uInt16 which, SvStream & rStream) :
// virtual
bool CntUInt16Item::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntUInt16Item),
+ DBG_ASSERT(dynamic_cast< const CntUInt16Item* >(&rItem) != nullptr,
"CntUInt16Item::operator ==(): Bad type");
return m_nValue == (static_cast< const CntUInt16Item * >(&rItem))->
m_nValue;
@@ -169,7 +169,7 @@ CntInt32Item::CntInt32Item(sal_uInt16 which, SvStream & rStream)
// virtual
bool CntInt32Item::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntInt32Item),
+ DBG_ASSERT(dynamic_cast< const CntInt32Item*>(&rItem) != nullptr,
"CntInt32Item::operator ==(): Bad type");
return m_nValue == (static_cast< const CntInt32Item * >(&rItem))->
m_nValue;
@@ -239,7 +239,7 @@ CntUInt32Item::CntUInt32Item(sal_uInt16 which, SvStream & rStream) :
// virtual
bool CntUInt32Item::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntUInt32Item),
+ DBG_ASSERT(dynamic_cast< const CntUInt32Item* >(&rItem) != nullptr,
"CntUInt32Item::operator ==(): Bad type");
return m_nValue == (static_cast< const CntUInt32Item * >(&rItem))->
m_nValue;
diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx
index 1182ae5..3b97df9 100644
--- a/svl/source/items/custritm.cxx
+++ b/svl/source/items/custritm.cxx
@@ -29,7 +29,7 @@ TYPEINIT1_AUTOFACTORY(CntUnencodedStringItem, SfxPoolItem)
// virtual
bool CntUnencodedStringItem::operator ==(const SfxPoolItem & rItem) const
{
- DBG_ASSERT(rItem.ISA(CntUnencodedStringItem),
+ DBG_ASSERT(dynamic_cast<const CntUnencodedStringItem*>( &rItem ) != nullptr,
"CntUnencodedStringItem::operator ==(): Bad type");
return m_aValue
== (static_cast< const CntUnencodedStringItem * >(&rItem))->
diff --git a/svl/source/items/ilstitem.cxx b/svl/source/items/ilstitem.cxx
index 140e3b8..36680c4 100644
--- a/svl/source/items/ilstitem.cxx
+++ b/svl/source/items/ilstitem.cxx
@@ -58,7 +58,7 @@ SfxIntegerListItem::~SfxIntegerListItem()
bool SfxIntegerListItem::operator==( const SfxPoolItem& rPoolItem ) const
{
- if ( !rPoolItem.ISA( SfxIntegerListItem ) )
+ if ( dynamic_cast< const SfxIntegerListItem* >( &rPoolItem) == nullptr )
return false;
const SfxIntegerListItem rItem = static_cast<const SfxIntegerListItem&>(rPoolItem);
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index 909c650..ae8c7d3 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -530,7 +530,7 @@ void SfxItemPool::Delete()
// *ppStaticDefaultItem could've already been deleted in a class derived
// from SfxItemPool
// This causes chaos in Itempool!
- if ( *ppStaticDefaultItem && (*ppStaticDefaultItem)->ISA(SfxSetItem) )
+ if ( *ppStaticDefaultItem && dynamic_cast< const SfxSetItem* >(*ppStaticDefaultItem) != nullptr )
{
if ( *itrItemArr )
{
@@ -743,7 +743,7 @@ const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
pNewItem->SetWhich(nWhich);
#ifdef DBG_UTIL
SFX_ASSERT( rItem.Type() == pNewItem->Type(), nWhich, "unequal types in Put(): no Clone()?" )
- if ( !rItem.ISA(SfxSetItem) )
+ if ( !dynamic_cast<const SfxSetItem*>( &rItem ) != nullptr )
{
SFX_ASSERT( !IsItemFlag(nWhich, SfxItemPoolFlags::POOLABLE) ||
rItem == *pNewItem,
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index e6961c4..c9e2512 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -531,7 +531,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich
}
}
SFX_ASSERT( !m_pPool->IsItemFlag(nWhich, SfxItemPoolFlags::POOLABLE) ||
- rItem.ISA(SfxSetItem) || **ppFnd == rItem,
+ dynamic_cast<const SfxSetItem*>( &rItem ) != nullptr || **ppFnd == rItem,
nWhich, "putted Item unequal" );
return *ppFnd;
}
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index 619f9ca..85e7b13 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -197,7 +197,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
// ! Poolable is not even saved in the Pool
// And itemsets/plain-items depending on the round
if ( *itrArr && IsItemFlag(**ppDefItem, SfxItemPoolFlags::POOLABLE) &&
- pImp->bInSetItem == (bool) (*ppDefItem)->ISA(SfxSetItem) )
+ pImp->bInSetItem == (dynamic_cast< const SfxSetItem* >(*ppDefItem) != nullptr) )
{
// Own signature, global WhichId and ItemVersion
sal_uInt16 nSlotId = GetSlotId( (*ppDefItem)->Which(), false );
@@ -232,7 +232,7 @@ SvStream &SfxItemPool::Store(SvStream &rStream) const
else
break;
#ifdef DBG_UTIL_MI
- if ( !pItem->ISA(SfxSetItem) )
+ if ( dynamic_cast<const SfxSetItem*>( pItem ) == nullptr )
{
sal_uLong nMark = rStream.Tell();
rStream.Seek( nItemStartPos + sizeof(sal_uInt16) );
@@ -646,7 +646,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
// SfxSetItems could contain Items from secondary Pools
SfxPoolItem *pDefItem = *(pImp->ppStaticDefaults + nIndex);
- pImp->bInSetItem = pDefItem->ISA(SfxSetItem);
+ pImp->bInSetItem = dynamic_cast<const SfxSetItem*>( pDefItem ) != nullptr;
if ( !bSecondaryLoaded && pImp->mpSecondary && pImp->bInSetItem )
{
// Seek to end of own Pool
@@ -1162,7 +1162,7 @@ bool SfxItemPool::StoreItem( SvStream &rStream, const SfxPoolItem &rItem,
if ( 0 == ( pPool = pPool->pImp->mpSecondary ) )
return false;
- DBG_ASSERT( !pImp->bInSetItem || !rItem.ISA(SfxSetItem),
+ DBG_ASSERT( !pImp->bInSetItem || dynamic_cast<const SfxSetItem*>( &rItem ) == nullptr,
"SetItem contains ItemSet with SetItem" );
sal_uInt16 nSlotId = pPool->GetSlotId( rItem.Which() );
@@ -1226,7 +1226,7 @@ const SfxPoolItem* SfxItemPool::LoadItem( SvStream &rStream, bool bDirect,
nWhich = pRefPool->GetNewWhich( nWhich ); // Map WhichId to new version
DBG_ASSERT( !nWhich || !pImp->bInSetItem ||
- !pRefPool->pImp->ppStaticDefaults[pRefPool->GetIndex_Impl(nWhich)]->ISA(SfxSetItem),
+ dynamic_cast<const SfxSetItem*>( pRefPool->pImp->ppStaticDefaults[pRefPool->GetIndex_Impl(nWhich)] ) == nullptr,
"loading SetItem in ItemSet of SetItem" );
// Are we loading via surrogate?
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index 11a8672..9e058f5 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -176,7 +176,7 @@ bool SfxErrorHandler::CreateString(
sal_uLong nErrCode = pErr->GetErrorCode() & ERRCODE_ERROR_MASK;
if( nErrCode>=lEnd || nErrCode<=lStart )
return false;
- const MessageInfo *pMsgInfo = PTR_CAST(MessageInfo,pErr);
+ const MessageInfo *pMsgInfo = dynamic_cast<const MessageInfo*>( pErr );
if(pMsgInfo)
{
if(GetMessageString(nErrCode, rStr, nFlags))
@@ -187,15 +187,14 @@ bool SfxErrorHandler::CreateString(
}
else if(GetErrorString(nErrCode, rStr, nFlags))
{
- const StringErrorInfo *pStringInfo = PTR_CAST(StringErrorInfo,pErr);
+ const StringErrorInfo *pStringInfo = dynamic_cast<const StringErrorInfo *>(pErr);
if(pStringInfo)
{
rStr = rStr.replaceAll("$(ARG1)", pStringInfo->GetErrorString());
}
else
{
- const TwoStringErrorInfo * pTwoStringInfo = PTR_CAST(TwoStringErrorInfo,
- pErr);
+ const TwoStringErrorInfo * pTwoStringInfo = dynamic_cast<const TwoStringErrorInfo* >(pErr);
if (pTwoStringInfo)
{
rStr = rStr.replaceAll("$(ARG1)", pTwoStringInfo->GetArg1());
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 4432e0e..2cebeaf 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -189,7 +189,7 @@ void AccessibleControlShape::Init()
// get the control which belongs to our model (relative to our view)
const vcl::Window* pViewWindow = maShapeTreeInfo.GetWindow();
- SdrUnoObj* pUnoObjectImpl = PTR_CAST( SdrUnoObj, getSdrObject() );
+ SdrUnoObj* pUnoObjectImpl = dynamic_cast<SdrUnoObj*>( getSdrObject() );
SdrView* pView = maShapeTreeInfo.GetSdrView();
OSL_ENSURE( pView && pViewWindow && pUnoObjectImpl, "AccessibleControlShape::Init: no view, or no view window, no SdrUnoObj!" );
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index eb4cdfb..8c5a9ff 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -157,7 +157,7 @@ void AccessibleShape::Init()
SdrObject* pSdrObject = GetSdrObjectFromXShape(mxShape);
if( pSdrObject )
{
- SdrTextObj* pTextObj = PTR_CAST( SdrTextObj, pSdrObject );
+ SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( pSdrObject );
OutlinerParaObject* pOutlinerParaObject = NULL;
if( pTextObj )
diff --git a/svx/source/accessibility/ShapeTypeHandler.cxx b/svx/source/accessibility/ShapeTypeHandler.cxx
index 30ce3fe..6285a99 100644
--- a/svx/source/accessibility/ShapeTypeHandler.cxx
+++ b/svx/source/accessibility/ShapeTypeHandler.cxx
@@ -305,7 +305,7 @@ OUString
SdrObject *pSdrObj = pShape->GetSdrObject();
if (pSdrObj)
{
- if(pSdrObj->ISA(SdrObjCustomShape))
+ if(dynamic_cast<const SdrObjCustomShape*>( pSdrObj) != nullptr)
{
SdrObjCustomShape* pCustomShape = static_cast<SdrObjCustomShape*>(pSdrObj);
if(pCustomShape)
diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx
index 97e75d7..80acbd4 100644
--- a/svx/source/customshapes/EnhancedCustomShape2d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx
@@ -743,7 +743,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) :
if ( pAny )
*pAny >>= bFlipV;
- if ( pCustomShapeObj->ISA( SdrObjCustomShape ) ) // should always be a SdrObjCustomShape, but you don't know
+ if ( dynamic_cast<const SdrObjCustomShape*>( pCustomShapeObj) != nullptr ) // should always be a SdrObjCustomShape, but you don't know
nRotateAngle = (sal_Int32)(static_cast<SdrObjCustomShape*>(pCustomShapeObj)->GetObjectRotation() * 100.0);
else
nRotateAngle = pCustomShapeObj->GetRotateAngle();
@@ -2343,7 +2343,7 @@ void EnhancedCustomShape2d::ApplyGluePoints( SdrObject* pObj )
bool EnhancedCustomShape2d::IsPostRotate() const
{
- return pCustomShapeObj->ISA( SdrObjCustomShape ) && static_cast<SdrObjCustomShape*>(pCustomShapeObj)->IsPostRotate();
+ return dynamic_cast<const SdrObjCustomShape*>( pCustomShapeObj) != nullptr && static_cast<SdrObjCustomShape*>(pCustomShapeObj)->IsPostRotate();
}
SdrObject* EnhancedCustomShape2d::CreateLineGeometry()
diff --git a/svx/source/customshapes/EnhancedCustomShape3d.cxx b/svx/source/customshapes/EnhancedCustomShape3d.cxx
index df2a0be..48bd450 100644
--- a/svx/source/customshapes/EnhancedCustomShape3d.cxx
+++ b/svx/source/customshapes/EnhancedCustomShape3d.cxx
@@ -380,7 +380,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
SfxItemSet aLocalSet(aSet);
drawing::FillStyle aLocalFillStyle(eFillStyle);
- if ( pNext->ISA( SdrPathObj ) )
+ if ( dynamic_cast<const SdrPathObj*>( pNext) != nullptr )
{
const SfxItemSet& rSet = pNext->GetMergedItemSet();
bool bNeedToConvertToContour(false);
@@ -462,7 +462,7 @@ SdrObject* EnhancedCustomShape3d::Create3DObject( const SdrObject* pShape2d, con
else
{
SdrObject* pNewObj = pNext->ConvertToPolyObj( false, false );
- SdrPathObj* pPath = PTR_CAST( SdrPathObj, pNewObj );
+ SdrPathObj* pPath = dynamic_cast<SdrPathObj*>( pNewObj );
if ( pPath )
aPolyPoly = pPath->GetPathPoly();
SdrObject::Free( pNewObj );
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 8d766c7..803fdeb 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -176,7 +176,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom
{
if ( pRenderedShape )
{
- if ( !pRenderedShape->ISA( SdrObjGroup ) )
+ if ( dynamic_cast<const SdrObjGroup*>( pRenderedShape) == nullptr )
{
SdrObject* pTmp = pRenderedShape;
pRenderedShape = new SdrObjGroup();
@@ -231,7 +231,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom
if ( pRenderedShape )
{
- if ( !pRenderedShape->ISA( SdrObjGroup ) )
+ if ( dynamic_cast<const SdrObjGroup*>( pRenderedShape) == nullptr )
{
SdrObject* pTmp = pRenderedShape;
pRenderedShape = new SdrObjGroup();
@@ -246,7 +246,7 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom
// force group
if ( pRenderedShape )
{
- if ( !pRenderedShape->ISA( SdrObjGroup ) )
+ if ( dynamic_cast<const SdrObjGroup*>( pRenderedShape) == nullptr )
{
SdrObject* pTmp = pRenderedShape;
pRenderedShape = new SdrObjGroup();
@@ -273,7 +273,7 @@ Reference< drawing::XShape > SAL_CALL EnhancedCustomShapeEngine::render()
throw ( RuntimeException, std::exception )
{
Reference< drawing::XShape > xShape;
- SdrObject* pSdrObjCustomShape( PTR_CAST( SdrObjCustomShape, GetSdrObjectFromXShape( mxShape ) ) );
+ SdrObject* pSdrObjCustomShape( dynamic_cast<SdrObjCustomShape*>( GetSdrObjectFromXShape( mxShape ) ) );
if ( pSdrObjCustomShape )
{
// retrieving the TextPath property to check if feature is enabled
@@ -443,14 +443,14 @@ drawing::PolyPolygonBezierCoords SAL_CALL EnhancedCustomShapeEngine::getLineGeom
basegfx::B2DPolyPolygon aPP;
const SdrObject* pNext = aIter.Next();
- if ( pNext->ISA( SdrPathObj ) )
+ if ( dynamic_cast<const SdrPathObj*>( pNext) != nullptr )
{
aPP = static_cast<const SdrPathObj*>(pNext)->GetPathPoly();
}
else
{
pNewObj = pNext->ConvertToPolyObj( false, false );
- SdrPathObj* pPath = PTR_CAST( SdrPathObj, pNewObj );
+ SdrPathObj* pPath = dynamic_cast<SdrPathObj*>( pNewObj );
if ( pPath )
aPP = pPath->GetPathPoly();
}
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index e956768..d4bada5 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -514,7 +514,7 @@ basegfx::B2DPolyPolygon GetOutlinesFromShape2d( const SdrObject* pShape2d )
while( aObjListIter.IsMore() )
{
SdrObject* pPartObj = aObjListIter.Next();
- if ( pPartObj->ISA( SdrPathObj ) )
+ if ( dynamic_cast<const SdrPathObj*>( pPartObj) != nullptr )
{
basegfx::B2DPolyPolygon aCandidate(static_cast<SdrPathObj*>(pPartObj)->GetPathPoly());
if(aCandidate.areControlPointsUsed())
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index 2b3e3f9..75e2639 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -334,7 +334,7 @@ void SvxBmpMaskSelectItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*
{
if ( ( nSID == SID_BMPMASK_EXEC ) && pItem )
{
- const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
+ const SfxBoolItem* pStateItem = dynamic_cast<const SfxBoolItem*>( pItem );
assert(pStateItem); //SfxBoolItem erwartet
if (pStateItem)
rBmpMask.SetExecState( pStateItem->GetValue() );
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index a0f27d4..b29f0c8 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -56,7 +56,7 @@ void SvxContourDlgItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
{
if ( pItem && ( SID_CONTOUR_EXEC == nSID ) )
{
- const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
+ const SfxBoolItem* pStateItem = dynamic_cast<const SfxBoolItem*>( pItem );
assert(pStateItem); //SfxBoolItem expected
if (pStateItem)
rDlg.SetExecState(!pStateItem->GetValue());
@@ -606,7 +606,7 @@ IMPL_LINK_TYPED( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void )
{
const SdrObject* pObj = pWnd->GetSelectedSdrObject();
const SdrView* pView = pWnd->GetSdrView();
- const bool bPolyEdit = ( pObj != NULL ) && pObj->ISA( SdrPathObj );
+ const bool bPolyEdit = ( pObj != NULL ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr;
const bool bDrawEnabled = !(bPolyEdit && m_pTbx1->IsItemChecked(mnPolyEditId));
const bool bPipette = m_pTbx1->IsItemChecked(mnPipetteId);
const bool bWorkplace = m_pTbx1->IsItemChecked(mnWorkSpaceId);
diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx
index 4c5ab06..b01bbf7 100644
--- a/svx/source/dialog/fontwork.cxx
+++ b/svx/source/dialog/fontwork.cxx
@@ -63,7 +63,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_STYLE:
{
const XFormTextStyleItem* pStateItem =
- PTR_CAST(XFormTextStyleItem, pItem);
+ dynamic_cast<const XFormTextStyleItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextStyleItem expected");
rFontWorkDlg.SetStyle_Impl(pStateItem);
break;
@@ -71,7 +71,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_ADJUST:
{
const XFormTextAdjustItem* pStateItem =
- PTR_CAST(XFormTextAdjustItem, pItem);
+ dynamic_cast<const XFormTextAdjustItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextAdjustItem expected");
rFontWorkDlg.SetAdjust_Impl(pStateItem);
break;
@@ -79,7 +79,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_DISTANCE:
{
const XFormTextDistanceItem* pStateItem =
- PTR_CAST(XFormTextDistanceItem, pItem);
+ dynamic_cast<const XFormTextDistanceItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextDistanceItem erwartet");
rFontWorkDlg.SetDistance_Impl(pStateItem);
break;
@@ -87,7 +87,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_START:
{
const XFormTextStartItem* pStateItem =
- PTR_CAST(XFormTextStartItem, pItem);
+ dynamic_cast<const XFormTextStartItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextStartItem expected");
rFontWorkDlg.SetStart_Impl(pStateItem);
break;
@@ -95,7 +95,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_MIRROR:
{
const XFormTextMirrorItem* pStateItem =
- PTR_CAST(XFormTextMirrorItem, pItem);
+ dynamic_cast<const XFormTextMirrorItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextMirrorItem expected");
rFontWorkDlg.SetMirror_Impl(pStateItem);
break;
@@ -103,7 +103,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_HIDEFORM:
{
const XFormTextHideFormItem* pStateItem =
- PTR_CAST(XFormTextHideFormItem, pItem);
+ dynamic_cast<const XFormTextHideFormItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextHideFormItem expected");
rFontWorkDlg.SetShowForm_Impl(pStateItem);
break;
@@ -111,7 +111,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_OUTLINE:
{
const XFormTextOutlineItem* pStateItem =
- PTR_CAST(XFormTextOutlineItem, pItem);
+ dynamic_cast<const XFormTextOutlineItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextOutlineItem expected");
rFontWorkDlg.SetOutline_Impl(pStateItem);
break;
@@ -119,7 +119,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_SHADOW:
{
const XFormTextShadowItem* pStateItem =
- PTR_CAST(XFormTextShadowItem, pItem);
+ dynamic_cast<const XFormTextShadowItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowItem expected");
rFontWorkDlg.SetShadow_Impl(pStateItem);
break;
@@ -127,7 +127,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_SHDWCOLOR:
{
const XFormTextShadowColorItem* pStateItem =
- PTR_CAST(XFormTextShadowColorItem, pItem);
+ dynamic_cast<const XFormTextShadowColorItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowColorItem expected");
rFontWorkDlg.SetShadowColor_Impl(pStateItem);
break;
@@ -135,7 +135,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_SHDWXVAL:
{
const XFormTextShadowXValItem* pStateItem =
- PTR_CAST(XFormTextShadowXValItem, pItem);
+ dynamic_cast<const XFormTextShadowXValItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowXValItem expected");
rFontWorkDlg.SetShadowXVal_Impl(pStateItem);
break;
@@ -143,7 +143,7 @@ void SvxFontWorkControllerItem::StateChanged( sal_uInt16 /*nSID*/, SfxItemState
case SID_FORMTEXT_SHDWYVAL:
{
const XFormTextShadowYValItem* pStateItem =
- PTR_CAST(XFormTextShadowYValItem, pItem);
+ dynamic_cast<const XFormTextShadowYValItem*>( pItem );
DBG_ASSERT(pStateItem || pItem == 0, "XFormTextShadowYValItem expected");
rFontWorkDlg.SetShadowYVal_Impl(pStateItem);
break;
diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx
index 65326c0..4362446 100644
--- a/svx/source/dialog/hdft.cxx
+++ b/svx/source/dialog/hdft.cxx
@@ -379,7 +379,7 @@ void SvxHFPage::Reset( const SfxItemSet* rSet )
bool bIsCalc = false;
const SfxPoolItem* pExt1 = GetItem(*rSet, SID_ATTR_PAGE_EXT1);
const SfxPoolItem* pExt2 = GetItem(*rSet, SID_ATTR_PAGE_EXT2);
- if (pExt1 && pExt1->ISA(SfxBoolItem) && pExt2 && pExt2->ISA(SfxBoolItem))
+ if (pExt1 && dynamic_cast<const SfxBoolItem*>(pExt1) != nullptr && pExt2 && dynamic_cast<const SfxBoolItem*>(pExt2) != nullptr )
bIsCalc = true;
m_pCntSharedFirstBox->Show(!bIsCalc);
@@ -1036,7 +1036,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
pItem = GetItem( rSet, SID_ATTR_PAGE_EXT1 );
- if ( pItem && pItem->ISA(SfxBoolItem) )
+ if ( pItem && dynamic_cast<const SfxBoolItem*>( pItem) != nullptr )
{
m_pBspWin->SetTable( true );
m_pBspWin->SetHorz( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
@@ -1044,7 +1044,7 @@ void SvxHFPage::ActivatePage( const SfxItemSet& rSet )
pItem = GetItem( rSet, SID_ATTR_PAGE_EXT2 );
- if ( pItem && pItem->ISA(SfxBoolItem) )
+ if ( pItem && dynamic_cast<const SfxBoolItem*>( pItem) != nullptr )
{
m_pBspWin->SetTable( true );
m_pBspWin->SetVert( static_cast<const SfxBoolItem*>(pItem)->GetValue() );
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 751e40a..baa8dc2 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -81,7 +81,7 @@ void SvxIMapDlgItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
{
if ( ( nSID == SID_IMAP_EXEC ) && pItem )
{
- const SfxBoolItem* pStateItem = PTR_CAST( SfxBoolItem, pItem );
+ const SfxBoolItem* pStateItem = dynamic_cast<const SfxBoolItem*>( pItem );
assert(pStateItem); //SfxBoolItem expected
if (pStateItem)
{
@@ -755,7 +755,7 @@ IMPL_LINK_TYPED( SvxIMapDlg, StateHdl, GraphCtrl*, pWnd, void )
const SdrObject* pObj = pWnd->GetSelectedSdrObject();
const SdrModel* pModel = pWnd->GetSdrModel();
const SdrView* pView = pWnd->GetSdrView();
- const bool bPolyEdit = ( pObj != NULL ) && pObj->ISA( SdrPathObj );
+ const bool bPolyEdit = ( pObj != NULL ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr;
const bool bDrawEnabled = !( bPolyEdit && m_pTbxIMapDlg1->IsItemChecked( mnPolyEditId ) );
m_pTbxIMapDlg1->EnableItem( mnApplyId, pOwnData->bExecState && pWnd->IsChanged() );
diff --git a/svx/source/dialog/rlrcitem.cxx b/svx/source/dialog/rlrcitem.cxx
index 4822c1b..9eeb0e5 100644
--- a/svx/source/dialog/rlrcitem.cxx
+++ b/svx/source/dialog/rlrcitem.cxx
@@ -55,20 +55,20 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState,
// Left / right margin
case SID_RULER_LR_MIN_MAX:
{
- const SfxRectangleItem *pItem = PTR_CAST(SfxRectangleItem, pState);
+ const SfxRectangleItem *pItem = dynamic_cast<const SfxRectangleItem*>( pState );
rRuler.UpdateFrameMinMax(pItem);
break;
}
case SID_ATTR_LONG_LRSPACE:
{
- const SvxLongLRSpaceItem *pItem = PTR_CAST(SvxLongLRSpaceItem, pState);
+ const SvxLongLRSpaceItem *pItem = dynamic_cast<const SvxLongLRSpaceItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxLRSpaceItem expected");
rRuler.UpdateFrame(pItem);
break;
}
case SID_ATTR_LONG_ULSPACE:
{
- const SvxLongULSpaceItem *pItem = PTR_CAST(SvxLongULSpaceItem, pState);
+ const SvxLongULSpaceItem *pItem = dynamic_cast<const SvxLongULSpaceItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxULSpaceItem expected");
rRuler.UpdateFrame(pItem);
break;
@@ -76,7 +76,7 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState,
case SID_ATTR_TABSTOP_VERTICAL:
case SID_ATTR_TABSTOP:
{
- const SvxTabStopItem *pItem = PTR_CAST(SvxTabStopItem, pState);
+ const SvxTabStopItem *pItem = dynamic_cast<const SvxTabStopItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxTabStopItem expected");
rRuler.Update(pItem);
break;
@@ -84,7 +84,7 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState,
case SID_ATTR_PARA_LRSPACE_VERTICAL:
case SID_ATTR_PARA_LRSPACE:
{
- const SvxLRSpaceItem *pItem = PTR_CAST(SvxLRSpaceItem, pState);
+ const SvxLRSpaceItem *pItem = dynamic_cast<const SvxLRSpaceItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxLRSpaceItem expected");
rRuler.UpdatePara(pItem);
break;
@@ -94,7 +94,7 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState,
case SID_RULER_ROWS:
case SID_RULER_ROWS_VERTICAL:
{
- const SvxColumnItem *pItem = PTR_CAST(SvxColumnItem, pState);
+ const SvxColumnItem *pItem = dynamic_cast<const SvxColumnItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxColumnItem expected");
#ifdef DBG_UTIL
if(pItem)
@@ -113,35 +113,35 @@ void SvxRulerItem::StateChanged( sal_uInt16 nSID, SfxItemState eState,
}
case SID_RULER_PAGE_POS:
{ // Position page, page width
- const SvxPagePosSizeItem *pItem = PTR_CAST(SvxPagePosSizeItem, pState);
+ const SvxPagePosSizeItem *pItem = dynamic_cast<const SvxPagePosSizeItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxPagePosSizeItem expected");
rRuler.Update(pItem);
break;
}
case SID_RULER_OBJECT:
{ // Object selection
- const SvxObjectItem *pItem = PTR_CAST(SvxObjectItem, pState);
+ const SvxObjectItem *pItem = dynamic_cast<const SvxObjectItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxObjectItem expected");
rRuler.Update(pItem);
break;
}
case SID_RULER_PROTECT:
{
- const SvxProtectItem *pItem = PTR_CAST(SvxProtectItem, pState);
+ const SvxProtectItem *pItem = dynamic_cast<const SvxProtectItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxProtectItem expected");
rRuler.Update(pItem);
break;
}
case SID_RULER_BORDER_DISTANCE:
{
- const SvxLRSpaceItem *pItem = PTR_CAST(SvxLRSpaceItem, pState);
+ const SvxLRSpaceItem *pItem = dynamic_cast<const SvxLRSpaceItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SvxLRSpaceItem expected");
rRuler.UpdateParaBorder(pItem);
}
break;
case SID_RULER_TEXT_RIGHT_TO_LEFT :
{
- const SfxBoolItem *pItem = PTR_CAST(SfxBoolItem, pState);
+ const SfxBoolItem *pItem = dynamic_cast<const SfxBoolItem*>( pState );
DBG_ASSERT(pState == nullptr || pItem != nullptr, "SfxBoolItem expected");
rRuler.UpdateTextRTL(pItem);
}
diff --git a/svx/source/dialog/srchctrl.cxx b/svx/source/dialog/srchctrl.cxx
index 460ebad..3bc463b 100644
--- a/svx/source/dialog/srchctrl.cxx
+++ b/svx/source/dialog/srchctrl.cxx
@@ -54,13 +54,13 @@ void SvxSearchController::StateChanged( sal_uInt16 nSID, SfxItemState eState,
}
else if ( SID_SEARCH_OPTIONS == nSID )
{
- DBG_ASSERT( pState->ISA(SfxUInt16Item), "wrong item type" );
+ DBG_ASSERT( dynamic_cast<const SfxUInt16Item* >(pState) != nullptr, "wrong item type" );
SearchOptionFlags nFlags = (SearchOptionFlags) static_cast<const SfxUInt16Item*>(pState)->GetValue();
rSrchDlg.EnableControls_Impl( nFlags );
}
else if ( SID_SEARCH_ITEM == nSID )
{
- DBG_ASSERT( pState->ISA(SvxSearchItem), "wrong item type" );
+ DBG_ASSERT( dynamic_cast<const SvxSearchItem*>( pState) != nullptr, "wrong item type" );
rSrchDlg.SetItem_Impl( static_cast<const SvxSearchItem*>(pState) );
}
}
diff --git a/svx/source/engine3d/dragmt3d.cxx b/svx/source/engine3d/dragmt3d.cxx
index 53028b3..add71f2 100644
--- a/svx/source/engine3d/dragmt3d.cxx
+++ b/svx/source/engine3d/dragmt3d.cxx
@@ -321,7 +321,7 @@ void E3dDragRotate::MoveSdrDrag(const Point& rPnt)
{
// Get modifier
sal_uInt16 nModifier = 0;
- if(getSdrDragView().ISA(E3dView))
+ if(dynamic_cast<const E3dView*>(&getSdrDragView()))
{
const MouseEvent& rLastMouse = static_cast<E3dView&>(getSdrDragView()).GetMouseEvent();
nModifier = rLastMouse.GetModifier();
@@ -499,7 +499,7 @@ void E3dDragMove::MoveSdrDrag(const Point& rPnt)
// Get modifier
sal_uInt16 nModifier(0);
- if(getSdrDragView().ISA(E3dView))
+ if(dynamic_cast<const E3dView*>(&getSdrDragView()))
{
const MouseEvent& rLastMouse = static_cast<E3dView&>(getSdrDragView()).GetMouseEvent();
nModifier = rLastMouse.GetModifier();
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index 91d2d3d..5181ac2 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -110,10 +110,10 @@ E3dObjList::~E3dObjList()
void E3dObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason)
{
// Get owner
- DBG_ASSERT(GetOwnerObj()->ISA(E3dObject), "Insert 3D object in parent != 3DObject");
+ DBG_ASSERT(dynamic_cast<const E3dObject*>(GetOwnerObj()), "Insert 3D object in parent != 3DObject");
// Is it even a 3D object?
- if(pObj && pObj->ISA(E3dObject))
+ if(pObj && dynamic_cast<const E3dObject*>(pObj))
{
// Normal 3D object, insert means
// call parent
@@ -128,7 +128,7 @@ void E3dObjList::NbcInsertObject(SdrObject* pObj, size_t nPos, const SdrInsertRe
void E3dObjList::InsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReason* pReason)
{
- OSL_ENSURE(GetOwnerObj()->ISA(E3dObject), "Insert 3D object in non-3D Parent");
+ OSL_ENSURE(dynamic_cast<const E3dObject*>(GetOwnerObj()), "Insert 3D object in non-3D Parent");
// call parent
SdrObjList::InsertObject(pObj, nPos, pReason);
@@ -142,7 +142,7 @@ void E3dObjList::InsertObject(SdrObject* pObj, size_t nPos, const SdrInsertReaso
SdrObject* E3dObjList::NbcRemoveObject(size_t nObjNum)
{
- DBG_ASSERT(GetOwnerObj()->ISA(E3dObject), "Remove 3D object from Parent != 3DObject");
+ DBG_ASSERT(dynamic_cast<const E3dObject*>(GetOwnerObj()), "Remove 3D object from Parent != 3DObject");
// call parent
SdrObject* pRetval = SdrObjList::NbcRemoveObject(nObjNum);
@@ -158,7 +158,7 @@ SdrObject* E3dObjList::NbcRemoveObject(size_t nObjNum)
SdrObject* E3dObjList::RemoveObject(size_t nObjNum)
{
- OSL_ENSURE(GetOwnerObj()->ISA(E3dObject), "3D object is removed from non-3D Parent");
+ OSL_ENSURE(dynamic_cast<const E3dObject*>(GetOwnerObj()), "3D object is removed from non-3D Parent");
// call parent
SdrObject* pRetval = SdrObjList::RemoveObject(nObjNum);
@@ -507,7 +507,7 @@ E3dObject* E3dObject::GetParentObj() const
if(GetObjList()
&& GetObjList()->GetOwnerObj()
- && GetObjList()->GetOwnerObj()->ISA(E3dObject))
+ && dynamic_cast<const E3dObject*>(GetObjList()->GetOwnerObj()))
pRetval = static_cast<E3dObject*>(GetObjList()->GetOwnerObj());
return pRetval;
}
@@ -968,7 +968,7 @@ bool E3dCompoundObject::IsAOrdNumRemapCandidate(E3dScene*& prScene) const
{
if(GetObjList()
&& GetObjList()->GetOwnerObj()
- && GetObjList()->GetOwnerObj()->ISA(E3dScene))
+ && dynamic_cast<const E3dObject*>(GetObjList()->GetOwnerObj()))
{
prScene = static_cast<E3dScene*>(GetObjList()->GetOwnerObj());
return true;
diff --git a/svx/source/engine3d/scene3d.cxx b/svx/source/engine3d/scene3d.cxx
index ab36ed2..38bba54 100644
--- a/svx/source/engine3d/scene3d.cxx
+++ b/svx/source/engine3d/scene3d.cxx
@@ -129,7 +129,7 @@ Imp3DDepthRemapper::Imp3DDepthRemapper(E3dScene& rScene)
if(pCandidate)
{
- if(pCandidate->ISA(E3dCompoundObject))
+ if(dynamic_cast< const E3dCompoundObject*>(pCandidate))
{
// single 3d object, calc depth
const double fMinimalDepth(getMinimalDepthInViewCoordinates(static_cast< const E3dCompoundObject& >(*pCandidate)));
@@ -402,7 +402,7 @@ void E3dScene::removeAllNonSelectedObjects()
{
bool bRemoveObject(false);
- if(pObj->ISA(E3dScene))
+ if(dynamic_cast< const E3dScene*>(pObj))
{
E3dScene* pScene = static_cast<E3dScene*>(pObj);
@@ -418,7 +418,7 @@ void E3dScene::removeAllNonSelectedObjects()
bRemoveObject = true;
}
}
- else if(pObj->ISA(E3dCompoundObject))
+ else if(dynamic_cast< const E3dCompoundObject*>(pObj))
{
E3dCompoundObject* pCompound = static_cast<E3dCompoundObject*>(pObj);
@@ -666,7 +666,7 @@ bool E3dScene::IsBreakObjPossible()
while ( a3DIterator.IsMore() )
{
E3dObject* pObj = static_cast<E3dObject*>(a3DIterator.Next());
- DBG_ASSERT(pObj->ISA(E3dObject), "only 3D objects are allowed in scenes!");
+ DBG_ASSERT(dynamic_cast< const E3dObject*>(pObj), "only 3D objects are allowed in scenes!");
if(!pObj->IsBreakObjPossible())
return false;
}
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 7e498f7..ec20456 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -247,7 +247,7 @@ void E3dView::DrawMarkedObj(OutputDevice& rOut) const
for(size_t nObjs = 0; nObjs < nCnt; ++nObjs)
{
SdrObject *pObj = GetMarkedObjectByIndex(nObjs);
- if(pObj && pObj->ISA(E3dCompoundObject))
+ if(pObj && dynamic_cast< const E3dCompoundObject*>(pObj) != nullptr)
{
// related scene
pScene = static_cast<E3dCompoundObject*>(pObj)->GetScene();
@@ -255,7 +255,7 @@ void E3dView::DrawMarkedObj(OutputDevice& rOut) const
bSpecialHandling = true;
}
// Reset all selection flags
- if(pObj && pObj->ISA(E3dObject))
+ if(pObj && dynamic_cast< const E3dObject*>(pObj) != nullptr)
{
pScene = static_cast<E3dObject*>(pObj)->GetScene();
if(pScene)
@@ -270,7 +270,7 @@ void E3dView::DrawMarkedObj(OutputDevice& rOut) const
for(size_t nObjs = 0; nObjs < nCnt; ++nObjs)
{
SdrObject *pObj = GetMarkedObjectByIndex(nObjs);
- if(pObj && pObj->ISA(E3dCompoundObject))
+ if(pObj && dynamic_cast< const E3dCompoundObject*>(pObj) != nullptr)
{
// relatated scene
pScene = static_cast<E3dCompoundObject*>(pObj)->GetScene();
@@ -282,7 +282,7 @@ void E3dView::DrawMarkedObj(OutputDevice& rOut) const
for(size_t nObjs = 0; nObjs < nCnt; ++nObjs)
{
SdrObject *pObj = GetMarkedObjectByIndex(nObjs);
- if(pObj && pObj->ISA(E3dObject))
+ if(pObj && dynamic_cast< const E3dObject*>(pObj) != nullptr)
{
// Select object
E3dObject* p3DObj = static_cast<E3dObject*>(pObj);
@@ -305,7 +305,7 @@ void E3dView::DrawMarkedObj(OutputDevice& rOut) const
for(size_t nObjs = 0; nObjs < nCnt; ++nObjs)
{
SdrObject *pObj = GetMarkedObjectByIndex(nObjs);
- if(pObj && pObj->ISA(E3dCompoundObject))
+ if(pObj && dynamic_cast< const E3dCompoundObject*>(pObj) != nullptr)
{
// related scene
pScene = static_cast<E3dCompoundObject*>(pObj)->GetScene();
@@ -335,7 +335,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
{
const SdrObject* pObj = GetMarkedObjectByIndex(nObjs);
- if(!bSpecialHandling && pObj && pObj->ISA(E3dCompoundObject))
+ if(!bSpecialHandling && pObj && dynamic_cast< const E3dCompoundObject*>(pObj) != nullptr)
{
// if the object is selected, but it's scene not,
// we need special handling
@@ -347,7 +347,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
}
}
- if(pObj && pObj->ISA(E3dObject))
+ if(pObj && dynamic_cast< const E3dObject*>(pObj) != nullptr)
{
// reset all selection flags at 3D objects
pScene = static_cast<const E3dObject*>(pObj)->GetScene();
@@ -374,7 +374,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
{
SdrObject *pObj = GetMarkedObjectByIndex(nObjs);
- if(pObj && pObj->ISA(E3dCompoundObject))
+ if(pObj && dynamic_cast< const E3dCompoundObject*>(pObj) != nullptr)
{
// mark object, but not scenes
E3dCompoundObject* p3DObj = static_cast<E3dCompoundObject*>(pObj);
@@ -394,7 +394,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
{
SdrObject *pObj = aOldML.GetMark(nObjs)->GetMarkedSdrObj();
- if(pObj && pObj->ISA(E3dObject))
+ if(pObj && dynamic_cast< const E3dObject* >(pObj) != nullptr)
{
pScene = static_cast<E3dObject*>(pObj)->GetScene();
@@ -420,7 +420,7 @@ SdrModel* E3dView::GetMarkedObjModel() const
{
const SdrObject* pSrcOb=pSrcPg->GetObj(nOb);
- if(pSrcOb->ISA(E3dScene))
+ if(dynamic_cast< const E3dScene* >( pSrcOb) != nullptr)
{
pScene = const_cast<E3dScene*>(static_cast<const E3dScene*>(pSrcOb));
@@ -460,7 +460,7 @@ bool E3dView::Paste(
// Get owner of the list
SdrObject* pOwner = pDstList->GetOwnerObj();
- if(pOwner && pOwner->ISA(E3dScene))
+ if(pOwner && dynamic_cast< const E3dScene* >(pOwner) != nullptr)
{
E3dScene* pDstScene = static_cast<E3dScene*>(pOwner);
BegUndo(SVX_RESSTR(RID_SVX_3D_UNDO_EXCHANGE_PASTE));
@@ -479,7 +479,7 @@ bool E3dView::Paste(
for(size_t nOb = 0; nOb < nObjCount; ++nOb)
{
const SdrObject* pSrcOb = pSrcPg->GetObj(nOb);
- if(pSrcOb->ISA(E3dScene))
+ if(dynamic_cast< const E3dScene* >(pSrcOb) != nullptr)
{
E3dScene* pSrcScene = const_cast<E3dScene*>(static_cast<const E3dScene*>(pSrcOb));
ImpCloneAll3DObjectsToDestScene(pSrcScene, pDstScene, aDist);
@@ -635,7 +635,7 @@ void E3dView::ImpIsConvertTo3DPossible(SdrObject* pObj, bool& rAny3D,
{
if(pObj)
{
- if(pObj->ISA(E3dObject))
+ if(dynamic_cast< const E3dObject* >(pObj) != nullptr)
{
rAny3D = true;
}
@@ -659,7 +659,7 @@ void E3dView::ImpIsConvertTo3DPossible(SdrObject* pObj, bool& rAny3D,
void E3dView::ImpChangeSomeAttributesFor3DConversion(SdrObject* pObj)
{
- if(pObj->ISA(SdrTextObj))
+ if(dynamic_cast<const SdrTextObj*>( pObj) != nullptr)
{
const SfxItemSet& rSet = pObj->GetMergedItemSet();
const SvxColorItem& rTextColorItem = static_cast<const SvxColorItem&>(rSet.Get(EE_CHAR_COLOR));
@@ -684,7 +684,7 @@ void E3dView::ImpChangeSomeAttributesFor3DConversion(SdrObject* pObj)
void E3dView::ImpChangeSomeAttributesFor3DConversion2(SdrObject* pObj)
{
- if(pObj->ISA(SdrPathObj))
+ if(dynamic_cast<const SdrPathObj*>( pObj) != nullptr)
{
const SfxItemSet& rSet = pObj->GetMergedItemSet();
sal_Int32 nLineWidth = static_cast<const XLineWidthItem&>(rSet.Get(XATTR_LINEWIDTH)).GetValue();
@@ -707,7 +707,7 @@ void E3dView::ImpChangeSomeAttributesFor3DConversion2(SdrObject* pObj)
void E3dView::ImpCreateSingle3DObjectFlat(E3dScene* pScene, SdrObject* pObj, bool bExtrude, double fDepth, basegfx::B2DHomMatrix& rLatheMat)
{
// Single PathObject, transform this
- SdrPathObj* pPath = PTR_CAST(SdrPathObj, pObj);
+ SdrPathObj* pPath = dynamic_cast<SdrPathObj*>( pObj );
if(pPath)
{
@@ -1225,9 +1225,9 @@ bool E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut,
SdrObject *pObj = GetMarkedObjectByIndex(nObjs);
if(pObj)
{
- if(pObj->ISA(E3dScene) && static_cast<E3dScene*>(pObj)->GetScene() == pObj)
+ if(dynamic_cast< const E3dScene*>(pObj) != nullptr && static_cast<E3dScene*>(pObj)->GetScene() == pObj)
bThereAreRootScenes = true;
- if(pObj->ISA(E3dObject))
+ if(dynamic_cast< const E3dObject* >(pObj) != nullptr)
bThereAre3DObjects = true;
}
}
@@ -1553,7 +1553,7 @@ bool E3dView::IsBreak3DObjPossible() const
{
SdrObject* pObj = GetMarkedObjectByIndex(i);
- if (pObj && pObj->ISA(E3dObject))
+ if (pObj && dynamic_cast< const E3dObject* >(pObj) != nullptr)
{
if(!(static_cast<E3dObject*>(pObj)->IsBreakObjPossible()))
return false;
@@ -1592,7 +1592,7 @@ void E3dView::Break3DObj()
void E3dView::BreakSingle3DObj(E3dObject* pObj)
{
- if(pObj->ISA(E3dScene))
+ if(dynamic_cast< const E3dScene* >(pObj) != nullptr)
{
SdrObjList* pSubList = pObj->GetSubList();
SdrObjListIter aIter(*pSubList, IM_FLAT);
@@ -1629,9 +1629,9 @@ void E3dView::CheckPossibilities()
for(size_t nObjs = 0; (nObjs < nMarkCnt) && !bCoumpound; ++nObjs)
{
SdrObject *pObj = GetMarkedObjectByIndex(nObjs);
- if(pObj && pObj->ISA(E3dCompoundObject))
+ if(pObj && dynamic_cast< const E3dCompoundObject* >(pObj) != nullptr)
bCoumpound = true;
- if(pObj && pObj->ISA(E3dObject))
+ if(pObj && dynamic_cast< const E3dObject* >(pObj) != nullptr)
b3DObject = true;
}
diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx
index 62ce42a..6cd62af 100644
--- a/svx/source/engine3d/view3d1.cxx
+++ b/svx/source/engine3d/view3d1.cxx
@@ -50,7 +50,7 @@ void E3dView::ConvertMarkedToPolyObj(bool bLineToArea)
{
SdrObject* pObj = GetMarkedObjectByIndex(0);
- if (pObj && pObj->ISA(E3dPolyScene))
+ if (pObj && dynamic_cast< const E3dPolyScene* >(pObj) != nullptr)
{
bool bBezier = false;
pNewObj = static_cast<E3dPolyScene*>(pObj)->ConvertToPolyObj(bBezier, bLineToArea);
@@ -72,19 +72,19 @@ void E3dView::ConvertMarkedToPolyObj(bool bLineToArea)
void Imp_E3dView_InorderRun3DObjects(const SdrObject* pObj, sal_uInt32& rMask)
{
- if(pObj->ISA(E3dLatheObj))
+ if(dynamic_cast< const E3dLatheObj* >(pObj) != nullptr)
{
rMask |= 0x0001;
}
- else if(pObj->ISA(E3dExtrudeObj))
+ else if(dynamic_cast< const E3dExtrudeObj* >(pObj) != nullptr)
{
rMask |= 0x0002;
}
- else if(pObj->ISA(E3dSphereObj))
+ else if(dynamic_cast< const E3dSphereObj* >(pObj) != nullptr)
{
rMask |= 0x0004;
}
- else if(pObj->ISA(E3dCubeObj))
+ else if(dynamic_cast< const E3dCubeObj* >(pObj) != nullptr)
{
rMask |= 0x0008;
}
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index 2230813..03fc375 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -768,7 +768,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe
if (eState >= SfxItemState::DEFAULT && pItem )
{
- bool bChecked = pItem->ISA(SfxBoolItem) && static_cast<SfxBoolItem*>(pItem)->GetValue();
+ bool bChecked = dynamic_cast<const SfxBoolItem*>( pItem) != nullptr && static_cast<SfxBoolItem*>(pItem)->GetValue();
rMenu.CheckItem(SID_FM_SHOW_PROPERTY_BROWSER,bChecked);
}
delete pItem;
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx
index b73b821..ede090d 100644
--- a/svx/source/fmcomp/gridcell.cxx
+++ b/svx/source/fmcomp/gridcell.cxx
@@ -263,11 +263,11 @@ void DbGridColumn::impl_toggleScriptManager_nothrow( bool _bAttach )
void DbGridColumn::UpdateFromField(const DbGridRow* pRow, const Reference< XNumberFormatter >& xFormatter)
{
- if (m_pCell && m_pCell->ISA(FmXFilterCell))
- PTR_CAST(FmXFilterCell, m_pCell)->Update();
+ if (m_pCell && dynamic_cast<const FmXFilterCell*>( m_pCell) != nullptr)
+ dynamic_cast<FmXFilterCell*>( m_pCell)->Update( );
else if (pRow && pRow->IsValid() && m_nFieldPos >= 0 && m_pCell && pRow->HasField(m_nFieldPos))
{
- PTR_CAST(FmXDataCell, m_pCell)->UpdateFromField( pRow->GetField( m_nFieldPos ).getColumn(), xFormatter );
+ dynamic_cast<FmXDataCell*>( m_pCell)->UpdateFromField( pRow->GetField( m_nFieldPos ).getColumn(), xFormatter );
}
}
@@ -281,7 +281,7 @@ bool DbGridColumn::Commit()
bResult = m_pCell->Commit();
// store the data into the model
- FmXDataCell* pDataCell = PTR_CAST(FmXDataCell, m_pCell);
+ FmXDataCell* pDataCell = dynamic_cast<FmXDataCell*>( m_pCell );
if (bResult && pDataCell)
{
Reference< ::com::sun::star::form::XBoundComponent > xComp(m_xModel, UNO_QUERY);
@@ -413,7 +413,7 @@ void DbGridColumn::setLock(bool _bLock)
OUString DbGridColumn::GetCellText(const DbGridRow* pRow, const Reference< XNumberFormatter >& xFormatter) const
{
OUString aText;
- if (m_pCell && m_pCell->ISA(FmXFilterCell))
+ if (m_pCell && dynamic_cast<const FmXFilterCell*>( m_pCell) != nullptr)
return aText;
if (!pRow || !pRow->IsValid())
@@ -431,7 +431,7 @@ OUString DbGridColumn::GetCellText(const Reference< ::com::sun::star::sdb::XColu
OUString aText;
if (xField.is())
{
- FmXTextCell* pTextCell = PTR_CAST(FmXTextCell, m_pCell);
+ FmXTextCell* pTextCell = dynamic_cast<FmXTextCell*>( m_pCell );
if (pTextCell)
aText = pTextCell->GetText(xField, xFormatter);
else if (m_bObject)
@@ -461,7 +461,7 @@ void DbGridColumn::Paint(OutputDevice& rDev,
bool bEnabled = ( rDev.GetOutDevType() != OUTDEV_WINDOW )
|| ( static_cast< vcl::Window& >( rDev ).IsEnabled() );
- FmXDataCell* pDataCell = PTR_CAST(FmXDataCell, m_pCell);
+ FmXDataCell* pDataCell = dynamic_cast<FmXDataCell*>( m_pCell );
if (pDataCell)
{
if (!pRow || !pRow->IsValid())
@@ -515,7 +515,7 @@ void DbGridColumn::Paint(OutputDevice& rDev,
rDev.DrawText(rRect, OUString(OBJECTTEXT), nStyle);
}
}
- else if ( m_pCell->ISA( FmXFilterCell ) )
+ else if ( dynamic_cast<const FmXFilterCell*>( m_pCell) != nullptr )
static_cast< FmXFilterCell* >( m_pCell )->PaintCell( rDev, rRect );
}
@@ -3588,7 +3588,7 @@ FmXEditCell::FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl )
,m_bOwnEditImplementation( false )
{
- DbTextField* pTextField = PTR_CAST( DbTextField, &_rControl );
+ DbTextField* pTextField = dynamic_cast<DbTextField*>( &_rControl );
if ( pTextField )
{
@@ -4546,7 +4546,7 @@ FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl )
,m_aTextListeners(m_aMutex)
{
- DBG_ASSERT( m_pCellControl->ISA( DbFilterField ), "FmXFilterCell::FmXFilterCell: invalid cell control!" );
+ DBG_ASSERT( dynamic_cast<const DbFilterField*>( m_pCellControl) != nullptr, "FmXFilterCell::FmXFilterCell: invalid cell control!" );
static_cast< DbFilterField* >( m_pCellControl )->SetCommitHdl( LINK( this, FmXFilterCell, OnCommit ) );
}
diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx
index fdd2bdd..d1ff468 100644
--- a/svx/source/fmcomp/gridctrl.cxx
+++ b/svx/source/fmcomp/gridctrl.cxx
@@ -2893,7 +2893,7 @@ CellController* DbGridControl::GetController(long /*nRow*/, sal_uInt16 nColumnId
if (pReturn)
{
// if it is an edit row, it is possible to give it a forced read-only property
- if (!pReturn->ISA(EditCellController) && !pReturn->ISA(SpinCellController))
+ if ( dynamic_cast<const EditCellController*>( pReturn) == nullptr && dynamic_cast<const SpinCellController*>( pReturn) == nullptr )
// controller could not be set to read-only in forceROController
if (!bInsert && !bUpdate)
// better use no controller than one without read-only
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx
index 05519e2..9f57e69b 100644
--- a/svx/source/form/filtnav.cxx
+++ b/svx/source/form/filtnav.cxx
@@ -176,7 +176,7 @@ FmFilterItem* FmFilterItems::Find( const ::sal_Int32 _nFilterComponentIndex ) co
++i
)
{
- FmFilterItem* pCondition = PTR_CAST( FmFilterItem, *i );
+ FmFilterItem* pCondition = dynamic_cast<FmFilterItem*>( *i );
DBG_ASSERT( pCondition, "FmFilterItems::Find: Wrong element in container!" );
if ( _nFilterComponentIndex == pCondition->GetComponentIndex() )
return pCondition;
@@ -349,7 +349,7 @@ void FmFilterAdapter::setText(sal_Int32 nRowPos,
const FmFilterItem* pFilterItem,
const OUString& rText)
{
- FmFormItem* pFormItem = PTR_CAST( FmFormItem, pFilterItem->GetParent()->GetParent() );
+ FmFormItem* pFormItem = dynamic_cast<FmFormItem*>( pFilterItem->GetParent()->GetParent() );
try
{
@@ -424,7 +424,7 @@ void FmFilterAdapter::predicateExpressionChanged( const FilterEvent& _Event ) th
const sal_Int32 nActiveTerm( xFilterController->getActiveTerm() );
- FmFilterItems* pFilter = PTR_CAST( FmFilterItems, pFormItem->GetChildren()[ nActiveTerm ] );
+ FmFilterItems* pFilter = dynamic_cast<FmFilterItems*>( pFormItem->GetChildren()[ nActiveTerm ] );
FmFilterItem* pFilterItem = pFilter->Find( _Event.FilterComponent );
if ( pFilterItem )
{
@@ -666,7 +666,7 @@ FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, cons
for (::std::vector<FmFilterData*>::const_iterator i = rItems.begin();
i != rItems.end(); ++i)
{
- FmFormItem* pForm = PTR_CAST(FmFormItem,*i);
+ FmFormItem* pForm = dynamic_cast<FmFormItem*>( *i );
if (pForm)
{
if ( xController == pForm->GetController() )
@@ -688,7 +688,7 @@ FmFormItem* FmFilterModel::Find(const ::std::vector<FmFilterData*>& rItems, cons
for (::std::vector<FmFilterData*>::const_iterator i = rItems.begin();
i != rItems.end(); ++i)
{
- FmFormItem* pForm = PTR_CAST(FmFormItem,*i);
+ FmFormItem* pForm = dynamic_cast<FmFormItem*>( *i );
if (pForm)
{
if (xForm == pForm->GetController()->getModel())
@@ -741,7 +741,7 @@ void FmFilterModel::AppendFilterItems( FmFormItem& _rFormItem )
++iter
)
{
- if ((*iter)->ISA(FmFilterItems))
+ if (dynamic_cast<const FmFilterItems*>(*iter) != nullptr)
break;
}
@@ -790,7 +790,7 @@ void FmFilterModel::Remove(FmFilterData* pData)
DBG_ASSERT(i != rItems.end(), "FmFilterModel::Remove(): unknown Item");
// position within the parent
sal_Int32 nPos = i - rItems.begin();
- if (pData->ISA(FmFilterItems))
+ if (dynamic_cast<const FmFilterItems*>( pData) != nullptr)
{
FmFormItem* pFormItem = static_cast<FmFormItem*>(pParent);
@@ -806,7 +806,7 @@ void FmFilterModel::Remove(FmFilterData* pData)
while ( !rChildren.empty() )
{
::std::vector< FmFilterData* >::iterator removePos = rChildren.end() - 1;
- FmFilterItem* pFilterItem = PTR_CAST( FmFilterItem, *removePos );
+ FmFilterItem* pFilterItem = dynamic_cast<FmFilterItem*>( *removePos );
FmFilterAdapter::setText( nPos, pFilterItem, OUString() );
Remove( removePos );
}
@@ -823,7 +823,7 @@ void FmFilterModel::Remove(FmFilterData* pData)
}
else // FormItems can not be deleted
{
- FmFilterItem* pFilterItem = PTR_CAST(FmFilterItem, pData);
+ FmFilterItem* pFilterItem = dynamic_cast<FmFilterItem*>( pData );
// if its the last condition remove the parent
if (rItems.size() == 1)
@@ -860,7 +860,7 @@ void FmFilterModel::Remove( const ::std::vector<FmFilterData*>::iterator& rPos )
bool FmFilterModel::ValidateText(FmFilterItem* pItem, OUString& rText, OUString& rErrorMsg) const
{
- FmFormItem* pFormItem = PTR_CAST( FmFormItem, pItem->GetParent()->GetParent() );
+ FmFormItem* pFormItem = dynamic_cast<FmFormItem*>( pItem->GetParent()->GetParent() );
try
{
Reference< XFormController > xFormController( pFormItem->GetController() );
@@ -977,21 +977,21 @@ void FmFilterModel::EnsureEmptyFilterRows( FmParentData& _rItem )
{
// checks whether for each form there's one free level for input
::std::vector< FmFilterData* >& rChildren = _rItem.GetChildren();
- bool bAppendLevel = _rItem.ISA( FmFormItem );
+ bool bAppendLevel = dynamic_cast<const FmFormItem*>(&_rItem) != nullptr;
for ( ::std::vector<FmFilterData*>::iterator i = rChildren.begin();
i != rChildren.end();
++i
)
{
- FmFilterItems* pItems = PTR_CAST(FmFilterItems, *i);
+ FmFilterItems* pItems = dynamic_cast<FmFilterItems*>( *i );
if ( pItems && pItems->GetChildren().empty() )
{
bAppendLevel = false;
break;
}
- FmFormItem* pFormItem = PTR_CAST(FmFormItem, *i);
+ FmFormItem* pFormItem = dynamic_cast<FmFormItem*>( *i );
if (pFormItem)
{
EnsureEmptyFilterRows( *pFormItem );
@@ -1001,7 +1001,7 @@ void FmFilterModel::EnsureEmptyFilterRows( FmParentData& _rItem )
if ( bAppendLevel )
{
- FmFormItem* pFormItem = PTR_CAST( FmFormItem, &_rItem );
+ FmFormItem* pFormItem = dynamic_cast<FmFormItem*>( &_rItem );
OSL_ENSURE( pFormItem, "FmFilterModel::EnsureEmptyFilterRows: no FmFormItem, but a FmFilterItems child?" );
if ( pFormItem )
AppendFilterItems( *pFormItem );
@@ -1193,7 +1193,7 @@ bool FmFilterNavigator::EditingEntry( SvTreeListEntry* pEntry, Selection& rSelec
if (!SvTreeListBox::EditingEntry( pEntry, rSelection ))
return false;
- return pEntry && static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItem);
+ return pEntry && dynamic_cast<const FmFilterItem*>(static_cast<FmFilterData*>(pEntry->GetUserData())) == nullptr;
}
@@ -1205,7 +1205,7 @@ bool FmFilterNavigator::EditedEntry( SvTreeListEntry* pEntry, const OUString& rN
if (EditingCanceled())
return true;
- DBG_ASSERT(static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItem),
+ DBG_ASSERT(dynamic_cast<const FmFilterItem*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr,
"FmFilterNavigator::EditedEntry() wrong entry");
OUString aText(comphelper::string::strip(rNewText, ' '));
@@ -1347,15 +1347,15 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt )
FmFilterData* pData = static_cast<FmFilterData*>(pDropTarget->GetUserData());
FmFormItem* pForm = NULL;
- if (pData->ISA(FmFilterItem))
+ if (dynamic_cast<const FmFilterItem*>(pData) != nullptr)
{
- pForm = PTR_CAST(FmFormItem,pData->GetParent()->GetParent());
+ pForm = dynamic_cast<FmFormItem*>( pData->GetParent()->GetParent() );
if (pForm != m_aControlExchange->getFormItem())
return DND_ACTION_NONE;
}
- else if (pData->ISA(FmFilterItems))
+ else if (dynamic_cast<const FmFilterItems*>( pData) != nullptr)
{
- pForm = PTR_CAST(FmFormItem,pData->GetParent());
+ pForm = dynamic_cast<FmFormItem*>( pData->GetParent() );
if (pForm != m_aControlExchange->getFormItem())
return DND_ACTION_NONE;
}
@@ -1413,10 +1413,10 @@ void FmFilterNavigator::InitEntry(SvTreeListEntry* pEntry,
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
std::unique_ptr<SvLBoxString> pString;
- if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItem))
+ if (dynamic_cast<const FmFilterItem*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr)
pString.reset(new FmFilterString(pEntry, 0, rStr,
static_cast<FmFilterItem*>(pEntry->GetUserData())->GetFieldName()));
- else if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItems))
+ else if (dynamic_cast<const FmFilterItems*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr)
pString.reset(new FmFilterItemsString(pEntry, 0, rStr));
if (pString)
@@ -1434,21 +1434,21 @@ bool FmFilterNavigator::Select( SvTreeListEntry* pEntry, bool bSelect )
if (bSelect)
{
FmFormItem* pFormItem = NULL;
- if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItem))
+ if ( dynamic_cast<const FmFilterItem*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr)
pFormItem = static_cast<FmFormItem*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()->GetParent());
- else if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItems))
+ else if (dynamic_cast<const FmFilterItems*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr)
pFormItem = static_cast<FmFormItem*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()->GetParent());
- else if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFormItem))
+ else if (dynamic_cast<const FmFormItem*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr)
pFormItem = static_cast<FmFormItem*>(pEntry->GetUserData());
if (pFormItem)
{
// will the controller be exchanged?
- if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItem))
+ if (dynamic_cast<const FmFilterItem*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr)
m_pModel->SetCurrentItems(static_cast<FmFilterItems*>(static_cast<FmFilterItem*>(pEntry->GetUserData())->GetParent()));
- else if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFilterItems))
+ else if (dynamic_cast<const FmFilterItems*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr)
m_pModel->SetCurrentItems(static_cast<FmFilterItems*>(pEntry->GetUserData()));
- else if (static_cast<FmFilterData*>(pEntry->GetUserData())->ISA(FmFormItem))
+ else if (dynamic_cast<const FmFormItem*>(static_cast<FmFilterData*>(pEntry->GetUserData())) != nullptr)
m_pModel->SetCurrentController(static_cast<FmFormItem*>(pEntry->GetUserData())->GetController());
}
}
@@ -1539,10 +1539,10 @@ FmFormItem* FmFilterNavigator::getSelectedFilterItems(::std::vector<FmFilterItem
bHandled && pEntry != NULL;
pEntry = NextSelected(pEntry))
{
- FmFilterItem* pFilter = PTR_CAST(FmFilterItem, static_cast<FmFilterData*>(pEntry->GetUserData()));
+ FmFilterItem* pFilter = dynamic_cast<FmFilterItem*>( static_cast<FmFilterData*>(pEntry->GetUserData()) );
if (pFilter)
{
- FmFormItem* pForm = PTR_CAST(FmFormItem,pFilter->GetParent()->GetParent());
+ FmFormItem* pForm = dynamic_cast<FmFormItem*>( pFilter->GetParent()->GetParent() );
if (!pForm)
bHandled = false;
else if (!pFirstItem)
@@ -1648,14 +1648,14 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt )
pEntry = NextSelected(pEntry))
{
// don't delete forms
- FmFormItem* pForm = PTR_CAST(FmFormItem, static_cast<FmFilterData*>(pEntry->GetUserData()));
+ FmFormItem* pForm = dynamic_cast<FmFormItem*>( static_cast<FmFilterData*>(pEntry->GetUserData()) );
if (!pForm)
aSelectList.push_back(static_cast<FmFilterData*>(pEntry->GetUserData()));
}
if (aSelectList.size() == 1)
{
// don't delete the only empty row of a form
- FmFilterItems* pFilterItems = PTR_CAST(FmFilterItems, aSelectList[0]);
+ FmFilterItems* pFilterItems = dynamic_cast<FmFilterItems*>( aSelectList[0] );
if (pFilterItems && pFilterItems->GetChildren().empty()
&& pFilterItems->GetParent()->GetChildren().size() == 1)
aSelectList.clear();
@@ -1667,7 +1667,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt )
aContextMenu.EnableItem( SID_FM_DELETE, !aSelectList.empty() );
- bool bEdit = PTR_CAST(FmFilterItem, static_cast<FmFilterData*>(pClicked->GetUserData())) != NULL &&
+ bool bEdit = dynamic_cast<FmFilterItem*>( static_cast<FmFilterData*>(pClicked->GetUserData()) ) != NULL &&
IsSelected(pClicked) && GetSelectionCount() == 1;
aContextMenu.EnableItem( SID_FM_FILTER_EDIT,
@@ -1832,11 +1832,11 @@ void FmFilterNavigator::DeleteSelection()
pEntry != NULL;
pEntry = NextSelected(pEntry))
{
- FmFilterItem* pFilterItem = PTR_CAST(FmFilterItem, static_cast<FmFilterData*>(pEntry->GetUserData()));
+ FmFilterItem* pFilterItem = dynamic_cast<FmFilterItem*>( static_cast<FmFilterData*>(pEntry->GetUserData()) );
if (pFilterItem && IsSelected(GetParent(pEntry)))
continue;
- FmFormItem* pForm = PTR_CAST(FmFormItem, static_cast<FmFilterData*>(pEntry->GetUserData()));
+ FmFormItem* pForm = dynamic_cast<FmFormItem*>( static_cast<FmFilterData*>(pEntry->GetUserData()) );
if (!pForm)
aEntryList.push_back(pEntry);
}
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list