xref: /aoo41x/main/editeng/inc/editeng/optitems.hxx (revision 4c5491ea)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _EDITENG_OPTITEMS_HXX
24 #define _EDITENG_OPTITEMS_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <svl/poolitem.hxx>
29 #include <com/sun/star/uno/Reference.hxx>
30 #include <editeng/editengdllapi.h>
31 
32 // forward ---------------------------------------------------------------
33 namespace com { namespace sun { namespace star {
34 namespace linguistic2{
35 	class XSpellChecker1;
36 }}}}
37 
38 
39 // class SfxSpellCheckItem -----------------------------------------------
40 
41 class EDITENG_DLLPUBLIC SfxSpellCheckItem: public SfxPoolItem
42 {
43 public:
44 	TYPEINFO();
45 
46 	SfxSpellCheckItem( ::com::sun::star::uno::Reference<
47 							::com::sun::star::linguistic2::XSpellChecker1 >  &xChecker,
48                        sal_uInt16 nWhich  );
49 	SfxSpellCheckItem( const SfxSpellCheckItem& rItem );
50 
51 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
52 									SfxMapUnit eCoreMetric,
53 									SfxMapUnit ePresMetric,
54                                     String &rText, const IntlWrapper * = 0 ) const;
55 
56 	virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const;
57 	virtual int 			operator==( const SfxPoolItem& ) const;
58 
59 	::com::sun::star::uno::Reference<
60 		::com::sun::star::linguistic2::XSpellChecker1 >
GetXSpellChecker() const61 			GetXSpellChecker() const { return xSpellCheck; }
62 
63 private:
64 	::com::sun::star::uno::Reference<
65 		::com::sun::star::linguistic2::XSpellChecker1 > 		xSpellCheck;
66 };
67 
68 
69 // class SfxHyphenRegionItem ---------------------------------------------
70 
71 class EDITENG_DLLPUBLIC SfxHyphenRegionItem: public SfxPoolItem
72 {
73 	sal_uInt8 nMinLead;
74 	sal_uInt8 nMinTrail;
75 
76 public:
77 	TYPEINFO();
78 
79     SfxHyphenRegionItem( const sal_uInt16 nId  );
80 	SfxHyphenRegionItem( const SfxHyphenRegionItem& rItem );
81 
82 	virtual int 			 operator==( const SfxPoolItem& ) const;
83 	virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
84 									SfxMapUnit eCoreMetric,
85 									SfxMapUnit ePresMetric,
86                                     String &rText, const IntlWrapper * = 0 ) const;
87 
88 	virtual SfxPoolItem*	 Clone( SfxItemPool *pPool = 0 ) const;
89 	virtual SfxPoolItem*	 Create( SvStream& rStrm, sal_uInt16 nVer ) const;
90 	virtual SvStream&		 Store( SvStream& rStrm, sal_uInt16 ) const;
91 
GetMinLead()92 	inline sal_uInt8 &GetMinLead() { return nMinLead; }
GetMinLead() const93 	inline sal_uInt8 GetMinLead() const { return nMinLead; }
94 
GetMinTrail()95 	inline sal_uInt8 &GetMinTrail() { return nMinTrail; }
GetMinTrail() const96 	inline sal_uInt8 GetMinTrail() const { return nMinTrail; }
97 
operator =(const SfxHyphenRegionItem & rNew)98 	inline SfxHyphenRegionItem& operator=( const SfxHyphenRegionItem& rNew )
99 	{
100 		nMinLead = rNew.GetMinLead();
101 		nMinTrail = rNew.GetMinTrail();
102 		return *this;
103 	}
104 };
105 
106 #endif
107 
108