/src/libreoffice/svx/source/dialog/SpellDialogChildWindow.cxx
Line | Count | Source |
1 | | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ |
2 | | /* |
3 | | * This file is part of the LibreOffice project. |
4 | | * |
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/. |
8 | | * |
9 | | * This file incorporates work covered by the following license notice: |
10 | | * |
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 . |
18 | | */ |
19 | | |
20 | | #include <svx/SpellDialogChildWindow.hxx> |
21 | | |
22 | | #include <svx/svxdlg.hxx> |
23 | | #include <osl/diagnose.h> |
24 | | |
25 | | namespace svx { |
26 | | |
27 | | |
28 | | SpellDialogChildWindow::SpellDialogChildWindow ( |
29 | | vcl::Window* _pParent, |
30 | | sal_uInt16 nId, |
31 | | SfxBindings* pBindings) |
32 | 0 | : SfxChildWindow (_pParent, nId) |
33 | 0 | { |
34 | 0 | SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); |
35 | 0 | m_xAbstractSpellDialog = pFact->CreateSvxSpellDialog(_pParent->GetFrameWeld(), |
36 | 0 | pBindings, |
37 | 0 | this ); |
38 | 0 | SetController(m_xAbstractSpellDialog->GetController()); |
39 | 0 | SetHideNotDelete(true); |
40 | 0 | } |
41 | | |
42 | | SpellDialogChildWindow::~SpellDialogChildWindow() |
43 | 0 | { |
44 | 0 | m_xAbstractSpellDialog.disposeAndClear(); |
45 | 0 | } |
46 | | |
47 | | void SpellDialogChildWindow::Initialize() |
48 | 0 | { |
49 | 0 | m_xAbstractSpellDialog->Initialize(); |
50 | 0 | } |
51 | | |
52 | | SfxBindings& SpellDialogChildWindow::GetBindings() const |
53 | 0 | { |
54 | 0 | assert(m_xAbstractSpellDialog); |
55 | 0 | return m_xAbstractSpellDialog->GetBindings(); |
56 | 0 | } |
57 | | |
58 | | void SpellDialogChildWindow::InvalidateSpellDialog() |
59 | 0 | { |
60 | 0 | OSL_ASSERT (m_xAbstractSpellDialog); |
61 | 0 | if (m_xAbstractSpellDialog) |
62 | 0 | m_xAbstractSpellDialog->InvalidateDialog(); |
63 | 0 | } |
64 | | |
65 | | bool SpellDialogChildWindow::HasAutoCorrection() |
66 | 0 | { |
67 | 0 | return false; |
68 | 0 | } |
69 | | |
70 | | void SpellDialogChildWindow::AddAutoCorrection( |
71 | | const OUString& /*rOld*/, |
72 | | const OUString& /*rNew*/, |
73 | | LanguageType /*eLanguage*/) |
74 | 0 | { |
75 | 0 | OSL_FAIL("AutoCorrection should have been overridden - if available"); |
76 | 0 | } |
77 | | |
78 | | bool SpellDialogChildWindow::HasGrammarChecking() |
79 | 0 | { |
80 | 0 | return false; |
81 | 0 | } |
82 | | |
83 | | bool SpellDialogChildWindow::IsGrammarChecking() |
84 | 0 | { |
85 | 0 | OSL_FAIL("Grammar checking should have been overridden - if available"); |
86 | 0 | return false; |
87 | 0 | } |
88 | | |
89 | | void SpellDialogChildWindow::SetGrammarChecking(bool ) |
90 | 0 | { |
91 | 0 | OSL_FAIL("Grammar checking should have been overridden - if available"); |
92 | 0 | } |
93 | | } // end of namespace ::svx |
94 | | |
95 | | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |