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