Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / scopetools.hxx
blob3544b79f2547f12e06cda74daf659ba18c34c798
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 SC_SCOPETOOLS_HXX
11 #define SC_SCOPETOOLS_HXX
13 class ScDocument;
15 namespace sc {
17 /**
18 * Temporarily switch on/off auto calculation mode.
20 class AutoCalcSwitch
22 ScDocument& mrDoc;
23 bool mbOldValue;
24 public:
25 AutoCalcSwitch(ScDocument& rDoc, bool bAutoCalc);
26 ~AutoCalcSwitch();
29 class ExpandRefsSwitch
31 ScDocument& mrDoc;
32 bool mbOldValue;
33 public:
34 ExpandRefsSwitch(ScDocument& rDoc, bool bExpandRefs);
35 ~ExpandRefsSwitch();
40 #endif
42 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */