[Libreoffice-commits] core.git: 2 commits - include/oox oox/source

Tor Lillqvist tml at iki.fi
Fri Jun 28 02:03:11 PDT 2013


 include/oox/drawingml/clrschemecontext.hxx                   |   16 
 include/oox/drawingml/colorchoicecontext.hxx                 |   31 -
 include/oox/drawingml/customshapegeometry.hxx                |   20 
 include/oox/drawingml/effectpropertiescontext.hxx            |   11 
 include/oox/drawingml/fillpropertiesgroupcontext.hxx         |  103 +--
 include/oox/drawingml/guidcontext.hxx                        |   10 
 include/oox/drawingml/linepropertiescontext.hxx              |   13 
 include/oox/drawingml/objectdefaultcontext.hxx               |    8 
 include/oox/drawingml/scene3dcontext.hxx                     |   11 
 include/oox/drawingml/shapepropertiescontext.hxx             |    8 
 include/oox/drawingml/shapestylecontext.hxx                  |    9 
 include/oox/drawingml/spdefcontext.hxx                       |    8 
 include/oox/drawingml/table/tablebackgroundstylecontext.hxx  |    8 
 include/oox/drawingml/table/tablecellcontext.hxx             |    9 
 include/oox/drawingml/table/tablepartstylecontext.hxx        |    9 
 include/oox/drawingml/table/tablerowcontext.hxx              |   11 
 include/oox/drawingml/table/tablestylecellstylecontext.hxx   |   10 
 include/oox/drawingml/table/tablestylecontext.hxx            |   12 
 include/oox/drawingml/table/tablestyletextstylecontext.hxx   |   10 
 include/oox/drawingml/textbodycontext.hxx                    |   19 
 include/oox/drawingml/textbodypropertiescontext.hxx          |   11 
 include/oox/drawingml/textcharacterpropertiescontext.hxx     |   11 
 include/oox/drawingml/textfieldcontext.hxx                   |   18 
 include/oox/drawingml/textliststylecontext.hxx               |    9 
 include/oox/drawingml/textparagraphpropertiescontext.hxx     |   11 
 include/oox/drawingml/themeelementscontext.hxx               |   15 
 include/oox/drawingml/transform2dcontext.hxx                 |   14 
 include/oox/ppt/pptshapegroupcontext.hxx                     |    2 
 include/oox/ppt/pptshapepropertiescontext.hxx                |    7 
 oox/source/drawingml/clrschemecontext.cxx                    |   46 -
 oox/source/drawingml/colorchoicecontext.cxx                  |   47 -
 oox/source/drawingml/customshapegeometry.cxx                 |  333 +++++------
 oox/source/drawingml/diagram/datamodelcontext.cxx            |  285 +++------
 oox/source/drawingml/diagram/datamodelcontext.hxx            |    8 
 oox/source/drawingml/diagram/diagramfragmenthandler.cxx      |   19 
 oox/source/drawingml/diagram/diagramfragmenthandler.hxx      |    5 
 oox/source/drawingml/effectpropertiescontext.cxx             |   11 
 oox/source/drawingml/fillpropertiesgroupcontext.cxx          |  174 ++---
 oox/source/drawingml/graphicshapecontext.cxx                 |    6 
 oox/source/drawingml/guidcontext.cxx                         |    6 
 oox/source/drawingml/hyperlinkcontext.cxx                    |   28 
 oox/source/drawingml/hyperlinkcontext.hxx                    |   10 
 oox/source/drawingml/linepropertiescontext.cxx               |   31 -
 oox/source/drawingml/objectdefaultcontext.cxx                |    6 
 oox/source/drawingml/scene3dcontext.cxx                      |   24 
 oox/source/drawingml/shapecontext.cxx                        |    3 
 oox/source/drawingml/shapepropertiescontext.cxx              |   36 -
 oox/source/drawingml/shapestylecontext.cxx                   |   26 
 oox/source/drawingml/spdefcontext.cxx                        |   22 
 oox/source/drawingml/table/tablebackgroundstylecontext.cxx   |   29 
 oox/source/drawingml/table/tablecellcontext.cxx              |   73 --
 oox/source/drawingml/table/tablecontext.cxx                  |    4 
 oox/source/drawingml/table/tablepartstylecontext.cxx         |   25 
 oox/source/drawingml/table/tablerowcontext.cxx               |   24 
 oox/source/drawingml/table/tablestylecellstylecontext.cxx    |   34 -
 oox/source/drawingml/table/tablestylecontext.cxx             |   66 --
 oox/source/drawingml/table/tablestylelistfragmenthandler.cxx |    6 
 oox/source/drawingml/table/tablestyletextstylecontext.cxx    |   42 -
 oox/source/drawingml/textbodycontext.cxx                     |   83 --
 oox/source/drawingml/textbodypropertiescontext.cxx           |   65 --
 oox/source/drawingml/textcharacterpropertiescontext.cxx      |   88 +-
 oox/source/drawingml/textfieldcontext.cxx                    |   31 -
 oox/source/drawingml/textliststylecontext.cxx                |   56 -
 oox/source/drawingml/textparagraphpropertiescontext.cxx      |   96 +--
 oox/source/drawingml/textspacingcontext.cxx                  |   25 
 oox/source/drawingml/textspacingcontext.hxx                  |   14 
 oox/source/drawingml/texttabstoplistcontext.cxx              |   26 
 oox/source/drawingml/texttabstoplistcontext.hxx              |   11 
 oox/source/drawingml/themeelementscontext.cxx                |   77 +-
 oox/source/drawingml/transform2dcontext.cxx                  |   31 -
 oox/source/ppt/backgroundproperties.cxx                      |    2 
 oox/source/ppt/pptshapecontext.cxx                           |    2 
 oox/source/ppt/pptshapepropertiescontext.cxx                 |   17 
 oox/source/ppt/slidefragmenthandler.cxx                      |    2 
 74 files changed, 1007 insertions(+), 1482 deletions(-)

New commits:
commit ecbd3104c13d4e83720ca6508a07f9ab1548de62
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Jun 25 15:35:21 2013 +0300

    MSVC build fixes
    
    Change-Id: I189fe3635f94fdd6b91bd7930c7abf02e70368aa
    Reviewed-on: https://gerrit.libreoffice.org/4581
    Tested-by: LibreOffice gerrit bot <gerrit at libreoffice.org>
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/include/oox/drawingml/textbodycontext.hxx b/include/oox/drawingml/textbodycontext.hxx
index aaa6f97..c0a5e75 100644
--- a/include/oox/drawingml/textbodycontext.hxx
+++ b/include/oox/drawingml/textbodycontext.hxx
@@ -46,9 +46,9 @@ class RegularTextRunContext : public ::oox::core::ContextHandler2
 public:
     RegularTextRunContext( ::oox::core::ContextHandler2Helper& rParent, TextRunPtr pRunPtr );
 
-    virtual void SAL_CALL onEndElement() SAL_OVERRIDE;
+    virtual void onEndElement() SAL_OVERRIDE;
     virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
-    virtual void SAL_CALL onCharacters( const OUString& aChars ) SAL_OVERRIDE;
+    virtual void onCharacters( const OUString& aChars ) SAL_OVERRIDE;
 
 protected:
     TextRunPtr          mpRunPtr;
diff --git a/include/oox/ppt/pptshapegroupcontext.hxx b/include/oox/ppt/pptshapegroupcontext.hxx
index efa2c5b..6a9cd19 100644
--- a/include/oox/ppt/pptshapegroupcontext.hxx
+++ b/include/oox/ppt/pptshapegroupcontext.hxx
@@ -43,7 +43,7 @@ public:
     virtual ::oox::core::ContextHandlerRef
         onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
-    virtual void SAL_CALL onEndElement() SAL_OVERRIDE;
+    virtual void onEndElement() SAL_OVERRIDE;
 
 protected:
 
diff --git a/oox/source/ppt/pptshapepropertiescontext.cxx b/oox/source/ppt/pptshapepropertiescontext.cxx
index 1ebf926..1dcbda8 100644
--- a/oox/source/ppt/pptshapepropertiescontext.cxx
+++ b/oox/source/ppt/pptshapepropertiescontext.cxx
@@ -60,7 +60,6 @@ ContextHandlerRef PPTShapePropertiesContext::onCreateContext( sal_Int32 aElement
         default:
             return ShapePropertiesContext::onCreateContext( aElementToken, rAttribs );
     }
-    return 0;
 }
 
 } }
commit 8810d26c92c4f70b2a05c63088e30fc780ed6caf
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Jun 24 19:34:03 2013 +0300

    Convert all ContextHandler-derived clases over to ContextHandler2
    
    Change-Id: I81f54e3b7d29a0807ec4c2f082ae00fd6e1d6138
    Reviewed-on: https://gerrit.libreoffice.org/4580
    Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
    Tested-by: Fridrich Strba <fridrich at documentfoundation.org>

