[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: A bug discussion required.
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2010-02-23 17:32:14
Message-ID: 201002231832.15435.t.zachmann () zagge ! de
[Download RAW message or body]

On Tuesday 23 February 2010 13:30:39 Matus Uzak wrote:
> Hi,
> 
> sorry to not reply to previous messages, I didn't receive them somehow.
> 
> My problem: I have a .doc file containing a gif image and some text in
> paragraphs.
> The .odt file produced by koconverter gets displayed correctly in ooo
> writer but not in kword.
> 
> I checked the creation of named styles, which is OK.  But there's one
> strange thing in automatic styles creation.
> The msword-odf filter puts text-properties not into paragraph styles but
> into text styles.
> So all paragraph styles are empty and inherit all attributes from the
> "Normal" named style (includes text-line-through-type="double").
> Any text is then formatted using the span element (even in case of a
> paragraph).   Is this OK?
> The span element should be used to apply a different style for shorter
> text fractions.
> 
> I'm asking because if I put the text-properties into automatic paragraph
> style definition the bug is fixed.
> 
>  From the kword view however, it looks like a paragraph containing a
> picture interferes with a previous paragraph containing text inside
> a span element.  The interference modifies some text-properties of the
> span element.  I didn't start to debug this.
> 
> Well, what is the correct approach to fix that one?
> 
> br,
> 
> matus
As far as I see it the "Picture 1" should not have the strike though set as 
the value as the strike through for the text styles is set to none even if the 
paragraph has it set.

    <style:style style:name="T2" style:family="text">
      <style:text-properties fo:color="#000000" fo:font-style="italic" 
style:font-name="Times New Roman" style:text-line-through-type="none"/>
    </style:style>

    <style:style style:name="P2" style:family="paragraph" style:parent-style-
name="Normal"/>

    <style:style style:name="Normal" style:display-name="Normal" 
style:family="paragraph">
      <style:paragraph-properties fo:background-color="transparent" fo:border-
bottom="0pt none #000000" fo:border-left="0pt none #000000" fo:border-
right="0pt none #000000" fo:border-top="0pt none #000000" fo:break-
before="auto" fo:keep-together="auto" fo:keep-with-next="auto" fo:line-
height="100%" fo:margin-bottom="0.000000000000000pt" fo:margin-
left="0.000000000000000pt" fo:margin-right="0.000000000000000pt" fo:margin-
top="0.000000000000000pt" fo:text-align="start" fo:text-
indent="0.000000000000000pt" style:writing-mode="lr-tb"/>
      <style:text-properties fo:background-color="transparent" 
fo:color="#993300" fo:font-size="18.000000000000000pt" fo:font-style="normal" 
fo:font-weight="normal" style:font-name="Times New Roman" style:text-line-
through-type="double" style:text-underline-style="none"/>
    </style:style>

Text using the above styles:
      <text:p text:style-name="P2">
        <text:span text:style-name="T2">Picture 1</text:span>
      </text:p>

The attached patch fixes the problem. Would be nice if some people with more 
kotext knowledge could review it. Looks like there where some mixed up logic 
in case the sytle was not given.

Thorsten

["charstyle.diff" (text/x-patch)]

Index: styles/KoCharacterStyle.cpp
===================================================================
--- styles/KoCharacterStyle.cpp	(revision 1094280)
+++ styles/KoCharacterStyle.cpp	(working copy)
@@ -287,7 +287,7 @@ static void importOdfLine(const QString 
         fixedType.clear();
     else if (fixedType.isEmpty() && !fixedStyle.isEmpty())
         fixedType = "single";
-    else if (!fixedType.isEmpty() && fixedStyle.isEmpty())
+    else if (fixedType.isEmpty() && fixedStyle.isEmpty())
         fixedStyle = "solid";
 
     if (fixedType == "single")


_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic