sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / szitem.hxx
bloba8b018de6d6a34f291993cc8e517c9d4dde47296
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: szitem.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 _SFXSZITEM_HXX
31 #define _SFXSZITEM_HXX
33 #ifndef _SV_GEN_HXX //autogen
34 #include <tools/gen.hxx>
35 #endif
37 #include <bf_svtools/poolitem.hxx>
39 class SvStream;
41 namespace binfilter
44 class SfxArguments;
46 DBG_NAMEEX(SfxSizeItem)
48 // -----------------------------------------------------------------------
50 class SfxSizeItem : public SfxPoolItem
52 private:
53 Size aVal;
55 public:
56 TYPEINFO();
57 SfxSizeItem();
58 SfxSizeItem( USHORT nWhich, const Size& rVal );
59 SfxSizeItem( const SfxSizeItem& );
60 ~SfxSizeItem() { DBG_DTOR(SfxSizeItem, 0); }
62 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
63 SfxMapUnit eCoreMetric,
64 SfxMapUnit ePresMetric,
65 XubString &rText,
66 const ::IntlWrapper * = 0 ) const;
68 virtual int operator==( const SfxPoolItem& ) const;
69 virtual BOOL QueryValue( com::sun::star::uno::Any& rVal,
70 BYTE nMemberId = 0 ) const;
71 virtual BOOL PutValue( const com::sun::star::uno::Any& rVal,
72 BYTE nMemberId = 0 );
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 Size& GetValue() const { return aVal; }
79 void SetValue( const Size& rNewVal ) {
80 DBG_ASSERT( GetRefCount() == 0, "SetValue() with pooled item" );
81 aVal = rNewVal; }
86 #endif