Update ooo320-m1
[ooovba.git] / chart2 / source / controller / inc / CharacterPropertyItemConverter.hxx
blobd49d88e39a1c15b3710751083ff96a027eb9aee7
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: CharacterPropertyItemConverter.hxx,v $
10 * $Revision: 1.8 $
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_CHARACTERPROPERTYITEMCONVERTER_HXX
31 #define CHART_CHARACTERPROPERTYITEMCONVERTER_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/awt/Size.hpp>
38 #include <memory>
40 namespace chart
42 namespace wrapper
45 class CharacterPropertyItemConverter :
46 public ::comphelper::ItemConverter
48 public:
49 CharacterPropertyItemConverter(
50 const ::com::sun::star::uno::Reference<
51 ::com::sun::star::beans::XPropertySet > & rPropertySet,
52 SfxItemPool& rItemPool );
53 CharacterPropertyItemConverter(
54 const ::com::sun::star::uno::Reference<
55 ::com::sun::star::beans::XPropertySet > & rPropertySet,
56 SfxItemPool& rItemPool,
57 ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize,
58 const ::rtl::OUString & rRefSizePropertyName,
59 const ::com::sun::star::uno::Reference<
60 ::com::sun::star::beans::XPropertySet > & rRefSizePropSet =
61 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >() );
62 virtual ~CharacterPropertyItemConverter();
64 protected:
65 virtual const USHORT * GetWhichPairs() const;
66 virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
68 virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
69 throw( ::com::sun::star::uno::Exception );
70 virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
71 throw( ::com::sun::star::uno::Exception );
73 ::com::sun::star::uno::Reference<
74 ::com::sun::star::beans::XPropertySet > GetRefSizePropertySet() const;
76 private:
77 ::std::auto_ptr< ::com::sun::star::awt::Size > m_pRefSize;
78 ::rtl::OUString m_aRefSizePropertyName;
79 ::com::sun::star::uno::Reference<
80 ::com::sun::star::beans::XPropertySet > m_xRefSizePropSet;
83 } // namespace wrapper
84 } // namespace chart
86 // CHART_CHARACTERPROPERTYITEMCONVERTER_HXX
87 #endif