1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_SC_INC_SCOPETOOLS_HXX
11 #define INCLUDED_SC_INC_SCOPETOOLS_HXX
25 * Temporarily switch on/off auto calculation mode.
27 class SC_DLLPUBLIC AutoCalcSwitch
32 AutoCalcSwitch(AutoCalcSwitch
const&) = delete;
33 AutoCalcSwitch(AutoCalcSwitch
&&) = delete;
34 AutoCalcSwitch
& operator=(AutoCalcSwitch
const&) = delete;
35 AutoCalcSwitch
& operator=(AutoCalcSwitch
&&) = delete;
38 AutoCalcSwitch(ScDocument
& rDoc
, bool bAutoCalc
);
42 class ExpandRefsSwitch
48 ExpandRefsSwitch(ScDocument
& rDoc
, bool bExpandRefs
);
52 class SC_DLLPUBLIC UndoSwitch
58 UndoSwitch(ScDocument
& rDoc
, bool bUndo
);
68 IdleSwitch(ScDocument
& rDoc
, bool bEnableIdle
);
72 /// Wrapper for ScDocument::DelayFormulaGrouping()
73 class DelayFormulaGroupingSwitch
76 bool const mbOldValue
;
79 DelayFormulaGroupingSwitch(ScDocument
& rDoc
, bool delay
);
80 ~DelayFormulaGroupingSwitch() COVERITY_NOEXCEPT_FALSE
;
84 /// Wrapper for ScDocument::EnableDelayStartListeningFormulaCells()
85 class DelayStartListeningFormulaCells
88 bool const mbOldValue
;
91 DelayStartListeningFormulaCells(ScColumn
& column
, bool delay
);
92 DelayStartListeningFormulaCells(ScColumn
& column
);
93 DelayStartListeningFormulaCells(const DelayStartListeningFormulaCells
&) = delete;
94 ~DelayStartListeningFormulaCells();
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */