From 1b61a0737e3600aadf42f28a15c70aface9ab61e Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Wed, 4 Sep 2024 22:34:10 +0500 Subject: tdf#143603: disable undo in DrawDocShell::ImportFrom Change-Id: I6fbc317d9f72f1bec70ff97e915487ac2b5a2f53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172872 Reviewed-by: Mike Kaganski Tested-by: Jenkins --- sd/qa/unit/data/odp/tdf143603.fodp | 15 +++++++++++++++ sd/qa/unit/import-tests.cxx | 13 +++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 sd/qa/unit/data/odp/tdf143603.fodp (limited to 'sd/qa/unit') 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 @@ + + + + + + + + + text + + + + + + \ 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 #include +#include + #include #include #include @@ -2026,6 +2028,17 @@ CPPUNIT_TEST_FIXTURE(SdImportTest, testTdf152070) xBackgroundProps->getPropertyValue(u"FillBitmapPositionOffsetY"_ustr).get()); } +CPPUNIT_TEST_FIXTURE(SdImportTest, testTdf143603) +{ + createSdImpressDoc("odp/tdf143603.fodp"); + SdXImpressDocument* pXImpressDocument = dynamic_cast(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: */ -- cgit