Teach symstore more duplicated DLLs
[LibreOffice.git] / xmloff / source / chart / SchXMLEnumConverter.cxx
blob6349b457746c1a6a2e15bddbe9afe1bed87df548
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 <com/sun/star/chart/ChartLegendPosition.hpp>
21 #include <com/sun/star/chart/ChartLegendExpansion.hpp>
22 #include "SchXMLEnumConverter.hxx"
23 #include <xmloff/xmlement.hxx>
24 #include <rtl/instance.hxx>
26 using namespace ::xmloff::token;
27 using namespace ::com::sun::star;
29 namespace
32 const SvXMLEnumMapEntry<chart::ChartLegendPosition> aXMLLegendPositionEnumMap[] =
34 { XML_START, chart::ChartLegendPosition_LEFT },
35 { XML_TOP, chart::ChartLegendPosition_TOP },
36 { XML_END, chart::ChartLegendPosition_RIGHT },
37 { XML_BOTTOM, chart::ChartLegendPosition_BOTTOM },
38 { XML_TOKEN_INVALID, chart::ChartLegendPosition(0) }
41 class XMLLegendPositionPropertyHdl : public XMLEnumPropertyHdl
43 public:
44 XMLLegendPositionPropertyHdl()
45 : XMLEnumPropertyHdl( aXMLLegendPositionEnumMap) {}
48 struct TheLegendPositionPropertyHdl : public rtl::Static< XMLLegendPositionPropertyHdl, TheLegendPositionPropertyHdl >
52 const SvXMLEnumMapEntry<chart::ChartLegendExpansion> aXMLLegendExpansionEnumMap[] =
54 { XML_WIDE, chart::ChartLegendExpansion_WIDE },
55 { XML_HIGH, chart::ChartLegendExpansion_HIGH },
56 { XML_BALANCED, chart::ChartLegendExpansion_BALANCED },
57 { XML_CUSTOM, chart::ChartLegendExpansion_CUSTOM },
58 { XML_TOKEN_INVALID, chart::ChartLegendExpansion(0) }
61 class XMLLegendExpansionPropertyHdl : public XMLEnumPropertyHdl
63 public:
64 XMLLegendExpansionPropertyHdl()
65 : XMLEnumPropertyHdl( aXMLLegendExpansionEnumMap) {}
68 struct TheLegendExpansionPropertyHdl : public rtl::Static< XMLLegendExpansionPropertyHdl, TheLegendExpansionPropertyHdl >
72 }//end anonymous namespace
74 XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendPositionConverter()
76 return TheLegendPositionPropertyHdl::get();
78 XMLEnumPropertyHdl& SchXMLEnumConverter::getLegendExpansionConverter()
80 return TheLegendExpansionPropertyHdl::get();
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */