Hi Papamatti, you mean https://bugs.freedesktop.org/show_bug.cgi?id=37559 ? Papamatti schrieb:
Hello list, I investigate the problem of two pixels (top left and bottom right) around predefined shapes (circle, smiley, ellipse...)
Do you want to fix it?
You can reproduce the bug by - Open LibreOffice Draw - Draw a ellipse or circle
from the shape category "custom shape".
- Select your object and convert it to a polygon - change into the edit points mode - now you can see the additional point top left and bottom right.
I have used "Pentagon" and have got these additional points too. My first thought was, that it is something special for the MS-types, but the error remains, when I change to draw:type="non-primitive".
You can move these dots around, delete them and so on. Unfortunalely they are visible on export into pdf or any other format. This Bug does not exist in OOO3.20 and was fixed in AOO3.40. It was Introduces during the development of OOo 3.30 and found it's way during the fork into LibreOffice 3.3. This is the story so far.
Do you know a related issue or commit or cws from that time?
I investigate the files, which OOo 3.20 and LO4.2.4 are creating with the steps described above and with an simple ellipse. OpenOffice 3.20 has created this structure: (There are no additional dots, and, surprise if i open this file with LO4.2.4 and save it into another file and reopen it with LO4.2.4 the bug is not present! Conclusion: The bug has something to do with the creation of these shapes!) <office:body> <office:drawing> <draw:page draw:name="page1" draw:style-name="dp1" draw:master-page-name="Standard"> <draw:ellipse draw:style-name="gr1" draw:text-style-name="P1" draw:layer="layout" svg:width="7cm" svg:height="5.5cm" svg:x="7cm" svg:y="10.5cm"> <text:p/> </draw:ellipse> </draw:page> </office:drawing> </office:body>
That is a different kind of shape. Notice draw:ellipse instead of draw:custom-shape.
LibreOffice 4.2.4 (Ubuntu 14.04) creates this structure after drawing a ellipse: <office:body> <office:drawing> <draw:page draw:name="page1" draw:style-name="dp1" draw:master-page-name="Standard"> <draw:custom-shape draw:style-name="gr1" draw:text-style-name="P1" draw:layer="layout" svg:width="2cm" svg:height="2cm" svg:x="2cm" svg:y="2cm"> <text:p/> <draw:enhanced-geometry svg:viewBox="0 0 21600 21600" draw:glue-points="10800 0 3163 3163 0 10800 3163 18437 10800 21600 18437 18437 21600 10800 18437 3163" draw:text-areas="3163 3163 18437 18437" draw:type="ellipse" draw:enhanced-path="U 10800 10800 10800 10800 0 360 Z N"/> </draw:custom-shape> </draw:page> </office:drawing> </office:body> LibreOffice 4.2.4 (Ubuntu 14.04) creates this structure after convert the ellipse into a polygon: (But instead of a polygon, LO creates a path!!!) <office:body> <office:drawing> <draw:page draw:name="page1" draw:style-name="dp1" draw:master-page-name="Standard"> <draw:path draw:style-name="gr1" draw:text-style-name="P1" draw:layer="layout" svg:width="2cm" svg:height="2cm" svg:x="2cm" svg:y="2cm" svg:viewBox="0 0 2001 2001" svg:d="M1000 0l105 5 101 15 97 24 92 33 88 41 83 49 76 57 71 63 63 71 57 76 49 83 41 88 33 92 24 97 15 101 5 105-5 105-15 101-24 97-33 92-41 88-49 83-57 76-63 71-71 63-76 57-83 49-88 41-92 33-97 24-101 15-105 5-105-5-101-15-97-24-92-33-88-41-83-49-76-57-71-63-63-71-57-76-49-83-41-88-33-92-24-97-15-101-5-105 5-105 15-101 24-97 33-92 41-88 49-83 57-76 63-71 71-63 76-57 83-49 88-41 92-33 97-24 101-15zM0 0zM2001 2001z"> <text:p/> </draw:path> </draw:page> </office:drawing> </office:body> After deleting the two additional dots and save the file again it changed to a polygon!!!: (Also look at the svg width, hight and the svg:viewBox) ;-)
If you make your tests with "Pentagon", it is easier to reconstruct the conversion.
<office:body> <office:drawing> <draw:page draw:name="page1" draw:style-name="dp1" draw:master-page-name="Standard"> <draw:polygon draw:style-name="gr1" draw:text-style-name="P1" draw:layer="layout" svg:width="1.999cm" svg:height="1.999cm" svg:x="2cm" svg:y="2cm" svg:viewBox="0 0 2000 2000" draw:points="1000,0 1105,5 1206,20 1303,44 1395,77 1483,118 1566,167 1642,224 1713,287 1776,358 1833,434 1882,517 1923,605 1956,697 1980,794 1995,895 2000,1000 1995,1105 1980,1206 1956,1303 1923,1395 1882,1483 1833,1566 1776,1642 1713,1713 1642,1776 1566,1833 1483,1882 1395,1923 1303,1956 1206,1980 1105,1995 1000,2000 895,1995 794,1980 697,1956 605,1923 517,1882 434,1833 358,1776 287,1713 224,1642 167,1566 118,1483 77,1395 44,1303 20,1206 5,1105 0,1000 5,895 20,794 44,697 77,605 118,517 167,434 224,358 287,287 358,224 434,167 517,118 605,77 697,44 794,20 895,5"> <text:p/> </draw:polygon> </draw:page> </office:drawing> </office:body>
After conversion it has only straight path segments, and after removing 'M0 0zM2001 2001z' it is only one closed path. Therefore there is no need for the complex handling using a svd:d attribute, but a simple list of points is sufficient.
[..]The two additional points should not be there. But I guess they were introduced to solve another problem. (Read related discussion in https://issues.apache.org/ooo/show_bug.cgi?id=37213 and https://issues.apache.org/ooo/show_bug.cgi?id=124084#c10.) Perhaps Thorsten remembers the reason and why they are not Apache OpenOffice.
Kind regards Regina