diff --git a/include/oox/drawingml/clrschemecontext.hxx b/include/oox/drawingml/clrschemecontext.hxx
index 466b852..fc2a091 100644
--- a/include/oox/drawingml/clrschemecontext.hxx
+++ b/include/oox/drawingml/clrschemecontext.hxx
@@ -20,24 +20,24 @@
 #ifndef OOX_DRAWINGML_CLRSCHEMECONTEXT_HXX
 #define OOX_DRAWINGML_CLRSCHEMECONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 #include "oox/drawingml/clrscheme.hxx"
 #include "oox/drawingml/color.hxx"
 #include "oox/drawingml/colorchoicecontext.hxx"
 
 namespace oox { namespace drawingml {
 
-class clrMapContext : public oox::core::ContextHandler
+class clrMapContext : public oox::core::ContextHandler2
 {
 public:
-    clrMapContext( ::oox::core::ContextHandler& rParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, ClrMap& rClrMap );
+    clrMapContext( ::oox::core::ContextHandler2Helper& rParent,
+        const ::oox::AttributeList& rAttributes, ClrMap& rClrMap );
 };
 
 class clrSchemeColorContext : private Color, public ColorContext
 {
 public:
-    clrSchemeColorContext( ::oox::core::ContextHandler& rParent, ClrScheme& rClrScheme, sal_Int32 nColorToken );
+    clrSchemeColorContext( ::oox::core::ContextHandler2Helper& rParent, ClrScheme& rClrScheme, sal_Int32 nColorToken );
     virtual ~clrSchemeColorContext();
 
 private:
@@ -45,11 +45,11 @@ private:
     sal_Int32       mnColorToken;
 };
 
-class clrSchemeContext : public oox::core::ContextHandler
+class clrSchemeContext : public oox::core::ContextHandler2
 {
 public:
-    clrSchemeContext( ::oox::core::ContextHandler& rParent, ClrScheme& rClrScheme );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    clrSchemeContext( ::oox::core::ContextHandler2Helper& rParent, ClrScheme& rClrScheme );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     ClrScheme&      mrClrScheme;
diff --git a/include/oox/drawingml/colorchoicecontext.hxx b/include/oox/drawingml/colorchoicecontext.hxx
index aaacfd4..ba28ee9 100644
--- a/include/oox/drawingml/colorchoicecontext.hxx
+++ b/include/oox/drawingml/colorchoicecontext.hxx
@@ -20,7 +20,7 @@
 #ifndef OOX_DRAWINGML_COLORCHOICECONTEXT_HXX
 #define OOX_DRAWINGML_COLORCHOICECONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox {
 namespace drawingml {
@@ -31,21 +31,19 @@ class Color;
 
 /** Context handler for the different color value elements (a:scrgbClr,
     a:srgbClr, a:hslClr, a:sysClr, a:schemeClr, a:prstClr). */
-class ColorValueContext : public ::oox::core::ContextHandler
+class ColorValueContext : public ::oox::core::ContextHandler2
 {
 public:
-    explicit            ColorValueContext( ::oox::core::ContextHandler& rParent, Color& rColor );
+    explicit            ColorValueContext( ::oox::core::ContextHandler2Helper& rParent, Color& rColor );
 
-    virtual void SAL_CALL startFastElement(
-                            sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
-                        throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-                        createFastChildContext(
+    virtual void onStartElement(
+                            const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+
+    virtual ::oox::core::ContextHandlerRef
+                        onCreateContext(
                             sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
-                        throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+                            const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     Color&              mrColor;
@@ -55,16 +53,15 @@ private:
 
 /** Context handler for elements that *contain* a color value element
     (a:scrgbClr, a:srgbClr, a:hslClr, a:sysClr, a:schemeClr, a:prstClr). */
-class ColorContext : public ::oox::core::ContextHandler
+class ColorContext : public ::oox::core::ContextHandler2
 {
 public:
-    explicit            ColorContext( ::oox::core::ContextHandler& rParent, Color& rColor );
+    explicit            ColorContext( ::oox::core::ContextHandler2Helper& rParent, Color& rColor );
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-                        createFastChildContext(
+    virtual ::oox::core::ContextHandlerRef
+                        onCreateContext(
                             sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
-                        throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+                            const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     Color&              mrColor;
diff --git a/include/oox/drawingml/customshapegeometry.hxx b/include/oox/drawingml/customshapegeometry.hxx
index 3920881..db13be6 100644
--- a/include/oox/drawingml/customshapegeometry.hxx
+++ b/include/oox/drawingml/customshapegeometry.hxx
@@ -22,7 +22,7 @@
 
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include "oox/helper/propertymap.hxx"
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 #include "oox/drawingml/shape.hxx"
 
 namespace oox { namespace drawingml {
@@ -30,11 +30,11 @@ namespace oox { namespace drawingml {
 
 // ---------------------------------------------------------------------
 // CT_CustomGeometry2D
-class CustomShapeGeometryContext : public ::oox::core::ContextHandler
+class CustomShapeGeometryContext : public ::oox::core::ContextHandler2
 {
 public:
-    CustomShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, CustomShapeProperties& rCustomShapeProperties );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    CustomShapeGeometryContext( ::oox::core::ContextHandler2Helper& rParent, const ::oox::AttributeList& rAttributes, CustomShapeProperties& rCustomShapeProperties );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     CustomShapeProperties& mrCustomShapeProperties;
@@ -42,11 +42,11 @@ private:
 
 // ---------------------------------------------------------------------
 // CT_PresetGeometry2D
-class PresetShapeGeometryContext : public ::oox::core::ContextHandler
+class PresetShapeGeometryContext : public ::oox::core::ContextHandler2
 {
 public:
-    PresetShapeGeometryContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, CustomShapeProperties& rCustomShapeProperties );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    PresetShapeGeometryContext( ::oox::core::ContextHandler2Helper& rParent, const ::oox::AttributeList& rAttributes, CustomShapeProperties& rCustomShapeProperties );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     CustomShapeProperties& mrCustomShapeProperties;
@@ -54,11 +54,11 @@ private:
 
 // ---------------------------------------------------------------------
 // CT_PresetTextShape
-class PresetTextShapeContext : public ::oox::core::ContextHandler
+class PresetTextShapeContext : public ::oox::core::ContextHandler2
 {
 public:
-    PresetTextShapeContext( ::oox::core::ContextHandler& rParent, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, CustomShapeProperties& rCustomShapeProperties );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    PresetTextShapeContext( ::oox::core::ContextHandler2Helper& rParent, const ::oox::AttributeList& rAttributes, CustomShapeProperties& rCustomShapeProperties );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     CustomShapeProperties& mrCustomShapeProperties;
diff --git a/include/oox/drawingml/effectpropertiescontext.hxx b/include/oox/drawingml/effectpropertiescontext.hxx
index cd5e2eb..43a8dd9 100644
--- a/include/oox/drawingml/effectpropertiescontext.hxx
+++ b/include/oox/drawingml/effectpropertiescontext.hxx
@@ -10,7 +10,7 @@
 #ifndef OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX
 #define OOX_DRAWINGML_EFFECTPROPERTIESCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 #include "oox/dllapi.h"
 
 namespace oox { namespace drawingml {
@@ -19,16 +19,15 @@ namespace oox { namespace drawingml {
 
 struct EffectProperties;
 
-class OOX_DLLPUBLIC EffectPropertiesContext : public ::oox::core::ContextHandler
+class OOX_DLLPUBLIC EffectPropertiesContext : public ::oox::core::ContextHandler2
 {
 public:
-    EffectPropertiesContext( ::oox::core::ContextHandler& rParent,
+    EffectPropertiesContext( ::oox::core::ContextHandler2Helper& rParent,
             EffectProperties& rEffectProperties ) throw();
     ~EffectPropertiesContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-        createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
-            throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef
+        onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     EffectProperties& mrEffectProperties;
diff --git a/include/oox/drawingml/fillpropertiesgroupcontext.hxx b/include/oox/drawingml/fillpropertiesgroupcontext.hxx
index 81d8a6e..64980aa 100644
--- a/include/oox/drawingml/fillpropertiesgroupcontext.hxx
+++ b/include/oox/drawingml/fillpropertiesgroupcontext.hxx
@@ -33,152 +33,133 @@ class SolidFillContext : public ColorContext
 {
 public:
     explicit            SolidFillContext(
-                            ::oox::core::ContextHandler& rParent,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs,
+                            ::oox::core::ContextHandler2Helper& rParent,
+                            const ::oox::AttributeList& rAttribs,
                             FillProperties& rFillProps );
 };
 
 // ============================================================================
 
 /** Context handler that imports the a:gradFill element. */
-class GradientFillContext : public ::oox::core::ContextHandler
+class GradientFillContext : public ::oox::core::ContextHandler2
 {
 public:
     explicit            GradientFillContext(
-                            ::oox::core::ContextHandler& rParent,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs,
+                            ::oox::core::ContextHandler2Helper& rParent,
+                            const ::oox::AttributeList& rAttribs,
                             GradientFillProperties& rGradientProps );
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-                        createFastChildContext(
+    virtual ::oox::core::ContextHandlerRef
+                        onCreateContext(
                             sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
-                        throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+                            const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     GradientFillProperties& mrGradientProps;
 };
 
-// ============================================================================
-
 /** Context handler that imports the a:pattFill element. */
-class PatternFillContext : public ::oox::core::ContextHandler
+class PatternFillContext : public ::oox::core::ContextHandler2
 {
 public:
     explicit            PatternFillContext(
-                            ::oox::core::ContextHandler& rParent,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs,
+                            ::oox::core::ContextHandler2Helper& rParent,
+                            const ::oox::AttributeList& rAttribs,
                             PatternFillProperties& rPatternProps );
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-                        createFastChildContext(
+    virtual ::oox::core::ContextHandlerRef
+                        onCreateContext(
                             sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
-                        throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+                            const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     PatternFillProperties& mrPatternProps;
 };
 
-// ============================================================================
-// ============================================================================
 
 /** Context handler that imports the a:clrChange element containing the colors
     of a bitmap color change transformation. */
-class ColorChangeContext : public ::oox::core::ContextHandler
+class ColorChangeContext : public ::oox::core::ContextHandler2
 {
 public:
     explicit            ColorChangeContext(
-                            ::oox::core::ContextHandler& rParent,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs,
+                            ::oox::core::ContextHandler2Helper& rParent,
+                            const ::oox::AttributeList& rAttribs,
                             BlipFillProperties& rBlipProps );
     virtual             ~ColorChangeContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-                        createFastChildContext(
+    virtual ::oox::core::ContextHandlerRef
+                        onCreateContext(
                             sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
-                        throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+                            const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     BlipFillProperties& mrBlipProps;
     bool                mbUseAlpha;
 };
 
-// ============================================================================
-
 /** Context handler that imports the a:blip element containing the fill bitmap
     and bitmap color transformation settings. */
-class BlipContext : public ::oox::core::ContextHandler
+class BlipContext : public ::oox::core::ContextHandler2
 {
 public:
     explicit            BlipContext(
-                            ::oox::core::ContextHandler& rParent,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs,
+                            ::oox::core::ContextHandler2Helper& rParent,
+                            const ::oox::AttributeList& rAttribs,
                             BlipFillProperties& rBlipProps );
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-                        createFastChildContext(
+    virtual ::oox::core::ContextHandlerRef
+                        onCreateContext(
                             sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
-                        throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+                            const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     BlipFillProperties& mrBlipProps;
 };
 
-// ============================================================================
-
 /** Context handler that imports the a:blipFill element. */
-class BlipFillContext : public ::oox::core::ContextHandler
+class BlipFillContext : public ::oox::core::ContextHandler2
 {
 public:
     explicit            BlipFillContext(
-                            ::oox::core::ContextHandler& rParent,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs,
+                            ::oox::core::ContextHandler2Helper& rParent,
+                            const ::oox::AttributeList& rAttribs,
                             BlipFillProperties& rBlipProps );
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-                        createFastChildContext(
+    virtual ::oox::core::ContextHandlerRef
+                        onCreateContext(
                             sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
-                        throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+                            const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     BlipFillProperties& mrBlipProps;
 };
 
-// ============================================================================
-// ============================================================================
-
 /** Context handler for elements that contain a fill property element
     (a:noFill, a:solidFill, a:gradFill, a:pattFill, a:blipFill, a:grpFill). */
-class FillPropertiesContext : public ::oox::core::ContextHandler
+class FillPropertiesContext : public ::oox::core::ContextHandler2
 {
 public:
     explicit            FillPropertiesContext(
-                            ::oox::core::ContextHandler& rParent,
+                            ::oox::core::ContextHandler2Helper& rParent,
                             FillProperties& rFillProps );
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-                        createFastChildContext(
+    virtual ::oox::core::ContextHandlerRef
+                        onCreateContext(
                             sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs )
-                        throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+                            const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
-    static ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler >
+    static ::oox::core::ContextHandlerRef
                         createFillContext(
-                            ::oox::core::ContextHandler& rParent,
+                            ::oox::core::ContextHandler2Helper& rParent,
                             sal_Int32 nElement,
-                            const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rxAttribs,
+                            const ::oox::AttributeList& rAttribs,
                             FillProperties& rFillProps );
 
 protected:
     FillProperties&     mrFillProps;
 };
 
-// ============================================================================
-
 /** Context handler for elements that contain a fill property element
     (a:noFill, a:solidFill, a:gradFill, a:pattFill, a:blipFill, a:grpFill).
 
@@ -190,7 +171,7 @@ class SimpleFillPropertiesContext : private FillProperties, public FillPropertie
 {
 public:
     explicit            SimpleFillPropertiesContext(
-                            ::oox::core::ContextHandler& rParent,
+                            ::oox::core::ContextHandler2Helper& rParent,
                             Color& rColor );
     virtual             ~SimpleFillPropertiesContext();
 
@@ -198,8 +179,6 @@ protected:
     Color&              mrColor;
 };
 
-// ============================================================================
-
 } // namespace drawingml
 } // namespace oox
 
diff --git a/include/oox/drawingml/guidcontext.hxx b/include/oox/drawingml/guidcontext.hxx
index 8a60bf2..c13c9e8 100644
--- a/include/oox/drawingml/guidcontext.hxx
+++ b/include/oox/drawingml/guidcontext.hxx
@@ -20,22 +20,20 @@
 #ifndef OOX_DRAWINGML_GUIDCONTEXT_HXX
 #define OOX_DRAWINGML_GUIDCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
-    class GuidContext : public ::oox::core::ContextHandler
+    class GuidContext : public ::oox::core::ContextHandler2
     {
 
     public:
-        GuidContext( ::oox::core::ContextHandler& rParent, OUString& rGuidId );
-        virtual void SAL_CALL characters( const OUString& aChars ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+        GuidContext( ::oox::core::ContextHandler2Helper& rParent, OUString& rGuidId );
+        virtual void onCharacters( const OUString& aChars ) SAL_OVERRIDE;
 
     private:
-
         OUString& mrGuidId;
     };
-
 } }
 
 #endif
diff --git a/include/oox/drawingml/linepropertiescontext.hxx b/include/oox/drawingml/linepropertiescontext.hxx
index e0454dd..0d78aba 100644
--- a/include/oox/drawingml/linepropertiescontext.hxx
+++ b/include/oox/drawingml/linepropertiescontext.hxx
@@ -20,7 +20,7 @@
 #ifndef OOX_DRAWINGML_LINEPROPERTIESCONTEXT_HXX
 #define OOX_DRAWINGML_LINEPROPERTIESCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 #include "oox/dllapi.h"
 
 namespace oox { namespace drawingml {
@@ -29,17 +29,16 @@ namespace oox { namespace drawingml {
 
 struct LineProperties;
 
-class OOX_DLLPUBLIC LinePropertiesContext : public ::oox::core::ContextHandler
+class OOX_DLLPUBLIC LinePropertiesContext : public ::oox::core::ContextHandler2
 {
 public:
-    LinePropertiesContext( ::oox::core::ContextHandler& rParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes,
+    LinePropertiesContext( ::oox::core::ContextHandler2Helper& rParent,
+            const ::oox::AttributeList& rAttributes,
             LineProperties& rLineProperties ) throw();
     ~LinePropertiesContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-        createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
-            throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef
+        onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     LineProperties& mrLineProperties;
diff --git a/include/oox/drawingml/objectdefaultcontext.hxx b/include/oox/drawingml/objectdefaultcontext.hxx
index b8b1d5b..13e27a7 100644
--- a/include/oox/drawingml/objectdefaultcontext.hxx
+++ b/include/oox/drawingml/objectdefaultcontext.hxx
@@ -20,17 +20,17 @@
 #ifndef OOX_DRAWINGML_OBJECTDEFAULTCONTEXT_HXX
 #define OOX_DRAWINGML_OBJECTDEFAULTCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
 class Theme;
 
-class objectDefaultContext : public oox::core::ContextHandler
+class objectDefaultContext : public oox::core::ContextHandler2
 {
 public:
-    objectDefaultContext( ::oox::core::ContextHandler& rParent, Theme& rTheme );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    objectDefaultContext( ::oox::core::ContextHandler2Helper& rParent, Theme& rTheme );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     Theme& mrTheme;
diff --git a/include/oox/drawingml/scene3dcontext.hxx b/include/oox/drawingml/scene3dcontext.hxx
index cc3341d..d1478b9 100644
--- a/include/oox/drawingml/scene3dcontext.hxx
+++ b/include/oox/drawingml/scene3dcontext.hxx
@@ -20,21 +20,18 @@
 #ifndef OOX_DRAWINGML_SCENE3DPROPERTIESCONTEXT_HPP
 #define OOX_DRAWINGML_SCENE3DPROPERTIESCONTEXT_HPP
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
 struct Shape3DProperties;
 
-// ---------------------------------------------------------------------
-
-class Scene3DPropertiesContext : public ::oox::core::ContextHandler
+class Scene3DPropertiesContext : public ::oox::core::ContextHandler2
 {
 public:
-    Scene3DPropertiesContext( ::oox::core::ContextHandler& rParent, Shape3DProperties& r3DProperties ) throw();
+    Scene3DPropertiesContext( ::oox::core::ContextHandler2Helper& rParent, Shape3DProperties& r3DProperties ) throw();
 
-    ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
-            throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException );
+    ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     Shape3DProperties& mr3DProperties;
diff --git a/include/oox/drawingml/shapepropertiescontext.hxx b/include/oox/drawingml/shapepropertiescontext.hxx
index 31da8a9..ac4f9d7 100644
--- a/include/oox/drawingml/shapepropertiescontext.hxx
+++ b/include/oox/drawingml/shapepropertiescontext.hxx
@@ -20,17 +20,17 @@
 #ifndef OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
 #define OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 #include "oox/drawingml/shape.hxx"
 
 namespace oox { namespace drawingml {
 
-class ShapePropertiesContext : public ::oox::core::ContextHandler
+class ShapePropertiesContext : public ::oox::core::ContextHandler2
 {
 public:
-    ShapePropertiesContext( ::oox::core::ContextHandler& rParent, Shape& rShape );
+    ShapePropertiesContext( ::oox::core::ContextHandler2Helper& rParent, Shape& rShape );
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     Shape&              mrShape;
diff --git a/include/oox/drawingml/shapestylecontext.hxx b/include/oox/drawingml/shapestylecontext.hxx
index 88338a1..e7b888f 100644
--- a/include/oox/drawingml/shapestylecontext.hxx
+++ b/include/oox/drawingml/shapestylecontext.hxx
@@ -21,18 +21,17 @@
 #define OOX_DRAWINGML_SHAPESTYLECONTEXT_HXX
 
 #include "oox/drawingml/shape.hxx"
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
-class ShapeStyleContext : public ::oox::core::ContextHandler
+class ShapeStyleContext : public ::oox::core::ContextHandler2
 {
 public:
-    ShapeStyleContext( ::oox::core::ContextHandler& rParent, Shape& rShape );
+    ShapeStyleContext( ::oox::core::ContextHandler2Helper& rParent, Shape& rShape );
     ~ShapeStyleContext();
 
-    virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     Shape&              mrShape;
diff --git a/include/oox/drawingml/spdefcontext.hxx b/include/oox/drawingml/spdefcontext.hxx
index 1fa773f..00906e1 100644
--- a/include/oox/drawingml/spdefcontext.hxx
+++ b/include/oox/drawingml/spdefcontext.hxx
@@ -21,15 +21,15 @@
 #define OOX_DRAWINGML_SPDEFCONTEXT_HXX
 
 #include "oox/drawingml/shape.hxx"
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
-class spDefContext : public oox::core::ContextHandler
+class spDefContext : public oox::core::ContextHandler2
 {
 public:
-    spDefContext( ::oox::core::ContextHandler& rParent, Shape& rDefaultObject );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    spDefContext( ::oox::core::ContextHandler2Helper& rParent, Shape& rDefaultObject );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     Shape& mrDefaultObject;
diff --git a/include/oox/drawingml/table/tablebackgroundstylecontext.hxx b/include/oox/drawingml/table/tablebackgroundstylecontext.hxx
index 185987d..5082362 100644
--- a/include/oox/drawingml/table/tablebackgroundstylecontext.hxx
+++ b/include/oox/drawingml/table/tablebackgroundstylecontext.hxx
@@ -21,18 +21,18 @@
 #ifndef OOX_DRAWINGML_TABLEBACKGROUNDSTYLECONTEXT
 #define OOX_DRAWINGML_TABLEBACKGROUNDSTYLECONTEXT
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 #include "oox/drawingml/table/tablestyle.hxx"
 
 namespace oox { namespace drawingml { namespace table {
 
-class TableBackgroundStyleContext : public ::oox::core::ContextHandler
+class TableBackgroundStyleContext : public ::oox::core::ContextHandler2
 {
 public:
-    TableBackgroundStyleContext( ::oox::core::ContextHandler& rParent, TableStyle& rTableStyle );
+    TableBackgroundStyleContext( ::oox::core::ContextHandler2Helper& rParent, TableStyle& rTableStyle );
     ~TableBackgroundStyleContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
 
diff --git a/include/oox/drawingml/table/tablecellcontext.hxx b/include/oox/drawingml/table/tablecellcontext.hxx
index a2c04bb..24de66c 100644
--- a/include/oox/drawingml/table/tablecellcontext.hxx
+++ b/include/oox/drawingml/table/tablecellcontext.hxx
@@ -26,14 +26,14 @@
 
 namespace oox { namespace drawingml { namespace table {
 
-class TableCellContext : public ::oox::core::ContextHandler
+class TableCellContext : public ::oox::core::ContextHandler2
 {
 public:
-    TableCellContext( ::oox::core::ContextHandler& rParent,
-        const com::sun::star::uno::Reference< com::sun::star::xml::sax::XFastAttributeList >& xAttribs, TableCell& rTableCell );
+    TableCellContext( ::oox::core::ContextHandler2Helper& rParent,
+        const ::oox::AttributeList& rAttribs, TableCell& rTableCell );
     ~TableCellContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
 
@@ -42,7 +42,6 @@ private:
 
 } } }
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/drawingml/table/tablepartstylecontext.hxx b/include/oox/drawingml/table/tablepartstylecontext.hxx
index 14b3854..4a0df7c 100644
--- a/include/oox/drawingml/table/tablepartstylecontext.hxx
+++ b/include/oox/drawingml/table/tablepartstylecontext.hxx
@@ -21,18 +21,18 @@
 #ifndef OOX_DRAWINGML_TABLEPARTSTYLECONTEXT
 #define OOX_DRAWINGML_TABLEPARTSTYLECONTEXT
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 #include "oox/drawingml/table/tablestylepart.hxx"
 
 namespace oox { namespace drawingml { namespace table {
 
-class TablePartStyleContext : public ::oox::core::ContextHandler
+class TablePartStyleContext : public ::oox::core::ContextHandler2
 {
 public:
-    TablePartStyleContext( ::oox::core::ContextHandler& rParent, TableStylePart& rTableStylePart );
+    TablePartStyleContext( ::oox::core::ContextHandler2Helper& rParent, TableStylePart& rTableStylePart );
     ~TablePartStyleContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
 
@@ -41,7 +41,6 @@ private:
 
 } } }
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/drawingml/table/tablerowcontext.hxx b/include/oox/drawingml/table/tablerowcontext.hxx
index 58ab0da..68e35d4 100644
--- a/include/oox/drawingml/table/tablerowcontext.hxx
+++ b/include/oox/drawingml/table/tablerowcontext.hxx
@@ -21,20 +21,20 @@
 #ifndef OOX_DRAWINGML_TABLEROWCONTEXT
 #define OOX_DRAWINGML_TABLEROWCONTEXT
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml { namespace table {
 
 class TableRow;
 
-class TableRowContext : public ::oox::core::ContextHandler
+class TableRowContext : public ::oox::core::ContextHandler2
 {
 public:
-    TableRowContext( ::oox::core::ContextHandler& rParent,
-        const com::sun::star::uno::Reference< com::sun::star::xml::sax::XFastAttributeList >& xAttribs, TableRow& rTableRow );
+    TableRowContext( ::oox::core::ContextHandler2Helper& rParent,
+                     const ::oox::AttributeList& rAttribs, TableRow& rTableRow );
     ~TableRowContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
 
@@ -43,7 +43,6 @@ private:
 
 } } }
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/drawingml/table/tablestylecellstylecontext.hxx b/include/oox/drawingml/table/tablestylecellstylecontext.hxx
index ae0997a..8eb477f 100644
--- a/include/oox/drawingml/table/tablestylecellstylecontext.hxx
+++ b/include/oox/drawingml/table/tablestylecellstylecontext.hxx
@@ -21,28 +21,26 @@
 #ifndef OOX_DRAWINGML_TABLESTYLECELLSTYLECONTEXT
 #define OOX_DRAWINGML_TABLESTYLECELLSTYLECONTEXT
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 #include "oox/drawingml/table/tablestylepart.hxx"
 
 namespace oox { namespace drawingml { namespace table {
 
-class TableStyleCellStyleContext : public ::oox::core::ContextHandler
+class TableStyleCellStyleContext : public ::oox::core::ContextHandler2
 {
 public:
-    TableStyleCellStyleContext( ::oox::core::ContextHandler& rParent, TableStylePart& rTableStylePart );
+    TableStyleCellStyleContext( ::oox::core::ContextHandler2Helper& rParent, TableStylePart& rTableStylePart );
     ~TableStyleCellStyleContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
-
     TableStylePart&             mrTableStylePart;
     sal_Int32                   mnLineType;
 };
 
 } } }
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/drawingml/table/tablestylecontext.hxx b/include/oox/drawingml/table/tablestylecontext.hxx
index f9600d3..9dd1be8 100644
--- a/include/oox/drawingml/table/tablestylecontext.hxx
+++ b/include/oox/drawingml/table/tablestylecontext.hxx
@@ -21,29 +21,27 @@
 #ifndef OOX_DRAWINGML_TABLESTYLECONTEXT
 #define OOX_DRAWINGML_TABLESTYLECONTEXT
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 #include "oox/drawingml/table/tablestyle.hxx"
 
 namespace oox { namespace drawingml { namespace table {
 
-class TableStyleContext : public ::oox::core::ContextHandler
+class TableStyleContext : public ::oox::core::ContextHandler2
 {
 public:
-    TableStyleContext( ::oox::core::ContextHandler& rParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs,
+    TableStyleContext( ::oox::core::ContextHandler2Helper& rParent,
+            const ::oox::AttributeList& rAttribs,
             TableStyle& rTableStyle );
     ~TableStyleContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
-
     TableStyle& mrTableStyle;
 };
 
 } } }
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/drawingml/table/tablestyletextstylecontext.hxx b/include/oox/drawingml/table/tablestyletextstylecontext.hxx
index 1071474..eb10bb8 100644
--- a/include/oox/drawingml/table/tablestyletextstylecontext.hxx
+++ b/include/oox/drawingml/table/tablestyletextstylecontext.hxx
@@ -26,24 +26,22 @@
 
 namespace oox { namespace drawingml { namespace table {
 
-class TableStyleTextStyleContext : public ::oox::core::ContextHandler
+class TableStyleTextStyleContext : public ::oox::core::ContextHandler2
 {
 public:
-    TableStyleTextStyleContext( ::oox::core::ContextHandler& rParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs,
+    TableStyleTextStyleContext( ::oox::core::ContextHandler2Helper& rParent,
+            const ::oox::AttributeList& rAttribs,
             TableStylePart& rTableStylePart );
     ~TableStyleTextStyleContext();
 
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
-
     TableStylePart& mrTableStylePart;
 };
 
 } } }
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/drawingml/textbodycontext.hxx b/include/oox/drawingml/textbodycontext.hxx
index d46272e..aaa6f97 100644
--- a/include/oox/drawingml/textbodycontext.hxx
+++ b/include/oox/drawingml/textbodycontext.hxx
@@ -24,17 +24,16 @@
 
 #include "oox/drawingml/textbody.hxx"
 #include "oox/drawingml/textrun.hxx"
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
-class TextBodyContext : public ::oox::core::ContextHandler
+class TextBodyContext : public ::oox::core::ContextHandler2
 {
 public:
-    TextBodyContext( ::oox::core::ContextHandler& rParent, TextBody& rTextBody );
+    TextBodyContext( ::oox::core::ContextHandler2Helper& rParent, TextBody& rTextBody );
 
-    virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     TextBody&           mrTextBody;
@@ -42,14 +41,14 @@ protected:
 };
 
 // CT_RegularTextRun
-class RegularTextRunContext : public ::oox::core::ContextHandler
+class RegularTextRunContext : public ::oox::core::ContextHandler2
 {
 public:
-    RegularTextRunContext( ::oox::core::ContextHandler& rParent, TextRunPtr pRunPtr );
+    RegularTextRunContext( ::oox::core::ContextHandler2Helper& rParent, TextRunPtr pRunPtr );
 
-    virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL characters( const OUString& aChars ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual void SAL_CALL onEndElement() SAL_OVERRIDE;
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
+    virtual void SAL_CALL onCharacters( const OUString& aChars ) SAL_OVERRIDE;
 
 protected:
     TextRunPtr          mpRunPtr;
diff --git a/include/oox/drawingml/textbodypropertiescontext.hxx b/include/oox/drawingml/textbodypropertiescontext.hxx
index e907a60..2c0ba15 100644
--- a/include/oox/drawingml/textbodypropertiescontext.hxx
+++ b/include/oox/drawingml/textbodypropertiescontext.hxx
@@ -20,21 +20,20 @@
 #ifndef OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX
 #define OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
 struct TextBodyProperties;
 
-class TextBodyPropertiesContext : public ::oox::core::ContextHandler
+class TextBodyPropertiesContext : public ::oox::core::ContextHandler2
 {
 public:
-    TextBodyPropertiesContext( ::oox::core::ContextHandler& rParent,
-             const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes,
+    TextBodyPropertiesContext( ::oox::core::ContextHandler2Helper& rParent,
+             const ::oox::AttributeList& rAttributes,
              TextBodyProperties& rTextBodyProp );
 
-    virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     TextBodyProperties& mrTextBodyProp;
diff --git a/include/oox/drawingml/textcharacterpropertiescontext.hxx b/include/oox/drawingml/textcharacterpropertiescontext.hxx
index f31e86b..c6efcbd 100644
--- a/include/oox/drawingml/textcharacterpropertiescontext.hxx
+++ b/include/oox/drawingml/textcharacterpropertiescontext.hxx
@@ -20,22 +20,21 @@
 #ifndef OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
 #define OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
 struct TextCharacterProperties;
 
-class TextCharacterPropertiesContext : public ::oox::core::ContextHandler
+class TextCharacterPropertiesContext : public ::oox::core::ContextHandler2
 {
 public:
-    TextCharacterPropertiesContext( ::oox::core::ContextHandler& rParent,
-        const com::sun::star::uno::Reference< com::sun::star::xml::sax::XFastAttributeList >& rXAttributes,
+    TextCharacterPropertiesContext( ::oox::core::ContextHandler2Helper& rParent,
+            const ::oox::AttributeList& rAttribs,
             TextCharacterProperties& rTextCharacterProperties );
     virtual ~TextCharacterPropertiesContext();
 
-    virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     TextCharacterProperties& mrTextCharacterProperties;
diff --git a/include/oox/drawingml/textfieldcontext.hxx b/include/oox/drawingml/textfieldcontext.hxx
index 3a50ea9..3b0314b 100644
--- a/include/oox/drawingml/textfieldcontext.hxx
+++ b/include/oox/drawingml/textfieldcontext.hxx
@@ -20,24 +20,23 @@
 #ifndef OOX_DRAWINGML_TEXTFIELDCONTEXT_HXX
 #define OOX_DRAWINGML_TEXTFIELDCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
 class TextField;
 
 class TextFieldContext
-    : public ::oox::core::ContextHandler
+    : public ::oox::core::ContextHandler2
 {
 public:
-    TextFieldContext( ::oox::core::ContextHandler& rParent,
-                        const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rXAttributes,
+    TextFieldContext( ::oox::core::ContextHandler2Helper& rParent,
+                        const ::oox::AttributeList& rAttributes,
                         TextField& rTextField);
-    virtual void SAL_CALL endFastElement( sal_Int32 aElementToken ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL characters( const OUString& aChars ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(
-        sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rXAttributes )
-        throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual void onEndElement( ) SAL_OVERRIDE;
+    virtual void onCharacters( const OUString& aChars ) SAL_OVERRIDE;
+    virtual ::oox::core::ContextHandlerRef onCreateContext(
+        sal_Int32 aElementToken, const ::oox::AttributeList& rAttributes ) SAL_OVERRIDE;
 
 private:
     TextField& mrTextField;
@@ -46,7 +45,6 @@ private:
 
 } }
 
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/oox/drawingml/textliststylecontext.hxx b/include/oox/drawingml/textliststylecontext.hxx
index 2d480c7..41bdcb7 100644
--- a/include/oox/drawingml/textliststylecontext.hxx
+++ b/include/oox/drawingml/textliststylecontext.hxx
@@ -21,18 +21,17 @@
 #define OOX_DRAWINGML_TEXTLISTSTYLECONTEXT_HXX
 
 #include "oox/drawingml/textliststyle.hxx"
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
-class TextListStyleContext : public ::oox::core::ContextHandler
+class TextListStyleContext : public ::oox::core::ContextHandler2
 {
 public:
-    TextListStyleContext( ::oox::core::ContextHandler& rParent, TextListStyle& rTextListStyle );
+    TextListStyleContext( ::oox::core::ContextHandler2Helper& rParent, TextListStyle& rTextListStyle );
     ~TextListStyleContext();
 
-    virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     TextListStyle& mrTextListStyle;
diff --git a/include/oox/drawingml/textparagraphpropertiescontext.hxx b/include/oox/drawingml/textparagraphpropertiescontext.hxx
index db0f342..12b8f1b 100644
--- a/include/oox/drawingml/textparagraphpropertiescontext.hxx
+++ b/include/oox/drawingml/textparagraphpropertiescontext.hxx
@@ -26,20 +26,19 @@
 #include "oox/drawingml/drawingmltypes.hxx"
 #include "oox/drawingml/textparagraphproperties.hxx"
 #include "oox/drawingml/textspacing.hxx"
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox { namespace drawingml {
 
-class TextParagraphPropertiesContext : public ::oox::core::ContextHandler
+class TextParagraphPropertiesContext : public ::oox::core::ContextHandler2
 {
 public:
-    TextParagraphPropertiesContext( ::oox::core::ContextHandler& rParent,
-        const com::sun::star::uno::Reference< com::sun::star::xml::sax::XFastAttributeList >& rXAttributes,
+    TextParagraphPropertiesContext( ::oox::core::ContextHandler2Helper& rParent,
+            const ::oox::AttributeList& rAttributes,
             TextParagraphProperties& rTextParagraphProperties );
     ~TextParagraphPropertiesContext();
 
-    virtual void SAL_CALL endFastElement( ::sal_Int32 Element ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     TextParagraphProperties& mrTextParagraphProperties;
diff --git a/include/oox/drawingml/themeelementscontext.hxx b/include/oox/drawingml/themeelementscontext.hxx
index a3d36a9..14bc601 100644
--- a/include/oox/drawingml/themeelementscontext.hxx
+++ b/include/oox/drawingml/themeelementscontext.hxx
@@ -20,29 +20,24 @@
 #ifndef OOX_DRAWINGML_THEMEELEMENTSCONTEXT_HXX
 #define OOX_DRAWINGML_THEMEELEMENTSCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox {
 namespace drawingml {
 
 class Theme;
 
-// ============================================================================
-
-class ThemeElementsContext : public oox::core::ContextHandler
+class ThemeElementsContext : public oox::core::ContextHandler2
 {
 public:
-    ThemeElementsContext( ::oox::core::ContextHandler& rParent, Theme& rTheme );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 nElement,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
-            throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    ThemeElementsContext( ::oox::core::ContextHandler2Helper& rParent, Theme& rTheme );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 nElement,
+        const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 private:
     Theme& mrTheme;
 };
 
-// ============================================================================
-
 } // namespace drawingml
 } // namespace oox
 
diff --git a/include/oox/drawingml/transform2dcontext.hxx b/include/oox/drawingml/transform2dcontext.hxx
index 6bbbe19..a3ad021 100644
--- a/include/oox/drawingml/transform2dcontext.hxx
+++ b/include/oox/drawingml/transform2dcontext.hxx
@@ -20,30 +20,26 @@
 #ifndef OOX_DRAWINGML_TRANSFORM2DCONTEXT_HXX
 #define OOX_DRAWINGML_TRANSFORM2DCONTEXT_HXX
 
-#include "oox/core/contexthandler.hxx"
+#include "oox/core/contexthandler2.hxx"
 
 namespace oox {
 namespace drawingml {
 
-// ============================================================================
-
 class Shape;
 
 /** context to import a CT_Transform2D */
-class Transform2DContext : public ::oox::core::ContextHandler
+class Transform2DContext : public ::oox::core::ContextHandler2
 {
 public:
-    Transform2DContext( ::oox::core::ContextHandler& rParent,
-        const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, Shape& rShape, bool btxXfrm = false ) throw();
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    Transform2DContext( ::oox::core::ContextHandler2Helper& rParent,
+                        const ::oox::AttributeList& rAttributes, Shape& rShape, bool btxXfrm = false ) throw();
+    virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     Shape&              mrShape;
     bool                mbtxXfrm;
 };
 
-// ============================================================================
-
 } // namespace drawingml
 } // namespace oox
 
diff --git a/include/oox/ppt/pptshapepropertiescontext.hxx b/include/oox/ppt/pptshapepropertiescontext.hxx
index f979c6e..eddf70d 100644
--- a/include/oox/ppt/pptshapepropertiescontext.hxx
+++ b/include/oox/ppt/pptshapepropertiescontext.hxx
@@ -27,10 +27,9 @@ namespace oox { namespace ppt {
 class PPTShapePropertiesContext : public ::oox::drawingml::ShapePropertiesContext
 {
 public:
-    PPTShapePropertiesContext( ::oox::core::ContextHandler& rParent, ::oox::drawingml::Shape& rShape );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL
-        createFastChildContext( ::sal_Int32 Element, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& Attribs )
-            throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    PPTShapePropertiesContext( ::oox::core::ContextHandler2Helper& rParent, ::oox::drawingml::Shape& rShape );
+    virtual ::oox::core::ContextHandlerRef
+        onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 };
 
 } }
diff --git a/oox/source/drawingml/clrschemecontext.cxx b/oox/source/drawingml/clrschemecontext.cxx
index 8a13b84..83244be 100644
--- a/oox/source/drawingml/clrschemecontext.cxx
+++ b/oox/source/drawingml/clrschemecontext.cxx
@@ -26,35 +26,35 @@ using namespace ::com::sun::star::xml::sax;
 
 namespace oox { namespace drawingml {
 
-static void setClrMap( const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes,
+static void setClrMap( const ::oox::AttributeList& rAttributes,
             ClrMap& rClrMap, sal_Int32 nToken )
 {
-    if ( xAttributes->hasAttribute( nToken ) )
+    if ( rAttributes.hasAttribute( nToken ) )
     {
-        sal_Int32 nMappedToken = xAttributes->getOptionalValueToken( nToken, 0 );
+        sal_Int32 nMappedToken = rAttributes.getToken( nToken, 0 );
         rClrMap.setColorMap( nToken, nMappedToken );
     }
 }
 
-clrMapContext::clrMapContext( ContextHandler& rParent,
-    const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes, ClrMap& rClrMap )
-: ContextHandler( rParent )
+clrMapContext::clrMapContext( ContextHandler2Helper& rParent,
+    const ::oox::AttributeList& rAttributes, ClrMap& rClrMap )
+: ContextHandler2( rParent )
 {
-    setClrMap( xAttributes, rClrMap, XML_bg1 );
-    setClrMap( xAttributes, rClrMap, XML_tx1 );
-    setClrMap( xAttributes, rClrMap, XML_bg2 );
-    setClrMap( xAttributes, rClrMap, XML_tx2 );
-    setClrMap( xAttributes, rClrMap, XML_accent1 );
-    setClrMap( xAttributes, rClrMap, XML_accent2 );
-    setClrMap( xAttributes, rClrMap, XML_accent3 );
-    setClrMap( xAttributes, rClrMap, XML_accent4 );
-    setClrMap( xAttributes, rClrMap, XML_accent5 );
-    setClrMap( xAttributes, rClrMap, XML_accent6 );
-    setClrMap( xAttributes, rClrMap, XML_hlink );
-    setClrMap( xAttributes, rClrMap, XML_folHlink );
+    setClrMap( rAttributes, rClrMap, XML_bg1 );
+    setClrMap( rAttributes, rClrMap, XML_tx1 );
+    setClrMap( rAttributes, rClrMap, XML_bg2 );
+    setClrMap( rAttributes, rClrMap, XML_tx2 );
+    setClrMap( rAttributes, rClrMap, XML_accent1 );
+    setClrMap( rAttributes, rClrMap, XML_accent2 );
+    setClrMap( rAttributes, rClrMap, XML_accent3 );
+    setClrMap( rAttributes, rClrMap, XML_accent4 );
+    setClrMap( rAttributes, rClrMap, XML_accent5 );
+    setClrMap( rAttributes, rClrMap, XML_accent6 );
+    setClrMap( rAttributes, rClrMap, XML_hlink );
+    setClrMap( rAttributes, rClrMap, XML_folHlink );
 }
 
-clrSchemeColorContext::clrSchemeColorContext( ContextHandler& rParent, ClrScheme& rClrScheme, sal_Int32 nColorToken ) :
+clrSchemeColorContext::clrSchemeColorContext( ContextHandler2Helper& rParent, ClrScheme& rClrScheme, sal_Int32 nColorToken ) :
     ColorContext( rParent, *this ),
     mrClrScheme( rClrScheme ),
     mnColorToken( nColorToken )
@@ -66,14 +66,14 @@ clrSchemeColorContext::~clrSchemeColorContext()
     mrClrScheme.setColor( mnColorToken, getColor( getFilter().getGraphicHelper() ) );
 }
 
-clrSchemeContext::clrSchemeContext( ContextHandler& rParent, ClrScheme& rClrScheme ) :
-    ContextHandler( rParent ),
+clrSchemeContext::clrSchemeContext( ContextHandler2Helper& rParent, ClrScheme& rClrScheme ) :
+    ContextHandler2( rParent ),
     mrClrScheme( rClrScheme )
 {
 }
 
-Reference< XFastContextHandler > clrSchemeContext::createFastChildContext(
-        sal_Int32 nElement, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
+ContextHandlerRef clrSchemeContext::onCreateContext(
+        sal_Int32 nElement, const AttributeList& )
 {
     switch( nElement )
     {
diff --git a/oox/source/drawingml/colorchoicecontext.cxx b/oox/source/drawingml/colorchoicecontext.cxx
index 40f1cd6..b33b6dd 100644
--- a/oox/source/drawingml/colorchoicecontext.cxx
+++ b/oox/source/drawingml/colorchoicecontext.cxx
@@ -33,56 +33,53 @@ namespace drawingml {
 
 // ============================================================================
 
-ColorValueContext::ColorValueContext( ContextHandler& rParent, Color& rColor ) :
-    ContextHandler( rParent ),
+ColorValueContext::ColorValueContext( ContextHandler2Helper& rParent, Color& rColor ) :
+    ContextHandler2( rParent ),
     mrColor( rColor )
 {
 }
 
-void ColorValueContext::startFastElement( sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs )
-    throw (SAXException, RuntimeException)
+void ColorValueContext::onStartElement( const AttributeList& rAttribs )
 {
-    AttributeList aAttribs( rxAttribs );
-    switch( nElement )
+    switch( getCurrentElement() )
     {
         case A_TOKEN( scrgbClr ):
             mrColor.setScrgbClr(
-                aAttribs.getInteger( XML_r, 0 ),
-                aAttribs.getInteger( XML_g, 0 ),
-                aAttribs.getInteger( XML_b, 0 ) );
+                rAttribs.getInteger( XML_r, 0 ),
+                rAttribs.getInteger( XML_g, 0 ),
+                rAttribs.getInteger( XML_b, 0 ) );
         break;
 
         case A_TOKEN( srgbClr ):
-            mrColor.setSrgbClr( aAttribs.getIntegerHex( XML_val, 0 ) );
+            mrColor.setSrgbClr( rAttribs.getIntegerHex( XML_val, 0 ) );
         break;
 
         case A_TOKEN( hslClr ):
             mrColor.setHslClr(
-                aAttribs.getInteger( XML_hue, 0 ),
-                aAttribs.getInteger( XML_sat, 0 ),
-                aAttribs.getInteger( XML_lum, 0 ) );
+                rAttribs.getInteger( XML_hue, 0 ),
+                rAttribs.getInteger( XML_sat, 0 ),
+                rAttribs.getInteger( XML_lum, 0 ) );
         break;
 
         case A_TOKEN( sysClr ):
             mrColor.setSysClr(
-                aAttribs.getToken( XML_val, XML_TOKEN_INVALID ),
-                aAttribs.getIntegerHex( XML_lastClr, -1 ) );
+                rAttribs.getToken( XML_val, XML_TOKEN_INVALID ),
+                rAttribs.getIntegerHex( XML_lastClr, -1 ) );
         break;
 
         case A_TOKEN( schemeClr ):
-            mrColor.setSchemeClr( aAttribs.getToken( XML_val, XML_TOKEN_INVALID ) );
+            mrColor.setSchemeClr( rAttribs.getToken( XML_val, XML_TOKEN_INVALID ) );
         break;
 
         case A_TOKEN( prstClr ):
-            mrColor.setPrstClr( aAttribs.getToken( XML_val, XML_TOKEN_INVALID ) );
+            mrColor.setPrstClr( rAttribs.getToken( XML_val, XML_TOKEN_INVALID ) );
         break;
     }
 }
 
-Reference< XFastContextHandler > ColorValueContext::createFastChildContext(
-        sal_Int32 nElement, const Reference< XFastAttributeList >& rxAttribs ) throw (SAXException, RuntimeException)
+::oox::core::ContextHandlerRef ColorValueContext::onCreateContext(
+        sal_Int32 nElement, const AttributeList& rAttribs )
 {
-    AttributeList aAttribs( rxAttribs );
     switch( nElement )
     {
         case A_TOKEN( alpha ):
@@ -108,7 +105,7 @@ Reference< XFastContextHandler > ColorValueContext::createFastChildContext(
         case A_TOKEN( satOff ):
         case A_TOKEN( shade ):
         case A_TOKEN( tint ):
-            mrColor.addTransformation( nElement, aAttribs.getInteger( XML_val, 0 ) );
+            mrColor.addTransformation( nElement, rAttribs.getInteger( XML_val, 0 ) );
         break;
         case A_TOKEN( comp ):
         case A_TOKEN( gamma ):
@@ -123,14 +120,14 @@ Reference< XFastContextHandler > ColorValueContext::createFastChildContext(
 
 // ============================================================================
 
-ColorContext::ColorContext( ContextHandler& rParent, Color& rColor ) :
-    ContextHandler( rParent ),
+ColorContext::ColorContext( ContextHandler2Helper& rParent, Color& rColor ) :
+    ContextHandler2( rParent ),
     mrColor( rColor )
 {
 }
 
-Reference< XFastContextHandler > ColorContext::createFastChildContext(
-        sal_Int32 nElement, const Reference< XFastAttributeList >& ) throw (SAXException, RuntimeException)
+::oox::core::ContextHandlerRef ColorContext::onCreateContext(
+        sal_Int32 nElement, const AttributeList& )
 {
     switch( nElement )
     {
diff --git a/oox/source/drawingml/customshapegeometry.cxx b/oox/source/drawingml/customshapegeometry.cxx
index 3155b89..6ad190d 100644
--- a/oox/source/drawingml/customshapegeometry.cxx
+++ b/oox/source/drawingml/customshapegeometry.cxx
@@ -440,19 +440,19 @@ static EnhancedCustomShapeParameter GetAdjCoordinate( CustomShapeProperties& rCu
 
 // ---------------------------------------------------------------------
 // CT_GeomGuideList
-class GeomGuideListContext : public ContextHandler
+class GeomGuideListContext : public ContextHandler2
 {
 public:
-    GeomGuideListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    GeomGuideListContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     std::vector< CustomShapeGuide >&    mrGuideList;
     CustomShapeProperties&              mrCustomShapeProperties;
 };
 
-GeomGuideListContext::GeomGuideListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList )
-: ContextHandler( rParent )
+GeomGuideListContext::GeomGuideListContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< CustomShapeGuide >& rGuideList )
+: ContextHandler2( rParent )
 , mrGuideList( rGuideList )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
@@ -624,13 +624,13 @@ static OUString convertToOOEquation( CustomShapeProperties& rCustomShapeProperti
     return aEquation;
 }
 
-Reference< XFastContextHandler > GeomGuideListContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef GeomGuideListContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
 {
     if ( aElementToken == A_TOKEN( gd ) )   // CT_GeomGuide
     {
         CustomShapeGuide aGuide;
-        aGuide.maName = xAttribs->getOptionalValue( XML_name );
-        aGuide.maFormula = convertToOOEquation( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_fmla ) );
+        aGuide.maName = rAttribs.getString( XML_name ).get();
+        aGuide.maFormula = convertToOOEquation( mrCustomShapeProperties, rAttribs.getString( XML_fmla ).get() );
         mrGuideList.push_back( aGuide );
     }
     return this;
@@ -645,257 +645,249 @@ static const OUString GetGeomGuideName( const OUString& rValue )
 
 // ---------------------------------------------------------------------
 // CT_AdjPoint2D
-class AdjPoint2DContext : public ContextHandler
+class AdjPoint2DContext : public ContextHandler2
 {
 public:
-    AdjPoint2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
+    AdjPoint2DContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
 };
 
-AdjPoint2DContext::AdjPoint2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
-: ContextHandler( rParent )
+AdjPoint2DContext::AdjPoint2DContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
+: ContextHandler2( rParent )
 {
-    rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_x ), sal_True );
-    rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, xAttribs->getOptionalValue( XML_y ), sal_True );
+    rAdjPoint2D.First = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_x ).get(), sal_True );
+    rAdjPoint2D.Second = GetAdjCoordinate( rCustomShapeProperties, rAttribs.getString( XML_y ).get(), sal_True );
 }
 
 // ---------------------------------------------------------------------
 // CT_XYAdjustHandle
-class XYAdjustHandleContext : public ContextHandler
+class XYAdjustHandleContext : public ContextHandler2
 {
 public:
-    XYAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    XYAdjustHandleContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     AdjustHandle& mrAdjustHandle;
     CustomShapeProperties& mrCustomShapeProperties;
 };
 
-XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
-: ContextHandler( rParent )
+XYAdjustHandleContext::XYAdjustHandleContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
+: ContextHandler2( rParent )
 , mrAdjustHandle( rAdjustHandle )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
     const OUString aEmptyDefault;
-    AttributeList aAttribs( xAttribs );
-    if ( aAttribs.hasAttribute( XML_gdRefX ) )
+    if ( rAttribs.hasAttribute( XML_gdRefX ) )
     {
-        mrAdjustHandle.gdRef1 = GetGeomGuideName( aAttribs.getString( XML_gdRefX, aEmptyDefault ) );
+        mrAdjustHandle.gdRef1 = GetGeomGuideName( rAttribs.getString( XML_gdRefX, aEmptyDefault ) );
     }
-    if ( aAttribs.hasAttribute( XML_minX ) )
+    if ( rAttribs.hasAttribute( XML_minX ) )
     {
-        mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minX, aEmptyDefault ), sal_True );
+        mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minX, aEmptyDefault ), sal_True );
     }
-    if ( aAttribs.hasAttribute( XML_maxX ) )
+    if ( rAttribs.hasAttribute( XML_maxX ) )
     {
-        mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxX, aEmptyDefault ), sal_True );
+        mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxX, aEmptyDefault ), sal_True );
     }
-    if ( aAttribs.hasAttribute( XML_gdRefY ) )
+    if ( rAttribs.hasAttribute( XML_gdRefY ) )
     {
-        mrAdjustHandle.gdRef2 = GetGeomGuideName( aAttribs.getString( XML_gdRefY, aEmptyDefault ) );
+        mrAdjustHandle.gdRef2 = GetGeomGuideName( rAttribs.getString( XML_gdRefY, aEmptyDefault ) );
     }
-    if ( aAttribs.hasAttribute( XML_minY ) )
+    if ( rAttribs.hasAttribute( XML_minY ) )
     {
-        mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minY, aEmptyDefault ), sal_True );
+        mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minY, aEmptyDefault ), sal_True );
     }
-    if ( aAttribs.hasAttribute( XML_maxY ) )
+    if ( rAttribs.hasAttribute( XML_maxY ) )
     {
-        mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxY, aEmptyDefault ), sal_True );
+        mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxY, aEmptyDefault ), sal_True );
     }
 }
 
-Reference< XFastContextHandler > XYAdjustHandleContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef XYAdjustHandleContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
 {
-    Reference< XFastContextHandler > xContext;
     if ( aElementToken == A_TOKEN( pos ) )
-        xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandle.pos );   // CT_AdjPoint2D
-    return xContext;
+        return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandle.pos );   // CT_AdjPoint2D
+    return 0;
 }
 
 // ---------------------------------------------------------------------
 // CT_PolarAdjustHandle
-class PolarAdjustHandleContext : public ContextHandler
+class PolarAdjustHandleContext : public ContextHandler2
 {
 public:
-    PolarAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    PolarAdjustHandleContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     AdjustHandle& mrAdjustHandle;
     CustomShapeProperties& mrCustomShapeProperties;
 };
 
-PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
-: ContextHandler( rParent )
+PolarAdjustHandleContext::PolarAdjustHandleContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, AdjustHandle& rAdjustHandle )
+: ContextHandler2( rParent )
 , mrAdjustHandle( rAdjustHandle )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
     const OUString aEmptyDefault;
-    AttributeList aAttribs( xAttribs );
-    if ( aAttribs.hasAttribute( XML_gdRefR ) )
+    if ( rAttribs.hasAttribute( XML_gdRefR ) )
     {
-        mrAdjustHandle.gdRef1 = GetGeomGuideName( aAttribs.getString( XML_gdRefR, aEmptyDefault ) );
+        mrAdjustHandle.gdRef1 = GetGeomGuideName( rAttribs.getString( XML_gdRefR, aEmptyDefault ) );
     }
-    if ( aAttribs.hasAttribute( XML_minR ) )
+    if ( rAttribs.hasAttribute( XML_minR ) )
     {
-        mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minR, aEmptyDefault ), sal_True );
+        mrAdjustHandle.min1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minR, aEmptyDefault ), sal_True );
     }
-    if ( aAttribs.hasAttribute( XML_maxR ) )
+    if ( rAttribs.hasAttribute( XML_maxR ) )
     {
-        mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxR, aEmptyDefault ), sal_True );
+        mrAdjustHandle.max1 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxR, aEmptyDefault ), sal_True );
     }
-    if ( aAttribs.hasAttribute( XML_gdRefAng ) )
+    if ( rAttribs.hasAttribute( XML_gdRefAng ) )
     {
-        mrAdjustHandle.gdRef2 = GetGeomGuideName( aAttribs.getString( XML_gdRefAng, aEmptyDefault ) );
+        mrAdjustHandle.gdRef2 = GetGeomGuideName( rAttribs.getString( XML_gdRefAng, aEmptyDefault ) );
     }
-    if ( aAttribs.hasAttribute( XML_minAng ) )
+    if ( rAttribs.hasAttribute( XML_minAng ) )
     {
-        mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_minAng, aEmptyDefault ) );
+        mrAdjustHandle.min2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_minAng, aEmptyDefault ) );
     }
-    if ( aAttribs.hasAttribute( XML_maxAng ) )
+    if ( rAttribs.hasAttribute( XML_maxAng ) )
     {
-        mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, aAttribs.getString( XML_maxAng, aEmptyDefault ) );
+        mrAdjustHandle.max2 = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_maxAng, aEmptyDefault ) );
     }
 }
 
