summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-01-29 12:32:10 -0500
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-01-29 15:46:05 -0500
commitccd7953e0042c8063e3cbd8e3a3dd9004c1b4f7e (patch)
tree465eee8bff01da80e635b30f9c8de943a74981be /sc/source
parent8a36879eaf0977448b113c2239014d2e2b7ab258 (diff)
fdo#74014: Add unit test for pasting an unformatted text into cells.
Change-Id: I87f7b3012a2c139b0ecc3dd699ccecb31af77ac7
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/scopetools.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sc/source/core/tool/scopetools.cxx b/sc/source/core/tool/scopetools.cxx
index af65cff29e46..a1a52a1f07fd 100644
--- a/sc/source/core/tool/scopetools.cxx
+++ b/sc/source/core/tool/scopetools.cxx
@@ -34,6 +34,17 @@ ExpandRefsSwitch::~ExpandRefsSwitch()
mrDoc.SetExpandRefs(mbOldValue);
}
+UndoSwitch::UndoSwitch(ScDocument& rDoc, bool bUndo) :
+ mrDoc(rDoc), mbOldValue(rDoc.IsUndoEnabled())
+{
+ mrDoc.EnableUndo(bUndo);
+}
+
+UndoSwitch::~UndoSwitch()
+{
+ mrDoc.EnableUndo(mbOldValue);
+}
+
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */