From d28f0bfda55eebc34bbe5aab22f430ee37ef7e9b Mon Sep 17 00:00:00 2001 From: Luboš Luňák Date: Wed, 23 Jan 2013 16:31:31 +0100 Subject: move class definition to a header file Change-Id: Id41200667089d4f42f7999060fd97545bb069788 --- xmloff/inc/xmloff/XMLFontStylesContext.hxx | 43 ++++++++++++++++++++++++++++ xmloff/source/style/XMLFontStylesContext.cxx | 41 +------------------------- 2 files changed, 44 insertions(+), 40 deletions(-) diff --git a/xmloff/inc/xmloff/XMLFontStylesContext.hxx b/xmloff/inc/xmloff/XMLFontStylesContext.hxx index afd495c17b44..e48ae0a60c48 100644 --- a/xmloff/inc/xmloff/XMLFontStylesContext.hxx +++ b/xmloff/inc/xmloff/XMLFontStylesContext.hxx @@ -84,6 +84,49 @@ public: }; +/// Handles +class XMLFontStyleContext_Impl : public SvXMLStyleContext +{ + ::com::sun::star::uno::Any aFamilyName; + ::com::sun::star::uno::Any aStyleName; + ::com::sun::star::uno::Any aFamily; + ::com::sun::star::uno::Any aPitch; + ::com::sun::star::uno::Any aEnc; + + SvXMLImportContextRef xStyles; + + XMLFontStylesContext *GetStyles() + { + return ((XMLFontStylesContext *)&xStyles); + } + +public: + + TYPEINFO(); + + XMLFontStyleContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx, + const ::rtl::OUString& rLName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::sax::XAttributeList > & xAttrList, + XMLFontStylesContext& rStyles ); + virtual ~XMLFontStyleContext_Impl(); + + void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName, + const OUString& rValue ); + + void FillProperties( ::std::vector< XMLPropertyState > &rProps, + sal_Int32 nFamilyNameIdx, + sal_Int32 nStyleNameIdx, + sal_Int32 nFamilyIdx, + sal_Int32 nPitchIdx, + sal_Int32 nCharsetIdx ) const; + + SvXMLImportContext * CreateChildContext( + sal_uInt16 nPrefix, + const ::rtl::OUString& rLocalName, + const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList ); +}; + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/xmloff/source/style/XMLFontStylesContext.cxx b/xmloff/source/style/XMLFontStylesContext.cxx index 5997f1912c62..6a6e290f53d8 100644 --- a/xmloff/source/style/XMLFontStylesContext.cxx +++ b/xmloff/source/style/XMLFontStylesContext.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include @@ -29,8 +30,6 @@ #include "fonthdl.hxx" #include #include -#include - using ::rtl::OUString; using ::rtl::OUStringBuffer; @@ -78,44 +77,6 @@ static const SvXMLTokenMapEntry* lcl_getFontStyleAttrTokenMap() return aFontStyleAttrTokenMap; } -class XMLFontStyleContext_Impl : public SvXMLStyleContext -{ - Any aFamilyName; - Any aStyleName; - Any aFamily; - Any aPitch; - Any aEnc; - - SvXMLImportContextRef xStyles; - - XMLFontStylesContext *GetStyles() - { - return ((XMLFontStylesContext *)&xStyles); - } - -public: - - TYPEINFO(); - - XMLFontStyleContext_Impl( SvXMLImport& rImport, sal_uInt16 nPrfx, - const ::rtl::OUString& rLName, - const ::com::sun::star::uno::Reference< - ::com::sun::star::xml::sax::XAttributeList > & xAttrList, - XMLFontStylesContext& rStyles ); - virtual ~XMLFontStyleContext_Impl(); - - void SetAttribute( sal_uInt16 nPrefixKey, const OUString& rLocalName, - const OUString& rValue ); - - void FillProperties( ::std::vector< XMLPropertyState > &rProps, - sal_Int32 nFamilyNameIdx, - sal_Int32 nStyleNameIdx, - sal_Int32 nFamilyIdx, - sal_Int32 nPitchIdx, - sal_Int32 nCharsetIdx ) const; - -}; - TYPEINIT1( XMLFontStyleContext_Impl, SvXMLStyleContext ); XMLFontStyleContext_Impl::XMLFontStyleContext_Impl( SvXMLImport& rImport, -- cgit