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

List:       koffice-devel
Subject:    koffice/kword
From:       Raphael Langerhorst <raphael-langerhorst () gmx ! at>
Date:       2005-02-04 16:15:18
Message-ID: 20050204161518.3BF611BB13 () office ! kde ! org
[Download RAW message or body]

CVS commit by raphael: 

Fix "page numbers on next line" phenomena for the table of contents...

The problem is that right aligned tab stops still put a new line character
on the right side of the alignment, thus line breaks can happen even though
the tab stop is just before the right border. The real problem lies probably
in KoText, BUT I decided not to change anything in there because it would
break the look of current documents (assumed). The fix itself is just
an additional 2 mm safety distance from the right border.
This workaround should be removed
with KOffice 2.0 if above described behaviour is fixed with the new text
widget/framework.

it might be possible that this line break does not happen for everyone,
I assume it depends on the page width as the table of contents creation
uses a "floor(...)" function to calculate the tab position.

Sorry for the long commit log, but I wanted to have it all documented.

CCMAIL: koffice-devel@kde.org


  M +5 -1      contents.cc   1.57


--- koffice/kword/contents.cc  #1.56:1.57
@@ -240,5 +240,9 @@ KWStyle * KWInsertTOCCommand::findOrCrea
             KoTabulatorList tabList;
             KoTabulator tab;
-            tab.ptPos = KoUnit::fromUserValue( floor( KoUnit::toMM( fs->frame( 0 \
)->width() )  ), KoUnit::unit("mm") ); +            
+            //added 2 mm safety from border, otherwise the page number goes on the \
next line (assuming bug is in KoText) +            //### REMOVE SAFETY DISTANCE FOR \
KOFFICE 2.0 (assuming KoText gets replaced) - raphael +            tab.ptPos = \
KoUnit::fromUserValue( floor( KoUnit::toMM( fs->frame( 0 )->width() ) - 2 ), \
KoUnit::unit("mm") ); +            
             tab.type = T_RIGHT;
             tab.filling = TF_DOTS;


_______________________________________________
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