[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KOFFICE_1_3_BRANCH: koffice/lib/kotext
From: David Faure <faure () kde ! org>
Date: 2005-03-09 12:38:23
Message-ID: 20050309123823.CB10E10B25 () office ! kde ! org
[Download RAW message or body]
CVS commit by faure:
Backport fix for broken right-alignment, for people using the branch.
M +8 -4 kotextformatter.cc 1.81.2.12
--- koffice/lib/kotext/kotextformatter.cc #1.81.2.11:1.81.2.12
@@ -112,5 +112,5 @@ QPair<int, int> KoTextFormatterCore::det
ww = availableWidth - x;
else
- ww = nx - x + 1;
+ ww = nx - x;
#ifndef REF_IS_LU
pixelww = zh->layoutUnitToPixelX( ww );
@@ -341,4 +341,7 @@ bool KoTextFormatterCore::format()
lastBreak == -2 ) // ... used to be a special case...
+ // No point in breaking just for the trailing space (testcase: page \
numbers in TOC) + && ( i < len-1 )
+
// Ensure that there is at least one char per line, otherwise, on
// a very narrow document and huge chars, we could loop forever.
@@ -480,5 +483,5 @@ bool KoTextFormatterCore::format()
ww = availableWidth - x;
else
- ww = nx - x + 1;
+ ww = nx - x;
}
if ( x != left || availableWidth != dw )
@@ -828,14 +831,15 @@ KoTextParagLineStart *KoTextFormatterCor
if( string->isBidi() )
return koBidiReorderLine( zh, parag, string, line, startChar, lastChar, \
align, space );
- space = QMAX( space, 0 ); // #### with nested tables this gets negative because \
of a bug I didn't find yet, so workaround for now. This also means non-left aligned \
nested tables do not work at the moment int start = (startChar - &string->at(0));
int last = (lastChar - &string->at(0) );
#ifdef INDIC
+#if 0 // strange Qt code, breaks right-alignment
KoTextStringChar *ch = lastChar;
while ( ch > startChar && ch->whiteSpace ) {
- space += ch->format()->width( ' ' );
+ space += ch->format()->width( ' ' ); // wrong unit, in any case
--ch;
}
+#endif
if (space < 0)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic