xref: /trunk/main/svx/source/dialog/SpellDialogChildWindow.cxx (revision ffd38472365e95f6a578737bc9a5eb0fac624a86)
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 // MARKER(update_precomp.py): autogen include statement, do not remove
23 #include "precompiled_svx.hxx"
24 #include <svx/SpellDialogChildWindow.hxx>
25 
26 #include <svx/svxdlg.hxx>
27 
28 namespace svx {
29 
30 /*-------------------------------------------------------------------------
31 
32   -----------------------------------------------------------------------*/
33 SpellDialogChildWindow::SpellDialogChildWindow (
34     Window* _pParent,
35     sal_uInt16 nId,
36     SfxBindings* pBindings,
37     SfxChildWinInfo* /*pInfo*/)
38     : SfxChildWindow (_pParent, nId)
39 
40 {
41 
42     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
43     DBG_ASSERT(pFact, "SvxAbstractDialogFactory::Create() failed");
44     m_pAbstractSpellDialog = pFact->CreateSvxSpellDialog(_pParent,
45                                             pBindings,
46                                             this );
47     pWindow = m_pAbstractSpellDialog->GetWindow();
48     eChildAlignment = SFX_ALIGN_NOALIGNMENT;
49     SetHideNotDelete (sal_True);
50 }
51 /*-------------------------------------------------------------------------
52 
53   -----------------------------------------------------------------------*/
54 SpellDialogChildWindow::~SpellDialogChildWindow (void)
55 {
56 }
57 /*-------------------------------------------------------------------------
58 
59   -----------------------------------------------------------------------*/
60 SfxBindings& SpellDialogChildWindow::GetBindings (void) const
61 {
62     OSL_ASSERT (m_pAbstractSpellDialog != NULL);
63     return m_pAbstractSpellDialog->GetBindings();
64 }
65 /*-------------------------------------------------------------------------
66 
67   -----------------------------------------------------------------------*/
68 void SpellDialogChildWindow::InvalidateSpellDialog()
69 {
70     OSL_ASSERT (m_pAbstractSpellDialog != NULL);
71     if(m_pAbstractSpellDialog)
72         m_pAbstractSpellDialog->Invalidate();
73 }
74 /*-------------------------------------------------------------------------
75 
76   -----------------------------------------------------------------------*/
77 bool SpellDialogChildWindow::HasAutoCorrection()
78 {
79     return false;
80 }
81 /*-------------------------------------------------------------------------
82 
83   -----------------------------------------------------------------------*/
84 void SpellDialogChildWindow::AddAutoCorrection(
85         const String& /*rOld*/,
86         const String& /*rNew*/,
87         LanguageType /*eLanguage*/)
88 {
89     DBG_ERROR("AutoCorrection should have been overloaded - if available");
90 }
91 /*-- 16.06.2008 10:11:57---------------------------------------------------
92 
93   -----------------------------------------------------------------------*/
94 bool SpellDialogChildWindow::HasGrammarChecking()
95 {
96     return false;
97 }
98 /*-- 18.06.2008 12:26:35---------------------------------------------------
99 
100   -----------------------------------------------------------------------*/
101 bool SpellDialogChildWindow::IsGrammarChecking()
102 {
103     DBG_ERROR("Grammar checking should have been overloaded - if available");
104     return false;
105 }
106 /*-- 18.06.2008 12:26:35---------------------------------------------------
107 
108   -----------------------------------------------------------------------*/
109 void SpellDialogChildWindow::SetGrammarChecking(bool )
110 {
111     DBG_ERROR("Grammar checking should have been overloaded - if available");
112 }
113 } // end of namespace ::svx
114 
115 /* vim: set noet sw=4 ts=4: */
116