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

List:       kde-commits
Subject:    koffice/libs/kotext/opendocument
From:       Thomas Zander <zander () kde ! org>
Date:       2010-12-29 14:25:24
Message-ID: 20101229142524.4BF463E1F3 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1210093 by zander:

Set the default parag style on the first parag

 M  +4 -6      KoTextLoader.cpp  


--- trunk/koffice/libs/kotext/opendocument/KoTextLoader.cpp #1210092:1210093
@@ -284,12 +284,6 @@
 //    Q_ASSERT(d->changeTracker);
 
     kDebug(32500) << "text-style:" << \
                KoTextDebug::textAttributes(cursor.blockCharFormat());
-#if 0
-    if ((document->isEmpty()) && (d->styleManager)) {
-        QTextBlock block = cursor.block();
-        d->styleManager->defaultParagraphStyle()->applyStyle(block);
-    }
-#endif
     bool usedParagraph = false; // set to true if we found a tag that used the \
                paragraph, indicating that the next round needs to start a new one.
     if (bodyElem.namespaceURI() == KoXmlNS::table && bodyElem.localName() == \
"table") {  loadTable(bodyElem, cursor);
@@ -379,6 +373,10 @@
         }
         endBody();
     }
+    if (document->isEmpty() && d->styleManager) {
+        QTextBlock block = document->begin();
+        d->styleManager->defaultParagraphStyle()->applyStyle(block);
+    }
     cursor.endEditBlock();
 }
 


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

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