summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-11-04 18:33:22 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-11-04 19:36:04 +0100
commit4acc39564e7bf6051b851d533d67d1c31a4a19ea (patch)
tree6b8a01eb64dbd38207153c3bdfee720d9e7dbaa0 /sd
parentf8b10b76bc3000eab3269de4472d6c28bd308059 (diff)
tdf#114613: sd_uiimpress: Add unittest
Change-Id: I8bace97c83f97a4b2aed8ca7fb99e51e06995b8d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124719 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/uiimpress.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sd/qa/unit/uiimpress.cxx b/sd/qa/unit/uiimpress.cxx
index f692bd66a022..3368a45c3b61 100644
--- a/sd/qa/unit/uiimpress.cxx
+++ b/sd/qa/unit/uiimpress.cxx
@@ -661,6 +661,15 @@ CPPUNIT_TEST_FIXTURE(SdUiImpressTest, testTdf134053)
SdrObject* pShape = pActualPage->GetObj(0);
CPPUNIT_ASSERT_MESSAGE("No Shape", pShape);
+ SdDrawDocument* pDocument = pXImpressDocument->GetDoc();
+ sd::UndoManager* pUndoManager = pDocument->GetUndoManager();
+
+ // tdf#114613: Without the fix in place, this test would have failed with
+ // - Expected: 0
+ // - Actual : 8
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pUndoManager->GetUndoActionCount());
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), pUndoManager->GetRedoActionCount());
+
XDash dash = pShape->GetMergedItem(XATTR_LINEDASH).GetDashValue();
// Because 0% is not possible as dash length (as of June 2020) 1% is used in the fix.