nss: upgrade to release 3.73
[LibreOffice.git] / sc / inc / scopetools.hxx
blob950ac699bc8e078044cbae73db250ddbe9e6731a
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/.
8 */
10 #ifndef INCLUDED_SC_INC_SCOPETOOLS_HXX
11 #define INCLUDED_SC_INC_SCOPETOOLS_HXX
13 #include "scdllapi.h"
15 class ScDocument;
16 class ScColumn;
17 namespace vcl
19 class Window;
22 namespace sc
24 /**
25 * Temporarily switch on/off auto calculation mode.
27 class SC_DLLPUBLIC AutoCalcSwitch
29 ScDocument& mrDoc;
30 bool mbOldValue;
32 AutoCalcSwitch(AutoCalcSwitch const&) = delete;
33 AutoCalcSwitch(AutoCalcSwitch&&) = delete;
34 AutoCalcSwitch& operator=(AutoCalcSwitch const&) = delete;
35 AutoCalcSwitch& operator=(AutoCalcSwitch&&) = delete;
37 public:
38 AutoCalcSwitch(ScDocument& rDoc, bool bAutoCalc);
39 ~AutoCalcSwitch();
42 class ExpandRefsSwitch
44 ScDocument& mrDoc;
45 bool mbOldValue;
47 public:
48 ExpandRefsSwitch(ScDocument& rDoc, bool bExpandRefs);
49 ~ExpandRefsSwitch();
52 class SC_DLLPUBLIC UndoSwitch
54 ScDocument& mrDoc;
55 bool mbOldValue;
57 public:
58 UndoSwitch(ScDocument& rDoc, bool bUndo);
59 ~UndoSwitch();
62 class IdleSwitch
64 ScDocument& mrDoc;
65 bool mbOldValue;
67 public:
68 IdleSwitch(ScDocument& rDoc, bool bEnableIdle);
69 ~IdleSwitch();
72 /// Wrapper for ScDocument::DelayFormulaGrouping()
73 class DelayFormulaGroupingSwitch
75 ScDocument& mrDoc;
76 bool const mbOldValue;
78 public:
79 DelayFormulaGroupingSwitch(ScDocument& rDoc, bool delay);
80 ~DelayFormulaGroupingSwitch() COVERITY_NOEXCEPT_FALSE;
81 void reset();
84 /// Wrapper for ScDocument::EnableDelayStartListeningFormulaCells()
85 class DelayStartListeningFormulaCells
87 ScColumn& mColumn;
88 bool const mbOldValue;
90 public:
91 DelayStartListeningFormulaCells(ScColumn& column, bool delay);
92 DelayStartListeningFormulaCells(ScColumn& column);
93 DelayStartListeningFormulaCells(const DelayStartListeningFormulaCells&) = delete;
94 ~DelayStartListeningFormulaCells();
95 void set();
99 #endif
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */