Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / svx / source / dialog / SpellDialogChildWindow.cxx
blobae82769dfb9b839a0bbb7454a345f6094782c41a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #include <svx/SpellDialogChildWindow.hxx>
22 #include <svx/svxdlg.hxx>
23 #include <osl/diagnose.h>
25 namespace svx {
28 SpellDialogChildWindow::SpellDialogChildWindow (
29 vcl::Window* _pParent,
30 sal_uInt16 nId,
31 SfxBindings* pBindings)
32 : SfxChildWindow (_pParent, nId)
34 SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
35 m_xAbstractSpellDialog = pFact->CreateSvxSpellDialog(_pParent->GetFrameWeld(),
36 pBindings,
37 this );
38 SetController(m_xAbstractSpellDialog->GetController());
39 SetHideNotDelete(true);
42 SpellDialogChildWindow::~SpellDialogChildWindow()
44 m_xAbstractSpellDialog.disposeAndClear();
47 SfxBindings& SpellDialogChildWindow::GetBindings() const
49 assert(m_xAbstractSpellDialog);
50 return m_xAbstractSpellDialog->GetBindings();
53 void SpellDialogChildWindow::InvalidateSpellDialog()
55 OSL_ASSERT (m_xAbstractSpellDialog);
56 if (m_xAbstractSpellDialog)
57 m_xAbstractSpellDialog->InvalidateDialog();
60 bool SpellDialogChildWindow::HasAutoCorrection()
62 return false;
65 void SpellDialogChildWindow::AddAutoCorrection(
66 const OUString& /*rOld*/,
67 const OUString& /*rNew*/,
68 LanguageType /*eLanguage*/)
70 OSL_FAIL("AutoCorrection should have been overridden - if available");
73 bool SpellDialogChildWindow::HasGrammarChecking()
75 return false;
78 bool SpellDialogChildWindow::IsGrammarChecking()
80 OSL_FAIL("Grammar checking should have been overridden - if available");
81 return false;
84 void SpellDialogChildWindow::SetGrammarChecking(bool )
86 OSL_FAIL("Grammar checking should have been overridden - if available");
88 } // end of namespace ::svx
90 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */