1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: custritm.hxx,v $
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 ************************************************************************/
31 #ifndef _SVTOOLS_CUSTRITM_HXX
32 #define _SVTOOLS_CUSTRITM_HXX
34 #ifndef _TOOLS_DEBUG_HXX
35 #include <tools/debug.hxx>
38 #ifndef _SFXPOOLITEM_HXX
39 #include <bf_svtools/poolitem.hxx>
44 //============================================================================
45 DBG_NAMEEX_VISIBILITY(CntUnencodedStringItem
, )
47 class CntUnencodedStringItem
: public SfxPoolItem
54 CntUnencodedStringItem(USHORT which
= 0): SfxPoolItem(which
)
55 { DBG_CTOR(CntUnencodedStringItem
, 0); }
57 CntUnencodedStringItem(USHORT which
, const XubString
& rTheValue
):
58 SfxPoolItem(which
), m_aValue(rTheValue
)
59 { DBG_CTOR(CntUnencodedStringItem
, 0); }
61 CntUnencodedStringItem(const CntUnencodedStringItem
& rItem
):
62 SfxPoolItem(rItem
), m_aValue(rItem
.m_aValue
)
63 { DBG_CTOR(CntUnencodedStringItem
, 0); }
65 virtual ~CntUnencodedStringItem() { DBG_DTOR(CntUnencodedStringItem
, 0); }
67 virtual int operator ==(const SfxPoolItem
& rItem
) const;
69 virtual int Compare(const SfxPoolItem
& rWith
) const;
71 virtual int Compare(SfxPoolItem
const & rWith
,
72 ::IntlWrapper
const & rIntlWrapper
) const;
74 virtual SfxItemPresentation
GetPresentation(SfxItemPresentation
,
75 SfxMapUnit
, SfxMapUnit
,
77 const ::IntlWrapper
* = 0)
80 virtual BOOL
QueryValue(::com::sun::star::uno::Any
& rVal
,
81 BYTE nMemberId
= 0) const;
83 virtual BOOL
PutValue(const ::com::sun::star::uno::Any
& rVal
,
86 virtual SfxPoolItem
* Clone(SfxItemPool
* = 0) const;
88 const XubString
& GetValue() const { return m_aValue
; }
90 inline void SetValue(const XubString
& rTheValue
);
93 inline void CntUnencodedStringItem::SetValue(const XubString
& rTheValue
)
95 DBG_ASSERT(GetRefCount() == 0,
96 "CntUnencodedStringItem::SetValue(): Pooled item");
102 #endif // _SVTOOLS_CUSTRITM_HXX