summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMohammed Abdul Azeem <azeemmysore@gmail.com>2017-10-01 14:11:11 +0530
committerMichael Meeks <michael.meeks@collabora.com>2018-03-14 14:12:08 +0100
commitbf46b46a1d734348096936284fb8a76e977936d0 (patch)
treea76c30897cf1e49491bf26580c823701b6d74778 /include
parent1b61d0417bf46896ef1f1bd1e1a8209588fc157a (diff)
Moving XSAXDocumentBuilder2 to use XFastDocumentHandler:
This is used in parsing of meta Contexts across different modules. This also involved moving to XFastParser for parsing xml filters in sw, sd, starmath. Change-Id: Ic663aaac6cb20ee8ce5b97cae87c93220f5a2929 Reviewed-on: https://gerrit.libreoffice.org/42989 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include')
-rw-r--r--include/xmloff/xmlimp.hxx5
-rw-r--r--include/xmloff/xmlmetai.hxx16
2 files changed, 12 insertions, 9 deletions
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 364411681aa8..77b620a3f1df 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -55,6 +55,8 @@
#include <xmloff/formlayerimport.hxx>
#include <comphelper/attributelist.hxx>
#include <sax/fastattribs.hxx>
+#include <rtl/ustring.hxx>
+#include <unordered_map>
#include <com/sun/star/beans/NamedValue.hpp>
@@ -225,6 +227,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public cppu::WeakImplHelper<
css::uno::Reference< css::xml::sax::XFastDocumentHandler > mxFastDocumentHandler;
static css::uno::Reference< css::xml::sax::XFastTokenHandler > xTokenHandler;
static std::unordered_map< sal_Int32, std::pair< OUString, OUString > > aNamespaceMap;
+ static std::unordered_map< OUString, OUString, OUStringHash > aNamespaceURIPrefixMap;
static bool bIsNSMapsInitialized;
static void initializeNamespaceMaps();
@@ -378,6 +381,8 @@ public:
static const OUString getNameFromToken( sal_Int32 nToken );
static const OUString getNamespacePrefixFromToken( sal_Int32 nToken );
+ static const OUString getNamespaceURIFromToken( sal_Int32 nToken );
+ static const OUString getNamespacePrefixFromURI( const OUString& rURI );
SvXMLNamespaceMap& GetNamespaceMap() { return *mpNamespaceMap; }
const SvXMLNamespaceMap& GetNamespaceMap() const { return *mpNamespaceMap; }
diff --git a/include/xmloff/xmlmetai.hxx b/include/xmloff/xmlmetai.hxx
index 2b9160251bc0..9b9f59da7f10 100644
--- a/include/xmloff/xmlmetai.hxx
+++ b/include/xmloff/xmlmetai.hxx
@@ -40,22 +40,20 @@ private:
css::uno::Reference< css::xml::dom::XSAXDocumentBuilder2> mxDocBuilder;
public:
- SvXMLMetaDocumentContext(SvXMLImport& rImport, sal_uInt16 nPrfx,
- const OUString& rLName,
- const css::uno::Reference< css::document::XDocumentProperties>& xDocProps);
-
SvXMLMetaDocumentContext(SvXMLImport& rImport,
const css::uno::Reference< css::document::XDocumentProperties>& xDocProps);
virtual ~SvXMLMetaDocumentContext() override;
- virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList>& xAttrList ) override;
+ virtual void SAL_CALL characters( const OUString& aChars ) override;
+
+ virtual void SAL_CALL startFastElement( sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
- virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList ) override;
+ virtual void SAL_CALL endFastElement( sal_Int32 nElement ) override;
- virtual void EndElement() override;
+ virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
+ sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList ) override;
public:
static void setBuildId(const OUString & rGenerator,