-Reference< XFastContextHandler > PolarAdjustHandleContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef PolarAdjustHandleContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
 {
-    Reference< XFastContextHandler > xContext;
     if ( aElementToken == A_TOKEN( pos ) )
-        xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandle.pos );   // CT_AdjPoint2D
-    return xContext;
+        return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandle.pos );   // CT_AdjPoint2D
+    return 0;
 }
 
 // ---------------------------------------------------------------------
 // CT_AdjustHandleList
-class AdjustHandleListContext : public ContextHandler
+class AdjustHandleListContext : public ContextHandler2
 {
 public:
-    AdjustHandleListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    AdjustHandleListContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     std::vector< AdjustHandle >& mrAdjustHandleList;
     CustomShapeProperties& mrCustomShapeProperties;
 };
 
-AdjustHandleListContext::AdjustHandleListContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList )
-: ContextHandler( rParent )
+AdjustHandleListContext::AdjustHandleListContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties, std::vector< AdjustHandle >& rAdjustHandleList )
+: ContextHandler2( rParent )
 , mrAdjustHandleList( rAdjustHandleList )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
 }
 
-Reference< XFastContextHandler > AdjustHandleListContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef AdjustHandleListContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
 {
-    Reference< XFastContextHandler > xContext;
     if ( aElementToken == A_TOKEN( ahXY ) )         // CT_XYAdjustHandle
     {
         AdjustHandle aAdjustHandle( sal_False );
         mrAdjustHandleList.push_back( aAdjustHandle );
-        xContext = new XYAdjustHandleContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() );
+        return new XYAdjustHandleContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() );
     }
     else if ( aElementToken == A_TOKEN( ahPolar ) ) // CT_PolarAdjustHandle
     {
         AdjustHandle aAdjustHandle( sal_True );
         mrAdjustHandleList.push_back( aAdjustHandle );
-        xContext = new PolarAdjustHandleContext( *this, xAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() );
+        return new PolarAdjustHandleContext( *this, rAttribs, mrCustomShapeProperties, mrAdjustHandleList.back() );
     }
