summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-08-29 11:19:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-12-07 08:52:49 +0100
commit5080bb930de3ecfce8ab78bbd23a9d48c2f2bfa0 (patch)
tree9f92d184627177dbd83dedda40d4a4abb531381e /include
parent121464be43830a6f6bfbc27a17c8e0bc7577f455 (diff)
convert SvXMLImport to fastparser, drop slowparser paths
Change-Id: I0f880a7680373043fecf083cdf4de8b0bb7041a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103775 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/xmloff/XMLBase64ImportContext.hxx5
-rw-r--r--include/xmloff/XMLCharContext.hxx14
-rw-r--r--include/xmloff/XMLTextShapeImportHelper.hxx2
-rw-r--r--include/xmloff/shapeimport.hxx35
-rw-r--r--include/xmloff/txtimp.hxx9
-rw-r--r--include/xmloff/xmlictxt.hxx26
-rw-r--r--include/xmloff/xmlimp.hxx3
7 files changed, 18 insertions, 76 deletions
diff --git a/include/xmloff/XMLBase64ImportContext.hxx b/include/xmloff/XMLBase64ImportContext.hxx
index 94b07422203c..e2b62abea1a4 100644
--- a/include/xmloff/XMLBase64ImportContext.hxx
+++ b/include/xmloff/XMLBase64ImportContext.hxx
@@ -35,11 +35,6 @@ class XMLOFF_DLLPUBLIC XMLBase64ImportContext final : public SvXMLImportContext
public:
- XMLBase64ImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
- const OUString& rLName,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
- const css::uno::Reference< css::io::XOutputStream >& rOut );
-
XMLBase64ImportContext( SvXMLImport& rImport,
const css::uno::Reference< css::io::XOutputStream >& rOut );
diff --git a/include/xmloff/XMLCharContext.hxx b/include/xmloff/XMLCharContext.hxx
index b17d8ea46d3c..dd63a83fc149 100644
--- a/include/xmloff/XMLCharContext.hxx
+++ b/include/xmloff/XMLCharContext.hxx
@@ -34,20 +34,6 @@ protected:
sal_Unicode m_c;
public:
-
- XMLCharContext(
- SvXMLImport& rImport,
- sal_uInt16 nPrfx,
- const OUString& rLName,
- const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
- sal_Unicode c,
- bool bCount );
- XMLCharContext(
- SvXMLImport& rImport,
- sal_uInt16 nPrfx,
- const OUString& rLName,
- const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
- sal_Int16 nControl );
XMLCharContext(
SvXMLImport& rImport,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList,
diff --git a/include/xmloff/XMLTextShapeImportHelper.hxx b/include/xmloff/XMLTextShapeImportHelper.hxx
index 42f5d412f5b4..f02e566afbec 100644
--- a/include/xmloff/XMLTextShapeImportHelper.hxx
+++ b/include/xmloff/XMLTextShapeImportHelper.hxx
@@ -35,7 +35,7 @@ public:
virtual void addShape(
css::uno::Reference< css::drawing::XShape >& rShape,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes >& rShapes ) override;
};
diff --git a/include/xmloff/shapeimport.hxx b/include/xmloff/shapeimport.hxx
index 0f841acfd601..54e1407efa9d 100644
--- a/include/xmloff/shapeimport.hxx
+++ b/include/xmloff/shapeimport.hxx
@@ -251,29 +251,24 @@ public:
virtual ~XMLShapeImportHelper() override;
- SvXMLShapeContext* CreateGroupChildContext(
- SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
- css::uno::Reference< css::drawing::XShapes > const & rShapes,
- bool bTemporaryShape = false);
- SvXMLShapeContext* CreateGroupChildContext(
+ static SvXMLShapeContext* CreateGroupChildContext(
SvXMLImport& rImport, sal_Int32 nElement,
- const css::uno::Reference< css::xml::sax::XFastAttributeList>& xAttrList,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes > const & rShapes,
bool bTemporaryShape = false);
- SvXMLShapeContext* CreateFrameChildContext(
- SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
+ static SvXMLShapeContext* CreateFrameChildContext(
+ SvXMLImport& rImport, sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes > const & rShapes,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xFrameAttrList);
- static SvXMLImportContextRef CreateFrameChildContext(
- SvXMLImportContext *pThisContext, sal_uInt16 nPrefix, const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList );
-
- SvXMLShapeContext* Create3DSceneChildContext(
- SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xFrameAttrList);
+ static css::uno::Reference< css::xml::sax::XFastContextHandler > CreateFrameChildContext(
+ SvXMLImportContext *pThisContext, sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList );
+
+ static SvXMLShapeContext* Create3DSceneChildContext(
+ SvXMLImport& rImport, sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes > const & rShapes);
const SvXMLTokenMap& GetGroupShapeElemTokenMap();
@@ -299,7 +294,7 @@ public:
// shape to the given XShapes.
virtual void addShape(
css::uno::Reference< css::drawing::XShape >& rShape,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes >& rShapes);
// this function is called whenever the implementation classes have finished importing
@@ -307,7 +302,7 @@ public:
// all properties and styles are set.
virtual void finishShape(
css::uno::Reference< css::drawing::XShape >& rShape,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList,
css::uno::Reference< css::drawing::XShapes >& rShapes);
// tdf#127791 help function for group shape events
diff --git a/include/xmloff/txtimp.hxx b/include/xmloff/txtimp.hxx
index bdd0e169c9d1..52438189209a 100644
--- a/include/xmloff/txtimp.hxx
+++ b/include/xmloff/txtimp.hxx
@@ -368,8 +368,8 @@ private:
protected:
virtual SvXMLImportContext *CreateTableChildContext(
SvXMLImport& rImport,
- sal_uInt16 nPrefix, const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList );
+ sal_Int32 nElement,
+ const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList );
// access, lazy initialization and destruction of backpatchers
// Code is implemented in XMLPropertyBackpatcher.cxx
@@ -401,11 +401,6 @@ public:
sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList > & xAttrList,
XMLTextType eType = XMLTextType::Shape );
- SvXMLImportContext *CreateTextChildContext(
- SvXMLImport& rImport,
- sal_uInt16 nPrefix, const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList > & xAttrList,
- XMLTextType eType = XMLTextType::Shape );
SvXMLTokenMap const& GetTextElemTokenMap();
SvXMLTokenMap const& GetTextPElemTokenMap();
diff --git a/include/xmloff/xmlictxt.hxx b/include/xmloff/xmlictxt.hxx
index c0d484844faf..1fee33fce666 100644
--- a/include/xmloff/xmlictxt.hxx
+++ b/include/xmloff/xmlictxt.hxx
@@ -49,10 +49,7 @@ class XMLOFF_DLLPUBLIC SvXMLImportContext : public css::xml::sax::XFastContextHa
friend class SvXMLImport;
SvXMLImport& mrImport;
- OUString maLocalName;
oslInterlockedCount m_nRefCount;
- sal_uInt16 mnPrefix;
- bool mbPrefixAndLocalNameFilledIn;
protected:
@@ -61,17 +58,10 @@ protected:
public:
- bool IsPrefixFilledIn() const { return mnPrefix != 0; }
- sal_uInt16 GetPrefix() const { assert(mbPrefixAndLocalNameFilledIn && "those fields not filled, probably fast-parser context"); return mnPrefix; }
- const OUString& GetLocalName() const { assert(mbPrefixAndLocalNameFilledIn && "those fields not filled, probably fast-parser context"); return maLocalName; }
-
/** A contexts constructor does anything that is required if an element
* starts. Namespace processing has been done already.
* Note that virtual methods cannot be used inside constructors. Use
* StartElement instead if this is required. */
- SvXMLImportContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
- const OUString& rLName );
-
SvXMLImportContext( SvXMLImport& rImport );
/** A contexts destructor does anything that is required if an element
@@ -80,17 +70,6 @@ public:
* EndElement instead if this is required. */
virtual ~SvXMLImportContext();
- /** Create a children element context. By default, the import's
- * CreateContext method is called to create a new default context. */
- virtual SvXMLImportContextRef CreateChildContext( sal_uInt16 nPrefix,
- const OUString& rLocalName,
- const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList );
-
- /** StartElement is called after a context has been constructed and
- * before an elements context is parsed. It may be used for actions that
- * require virtual methods. The default is to do nothing. */
- virtual void StartElement( const css::uno::Reference< css::xml::sax::XAttributeList >& xAttrList );
-
// css::xml::sax::XFastContextHandler:
virtual void SAL_CALL startFastElement (sal_Int32 Element,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& Attribs) override;
@@ -107,11 +86,6 @@ public:
virtual css::uno::Reference< XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 Element,
const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs) override;
- /**
- * temporary method to forward call to CreateChildContext, for use during slow-to-fastparser transition
- */
- css::uno::Reference< XFastContextHandler > createFastChildContextFallback(sal_Int32 Element,
- const css::uno::Reference<css::xml::sax::XFastAttributeList>& Attribs);
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createUnknownChildContext(
const OUString & Namespace, const OUString & Name,
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 4599bcbd751b..ae165a2201b8 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -384,9 +384,6 @@ public:
// get import helper for events
XMLEventImportHelper& GetEventImport();
- css::uno::Reference< css::xml::sax::XAttributeList > convertToSlowAttrList(
- const css::uno::Reference< css::xml::sax::XFastAttributeList > & Attribs);
-
static const OUString & getNameFromToken( sal_Int32 nToken );
static OUString getPrefixAndNameFromToken( sal_Int32 nToken );
static OUString getNamespacePrefixFromToken(sal_Int32 nToken, const SvXMLNamespaceMap* pMap);