summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/uiwriter/data/tdf89720.odtbin0 -> 11283 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx21
2 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/tdf89720.odt b/sw/qa/extras/uiwriter/data/tdf89720.odt
new file mode 100644
index 000000000000..0b86ec51a812
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf89720.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index b7d0157149a8..e78dc8876e40 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -23,6 +23,9 @@
#include <textboxhelper.hxx>
#include <view.hxx>
#include <hhcwrp.hxx>
+#include <postithelper.hxx>
+#include <PostItMgr.hxx>
+#include <SidebarWin.hxx>
#include <svx/svdpage.hxx>
#include <svx/svdview.hxx>
@@ -61,6 +64,7 @@ public:
void testBookmarkUndo();
void testCp1000115();
void testDde();
+ void testTdf89720();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -87,6 +91,7 @@ public:
CPPUNIT_TEST(testBookmarkUndo);
CPPUNIT_TEST(testCp1000115);
CPPUNIT_TEST(testDde);
+ CPPUNIT_TEST(testTdf89720);
CPPUNIT_TEST_SUITE_END();
@@ -679,6 +684,22 @@ void SwUiWriterTest::testDde()
CPPUNIT_ASSERT(xField->getString().endsWith("asdf"));
}
+void SwUiWriterTest::testTdf89720()
+{
+#ifndef MACOSX
+ SwDoc* pDoc = createDoc("tdf89720.odt");
+ SwView* pView = pDoc->GetDocShell()->GetView();
+ SwPostItMgr* pPostItMgr = pView->GetPostItMgr();
+ for (SwSidebarItem* pItem : *pPostItMgr)
+ {
+ if (pItem->pPostIt->IsFollow())
+ // This was non-0: reply comments had a text range overlay,
+ // resulting in unexpected dark color.
+ CPPUNIT_ASSERT(!pItem->pPostIt->TextRange());
+ }
+#endif
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();