-    return xContext;
+    return 0;
 }
 
 // ---------------------------------------------------------------------
 // CT_ConnectionSite
-class ConnectionSiteContext : public ContextHandler
+class ConnectionSiteContext : public ContextHandler2
 {
 public:
-    ConnectionSiteContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    ConnectionSiteContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     ConnectionSite& mrConnectionSite;
     CustomShapeProperties& mrCustomShapeProperties;
 };
 
-ConnectionSiteContext::ConnectionSiteContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite )
-: ContextHandler( rParent )
+ConnectionSiteContext::ConnectionSiteContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, ConnectionSite& rConnectionSite )
+: ContextHandler2( rParent )
 , mrConnectionSite( rConnectionSite )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
-    mrConnectionSite.ang = GetAdjCoordinate( mrCustomShapeProperties, xAttribs->getOptionalValue( XML_ang ) );
+    mrConnectionSite.ang = GetAdjCoordinate( mrCustomShapeProperties, rAttribs.getString( XML_ang ).get() );
 }
 
-Reference< XFastContextHandler > ConnectionSiteContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef ConnectionSiteContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
 {
-    Reference< XFastContextHandler > xContext;
     if ( aElementToken == A_TOKEN( pos ) )
-        xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrConnectionSite.pos ); // CT_AdjPoint2D
-    return xContext;
+        return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrConnectionSite.pos ); // CT_AdjPoint2D
+    return 0;
 }
 
 // ---------------------------------------------------------------------
 // CT_Path2DMoveTo
