diff options
-rw-r--r-- | xmloff/inc/XMLEmbeddedObjectImportContext.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/core/XMLEmbeddedObjectImportContext.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/transform/FormPropOOoTContext.cxx | 6 | ||||
-rw-r--r-- | xmloff/source/transform/FormPropOOoTContext.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/transform/MergeElemTContext.cxx | 3 | ||||
-rw-r--r-- | xmloff/source/transform/MergeElemTContext.hxx | 3 | ||||
-rw-r--r-- | xmloff/source/transform/StyleOASISTContext.cxx | 17 |
7 files changed, 12 insertions, 24 deletions
diff --git a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx index ca1ea2ac4dcb..557f61e5b664 100644 --- a/xmloff/inc/XMLEmbeddedObjectImportContext.hxx +++ b/xmloff/inc/XMLEmbeddedObjectImportContext.hxx @@ -26,7 +26,7 @@ namespace com::sun::star::lang { class XComponent; } class XMLEmbeddedObjectImportContext final : public SvXMLImportContext { - css::uno::Reference<css::xml::sax::XFastDocumentHandler > mxFastHandler; + rtl::Reference<SvXMLImport> mxFastHandler; css::uno::Reference<css::lang::XComponent > xComp; OUString sFilterService; diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index 25b0522ab28f..126ef93d2428 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -131,8 +131,7 @@ void XMLEmbeddedObjectImportContext::SetComponent( Reference< XComponent > const { } - Reference < XImporter > xImporter( mxFastHandler, UNO_QUERY ); - xImporter->setTargetDocument( rComp ); + mxFastHandler->setTargetDocument( rComp ); xComp = rComp; // keep ref to component only if there is a handler diff --git a/xmloff/source/transform/FormPropOOoTContext.cxx b/xmloff/source/transform/FormPropOOoTContext.cxx index 1f5c6086dbfa..5a2ea3ba983a 100644 --- a/xmloff/source/transform/FormPropOOoTContext.cxx +++ b/xmloff/source/transform/FormPropOOoTContext.cxx @@ -231,15 +231,13 @@ void XMLFormPropOOoTransformerContext::EndElement() OUString aAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OFFICE, GetXMLToken(m_eValueToken) ) ); - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ) - ->AddAttribute( aAttrQName, m_xValueContext->GetTextContent() ); + m_xAttrList->AddAttribute( aAttrQName, m_xValueContext->GetTextContent() ); } } if( m_nValueTypeAttr != -1 && m_eValueTypeToken != XML_TOKEN_END ) { - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ) - ->SetValueByIndex( m_nValueTypeAttr , + m_xAttrList->SetValueByIndex( m_nValueTypeAttr , GetXMLToken( m_eValueTypeToken ) ); } diff --git a/xmloff/source/transform/FormPropOOoTContext.hxx b/xmloff/source/transform/FormPropOOoTContext.hxx index ca0df6bdc74d..64a35c06c3fe 100644 --- a/xmloff/source/transform/FormPropOOoTContext.hxx +++ b/xmloff/source/transform/FormPropOOoTContext.hxx @@ -26,7 +26,7 @@ class XMLFormPropValueTContext_Impl; class XMLFormPropOOoTransformerContext : public XMLTransformerContext { - css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList; + rtl::Reference< XMLMutableAttributeList > m_xAttrList; ::rtl::Reference< XMLFormPropValueTContext_Impl > m_xValueContext; diff --git a/xmloff/source/transform/MergeElemTContext.cxx b/xmloff/source/transform/MergeElemTContext.cxx index e853240f9e24..8f32ac922531 100644 --- a/xmloff/source/transform/MergeElemTContext.cxx +++ b/xmloff/source/transform/MergeElemTContext.cxx @@ -103,8 +103,7 @@ void XMLMergeElemTransformerContext::ExportStartElement() for( const auto& rChildContext : m_aChildContexts ) { XMLPersTextContentTContext *pContext = rChildContext.get(); - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ) - ->AddAttribute( pContext->GetExportQName(), + m_xAttrList->AddAttribute( pContext->GetExportQName(), pContext->GetTextContent() ); } XMLTransformerContext::StartElement( m_xAttrList ); diff --git a/xmloff/source/transform/MergeElemTContext.hxx b/xmloff/source/transform/MergeElemTContext.hxx index 9e6cc6f97bcb..486838112061 100644 --- a/xmloff/source/transform/MergeElemTContext.hxx +++ b/xmloff/source/transform/MergeElemTContext.hxx @@ -21,6 +21,7 @@ #include <rtl/ref.hxx> #include "FlatTContext.hxx" +#include "MutableAttrList.hxx" #include <vector> typedef ::std::vector< ::rtl::Reference< XMLPersTextContentTContext> > @@ -28,7 +29,7 @@ typedef ::std::vector< ::rtl::Reference< XMLPersTextContentTContext> > class XMLMergeElemTransformerContext : public XMLTransformerContext { - css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList; + rtl::Reference< XMLMutableAttributeList > m_xAttrList; XMLPersTextContentTContextVector m_aChildContexts; sal_uInt16 const m_nActionMap; bool m_bStartElementExported; diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx index fadc188bf8bc..75e99d205d39 100644 --- a/xmloff/source/transform/StyleOASISTContext.cxx +++ b/xmloff/source/transform/StyleOASISTContext.cxx @@ -58,7 +58,7 @@ const sal_uInt16 aAttrActionMaps[XML_PROP_TYPE_END] = class XMLPropertiesTContext_Impl : public XMLPersElemContentTContext { - css::uno::Reference< css::xml::sax::XAttributeList > m_xAttrList; + rtl::Reference< XMLMutableAttributeList > m_xAttrList; XMLPropType m_ePropType; bool const m_bControlStyle; @@ -113,17 +113,9 @@ void XMLPropertiesTContext_Impl::StartElement( if( pActions ) { - rtl::Reference<XMLMutableAttributeList> pAttrList; if( !m_xAttrList.is() ) - { - pAttrList = new XMLMutableAttributeList(); - m_xAttrList = pAttrList; - } - else - { - pAttrList = - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ); - } + m_xAttrList = new XMLMutableAttributeList(); + rtl::Reference<XMLMutableAttributeList> pAttrList = m_xAttrList; XMLTokenEnum eUnderline = XML_TOKEN_END; bool bBoldUnderline = false, bDoubleUnderline = false; @@ -583,8 +575,7 @@ void XMLPropertiesTContext_Impl::StartElement( } else { - static_cast< XMLMutableAttributeList * >( m_xAttrList.get() ) - ->AppendAttributeList( rAttrList ); + m_xAttrList->AppendAttributeList( rAttrList ); } } } |