bump product version to 4.1.6.2
[LibreOffice.git] / sd / source / ui / inc / SpellDialogChildWindow.hxx
blobc74ab8275ce454bc293b63f475ac892cf59e7ba7
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 #ifndef SD_SPELL_DIALOG_CHILD_WINDOW_HXX
21 #define SD_SPELL_DIALOG_CHILD_WINDOW_HXX
23 #include <svx/SpellDialogChildWindow.hxx>
26 namespace sd {
28 class Outliner;
30 /** This derivation of the ::svx::SpellDialogChildWindow base class
31 provides Draw and Impress specific implementations of
32 GetNextWrongSentence() and ApplyChangedSentence().
34 class SpellDialogChildWindow
35 : public ::svx::SpellDialogChildWindow
37 public:
38 SpellDialogChildWindow (
39 ::Window* pParent,
40 sal_uInt16 nId,
41 SfxBindings* pBindings,
42 SfxChildWinInfo* pInfo);
43 virtual ~SpellDialogChildWindow (void);
45 /** This method makes the one from the base class public so that
46 it can be called from the view shell when one is created.
48 virtual void InvalidateSpellDialog (void);
50 SFX_DECL_CHILDWINDOW_WITHID(SpellDialogChildWindow);
52 protected:
53 /** Iterate over the sentences in all text shapes and stop at the
54 next sentence with spelling errors. While doing so the view
55 mode may be changed and text shapes are set into edit mode.
57 virtual ::svx::SpellPortions GetNextWrongSentence( bool bRecheck );
59 /** This method is responsible for merging corrections made in the
60 spelling dialog back into the document.
62 virtual void ApplyChangedSentence(const ::svx::SpellPortions& rChanged, bool bRecheck);
63 virtual void GetFocus (void);
64 virtual void LoseFocus (void);
66 private:
67 /** This outliner is used to do the main work of iterating over a
68 document and finding sentences with spelling errors.
70 Outliner* mpSdOutliner;
72 /** When this flag is <TRUE/> then eventually we have to destroy
73 the outliner in mpSdOutliner.
75 bool mbOwnOutliner;
77 /** Provide an outliner in the mpSdOutliner data member. When the
78 view shell has changed since the last call this include the
79 deletion/release of formerly created/obtained one prior to
80 construction/obtaining of a new one.
82 void ProvideOutliner (void);
85 } // end of namespace ::sd
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */