Bump for 3.6-28
[LibreOffice.git] / chart2 / source / controller / inc / DataPointItemConverter.hxx
blobb334de12f5bafd5d0acb625666ee2b8db24051c3
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef CHART_DATAPOINTITEMCONVERTER_HXX
29 #define CHART_DATAPOINTITEMCONVERTER_HXX
31 #include "ItemConverter.hxx"
32 #include "GraphicPropertyItemConverter.hxx"
33 #include "NumberFormatterWrapper.hxx"
35 #include <com/sun/star/chart2/XDataSeries.hpp>
36 #include <com/sun/star/awt/Size.hpp>
37 #include <com/sun/star/frame/XModel.hpp>
38 #include <com/sun/star/uno/XComponentContext.hpp>
40 #include <memory>
41 #include <vector>
43 class SdrModel;
45 namespace chart
47 namespace wrapper
50 class DataPointItemConverter :
51 public ::comphelper::ItemConverter
53 public:
54 SAL_WNODEPRECATED_DECLARATIONS_PUSH
55 DataPointItemConverter(
56 const ::com::sun::star::uno::Reference<
57 ::com::sun::star::frame::XModel > & xChartModel,
58 const ::com::sun::star::uno::Reference<
59 ::com::sun::star::uno::XComponentContext > & xContext,
60 const ::com::sun::star::uno::Reference<
61 ::com::sun::star::beans::XPropertySet > & rPropertySet,
62 const ::com::sun::star::uno::Reference<
63 ::com::sun::star::chart2::XDataSeries > & xSeries,
64 SfxItemPool& rItemPool,
65 SdrModel& rDrawModel,
66 NumberFormatterWrapper * pNumFormatter,
67 const ::com::sun::star::uno::Reference<
68 ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
69 GraphicPropertyItemConverter::eGraphicObjectType eMapTo =
70 GraphicPropertyItemConverter::FILLED_DATA_POINT,
71 ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
72 ::std::auto_ptr< ::com::sun::star::awt::Size >(),
73 bool bDataSeries = false,
74 bool bUseSpecialFillColor = false,
75 sal_Int32 nSpecialFillColor = 0,
76 bool bOverwriteLabelsForAttributedDataPointsAlso=false,
77 sal_Int32 nNumberFormat=0,
78 sal_Int32 nPercentNumberFormat=0);
79 SAL_WNODEPRECATED_DECLARATIONS_POP
81 virtual ~DataPointItemConverter();
83 virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
84 virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
86 protected:
87 virtual const sal_uInt16 * GetWhichPairs() const;
88 virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
90 virtual void FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutItemSet ) const
91 throw( ::com::sun::star::uno::Exception );
92 virtual bool ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet & rItemSet )
93 throw( ::com::sun::star::uno::Exception );
95 private:
96 ::std::vector< ItemConverter * > m_aConverters;
97 NumberFormatterWrapper * m_pNumberFormatterWrapper;
98 bool m_bDataSeries;
99 bool m_bOverwriteLabelsForAttributedDataPointsAlso;
100 bool m_bColorPerPoint;
101 bool m_bUseSpecialFillColor;
102 sal_Int32 m_nSpecialFillColor;
103 sal_Int32 m_nNumberFormat;
104 sal_Int32 m_nPercentNumberFormat;
105 ::com::sun::star::uno::Sequence< sal_Int32 > m_aAvailableLabelPlacements;
106 bool m_bForbidPercentValue;
109 } // namespace wrapper
110 } // namespace chart
112 // CHART_DATAPOINTITEMCONVERTER_HXX
113 #endif
115 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */