summaryrefslogtreecommitdiff
path: root/editeng
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 /editeng
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>
Diffstat (limited to 'editeng')
-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
8 files changed, 14 insertions, 14 deletions
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;
}
}