merge the formfield patch from ooo-build
[ooovba.git] / chart2 / source / controller / inc / GraphicPropertyItemConverter.hxx
blobc7d2e00204b148448d434d8e77a28d46788d7492
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: GraphicPropertyItemConverter.hxx,v $
10 * $Revision: 1.7.44.1 $
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 ************************************************************************/
30 #ifndef CHART_GRAPHICPROPERTYITEMCONVERTER_HXX
31 #define CHART_GRAPHICPROPERTYITEMCONVERTER_HXX
33 #include "ItemConverter.hxx"
34 #include <com/sun/star/uno/Any.hxx>
35 #include <com/sun/star/beans/PropertyState.hpp>
36 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
38 class SdrModel;
40 namespace chart
42 namespace wrapper
45 class GraphicPropertyItemConverter :
46 public ::comphelper::ItemConverter
48 public:
49 enum eGraphicObjectType
51 FILLED_DATA_POINT,
52 LINE_DATA_POINT,
53 LINE_PROPERTIES,
54 FILL_PROPERTIES,
55 LINE_AND_FILL_PROPERTIES
58 GraphicPropertyItemConverter(
59 const ::com::sun::star::uno::Reference<
60 ::com::sun::star::beans::XPropertySet > & rPropertySet,
61 SfxItemPool& rItemPool,
62 SdrModel& rDrawModel,
63 const ::com::sun::star::uno::Reference<
64 ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
65 eGraphicObjectType eObjectType = FILLED_DATA_POINT );
66 virtual ~GraphicPropertyItemConverter();
68 protected:
69 virtual const USHORT * GetWhichPairs() const;
70 virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
72 virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
73 throw( ::com::sun::star::uno::Exception );
74 virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
75 throw( ::com::sun::star::uno::Exception );
77 private:
78 eGraphicObjectType m_eGraphicObjectType;
79 SdrModel & m_rDrawModel;
80 ::com::sun::star::uno::Reference<
81 ::com::sun::star::lang::XMultiServiceFactory > m_xNamedPropertyTableFactory;
84 } // namespace wrapper
85 } // namespace chart
87 // CHART_GRAPHICPROPERTYITEMCONVERTER_HXX
88 #endif