Apache OpenOffice (AOO) Bugzilla – Issue 119567
[From Symphony]WMF graphic size changed too small to see if saved by AOO
Last modified: 2017-05-20 10:31:53 UTC
Created attachment 77786 [details] sample Build: AOO3.4 Steps: 1. Open sample file 2. Save it as another .doc file 3. Open the saved file in AOO or MS Office Defect: In AOO: It looks like the grpahic is lost, but actually it still there which width changed to 0.02 and height to 0.39 make the graphic too small to see. In MS Office: There is dialog popup "The dimentions after cropping are too samll or too large"
Open the saved file in AOO, select the invisible picture, noticed there are several improper parameters in crop tab: scale - width is 1%, height is 7%, while original document should be 7% and 8%, image size - width is 0.02'' height is 0.39'',while original document should be 5.83'' and 0.40' put the value of scale/image size as original sample file, the cropped graphic can be displayed properly.
The problem is that the graphic in sample file is a special WMF picture, and its PicHeader parameters is not correctly on export. see <SwWW8WrGrf::WritePICFHeader(..)> in "main\sw\filter\source\wrtww8gr.cxx" line 604 when the original size of WMF picture is too big to fit, the final size will be replaced with Layout size, so that the scaling factor will be calculated based on inappropriate size. Resolution: replace writting the inappropriate scaling value into stream with default operation when the original size of WMF picture is too big to fit
Created attachment 78566 [details] patch for i119567
taking over to review the attached patch
Comment on attachment 78566 [details] patch for i119567 review done -> patch looks good and solves the problem. I will apply it on trunk
I have applied the patch on trunk, revision 1358065 I took the freedom to apply minor adjustments before committing it.
->Oliver Thanks for your review and modification. It looks much better:)
verified on the AOO3.5