Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svtools / ptitem.hxx
blobb394f94315d19b9ac114e6e529cad1432c26ea9d
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: ptitem.hxx,v $
10 * $Revision: 1.4 $
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 _SFXPTITEM_HXX
31 #define _SFXPTITEM_HXX
33 #ifndef INCLUDED_SVTDLLAPI_H
34 #include "bf_svtools/svtdllapi.h"
35 #endif
37 #ifndef _SFXPOOLITEM_HXX
38 #include <bf_svtools/poolitem.hxx>
39 #endif
41 #ifndef _GEN_HXX //autogen
42 #include <tools/gen.hxx>
43 #endif
45 class SvStream;
47 namespace binfilter
50 DBG_NAMEEX_VISIBILITY(SfxPointItem, )
52 // -----------------------------------------------------------------------
54 class SfxPointItem: public SfxPoolItem
56 Point aVal;
58 public:
59 TYPEINFO();
60 SfxPointItem();
61 SfxPointItem( USHORT nWhich, const Point& rVal );
62 SfxPointItem( const SfxPointItem& );
63 ~SfxPointItem() {
64 DBG_DTOR(SfxPointItem, 0); }
66 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
67 SfxMapUnit eCoreMetric,
68 SfxMapUnit ePresMetric,
69 XubString &rText,
70 const ::IntlWrapper * = 0 ) const;
72 virtual int operator==( const SfxPoolItem& ) const;
74 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
75 virtual SfxPoolItem* Create(SvStream &, USHORT nItemVersion) const;
76 virtual SvStream& Store(SvStream &, USHORT nItemVersion) const;
78 const Point& GetValue() const { return aVal; }
79 void SetValue( const Point& rNewVal ) {
80 DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
81 aVal = rNewVal;
84 virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
85 BYTE nMemberId = 0 ) const;
86 virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
87 BYTE nMemberId = 0 );
92 #endif