xref: /AOO41X/main/editeng/inc/editeng/edtdlg.hxx (revision 4c5491ea21520f5347760e8fc7d072f082fcde5f)
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 _EDT_ABSTDLG_HXX
24 #define _EDT_ABSTDLG_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <tools/solar.h>
29 #include <tools/string.hxx>
30 #include <editeng/editengdllapi.h>
31 #include <i18npool/lang.h>
32 #include <com/sun/star/uno/Reference.hxx>
33 #include <vcl/abstdlg.hxx>
34 #include <editeng/hangulhanja.hxx>
35 
36 namespace com { namespace sun { namespace star { namespace linguistic2
37 {
38     class XThesaurus;
39     class XHyphenator;
40 } } } }
41 
42 class Window;
43 class ResId;
44 class Link;
45 class SvxSpellWrapper;
46 
47 class AbstractThesaurusDialog : public VclAbstractDialog
48 {
49 public:
50     virtual String      GetWord() = 0;
51     virtual sal_uInt16  GetLanguage() const = 0;
52     virtual Window*     GetWindow() = 0;
53 };
54 
55 class AbstractHyphenWordDialog : public VclAbstractDialog
56 {
57 public:
58     virtual void    SelLeft() = 0;
59     virtual void    SelRight() = 0;
60     virtual Window* GetWindow() = 0;
61 };
62 
63 class AbstractHangulHanjaConversionDialog : public VclAbstractTerminatedDialog
64 {
65  public:
66     virtual void EnableRubySupport( sal_Bool _bVal ) = 0;
67     virtual void SetByCharacter( sal_Bool _bByCharacter ) = 0;
68     virtual void SetConversionDirectionState( sal_Bool _bTryBothDirections, editeng::HangulHanjaConversion::ConversionDirection _ePrimaryConversionDirection ) = 0;
69     virtual void SetConversionFormat( editeng::HangulHanjaConversion::ConversionFormat _eType ) = 0;
70     virtual void    SetOptionsChangedHdl( const Link& _rHdl ) = 0;
71     virtual void    SetIgnoreHdl( const Link& _rHdl ) = 0;
72     virtual void    SetIgnoreAllHdl( const Link& _rHdl ) = 0;
73     virtual void    SetChangeHdl( const Link& _rHdl ) = 0;
74     virtual void    SetChangeAllHdl( const Link& _rHdl ) = 0;
75     virtual void    SetClickByCharacterHdl( const Link& _rHdl ) = 0;
76     virtual void    SetConversionFormatChangedHdl( const Link& _rHdl ) = 0;
77     virtual void    SetFindHdl( const Link& _rHdl ) = 0;
78     virtual sal_Bool        GetUseBothDirections( ) const= 0;
79     virtual editeng::HangulHanjaConversion::ConversionDirection    GetDirection( editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection ) const = 0;
80     virtual void    SetCurrentString(
81                     const String& _rNewString,
82                     const ::com::sun::star::uno::Sequence< ::rtl::OUString >& _rSuggestions,
83                     bool _bOriginatesFromDocument = true )=0;
84     virtual String  GetCurrentString( ) const =0;
85     virtual editeng::HangulHanjaConversion::ConversionFormat    GetConversionFormat( ) const =0;
86     virtual void    FocusSuggestion( )= 0;
87     virtual String  GetCurrentSuggestion( ) const =0;
88 };
89 
90 class EDITENG_DLLPUBLIC EditAbstractDialogFactory : virtual public VclAbstractDialogFactory
91 {
92 public:
93                                         virtual ~EditAbstractDialogFactory();   // needed for export of vtable
94     static EditAbstractDialogFactory*   Create();
95     virtual AbstractThesaurusDialog*        CreateThesaurusDialog( Window*, ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XThesaurus >  xThesaurus,
96                                                 const String &rWord, sal_Int16 nLanguage ) = 0;
97 
98     virtual AbstractHyphenWordDialog*       CreateHyphenWordDialog( Window*,
99                                                 const String &rWord, LanguageType nLang,
100                                                 ::com::sun::star::uno::Reference< ::com::sun::star::linguistic2::XHyphenator >  &xHyphen,
101                                                 SvxSpellWrapper* pWrapper ) = 0;
102     virtual AbstractHangulHanjaConversionDialog * CreateHangulHanjaConversionDialog( Window* _pParent,
103                                             editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) = 0;
104 };
105 
106 #endif
107 
108