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_SC_SOURCE_UI_INC_SPELLDIALOG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_SPELLDIALOG_HXX
24 #include <svx/SpellDialogChildWindow.hxx>
26 class ScConversionEngineBase
;
27 class ScSelectionState
;
34 /** Specialized spell check dialog child window for Calc.
36 This derivation of the svx::SpellDialogChildWindow base class provides
37 Calc specific implementations of the virtual functions GetNextWrongSentence()
38 and ApplyChangedSentence().
40 class ScSpellDialogChildWindow
: public svx::SpellDialogChildWindow
43 SFX_DECL_CHILDWINDOW_WITHID( ScSpellDialogChildWindow
);
45 explicit ScSpellDialogChildWindow( vcl::Window
* pParent
, sal_uInt16 nId
,
46 SfxBindings
* pBindings
, SfxChildWinInfo
* pInfo
);
47 virtual ~ScSpellDialogChildWindow();
49 /** This method makes the one from the base class public so that
50 it can be called from the view shell when one is created.
52 void InvalidateSpellDialog();
55 /** Iterate over the sentences in all text shapes and stop at the
56 next sentence with spelling errors. While doing so the view
57 mode may be changed and text shapes are set into edit mode.
59 virtual svx::SpellPortions
GetNextWrongSentence( bool bRecheck
) SAL_OVERRIDE
;
61 /** This method is responsible for merging corrections made in the
62 spelling dialog back into the document.
64 virtual void ApplyChangedSentence( const svx::SpellPortions
& rChanged
, bool bRecheck
) SAL_OVERRIDE
;
65 virtual void GetFocus() SAL_OVERRIDE
;
66 virtual void LoseFocus() SAL_OVERRIDE
;
72 bool IsSelectionChanged();
75 typedef ::std::unique_ptr
< ScConversionEngineBase
> ScConvEnginePtr
;
76 typedef ::std::unique_ptr
< ScDocument
> ScDocumentPtr
;
77 typedef ::std::unique_ptr
< ScSelectionState
> ScSelectionStatePtr
;
78 typedef ::std::unique_ptr
< ScRangeList
> ScRangeListPtr
;
80 ScConvEnginePtr mxEngine
;
81 ScDocumentPtr mxUndoDoc
;
82 ScDocumentPtr mxRedoDoc
;
83 ScSelectionStatePtr mxOldSel
; /// For cursor position in selection
84 ScRangeListPtr mxOldRangeList
; /// Original selection range for comparison.
85 ScTabViewShell
* mpViewShell
;
86 ScViewData
* mpViewData
;
87 ScDocShell
* mpDocShell
;
90 bool mbOldIdleEnabled
;
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */