summaryrefslogtreecommitdiff
path: root/sd/qa/unit
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-09-04 22:34:10 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-09-04 21:59:00 +0200
commit1b61a0737e3600aadf42f28a15c70aface9ab61e (patch)
tree9e0ffd9460d2637ab1a5edc4b0a84785b74bda98 /sd/qa/unit
parente9265998c296e9829ef030f7584a80949dc356eb (diff)
tdf#143603: disable undo in DrawDocShell::ImportFrom
Change-Id: I6fbc317d9f72f1bec70ff97e915487ac2b5a2f53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172872 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sd/qa/unit')
-rw-r--r--sd/qa/unit/data/odp/tdf143603.fodp15
-rw-r--r--sd/qa/unit/import-tests.cxx13
2 files changed, 28 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/tdf143603.fodp b/sd/qa/unit/data/odp/tdf143603.fodp
new file mode 100644
index 000000000000..d342d4b3f221
--- /dev/null
+++ b/sd/qa/unit/data/odp/tdf143603.fodp
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<office:document xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:presentation="urn:oasis:names:tc:opendocument:xmlns:presentation:1.0" office:version="1.3" office:mimetype="application/vnd.oasis.opendocument.presentation">
+ <office:body>
+ <office:presentation>
+ <draw:page>
+ <draw:frame svg:width="10cm" svg:height="10cm" svg:x="0cm" svg:y="0cm">
+ <draw:text-box>
+ <text:p>text</text:p>
+ </draw:text-box>
+ </draw:frame>
+ </draw:page>
+ </office:presentation>
+ </office:body>
+</office:document> \ No newline at end of file
diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 4d9aaa1e6ed8..220bf3e30342 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -58,6 +58,8 @@
#include <com/sun/star/drawing/RectanglePoint.hpp>
#include <stlpool.hxx>
+#include <undo/undomanager.hxx>
+
#include <unotools/syslocaleoptions.hxx>
#include <comphelper/scopeguard.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -2026,6 +2028,17 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testTdf152070)
xBackgroundProps->getPropertyValue(u"FillBitmapPositionOffsetY"_ustr).get<sal_Int32>());
}
+CPPUNIT_TEST_FIXTURE(SdImportTest, testTdf143603)
+{
+ createSdImpressDoc("odp/tdf143603.fodp");
+ SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get());
+ CPPUNIT_ASSERT(pXImpressDocument);
+ SdDrawDocument* pDoc = pXImpressDocument->GetDoc();
+ CPPUNIT_ASSERT(pDoc);
+ // Loading FODP used to record UNDO entries - this was 2
+ CPPUNIT_ASSERT_EQUAL(size_t(0), pDoc->GetUndoManager()->GetUndoActionCount());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */