summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-05-20 14:24:44 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-05-21 13:25:25 -0400
commit1df232139353d166014d7f73ea2423e6930ad348 (patch)
treeac88ee9266d3433de606b7ee62764b25b097a3d7 /sc
parent8d5d877dc94ba5edfc7587b957ca5a00725d434b (diff)
Turn the mouse cursor to the "wait hand" during the external link update.
Change-Id: I983127828b28c72dd12d4778b88051964e9bceaa
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/scopetools.hxx9
-rw-r--r--sc/source/core/data/documen8.cxx3
-rw-r--r--sc/source/core/tool/scopetools.cxx14
3 files changed, 26 insertions, 0 deletions
diff --git a/sc/inc/scopetools.hxx b/sc/inc/scopetools.hxx
index 443ceafc0b28..785fd70a035e 100644
--- a/sc/inc/scopetools.hxx
+++ b/sc/inc/scopetools.hxx
@@ -13,6 +13,7 @@
#include "scdllapi.h"
class ScDocument;
+class Window;
namespace sc {
@@ -55,6 +56,14 @@ public:
~IdleSwitch();
};
+class WaitPointerSwitch
+{
+ Window* mpFrameWin;
+public:
+ WaitPointerSwitch(Window* pWin);
+ ~WaitPointerSwitch();
+};
+
}
#endif
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx
index e8ce20c22d30..1247563867de 100644
--- a/sc/source/core/data/documen8.cxx
+++ b/sc/source/core/data/documen8.cxx
@@ -87,6 +87,7 @@
#include "globalnames.hxx"
#include "stringutil.hxx"
#include <documentlinkmgr.hxx>
+#include <scopetools.hxx>
#include <boost/scoped_ptr.hpp>
@@ -802,6 +803,8 @@ void ScDocument::UpdateExternalRefLinks(Window* pWin)
aRefLinks.push_back(pRefLink);
}
+ sc::WaitPointerSwitch aWaitSwitch(pWin);
+
pExternalRefMgr->enableDocTimer(false);
ScProgress aProgress(GetDocumentShell(), ScResId(SCSTR_UPDATE_EXTDOCS).toString(), aRefLinks.size());
for (size_t i = 0, n = aRefLinks.size(); i < n; ++i)
diff --git a/sc/source/core/tool/scopetools.cxx b/sc/source/core/tool/scopetools.cxx
index 96f4458e7255..0664219904a3 100644
--- a/sc/source/core/tool/scopetools.cxx
+++ b/sc/source/core/tool/scopetools.cxx
@@ -9,6 +9,7 @@
#include "scopetools.hxx"
#include "document.hxx"
+#include <vcl/window.hxx>
namespace sc {
@@ -56,6 +57,19 @@ IdleSwitch::~IdleSwitch()
mrDoc.EnableIdle(mbOldValue);
}
+WaitPointerSwitch::WaitPointerSwitch(Window* pWin) :
+ mpFrameWin(pWin)
+{
+ if (mpFrameWin)
+ mpFrameWin->EnterWait();
+}
+
+WaitPointerSwitch::~WaitPointerSwitch()
+{
+ if (mpFrameWin)
+ mpFrameWin->LeaveWait();
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */