On Fri, Jul 17, 2009 at 2:41 PM, Sven Langkamp <sven.langkamp@gmail.com> wrote:
On Fri, Jul 17, 2009 at 1:48 PM, Thomas Zander <zander@kde.org> wrote:
On Friday 03 July 2009 03:43:16 Sven Langkamp wrote:
> Hi,
>
> in the ongoing plugfest testing an issue where text appeared with underline
> and line-through in OOo has been found.
> For details see
> http://plugtest.opendocsociety.org/doku.php?id=scenarios:20090623:presentat
>ion-placeholder
>
> I found out that the character style is loads with line type single if the
> specified line type is empty and the style is "none"
> I have attached a patch to change it to load as NoLineType. The ODF spec is
> a bit confusing at this point, so I'm posting it for review.

Sorry for taking so long to reply...

I think the patch is almost correct but I'm worried it doesn't cover all
cases. Specifically the 'if()' directly following the one you modified might set
your style to 'solid' instead of none.
Can you test the attached patch to solve the issue you had too? I think it is
a tad more complete.


-    if (fixedType.isEmpty() && !fixedStyle.isEmpty())
+    if (fixedType.isEmpty() && !fixedStyle.isEmpty() && fixedStyle != "none")
         fixedType = "single";


-    if (fixedType.isEmpty() && !fixedStyle.isEmpty())
+    if (fixedStyle == "none")
+        fixedType.clear();
+    else if (fixedType.isEmpty() && !fixedStyle.isEmpty())
         fixedType = "single";

Isn't your patch doing the exact opposite of my patch? I guess with need a unittest anyway.

Ah no, I was wrong here. Both patches do the same. Line type has the value KoCharacterStyle::NoLineType by default so that case doesn't have to be covered.