https://bugs.documentfoundation.org/show_bug.cgi?id=161327
--- Comment #9 from Michael Stahl (allotropia) <[email protected]> --- (In reply to Regina Henschel from comment #8) > My investigation (see below) shows, that we need a more general approach as > currently in https://gerrit.libreoffice.org/c/core/+/168336 > > Perhaps the following? > Add > bool Converter::convertAngleWithUnit(double& rAngle, std::u16string_view > rString, bool& rHasUnit) > bool Converter::convertAngleWithUnit(double& rAngle, std::string_view > rString, bool& rHasUnit) > and use it where currently convertNumber or convertDouble is used for angles. > > Not only converting the angle with unit to degree, but inform whether there > was a unit, allows to use it in Converter::convertAngle and for the cases > (dr3d:end-angle and draw:rotation in hatch) where the wrongly written 1/10th > of a degree has to be considered. > > So make all cases able to read angles with unit. definitely angles with unit should be read everywhere. one issue with these functions is that the SvXMLImport can check the version numbers, but it can't be used from "sax" module, so xmloff has to do it. i think it would work equally well to have rHasUnit output parameter or isWrongOOo10thDegAngle and let the function convert it. i'm wondering, is a new function for import required at all? for the serious cases, until the export is fixed, you could just pass "true" as the isWrongOOo10thDegAngle for convertAngle()? except if there are cases where more precision than 10th-of-degrees is supported, a "double" implementation would make sense for that. > In cases were currently unit less degree is written, we need not change the > export but only the import. > > In cases were currently unit less 1/10th of a degree is written, we will > need to export unit 'deg' at some time, when all active versions are able to > read units. ODF 1.4 is likely too early, but ODF 1.5 will work. yes > And these are the results of my investigation (hopefully correct): > > None of the cases is able to import angle with units. > None of the cases exports angle units. > > (A) writes unit-less 1/10th of a degree > ----------------------------------- > draw:rotation => UNO FillHatch.Angle > dr3d:end-angle => UNO D3DEndAngle (this bugreport) okay good, so only one additional serious problem... -- You are receiving this mail because: You are the assignee for the bug.
