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

List:       kde-commits
Subject:    koffice/libs/kotext/opendocument
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2010-10-06 6:14:07
Message-ID: 20101006061407.E0012AC7E4 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1182949 by zachmann:

o Make it possible to use paragraph style saving logic also outside of KoTextWriter

For kpresenter placeholder saving the method to save paragraph styles is needed.


 M  +6 -1      KoTextWriter.cpp  
 M  +12 -0     KoTextWriter.h  


--- trunk/koffice/libs/kotext/opendocument/KoTextWriter.cpp #1182948:1182949
@@ -245,7 +245,7 @@
     delete d;
 }
 
-QString KoTextWriter::Private::saveParagraphStyle(const QTextBlock &block)
+QString KoTextWriter::saveParagraphStyle(const QTextBlock &block, KoStyleManager \
*styleManager, KoShapeSavingContext &context)  {
     KoParagraphStyle *defaultParagraphStyle = styleManager->defaultParagraphStyle();
 
@@ -282,6 +282,11 @@
     return generatedName;
 }
 
+QString KoTextWriter::Private::saveParagraphStyle(const QTextBlock &block)
+{
+    return KoTextWriter::saveParagraphStyle(block, styleManager, context);
+}
+
 QString KoTextWriter::Private::saveCharacterStyle(const QTextCharFormat &charFormat, \
const QTextCharFormat &blockCharFormat)  {
     KoCharacterStyle *defaultCharStyle = \
                styleManager->defaultParagraphStyle()->characterStyle();
--- trunk/koffice/libs/kotext/opendocument/KoTextWriter.h #1182948:1182949
@@ -53,6 +53,18 @@
     ~KoTextWriter();
 
     /**
+     * Save a paragraph style used in a text block
+     *
+     * This checks if the style is a document style or a automatic style
+     * and saves it accordingly.
+     *
+     * @param block The block form which the style information are taken
+     * @param styleManager The used style manager
+     * @param context The saving context
+     */
+    static QString saveParagraphStyle(const QTextBlock &block, KoStyleManager \
*styleManager, KoShapeSavingContext &context); +
+    /**
      * Writes the portion of document contained within 'from' and 'to'
      */
     void write(QTextDocument *document, int from, int to = -1);


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

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