summaryrefslogtreecommitdiff
path: root/xmloff/source
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-09-28 11:42:43 +0200
committerOliver Specht <oliver.specht@cib.de>2015-09-29 12:26:20 +0000
commitd3c7c9ea81ee7c617f8cee5b645621088aea215b (patch)
tree116b8534291360181d80a53554c930caf186f15e /xmloff/source
parent2bce2365e7d411c1673e709eb1abc89da9f651dc (diff)
tdf#94559: first step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in avmedia, basctl, basic, cui, dbaccess, vcl,xmloff Change-Id: If4496762e82e896b6fbc362e6626502703c245f5 Reviewed-on: https://gerrit.libreoffice.org/18905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'xmloff/source')
-rw-r--r--xmloff/source/chart/SchXMLAxisContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLChartContext.cxx4
-rw-r--r--xmloff/source/chart/SchXMLLegendContext.cxx2
-rw-r--r--xmloff/source/chart/SchXMLPlotAreaContext.cxx4
-rw-r--r--xmloff/source/core/xmlimp.cxx2
-rw-r--r--xmloff/source/draw/shapeimport.cxx2
-rw-r--r--xmloff/source/draw/ximppage.cxx10
-rw-r--r--xmloff/source/draw/ximpshap.cxx10
-rw-r--r--xmloff/source/draw/ximpstyl.cxx10
-rw-r--r--xmloff/source/forms/elementimport.cxx2
-rw-r--r--xmloff/source/style/XMLFontStylesContext.cxx2
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx12
-rw-r--r--xmloff/source/text/XMLTextFrameHyperlinkContext.cxx6
-rw-r--r--xmloff/source/text/txtimp.cxx18
-rw-r--r--xmloff/source/text/txtparaimphint.hxx24
15 files changed, 56 insertions, 56 deletions
diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx
index 502ef0838965..8377650bf221 100644
--- a/xmloff/source/chart/SchXMLAxisContext.cxx
+++ b/xmloff/source/chart/SchXMLAxisContext.cxx
@@ -227,7 +227,7 @@ void SchXMLAxisContext::CreateGrid( const OUString& sAutoStyleName, bool bIsMajo
const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
- if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ if( pStyle && dynamic_cast<const XMLPropStyleContext*>( pStyle) != nullptr)
const_cast<XMLPropStyleContext*>( static_cast< const XMLPropStyleContext* >( pStyle ))->FillPropertySet( xGridProp );
}
}
@@ -473,7 +473,7 @@ void SchXMLAxisContext::CreateAxis()
const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
SchXMLImportHelper::GetChartFamilyID(), m_aAutoStyleName );
- if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ if( pStyle && dynamic_cast<const XMLPropStyleContext*>( pStyle) != nullptr)
{
// note: SvXMLStyleContext::FillPropertySet is not const
XMLPropStyleContext * pPropStyleContext = const_cast< XMLPropStyleContext * >( dynamic_cast< const XMLPropStyleContext * >( pStyle ));
diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx
index 6902828681dd..b5ddec55667a 100644
--- a/xmloff/source/chart/SchXMLChartContext.cxx
+++ b/xmloff/source/chart/SchXMLChartContext.cxx
@@ -373,7 +373,7 @@ void SchXMLChartContext::StartElement( const uno::Reference< xml::sax::XAttribut
const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
- if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ if( pStyle && dynamic_cast< const XMLPropStyleContext*>(pStyle) != nullptr)
const_cast<XMLPropStyleContext*>( static_cast< const XMLPropStyleContext* >( pStyle ) )->FillPropertySet( xProp );
}
}
@@ -1199,7 +1199,7 @@ void SchXMLTitleContext::StartElement( const uno::Reference< xml::sax::XAttribut
const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
SchXMLImportHelper::GetChartFamilyID(), msAutoStyleName );
- if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ if( pStyle && dynamic_cast< const XMLPropStyleContext*>(pStyle) != nullptr)
const_cast<XMLPropStyleContext*>( static_cast< const XMLPropStyleContext* >( pStyle ) )->FillPropertySet( xProp );
}
}
diff --git a/xmloff/source/chart/SchXMLLegendContext.cxx b/xmloff/source/chart/SchXMLLegendContext.cxx
index 80e829d98d7d..c58048b52a2d 100644
--- a/xmloff/source/chart/SchXMLLegendContext.cxx
+++ b/xmloff/source/chart/SchXMLLegendContext.cxx
@@ -206,7 +206,7 @@ void SchXMLLegendContext::StartElement( const uno::Reference< xml::sax::XAttribu
const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
- if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ if( pStyle && dynamic_cast< const XMLPropStyleContext*>(pStyle) != nullptr)
const_cast<XMLPropStyleContext*>( static_cast<const XMLPropStyleContext*>( pStyle ) )->FillPropertySet( xLegendProps );
}
}
diff --git a/xmloff/source/chart/SchXMLPlotAreaContext.cxx b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
index 06e8771172d9..58a5644294e6 100644
--- a/xmloff/source/chart/SchXMLPlotAreaContext.cxx
+++ b/xmloff/source/chart/SchXMLPlotAreaContext.cxx
@@ -840,7 +840,7 @@ void SchXMLWallFloorContext::StartElement( const uno::Reference< xml::sax::XAttr
const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
- if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ if( pStyle && dynamic_cast< const XMLPropStyleContext*>(pStyle) != nullptr)
const_cast<XMLPropStyleContext*>( static_cast<const XMLPropStyleContext*>( pStyle ) )->FillPropertySet( xProp );
}
}
@@ -910,7 +910,7 @@ void SchXMLStockContext::StartElement( const uno::Reference< xml::sax::XAttribut
const SvXMLStyleContext* pStyle = pStylesCtxt->FindStyleChildContext(
SchXMLImportHelper::GetChartFamilyID(), sAutoStyleName );
- if( pStyle && pStyle->ISA( XMLPropStyleContext ))
+ if( pStyle && dynamic_cast< const XMLPropStyleContext*>(pStyle) != nullptr)
const_cast<XMLPropStyleContext*>( static_cast<const XMLPropStyleContext*>( pStyle ) )->FillPropertySet( xProp );
}
}
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 7a56898e6d61..dd74df96989a 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -708,7 +708,7 @@ void SAL_CALL SvXMLImport::startElement( const OUString& rName,
{
pContext = CreateContext( nPrefix, aLocalName, xAttrList );
if( (nPrefix & XML_NAMESPACE_UNKNOWN_FLAG) != 0 &&
- IS_TYPE( SvXMLImportContext, pContext ) )
+ dynamic_cast< const SvXMLImportContext*>(pContext ) != nullptr )
{
OUString aMsg( "Root element unknown" );
Reference<xml::sax::XLocator> xDummyLocator;
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index 52fb0824ad5a..28708168342d 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -702,7 +702,7 @@ SvXMLImportContext *XMLShapeImportHelper::CreateFrameChildContext(
{
SvXMLImportContext * pContext = NULL;
- SdXMLFrameShapeContext *pFrameContext = PTR_CAST( SdXMLFrameShapeContext, pThisContext );
+ SdXMLFrameShapeContext *pFrameContext = dynamic_cast<SdXMLFrameShapeContext*>( pThisContext );
if( pFrameContext )
pContext = pFrameContext->CreateChildContext( nPrefix, rLocalName, xAttrList );
diff --git a/xmloff/source/draw/ximppage.cxx b/xmloff/source/draw/ximppage.cxx
index 25f7e66eef2c..046e0164d172 100644
--- a/xmloff/source/draw/ximppage.cxx
+++ b/xmloff/source/draw/ximppage.cxx
@@ -355,7 +355,7 @@ void SdXMLGenericPageContext::SetStyle( OUString& rStyleName )
{
const SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetAutoStylesContext();
- if( pContext && pContext->ISA( SvXMLStyleContext ) )
+ if( pContext && dynamic_cast<const SdXMLStylesContext *>( pContext) != nullptr)
{
const SdXMLStylesContext* pStyles = static_cast<const SdXMLStylesContext*>(pContext);
if(pStyles)
@@ -363,7 +363,7 @@ void SdXMLGenericPageContext::SetStyle( OUString& rStyleName )
const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext(
XML_STYLE_FAMILY_SD_DRAWINGPAGE_ID, rStyleName);
- if(pStyle && pStyle->ISA(XMLPropStyleContext))
+ if(pStyle && dynamic_cast<const XMLPropStyleContext*>(pStyle))
{
const XMLPropStyleContext* pPropStyle = static_cast<const XMLPropStyleContext*>(pStyle);
@@ -420,14 +420,14 @@ void SdXMLGenericPageContext::SetLayout()
const SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
- if( pContext && pContext->ISA( SvXMLStyleContext ) )
+ if( pContext && dynamic_cast<const SdXMLStylesContext *>( pContext ) != nullptr)
{
const SdXMLStylesContext* pStyles = static_cast<const SdXMLStylesContext*>(pContext);
if(pStyles)
{
const SvXMLStyleContext* pStyle = pStyles->FindStyleChildContext( XML_STYLE_FAMILY_SD_PRESENTATIONPAGELAYOUT_ID, maPageLayoutName);
- if(pStyle && pStyle->ISA(SdXMLPresentationPageLayoutContext))
+ if(pStyle && dynamic_cast<const SdXMLPresentationPageLayoutContext*>( pStyle) != nullptr)
{
const SdXMLPresentationPageLayoutContext* pLayout = static_cast<const SdXMLPresentationPageLayoutContext*>(pStyle);
nType = pLayout->GetTypeId();
@@ -489,7 +489,7 @@ void SdXMLGenericPageContext::SetPageMaster( OUString& rsPageMasterName )
const SvXMLStyleContext* pStyle = pAutoStyles ? pAutoStyles->FindStyleChildContext(XML_STYLE_FAMILY_SD_PAGEMASTERCONEXT_ID, rsPageMasterName) : NULL;
- if(pStyle && pStyle->ISA(SdXMLPageMasterContext))
+ if(pStyle && dynamic_cast<const SdXMLPageMasterContext*>(pStyle) != nullptr)
{
const SdXMLPageMasterContext* pPageMaster = static_cast<const SdXMLPageMasterContext*>(pStyle);
const SdXMLPageMasterStyleContext* pPageMasterContext = pPageMaster->GetPageMasterStyle();
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index df01ab67436f..3a05256e5c90 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -630,9 +630,9 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
OUString aStyleName = maDrawStyleName;
uno::Reference< style::XStyle > xStyle;
- if( pStyle && pStyle->ISA(XMLShapeStyleContext) )
+ if( pStyle && dynamic_cast<const XMLShapeStyleContext*>( pStyle ) != nullptr)
{
- pDocStyle = const_cast<XMLShapeStyleContext*>(PTR_CAST( XMLShapeStyleContext, pStyle ));
+ pDocStyle = const_cast<XMLShapeStyleContext*>(dynamic_cast<const XMLShapeStyleContext*>( pStyle ) );
if( pDocStyle->GetStyle().is() )
{
@@ -733,7 +733,7 @@ void SdXMLShapeContext::SetStyle( bool bSupportsStyle /* = true */)
break;
const SvXMLStyleContext* pTempStyle = GetImport().GetShapeImport()->GetAutoStylesContext()->FindStyleChildContext(XML_STYLE_FAMILY_TEXT_PARAGRAPH, maTextStyleName);
- XMLPropStyleContext* pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST( XMLPropStyleContext, pTempStyle )); // use temp var, PTR_CAST is a bad macro, FindStyleChildContext will be called twice
+ XMLPropStyleContext* pStyle = const_cast<XMLPropStyleContext*>(dynamic_cast<const XMLPropStyleContext*>( pTempStyle ) ); // use temp var, PTR_CAST is a bad macro, FindStyleChildContext will be called twice
if( pStyle == NULL )
break;
@@ -3589,7 +3589,7 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref
// read replacement image
SvXMLImportContext *pImplContext = &mxImplContext;
SdXMLShapeContext *pSContext =
- PTR_CAST( SdXMLShapeContext, pImplContext );
+ dynamic_cast<SdXMLShapeContext*>( pImplContext );
if( pSContext )
{
uno::Reference < beans::XPropertySet > xPropSet(
@@ -3610,7 +3610,7 @@ SvXMLImportContext *SdXMLFrameShapeContext::CreateChildContext( sal_uInt16 nPref
IsXMLToken( rLocalName, XML_THUMBNAIL ) ) ) )
{
SvXMLImportContext *pImplContext = &mxImplContext;
- pContext = PTR_CAST( SdXMLShapeContext, pImplContext )->CreateChildContext( nPrefix,
+ pContext = dynamic_cast<SdXMLShapeContext*>( pImplContext )->CreateChildContext( nPrefix,
rLocalName, xAttrList );
}
else if ( (XML_NAMESPACE_DRAW == nPrefix) && IsXMLToken( rLocalName, XML_IMAGE_MAP ) )
diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx
index a490221f8010..ab875673d182 100644
--- a/xmloff/source/draw/ximpstyl.cxx
+++ b/xmloff/source/draw/ximpstyl.cxx
@@ -224,7 +224,7 @@ void SdXMLDrawingPageStyleContext::Finish( bool bOverwrite )
sal_Int32 nStyle = 0;
const SdXMLNumberFormatImportContext* pSdNumStyle =
- PTR_CAST( SdXMLNumberFormatImportContext,
+ dynamic_cast< const SdXMLNumberFormatImportContext*> (
GetStyles()->FindStyleChildContext( XML_STYLE_FAMILY_DATA_STYLE, sStyleName, true ) );
if( pSdNumStyle )
@@ -879,7 +879,7 @@ void SdXMLMasterPageContext::EndElement()
if(!msName.isEmpty() && GetSdImport().GetShapeImport()->GetStylesContext())
{
SvXMLImportContext* pContext = GetSdImport().GetShapeImport()->GetStylesContext();
- if( pContext && pContext->ISA( SvXMLStyleContext ) )
+ if( dynamic_cast<const SdXMLStylesContext*>(pContext) != nullptr )
static_cast<SdXMLStylesContext*>(pContext)->SetMasterPageStyles(*this);
}
@@ -1150,7 +1150,7 @@ void SdXMLStylesContext::EndElement()
for(sal_uInt32 a(0L); a < GetStyleCount(); a++)
{
const SvXMLStyleContext* pStyle = GetStyle(a);
- if(pStyle && pStyle->ISA(XMLShapeStyleContext))
+ if(pStyle && dynamic_cast<const XMLShapeStyleContext*>(pStyle) != nullptr)
{
const XMLShapeStyleContext* pDocStyle = static_cast<const XMLShapeStyleContext*>(pStyle);
@@ -1159,7 +1159,7 @@ void SdXMLStylesContext::EndElement()
{
pStyle = pStylesContext->FindStyleChildContext(pStyle->GetFamily(), pStyle->GetParentName());
- if(pStyle && pStyle->ISA(XMLShapeStyleContext))
+ if(pStyle && dynamic_cast<const XMLShapeStyleContext*>(pStyle) != nullptr)
{
const XMLShapeStyleContext* pParentStyle = static_cast<const XMLShapeStyleContext*>(pStyle);
if(pParentStyle->GetStyle().is())
@@ -1458,7 +1458,7 @@ uno::Reference< container::XNameAccess > SdXMLStylesContext::getPageLayouts() co
for(sal_uInt32 a(0L); a < GetStyleCount(); a++)
{
const SvXMLStyleContext* pStyle = GetStyle(a);
- if(pStyle && pStyle->ISA(SdXMLPresentationPageLayoutContext))
+ if(pStyle && dynamic_cast<const SdXMLPresentationPageLayoutContext*>(pStyle) != nullptr)
{
xLayouts->insertByName( pStyle->GetName(), uno::makeAny(
(sal_Int32)static_cast<const SdXMLPresentationPageLayoutContext*>(pStyle)->GetTypeId() ) );
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 859f1d0c9d13..dc4f424aab13 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -598,7 +598,7 @@ namespace xmloff
const SvXMLStyleContext* pStyleContext = m_rContext.getStyleElement( _rValue );
OSL_ENSURE( pStyleContext, "OElementImport::handleAttribute: do not know the style!" );
// remember the element for later usage.
- m_pStyleElement = PTR_CAST( XMLTextStyleContext, pStyleContext );
+ m_pStyleElement = dynamic_cast<const XMLTextStyleContext*>( pStyleContext );
return true;
}
diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx
index 0efac45022cc..a4ed61ae25ca 100644
--- a/xmloff/source/style/XMLFontStylesContext.cxx
+++ b/xmloff/source/style/XMLFontStylesContext.cxx
@@ -404,7 +404,7 @@ bool XMLFontStylesContext::FillProperties( const OUString& rName,
sal_Int32 nCharsetIdx ) const
{
const SvXMLStyleContext* pStyle = FindStyleChildContext( XML_STYLE_FAMILY_FONT, rName, true );
- const XMLFontStyleContextFontFace *pFontStyle = PTR_CAST( XMLFontStyleContextFontFace,pStyle);// use temp var, PTR_CAST is a bad macro, FindStyleChildContext will be called twice
+ const XMLFontStyleContextFontFace *pFontStyle = dynamic_cast<const XMLFontStyleContextFontFace*>(pStyle);// use temp var, PTR_CAST is a bad macro, FindStyleChildContext will be called twice
if( pFontStyle )
pFontStyle->FillProperties( rProps, nFamilyNameIdx, nStyleNameIdx,
nFamilyIdx, nPitchIdx, nCharsetIdx );
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index d318b3292773..4368407e05a0 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1362,7 +1362,7 @@ bool XMLTextFrameContext::CreateIfNotThere( ::com::sun::star::uno::Reference <
::com::sun::star::beans::XPropertySet >& rPropSet )
{
SvXMLImportContext *pContext = &m_xImplContext;
- XMLTextFrameContext_Impl *pImpl = PTR_CAST( XMLTextFrameContext_Impl, pContext );
+ XMLTextFrameContext_Impl *pImpl = dynamic_cast< XMLTextFrameContext_Impl*>( pContext );
if( pImpl )
{
if( pImpl->CreateIfNotThere() )
@@ -1442,7 +1442,7 @@ void XMLTextFrameContext::EndElement()
SvXMLImportContext const*const pContext =
(pMultiContext) ? &pMultiContext : &m_xImplContext;
- XMLTextFrameContext_Impl *pImpl = const_cast<XMLTextFrameContext_Impl*>(PTR_CAST( XMLTextFrameContext_Impl, pContext ));
+ XMLTextFrameContext_Impl *pImpl = const_cast<XMLTextFrameContext_Impl*>(dynamic_cast< const XMLTextFrameContext_Impl*>( pContext ));
assert(!pMultiContext || pImpl);
if( pImpl )
{
@@ -1593,7 +1593,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
m_xReplImplContext = pContext;
}
}
- else if( m_xImplContext->ISA( XMLTextFrameContext_Impl ) )
+ else if( 0 != dynamic_cast< const XMLTextFrameContext_Impl*>( m_xImplContext.get() ))
{
// the child is a writer frame
if( XML_NAMESPACE_SVG == p_nPrefix )
@@ -1698,7 +1698,7 @@ void XMLTextFrameContext::SetHyperlink( const OUString& rHRef,
TextContentAnchorType XMLTextFrameContext::GetAnchorType() const
{
SvXMLImportContext *pContext = &m_xImplContext;
- XMLTextFrameContext_Impl *pImpl = PTR_CAST( XMLTextFrameContext_Impl, pContext );
+ XMLTextFrameContext_Impl *pImpl = dynamic_cast< XMLTextFrameContext_Impl*>( pContext );
if( pImpl )
return pImpl->GetAnchorType();
else
@@ -1709,7 +1709,7 @@ Reference < XTextContent > XMLTextFrameContext::GetTextContent() const
{
Reference < XTextContent > xTxtCntnt;
SvXMLImportContext *pContext = &m_xImplContext;
- XMLTextFrameContext_Impl *pImpl = PTR_CAST( XMLTextFrameContext_Impl, pContext );
+ XMLTextFrameContext_Impl *pImpl = dynamic_cast< XMLTextFrameContext_Impl* >( pContext );
if( pImpl )
xTxtCntnt.set( pImpl->GetPropSet(), UNO_QUERY );
@@ -1720,7 +1720,7 @@ Reference < XShape > XMLTextFrameContext::GetShape() const
{
Reference < XShape > xShape;
SvXMLImportContext* pContext = &m_xImplContext;
- SvXMLShapeContext* pImpl = PTR_CAST( SvXMLShapeContext, pContext );
+ SvXMLShapeContext* pImpl = dynamic_cast<SvXMLShapeContext*>( pContext );
if ( pImpl )
{
xShape = pImpl->getShape();
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
index 1e76bd351ec4..fa346909fb32 100644
--- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
+++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
@@ -138,7 +138,7 @@ TextContentAnchorType XMLTextFrameHyperlinkContext::GetAnchorType() const
if( xFrameContext.Is() )
{
SvXMLImportContext *pContext = &xFrameContext;
- return PTR_CAST( XMLTextFrameContext, pContext ) ->GetAnchorType();
+ return dynamic_cast<XMLTextFrameContext*>( pContext ) ->GetAnchorType( );
}
else
return eDefaultAnchorType;
@@ -151,7 +151,7 @@ Reference < XTextContent > XMLTextFrameHyperlinkContext::GetTextContent() const
if( xFrameContext.Is() )
{
SvXMLImportContext *pContext = &xFrameContext;
- xTxt = PTR_CAST( XMLTextFrameContext, pContext )->GetTextContent();
+ xTxt = dynamic_cast<XMLTextFrameContext*>( pContext )->GetTextContent( );
}
return xTxt;
@@ -164,7 +164,7 @@ Reference < drawing::XShape > XMLTextFrameHyperlinkContext::GetShape() const
if( xFrameContext.Is() )
{
SvXMLImportContext *pContext = &xFrameContext;
- xShape = PTR_CAST( XMLTextFrameContext, pContext )->GetShape();
+ xShape = dynamic_cast<XMLTextFrameContext*>( pContext )->GetShape( );
}
return xShape;
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 061c2be52221..0e014cc396f9 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1212,7 +1212,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars,
static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
FindStyleChildContext( nFamily, rStyleName,
true );
- pStyle = const_cast<XMLTextStyleContext*>(PTR_CAST( XMLTextStyleContext,pTempStyle));
+ pStyle = const_cast<XMLTextStyleContext*>( dynamic_cast< const XMLTextStyleContext* >(pTempStyle));
}
if( pStyle )
@@ -1421,7 +1421,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
const SvXMLStyleContext* pTempStyle =
static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
FindStyleChildContext( nFamily, sStyleName, true );
- pStyle = const_cast<XMLTextStyleContext*>(PTR_CAST( XMLTextStyleContext,pTempStyle));
+ pStyle = const_cast<XMLTextStyleContext*>(dynamic_cast< const XMLTextStyleContext* >(pTempStyle));
}
if( pStyle )
sStyleName = pStyle->GetParentName();
@@ -2108,7 +2108,7 @@ void XMLTextImportHelper::SetRuby(
static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_TEXT_RUBY,
rStyleName, true );
- XMLPropStyleContext *pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST(XMLPropStyleContext,pTempStyle));
+ XMLPropStyleContext *pStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* >(pTempStyle));
if (NULL != pStyle)
pStyle->FillPropertySet( xPropSet );
@@ -2349,14 +2349,14 @@ sal_Int32 XMLTextImportHelper::GetDataStyleKey(const OUString& sStyleName,
// first check if it's a impress and draw only number format
// this is needed since its also a SvXMLNumFormatContext,
// that was needed to support them for controls in impress/draw also
- const SdXMLNumberFormatImportContext* pSdNumStyle = PTR_CAST( SdXMLNumberFormatImportContext, pStyle );
+ const SdXMLNumberFormatImportContext* pSdNumStyle = dynamic_cast<const SdXMLNumberFormatImportContext*>( pStyle );
if( pSdNumStyle )
{
return pSdNumStyle->GetDrawKey();
}
else
{
- SvXMLNumFormatContext* pNumStyle = const_cast<SvXMLNumFormatContext*>(PTR_CAST( SvXMLNumFormatContext, pStyle ));
+ SvXMLNumFormatContext* pNumStyle = const_cast<SvXMLNumFormatContext*>(dynamic_cast<const SvXMLNumFormatContext*>( pStyle ) );
if( pNumStyle )
{
if( pIsSystemLanguage != NULL )
@@ -2378,7 +2378,7 @@ const SvxXMLListStyleContext *XMLTextImportHelper::FindAutoListStyle( const OUSt
static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_TEXT_LIST, rName,
true );
- pStyle = PTR_CAST( SvxXMLListStyleContext ,pTempStyle);
+ pStyle = dynamic_cast< const SvxXMLListStyleContext* >(pTempStyle);
}
return pStyle;
@@ -2393,7 +2393,7 @@ XMLPropStyleContext *XMLTextImportHelper::FindAutoFrameStyle( const OUString& rN
static_cast<SvXMLStylesContext *>(&m_xImpl->m_xAutoStyles)->
FindStyleChildContext( XML_STYLE_FAMILY_SD_GRAPHICS_ID, rName,
true );
- pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST( XMLPropStyleContext ,pTempStyle));
+ pStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* >(pTempStyle));
}
return pStyle;
@@ -2410,7 +2410,7 @@ XMLPropStyleContext* XMLTextImportHelper::FindSectionStyle(
FindStyleChildContext(
XML_STYLE_FAMILY_TEXT_SECTION,
rName, true );
- pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST( XMLPropStyleContext,pTempStyle));
+ pStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* >(pTempStyle));
}
return pStyle;
@@ -2427,7 +2427,7 @@ XMLPropStyleContext* XMLTextImportHelper::FindPageMaster(
FindStyleChildContext(
XML_STYLE_FAMILY_PAGE_MASTER,
rName, true );
- pStyle = const_cast<XMLPropStyleContext*>(PTR_CAST( XMLPropStyleContext,pTempStyle));
+ pStyle = const_cast<XMLPropStyleContext*>(dynamic_cast< const XMLPropStyleContext* >(pTempStyle));
}
return pStyle;
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx
index 5b28d9966d08..a46ad8bbc96f 100644
--- a/xmloff/source/text/txtparaimphint.hxx
+++ b/xmloff/source/text/txtparaimphint.hxx
@@ -205,10 +205,10 @@ public:
{
css::uno::Reference < css::text::XTextContent > xTxt;
SvXMLImportContext *pContext = &xContext;
- if( pContext->ISA( XMLTextFrameContext ) )
- xTxt = PTR_CAST( XMLTextFrameContext, pContext )->GetTextContent();
- else if( pContext->ISA( XMLTextFrameHyperlinkContext ) )
- xTxt = PTR_CAST( XMLTextFrameHyperlinkContext, pContext )
+ if( 0 != dynamic_cast<const XMLTextFrameContext*>(pContext) )
+ xTxt = dynamic_cast< XMLTextFrameContext*>( pContext )->GetTextContent();
+ else if( 0 != dynamic_cast<const XMLTextFrameHyperlinkContext*>(pContext) )
+ xTxt = dynamic_cast< XMLTextFrameHyperlinkContext* >( pContext )
->GetTextContent();
return xTxt;
@@ -219,10 +219,10 @@ public:
{
css::uno::Reference < css::drawing::XShape > xShape;
SvXMLImportContext *pContext = &xContext;
- if( pContext->ISA( XMLTextFrameContext ) )
- xShape = PTR_CAST( XMLTextFrameContext, pContext )->GetShape();
- else if( pContext->ISA( XMLTextFrameHyperlinkContext ) )
- xShape = PTR_CAST( XMLTextFrameHyperlinkContext, pContext )->GetShape();
+ if( 0 != dynamic_cast<const XMLTextFrameContext*>(pContext) )
+ xShape = dynamic_cast< XMLTextFrameContext*>( pContext )->GetShape();
+ else if( 0 != dynamic_cast<const XMLTextFrameHyperlinkContext*>(pContext) )
+ xShape = dynamic_cast<XMLTextFrameHyperlinkContext*>( pContext )->GetShape();
return xShape;
}
@@ -231,13 +231,13 @@ public:
{
bool bRet = false;
SvXMLImportContext *pContext = &xContext;
- if( pContext->ISA( XMLTextFrameContext ) )
+ if( 0 != dynamic_cast<const XMLTextFrameContext*>(pContext) )
bRet = css::text::TextContentAnchorType_AT_CHARACTER ==
- PTR_CAST( XMLTextFrameContext, pContext )
+ dynamic_cast<const XMLTextFrameContext*>( pContext )
->GetAnchorType();
- else if( pContext->ISA( XMLTextFrameHyperlinkContext ) )
+ else if( 0 != dynamic_cast<const XMLTextFrameHyperlinkContext*>( pContext) )
bRet = css::text::TextContentAnchorType_AT_CHARACTER ==
- PTR_CAST( XMLTextFrameHyperlinkContext, pContext )
+ dynamic_cast<const XMLTextFrameHyperlinkContext*>( pContext )
->GetAnchorType();
return bRet;
}