-class Path2DMoveToContext : public ContextHandler
+class Path2DMoveToContext : public ContextHandler2
 {
 public:
-    Path2DMoveToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    Path2DMoveToContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     EnhancedCustomShapeParameterPair& mrAdjPoint2D;
     CustomShapeProperties& mrCustomShapeProperties;
 };
 
-Path2DMoveToContext::Path2DMoveToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
-: ContextHandler( rParent )
+Path2DMoveToContext::Path2DMoveToContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
+: ContextHandler2( rParent )
 , mrAdjPoint2D( rAdjPoint2D )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
 }
 
-Reference< XFastContextHandler > Path2DMoveToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef Path2DMoveToContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
 {
-    Reference< XFastContextHandler > xContext;
     if ( aElementToken == A_TOKEN( pt ) )
-        xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjPoint2D );     // CT_AdjPoint2D
-    return xContext;
+        return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjPoint2D );     // CT_AdjPoint2D
+    return 0;
 }
 
 // ---------------------------------------------------------------------
 // CT_Path2DLineTo
-class Path2DLineToContext : public ContextHandler
+class Path2DLineToContext : public ContextHandler2
 {
 public:
-    Path2DLineToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    Path2DLineToContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     EnhancedCustomShapeParameterPair& mrAdjPoint2D;
     CustomShapeProperties& mrCustomShapeProperties;
 };
 
