Apache OpenOffice (AOO) Bugzilla – Issue 123592
[non-pro] Warning about attribute svg:stroke-width="10px"
Last modified: 2024-05-05 09:25:25 UTC
Error: An error or a warning has occured during XML import/export! Error-Id: 0x10020002 Flags: 1 WARNING Class: 2 FORMAT Number: 2 Parameters: 0: svg:stroke-width 1: 10px Exception-Message: Position: Public Identifier: System Identifier: file:///C:/Users/pppregin/Desktop/BezierFollowedByLine.odg Row, Column: 7,6 The attached document is valid according http://odf-validator.rhcloud.com/ I have used a debug-build of r5136830.
ALG: Regina, do you have the file that caused this, please?
Created attachment 81884 [details] File that produces such warning
Created attachment 81885 [details] Export from Inkscape The Inkscape file generates similar Warning/Errors: Error: An error or a warning has occured during XML import/export! Error-Id: 0x10020002 Flags: 1 WARNING Class: 2 FORMAT Number: 2 Parameters: 0: svg:stroke-width 1: 0,000pt Exception-Message: Position: Public Identifier: System Identifier: file:///C:/Users/pppregin/Desktop/InkscapeSpirale.odg Row, Column: 55,2 Error: An error or a warning has occured during XML import/export! Error-Id: 0x10020002 Flags: 1 WARNING Class: 2 FORMAT Number: 2 Parameters: 0: svg:stroke-opacity 1: 100,000% Exception-Message: Position: Public Identifier: System Identifier: file:///C:/Users/pppregin/Desktop/InkscapeSpirale.odg Row, Column: 55,2
ALG: Indeed in the styles part of the ODF there is svg:stroke-width="0,000pt" and svg:stroke-opacity="100,000%". The colon is the wrong sign here, it should be a point as numerical separator (AFAIK). Thus, the warning is correct.
So for the Inkscape export, it is an error in Inkscape. If I correct comma to dot, the file opens without warning. But the other file still produces this error and has no decimal comma. It seems, that it is the special unit px, which does not work. Using pt for example gives no error.
ALG: So the question is, is px allowed in ODF? AFAIK it is no tallowed in the core, but that might be changed...
[ODF 1.2] 20.400 svg:stroke-width "The svg:stroke-width attribute has the data type length 18.3.18." 18.3.18 length "A (positive or negative) length, consisting of magnitude and unit, in conformance with the Units of Measure defined in ยง5.9.13 of [XSL]." [URL see Bugzilla field] 5.9.13 Definitions of Units of Measure The units of measure in this Recommendation have the following definitions: Name Definition cm See [ISO31] mm See [ISO31] in 2.54cm pt 1/72in pc 12pt px See [5.9.13.1 Pixels] em See [5.9.7.2 Relative Lengths] So yes, px is a valid unit in ODF.
ALG> Re-checked with patched file InkscapeSpirale.odg, exchanged commatas in svg:stroke-width="0.000pt" and svg:stroke-opacity="100.000%". After that, load cproduces no warnings. I also checked conversion from pt to 100thMm done in SvXMLUnitConverter::convertMeasure in xmloff, looks correct. Nearly all units listed here are processed. Here are the exceptions: - em is missing (started, but commented out) - px is missing
Warning still there in AOO420m1(Build:9800) - Rev. 1614365
Reset the assignee to the default "issues@openoffice.apache.org".
*** Issue 128578 has been marked as a duplicate of this issue. ***