1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef _EDITENG_OPTITEMS_HXX 28 #define _EDITENG_OPTITEMS_HXX 29 30 // include --------------------------------------------------------------- 31 32 #include <svl/poolitem.hxx> 33 #include <com/sun/star/uno/Reference.hxx> 34 #include <editeng/editengdllapi.h> 35 36 // forward --------------------------------------------------------------- 37 namespace com { namespace sun { namespace star { 38 namespace linguistic2{ 39 class XSpellChecker1; 40 }}}} 41 42 43 // class SfxSpellCheckItem ----------------------------------------------- 44 45 class EDITENG_DLLPUBLIC SfxSpellCheckItem: public SfxPoolItem 46 { 47 public: 48 TYPEINFO(); 49 50 SfxSpellCheckItem( ::com::sun::star::uno::Reference< 51 ::com::sun::star::linguistic2::XSpellChecker1 > &xChecker, 52 sal_uInt16 nWhich ); 53 SfxSpellCheckItem( const SfxSpellCheckItem& rItem ); 54 55 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, 56 SfxMapUnit eCoreMetric, 57 SfxMapUnit ePresMetric, 58 String &rText, const IntlWrapper * = 0 ) const; 59 60 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; 61 virtual int operator==( const SfxPoolItem& ) const; 62 63 ::com::sun::star::uno::Reference< 64 ::com::sun::star::linguistic2::XSpellChecker1 > 65 GetXSpellChecker() const { return xSpellCheck; } 66 67 private: 68 ::com::sun::star::uno::Reference< 69 ::com::sun::star::linguistic2::XSpellChecker1 > xSpellCheck; 70 }; 71 72 73 // class SfxHyphenRegionItem --------------------------------------------- 74 75 class EDITENG_DLLPUBLIC SfxHyphenRegionItem: public SfxPoolItem 76 { 77 sal_uInt8 nMinLead; 78 sal_uInt8 nMinTrail; 79 80 public: 81 TYPEINFO(); 82 83 SfxHyphenRegionItem( const sal_uInt16 nId ); 84 SfxHyphenRegionItem( const SfxHyphenRegionItem& rItem ); 85 86 virtual int operator==( const SfxPoolItem& ) const; 87 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres, 88 SfxMapUnit eCoreMetric, 89 SfxMapUnit ePresMetric, 90 String &rText, const IntlWrapper * = 0 ) const; 91 92 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; 93 virtual SfxPoolItem* Create( SvStream& rStrm, sal_uInt16 nVer ) const; 94 virtual SvStream& Store( SvStream& rStrm, sal_uInt16 ) const; 95 96 inline sal_uInt8 &GetMinLead() { return nMinLead; } 97 inline sal_uInt8 GetMinLead() const { return nMinLead; } 98 99 inline sal_uInt8 &GetMinTrail() { return nMinTrail; } 100 inline sal_uInt8 GetMinTrail() const { return nMinTrail; } 101 102 inline SfxHyphenRegionItem& operator=( const SfxHyphenRegionItem& rNew ) 103 { 104 nMinLead = rNew.GetMinLead(); 105 nMinTrail = rNew.GetMinTrail(); 106 return *this; 107 } 108 }; 109 110 #endif 111 112