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 #pragma once
21 
22 #include <memory>
24 #include <document.hxx>
25 
27 class ScSelectionState;
28 class ScTabViewShell;
29 class ScViewData;
30 class ScRangeList;
31 
39 {
40 public:
42 
43  explicit ScSpellDialogChildWindow( vcl::Window* pParent, sal_uInt16 nId,
44  SfxBindings* pBindings, SfxChildWinInfo* pInfo );
45  virtual ~ScSpellDialogChildWindow() override;
46 
50  void InvalidateSpellDialog();
51 
52 protected:
57  virtual svx::SpellPortions GetNextWrongSentence( bool bRecheck ) override;
58 
62  virtual void ApplyChangedSentence( const svx::SpellPortions& rChanged, bool bRecheck ) override;
63  virtual void GetFocus() override;
64  virtual void LoseFocus() override;
65 
66 private:
67  void Reset();
68  void Init();
69 
70  bool IsSelectionChanged();
71 
72 private:
73  typedef ::std::unique_ptr< ScConversionEngineBase > ScConvEnginePtr;
74  typedef ::std::unique_ptr< ScSelectionState > ScSelectionStatePtr;
75 
76  ScConvEnginePtr mxEngine;
79  ScSelectionStatePtr mxOldSel;
88 };
89 
90 /* 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:92
virtual void GetFocus() override
ScConvEnginePtr mxEngine
Definition: spelldialog.hxx:76
sal_Int16 nId
ScSpellDialogChildWindow(vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo)
Definition: spelldialog.cxx:42
Base class for special type of edit engines, i.e.
Definition: spelleng.hxx:33
ScSelectionStatePtr mxOldSel
Definition: spelldialog.hxx:79
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:72
SFX_DECL_CHILDWINDOW_WITHID(ScSpellDialogChildWindow)
ScTabViewShell * mpViewShell
Original selection range for comparison.
Definition: spelldialog.hxx:82
ScDocumentUniquePtr mxUndoDoc
Definition: spelldialog.hxx:77
std::vector< SpellPortion > SpellPortions
tools::SvRef< ScRangeList > mxOldRangeList
For cursor position in selection.
Definition: spelldialog.hxx:81
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2622
Contains all available data about any possible selection in a Calc document.
::std::unique_ptr< ScConversionEngineBase > ScConvEnginePtr
Definition: spelldialog.hxx:73
ScDocumentUniquePtr mxRedoDoc
Definition: spelldialog.hxx:78
virtual void LoseFocus() override
virtual ~ScSpellDialogChildWindow() override
Definition: spelldialog.cxx:55
::std::unique_ptr< ScSelectionState > ScSelectionStatePtr
Definition: spelldialog.hxx:74
Specialized spell check dialog child window for Calc.
Definition: spelldialog.hxx:38
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:65