1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: hyphen.hxx,v $
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_HYPHEN_HXX
31 #define _SVX_HYPHEN_HXX
33 // include ---------------------------------------------------------------
35 #include <vcl/edit.hxx>
36 #ifndef _SV_BUTTON_HXX
37 #include <vcl/button.hxx>
39 #include <vcl/fixed.hxx>
40 #include <sfx2/basedlgs.hxx>
41 #include <com/sun/star/uno/Reference.hxx>
42 // forward ---------------------------------------------------------------
44 namespace com
{namespace sun
{namespace star
{
45 namespace linguistic2
{
47 class XPossibleHyphens
;
50 class SvxSpellWrapper
;
52 // class SvxHyphenEdit ---------------------------------------------------
54 class SvxHyphenEdit
: public Edit
57 SvxHyphenEdit( Window
* pParent
, const ResId
& rResId
);
60 virtual void KeyInput( const KeyEvent
&rKEvt
);
63 // class SvxHyphenWordDialog ---------------------------------------------
65 class SvxHyphenWordDialog
: public SfxModalDialog
68 SvxHyphenWordDialog( const String
&rWord
, LanguageType nLang
,
70 ::com::sun::star::uno::Reference
<
71 ::com::sun::star::linguistic2::XHyphenator
> &xHyphen
,
72 SvxSpellWrapper
* pWrapper
);
79 SvxHyphenEdit aWordEdit
;
81 ImageButton aRightBtn
;
83 CancelButton aCancelBtn
;
88 SvxSpellWrapper
* pHyphWrapper
;
89 ::com::sun::star::uno::Reference
<
90 ::com::sun::star::linguistic2::XHyphenator
> xHyphenator
;
91 ::com::sun::star::uno::Reference
<
92 ::com::sun::star::linguistic2::XPossibleHyphens
> xPossHyph
;
93 String aActWord
; // actual (to be displayed) word
94 LanguageType nActLanguage
; // and language
95 sal_uInt16 nMaxHyphenationPos
; // right most valid hyphenation pos
100 #ifdef _SVX_HYPHEN_CXX
101 void EnableLRBtn_Impl();
102 //void EnableCutBtn_Impl();
103 void SetLabel_Impl( LanguageType nLang
);
104 String
EraseUnusableHyphens_Impl(
105 ::com::sun::star::uno::Reference
<
106 ::com::sun::star::linguistic2::XPossibleHyphens
> &rxPossHyph
,
107 sal_uInt16 nMaxHyphenationPos
);
109 void InitControls_Impl();
110 void ContinueHyph_Impl( sal_uInt16 nInsPos
= 0 );
111 sal_uInt16
GetHyphIndex_Impl();
113 DECL_LINK( CutHdl_Impl
, Button
* );
114 DECL_LINK( DeleteHdl_Impl
, Button
* );
115 DECL_LINK( ContinueHdl_Impl
, Button
* );
116 DECL_LINK( CancelHdl_Impl
, Button
* );
117 DECL_LINK( Left_Impl
, Button
* );
118 DECL_LINK( Right_Impl
, Button
* );
119 DECL_LINK( GetFocusHdl_Impl
, Edit
* );
120 DECL_LINK( LangError_Impl
, void* );