summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/uiwriter/data/tdf89720.odtbin0 -> 11283 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx19
-rw-r--r--sw/source/uibase/docvw/SidebarWin.cxx3
3 files changed, 21 insertions, 1 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 8c06b0d22068..7a8d399e4df2 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -37,6 +37,9 @@
#include <unocrsrhelper.hxx>
#include <unotbl.hxx>
#include <pagedesc.hxx>
+#include <postithelper.hxx>
+#include <PostItMgr.hxx>
+#include <SidebarWin.hxx>
#include "com/sun/star/text/XDefaultNumberingProvider.hpp"
#include "com/sun/star/awt/FontUnderline.hpp"
@@ -138,6 +141,7 @@ public:
void testShapeAnchorUndo();
void testDde();
void testTdf89954();
+ void testTdf89720();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -200,6 +204,7 @@ public:
CPPUNIT_TEST(testShapeAnchorUndo);
CPPUNIT_TEST(testDde);
CPPUNIT_TEST(testTdf89954);
+ CPPUNIT_TEST(testTdf89720);
CPPUNIT_TEST_SUITE_END();
private:
@@ -2063,6 +2068,20 @@ void SwUiWriterTest::testTdf89954()
CPPUNIT_ASSERT_EQUAL(aExpected, aNodeIndex.GetNode().GetTextNode()->GetText());
}
+void SwUiWriterTest::testTdf89720()
+{
+ 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());
+ }
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index e10179963aac..4157947b0469 100644
--- a/sw/source/uibase/docvw/SidebarWin.cxx
+++ b/sw/source/uibase/docvw/SidebarWin.cxx
@@ -703,8 +703,9 @@ void SwSidebarWin::SetPosAndSize()
mpTextRangeOverlay->HideSolidBorder();
}
}
- else
+ else if (!IsFollow())
{
+ // This window is not a reply, then draw its range overlay.
mpTextRangeOverlay =
sw::overlay::OverlayRanges::CreateOverlayRange(
DocView(),