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

List:       kde-commits
Subject:    [calligra/textshape-stylesWidget-PierreSt] words/part: Add Standard and Doc Title style to the hard
From:       Pierre Stirnweiss <pstirnweiss () googlemail ! com>
Date:       2013-01-01 16:13:04
Message-ID: 20130101161304.EA3CCA60C8 () git ! kde ! org
[Download RAW message or body]

Git commit a75096362df61ebf523b1919f76cd5fefac26ebe by Pierre Stirnweiss.
Committed on 01/01/2013 at 17:08.
Pushed by pstirnweiss into branch 'textshape-stylesWidget-PierreSt'.

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/a75096362df61ebf523b1919f76cd5fefac26ebe

diff --git a/words/part/KWDocument.cpp b/words/part/KWDocument.cpp
index 3b4541a..a35c232 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);
@@ -796,7 +809,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