INTEGRATION: CWS xmlfilter03_DEV300 (1.2.4); FILE MERGED

2008/02/04 13:31:34 dr 1.2.4.1: rework of fragment handler/context handler base classes
This commit is contained in:
Kurt Zenker 2008-03-05 16:46:56 +00:00
parent 651dd69929
commit 8ebb372fe5
11 changed files with 75 additions and 101 deletions

View file

@ -4,9 +4,9 @@
*
* $RCSfile: shapecontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:42:20 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -38,23 +38,21 @@
#include <com/sun/star/drawing/XShapes.hpp>
#include "oox/core/context.hxx"
#include "oox/core/contexthandler.hxx"
#include "oox/drawingml/shape.hxx"
#include "oox/drawingml/shapepropertiescontext.hxx"
namespace oox { namespace drawingml {
class ShapeContext : public ::oox::core::Context
class ShapeContext : public ::oox::core::ContextHandler
{
public:
ShapeContext( const ::oox::core::FragmentHandlerRef& xHandler, oox::drawingml::ShapePtr pMasterShapePtr, oox::drawingml::ShapePtr pShapePtr );
ShapeContext( ::oox::core::ContextHandler& rParent, ShapePtr pMasterShapePtr, ShapePtr pShapePtr );
virtual ~ShapeContext();
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);
const ::oox::core::XmlFilterRef& GetFilter() const { return mxHandler->getFilter(); }
ShapePtr getShape();
protected:

View file

@ -4,9 +4,9 @@
*
* $RCSfile: shapepropertiescontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:42:56 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -36,22 +36,21 @@
#ifndef OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
#define OOX_DRAWINGML_SHAPEPROPERTIESCONTEXT_HXX
#include "oox/core/context.hxx"
#include "oox/core/contexthandler.hxx"
#include "oox/drawingml/shape.hxx"
namespace oox { namespace drawingml {
class ShapePropertiesContext : public ::oox::core::Context
class ShapePropertiesContext : public ::oox::core::ContextHandler
{
public:
ShapePropertiesContext( const ::oox::core::ContextRef& xParent, ::oox::drawingml::Shape& rShape );
ShapePropertiesContext( ::oox::core::ContextHandler& rParent, Shape& rShape );
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);
protected:
::oox::core::ContextRef mxParent;
::oox::drawingml::Shape& mrShape;
Shape& mrShape;
};
} }

View file

@ -4,9 +4,9 @@
*
* $RCSfile: shapestylecontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:43:16 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -37,24 +37,21 @@
#define OOX_DRAWINGML_SHAPESTYLECONTEXT_HXX
#include "oox/drawingml/shape.hxx"
#ifndef OOX_CORE_CONTEXT_HXX
#include "oox/core/context.hxx"
#endif
#include "oox/core/contexthandler.hxx"
namespace oox { namespace drawingml {
class ShapeStyleContext : public ::oox::core::Context
class ShapeStyleContext : public ::oox::core::ContextHandler
{
public:
ShapeStyleContext( const ::oox::core::ContextRef& xParent, oox::drawingml::Shape& rShape );
ShapeStyleContext( ::oox::core::ContextHandler& 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);
protected:
::oox::drawingml::Shape& mrShape;
Shape& mrShape;
};
} }

View file

@ -4,9 +4,9 @@
*
* $RCSfile: spdefcontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:43:36 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -37,19 +37,18 @@
#define OOX_DRAWINGML_SPDEFCONTEXT_HXX
#include "oox/drawingml/shape.hxx"
#include "oox/core/context.hxx"
#include "oox/core/fragmenthandler.hxx"
#include "oox/core/contexthandler.hxx"
namespace oox { namespace drawingml {
class spDefContext : public oox::core::Context
class spDefContext : public oox::core::ContextHandler
{
public:
spDefContext( const ::oox::core::FragmentHandlerRef& xHandler, oox::drawingml::Shape& rDefaultObject );
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);
protected:
oox::drawingml::Shape& mrDefaultObject;
Shape& mrDefaultObject;
};
} }

View file

