Created attachment 107091 [details] contrived draw file expecting pixels as units Problem description: images embedded in Draw file not opening at correct scale I've been working on adding OpenDocument draw compatibility to a program I'm working on and have been adjusting files so that they open correctly in Draw. What I've read about SVG says that if no units are specified then pixels (px) will be assumed http://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute my test files are testing22.odg testing23.odg (I will attach testing22.odg after submitting the bug report if allowed, it appears I can only attach one file at a time) both are the same except for one line in content.xml the testing22.odg specifies pixels "px" the testing22.odg uses pixels but does specify "px", as follows: <draw:frame draw:layer="layout" svg:width="800" svg:height="800" svg:x="0" svg:y="0"> <draw:image xlink:href="data/layer1.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /> </draw:frame> Current behavior: testing22.odg does not appear to work at all, the embedded images do not appear to load testing23.odg does work, but the embedded image is displayed at 0.8cm (I've adjusted my code to convert pixels to cm for the purposes of compatibility. I'm only writing here to make sure Draw is behaving according to the standards, maybe I've made an incorrect assumption about how minimal I can get away with my OpenDocument XML being.) Expected behavior: If I am interpreting the SVG specification correctly the XML above should have resulted in the image in being displayed at the correct size and should not have been converted into 0.8cm and the failure of my contrived file to load might indicate that Draw is making some incorrect assumptions about units, and falling back to something other than pixels when the units are not specified. Operating System: Windows XP Version: 4.3.0.4 release
Created attachment 107092 [details] contrived draw file with measurements specified in pixels (px) Differs from testing23.odg only in that each unit has px after it. I surprised this didn't work at all, expected the same behaviour from both <draw:frame draw:layer="layout" svg:width="800px" svg:height="800px" svg:x="0px" svg:y="0px"> <draw:image xlink:href="data/layer1.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad" /> </draw:frame>
Reproduced. Win 7 64-bit Version: 4.4.0.0.alpha2+ Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827 TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.