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

List:       koffice-devel
Subject:    koffice/lib/kotext
From:       Fredrik Edemar <f_edemar () linux ! se>
Date:       2005-07-05 21:56:48
Message-ID: 1120600608.314223.26325.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 432028 by fedemar:

Make the first line indent work again. Thanks to Boudewijn for discovering the bug I created :)
CCMAIL: boud@valdyas.org
CCMAIL: koffice-devel@kde.org


 M  +4 -3      kotextformatter.cc  
 M  +1 -1      kotextformatter.h  


--- trunk/koffice/lib/kotext/kotextformatter.cc #432027:432028
@@ -122,12 +122,13 @@
 }
 
 
-int KoTextFormatterCore::leftMargin( bool firstLine ) const
+int KoTextFormatterCore::leftMargin( bool firstLine, bool includeFirstLineMargin /* = true */ ) const
 {
     int left = /*doc ?*/ parag->leftMargin() + doc->leftMargin() /*: 0*/;
     if ( firstLine && !parag->string()->isRightToLeft() )
     {
-        left += parag->firstLineMargin();
+        if ( includeFirstLineMargin )
+            left += parag->firstLineMargin();
         // Add the width of the paragraph counter - first line of parag only.
         if( parag->counter() &&
             ( parag->counter()->alignment() == Qt::AlignLeft ||
@@ -155,7 +156,7 @@
         c = 0;
 
     KoTextStringChar *firstChar = 0;
-    int left = doc ? leftMargin(true) : 0;
+    int left = doc ? leftMargin( true, false ) : 0;
     int initialLMargin = leftMargin( true );
 
     y = doc && doc->addMargins() ? parag->topMargin() : 0;
--- trunk/koffice/lib/kotext/kotextformatter.h #432027:432028
@@ -87,7 +87,7 @@
     // Total left margin for a given line
     // Takes into account parag's leftmargin, firstlinemargin and counter,
     // but not adjustMargins (application hook)
-    int leftMargin( bool firstLine ) const;
+    int leftMargin( bool firstLine, bool includeFirstLineMargin = true ) const;
     int rightMargin( bool firstLine ) const;
 
 
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel

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

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