Apache OpenOffice (AOO) Bugzilla – Issue 36713
draw should support custem svg:viewBox coordinate system when import graphics
Last modified: 2008-05-18 12:47:53 UTC
I had just created an xslt filter for svg files. See http://qa.openoffice.org/issues/show_bug.cgi?id=2497 . I found out that in sd file format viewBox always use mm/100 as its unit. And I found that the translate logic is already in our import code, so I create this patch to enable it.
Reassigned to Sven. Please have a look.
Created attachment 18955 [details] patch to support custom viewBox
Created attachment 18957 [details] a test file from buerger@pik-potsdam.de
reassigned to the owner of the svg project
the patch is related to our XML related code in xmloff, so that the correct person to verify the patch is Christian.
Christian, do you mind if I take this issue and checkin the patch into cws svgxslt01?
I will fix it in wordmlfilter01
start
.
Created attachment 20574 [details] final patch
Created attachment 20575 [details] bug doc in wordml format grabbed from i29597
fixed in wordmlfilter01
reopen to reassign
assign to qa
seen good in cws wordmlfilter01 set to verified
seen in src680_76 -> closing
Nice, this issue caused a regression and a beta showstopper. With the fix in unoshape.cxx, importing of shapes is completly wrong in impress and draw application and I also suspect its wrong in all other applications. Why was that not tested?? Why was this patch checked in without my aproval? I will undo the changes in unoshape.cxx with beta showstopper issue 41966. So this fix will be reopened and hast to be done again, this time working please!
back to developer
fixed but failr, horrible
reopen
Hi,Christian According to your comments, I think we are talking about i37213. This patch only effect xmloff/source/draw/ximpshap.cxx. And the test documents for issue 41966 do not use svg:viewbox. Could I close this issus and reopen i37213?
reopen by mistake
Created attachment 28683 [details] Hand-crafted OpenDocument that is imported incorrectly showing that the fix for this issue is not complete.
Created attachment 28685 [details] Hand-crafted OpenDocument that is imported incorrectly showing that the fix for this issue is not complete. The file previously attached (by mistake) shows the normalized output when this file is saved again with OOdraw.
This issue is not yet resolved completely. The status and resolution should be cleared. The code for viewBox normalization shows a defect, if either the width or height of the graphics element is zero. This happens, if (e.g.) a path describes a horizontal or vertical line. In that case, the values of the svg:d attribute are still considered to be in 1/100mm units. The document test-viewbox-handling.odg (attached above) shows this behavior for a set of horizontal and vertical lines. When saving the imported document, viewbox normalization only occurred correctly for shapes that have both a non-zero width and height. The horizontal and vertical lines are converted into draw:line elements with incorrect length. The file test-viewbox-handling-output.odg, which is also attached above, shows the output from OOdraw m122. A fix for this issue is important, because it would ease SVG import, if no viewbox normalization had to be done externally.
The Patch you submitted has been marked as 'Resolved' and not updated within the last 2 years+. I am therefore setting this issue to 'Verified' as the first step towards Closing it. If you feel this is incorrect, please re-open the issue and add any comments. Many thanks, Andrew Cleaning-up and Closing old Issues as part of: ~ The Grand Bug Squash, pre v3 ~ http://marketing.openoffice.org/3.0/announcementbeta.html
As per previous comment: Verified > Closed. Regards, Andrew