xref: /trunk/main/sw/source/ui/inc/hyp.hxx (revision 1d2dbeb0)
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 
24 #ifndef _HYP_HXX
25 #define _HYP_HXX
26 
27 #include <tools/link.hxx>
28 #include <editeng/splwrap.hxx>
29 #include <com/sun/star/linguistic2/XHyphenator.hpp>
30 
31 class SwView;
32 
33 class SwHyphWrapper : public SvxSpellWrapper {
34 private:
35 	SwView* pView;
36 	::com::sun::star::uno::Reference<
37 		::com::sun::star::linguistic2::XHyphenator >  xHyph;
38 	Link			aOldLnk;
39 	LanguageType		nLangError;		// nicht vorhandene Sprache
40 	sal_uInt16			nPageCount;		// Seitenanzahl fuer Progressanzeige
41 	sal_uInt16			nPageStart;		// 1. gepruefte Seite
42 	sal_Bool			bInSelection : 1; // Trennen von selektiertem Text
43 	sal_Bool			bShowError : 1; // nicht vorhandene Sprache melden
44 	sal_Bool			bAutomatic : 1; // Trennstellen ohne Rueckfrage einfuegen
45     sal_Bool            bInfoBox : 1;   // display info-box when ending
46 	DECL_LINK( SpellError, LanguageType * );
47 
48 protected:
49 	virtual	void SpellStart( SvxSpellArea eSpell );
50 	virtual	sal_Bool SpellContinue();
51 	virtual	void SpellEnd( );
52 	virtual	sal_Bool SpellMore();
53 	virtual void InsertHyphen( const sal_uInt16 nPos ); // Hyphen einfuegen
54 
55 public:
56 	SwHyphWrapper( SwView* pVw,
57 				   ::com::sun::star::uno::Reference<
58 						::com::sun::star::linguistic2::XHyphenator >  &rxHyph,
59 				   sal_Bool bStart, sal_Bool bOther, sal_Bool bSelect );
60 	~SwHyphWrapper();
61 };
62 
63 #endif
64