diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-06-10 14:49:46 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-06-10 14:50:02 +0200 |
commit | 346dbb0a6ed8670c1075e61fe9806bfa8078fb8b (patch) | |
tree | 81c494898c876c59d0c0b24a9a65edc73b4c9352 /writerperfect | |
parent | n#683578: Performance improvements for xlsx imports. (diff) | |
download | core-346dbb0a6ed8670c1075e61fe9806bfa8078fb8b.tar.gz core-346dbb0a6ed8670c1075e61fe9806bfa8078fb8b.zip |
For the time being approximate ellipic arc with a straight line
Diffstat (limited to 'writerperfect')
-rw-r--r-- | writerperfect/source/filter/OdgGenerator.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/writerperfect/source/filter/OdgGenerator.cxx b/writerperfect/source/filter/OdgGenerator.cxx index a1f849cfbdab..5a61fd85b52f 100644 --- a/writerperfect/source/filter/OdgGenerator.cxx +++ b/writerperfect/source/filter/OdgGenerator.cxx @@ -600,6 +600,7 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector& path) qx = (qx < path[k]["svg:x2"]->getDouble()) ? path[k]["svg:x2"]->getDouble() : qx; qy = (qy < path[k]["svg:y2"]->getDouble()) ? path[k]["svg:y2"]->getDouble() : qy; } +#if 0 if(path[k]["libwpg:path-action"]->getStr() == "A") { px = (px > path[k]["svg:x"]->getDouble()-2*path[k]["svg:rx"]->getDouble()) ? path[k]["svg:x"]->getDouble()-2*path[k]["svg:rx"]->getDouble() : px; @@ -607,6 +608,7 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector& path) qx = (qx < path[k]["svg:x"]->getDouble()+2*path[k]["svg:rx"]->getDouble()) ? path[k]["svg:x"]->getDouble()+2*path[k]["svg:rx"]->getDouble() : qx; qy = (qy < path[k]["svg:y"]->getDouble()+2*path[k]["svg:ry"]->getDouble()) ? path[k]["svg:y"]->getDouble()+2*path[k]["svg:ry"]->getDouble() : qy; } +#endif } double vw = qx - px; double vh = qy - py; @@ -641,7 +643,9 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector& path) (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540)); sValue.append(sElement); } - else if (path[i]["libwpg:path-action"]->getStr() == "L") + else if (path[i]["libwpg:path-action"]->getStr() == "L" + // approximate for the time being the elliptic arc by a line + || path[i]["libwpg:path-action"]->getStr() == "A") { sElement.sprintf("L%i %i", (unsigned)((path[i]["svg:x"]->getDouble()-px)*2540), (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540)); @@ -655,6 +659,7 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector& path) (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540)); sValue.append(sElement); } +#if 0 else if (path[i]["libwpg:path-action"]->getStr() == "A") { sElement.sprintf("A%i %i %i %i %i %i %i", (unsigned)((path[i]["svg:rx"]->getDouble())*2540), @@ -662,6 +667,7 @@ void OdgGeneratorPrivate::_drawPath(const WPXPropertyListVector& path) 0, 0, (unsigned)((path[i]["svg:x"]->getDouble()-px)*2540), (unsigned)((path[i]["svg:y"]->getDouble()-py)*2540)); sValue.append(sElement); } +#endif else if (path[i]["libwpg:path-action"]->getStr() == "Z" && i >= (path.count() - 1)) sValue.append(" Z"); } |