[Libreoffice] [Patch] Small bug fixes for SVG import

KUROSAWA, Takeshi taken.spc at gmail.com
Sun Feb 13 22:54:11 PST 2011


Hi all,

Here are some tiny patches to fix bugs in SVG import.

0001: Check opacity for == operator
Sometimes, LilbreOffice doesn't handle opacity value.
Example:
http://gnome-colors.googlecode.com/svn/trunk/gnome-colors/gnome-colors-common/scalable/actions/document-properties.svg
The patch fixes this problem.

0002: Fix color serialization
Sometimes, LibreOffice fails to import fill or stroke colors (when
using File -> Open)
Example:
http://gnome-colors.googlecode.com/svn/trunk/gnome-colors/gnome-colors-common/scalable/actions/edit-redo.svg
Treat color value as hex.

0003:Relax paint url parsing (fix fdo#34205)
LibreOffice doesn't allow ' or " between "url(" and "#". As a result,
gradients using url('#foo') syntax aren't imported.
Bug 34205 – SVG import: transparency gradients incorrect
https://bugs.freedesktop.org/show_bug.cgi?id=34205

0004: Ensure writing styles for text
Currently, when a text element doesn't have presentation attributes or
styles, style information is not written (when using File -> Open).
So the text has zero width and is wrapped wrongly.
This patch ensures that filter writes style information if a text has no styles.
See attached text3.svg. Black text ("Hello") will be wrapped wrongly.

All patches are under LGPLv3 / MPL.

cheers,
--
Kurosawa Takeshi <taken.spc at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Check-opacity-for-operator.patch
Type: text/x-patch
Size: 1302 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110214/d71bcae2/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Fix-color-serialization.patch
Type: text/x-patch
Size: 1163 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110214/d71bcae2/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Relax-paint-url-parsing-fix-fdo-34205.patch
Type: text/x-patch
Size: 1162 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110214/d71bcae2/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: text3.svg
Type: image/svg+xml
Size: 203 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110214/d71bcae2/attachment.svg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-Ensure-writing-styles-for-text.patch
Type: text/x-patch
Size: 2505 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110214/d71bcae2/attachment-0003.bin>


More information about the LibreOffice mailing list