@ -4,9 +4,9 @@
*
* $RCSfile: textbodycontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:44:03 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -43,40 +43,37 @@
#include "oox/drawingml/shape.hxx"
#include "oox/drawingml/textbody.hxx"
#include "oox/drawingml/textrun.hxx"
#ifndef OOX_CORE_CONTEXT_HXX
#include "oox/core/context.hxx"
#endif
#include "oox/core/contexthandler.hxx"
namespace oox { namespace drawingml {
class TextBodyContext : public ::oox::core::Context
class TextBodyContext : public ::oox::core::ContextHandler
{
public:
TextBodyContext( const ::oox::core::FragmentHandlerRef& xHandler, oox::drawingml::Shape& rShape );
TextBodyContext( ::oox::core::ContextHandler& rParent, Shape& rShape );
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);
protected:
oox::drawingml::Shape& mrShape;
oox::drawingml::TextBodyPtr mpBodyPtr;
Shape& mrShape;
TextBodyPtr mpBodyPtr;
::com::sun::star::uno::Reference< ::com::sun::star::text::XText > mxText;
};
// CT_RegularTextRun
class RegularTextRunContext : public ::oox::core::Context
class RegularTextRunContext : public ::oox::core::ContextHandler
{
public:
RegularTextRunContext( const ::oox::core::FragmentHandlerRef& xHandler, oox::drawingml::TextRunPtr pRunPtr );
RegularTextRunContext( ::oox::core::ContextHandler& 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 ::rtl::OUString& aChars ) throw (::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeException);
protected:
oox::drawingml::TextRunPtr mpRunPtr;
bool mbIsInText;
TextRunPtr mpRunPtr;
bool mbIsInText;
};
} }

View file

@ -4,9 +4,9 @@
*
* $RCSfile: textbodypropertiescontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:44:18 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -37,25 +37,22 @@
#define OOX_DRAWINGML_TEXTBODYPROPERTIESCONTEXT_HXX
#include "oox/drawingml/shape.hxx"
#ifndef OOX_CORE_CONTEXT_HXX
#include "oox/core/context.hxx"
#endif
#include "oox/core/contexthandler.hxx"
namespace oox { namespace drawingml {
class TextBodyPropertiesContext : public ::oox::core::Context
class TextBodyPropertiesContext : public ::oox::core::ContextHandler
{
public:
TextBodyPropertiesContext( const ::oox::core::ContextRef& xParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes,
oox::drawingml::Shape& rShape );
TextBodyPropertiesContext( ::oox::core::ContextHandler& rParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& xAttributes,
Shape& rShape );
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);
protected:
::oox::drawingml::Shape& mrShape;
Shape& mrShape;
};
} }

View file

