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 SW_SPELL_DIALOG_CHILD_WINDOW_HXX
25 #define SW_SPELL_DIALOG_CHILD_WINDOW_HXX
26 
27 #include <svx/SpellDialogChildWindow.hxx>
28 #ifndef _VIEW_HXX
29 #include <view.hxx>
30 #endif
31 
32 class SwWrtShell;
33 struct SpellState;
34 class SwSpellDialogChildWindow
35     : public ::svx::SpellDialogChildWindow
36 {
37     bool            m_bIsGrammarCheckingOn;
38     SpellState*     m_pSpellState;
39 
40     SwWrtShell*     GetWrtShell_Impl();
41     bool            MakeTextSelection_Impl(SwWrtShell& rSh, ShellModes eSelMode);
42     bool            FindNextDrawTextError_Impl(SwWrtShell& rSh);
43     bool            SpellDrawText_Impl(SwWrtShell& rSh, ::svx::SpellPortions& rPortions);
44     void            LockFocusNotification(bool bLock);
45 
46 protected:
47     virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck);
48     virtual void ApplyChangedSentence(const svx::SpellPortions& rChanged, bool bRecheck);
49     virtual void AddAutoCorrection(const String& rOld, const String& rNew, LanguageType eLanguage);
50     virtual bool HasAutoCorrection();
51     virtual bool HasGrammarChecking();
52     virtual bool IsGrammarChecking();
53     virtual void SetGrammarChecking(bool bOn);
54     virtual void GetFocus();
55     virtual void LoseFocus();
56 
57 public:
58     SwSpellDialogChildWindow (
59         Window*pParent,
60         sal_uInt16 nId,
61         SfxBindings* pBindings,
62         SfxChildWinInfo* pInfo);
63     ~SwSpellDialogChildWindow();
64 
65     SFX_DECL_CHILDWINDOW(SwSpellDialogChildWindow);
66 
67     void    InvalidateSpellDialog();
68 
69 };
70 
71 #endif
72 
73