diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-07-24 12:34:19 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-07-24 13:37:43 +0000 |
commit | 1e832328f527daee654c818eadf8ede723034d6f (patch) | |
tree | d9d1ff9ca2b9a72adc2b695ae4d20b891c9e8f29 | |
parent | 497b4ff54b8d0afddb8c6e66d4de0187e4fda949 (diff) |
tdf#92911 SwAnnotationWin rendercontext: fix missing comment contents
The problem was that when inserting a post-it comment, the Paint() is
triggered for SwEditWin, which then shares a RenderContext with its
children, and at the end paints the buffer to the vcl::Window of
SwEditWin. When painting this buffer, the contents of SwAnnotationWin
was missing, as the parent SwEditWin was not allowed to paint on that
area. No explicit clipping is set at the OutputDevice level, but
vcl::Window::ImplClipChildren() still calculates a clip region based on
the child windows for the underlying SalGraphics, and that prevented
SwEditWin to paint its buffer fully.
Fix the problem by explicitly disabling this clipping for
SwAnnotationWin in its ctor in the rendercontext case.
(cherry picked from commit dcf94ab56d9e5e9864965f56d27045e67b093fa4)
Change-Id: I5eb47c20070057a79297d91242624fc2057e2dfb
Reviewed-on: https://gerrit.libreoffice.org/17329
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/uibase/docvw/AnnotationWin.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx index 9ce682af86dd..3f0c3a3d55c7 100644 --- a/sw/source/uibase/docvw/AnnotationWin.cxx +++ b/sw/source/uibase/docvw/AnnotationWin.cxx @@ -66,6 +66,10 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, , mpField( static_cast<SwPostItField*>(aField->GetField())) , mpButtonPopup(0) { + if (SupportsDoubleBuffering()) + // When double-buffering, allow parents to paint on our area. That's + // necessary when parents paint the complete buffer. + SetParentClipMode(PARENTCLIPMODE_NOCLIP); } SwAnnotationWin::~SwAnnotationWin() |