Update ooo320-m1
[ooovba.git] / xmloff / source / chart / XMLChartPropertyContext.cxx
blobd81ebb2b1f6380d6c2cc17b46a180d18a3f79c4d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XMLChartPropertyContext.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_xmloff.hxx"
33 #include "XMLChartPropertyContext.hxx"
34 #include "PropertyMap.hxx"
36 #include "XMLSymbolImageContext.hxx"
37 #include "XMLLabelSeparatorContext.hxx"
39 TYPEINIT1( XMLChartPropertyContext, SvXMLImportContext );
41 using namespace ::com::sun::star;
43 XMLChartPropertyContext::XMLChartPropertyContext(
44 SvXMLImport& rImport,
45 sal_uInt16 nPrfx,
46 const ::rtl::OUString& rLName,
47 const uno::Reference< xml::sax::XAttributeList > & xAttrList,
48 sal_uInt32 nFamily,
49 ::std::vector< XMLPropertyState >& rProps,
50 const UniReference< SvXMLImportPropertyMapper >& rMapper ) :
51 SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, nFamily, rProps, rMapper )
55 XMLChartPropertyContext::~XMLChartPropertyContext()
58 SvXMLImportContext* XMLChartPropertyContext::CreateChildContext(
59 sal_uInt16 nPrefix,
60 const ::rtl::OUString& rLocalName,
61 const uno::Reference< xml::sax::XAttributeList > & xAttrList,
62 ::std::vector< XMLPropertyState > &rProperties,
63 const XMLPropertyState& rProp )
65 SvXMLImportContext *pContext = 0;
67 switch( mxMapper->getPropertySetMapper()->GetEntryContextId( rProp.mnIndex ) )
69 case XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE:
70 pContext = new XMLSymbolImageContext( GetImport(), nPrefix, rLocalName, rProp, rProperties );
71 break;
72 case XML_SCH_CONTEXT_SPECIAL_LABEL_SEPARATOR:
73 pContext = new XMLLabelSeparatorContext( GetImport(), nPrefix, rLocalName, rProp, rProperties );
74 break;
77 // default / no context yet: create child context by base class
78 if( !pContext )
80 pContext = SvXMLPropertySetContext::CreateChildContext(
81 nPrefix, rLocalName, xAttrList, rProperties, rProp );
84 return pContext;