summaryrefslogtreecommitdiff
path: root/xmloff/source/text
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/text
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/text')
-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
4 files changed, 30 insertions, 30 deletions
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;
}