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

List:       kde-commits
Subject:    koffice/libs/kotext
From:       Thomas Zander <zander () kde ! org>
Date:       2010-08-20 16:19:33
Message-ID: 20100820161933.D7D33AC867 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1166039 by zander:

Don't print styles if they are not there.

 M  +3 -3      KoTextDebug.cpp  


--- trunk/koffice/libs/kotext/KoTextDebug.cpp #1166038:1166039
@@ -163,7 +163,7 @@
     }
 
     KoStyleManager *styleManager = document ? KoTextDocument(document).styleManager() : 0;
-    if (styleManager) {
+    if (styleManager && textFormat.hasProperty(KoCharacterStyle::StyleId)) {
         int id = textFormat.intProperty(KoCharacterStyle::StyleId);
         KoCharacterStyle *characterStyle = styleManager->characterStyle(id);
         attrs.append(" characterStyle=\"id:").append(QString::number(id));
@@ -291,7 +291,7 @@
 {
     QString attrs;
     KoStyleManager *styleManager = document ? KoTextDocument(document).styleManager() : 0;
-    if (styleManager) {
+    if (styleManager && blockFormat.hasProperty(KoParagraphStyle::StyleId)) {
         int id = blockFormat.intProperty(KoParagraphStyle::StyleId);
         KoParagraphStyle *paragraphStyle = styleManager->paragraphStyle(id);
         attrs.append(" paragraphStyle=\"id:").append(QString::number(id));
@@ -465,7 +465,7 @@
 {
     QString attrs;
     KoStyleManager *styleManager = document ? KoTextDocument(document).styleManager() : 0;
-    if (styleManager) {
+    if (styleManager && listFormat.hasProperty(KoListStyle::StyleId)) {
         int id = listFormat.intProperty(KoListStyle::StyleId);
         KoListStyle *listStyle = styleManager->listStyle(id);
         attrs.append(" listStyle=\"id:").append(QString::number(id));
[prev in list] [next in list] [prev in thread] [next in thread] 

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