LibreOffice Module sc (master)  1
spelldialog.hxx
Go to the documentation of this file.
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 #ifndef INCLUDED_SC_SOURCE_UI_INC_SPELLDIALOG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_SPELLDIALOG_HXX
22 
23 #include <memory>
25 #include <document.hxx>
26 
28 class ScSelectionState;
29 class ScTabViewShell;
30 class ScViewData;
31 class ScRangeList;
32 
40 {
41 public:
43 
44  explicit ScSpellDialogChildWindow( vcl::Window* pParent, sal_uInt16 nId,
45  SfxBindings* pBindings, SfxChildWinInfo* pInfo );
46  virtual ~ScSpellDialogChildWindow() override;
47 
51  void InvalidateSpellDialog();
52 
53 protected:
58  virtual svx::SpellPortions GetNextWrongSentence( bool bRecheck ) override;
59 
63  virtual void ApplyChangedSentence( const svx::SpellPortions& rChanged, bool bRecheck ) override;
64  virtual void GetFocus() override;
65  virtual void LoseFocus() override;
66 
67 private:
68  void Reset();
69  void Init();
70 
71  bool IsSelectionChanged();
72 
73 private:
74  typedef ::std::unique_ptr< ScConversionEngineBase > ScConvEnginePtr;
75  typedef ::std::unique_ptr< ScSelectionState > ScSelectionStatePtr;
76 
77  ScConvEnginePtr mxEngine;
80  ScSelectionStatePtr mxOldSel;
89 };
90 
91 #endif
92 
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void ApplyChangedSentence(const svx::SpellPortions &rChanged, bool bRecheck) override
This method is responsible for merging corrections made in the spelling dialog back into the document...
Definition: spelldialog.cxx:91
virtual void GetFocus() override
ScConvEnginePtr mxEngine
Definition: spelldialog.hxx:77
sal_Int16 nId
ScSpellDialogChildWindow(vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo)
Definition: spelldialog.cxx:41
Base class for special type of edit engines, i.e.
Definition: spelleng.hxx:34
ScSelectionStatePtr mxOldSel
Definition: spelldialog.hxx:80
virtual svx::SpellPortions GetNextWrongSentence(bool bRecheck) override
Iterate over the sentences in all text shapes and stop at the next sentence with spelling errors...
Definition: spelldialog.cxx:71
SFX_DECL_CHILDWINDOW_WITHID(ScSpellDialogChildWindow)
ScTabViewShell * mpViewShell
Original selection range for comparison.
Definition: spelldialog.hxx:83
ScDocumentUniquePtr mxUndoDoc
Definition: spelldialog.hxx:78
std::vector< SpellPortion > SpellPortions
tools::SvRef< ScRangeList > mxOldRangeList
For cursor position in selection.
Definition: spelldialog.hxx:82
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2613
Contains all available data about any possible selection in a Calc document.
::std::unique_ptr< ScConversionEngineBase > ScConvEnginePtr
Definition: spelldialog.hxx:74
ScDocumentUniquePtr mxRedoDoc
Definition: spelldialog.hxx:79
virtual void LoseFocus() override
virtual ~ScSpellDialogChildWindow() override
Definition: spelldialog.cxx:54
::std::unique_ptr< ScSelectionState > ScSelectionStatePtr
Definition: spelldialog.hxx:75
Specialized spell check dialog child window for Calc.
Definition: spelldialog.hxx:39
void InvalidateSpellDialog()
This method makes the one from the base class public so that it can be called from the view shell whe...
Definition: spelldialog.cxx:64