[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: [OASIS Issue Tracker] Commented: (OFFICE-3774) Definition of draw:angle in ODF1.2 does not fit to implementation
[ http://tools.oasis-open.org/issues/browse/OFFICE-3774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=31560#action_31560 ]
Andreas Guelzow commented on OFFICE-3774:
------------------------------------------
Repeating the argument "Apparently no existing implementation follows the present spec here" does not make it anymore true. Regina only tested a few implementations (namely 4, 3 of them coming from the same source base).
In Gnumeric the following function is used to read the value for draw:angle:
static char const *
oo_parse_angle (GsfXMLIn *xin, xmlChar const *str,
char const *name, int *angle)
{
double num;
char *end = NULL;
g_return_val_if_fail (str != NULL, NULL);
num = go_strtod (CXML2C (str), &end);
if (CXML2C (str) != end) {
if (*end != '\0') {
if (0 == strncmp (end, "deg", 3)) {
end += 3;
} else if (0 == strncmp (end, "grad", 4)) {
num = num / 9. * 10.;
end += 4;
} else if (0 == strncmp (end, "rad", 2)) {
num = num * 180. / M_PIgnum;
end += 3;
} else {
oo_warning (xin, _("Invalid attribute '%s', unknown unit '%s'"),
name, str);
return NULL;
}
}
} else {
oo_warning (xin, _("Invalid attribute '%s', expected angle, received '%s'"),
name, str);
return NULL;
}
*angle = ((int) num) % 360;
return end;
}
I believe this is what the spec currently specifies. So at least one implementation follows the current spec.
> Definition of draw:angle in ODF1.2 does not fit to implementation
> -----------------------------------------------------------------
>
> Key: OFFICE-3774
> URL: http://tools.oasis-open.org/issues/browse/OFFICE-3774
> Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
> Issue Type: Bug
> Affects Versions: ODF 1.2
> Reporter: Robert Weir
>
> Copied from office-comment list
> Original author: Regina Henschel <rb.henschel@t-online.de>
> Original date: 4 Aug 2012 12:39:26
> Original URL: http://lists.oasis-open.org/archives/office-comment/201208/msg00002.html
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]