Update ooo320-m1
[ooovba.git] / svx / inc / optitems.hxx
blob4d6b6a00400e0edaa503826886ad25b4a4ad69c8
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: optitems.hxx,v $
10 * $Revision: 1.7 $
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 _SVX_OPTITEMS_HXX
31 #define _SVX_OPTITEMS_HXX
33 // include ---------------------------------------------------------------
35 #include <svtools/poolitem.hxx>
36 #include <com/sun/star/uno/Reference.hxx>
37 #include "svx/svxdllapi.h"
39 // forward ---------------------------------------------------------------
40 namespace com{namespace sun{namespace star{
41 namespace beans{
42 // class XPropertySet;
44 namespace linguistic2{
45 class XSpellChecker1;
46 }}}}
49 // class SfxSpellCheckItem -----------------------------------------------
53 class SVX_DLLPUBLIC SfxSpellCheckItem: public SfxPoolItem
55 public:
56 TYPEINFO();
58 SfxSpellCheckItem( ::com::sun::star::uno::Reference<
59 ::com::sun::star::linguistic2::XSpellChecker1 > &xChecker,
60 sal_uInt16 nWhich );
61 SfxSpellCheckItem( const SfxSpellCheckItem& rItem );
63 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
64 SfxMapUnit eCoreMetric,
65 SfxMapUnit ePresMetric,
66 String &rText, const IntlWrapper * = 0 ) const;
68 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
69 virtual int operator==( const SfxPoolItem& ) const;
71 ::com::sun::star::uno::Reference<
72 ::com::sun::star::linguistic2::XSpellChecker1 >
73 GetXSpellChecker() const { return xSpellCheck; }
75 private:
76 ::com::sun::star::uno::Reference<
77 ::com::sun::star::linguistic2::XSpellChecker1 > xSpellCheck;
81 // class SfxHyphenRegionItem ---------------------------------------------
85 class SVX_DLLPUBLIC SfxHyphenRegionItem: public SfxPoolItem
87 sal_uInt8 nMinLead;
88 sal_uInt8 nMinTrail;
90 public:
91 TYPEINFO();
93 SfxHyphenRegionItem( const sal_uInt16 nId );
94 SfxHyphenRegionItem( const SfxHyphenRegionItem& rItem );
96 virtual int operator==( const SfxPoolItem& ) const;
97 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
98 SfxMapUnit eCoreMetric,
99 SfxMapUnit ePresMetric,
100 String &rText, const IntlWrapper * = 0 ) const;
102 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
103 virtual SfxPoolItem* Create( SvStream& rStrm, sal_uInt16 nVer ) const;
104 virtual SvStream& Store( SvStream& rStrm, sal_uInt16 ) const;
106 inline sal_uInt8 &GetMinLead() { return nMinLead; }
107 inline sal_uInt8 GetMinLead() const { return nMinLead; }
109 inline sal_uInt8 &GetMinTrail() { return nMinTrail; }
110 inline sal_uInt8 GetMinTrail() const { return nMinTrail; }
112 inline SfxHyphenRegionItem& operator=( const SfxHyphenRegionItem& rNew )
114 nMinLead = rNew.GetMinLead();
115 nMinTrail = rNew.GetMinTrail();
116 return *this;
122 #endif