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

List:       kde-commits
Subject:    koffice/kword/part
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2007-03-25 3:29:53
Message-ID: 1174793393.360717.22465.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 646246 by sebsauer:

styles for headings

 M  +11 -0     KWOpenDocumentLoader.cpp  


--- trunk/koffice/kword/part/KWOpenDocumentLoader.cpp #646245:646246
@@ -720,6 +720,10 @@
         context.addStyles( paragraphStyle, "paragraph" );
 
         KoParagraphStyle *style = d->document->styleManager()->paragraphStyle(styleName);
+        if( ! style ) {
+            style = d->document->styleManager()->defaultParagraphStyle();
+            kDebug(32001) << "KWOpenDocumentLoader::loadSpan using default style!" << endl;
+        }
         if ( style ) {
             style->loadOasis( context.styleStack() );
             QTextBlock block = cursor.block();
@@ -790,6 +794,13 @@
         context.addStyles( paragraphStyle, "paragraph" );
         context.styleStack().restore();
         //loadPageLayout( masterPageName, context ); // page layout
+
+        KoParagraphStyle *style = d->document->styleManager()->paragraphStyle(styleName);
+        if ( style ) {
+            style->loadOasis( context.styleStack() );
+            QTextBlock block = cursor.block();
+            style->applyStyle(block);
+        }
     }
 #endif
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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