chart2/source/controller/main/ChartController_TextEdit.cxx | 2 chart2/source/controller/main/ChartController_Window.cxx | 2 chart2/source/controller/main/DrawCommandDispatch.cxx | 8 +- chart2/source/controller/main/SelectionHelper.cxx | 4 - chart2/source/view/diagram/VDiagram.cxx | 2 connectivity/source/drivers/dbase/DIndexIter.cxx | 2 connectivity/source/drivers/file/FNoException.cxx | 2 connectivity/source/drivers/file/fanalyzer.cxx | 2 connectivity/source/drivers/file/fcode.cxx | 27 ++++---- connectivity/source/drivers/file/fcomp.cxx | 8 +- editeng/source/accessibility/AccessibleEditableTextPara.cxx | 6 - editeng/source/editeng/editview.cxx | 2 editeng/source/editeng/impedit2.cxx | 2 editeng/source/editeng/impedit3.cxx | 8 +- editeng/source/editeng/impedit5.cxx | 4 - editeng/source/items/bulitem.cxx | 2 editeng/source/items/xmlcnitm.cxx | 2 editeng/source/outliner/outlvw.cxx | 2 extensions/source/propctrlr/standardcontrol.cxx | 2 filter/source/msfilter/escherex.cxx | 8 +- filter/source/msfilter/msdffimp.cxx | 4 - filter/source/msfilter/svdfppt.cxx | 38 ++++++------ filter/source/pdf/pdfexport.cxx | 2 forms/source/richtext/rtattributehandler.cxx | 18 ++--- framework/source/layoutmanager/toolbarlayoutmanager.cxx | 2 idl/source/objects/slot.cxx | 6 - 26 files changed, 84 insertions(+), 83 deletions(-)
New commits: commit ac9671f94800b647f82b12e718968311a025e87e Author: Oliver Specht <oliver.spe...@cib.de> Date: Tue Sep 29 11:00:09 2015 +0200 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 <c...@libreoffice.org> Reviewed-by: Oliver Specht <oliver.spe...@cib.de> diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index cfa9f04..647471d 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 ea7fd10..2089aa1 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 ac0f1fd..e0d9bd28 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 19fc3f3..9793dcc 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 10b14fe..f15508e 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 edc3c99..1e7d374 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 ad2b150..b5b436e 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 16ec78a..1f1f4f8 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 95eeffd..20ff3a0 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 b901ff5..51cd196 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 20436ec..7b3a2cd 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 57ec994..e2b45f8 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 264ad00..ced3288 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 540b8e7..d31d12e 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 650ecb5..b9773ef 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 e99cb02..3207391 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 5c7caa6..7f595d6 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 966efed..e2399dd 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 3018c48..e40ee8a 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 2592364..642ef29 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 e334400..15f3225 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 5c1cecd..23d0cb4 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 5d59ea7..32e06b8 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 6698de7..89b3221 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 9e719b8..a5bb7ba 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 2b1c172..42cf2f0 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits