Apache OpenOffice (AOO) Bugzilla – Issue 93170
page preview of documents containing form controls is corrupted
Last modified: 2009-02-17 12:59:31 UTC
- open the attached document, containing some controls - File / Page Preview => in the page preview, the controls are properly painted inside the page, but right of the page, there are *additional* paintings of the controls, which should not be there
bug did not happen in OOo 2.4.1 => regression, to be fixed for 3.1
Created attachment 56041 [details] document to reproduce the bug case
fs->aw: Thanks for volunteering to look into this. As we agreed, you're most probably much faster than me in finding the problem.
AW: Problem here is how SW paints it's contents. It first uses to ViewShell::_PaintDesktop paint the page backgrounds (the 'Wiese') in single rectangles (leaving out the pages; probably a mechanism from before the buffered non-blinking paint), and then the pages. For each page paint, a MapMode is set and used in DLPrePaint2/DLPostPaint2, so for DrawingLayer for these regions all is good. The first one, _PaintDesktop, does not set any MapMode at all, thus the current one is used to paint the DrawingLayer. Since this - in DLPostPaint2 automatically - also paints the FormLayer, the form controls are painted with the wrong MapMode. I have added an extensive description to ViewShell::_PaintDesktop and described the current solution and all caveats. For now, i will introduce a flaf doe ending DarwingLayer paint to force the FrmLayer not to be painted if wanted in EndPaint mechanisms. AW: Building from svx incompatible, getting all modules where EndDrawLayers is used, changing all calls...
AW: Works as expected, fixed.
AW->WG: Please review. To check, open a SW, add a form control (Button), go to PagePreview and zoom in and out. In old version, the button showed twice, once 'behind' the paper, once where it belongs.
Verified in CWS.
Tested in DEV300_m41. Closed.