-Path2DLineToContext::Path2DLineToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
-: ContextHandler( rParent )
+Path2DLineToContext::Path2DLineToContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rAdjPoint2D )
+: ContextHandler2( rParent )
 , mrAdjPoint2D( rAdjPoint2D )
 , mrCustomShapeProperties( rCustomShapeProperties )
 {
 }
 
-Reference< XFastContextHandler > Path2DLineToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef Path2DLineToContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
 {
-    Reference< XFastContextHandler > xContext;
     if ( aElementToken == A_TOKEN( pt ) )
-        xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, mrAdjPoint2D );     // CT_AdjPoint2D
-    return xContext;
+        return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, mrAdjPoint2D );     // CT_AdjPoint2D
+    return 0;
 }
 
 // ---------------------------------------------------------------------
 // CT_Path2DQuadBezierTo
-class Path2DQuadBezierToContext : public ContextHandler
+class Path2DQuadBezierToContext : public ContextHandler2
 {
 public:
-    Path2DQuadBezierToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rPt1, EnhancedCustomShapeParameterPair& rPt2 );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    Path2DQuadBezierToContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties, EnhancedCustomShapeParameterPair& rPt1, EnhancedCustomShapeParameterPair& rPt2 );
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     EnhancedCustomShapeParameterPair& mrPt1;
@@ -904,11 +896,11 @@ protected:
     CustomShapeProperties& mrCustomShapeProperties;
 };
 
