[Libreoffice-commits] core.git: editeng/source

Varun Dhall varun.dhall at studentpartner.com
Wed Jun 7 12:50:25 UTC 2017


 editeng/source/xml/xmltxtimp.cxx |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

New commits:
commit 65f98346c2edc983421643a7f5c32313b45934e0
Author: Varun Dhall <varun.dhall at studentpartner.com>
Date:   Fri Jun 2 20:03:25 2017 +0530

    EditEngine Creating SvXMLImportContext for ODF
    
    Change-Id: I4083658db6068122b423fe5ec7a568fa222b4e80
    Reviewed-on: https://gerrit.libreoffice.org/38358
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

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,


More information about the Libreoffice-commits mailing list