summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/refreshtimer.hxx15
-rw-r--r--sc/inc/refreshtimerprotector.hxx28
-rw-r--r--sc/source/core/data/documen2.cxx1
-rw-r--r--sc/source/core/tool/refreshtimer.cxx7
-rw-r--r--sc/source/ui/inc/docsh.hxx3
5 files changed, 37 insertions, 17 deletions
diff --git a/sc/inc/refreshtimer.hxx b/sc/inc/refreshtimer.hxx
index 0ee9a374b50b..bbc5a9f1da63 100644
--- a/sc/inc/refreshtimer.hxx
+++ b/sc/inc/refreshtimer.hxx
@@ -46,21 +46,6 @@ public:
::osl::Mutex& GetMutex() { return aMutex; }
};
-class ScRefreshTimerProtector
-{
-private:
- ScRefreshTimerControl * const * ppControl;
-
-public:
- ScRefreshTimerProtector( ScRefreshTimerControl * const * pp );
-
- ~ScRefreshTimerProtector()
- {
- if ( ppControl && *ppControl )
- (*ppControl)->SetAllowRefresh( true );
- }
-};
-
class ScRefreshTimer : public AutoTimer
{
private:
diff --git a/sc/inc/refreshtimerprotector.hxx b/sc/inc/refreshtimerprotector.hxx
new file mode 100644
index 000000000000..d2169cdc090d
--- /dev/null
+++ b/sc/inc/refreshtimerprotector.hxx
@@ -0,0 +1,28 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef SC_REFRESHTIMERPROTECTOR_HXX
+#define SC_REFRESHTIMERPROTECTOR_HXX
+
+#include <sal/config.h>
+
+class ScRefreshTimerControl;
+
+class ScRefreshTimerProtector
+{
+ ScRefreshTimerControl * const * ppControl;
+
+public:
+ ScRefreshTimerProtector( ScRefreshTimerControl * const * pp );
+ ~ScRefreshTimerProtector();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/documen2.cxx b/sc/source/core/data/documen2.cxx
index 23a4bcfe4012..6c112d5803c3 100644
--- a/sc/source/core/data/documen2.cxx
+++ b/sc/source/core/data/documen2.cxx
@@ -89,6 +89,7 @@
#include "formulacell.hxx"
#include "clipcontext.hxx"
#include "refupdatecontext.hxx"
+#include "refreshtimerprotector.hxx"
#include "scopetools.hxx"
#include "formulagroup.hxx"
diff --git a/sc/source/core/tool/refreshtimer.cxx b/sc/source/core/tool/refreshtimer.cxx
index 0ee309e40a66..1c9900eabd44 100644
--- a/sc/source/core/tool/refreshtimer.cxx
+++ b/sc/source/core/tool/refreshtimer.cxx
@@ -18,7 +18,7 @@
*/
#include "refreshtimer.hxx"
-
+#include "refreshtimerprotector.hxx"
ScRefreshTimerProtector::ScRefreshTimerProtector( ScRefreshTimerControl * const * pp )
:
@@ -32,6 +32,11 @@ ScRefreshTimerProtector::ScRefreshTimerProtector( ScRefreshTimerControl * const
}
}
+ScRefreshTimerProtector::~ScRefreshTimerProtector()
+{
+ if ( ppControl && *ppControl )
+ (*ppControl)->SetAllowRefresh( true );
+}
ScRefreshTimer::~ScRefreshTimer()
{
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 20a4833a1c54..818a63f502f6 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -33,7 +33,7 @@
#include "appoptio.hxx"
#include "formulaopt.hxx"
#include "shellids.hxx"
-#include "refreshtimer.hxx"
+#include "refreshtimerprotector.hxx"
#include "optutil.hxx"
#include "docuno.hxx"
@@ -61,6 +61,7 @@ class VirtualDevice;
class ScImportOptions;
class ScDocShellModificator;
class ScOptSolverSave;
+class ScRefreshTimer;
class ScSheetSaveData;
class ScFlatBoolRowSegments;
class HelperModelObj;