-Path2DQuadBezierToContext::Path2DQuadBezierToContext( ContextHandler& rParent,
+Path2DQuadBezierToContext::Path2DQuadBezierToContext( ContextHandler2Helper& rParent,
     CustomShapeProperties& rCustomShapeProperties,
         EnhancedCustomShapeParameterPair& rPt1,
             EnhancedCustomShapeParameterPair& rPt2 )
-: ContextHandler( rParent )
+: ContextHandler2( rParent )
 , mrPt1( rPt1 )
 , mrPt2( rPt2 )
 , nCount( 0 )
@@ -916,22 +908,21 @@ Path2DQuadBezierToContext::Path2DQuadBezierToContext( ContextHandler& rParent,
 {
 }
 
-Reference< XFastContextHandler > Path2DQuadBezierToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef Path2DQuadBezierToContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
 {
-    Reference< XFastContextHandler > xContext;
     if ( aElementToken == A_TOKEN( pt ) )
-        xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties, nCount++ ? mrPt2 : mrPt1 ); // CT_AdjPoint2D
-    return xContext;
+        return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties, nCount++ ? mrPt2 : mrPt1 ); // CT_AdjPoint2D
+    return 0;
 }
 
 // ---------------------------------------------------------------------
 // CT_Path2DCubicBezierTo
