From 37659252f757f6130a2cb85b6c1b782ef0f1df2f Mon Sep 17 00:00:00 2001 From: Björn Milcke Date: Tue, 14 Aug 2001 10:47:26 +0000 Subject: #90861# +CreateChildContext for property context (element property for symbol-images) --- xmloff/source/chart/XMLChartStyleContext.cxx | 36 +++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'xmloff/source') diff --git a/xmloff/source/chart/XMLChartStyleContext.cxx b/xmloff/source/chart/XMLChartStyleContext.cxx index a95ad0a2f537..9cd9f53b5a4c 100644 --- a/xmloff/source/chart/XMLChartStyleContext.cxx +++ b/xmloff/source/chart/XMLChartStyleContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLChartStyleContext.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: dvo $ $Date: 2001-06-29 21:07:11 $ + * last change: $Author: bm $ $Date: 2001-08-14 11:47:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,6 +63,9 @@ #ifndef _XMLOFF_XMLTOKEN_HXX #include "xmltoken.hxx" #endif +#ifndef _XMLOFF_XMLNMSPE_HXX +#include "xmlnmspe.hxx" +#endif #ifndef _XMLOFF_XMLNUMFI_HXX #include "xmlnumfi.hxx" #endif @@ -70,6 +73,8 @@ #include "families.hxx" #endif +#include "XMLChartPropertyContext.hxx" + using namespace com::sun::star; using ::xmloff::token::IsXMLToken; using ::xmloff::token::XML_DATA_STYLE_NAME; @@ -100,7 +105,7 @@ void XMLChartStyleContext::SetAttribute( XMLChartStyleContext::XMLChartStyleContext( SvXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, - const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList, + const uno::Reference< xml::sax::XAttributeList > & xAttrList, SvXMLStylesContext& rStyles, sal_uInt16 nFamily ) : XMLPropStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily ), @@ -129,3 +134,28 @@ void XMLChartStyleContext::FillPropertySet( } } } + +SvXMLImportContext *XMLChartStyleContext::CreateChildContext( + sal_uInt16 nPrefix, + const ::rtl::OUString& rLocalName, + const uno::Reference< xml::sax::XAttributeList > & xAttrList ) +{ + SvXMLImportContext* pContext = NULL; + + if( XML_NAMESPACE_STYLE == nPrefix && + IsXMLToken( rLocalName, ::xmloff::token::XML_PROPERTIES ) ) + { + UniReference < SvXMLImportPropertyMapper > xImpPrMap = + GetStyles()->GetImportPropertyMapper( GetFamily() ); + if( xImpPrMap.is() ) + pContext = new XMLChartPropertyContext( + GetImport(), nPrefix, rLocalName, xAttrList, + GetProperties(), xImpPrMap ); + } + + if( !pContext ) + pContext = XMLPropStyleContext::CreateChildContext( nPrefix, rLocalName, + xAttrList ); + + return pContext; +} -- cgit