ooo-build r11809 - in trunk: . patches/src680
- From: thorstenb svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r11809 - in trunk: . patches/src680
- Date: Wed, 5 Mar 2008 07:29:54 +0000 (GMT)
Author: thorstenb
Date: Wed Mar 5 07:29:53 2008
New Revision: 11809
URL: http://svn.gnome.org/viewvc/ooo-build?rev=11809&view=rev
Log:
* patches/src680/svg-import-filter.diff: added end_p to all
grammars, to have consistent semantics between spirit 1.6.1 and
boost 1.34
* patches/src680/svg-import-filter.diff: added some initial text
import functionality
Modified:
trunk/ChangeLog
trunk/patches/src680/svg-import-filter.diff
Modified: trunk/patches/src680/svg-import-filter.diff
==============================================================================
--- trunk/patches/src680/svg-import-filter.diff (original)
+++ trunk/patches/src680/svg-import-filter.diff Wed Mar 5 07:29:53 2008
@@ -745,7 +745,7 @@
+
--- filter/source/svg/parserfragments.cxx 1970-01-01 01:00:00.000000000 +0100
+++ filter/source/svg/parserfragments.cxx 2008-03-03 12:47:08.000000000 +0100
-@@ -0,0 +1,511 @@
+@@ -0,0 +1,517 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -771,9 +771,8 @@
+#include <basegfx/tools/canvastools.hxx>
+#include <com/sun/star/geometry/AffineMatrix2D.hpp>
+
-+#include <boost/bind.hpp>
-+// workaround. spirit uses INT_MAX.
+#include <limits.h>
++#include <boost/bind.hpp>
+#include <boost/spirit.hpp>
+#include <boost/spirit/dynamic/while.hpp>
+#include <numeric>
@@ -866,158 +865,7 @@
+
+ int_parser<sal_uInt8,10,1,3> byte_p;
+
-+ switch (getTokenId(sColor, strlen(sColor)))
-+ {
-+ case XML_ALICEBLUE: rColor = ARGBColor(240,248,255); return true;
-+ case XML_ANTIQUEWHITE: rColor = ARGBColor(250,235,215); return true;
-+ case XML_AQUA: rColor = ARGBColor(0,255,255); return true;
-+ case XML_AQUAMARINE: rColor = ARGBColor(127,255,212); return true;
-+ case XML_AZURE: rColor = ARGBColor(240,255,255); return true;
-+ case XML_BEIGE: rColor = ARGBColor(245,245,220); return true;
-+ case XML_BISQUE: rColor = ARGBColor(255,228,196); return true;
-+ case XML_BLACK: rColor = ARGBColor(0,0,0); return true;
-+ case XML_BLANCHEDALMOND: rColor = ARGBColor(255,235,205); return true;
-+ case XML_BLUE: rColor = ARGBColor(0,0,255); return true;
-+ case XML_BLUEVIOLET: rColor = ARGBColor(138,43,226); return true;
-+ case XML_BROWN: rColor = ARGBColor(165,42,42); return true;
-+ case XML_BURLYWOOD: rColor = ARGBColor(222,184,135); return true;
-+ case XML_CADETBLUE: rColor = ARGBColor(95,158,160); return true;
-+ case XML_CHARTREUSE: rColor = ARGBColor(127,255,0); return true;
-+ case XML_CHOCOLATE: rColor = ARGBColor(210,105,30); return true;
-+ case XML_CORAL: rColor = ARGBColor(255,127,80); return true;
-+ case XML_CORNFLOWERBLUE: rColor = ARGBColor(100,149,237); return true;
-+ case XML_CORNSILK: rColor = ARGBColor(255,248,220); return true;
-+ case XML_CRIMSON: rColor = ARGBColor(220,20,60); return true;
-+ case XML_CYAN: rColor = ARGBColor(0,255,255); return true;
-+ case XML_DARKBLUE: rColor = ARGBColor(0,0,139); return true;
-+ case XML_DARKCYAN: rColor = ARGBColor(0,139,139); return true;
-+ case XML_DARKGOLDENROD: rColor = ARGBColor(184,134,11); return true;
-+ case XML_DARKGRAY: rColor = ARGBColor(169,169,169); return true;
-+ case XML_DARKGREEN: rColor = ARGBColor(0,100,0); return true;
-+ case XML_DARKGREY: rColor = ARGBColor(169,169,169); return true;
-+ case XML_DARKKHAKI: rColor = ARGBColor(189,183,107); return true;
-+ case XML_DARKMAGENTA: rColor = ARGBColor(139,0,139); return true;
-+ case XML_DARKOLIVEGREEN: rColor = ARGBColor(85,107,47); return true;
-+ case XML_DARKORANGE: rColor = ARGBColor(255,140,0); return true;
-+ case XML_DARKORCHID: rColor = ARGBColor(153,50,204); return true;
-+ case XML_DARKRED: rColor = ARGBColor(139,0,0); return true;
-+ case XML_DARKSALMON: rColor = ARGBColor(233,150,122); return true;
-+ case XML_DARKSEAGREEN: rColor = ARGBColor(143,188,143); return true;
-+ case XML_DARKSLATEBLUE: rColor = ARGBColor(72,61,139); return true;
-+ case XML_DARKSLATEGRAY: rColor = ARGBColor(47,79,79); return true;
-+ case XML_DARKSLATEGREY: rColor = ARGBColor(47,79,79); return true;
-+ case XML_DARKTURQUOISE: rColor = ARGBColor(0,206,209); return true;
-+ case XML_DARKVIOLET: rColor = ARGBColor(148,0,211); return true;
-+ case XML_DEEPPINK: rColor = ARGBColor(255,20,147); return true;
-+ case XML_DEEPSKYBLUE: rColor = ARGBColor(0,191,255); return true;
-+ case XML_DIMGRAY: rColor = ARGBColor(105,105,105); return true;
-+ case XML_DIMGREY: rColor = ARGBColor(105,105,105); return true;
-+ case XML_DODGERBLUE: rColor = ARGBColor(30,144,255); return true;
-+ case XML_FIREBRICK: rColor = ARGBColor(178,34,34); return true;
-+ case XML_FLORALWHITE: rColor = ARGBColor(255,250,240); return true;
-+ case XML_FORESTGREEN: rColor = ARGBColor(34,139,34); return true;
-+ case XML_FUCHSIA: rColor = ARGBColor(255,0,255); return true;
-+ case XML_GAINSBORO: rColor = ARGBColor(220,220,220); return true;
-+ case XML_GHOSTWHITE: rColor = ARGBColor(248,248,255); return true;
-+ case XML_GOLD: rColor = ARGBColor(255,215,0); return true;
-+ case XML_GOLDENROD: rColor = ARGBColor(218,165,32); return true;
-+ case XML_GRAY: rColor = ARGBColor(128,128,128); return true;
-+ case XML_GREY: rColor = ARGBColor(128,128,128); return true;
-+ case XML_GREEN: rColor = ARGBColor(0,128,0); return true;
-+ case XML_GREENYELLOW: rColor = ARGBColor(173,255,47); return true;
-+ case XML_HONEYDEW: rColor = ARGBColor(240,255,240); return true;
-+ case XML_HOTPINK: rColor = ARGBColor(255,105,180); return true;
-+ case XML_INDIANRED: rColor = ARGBColor(205,92,92); return true;
-+ case XML_INDIGO: rColor = ARGBColor(75,0,130); return true;
-+ case XML_IVORY: rColor = ARGBColor(255,255,240); return true;
-+ case XML_KHAKI: rColor = ARGBColor(240,230,140); return true;
-+ case XML_LAVENDER: rColor = ARGBColor(230,230,250); return true;
-+ case XML_LAVENDERBLUSH: rColor = ARGBColor(255,240,245); return true;
-+ case XML_LAWNGREEN: rColor = ARGBColor(124,252,0); return true;
-+ case XML_LEMONCHIFFON: rColor = ARGBColor(255,250,205); return true;
-+ case XML_LIGHTBLUE: rColor = ARGBColor(173,216,230); return true;
-+ case XML_LIGHTCORAL: rColor = ARGBColor(240,128,128); return true;
-+ case XML_LIGHTCYAN: rColor = ARGBColor(224,255,255); return true;
-+ case XML_LIGHTGOLDENRODYELLOW: rColor = ARGBColor(250,250,210); return true;
-+ case XML_LIGHTGRAY: rColor = ARGBColor(211,211,211); return true;
-+ case XML_LIGHTGREEN: rColor = ARGBColor(144,238,144); return true;
-+ case XML_LIGHTGREY: rColor = ARGBColor(211,211,211); return true;
-+ case XML_LIGHTPINK: rColor = ARGBColor(255,182,193); return true;
-+ case XML_LIGHTSALMON: rColor = ARGBColor(255,160,122); return true;
-+ case XML_LIGHTSEAGREEN: rColor = ARGBColor(32,178,170); return true;
-+ case XML_LIGHTSKYBLUE: rColor = ARGBColor(135,206,250); return true;
-+ case XML_LIGHTSLATEGRAY: rColor = ARGBColor(119,136,153); return true;
-+ case XML_LIGHTSLATEGREY: rColor = ARGBColor(119,136,153); return true;
-+ case XML_LIGHTSTEELBLUE: rColor = ARGBColor(176,196,222); return true;
-+ case XML_LIGHTYELLOW: rColor = ARGBColor(255,255,224); return true;
-+ case XML_LIME: rColor = ARGBColor(0,255,0); return true;
-+ case XML_LIMEGREEN: rColor = ARGBColor(50,205,50); return true;
-+ case XML_LINEN: rColor = ARGBColor(250,240,230); return true;
-+ case XML_MAGENTA: rColor = ARGBColor(255,0,255); return true;
-+ case XML_MAROON: rColor = ARGBColor(128,0,0); return true;
-+ case XML_MEDIUMAQUAMARINE: rColor = ARGBColor(102,205,170); return true;
-+ case XML_MEDIUMBLUE: rColor = ARGBColor(0,0,205); return true;
-+ case XML_MEDIUMORCHID: rColor = ARGBColor(186,85,211); return true;
-+ case XML_MEDIUMPURPLE: rColor = ARGBColor(147,112,219); return true;
-+ case XML_MEDIUMSEAGREEN: rColor = ARGBColor(60,179,113); return true;
-+ case XML_MEDIUMSLATEBLUE: rColor = ARGBColor(123,104,238); return true;
-+ case XML_MEDIUMSPRINGGREEN: rColor = ARGBColor(0,250,154); return true;
-+ case XML_MEDIUMTURQUOISE: rColor = ARGBColor(72,209,204); return true;
-+ case XML_MEDIUMVIOLETRED: rColor = ARGBColor(199,21,133); return true;
-+ case XML_MIDNIGHTBLUE: rColor = ARGBColor(25,25,112); return true;
-+ case XML_MINTCREAM: rColor = ARGBColor(245,255,250); return true;
-+ case XML_MISTYROSE: rColor = ARGBColor(255,228,225); return true;
-+ case XML_MOCCASIN: rColor = ARGBColor(255,228,181); return true;
-+ case XML_NAVAJOWHITE: rColor = ARGBColor(255,222,173); return true;
-+ case XML_NAVY: rColor = ARGBColor(0,0,128); return true;
-+ case XML_OLDLACE: rColor = ARGBColor(253,245,230); return true;
-+ case XML_OLIVE: rColor = ARGBColor(128,128,0); return true;
-+ case XML_OLIVEDRAB: rColor = ARGBColor(107,142,35); return true;
-+ case XML_ORANGE: rColor = ARGBColor(255,165,0); return true;
-+ case XML_ORANGERED: rColor = ARGBColor(255,69,0); return true;
-+ case XML_ORCHID: rColor = ARGBColor(218,112,214); return true;
-+ case XML_PALEGOLDENROD: rColor = ARGBColor(238,232,170); return true;
-+ case XML_PALEGREEN: rColor = ARGBColor(152,251,152); return true;
-+ case XML_PALETURQUOISE: rColor = ARGBColor(175,238,238); return true;
-+ case XML_PALEVIOLETRED: rColor = ARGBColor(219,112,147); return true;
-+ case XML_PAPAYAWHIP: rColor = ARGBColor(255,239,213); return true;
-+ case XML_PEACHPUFF: rColor = ARGBColor(255,218,185); return true;
-+ case XML_PERU: rColor = ARGBColor(205,133,63); return true;
-+ case XML_PINK: rColor = ARGBColor(255,192,203); return true;
-+ case XML_PLUM: rColor = ARGBColor(221,160,221); return true;
-+ case XML_POWDERBLUE: rColor = ARGBColor(176,224,230); return true;
-+ case XML_PURPLE: rColor = ARGBColor(128,0,128); return true;
-+ case XML_RED: rColor = ARGBColor(255,0,0); return true;
-+ case XML_ROSYBROWN: rColor = ARGBColor(188,143,143); return true;
-+ case XML_ROYALBLUE: rColor = ARGBColor(65,105,225); return true;
-+ case XML_SADDLEBROWN: rColor = ARGBColor(139,69,19); return true;
-+ case XML_SALMON: rColor = ARGBColor(250,128,114); return true;
-+ case XML_SANDYBROWN: rColor = ARGBColor(244,164,96); return true;
-+ case XML_SEAGREEN: rColor = ARGBColor(46,139,87); return true;
-+ case XML_SEASHELL: rColor = ARGBColor(255,245,238); return true;
-+ case XML_SIENNA: rColor = ARGBColor(160,82,45); return true;
-+ case XML_SILVER: rColor = ARGBColor(192,192,192); return true;
-+ case XML_SKYBLUE: rColor = ARGBColor(135,206,235); return true;
-+ case XML_SLATEBLUE: rColor = ARGBColor(106,90,205); return true;
-+ case XML_SLATEGRAY: rColor = ARGBColor(112,128,144); return true;
-+ case XML_SLATEGREY: rColor = ARGBColor(112,128,144); return true;
-+ case XML_SNOW: rColor = ARGBColor(255,250,250); return true;
-+ case XML_SPRINGGREEN: rColor = ARGBColor(0,255,127); return true;
-+ case XML_STEELBLUE: rColor = ARGBColor(70,130,180); return true;
-+ case XML_TAN: rColor = ARGBColor(210,180,140); return true;
-+ case XML_TEAL: rColor = ARGBColor(0,128,128); return true;
-+ case XML_THISTLE: rColor = ARGBColor(216,191,216); return true;
-+ case XML_TOMATO: rColor = ARGBColor(255,99,71); return true;
-+ case XML_TURQUOISE: rColor = ARGBColor(64,224,208); return true;
-+ case XML_VIOLET: rColor = ARGBColor(238,130,238); return true;
-+ case XML_WHEAT: rColor = ARGBColor(245,222,179); return true;
-+ case XML_WHITE: rColor = ARGBColor(255,255,255); return true;
-+ case XML_WHITESMOKE: rColor = ARGBColor(245,245,245); return true;
-+ case XML_YELLOW: rColor = ARGBColor(255,255,0); return true;
-+ case XML_YELLOWGREEN: rColor = ARGBColor(154,205,50); return true;
-+
-+ default:
-+ return parse(sColor,
++ if( parse(sColor,
+ // Begin grammar
+ (
+ // the #rrggbb form
@@ -1052,9 +900,167 @@
+ real_p[assign_a(rColor.g)] >> ',' >>
+ real_p[assign_a(rColor.b)])
+ >> ')')
-+ ),
++ ) >> end_p,
+ // End grammar
-+ space_p).full;
++ space_p).full )
++ {
++ // free-form color found & parsed
++ return true;
++ }
++
++ // no free-form color - maybe a color name?
++ switch (getTokenId(sColor, strlen(sColor)))
++ {
++ case XML_ALICEBLUE: rColor = ARGBColor(240,248,255); return true;
++ case XML_ANTIQUEWHITE: rColor = ARGBColor(250,235,215); return true;
++ case XML_AQUA: rColor = ARGBColor(0,255,255); return true;
++ case XML_AQUAMARINE: rColor = ARGBColor(127,255,212); return true;
++ case XML_AZURE: rColor = ARGBColor(240,255,255); return true;
++ case XML_BEIGE: rColor = ARGBColor(245,245,220); return true;
++ case XML_BISQUE: rColor = ARGBColor(255,228,196); return true;
++ case XML_BLACK: rColor = ARGBColor(0,0,0); return true;
++ case XML_BLANCHEDALMOND: rColor = ARGBColor(255,235,205); return true;
++ case XML_BLUE: rColor = ARGBColor(0,0,255); return true;
++ case XML_BLUEVIOLET: rColor = ARGBColor(138,43,226); return true;
++ case XML_BROWN: rColor = ARGBColor(165,42,42); return true;
++ case XML_BURLYWOOD: rColor = ARGBColor(222,184,135); return true;
++ case XML_CADETBLUE: rColor = ARGBColor(95,158,160); return true;
++ case XML_CHARTREUSE: rColor = ARGBColor(127,255,0); return true;
++ case XML_CHOCOLATE: rColor = ARGBColor(210,105,30); return true;
++ case XML_CORAL: rColor = ARGBColor(255,127,80); return true;
++ case XML_CORNFLOWERBLUE: rColor = ARGBColor(100,149,237); return true;
++ case XML_CORNSILK: rColor = ARGBColor(255,248,220); return true;
++ case XML_CRIMSON: rColor = ARGBColor(220,20,60); return true;
++ case XML_CYAN: rColor = ARGBColor(0,255,255); return true;
++ case XML_DARKBLUE: rColor = ARGBColor(0,0,139); return true;
++ case XML_DARKCYAN: rColor = ARGBColor(0,139,139); return true;
++ case XML_DARKGOLDENROD: rColor = ARGBColor(184,134,11); return true;
++ case XML_DARKGRAY: rColor = ARGBColor(169,169,169); return true;
++ case XML_DARKGREEN: rColor = ARGBColor(0,100,0); return true;
++ case XML_DARKGREY: rColor = ARGBColor(169,169,169); return true;
++ case XML_DARKKHAKI: rColor = ARGBColor(189,183,107); return true;
++ case XML_DARKMAGENTA: rColor = ARGBColor(139,0,139); return true;
++ case XML_DARKOLIVEGREEN: rColor = ARGBColor(85,107,47); return true;
++ case XML_DARKORANGE: rColor = ARGBColor(255,140,0); return true;
++ case XML_DARKORCHID: rColor = ARGBColor(153,50,204); return true;
++ case XML_DARKRED: rColor = ARGBColor(139,0,0); return true;
++ case XML_DARKSALMON: rColor = ARGBColor(233,150,122); return true;
++ case XML_DARKSEAGREEN: rColor = ARGBColor(143,188,143); return true;
++ case XML_DARKSLATEBLUE: rColor = ARGBColor(72,61,139); return true;
++ case XML_DARKSLATEGRAY: rColor = ARGBColor(47,79,79); return true;
++ case XML_DARKSLATEGREY: rColor = ARGBColor(47,79,79); return true;
++ case XML_DARKTURQUOISE: rColor = ARGBColor(0,206,209); return true;
++ case XML_DARKVIOLET: rColor = ARGBColor(148,0,211); return true;
++ case XML_DEEPPINK: rColor = ARGBColor(255,20,147); return true;
++ case XML_DEEPSKYBLUE: rColor = ARGBColor(0,191,255); return true;
++ case XML_DIMGRAY: rColor = ARGBColor(105,105,105); return true;
++ case XML_DIMGREY: rColor = ARGBColor(105,105,105); return true;
++ case XML_DODGERBLUE: rColor = ARGBColor(30,144,255); return true;
++ case XML_FIREBRICK: rColor = ARGBColor(178,34,34); return true;
++ case XML_FLORALWHITE: rColor = ARGBColor(255,250,240); return true;
++ case XML_FORESTGREEN: rColor = ARGBColor(34,139,34); return true;
++ case XML_FUCHSIA: rColor = ARGBColor(255,0,255); return true;
++ case XML_GAINSBORO: rColor = ARGBColor(220,220,220); return true;
++ case XML_GHOSTWHITE: rColor = ARGBColor(248,248,255); return true;
++ case XML_GOLD: rColor = ARGBColor(255,215,0); return true;
++ case XML_GOLDENROD: rColor = ARGBColor(218,165,32); return true;
++ case XML_GRAY: rColor = ARGBColor(128,128,128); return true;
++ case XML_GREY: rColor = ARGBColor(128,128,128); return true;
++ case XML_GREEN: rColor = ARGBColor(0,128,0); return true;
++ case XML_GREENYELLOW: rColor = ARGBColor(173,255,47); return true;
++ case XML_HONEYDEW: rColor = ARGBColor(240,255,240); return true;
++ case XML_HOTPINK: rColor = ARGBColor(255,105,180); return true;
++ case XML_INDIANRED: rColor = ARGBColor(205,92,92); return true;
++ case XML_INDIGO: rColor = ARGBColor(75,0,130); return true;
++ case XML_IVORY: rColor = ARGBColor(255,255,240); return true;
++ case XML_KHAKI: rColor = ARGBColor(240,230,140); return true;
++ case XML_LAVENDER: rColor = ARGBColor(230,230,250); return true;
++ case XML_LAVENDERBLUSH: rColor = ARGBColor(255,240,245); return true;
++ case XML_LAWNGREEN: rColor = ARGBColor(124,252,0); return true;
++ case XML_LEMONCHIFFON: rColor = ARGBColor(255,250,205); return true;
++ case XML_LIGHTBLUE: rColor = ARGBColor(173,216,230); return true;
++ case XML_LIGHTCORAL: rColor = ARGBColor(240,128,128); return true;
++ case XML_LIGHTCYAN: rColor = ARGBColor(224,255,255); return true;
++ case XML_LIGHTGOLDENRODYELLOW: rColor = ARGBColor(250,250,210); return true;
++ case XML_LIGHTGRAY: rColor = ARGBColor(211,211,211); return true;
++ case XML_LIGHTGREEN: rColor = ARGBColor(144,238,144); return true;
++ case XML_LIGHTGREY: rColor = ARGBColor(211,211,211); return true;
++ case XML_LIGHTPINK: rColor = ARGBColor(255,182,193); return true;
++ case XML_LIGHTSALMON: rColor = ARGBColor(255,160,122); return true;
++ case XML_LIGHTSEAGREEN: rColor = ARGBColor(32,178,170); return true;
++ case XML_LIGHTSKYBLUE: rColor = ARGBColor(135,206,250); return true;
++ case XML_LIGHTSLATEGRAY: rColor = ARGBColor(119,136,153); return true;
++ case XML_LIGHTSLATEGREY: rColor = ARGBColor(119,136,153); return true;
++ case XML_LIGHTSTEELBLUE: rColor = ARGBColor(176,196,222); return true;
++ case XML_LIGHTYELLOW: rColor = ARGBColor(255,255,224); return true;
++ case XML_LIME: rColor = ARGBColor(0,255,0); return true;
++ case XML_LIMEGREEN: rColor = ARGBColor(50,205,50); return true;
++ case XML_LINEN: rColor = ARGBColor(250,240,230); return true;
++ case XML_MAGENTA: rColor = ARGBColor(255,0,255); return true;
++ case XML_MAROON: rColor = ARGBColor(128,0,0); return true;
++ case XML_MEDIUMAQUAMARINE: rColor = ARGBColor(102,205,170); return true;
++ case XML_MEDIUMBLUE: rColor = ARGBColor(0,0,205); return true;
++ case XML_MEDIUMORCHID: rColor = ARGBColor(186,85,211); return true;
++ case XML_MEDIUMPURPLE: rColor = ARGBColor(147,112,219); return true;
++ case XML_MEDIUMSEAGREEN: rColor = ARGBColor(60,179,113); return true;
++ case XML_MEDIUMSLATEBLUE: rColor = ARGBColor(123,104,238); return true;
++ case XML_MEDIUMSPRINGGREEN: rColor = ARGBColor(0,250,154); return true;
++ case XML_MEDIUMTURQUOISE: rColor = ARGBColor(72,209,204); return true;
++ case XML_MEDIUMVIOLETRED: rColor = ARGBColor(199,21,133); return true;
++ case XML_MIDNIGHTBLUE: rColor = ARGBColor(25,25,112); return true;
++ case XML_MINTCREAM: rColor = ARGBColor(245,255,250); return true;
++ case XML_MISTYROSE: rColor = ARGBColor(255,228,225); return true;
++ case XML_MOCCASIN: rColor = ARGBColor(255,228,181); return true;
++ case XML_NAVAJOWHITE: rColor = ARGBColor(255,222,173); return true;
++ case XML_NAVY: rColor = ARGBColor(0,0,128); return true;
++ case XML_OLDLACE: rColor = ARGBColor(253,245,230); return true;
++ case XML_OLIVE: rColor = ARGBColor(128,128,0); return true;
++ case XML_OLIVEDRAB: rColor = ARGBColor(107,142,35); return true;
++ case XML_ORANGE: rColor = ARGBColor(255,165,0); return true;
++ case XML_ORANGERED: rColor = ARGBColor(255,69,0); return true;
++ case XML_ORCHID: rColor = ARGBColor(218,112,214); return true;
++ case XML_PALEGOLDENROD: rColor = ARGBColor(238,232,170); return true;
++ case XML_PALEGREEN: rColor = ARGBColor(152,251,152); return true;
++ case XML_PALETURQUOISE: rColor = ARGBColor(175,238,238); return true;
++ case XML_PALEVIOLETRED: rColor = ARGBColor(219,112,147); return true;
++ case XML_PAPAYAWHIP: rColor = ARGBColor(255,239,213); return true;
++ case XML_PEACHPUFF: rColor = ARGBColor(255,218,185); return true;
++ case XML_PERU: rColor = ARGBColor(205,133,63); return true;
++ case XML_PINK: rColor = ARGBColor(255,192,203); return true;
++ case XML_PLUM: rColor = ARGBColor(221,160,221); return true;
++ case XML_POWDERBLUE: rColor = ARGBColor(176,224,230); return true;
++ case XML_PURPLE: rColor = ARGBColor(128,0,128); return true;
++ case XML_RED: rColor = ARGBColor(255,0,0); return true;
++ case XML_ROSYBROWN: rColor = ARGBColor(188,143,143); return true;
++ case XML_ROYALBLUE: rColor = ARGBColor(65,105,225); return true;
++ case XML_SADDLEBROWN: rColor = ARGBColor(139,69,19); return true;
++ case XML_SALMON: rColor = ARGBColor(250,128,114); return true;
++ case XML_SANDYBROWN: rColor = ARGBColor(244,164,96); return true;
++ case XML_SEAGREEN: rColor = ARGBColor(46,139,87); return true;
++ case XML_SEASHELL: rColor = ARGBColor(255,245,238); return true;
++ case XML_SIENNA: rColor = ARGBColor(160,82,45); return true;
++ case XML_SILVER: rColor = ARGBColor(192,192,192); return true;
++ case XML_SKYBLUE: rColor = ARGBColor(135,206,235); return true;
++ case XML_SLATEBLUE: rColor = ARGBColor(106,90,205); return true;
++ case XML_SLATEGRAY: rColor = ARGBColor(112,128,144); return true;
++ case XML_SLATEGREY: rColor = ARGBColor(112,128,144); return true;
++ case XML_SNOW: rColor = ARGBColor(255,250,250); return true;
++ case XML_SPRINGGREEN: rColor = ARGBColor(0,255,127); return true;
++ case XML_STEELBLUE: rColor = ARGBColor(70,130,180); return true;
++ case XML_TAN: rColor = ARGBColor(210,180,140); return true;
++ case XML_TEAL: rColor = ARGBColor(0,128,128); return true;
++ case XML_THISTLE: rColor = ARGBColor(216,191,216); return true;
++ case XML_TOMATO: rColor = ARGBColor(255,99,71); return true;
++ case XML_TURQUOISE: rColor = ARGBColor(64,224,208); return true;
++ case XML_VIOLET: rColor = ARGBColor(238,130,238); return true;
++ case XML_WHEAT: rColor = ARGBColor(245,222,179); return true;
++ case XML_WHITE: rColor = ARGBColor(255,255,255); return true;
++ case XML_WHITESMOKE: rColor = ARGBColor(245,245,245); return true;
++ case XML_YELLOW: rColor = ARGBColor(255,255,0); return true;
++ case XML_YELLOWGREEN: rColor = ARGBColor(154,205,50); return true;
++
++ default:
++ return false; // no color at all, I'd guess.
+ }
+}
+
@@ -1145,7 +1151,7 @@
+ )[assign_a(aCurrTransform,aIdentityTransform)],
+ // list delimiter is either ',' or space
+ ',' | eps_p ))
-+ ),
++ ) >> end_p,
+ // End grammar
+ space_p).full;
+
@@ -1188,7 +1194,7 @@
+ real_p[assign_a(y)] >>
+ real_p[assign_a(w)] >>
+ real_p[assign_a(h)])
-+ ),
++ ) >> end_p,
+ // End grammar
+ space_p).full;
+
@@ -1212,7 +1218,7 @@
+ (
+ // parse comma-delimited list of doubles
+ list_p(real_p[push_back_a(rOutputVector)])
-+ ),
++ ) >> end_p,
+ // End grammar
+ space_p).full;
+}
@@ -1760,7 +1766,7 @@
--- filter/source/svg/svgreader.cxx 1970-01-01 01:00:00.000000000 +0100
+++ filter/source/svg/svgreader.cxx 2008-02-29 10:27:32.000000000 +0100
-@@ -0,0 +1,1307 @@
+@@ -0,0 +1,1402 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
@@ -1817,6 +1823,22 @@
+{
+namespace
+{
++
++/** visits all children of the specified type with the given functor
++ */
++template<typename Func> void visitChildren(const Func& rFunc,
++ const uno::Reference<xml::dom::XElement> xElem,
++ xml::dom::NodeType eChildType )
++{
++ uno::Reference<xml::dom::XNodeList> xChildren( xElem->getChildNodes() );
++ const sal_Int32 nNumNodes( xChildren->getLength() );
++ for( sal_Int32 i=0; i<nNumNodes; ++i )
++ {
++ if( xChildren->item(i)->getNodeType() == eChildType )
++ rFunc( *xChildren->item(i).get() );
++ }
++}
++
+/** Visit all elements of the given tree (in-order traversal)
+
+ Given functor is called for every element, and passed the
@@ -2218,6 +2240,21 @@
+ maCurrState.maTransform = maCurrState.maTransform*aTransform;
+ break;
+ }
++ case XML_FONT_FAMILY:
++ maCurrState.maFontFamily=sValue;
++ break;
++ case XML_FONT_SIZE:
++ maCurrState.mnFontSize=convLength(sValue);
++ break;
++ case XML_FONT_STYLE:
++ maCurrState.meFontStyle=STYLE_ITALIC; // TODO: sValue.toStyleId();
++ break;
++ case XML_FONT_WEIGHT:
++ maCurrState.mnFontWeight=sValue.toDouble();
++ break;
++ case XML_FONT_VARIANT:
++ maCurrState.meFontVariant=VARIANT_SMALLCAPS; // TODO: sValue.toDouble();
++ break;
+ default:
+ OSL_TRACE("unhandled token %s (detected as %s)",
+ rtl::OUStringToOString(
@@ -2593,6 +2630,70 @@
+ writeBinaryData(xAttrs, xUnoAttrs, xElem, basegfx::B2DRange(x,y,x+width,y+height), sLinkValue);
+ break;
+ }
++ case XML_TEXT:
++ {
++ // collect text from all TEXT_NODE children into sText
++ rtl::OUStringBuffer sText;
++ visitChildren(boost::bind(
++ (rtl::OUStringBuffer& (rtl::OUStringBuffer::*)(const sal_Unicode* str))&rtl::OUStringBuffer::append,
++ boost::ref(sText),
++ boost::bind(&xml::dom::XNode::getNodeValue,
++ _1)),
++ xElem,
++ xml::dom::NodeType_TEXT_NODE);
++
++ // collect attributes
++ const sal_Int32 nNumElems( xAttributes->getLength() );
++ rtl::OUString sAttributeValue;
++ double x=0.0,y=0.0,width=0.0,height=0.0;
++ for( sal_Int32 i=0; i<nNumElems; ++i )
++ {
++ sAttributeValue = xAttributes->item(i)->getNodeValue();
++ const sal_Int32 nAttribId(
++ getTokenId(xAttributes->item(i)->getNodeName()));
++ switch(nAttribId)
++ {
++ case XML_X:
++ x = convLength(sAttributeValue);
++ break;
++ case XML_Y:
++ y = convLength(sAttributeValue);
++ break;
++ case XML_WIDTH:
++ width = convLength(sAttributeValue);
++ break;
++ case XML_HEIGHT:
++ height = convLength(sAttributeValue);
++ break;
++ default:
++ // skip
++ break;
++ }
++ }
++
++ // actually export text
++ xAttrs->Clear();
++ xAttrs->AddAttribute( USTR( "svg:x" ), rtl::OUString::valueOf(x/100.0)+USTR("mm"));
++ xAttrs->AddAttribute( USTR( "svg:y" ), rtl::OUString::valueOf(y/100.0)+USTR("mm"));
++ xAttrs->AddAttribute( USTR( "svg:width" ), rtl::OUString::valueOf(width/100.0)+USTR("mm"));
++ xAttrs->AddAttribute( USTR( "svg:height" ), rtl::OUString::valueOf(height/100.0)+USTR("mm"));
++
++ mxDocumentHandler->startElement(USTR("draw:frame"),xUnoAttrs);
++
++ xAttrs->Clear();
++ mxDocumentHandler->startElement(USTR("draw:text-box"),xUnoAttrs);
++ mxDocumentHandler->startElement(USTR("text:p"),xUnoAttrs);
++ // TODO: put text style in here
++ mxDocumentHandler->startElement(USTR("text:span"),xUnoAttrs);
++
++ mxDocumentHandler->characters(sText.makeStringAndClear());
++
++ mxDocumentHandler->endElement(USTR("text:span"));
++ mxDocumentHandler->endElement(USTR("text:p"));
++ mxDocumentHandler->endElement(USTR("draw:text-box"));
++ mxDocumentHandler->endElement(USTR("draw:frame"));
++ break;
++ }
+ }
+ }
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]