summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-11-05 20:20:06 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2020-11-10 15:25:42 +0100
commita509659205601e51887127d7ecec0d4f4c137278 (patch)
tree27c01b5bdb532bfd7d654c5ee80e8e5bd732ae77 /sc
parentda045c33e7463cdb62824c58c582b439d73c8aa6 (diff)
tdf#134161: sc_anchor: Add unittest
Change-Id: Iff58a85b9080ebe9c0d088237acb3af7018d3f04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105380 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 7ccbeade150f450568f44ad6283d4a4dc3b379bf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105532
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/extras/anchor.cxx16
-rw-r--r--sc/qa/unit/data/ods/tdf134161.odsbin0 -> 39542 bytes
2 files changed, 16 insertions, 0 deletions
diff --git a/sc/qa/extras/anchor.cxx b/sc/qa/extras/anchor.cxx
index 8801e9690b3d..ae7bdb010c53 100644
--- a/sc/qa/extras/anchor.cxx
+++ b/sc/qa/extras/anchor.cxx
@@ -43,6 +43,7 @@ public:
void testTdf121963();
void testTdf129552();
void testTdf130556();
+ void testTdf134161();
CPPUNIT_TEST_SUITE(ScAnchorTest);
CPPUNIT_TEST(testUndoAnchor);
@@ -53,6 +54,7 @@ public:
CPPUNIT_TEST(testTdf121963);
CPPUNIT_TEST(testTdf129552);
CPPUNIT_TEST(testTdf130556);
+ CPPUNIT_TEST(testTdf134161);
CPPUNIT_TEST_SUITE_END();
};
@@ -411,6 +413,20 @@ void ScAnchorTest::testTdf130556()
xComponent->dispose();
}
+void ScAnchorTest::testTdf134161()
+{
+ OUString aFileURL;
+ createFileURL("tdf134161.ods", aFileURL);
+ uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
+ CPPUNIT_ASSERT(xComponent.is());
+
+ // Without the accompanying fix in place, this test would have never returned due to an infinite
+ // invalidation loop
+ Scheduler::ProcessEventsToIdle();
+
+ xComponent->dispose();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(ScAnchorTest);
}
diff --git a/sc/qa/unit/data/ods/tdf134161.ods b/sc/qa/unit/data/ods/tdf134161.ods
new file mode 100644
index 000000000000..f18989a0f46e
--- /dev/null
+++ b/sc/qa/unit/data/ods/tdf134161.ods
Binary files differ