summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-09-29 11:00:09 +0200
committerOliver Specht <oliver.specht@cib.de>2015-09-30 06:07:57 +0000
commitac9671f94800b647f82b12e718968311a025e87e (patch)
treef3a665eb3527022d016fa9bfdbe4128a8387c967
parent53e6ac15a14b46c76049a9e6eb39da7bb4093037 (diff)
tdf#94559: second step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in chart2, connectivity, editeng, extensions, filter, forms, framework, idl Change-Id: I6a2f9d8bbccb07088413f7552af4b5af8f0cad99 Reviewed-on: https://gerrit.libreoffice.org/18920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx2
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx8
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx4
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DIndexIter.cxx2
-rw-r--r--connectivity/source/drivers/file/FNoException.cxx2
-rw-r--r--connectivity/source/drivers/file/fanalyzer.cxx2
-rw-r--r--connectivity/source/drivers/file/fcode.cxx27
-rw-r--r--connectivity/source/drivers/file/fcomp.cxx8
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx6
-rw-r--r--editeng/source/editeng/editview.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx8
-rw-r--r--editeng/source/editeng/impedit5.cxx4
-rw-r--r--editeng/source/items/bulitem.cxx2
-rw-r--r--editeng/source/items/xmlcnitm.cxx2
-rw-r--r--editeng/source/outliner/outlvw.cxx2
-rw-r--r--extensions/source/propctrlr/standardcontrol.cxx2
-rw-r--r--filter/source/msfilter/escherex.cxx8
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--filter/source/msfilter/svdfppt.cxx38
-rw-r--r--filter/source/pdf/pdfexport.cxx2
-rw-r--r--forms/source/richtext/rtattributehandler.cxx18
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx2
-rw-r--r--idl/source/objects/slot.cxx6
26 files changed, 84 insertions, 83 deletions
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index cfa9f04db714..647471d7e4c9 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -177,7 +177,7 @@ void ChartController::executeDispatch_InsertSpecialCharacter()
const SfxPoolItem* pItem=0;
OUString aString;
if ( pSet && pSet->GetItemState( SID_CHARMAP, true, &pItem) == SfxItemState::SET &&
- pItem->ISA(SfxStringItem) )
+ dynamic_cast< const SfxStringItem* >(pItem) != nullptr )
aString = dynamic_cast<const SfxStringItem*>(pItem)->GetValue();
OutlinerView* pOutlinerView = m_pDrawViewWrapper->GetTextEditOutlinerView();
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index ea7fd10ac120..2089aa1ae916 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -907,7 +907,7 @@ void ChartController::execute_DoubleClick( const Point* pMousePixel )
{
// #i12587# support for shapes in chart
SdrObject* pObj = DrawViewWrapper::getSdrObject( m_aSelection.getSelectedAdditionalShape() );
- if ( pObj && pObj->ISA( SdrTextObj ) )
+ if ( dynamic_cast< const SdrTextObj* >(pObj) != nullptr )
{
bEditText = true;
}
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index ac0f1fd70163..e0d9bd288c47 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -466,7 +466,7 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
case COMMAND_ID_DRAW_LINE:
case COMMAND_ID_LINE_ARROW_END:
{
- if ( pObj->ISA( SdrPathObj ) )
+ if ( dynamic_cast<const SdrPathObj*>( pObj) != nullptr )
{
Point aStart = aRect.TopLeft();
Point aEnd = aRect.BottomRight();
@@ -483,7 +483,7 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
break;
case COMMAND_ID_DRAW_FREELINE_NOFILL:
{
- if ( pObj->ISA( SdrPathObj ) )
+ if ( dynamic_cast<const SdrPathObj*>( pObj) != nullptr )
{
basegfx::B2DPolygon aInnerPoly;
aInnerPoly.append( basegfx::B2DPoint( aRect.Left(), aRect.Bottom() ) );
@@ -504,7 +504,7 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
case COMMAND_ID_DRAW_TEXT:
case COMMAND_ID_DRAW_TEXT_VERTICAL:
{
- if ( pObj->ISA( SdrTextObj ) )
+ if ( dynamic_cast<const SdrTextObj*>( pObj) != nullptr )
{
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
if ( pTextObj )
@@ -528,7 +528,7 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
case COMMAND_ID_DRAW_CAPTION:
case COMMAND_ID_DRAW_CAPTION_VERTICAL:
{
- if ( pObj->ISA( SdrCaptionObj ) )
+ if ( dynamic_cast<const SdrCaptionObj*>( pObj) != nullptr )
{
bool bIsVertical( COMMAND_ID_DRAW_CAPTION_VERTICAL == nID );
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 19fc3f3e629e..9793dcce9ec9 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -470,7 +470,7 @@ SelectionHelper::~SelectionHelper()
bool SelectionHelper::getFrameDragSingles()
{
bool bFrameDragSingles = true;//true == green == surrounding handles
- if( m_pSelectedObj && m_pSelectedObj->ISA(E3dObject) )
+ if( m_pSelectedObj && dynamic_cast<const E3dObject*>( m_pSelectedObj) != nullptr )
bFrameDragSingles = false;
return bFrameDragSingles;
}
@@ -592,7 +592,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
if( m_pMarkObj && m_pMarkObj != m_pSelectedObj)
{
rHdlList.Clear();
- if( m_pMarkObj->ISA(SdrPathObj) )
+ if( dynamic_cast<const SdrPathObj*>( m_pMarkObj) != nullptr )
{
//if th object is a polygon
//from each point a handle is generated
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 10b14fe8e57e..f15508e1bd46 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -220,7 +220,7 @@ E3dScene* lcl_getE3dScene( const uno::Reference< drawing::XShape >& xShape )
if(pSvxShape)
{
SdrObject* pObj = pSvxShape->GetSdrObject();
- if( pObj && pObj->ISA(E3dScene) )
+ if( pObj && dynamic_cast< const E3dScene* >(pObj) != nullptr )
pRet = static_cast<E3dScene*>(pObj);
}
}
diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx
index edc3c995c9f5..1e7d374b2e1c 100644
--- a/connectivity/source/drivers/dbase/DIndexIter.cxx
+++ b/connectivity/source/drivers/dbase/DIndexIter.cxx
@@ -132,7 +132,7 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
sal_uIntPtr OIndexIterator::GetCompare(bool bFirst)
{
ONDXKey* pKey = NULL;
- sal_Int32 ePredicateType = PTR_CAST(file::OOp_COMPARE,m_pOperator)->getPredicateType();
+ sal_Int32 ePredicateType = dynamic_cast<file::OOp_COMPARE*>(m_pOperator)->getPredicateType();
if (bFirst)
{
diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx
index ad2b150dc9b1..b5b436e5f8eb 100644
--- a/connectivity/source/drivers/file/FNoException.cxx
+++ b/connectivity/source/drivers/file/FNoException.cxx
@@ -61,7 +61,7 @@ void OSQLAnalyzer::bindParameterRow(OValueRefRow& _pRow)
OCodeList& rCodeList = m_aCompiler->m_aCodeList;
for(OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end();++aIter)
{
- OOperandParam* pParam = PTR_CAST(OOperandParam,(*aIter));
+ OOperandParam* pParam = dynamic_cast<OOperandParam*>(*aIter);
if ( pParam )
pParam->bindValue(_pRow);
}
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index 16ec78a25f4a..1f1f4f8dd32a 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -121,7 +121,7 @@ void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow)
{
for (OCodeList::iterator aIter = rCodeList.begin(); aIter != rCodeList.end(); ++aIter)
{
- OOperandAttr* pAttr = PTR_CAST(OOperandAttr,(*aIter));
+ OOperandAttr* pAttr = dynamic_cast<OOperandAttr*>(*aIter);
if (pAttr)
{
pAttr->bindValue(_pRow);
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 95eeffdd987c..20ff3a0e55b2 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -189,9 +189,9 @@ void OBoolOperator::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResultBOOL(operate(pLeft, pRight)));
- if (IS_TYPE(OOperandResult,pLeft))
+ if( typeid(OOperandResult) == typeid(*pLeft))
delete pLeft;
- if (IS_TYPE(OOperandResult,pRight))
+ if( typeid(OOperandResult) == typeid(*pRight))
delete pRight;
}
@@ -206,7 +206,8 @@ void OOp_NOT::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResultBOOL(operate(pOperand)));
- if (IS_TYPE(OOperandResult,pOperand))
+
+ if( typeid(OOperandResult) == typeid(*pOperand))
delete pOperand;
}
@@ -228,7 +229,7 @@ void OOp_ISNULL::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResultBOOL(operate(pOperand)));
- if (IS_TYPE(OOperandResult,pOperand))
+ if( typeid(OOperandResult) == typeid(*pOperand))
delete pOperand;
}
@@ -340,9 +341,9 @@ void ONumOperator::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResultNUM(operate(pLeft->getValue(), pRight->getValue())));
- if (IS_TYPE(OOperandResult,pLeft))
+ if( typeid(OOperandResult) == typeid(*pLeft))
delete pLeft;
- if (IS_TYPE(OOperandResult,pRight))
+ if( typeid(OOperandResult) == typeid(*pRight))
delete pRight;
}
@@ -380,11 +381,11 @@ void ONthOperator::Exec(OCodeStack& rCodeStack)
pOperand = rCodeStack.top();
rCodeStack.pop();
assert(pOperand);
- if (pOperand && !IS_TYPE(OStopOperand,pOperand))
+ if (pOperand && typeid(OStopOperand) != typeid(*pOperand))
aValues.push_back( pOperand->getValue() );
aOperands.push_back( pOperand );
}
- while (pOperand && !IS_TYPE(OStopOperand,pOperand));
+ while (pOperand && typeid(OStopOperand) != typeid(*pOperand));
rCodeStack.push(new OOperandResult(operate(aValues)));
@@ -392,7 +393,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack)
::std::vector<OOperand*>::iterator aEnd = aOperands.end();
for (; aIter != aEnd; ++aIter)
{
- if (IS_TYPE(OOperandResult,*aIter))
+ if (typeid(OOperandResult) != typeid(*(*aIter)))
delete *aIter;
}
}
@@ -404,13 +405,13 @@ void OBinaryOperator::Exec(OCodeStack& rCodeStack)
OOperand *pLeft = rCodeStack.top();
rCodeStack.pop();
- if ( !rCodeStack.empty() && IS_TYPE(OStopOperand,rCodeStack.top()) )
+ if ( !rCodeStack.empty() && typeid(OStopOperand) == typeid(*rCodeStack.top()) )
rCodeStack.pop();
rCodeStack.push(new OOperandResult(operate(pLeft->getValue(),pRight->getValue())));
- if (IS_TYPE(OOperandResult,pRight))
+ if(typeid(OOperandResult) == typeid(*pRight))
delete pRight;
- if (IS_TYPE(OOperandResult,pLeft))
+ if(typeid(OOperandResult) == typeid(*pLeft))
delete pLeft;
}
@@ -421,7 +422,7 @@ void OUnaryOperator::Exec(OCodeStack& rCodeStack)
rCodeStack.pop();
rCodeStack.push(new OOperandResult(operate(pOperand->getValue())));
- if (IS_TYPE(OOperandResult,pOperand))
+ if (typeid(OOperandResult) == typeid(*pOperand))
delete pOperand;
}
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx
index b901ff53376d..51cd1963530c 100644
--- a/connectivity/source/drivers/file/fcomp.cxx
+++ b/connectivity/source/drivers/file/fcomp.cxx
@@ -554,7 +554,7 @@ bool OPredicateInterpreter::evaluate(OCodeList& rCodeList)
for(;aIter != rCodeList.end();++aIter)
{
- OOperand* pOperand = PTR_CAST(OOperand,(*aIter));
+ OOperand* pOperand = dynamic_cast<OOperand* >(*aIter);
if (pOperand)
m_aStack.push(pOperand);
else
@@ -568,7 +568,7 @@ bool OPredicateInterpreter::evaluate(OCodeList& rCodeList)
DBG_ASSERT(pOperand, "StackFehler");
bResult = pOperand->isValid();
- if (IS_TYPE(OOperandResult,pOperand))
+ if (dynamic_cast<const OOperandResult* >(pOperand) != nullptr)
delete pOperand;
return bResult;
}
@@ -581,7 +581,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD
for(;aIter != rCodeList.end();++aIter)
{
- OOperand* pOperand = PTR_CAST(OOperand,(*aIter));
+ OOperand* pOperand = dynamic_cast<OOperand* >(*aIter);
if (pOperand)
m_aStack.push(pOperand);
else
@@ -595,7 +595,7 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD
DBG_ASSERT(pOperand, "StackFehler");
(*_rVal) = pOperand->getValue();
- if (IS_TYPE(OOperandResult,pOperand))
+ if (dynamic_cast<const OOperandResult* >(pOperand) != nullptr)
delete pOperand;
}
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 20436ec92d97..7b3a2cd9f48a 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -2659,7 +2659,7 @@ namespace accessibility
for (sal_Int32 n = 0; n < nFields; ++n)
{
EFieldInfo aField = rT.GetFieldInfo( nPara, n );
- if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) )
+ if ( dynamic_cast<const SvxURLField* >(aField.pFieldItem->GetField() ) != nullptr)
nHyperLinks++;
}
return nHyperLinks;
@@ -2677,7 +2677,7 @@ namespace accessibility
for (sal_Int32 n = 0; n < nFields; ++n)
{
EFieldInfo aField = rT.GetFieldInfo( nPara, n );
- if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) )
+ if ( dynamic_cast<const SvxURLField* >(aField.pFieldItem->GetField()) != nullptr )
{
if ( nHyperLink == nLinkIndex )
{
@@ -2708,7 +2708,7 @@ namespace accessibility
for (sal_Int32 n = 0; n < nFields; ++n)
{
EFieldInfo aField = rT.GetFieldInfo( nPara, n );
- if ( aField.pFieldItem->GetField()->ISA( SvxURLField ) )
+ if ( dynamic_cast<const SvxURLField* >( aField.pFieldItem->GetField() ) != nullptr)
{
if ( aField.aPosition.nIndex == nEEIndex )
{
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 57ec9945eded..e2b45f8781be 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -1101,7 +1101,7 @@ const SvxFieldItem* EditView::GetFieldAtSelection() const
if (rAttr.GetStart() == nXPos)
if (rAttr.Which() == EE_FEATURE_FIELD)
{
- DBG_ASSERT(rAttr.GetItem()->ISA( SvxFieldItem ), "No FeldItem...");
+ DBG_ASSERT(dynamic_cast<const SvxFieldItem* >(rAttr.GetItem() ) != nullptr, "No FeldItem...");
return static_cast<const SvxFieldItem*>(rAttr.GetItem());
}
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 264ad00859bb..ced328816d82 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -3442,7 +3442,7 @@ uno::Reference< datatransfer::XTransferable > ImpEditEngine::CreateTransferable(
{
const SvxFieldItem* pField = static_cast<const SvxFieldItem*>(pAttr->GetItem());
const SvxFieldData* pFld = pField->GetField();
- if ( pFld && pFld->ISA( SvxURLField ) )
+ if ( dynamic_cast<const SvxURLField* >(pFld) != nullptr )
{
// Office-Bookmark
OUString aURL( static_cast<const SvxURLField*>(pFld)->GetURL() );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 540b8e798308..d31d12e1c47b 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2895,7 +2895,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
DBG_ASSERT( GetParaPortions().Count(), "No ParaPortion?!" );
SvxFont aTmpFont( GetParaPortions()[0]->GetNode()->GetCharAttribs().GetDefFont() );
vcl::Font aOldFont( pOutDev->GetFont() );
- vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOutDev->GetExtOutDevData() );
+ vcl::PDFExtOutDevData* pPDFExtOutDevData = dynamic_cast< vcl::PDFExtOutDevData* >( pOutDev->GetExtOutDevData() );
// In the case of rotated text is aStartPos considered TopLeft because
// other information is missing, and since the whole object is shown anyway
@@ -3179,7 +3179,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
{
const EditCharAttrib* pAttr = pPortion->GetNode()->GetCharAttribs().FindFeature(nIndex);
DBG_ASSERT( pAttr, "Field not found");
- DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Field of the wrong type! ");
+ DBG_ASSERT( dynamic_cast< const SvxFieldItem* >( pAttr ) != nullptr, "Field of the wrong type! ");
aText = static_cast<const EditCharAttribField*>(pAttr)->GetFieldValue();
nTextStart = 0;
nTextLen = aText.getLength();
@@ -3481,7 +3481,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
if( pFieldItem )
{
const SvxFieldData* pFieldData = pFieldItem->GetField();
- if ( pFieldData->ISA( SvxURLField ) )
+ if ( dynamic_cast< const SvxURLField* >( pFieldData ) != nullptr)
{
Point aTopLeft( aTmpPos );
aTopLeft.Y() -= pLine->GetMaxAscent();
@@ -3527,7 +3527,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt
{
const EditCharAttrib* pAttr = pPortion->GetNode()->GetCharAttribs().FindFeature(nIndex);
DBG_ASSERT( pAttr, "Field not found" );
- DBG_ASSERT( pAttr && pAttr->GetItem()->ISA( SvxFieldItem ), "Wrong type of field!" );
+ DBG_ASSERT( dynamic_cast< const SvxFieldItem* >( pAttr ) != nullptr, "Wrong type of field!" );
// add a meta file comment if we record to a metafile
if( bMetafileValid )
diff --git a/editeng/source/editeng/impedit5.cxx b/editeng/source/editeng/impedit5.cxx
index 650ecb5cdad5..b9773ef73f6e 100644
--- a/editeng/source/editeng/impedit5.cxx
+++ b/editeng/source/editeng/impedit5.cxx
@@ -149,11 +149,11 @@ void ImpEditEngine::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
const SfxStyleSheetHint* pStyleSheetHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);
if ( pStyleSheetHint )
{
- DBG_ASSERT( pStyleSheetHint->GetStyleSheet()->ISA( SfxStyleSheet ), "No SfxStyleSheet!" );
+ DBG_ASSERT( dynamic_cast< const SfxStyleSheet* >(pStyleSheetHint->GetStyleSheet()) != nullptr, "No SfxStyleSheet!" );
pStyle = static_cast<SfxStyleSheet*>( pStyleSheetHint->GetStyleSheet() );
nId = pStyleSheetHint->GetHint();
}
- else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) && rBC.ISA( SfxStyleSheet ) )
+ else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) && dynamic_cast< const SfxStyleSheet* >(&rBC) != nullptr )
{
pStyle = static_cast<SfxStyleSheet*>(&rBC);
nId = dynamic_cast<const SfxSimpleHint*>(&rHint)->GetId();
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index e99cb023c2d2..3207391fb2a3 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -251,7 +251,7 @@ void SvxBulletItem::CopyValidProperties( const SvxBulletItem& rCopyFrom )
bool SvxBulletItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT(rItem.ISA(SvxBulletItem),"operator==Types not matching");
+ DBG_ASSERT(dynamic_cast< const SvxBulletItem* >(&rItem) != nullptr,"operator==Types not matching");
const SvxBulletItem& rBullet = static_cast<const SvxBulletItem&>(rItem);
// Compare with ValidMask, otherwise no put possible in a AttrSet if the
// item differs only in terms of the ValidMask from an existing one.
diff --git a/editeng/source/items/xmlcnitm.cxx b/editeng/source/items/xmlcnitm.cxx
index 5c7caa620cb3..7f595d60fcd1 100644
--- a/editeng/source/items/xmlcnitm.cxx
+++ b/editeng/source/items/xmlcnitm.cxx
@@ -51,7 +51,7 @@ SvXMLAttrContainerItem::~SvXMLAttrContainerItem()
bool SvXMLAttrContainerItem::operator==( const SfxPoolItem& rItem ) const
{
- DBG_ASSERT( rItem.ISA(SvXMLAttrContainerItem),
+ DBG_ASSERT( dynamic_cast< const SvXMLAttrContainerItem* >(&rItem) != nullptr,
"SvXMLAttrContainerItem::operator ==(): Bad type");
return *pImpl == *static_cast<const SvXMLAttrContainerItem&>(rItem).pImpl;
}
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 966efed18366..e2399dddc3da 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -276,7 +276,7 @@ sal_Int32 OutlinerView::ImpCheckMousePos(const Point& rPosPix, MouseTarget& reTa
{
// Check for hyperlink
const SvxFieldItem* pFieldItem = pEditView->GetField( aMousePosWin );
- if ( pFieldItem && pFieldItem->GetField() && pFieldItem->GetField()->ISA( SvxURLField ) )
+ if ( pFieldItem && pFieldItem->GetField() && dynamic_cast< const SvxURLField* >(pFieldItem->GetField()) != nullptr )
reTarget = MouseTarget::Hypertext;
}
}
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 3018c48ef5b0..e40ee8a02926 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -669,7 +669,7 @@ namespace pcr
const SfxPoolItem* pItem = pDocSh ? pDocSh->GetItem( SID_COLOR_TABLE ) : NULL;
if ( pItem )
{
- DBG_ASSERT(pItem->ISA(SvxColorListItem), "OColorControl::OColorControl: invalid color item!");
+ DBG_ASSERT(dynamic_cast< const SvxColorListItem* >(pItem) != nullptr, "OColorControl::OColorControl: invalid color item!");
pColorList = static_cast<const SvxColorListItem*>( pItem )->GetColorList();
}
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 259236480dee..642ef2944ceb 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1264,7 +1264,7 @@ bool EscherPropertyContainer::CreateOLEGraphicProperties(
if ( rXShape.is() )
{
SdrObject* pSdrOLE2( GetSdrObjectFromXShape( rXShape ) ); // SJ: leaving unoapi, because currently there is
- if ( pSdrOLE2 && pSdrOLE2->ISA( SdrOle2Obj ) ) // no access to the native graphic object
+ if ( pSdrOLE2 && 0 != dynamic_cast<const SdrOle2Obj* > (pSdrOLE2) ) // no access to the native graphic object
{
const Graphic* pGraphic = static_cast<SdrOle2Obj*>(pSdrOLE2)->GetGraphic();
if ( pGraphic )
@@ -1315,7 +1315,7 @@ bool EscherPropertyContainer::CreateMediaGraphicProperties(
if ( rXShape.is() )
{
SdrObject* pSdrMedia( GetSdrObjectFromXShape( rXShape ) ); // SJ: leaving unoapi, because currently there is
- if ( pSdrMedia && pSdrMedia->ISA( SdrMediaObj ) ) // no access to the native graphic object
+ if ( dynamic_cast<const SdrMediaObj* >(pSdrMedia) != nullptr ) // no access to the native graphic object
{
GraphicObject aGraphicObject( static_cast<SdrMediaObj*>(pSdrMedia)->getSnapshot() );
bRetValue = CreateGraphicProperties( rXShape, aGraphicObject );
@@ -4640,7 +4640,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
if (aType == "drawing.Custom")
{
SdrObject* pCustoShape( GetSdrObjectFromXShape( aXShape ) );
- if ( pCustoShape && pCustoShape->ISA( SdrObjCustomShape ) )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pCustoShape) != nullptr )
{
const SdrCustomShapeGeometryItem& rGeometryItem = static_cast<const SdrCustomShapeGeometryItem&>(
pCustoShape->GetMergedItem( SDRATTR_CUSTOMSHAPE_GEOMETRY ));
@@ -4685,7 +4685,7 @@ sal_uInt32 EscherConnectorListEntry::GetConnectorRule( bool bFirst )
else if ( nGluePointType == com::sun::star::drawing::EnhancedCustomShapeGluePointType::SEGMENTS )
{
SdrObject* pPoly = pCustoShape->DoConvertToPolyObj( true, true );
- if ( pPoly && pPoly->ISA( SdrPathObj ) )
+ if ( dynamic_cast<const SdrPathObj* >( pPoly ) != nullptr )
{
sal_Int16 a, b, nIndex = 0;
sal_uInt32 nDistance = 0xffffffff;
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index e334400850d0..15f32258b4c5 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3627,7 +3627,7 @@ void SvxMSDffManager::ReadObjText( SvStream& rStream, SdrObject* pObj )
// our outliner is too complicate to be used properly,
void SvxMSDffManager::ReadObjText( const OUString& rText, SdrObject* pObj )
{
- SdrTextObj* pText = PTR_CAST( SdrTextObj, pObj );
+ SdrTextObj* pText = dynamic_cast<SdrTextObj*>( pObj );
if ( pText )
{
SdrOutliner& rOutliner = pText->ImpGetDrawOutliner();
@@ -4011,7 +4011,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
pRet->SetModel( pSdrModel ); // required for GraphicLink
pRet->SetLogicRect( rObjData.aBoundRect );
- if ( pRet->ISA( SdrGrafObj ) )
+ if ( dynamic_cast<const SdrGrafObj* >(pRet) != nullptr )
{
if( aLinkFileName.getLength() )
static_cast<SdrGrafObj*>(pRet)->SetGraphicLink( aLinkFileName, ""/*TODO?*/, aLinkFilterName );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 5c1cecdedb2c..23d0cb49e861 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -731,7 +731,7 @@ sal_uLong DffPropSet::SanitizeEndPos(SvStream &rIn, sal_uLong nEndRecPos)
*/
SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, void* pData, Rectangle& rTextRect, SdrObject* pOriginalObj )
{
- if ( pOriginalObj && pOriginalObj->ISA( SdrObjCustomShape ) )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pOriginalObj) != nullptr )
pOriginalObj->SetMergedItem( SdrTextFixedCellHeightItem( true ) );
// we are initializing our return value with the object that was imported by our escher import
@@ -780,7 +780,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
case PPT_PST_RecolorInfoAtom :
{
- if ( pRet && ( pRet->ISA( SdrGrafObj ) && static_cast<SdrGrafObj*>(pRet)->HasGDIMetaFile() ) )
+ if ( dynamic_cast<const SdrGrafObj* >(pRet) != nullptr && static_cast<SdrGrafObj*>(pRet)->HasGDIMetaFile() )
{
Graphic aGraphic( static_cast<SdrGrafObj*>(pRet)->GetGraphic() );
RecolorGraphic( rSt, aClientDataHd.nRecLen, aGraphic );
@@ -841,9 +841,9 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( pRet )
{
bool bDeleteSource = aTextObj.GetOEPlaceHolderAtom() != 0;
- if ( bDeleteSource && !pRet->ISA( SdrGrafObj ) // we are not allowed to get
- && !pRet->ISA( SdrObjGroup ) // grouped placeholder objects
- && !pRet->ISA( SdrOle2Obj ) )
+ if ( bDeleteSource && dynamic_cast<const SdrGrafObj* >(pRet) == nullptr // we are not allowed to get
+ && dynamic_cast<const SdrObjGroup* >(pRet) == nullptr // grouped placeholder objects
+ && dynamic_cast<const SdrOle2Obj* >(pRet) == nullptr )
SdrObject::Free( pRet );
}
sal_uInt32 nTextFlags = aTextObj.GetTextFlags();
@@ -1045,7 +1045,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
bool bWordWrap = (MSO_WrapMode)GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) != mso_wrapNone;
bool bFitShapeToText = ( GetPropertyValue( DFF_Prop_FitTextToShape, 0 ) & 2 ) != 0;
- if ( pRet && pRet->ISA( SdrObjCustomShape ) && ( eTextKind == OBJ_RECT ) )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr && ( eTextKind == OBJ_RECT ) )
{
bAutoGrowHeight = bFitShapeToText;
if ( bWordWrap )
@@ -1057,7 +1057,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
}
else
{
- if ( pRet && pRet->ISA( SdrObjCustomShape ) )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pRet) != nullptr )
{
SdrObject::Free( pRet );
pRet = NULL;
@@ -1097,7 +1097,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
pTObj->SetMergedItem( SdrTextFitToSizeTypeItem(SDRTEXTFIT_AUTOFIT) );
}
- if ( !pTObj->ISA( SdrObjCustomShape ) )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr )
{
pTObj->SetMergedItem( makeSdrTextAutoGrowWidthItem( bAutoGrowWidth ) );
pTObj->SetMergedItem( makeSdrTextAutoGrowHeightItem( bAutoGrowHeight ) );
@@ -1113,12 +1113,12 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
if ( nMinFrameHeight < 0 )
nMinFrameHeight = 0;
- if ( !pTObj->ISA( SdrObjCustomShape ) )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr )
pTObj->SetMergedItem( makeSdrTextMinFrameHeightItem( nMinFrameHeight ) );
if ( nMinFrameWidth < 0 )
nMinFrameWidth = 0;
- if ( !pTObj->ISA( SdrObjCustomShape ) )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr )
pTObj->SetMergedItem( makeSdrTextMinFrameWidthItem( nMinFrameWidth ) );
// set margins at the borders of the textbox
@@ -1128,7 +1128,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
pTObj->SetMergedItem( makeSdrTextLowerDistItem( nTextBottom ) );
pTObj->SetMergedItem( SdrTextFixedCellHeightItem( true ) );
- if ( !pTObj->ISA( SdrObjCustomShape ) )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr )
pTObj->SetSnapRect( rTextRect );
pTObj = ReadObjText( &aTextObj, pTObj, rData.pPage );
@@ -1140,9 +1140,9 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
snaprect of the object. Then we will use
ADJUST_CENTER instead of ADJUST_BLOCK.
*/
- if ( !pTObj->ISA( SdrObjCustomShape ) && !bFitShapeToText && !bWordWrap )
+ if ( dynamic_cast<const SdrObjCustomShape* >(pTObj) == nullptr && !bFitShapeToText && !bWordWrap )
{
- SdrTextObj* pText = PTR_CAST( SdrTextObj, pTObj );
+ SdrTextObj* pText = dynamic_cast<SdrTextObj*>( pTObj );
if ( pText )
{
if ( bVerticalText )
@@ -1173,7 +1173,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
sal_Int32 nAngle = ( rObjData.nSpFlags & SP_FFLIPV ) ? -mnFix16Angle : mnFix16Angle; // #72116# vertical flip -> rotate by using the other way
nAngle += nTextRotationAngle;
- if ( !pTObj->ISA( SdrObjCustomShape ) )
+ if ( dynamic_cast< const SdrObjCustomShape* >(pTObj) == nullptr )
{
if ( rObjData.nSpFlags & SP_FFLIPV )
{
@@ -1252,7 +1252,7 @@ SdrObject* SdrEscherImport::ProcessObj( SvStream& rSt, DffObjData& rObjData, voi
else
{
SdrObject* pConnectObj = pRet;
- if ( pOriginalObj && pRet->ISA( SdrObjGroup ) )
+ if ( pOriginalObj && dynamic_cast< const SdrObjGroup* >(pRet) != nullptr )
{ /* check if the original object from the escherimport is part of the group object,
if this is the case, we will use the original object to connect to */
SdrObjListIter aIter( *pRet, IM_DEEPWITHGROUPS );
@@ -2211,7 +2211,7 @@ SdrOutliner* SdrPowerPointImport::GetDrawOutliner( SdrTextObj* pSdrText )
SdrObject* SdrPowerPointImport::ReadObjText( PPTTextObj* pTextObj, SdrObject* pSdrObj, SdPageCapsule pPage ) const
{
- SdrTextObj* pText = PTR_CAST( SdrTextObj, pSdrObj );
+ SdrTextObj* pText = dynamic_cast<SdrTextObj*>( pSdrObj );
if ( pText )
{
if ( !ApplyTextObj( pTextObj, pText, pPage, NULL, NULL ) )
@@ -6948,7 +6948,7 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
if ( pCurrent->mpFieldItem )
{
pCurrent->SetColor( PPT_COLSCHEME_A_UND_HYPERLINK );
- if ( pCurrent->mpFieldItem->GetField()->ISA( SvxURLField ) )
+ if ( dynamic_cast< const SvxURLField* >(pCurrent->mpFieldItem->GetField()) != nullptr)
break;
nHyperLenLeft--;
}
@@ -7097,7 +7097,7 @@ PPTTextObj& PPTTextObj::operator=( PPTTextObj& rTextObj )
bool IsLine( const SdrObject* pObj )
{
- return pObj->ISA( SdrPathObj ) &&
+ return dynamic_cast< const SdrPathObj* >(pObj) != nullptr &&
static_cast<const SdrPathObj*>(pObj)->IsLine() &&
static_cast<const SdrPathObj*>(pObj)->GetPointCount() == 2;
}
@@ -7506,7 +7506,7 @@ SdrObject* SdrPowerPointImport::CreateTable( SdrObject* pGroup, sal_uInt32* pTab
{
SdrObject* pRet = pGroup;
sal_uInt32 nRows = pTableArry[ 1 ];
- if ( nRows && pGroup->ISA( SdrObjGroup ) )
+ if ( nRows && dynamic_cast< const SdrObjGroup* >(pGroup) != nullptr )
{
SdrObjList* pSubList(static_cast<SdrObjGroup*>(pGroup)->GetSubList());
if ( pSubList )
diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 5d59ea78c726..32e06b83e791 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -184,7 +184,7 @@ bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter,
if( pOut )
{
- vcl::PDFExtOutDevData* pPDFExtOutDevData = PTR_CAST( vcl::PDFExtOutDevData, pOut->GetExtOutDevData() );
+ vcl::PDFExtOutDevData* pPDFExtOutDevData = dynamic_cast<vcl::PDFExtOutDevData* >( pOut->GetExtOutDevData() );
if ( nPageCount )
{
pPDFExtOutDevData->SetIsExportNotesPages( bExportNotesPages );
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index 6698de7ba654..89b3221affdb 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -183,7 +183,7 @@ namespace frm
AttributeCheckState ParaAlignmentHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
- OSL_ENSURE( _rItem.ISA( SvxAdjustItem ), "ParaAlignmentHandler::implGetCheckState: invalid pool item!" );
+ OSL_ENSURE( dynamic_cast<const SvxAdjustItem*>( &_rItem) != nullptr, "ParaAlignmentHandler::implGetCheckState: invalid pool item!" );
SvxAdjust eAdjust = static_cast< const SvxAdjustItem& >( _rItem ).GetAdjust();
return ( eAdjust == m_eAdjust ) ? eChecked : eUnchecked;
}
@@ -214,7 +214,7 @@ namespace frm
AttributeCheckState LineSpacingHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
- OSL_ENSURE( _rItem.ISA( SvxLineSpacingItem ), "LineSpacingHandler::implGetCheckState: invalid pool item!" );
+ OSL_ENSURE( dynamic_cast<const SvxLineSpacingItem*>( &_rItem) != nullptr, "LineSpacingHandler::implGetCheckState: invalid pool item!" );
sal_uInt16 nLineSpace = static_cast< const SvxLineSpacingItem& >( _rItem ).GetPropLineSpace();
return ( nLineSpace == m_nLineSpace ) ? eChecked : eUnchecked;
}
@@ -252,7 +252,7 @@ namespace frm
AttributeCheckState EscapementHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
- OSL_ENSURE( _rItem.ISA( SvxEscapementItem ), "EscapementHandler::getState: invalid pool item!" );
+ OSL_ENSURE( dynamic_cast<const SvxEscapementItem*>( &_rItem) != nullptr, "EscapementHandler::getState: invalid pool item!" );
SvxEscapement eEscapement = static_cast< const SvxEscapementItem& >( _rItem ).GetEscapement();
return ( eEscapement == m_eEscapement ) ? eChecked : eUnchecked;
}
@@ -320,7 +320,7 @@ namespace frm
AttributeState aState( eIndetermined );
const SfxPoolItem* pItem = _rAttribs.GetItem( getWhich() );
- const SvxFontHeightItem* pFontHeightItem = PTR_CAST( SvxFontHeightItem, pItem );
+ const SvxFontHeightItem* pFontHeightItem = dynamic_cast<const SvxFontHeightItem*>( pItem );
OSL_ENSURE( pFontHeightItem || !pItem, "FontSizeHandler::getState: invalid item!" );
if ( pFontHeightItem )
{
@@ -346,7 +346,7 @@ namespace frm
void FontSizeHandler::executeAttribute( const SfxItemSet& /*_rCurrentAttribs*/, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, SvtScriptType _nForScriptType ) const
{
- const SvxFontHeightItem* pFontHeightItem = PTR_CAST( SvxFontHeightItem, _pAdditionalArg );
+ const SvxFontHeightItem* pFontHeightItem = dynamic_cast<const SvxFontHeightItem*>( _pAdditionalArg );
OSL_ENSURE( pFontHeightItem, "FontSizeHandler::executeAttribute: need a FontHeightItem!" );
if ( pFontHeightItem )
@@ -396,7 +396,7 @@ namespace frm
AttributeCheckState ParagraphDirectionHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
- OSL_ENSURE( _rItem.ISA( SvxFrameDirectionItem ), "ParagraphDirectionHandler::implGetCheckState: invalid pool item!" );
+ OSL_ENSURE( dynamic_cast<const SvxFrameDirectionItem*>( &_rItem) != nullptr, "ParagraphDirectionHandler::implGetCheckState: invalid pool item!" );
SvxFrameDirection eDirection = static_cast< SvxFrameDirection >( static_cast< const SvxFrameDirectionItem& >( _rItem ).GetValue() );
return ( eDirection == m_eParagraphDirection ) ? eChecked : eUnchecked;
}
@@ -425,8 +425,8 @@ namespace frm
AttributeCheckState BooleanHandler::implGetCheckState( const SfxPoolItem& _rItem ) const
{
- OSL_ENSURE( _rItem.ISA( SfxBoolItem ), "BooleanHandler::implGetCheckState: invalid item!" );
- if ( _rItem.ISA( SfxBoolItem ) )
+ OSL_ENSURE( dynamic_cast<const SfxBoolItem*>( &_rItem) != nullptr, "BooleanHandler::implGetCheckState: invalid item!" );
+ if ( dynamic_cast<const SfxBoolItem*>( &_rItem) != nullptr )
return static_cast< const SfxBoolItem& >( _rItem ).GetValue() ? eChecked : eUnchecked;
return eIndetermined;
@@ -435,7 +435,7 @@ namespace frm
void BooleanHandler::executeAttribute( const SfxItemSet& /*_rCurrentAttribs*/, SfxItemSet& _rNewAttribs, const SfxPoolItem* _pAdditionalArg, SvtScriptType /*_nForScriptType*/ ) const
{
- OSL_ENSURE( _pAdditionalArg && _pAdditionalArg->ISA( SfxBoolItem ), "BooleanHandler::executeAttribute: invalid argument!" );
+ OSL_ENSURE( dynamic_cast<const SfxBoolItem*>( _pAdditionalArg) != nullptr, "BooleanHandler::executeAttribute: invalid argument!" );
if ( _pAdditionalArg )
{
SfxPoolItem* pCorrectWich = _pAdditionalArg->Clone();
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 9e719b8c33d4..a5bb7baa547a 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -912,7 +912,7 @@ long ToolbarLayoutManager::childWindowEvent( VclSimpleEvent* pEvent )
// To enable toolbar controllers to change their image when a sub-toolbar function
// is activated, we need this mechanism. We have NO connection between these toolbars
// anymore!
- if ( pEvent && pEvent->ISA( VclWindowEvent ))
+ if ( dynamic_cast< const VclWindowEvent* >(pEvent) != nullptr )
{
if ( pEvent->GetId() == VCLEVENT_TOOLBOX_SELECT )
{
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 2b1c17265da8..42cf2f08b39c 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -428,7 +428,7 @@ bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
if( pAttr )
{
// c
- SvMetaSlot * pKnownSlot = PTR_CAST( SvMetaSlot, pAttr );
+ SvMetaSlot * pKnownSlot = dynamic_cast<SvMetaSlot*>( pAttr );
if( pKnownSlot )
{
SetRef( pKnownSlot );
@@ -453,7 +453,7 @@ bool SvMetaSlot::ReadSvIdl( SvIdlDataBase & rBase, SvTokenStream & rInStm )
if( pAttr2 )
{
// for testing purposes: reference in case of complete definition
- SvMetaSlot * pKnownSlot = PTR_CAST( SvMetaSlot, pAttr2 );
+ SvMetaSlot * pKnownSlot = dynamic_cast<SvMetaSlot*>( pAttr2 );
if( pKnownSlot )
{
SetRef( pKnownSlot );
@@ -555,7 +555,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const OString& rPrefix,
// iron out EnumSlots
SvMetaTypeEnum * pEnum = NULL;
SvMetaType * pBType = GetType()->GetBaseType();
- pEnum = PTR_CAST( SvMetaTypeEnum, pBType );
+ pEnum = dynamic_cast<SvMetaTypeEnum*>( pBType );
if( GetPseudoSlots() && pEnum && pEnum->Count() )
{
// clone the MasterSlot