https://bugs.freedesktop.org/show_bug.cgi?id=74921

          Priority: medium
            Bug ID: 74921
          Assignee: [email protected]
           Summary: EMF pictures pasted via clipboard do not show properly
                    if they contain clip regions
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: 4.1.5.3 rc
         Component: Writer
           Product: LibreOffice

Created attachment 93993
  --> https://bugs.freedesktop.org/attachment.cgi?id=93993&action=edit
The second image in the file shows the problem.

An EMF picture which has been created using the SelectClipRgn API does not show
properly in Writer. I have tested with LO 3.6 both on Windows 8 Enterprise and
on Mac OS X 10.7.5, and with the freshly released LO 4.1.5 on Mac OS X 10.7.5.

The attached file contains a Writer document where an example image of our
proprietary software has been included. The first image was inserted from an
EMF file on disk. The second image was inserted as an EMF image from the
clipboard created using the same drawing code. The third image was inserted
from the clipboard using the bitmap format. While the EMF image from the file
looks as expected (and similar to the bitmap image), the EMF image from
clipboard lacks the content in the graph. It only shows the graph's axes,
labels and grid lines.
I noticed that when scrolling using the mouse wheel over image 2 in version
3.6, the content in the graph partially showed up and disappeared again after
scrolling further. In version 4.1, this was no longer the case.

Steps to reproduce: Open the attached file. Using LO 3.6, scroll down using the
mouse wheel. The graph of picture 2 is empty. At the end of the document,
scroll up. You can see the graph of picture 2 partially. When scrolling down
again, the graph in picture 2 is empty again. In version 4.1.5 it is always
empty. The same is true for the Page Preview.

I was able to identify the responsible code for this behaviour. Between drawing
the graph and its contents, there are calls to the SelectClipRgn API. This has
been done so that "overdrawing" beyond the limits of the graph rectangle was
avoided. In an experimental build of the software, I omitted the clipping calls
and the EMF was displayed in all three cases mentioned above. However, clipping
is necessary in most cases in order to display the image properly, so leaving
it out in production code is not an option for us.

>From the findings, I suspect that the EMF records for selecting the clip
rectangle might not be processed correctly in all cases.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to