1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_SD_SOURCE_UI_INC_SPELLDIALOGCHILDWINDOW_HXX
21 #define INCLUDED_SD_SOURCE_UI_INC_SPELLDIALOGCHILDWINDOW_HXX
23 #include <svx/SpellDialogChildWindow.hxx>
29 /** This derivation of the svx::SpellDialogChildWindow base class
30 provides Draw and Impress specific implementations of
31 GetNextWrongSentence() and ApplyChangedSentence().
33 class SpellDialogChildWindow
34 : public svx::SpellDialogChildWindow
37 SpellDialogChildWindow (
40 SfxBindings
* pBindings
,
41 SfxChildWinInfo
* pInfo
);
42 virtual ~SpellDialogChildWindow();
44 /** This method makes the one from the base class public so that
45 it can be called from the view shell when one is created.
47 void InvalidateSpellDialog();
49 SFX_DECL_CHILDWINDOW_WITHID(SpellDialogChildWindow
);
52 /** Iterate over the sentences in all text shapes and stop at the
53 next sentence with spelling errors. While doing so the view
54 mode may be changed and text shapes are set into edit mode.
56 virtual svx::SpellPortions
GetNextWrongSentence( bool bRecheck
) SAL_OVERRIDE
;
58 /** This method is responsible for merging corrections made in the
59 spelling dialog back into the document.
61 virtual void ApplyChangedSentence(const svx::SpellPortions
& rChanged
, bool bRecheck
) SAL_OVERRIDE
;
62 virtual void GetFocus() SAL_OVERRIDE
;
63 virtual void LoseFocus() SAL_OVERRIDE
;
66 /** This outliner is used to do the main work of iterating over a
67 document and finding sentences with spelling errors.
69 Outliner
* mpSdOutliner
;
71 /** When this flag is <TRUE/> then eventually we have to destroy
72 the outliner in mpSdOutliner.
76 /** Provide an outliner in the mpSdOutliner data member. When the
77 view shell has changed since the last call this include the
78 deletion/release of formerly created/obtained one prior to
79 construction/obtaining of a new one.
81 void ProvideOutliner();
84 } // end of namespace ::sd
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */