fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / sc / source / ui / inc / spelldialog.hxx
blob3291f64b048bde8d083f6bfe8baabc3d4a816c12
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 INCLUDED_SC_SOURCE_UI_INC_SPELLDIALOG_HXX
21 #define INCLUDED_SC_SOURCE_UI_INC_SPELLDIALOG_HXX
23 #include <memory>
24 #include <svx/SpellDialogChildWindow.hxx>
26 class ScConversionEngineBase;
27 class ScSelectionState;
28 class ScTabViewShell;
29 class ScViewData;
30 class ScRangeList;
31 class ScDocShell;
32 class ScDocument;
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
42 public:
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();
54 protected:
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;
68 private:
69 void Reset();
70 void Init();
72 bool IsSelectionChanged();
74 private:
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;
88 ScDocument* mpDoc;
89 bool mbNeedNextObj;
90 bool mbOldIdleEnabled;
93 #endif
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */