diff options
author | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2013-01-01 21:38:06 +0100 |
---|---|---|
committer | Chr. Rossmanith <ChrRossmanith@gmx.de> | 2013-01-07 19:39:46 +0100 |
commit | 6eb0522395c236ae6930a300992ad092449f9592 (patch) | |
tree | 0302cf16978c9cc6b91af9735b2ecc0f49b79422 /xmloff/source/style/FillStyleContext.hxx | |
parent | f1043aaed082824ca423eee10be5802873e058f3 (diff) |
dummy commit (WIP)
Change-Id: Ibeee6553312323b75b2403ad6832595f228e0e3c
Diffstat (limited to 'xmloff/source/style/FillStyleContext.hxx')
-rw-r--r-- | xmloff/source/style/FillStyleContext.hxx | 67 |
1 files changed, 65 insertions, 2 deletions
diff --git a/xmloff/source/style/FillStyleContext.hxx b/xmloff/source/style/FillStyleContext.hxx index b8d1d795864b..f90c100e3017 100644 --- a/xmloff/source/style/FillStyleContext.hxx +++ b/xmloff/source/style/FillStyleContext.hxx @@ -21,11 +21,12 @@ #define _XMLOFF_FILLSTYLECONTEXTS_HXX_ #include <com/sun/star/io/XOutputStream.hpp> +#include <com/sun/star/util/Color.hpp> #include <xmloff/xmlstyle.hxx> -#include<rtl/ustring.hxx> +#include <rtl/ustring.hxx> ////////////////////////////////////////////////////////////////////////////// -// draw:gardient context +// draw:gradient context class XMLGradientStyleContext: public SvXMLStyleContext { @@ -46,6 +47,68 @@ public: }; ////////////////////////////////////////////////////////////////////////////// +// svg:linearGradient context +class XMLLinearGradientStyleContext: public SvXMLStyleContext +{ +private: + ::com::sun::star::uno::Any maAny; + rtl::OUString maStrName; + ::std::vector< ::com::sun::star::util::Color > mStopColors; + ::std::vector< double > mStopOffsets; + +public: + TYPEINFO(); + + XMLLinearGradientStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const rtl::OUString& rLName, + const com::sun::star::uno::Reference< + com::sun::star::xml::sax::XAttributeList> & xAttrList ); + virtual ~XMLLinearGradientStyleContext(); + + virtual void EndElement(); + + virtual sal_Bool IsTransient() const; + + void SetGradientStop( ::com::sun::star::util::Color aColor, double aOffset); + +protected: + virtual SvXMLImportContext *CreateChildContext( + sal_uInt16 nPrefix, + const ::rtl::OUString& rLocalName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::sax::XAttributeList> & xAttrList ); +}; + +////////////////////////////////////////////////////////////////////////////// +// import svg:stop elements +class XMLSvgGradientStopImportContext : public SvXMLImportContext +{ + XMLLinearGradientStyleContext& rGradientStyleContext; + +private: + ::com::sun::star::uno::Any maAny; + +public: + + TYPEINFO(); + + XMLSvgGradientStopImportContext( + SvXMLImport& rImport, + sal_uInt16 nPrfx, + const ::rtl::OUString& rLocalName, + XMLLinearGradientStyleContext& rGradientStyle); + + ~XMLSvgGradientStopImportContext(); + +protected: + + virtual void StartElement( + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::sax::XAttributeList> & xAttrList); + + virtual void EndElement(); +}; + +////////////////////////////////////////////////////////////////////////////// // draw:hatch context class XMLHatchStyleContext: public SvXMLStyleContext |