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

List:       kde-commits
Subject:    [calligra] words/part: Add Standard and Doc Title style to the hard coded styles for Cstom Doc
From:       Pierre Stirnweiss <pstirnweiss () googlemail ! com>
Date:       2013-01-01 16:11:19
Message-ID: 20130101161119.1FB54A60C6 () git ! kde ! org
[Download RAW message or body]

Git commit 4af4b0d83069fdb50e4c5aee4e69e215ceb08e81 by Pierre Stirnweiss.
Committed on 01/01/2013 at 17:08.
Pushed by pstirnweiss into branch 'master'.

Add Standard and Doc Title style to the hard coded styles for Cstom Doc

M  +14   -1    words/part/KWDocument.cpp

http://commits.kde.org/calligra/4af4b0d83069fdb50e4c5aee4e69e215ceb08e81

diff --git a/words/part/KWDocument.cpp b/words/part/KWDocument.cpp
index 2ee8448..67f808d 100644
--- a/words/part/KWDocument.cpp
+++ b/words/part/KWDocument.cpp
@@ -535,6 +535,19 @@ void KWDocument::initEmpty()
     KoStyleManager *styleManager = \
resourceManager()->resource(KoText::StyleManager).value<KoStyleManager*>();  \
Q_ASSERT(styleManager);  KoParagraphStyle *parag = new KoParagraphStyle();
+    parag->setName(i18n("Standard"));
+    parag->setFontPointSize(12);
+    parag->setFontWeight(QFont::Normal);
+    styleManager->add(parag);
+
+    parag = new KoParagraphStyle();
+    parag->setName(i18n("Document Title"));
+    parag->setFontPointSize(24);
+    parag->setFontWeight(QFont::Bold);
+    parag->setAlignment(Qt::AlignCenter);
+    styleManager->add(parag);
+
+    parag = new KoParagraphStyle();
     parag->setName(i18n("Head 1"));
     parag->setFontPointSize(20);
     parag->setFontWeight(QFont::Bold);
@@ -797,7 +810,7 @@ KoTextAnchor* KWDocument::anchorOfShape(KoShape *shape) const
     Q_ASSERT(mainFrameSet());
     Q_ASSERT(shape);
 
-    // try and find out if shape is already anchored    
+    // try and find out if shape is already anchored
     foreach (KoInlineObject *inlineObject, \
                inlineTextObjectManager()->inlineTextObjects()) {
         KoTextAnchor *anchor = dynamic_cast<KoTextAnchor *>(inlineObject);
         if (anchor && anchor->shape() == shape) {


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

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