[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Review Request: Small KWord fix for continuous pages adding
From: "Miroslav Nohaj" <miroslav.nohaj () ixonos ! com>
Date: 2010-07-22 12:01:15
Message-ID: 20100722120115.15512.93416 () localhost
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4174/
-----------------------------------------------------------
(Updated 2010-07-22 12:01:14.836792)
Review request for KOffice.
Changes
-------
The block of code which causes 'continuous pages adding' problem was added =
with this message: 'Header doesn't resize until you press enter once.' As t=
his block of code fixes only problematic headers and creates some issues wh=
en used in the document body, added a check if we're tying to lay out the h=
eader/footer (KWord::isHeaderFooter(...)). This way the fix for header/foot=
er remains active and doesn't cause the 'continuous pages adding' problem. =
Tested with problematic header (to see if it still works for headers) and a=
lso with the problematic very large shape in document (to see if it doesn't=
cause 'continuous pages adding' problem).
Summary
-------
When the .odt document contains only one paragraph which contains something=
(i.e. image) that is bigger than one page, the layout tries to add one pag=
e to make it fit, but as that larger thing won't be put on the first page, =
the situation repeats and it tries to add another page, and so on...
The patch checks if the next shapes (together) have enough space to hold th=
e current large thing and if they do, it will not try to add more pages. I =
know that this might not the best solution so I'm awaiting some recommendat=
ions from Thomas on what would be a better way to do it and as this patch w=
ill be probably remade, it doesn't contain comments in the code. =
Diffs (updated)
-----
/trunk/koffice/kword/part/frames/KWTextDocumentLayout.cpp 1134229 =
Diff: http://reviewboard.kde.org/r/4174/diff
Testing
-------
Thanks,
Miroslav
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://reviewboard.kde.org/r/4174/">http://reviewboard.kde.org/r/4174/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://reviewboard.kde.orgrb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for KOffice.</div>
<div>By Miroslav Nohaj.</div>
<p style="color: grey;"><i>Updated 2010-07-22 12:01:14.836792</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0;">The block of code which causes 'continuous \
pages adding' problem was added with this message: 'Header doesn't resize \
until you press enter once.' As this block of code fixes only problematic headers \
and creates some issues when used in the document body, added a check if we're \
tying to lay out the header/footer (KWord::isHeaderFooter(...)). This way the fix for \
header/footer remains active and doesn't cause the 'continuous pages \
adding' problem.
Tested with problematic header (to see if it still works for headers) and also with \
the problematic very large shape in document (to see if it doesn't cause \
'continuous pages adding' problem).</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0;">When the .odt document contains only one \
paragraph which contains something (i.e. image) that is bigger than one page, the \
layout tries to add one page to make it fit, but as that larger thing won't be \
put on the first page, the situation repeats and it tries to add another page, and so \
on...
The patch checks if the next shapes (together) have enough space to hold the current \
large thing and if they do, it will not try to add more pages. I know that this might \
not the best solution so I'm awaiting some recommendations from Thomas on what \
would be a better way to do it and as this patch will be probably remade, it \
doesn't contain comments in the code. </pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
(updated)</h1> <ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/koffice/kword/part/frames/KWTextDocumentLayout.cpp <span style="color: \
grey">(1134229)</span></li>
</ul>
<p><a href="http://reviewboard.kde.org/r/4174/diff/" style="margin-left: 3em;">View \
Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
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