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

List:       kde-commits
Subject:    koffice/kword/part
From:       Thomas Zander <zander () kde ! org>
Date:       2010-11-20 21:49:15
Message-ID: 20101120214915.78CB9AC8A0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1199160 by zander:

Fix loading underline from kwd

BUG: 256641

 M  +5 -3      KWDLoader.cpp  


--- trunk/koffice/kword/part/KWDLoader.cpp #1199159:1199160
@@ -1,5 +1,5 @@
 /* This file is part of the KDE project
- * Copyright (C) 2006, 2007, 2009 Thomas Zander <zander@kde.org>
+ * Copyright (C) 2006, 2007, 2009-2010 Thomas Zander <zander@kde.org>
  * Copyright (C) 2008 Thorsten Zachmann <zachmann@kde.org>
  *
  * This library is free software; you can redistribute it and/or
@@ -988,7 +988,7 @@
     }
     element = formatElem.namedItem("UNDERLINE").toElement();
     if (!element.isNull()) {
-        KoCharacterStyle::LineStyle underline = KoCharacterStyle::NoLineStyle;
+        KoCharacterStyle::LineStyle underline;
         QString value = element.attribute("value", "0"); // "0" is NoUnderline
         if (value == "1" || value == "single")
             style->setUnderlineType(KoCharacterStyle::SingleLine);
@@ -1002,7 +1002,9 @@
         }
 
         QString type = element.attribute("styleline", "solid");
-        if (type == "solid")
+        if (value == "0")
+            underline = KoCharacterStyle::NoLineStyle;// no underline, ignore the type.
+        else if (type == "solid")
             underline = KoCharacterStyle::SolidLine;
         else if (type == "dash")
             underline = KoCharacterStyle::DashLine;
[prev in list] [next in list] [prev in thread] [next in thread] 

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