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