From koffice-devel Tue Jul 05 21:56:48 2005 From: Fredrik Edemar Date: Tue, 05 Jul 2005 21:56:48 +0000 To: koffice-devel Subject: koffice/lib/kotext Message-Id: <1120600608.314223.26325.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=koffice-devel&m=112060359304122 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