bump product version to 4.1.6.2
[LibreOffice.git] / xmloff / source / chart / XMLChartPropertyContext.cxx
bloba1290e55728938498d1058792ea8269f36cefcbb
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include "XMLChartPropertyContext.hxx"
21 #include "PropertyMap.hxx"
23 #include "XMLSymbolImageContext.hxx"
24 #include "XMLLabelSeparatorContext.hxx"
26 TYPEINIT1( XMLChartPropertyContext, SvXMLImportContext );
28 using namespace ::com::sun::star;
30 XMLChartPropertyContext::XMLChartPropertyContext(
31 SvXMLImport& rImport,
32 sal_uInt16 nPrfx,
33 const OUString& rLName,
34 const uno::Reference< xml::sax::XAttributeList > & xAttrList,
35 sal_uInt32 nFamily,
36 ::std::vector< XMLPropertyState >& rProps,
37 const UniReference< SvXMLImportPropertyMapper >& rMapper ) :
38 SvXMLPropertySetContext( rImport, nPrfx, rLName, xAttrList, nFamily, rProps, rMapper )
42 XMLChartPropertyContext::~XMLChartPropertyContext()
45 SvXMLImportContext* XMLChartPropertyContext::CreateChildContext(
46 sal_uInt16 nPrefix,
47 const OUString& rLocalName,
48 const uno::Reference< xml::sax::XAttributeList > & xAttrList,
49 ::std::vector< XMLPropertyState > &rProperties,
50 const XMLPropertyState& rProp )
52 SvXMLImportContext *pContext = 0;
54 switch( mxMapper->getPropertySetMapper()->GetEntryContextId( rProp.mnIndex ) )
56 case XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE:
57 pContext = new XMLSymbolImageContext( GetImport(), nPrefix, rLocalName, rProp, rProperties );
58 break;
59 case XML_SCH_CONTEXT_SPECIAL_LABEL_SEPARATOR:
60 pContext = new XMLLabelSeparatorContext( GetImport(), nPrefix, rLocalName, rProp, rProperties );
61 break;
64 // default / no context yet: create child context by base class
65 if( !pContext )
67 pContext = SvXMLPropertySetContext::CreateChildContext(
68 nPrefix, rLocalName, xAttrList, rProperties, rProp );
71 return pContext;
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */