Kaydet (Commit) a929ebbc authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Andras Timar

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 dcf94ab5)

Change-Id: I5eb47c20070057a79297d91242624fc2057e2dfb
Reviewed-on: https://gerrit.libreoffice.org/17329Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst fc980f01
...@@ -66,6 +66,10 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin, ...@@ -66,6 +66,10 @@ SwAnnotationWin::SwAnnotationWin( SwEditWin& rEditWin,
, mpField( static_cast<SwPostItField*>(aField->GetField())) , mpField( static_cast<SwPostItField*>(aField->GetField()))
, mpButtonPopup(0) , 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() SwAnnotationWin::~SwAnnotationWin()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment