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
28class ScTabViewShell;
29class ScViewData;
30class ScRangeList;
31
39{
40public:
42
43 explicit ScSpellDialogChildWindow( vcl::Window* pParent, sal_uInt16 nId,
44 SfxBindings* pBindings, SfxChildWinInfo* pInfo );
45 virtual ~ScSpellDialogChildWindow() override;
46
51
52protected:
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
66private:
67 void Reset();
68 void Init();
69
70 bool IsSelectionChanged();
71
72private:
73 typedef ::std::unique_ptr< ScConversionEngineBase > ScConvEnginePtr;
74 typedef ::std::unique_ptr< ScSelectionState > ScSelectionStatePtr;
75
88};
89
90/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class for special type of edit engines, i.e.
Definition: spelleng.hxx:34
Contains all available data about any possible selection in a Calc document.
Specialized spell check dialog child window for Calc.
Definition: spelldialog.hxx:39
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
ScTabViewShell * mpViewShell
Original selection range for comparison.
Definition: spelldialog.hxx:82
ScDocumentUniquePtr mxUndoDoc
Definition: spelldialog.hxx:77
ScDocumentUniquePtr mxRedoDoc
Definition: spelldialog.hxx:78
SFX_DECL_CHILDWINDOW_WITHID(ScSpellDialogChildWindow)
::std::unique_ptr< ScConversionEngineBase > ScConvEnginePtr
Definition: spelldialog.hxx:73
virtual void LoseFocus() override
::std::unique_ptr< ScSelectionState > ScSelectionStatePtr
Definition: spelldialog.hxx:74
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
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
tools::SvRef< ScRangeList > mxOldRangeList
For cursor position in selection.
Definition: spelldialog.hxx:81
ScConvEnginePtr mxEngine
Definition: spelldialog.hxx:76
ScSpellDialogChildWindow(vcl::Window *pParent, sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo *pInfo)
Definition: spelldialog.cxx:42
ScSelectionStatePtr mxOldSel
Definition: spelldialog.hxx:79
virtual ~ScSpellDialogChildWindow() override
Definition: spelldialog.cxx:55
virtual void GetFocus() override
std::unique_ptr< ScDocument, o3tl::default_delete< ScDocument > > ScDocumentUniquePtr
Definition: document.hxx:2719
std::vector< SpellPortion > SpellPortions