@ -4,9 +4,9 @@
*
* $RCSfile: textcharacterpropertiescontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:44:31 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -36,25 +36,25 @@
#ifndef OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
#define OOX_DRAWINGML_TEXTCHARACTERPROPERTIESCONTEXT_HXX
#include "oox/core/context.hxx"
#include "oox/core/contexthandler.hxx"
#include "oox/drawingml/textparagraphproperties.hxx"
#include "oox/drawingml/textfont.hxx"
namespace oox { namespace drawingml {
class TextCharacterPropertiesContext : public ::oox::core::Context
class TextCharacterPropertiesContext : public ::oox::core::ContextHandler
{
public:
TextCharacterPropertiesContext( const ::oox::core::ContextRef& xParent,
TextCharacterPropertiesContext( ::oox::core::ContextHandler& rParent,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XFastAttributeList >& rXAttributes,
oox::drawingml::TextCharacterProperties& rTextCharacterProperties );
TextCharacterProperties& rTextCharacterProperties );
~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);
protected:
::oox::drawingml::TextCharacterProperties& mrTextCharacterProperties;
TextCharacterProperties& mrTextCharacterProperties;
bool mbHasHighlightColor;
TextFont maLatinFont;
TextFont maAsianFont;

View file

@ -4,9 +4,9 @@
*
* $RCSfile: textfieldcontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:44:59 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -36,21 +36,18 @@
#ifndef OOX_DRAWINGML_TEXTFIELDCONTEXT_HXX
#define OOX_DRAWINGML_TEXTFIELDCONTEXT_HXX
#ifndef OOX_CORE_CONTEXT_HXX
#include "oox/core/context.hxx"
#endif
#include "oox/core/contexthandler.hxx"
#include "oox/drawingml/textfield.hxx"
namespace oox { namespace drawingml {
class TextFieldContext
: public ::oox::core::Context
: public ::oox::core::ContextHandler
{
public:
TextFieldContext( const ::oox::core::ContextRef& xParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rXAttributes,
const TextFieldPtr & pTextField);
TextFieldContext( ::oox::core::ContextHandler& rParent,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XFastAttributeList >& rXAttributes,
const TextFieldPtr & pTextField);
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 ::rtl::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(

View file

@ -4,9 +4,9 @@
*
* $RCSfile: textliststylecontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:45:29 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -37,25 +37,21 @@
#define OOX_DRAWINGML_TEXTLISTSTYLECONTEXT_HXX
#include "oox/drawingml/textliststyle.hxx"
#include "oox/core/fragmenthandler.hxx"
#ifndef OOX_CORE_CONTEXT_HXX
#include "oox/core/context.hxx"
#endif
#include "oox/core/contexthandler.hxx"
namespace oox { namespace drawingml {
class TextListStyleContext : public ::oox::core::Context
class TextListStyleContext : public ::oox::core::ContextHandler
{
public:
TextListStyleContext( const ::oox::core::FragmentHandlerRef& xHandler, oox::drawingml::TextListStyle& rTextListStyle );
TextListStyleContext( ::oox::core::ContextHandler& 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);
protected:
::oox::drawingml::TextListStyle& mrTextListStyle;
TextListStyle& mrTextListStyle;
};
} }

View file

@ -4,9 +4,9 @@
*
* $RCSfile: textparagraphpropertiescontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:46:03 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -41,26 +41,23 @@
#include <com/sun/star/style/TabStop.hpp>
#include "oox/drawingml/textparagraphproperties.hxx"
#include "oox/drawingml/textspacing.hxx"
#ifndef OOX_CORE_CONTEXT_HXX
#include "oox/core/context.hxx"
#endif
#include "oox/core/contexthandler.hxx"
namespace oox { namespace drawingml {
class TextParagraphPropertiesContext : public ::oox::core::Context
class TextParagraphPropertiesContext : public ::oox::core::ContextHandler
{
public:
TextParagraphPropertiesContext( const ::oox::core::ContextRef& xParent,
TextParagraphPropertiesContext( ::oox::core::ContextHandler& rParent,
const com::sun::star::uno::Reference< com::sun::star::xml::sax::XFastAttributeList >& rXAttributes,
oox::drawingml::TextParagraphProperties& rTextParagraphProperties );
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);
protected:
::oox::drawingml::TextParagraphProperties& mrTextParagraphProperties;
TextParagraphProperties& mrTextParagraphProperties;
TextSpacing maLineSpacing;
TextSpacing& mrSpaceBefore;
TextSpacing& mrSpaceAfter;

View file

@ -4,9 +4,9 @@
*
* $RCSfile: themeelementscontext.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: rt $ $Date: 2008-01-17 08:05:45 $
* last change: $Author: kz $ $Date: 2008-03-05 17:46:56 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@ -36,24 +36,21 @@
#ifndef OOX_DRAWINGML_THEMEELEMENTSCONTEXT_HXX
#define OOX_DRAWINGML_THEMEELEMENTSCONTEXT_HXX
#include "oox/core/context.hxx"
#include "oox/core/fragmenthandler.hxx"
#include "oox/core/contexthandler.hxx"
#include "oox/drawingml/theme.hxx"
namespace oox { namespace drawingml {
class themeElementsContext : public oox::core::Context
class themeElementsContext : public oox::core::ContextHandler
{
public:
themeElementsContext( const ::oox::core::FragmentHandlerRef& xHandler, oox::drawingml::Theme& );
themeElementsContext( ::oox::core::ContextHandler& rParent, Theme& );
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);
private:
oox::drawingml::Theme& mrTheme;
Theme& mrTheme;
};