<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/110928/">http://git.reviewboard.kde.org/r/110928/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On June 10th, 2013, 5:52 p.m. UTC, <b>C. Boemann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I still don't see the relation to the bug nor do I understand why we need to save 0,0</pre>
</blockquote>
<p>On June 10th, 2013, 7:16 p.m. UTC, <b>Inge Wallin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ah, now I understand why everybody focusses on the bug. I was unclear in my description. "This bug" in the description is about the bug I described, not the bug in bugzilla. I was just mentioning the bug in bugzilla because it provided me with a file where I noticed the problem first time.
Regarding why we need to save 0,0... Can you point me to the place in the spec where it says that 0,0 is the default value? If not, there's your answer.</pre>
</blockquote>
<p>On June 10th, 2013, 8:16 p.m. UTC, <b>Elvis Stansvik</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">In 19.573.5 the spec refers to 5.2.1 of the SVG spec which says 0,0 is the default [1]. Not 100% sure this is what we're talking about here, so someone please fill me in if I'm wrong :)
[1] http://www.w3.org/TR/2003/REC-SVG11-20030114/struct.html#SVGElement</pre>
</blockquote>
<p>On June 12th, 2013, 8:04 a.m. UTC, <b>Inge Wallin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">No, this is the svg element. We are talking about svg:x and svg:y attributes. But there is probably a relation. </pre>
</blockquote>
<p>On June 12th, 2013, 10:36 a.m. UTC, <b>Elvis Stansvik</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Right, but that's the section of the SVG spec the ODF spec references in 19.573.5 [1], and it includes the definition of the x and y attributes (see under "Attribute definitions"). So the way I read it is that x/y should be treated the same as for the svg element in the SVG spec. But I may be wrong.
[1] http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1418216_253892949</pre>
</blockquote>
<p>On June 12th, 2013, 1:49 p.m. UTC, <b>Sebastian Sauer</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, that's correct. Grep for "svg-compatible" in http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2-part1.html which gives a nice table explaining that ODF uses the svg prefix for "Elements and attributes that are compatible to elements or attributes defined in [SVG]." including link to the SVG specs.
For a longer explanation of the background see http://www.w3.org/Graphics/SVG/WG/wiki/Proposals/SVG_in_ODF
re optional see also http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-schema.rng
<define name="common-draw-position-attlist">
<optional>
<attribute name="svg:x">
<ref name="coordinate"/>
</attribute>
</optional>
<optional>
<attribute name="svg:y">
<ref name="coordinate"/>
</attribute>
</optional>
</define>
</pre>
</blockquote>
<p>On June 15th, 2013, 2:37 p.m. UTC, <b>Inge Wallin</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Ok, that does it. I'm convinced. :)
Still, I think that it would be nice to always save x and y so that also non-well behaved applications could read the files. Opinions? If there are only negative reactions to this I will retract the RR.</pre>
</blockquote>
<p>On June 15th, 2013, 3:28 p.m. UTC, <b>C. Boemann</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I don't have negative reaction to your suggestion to always save. I mean normally we don't save that many shapes at 0,0 anyway so it's unlikely to be a big change in practice.</pre>
</blockquote>
<p>On June 17th, 2013, 9:24 a.m. UTC, <b>Sebastian Sauer</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">hmmm, hmmm... I see multiple problems with that.
1. I think there is a good reasons that we NOT save default values (not talking here about scg:x/y only but in general default values). That is that we *greatly* (and I mean by factors) reduce the ODF produced what makes it factors faster to investigate, manipulate (hand-edit to check for behavior), save those XML files.
2. Afaik neither Apache OpenOffice nor LibreOffice nor Microsoft Office do that or?
3. This would then apply to all default values, right? If yes, 1) applies (lots of noise) plus I fear about the consequences of 2).
4. This:
> that also non-well behaved applications could read the files
What "non-well behaved applications" we are talking about?
In an ideal world we would never work around broken apps. Unfortunately that's unrealistic and so we do lots of workarounds during loading ODF. But we do so by clearly documenting that (KoOdfWorkaround). Now if we try to do the same for saving it becomes imho an even bigger problems cause:
a) We cannot really target the "consumer" since there is no "if consumer_is_aoo {} else if consumer_is_mso {}" logic. We could probably use app=specific namespaces for that. But that may break on newer versions of the specific app and app-namespaces not contain version-informations.
b) What about conflicts? Like a workaround fixes broken app x but breaks broken app y?
5. When we do this we need to cross-check at least AAO, LO and MSO that they still proper load our ODF's.
6. And the most important question (for me) is: What is that what we try to fix here?
</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">> 1. I think there is a good reasons that we NOT save default values (not talking here about scg:x/y only
> but in general default values). That is that we *greatly* (and I mean by factors) reduce the ODF
> produced what makes it factors faster to investigate, manipulate (hand-edit to check for behavior),
> save those XML files.
This is totally new to me. Before you showed me the svg defaults (0, 0) for svg:x and svg:y, I didn't know about *any* default values in ODF. Of course all applications have defaults but I'm talking about the spec here. Also, since you make such a right-out bold statement, I'd like to know what these defaults are and why (as far as I know) not a single one of them is mentioned in the source code of Calligra. The "lacking" svg:x and svg:y didn't look as if it was deliberate but I could be wrong there. A comment in the code would have gone a long way here.
> 2. Afaik neither Apache OpenOffice nor LibreOffice nor Microsoft Office do that or?
The reason I started on this at all was because LibreOffice didn't want to load a file created by Calligra.
> 3. This would then apply to all default values, right? If yes, 1) applies (lots of noise) plus I fear
> about the consequences of 2).
Of course. But where are those values? I'd love a list of them.
> 4. This:
>
>> that also non-well behaved applications could read the files
>
> What "non-well behaved applications" we are talking about?
I don't have any specific application in mind. It was an application of the general principle "be generous in what you accept and precise in what you produce".
> In an ideal world we would never work around broken apps. Unfortunately that's unrealistic and so we
> do lots of workarounds during loading ODF. But we do so by clearly documenting that (KoOdfWorkaround).
> Now if we try to do the same for saving it becomes imho an even bigger problems cause:
>
> a) We cannot really target the "consumer" since there is no "if consumer_is_aoo {} else if
> consumer_is_mso {}" logic. We could probably use app=specific namespaces for that. But that
> may break on newer versions of the specific app and app-namespaces not contain version-informations.
Again, the reason all of this started was because LO didn't want to read a file created by Calligra.
> b) What about conflicts? Like a workaround fixes broken app x but breaks broken app y?
I doubt very much that an application that knows that the default for (x, y) is (0, 0) would crash or break if the (0, 0) is found in the output. Could you think of a case where that assumption would make sense?
> 5. When we do this we need to cross-check at least AAO, LO and MSO that they still proper load our ODF's.
See answer to 2. and 4b)
> 6. And the most important question (for me) is: What is that what we try to fix here?
See answer to 2. and 4.
</pre>
<br />
<p>- Inge</p>
<br />
<p>On June 10th, 2013, 7:18 p.m. UTC, Inge Wallin wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Calligra.</div>
<div>By Inge Wallin.</div>
<p style="color: grey;"><i>Updated June 10, 2013, 7:18 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When a shape is in the position 0, 0 and there are no other transformations, the position will not be saved back. In other words, there will be an svg:height and svg:width but no svg:x or svg:y. I noticed this while trying to fix https://bugs.kde.org/show_bug.cgi?id=184727.
This patch fixes that the code doesn't save the position. I suggest that we apply it to 2.7 as well and maybe also to 2.6.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested with the file mentioned above.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>libs/flake/KoShape.cpp <span style="color: grey">(6d14a8c)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/110928/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>