-class Path2DCubicBezierToContext : public ContextHandler
+class Path2DCubicBezierToContext : public ContextHandler2
 {
 public:
-    Path2DCubicBezierToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties,
+    Path2DCubicBezierToContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties,
         EnhancedCustomShapeParameterPair&, EnhancedCustomShapeParameterPair&, EnhancedCustomShapeParameterPair& );
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext( sal_Int32 aElementToken, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttribs ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
+    virtual ::oox::core::ContextHandlerRef onCreateContext( sal_Int32 aElementToken, const ::oox::AttributeList& rAttribs ) SAL_OVERRIDE;
 
 protected:
     CustomShapeProperties& mrCustomShapeProperties;
@@ -941,11 +932,11 @@ protected:
     int nCount;
 };
 
-Path2DCubicBezierToContext::Path2DCubicBezierToContext( ContextHandler& rParent, CustomShapeProperties& rCustomShapeProperties,
+Path2DCubicBezierToContext::Path2DCubicBezierToContext( ContextHandler2Helper& rParent, CustomShapeProperties& rCustomShapeProperties,
     EnhancedCustomShapeParameterPair& rControlPt1,
         EnhancedCustomShapeParameterPair& rControlPt2,
             EnhancedCustomShapeParameterPair& rEndPt )
-: ContextHandler( rParent )
+: ContextHandler2( rParent )
 , mrCustomShapeProperties( rCustomShapeProperties )
 , mrControlPt1( rControlPt1 )
 , mrControlPt2( rControlPt2 )
@@ -954,25 +945,23 @@ Path2DCubicBezierToContext::Path2DCubicBezierToContext( ContextHandler& rParent,
 {
 }
 
-Reference< XFastContextHandler > Path2DCubicBezierToContext::createFastChildContext( sal_Int32 aElementToken, const Reference< XFastAttributeList >& xAttribs ) throw (SAXException, RuntimeException)
+ContextHandlerRef Path2DCubicBezierToContext::onCreateContext( sal_Int32 aElementToken, const AttributeList& rAttribs )
 {
-    Reference< XFastContextHandler > xContext;
     if ( aElementToken == A_TOKEN( pt ) )
-        xContext = new AdjPoint2DContext( *this, xAttribs, mrCustomShapeProperties,
+        return new AdjPoint2DContext( *this, rAttribs, mrCustomShapeProperties,
             nCount++ ? nCount == 2 ? mrControlPt2 : mrEndPt : mrControlPt1 );   // CT_AdjPoint2D
-    return xContext;
+    return 0;
 }
 
 // ---------------------------------------------------------------------
 // CT_Path2DContext
-class Path2DContext : public ContextHandler
+class Path2DContext : public ContextHandler2
 {
 public:
-    Path2DContext( ContextHandler& rParent, const Reference< XFastAttributeList >& xAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D );
+    Path2DContext( ContextHandler2Helper& rParent, const AttributeList& rAttribs, CustomShapeProperties& rCustomShapeProperties, std::vector< com::sun::star::drawing::EnhancedCustomShapeSegment >& rSegments, Path2D& rPath2D );
     virtual ~Path2DContext();

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list