summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorVarun Dhall <varun.dhall@studentpartner.com>2017-06-02 20:03:25 +0530
committerMichael Stahl <mstahl@redhat.com>2017-06-07 14:50:04 +0200
commit65f98346c2edc983421643a7f5c32313b45934e0 (patch)
treeb15834bfca876a63cedac8542f3a6511d348c0f0 /editeng
parentfec801d6d980f9bd277051ec07b55b8f2845ccc0 (diff)
EditEngine Creating SvXMLImportContext for ODF
Change-Id: I4083658db6068122b423fe5ec7a568fa222b4e80 Reviewed-on: https://gerrit.libreoffice.org/38358 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/xml/xmltxtimp.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index 23fc2bec007f..fd757e86493c 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -103,10 +103,27 @@ public:
const css::uno::Reference< css::uno::XComponentContext >& rContext,
const uno::Reference< XText > & rText );
+ virtual SvXMLImportContext *CreateContext( sal_uInt16 nPrefix,
+ const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) override;
+
private:
const uno::Reference< XText > mxText;
};
+SvXMLImportContext *SvxXMLXTextImportComponent::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference< xml::sax::XAttributeList >& xAttrList )
+{
+ SvXMLImportContext* pContext = nullptr;
+
+ if(XML_NAMESPACE_OFFICE == nPrefix && IsXMLToken( rLocalName, XML_DOCUMENT_CONTENT ) )
+ {
+ pContext = new SvxXMLTextImportContext( *this, nPrefix, rLocalName, xAttrList, mxText );
+ }
+
+ if( nullptr == pContext )
+ pContext = new SvXMLImportContext( *this, nPrefix, rLocalName );
+
+ return pContext;
+}
SvxXMLXTextImportComponent::SvxXMLXTextImportComponent(
const css::uno::Reference< css::uno::XComponentContext >& xContext,