Issue 58348 - WW8: document has wrong page count due to wrong font size in TOC
Summary: WW8: document has wrong page count due to wrong font size in TOC
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: open-import (show other issues)
Version: OOo 2.0
Hardware: PC Windows NT
: P3 Trivial with 2 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2005-11-23 13:24 UTC by raindrops
Modified: 2017-05-20 11:15 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Document (36.50 KB, application/msword)
2006-03-23 14:48 UTC, michael.ruess
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description raindrops 2005-11-23 13:24:36 UTC
I imported a 289-page doc file into Writer and saved it as odt file. 

In theoriginal doc file I have used a derived style for links (removed underline
and changed the color to red). In the converted file, this style somehow shows a
font size of 48. As a result the page count jumps to 400 pages. 

When I edit the "Internet link" font style to size 12, the page count reduces to
about 310. So far so good. But after a few minutes, the page counts keeps
reducing. If I have saved the file and turned off the PC, the next time I see a
lower page count!

Finally the number settles to 290. But the instability in the page count lasts
over a day!

A word about the structure of this file: To control the contents of the file, I
have used a 2-column table (left column serves as left margin, right column
holds text.) 

If I see the table properties in the converted odt file, I see that Writer has
set the flow of table across pages, and also allowed the rows to break over
pages. (In the original doc file, I had manually made sure that no row crosses a
page border, to avoid crash of MS Wrod 2000 over Windows NT4.)

Incidentally, this file also shows a slow  blinking (rate: about 1 second)when I
see some image on screen in the Print view.
Comment 1 lars 2005-11-23 20:22:24 UTC
can you add the document in question and give a sbs description to reproduce 
the observed behaviour?
Comment 2 raindrops 2005-11-24 08:40:05 UTC
The document is 5.5 MB(2.5 MB when zipped). Can I attach it here?

Steps:

A. For changing page numbers:
1. Open the doc file and save it as odt. Norte down the page count (status line).
2. In "Styles and Formatting" dialog, select the Character styles.
3. Right-click on the "Internet Link" style in the list.
4. Select "Modify", and change the font size to 12.
5. Note the page count again.
6. Leave the file open, and keep noting the page counts.
7. Save the file and close Writer. After some time reopen the file and check the
page count.

First of all, I don't expect the default size of "Internet link" character style
to be larger than 12.

B. Blinking: 
Set a zoom that lets the image occupy 50-70% of the screen area. It blinks
systematically. (Note: Although another issue exists for this, I mentioned it
here for continuity's sake).
Comment 3 lars 2005-11-24 17:50:07 UTC
yes, you can attach the document here: select "Create new attachement": 
http://www.openoffice.org/issues/createattachment.cgi?id=58348
Comment 4 raindrops 2005-11-25 08:16:28 UTC
No the link has a specific condition that the attachment has to be less than 1
MB. Since my document is 2.5 MB when zipped, I'll have to delete approximately
65% of it to fit it in. But I am not sure whether the truncated file would have
these problems. (I'll try, though.)

Another option is to email it directly, but here too there is a problem: I have
already tried emailing the file to a superuser of the OOo forum; but my gmail
account does not let me send the file as attachment (it poroduces "document has
no data" error). 

A third option is to post it on a FTP server, if you can provide me  with a
temporary access with a username and password.

The fourth option is to send it through websites such as www.yousendit.com.

Please let me know which option is more convenient to you.
Comment 5 raindrops 2005-11-25 12:34:04 UTC
An accidental discovery I made:

I had opened the file, which has a lot of headings and tables-- The TOC runs
into 7 pages. I had not carried out any editing yet (not even a single
keystroke). The file was blinking as usual (see issue 52205). Then I observed
closely and found that the Navigator also flickers (but to a much smaller extent). 

Anyhow I kept the file open for more than an hour, and at the end of that period
the flickering stopped. At this time, I noticed that the page count has gone
down from 291 to 290. 

I had not done anything to the file, so I assume Writer does some optimization
on its own and then it repaginates the entire file. It might be doing this page
by page, and each change ripples down towards the end of the file, producing a
"blink". Probably Writer updates the entries in the Navigator, which is why
there is a flicker in Navigator window also. Once this optimization process is
over, the blinking stops.

One reason could be the presence of lot of tables, which have two properties
ENABLED:
1. Allow table to split across pages and columns
2. Allow row to break across pages and columns.

(Writer has automatically set these properties while converting the file from
doc to odt.)

Another factor could be that this PC is slow, with a limited RAM (PIII, 733 MHz
with 128 MB RAM). So when Writer does its optimization, the display cannot hide
the ripples. In a faster PC, the effect might be unnoticeable.

If my guess is right, this may happen in case of large documents which contain a
lot of tables (especially those spanning over multiple pages) and headings.
Comment 6 raindrops 2005-11-25 12:51:01 UTC
I tried to truncate the document to 35 pages to reduce its size. 
The odt file size has come down from 2.8 MB to 0.6 MB.
But the page number problem has vanished. The blinking problem (issue 52205)is
also reduced drastically (but NOT completely eliminated).

Probably that confirms my theory (see my earlier post, above)
Comment 7 lars 2005-11-25 17:20:46 UTC
use www.yousendit.com . e-mail address can be found by examining the link in 
the "Additional comments from" line.
Comment 8 lohmaier 2005-11-25 22:04:42 UTC
the limit of 1MB is wrong. You can attach files that are bigger than 1MB.
Comment 9 raindrops 2005-11-28 07:57:15 UTC
OK I will send the unabridged file to you through my gmail account, Lars.
Hopefully your spam filter won't bounce it! (Please let me know if I have to
insert certain keywords in the subject line of the email to make sure that it
does not get filtered out.)

Thanks!
Comment 10 lars 2005-11-28 12:39:29 UTC
no keywords needed; go ahead and send it!
Comment 11 lars 2005-12-01 16:59:07 UTC
received files from reporter: issue confirmed on Windows XP SP2 with OOo 2.0.1 
RC1
Comment 12 raindrops 2005-12-05 08:23:51 UTC
This problem affects the document-making ability of Writer severely:
1. The TOC and Index become outdated fast, and no longer point to the correct
page. I found that my TOC was offset by as many as 4 pages (but I had not made
any changes to the file whatsoever).

2. Conversion to pdf is severely affected, because the file's pages change even
as we are running the ExtendedPDF macro (for a large document, the macro takes
more than 2 hours to create a pdf file, which is sufficeint for Writer to do its
mischief). In my case, after spending more than two hours, finally ExtendedPDF
reported a lot of "missing" bookmarks.

The only way to create a pdf is to open the file, and then wait for a few hours
to let Writer change the page count. Only then can we run the ExtendedPDF,
hoping that the Writer won't change the pages further!

3. If you have sent a printed version (or even a pdf version) to your client,
your soft copy will no longer match that. 

For example, you cannot talk about "on page 56, we need to...", because in your
soft copy, now it is page 54!

In a commercial setup, clients would not tolerate such vagueness.

4. If you regularly back up your modified files, a synchronizer would ALWAYS
report your current copy as "modified", even if you have NOT made any changes.
As a result, you end up backing up all your large files multiple times! This
would bloat up your collection unnecessarily.

*********
While problems 1-3 can severly cripple commercial use of Writer,  problem-4 is
an irritant. Therefore, I propose to change the priority to P2.
Comment 13 michael.ruess 2005-12-14 09:45:31 UTC
Could someone please also forward the file to mru@openoffice.org? For fixing it,
our QA and Development will also need it... Thanks a lot!
Comment 14 raindrops 2005-12-14 12:14:45 UTC
Lars (isn't he in the QA team?) has had it for many days now. The original doc
and the converted odt are both available with him. Kindly take them from him.
Although I think it would be best to start all over again by taking the doc file
and repeating the entire process; because the page-reduction is steepest in the
early days (especially, first couple of hours). After that every time you open
the file you will see that the number goes UP and down by a couple of pages.

Please do NOT post/share the files publicly. 

Thanks.. 
Comment 15 raindrops 2005-12-14 12:34:23 UTC
Oh I almost forgot to mentiuon an additional observation:

Immediately after opening the odt file, check out the "tables" and "headings"
lists in the Navigator: You will find a lot of the entries are in gray (the gray
entries are ALWAYS towards the top of each list).

While the file blinks and changes page-count, you can clearly see that the
navigator display is getting updated: The color of the entries starts changing
to black. (What happens behind the scene? And why does it happen even if the
file is not edited?)

Finally only two entries (both for tables) remain grayed out. I tried clicking
on them, but the Navigator could not show them-- They are phantom tables! 

Another observation: Keep a list open in the Navigator and watch-- It seems that
the list is gradually built right in front of your eyes; because after some
time, the Navigator's bottom gets a scroll bar, which means that the list- which
is heirarchical-- has now additional entries at lower levels; and the Navigator
needs extra horizontral space to display them.

(I am just guessing this part, because only lower-level entries would need more
space to the right to display; and only then would the Navigator show a
horizontal scroll bar at its bottom)
Comment 16 michael.ruess 2005-12-14 15:51:16 UTC
Lars, 
please send the dcuments to mru@openoffice.org. Otherwise we will not be able to
work on this issue and we have to close it.
Thanks for your patience.
Comment 17 michael.ruess 2005-12-15 09:59:43 UTC
I have now checked out the doc and I found out the following:
1) this file seems to be corrupted; Word 2003 is not able to open it at all.
This may cause the problem regarding the large Font of the style "Internet Link".

2) When changing the size of the style back to e.g. 12 pt, the document needs a
full reformatting. This is done as a background process (idle formatting), so
that it needs its time to be finished and the page count will be adapted from
time to time. When you do this manually via Tools.Update.Page Formatting this
will be started as a main process. The page count will be correct when it has
finished.

3) The greyed-out Navigator items appear when a document is still in "idle
formatting" right after opening. When doing the "page formatting" manually (via
"Tools.Update" menu) they reappear as non-hidden after this process has finished.
But when waiting for the "idle formatting" the navigator content will not be
updated correctly, which will be handled as bug here.
Comment 18 michael.ruess 2005-12-15 10:08:05 UTC
MRU->OS: When opening the mentioned .odt version of this document, many of the
Navigator contents like tables and frames are marked as "hidden". Even when the
idle formatting is finished the Navigator is not updated. It only works
correctly when the formatting is started via Tools.Update.

IMPORTANT: The document is confidential, thus I will forward it to you via Mail.
Please delete the document after working on this issue.
Comment 19 Oliver Specht 2005-12-15 10:38:55 UTC
The Navigator works correctly, but there's no update as long as the Navigator
has the focus. This is necessary to prevent flickering/deselection of entries
currently worked on. 

Comment 20 raindrops 2005-12-16 07:56:20 UTC
Raindrops -> MRU:

If the copy you got is corrupted, then the rest of your observations may not be
applicable! My copy of the doc file is not corrupted, and I am able to open it
normally in Word. Please let me send you a fresh copy. I can do that if you can
provide a (temporary) FTP access (username+password); or through Lars.

Coming to your observations. 
1. Since the doc file is NOT corrupted, the reason for getting large-sized
internet link fonts must be something else.

2. Your explanation leaves several aspects unexplained:

All the changes were made long ago, and the file was saved. Let us suppose that
the background process is not over when I exit. In that case, Writer should take
its own time to close the running process and only then close the file. Can an
application just abandon a process just because it is running in background? 

Secondly, let us assume that this process gets launched as soon as I open the
file and then onwards constantly changes the actual layout of the pages (page by
page). In that case, as soon as I open the file, Writer should mark it as
"changed", and when I close the document, Writer must warn me "Do you want to
save the changes?" But that does not happen! 

Thirdly, if this process has adjusted some pages in each round (and saves it),
that should leave less work to do in the next round. In other words, the
document should take less and less time to settle down. This too does not
happen: In each round, it takes the same time, and keeps blinking and
re-paginating. 

Lastly, why should I have to initiate a page formatting manually? Writer should
be able to handle this without my manual intervention.
Comment 21 raindrops 2005-12-16 08:25:13 UTC
I am getting REALLY frustrated: I report an issue, devote a lot of time in
reporting it carefully; field all the questions and provide the proof.

Then someone changes the summary to twist the meaning to something altogether
different, and then someone else closes it as "Works for me" and "resolved"!

If the reporter is not vigilant, a lot of such issues will get brushed aside. Am
I supposed to guard each problem I report??

What happens to the original issue I reported? Is Writer supposed to work as I
have reported? 

The "WorksForMe" seems to be applied to the diagnosis#1; not to the symptoms. 
If the diagnosis is wrong, the issue should have been redirected at best. Why
change the resolution to "works for me"? It MAY work for some, but it does not
mean that this is not a problem. Why not give credence to the fact that Lars
confirmed the problem?

And why change the summary to reflect the diagnosis? It must reflect the symptoms!
Comment 22 Oliver Specht 2005-12-16 08:44:48 UTC
->mru: Please split this issue into the relevant pieces.
Comment 23 raindrops 2006-02-01 12:13:43 UTC
MRU, this issue is yet to be concluded (and split as necessary, as recommended
by OS).

The private file I provided has this "page number changes" problem. 
(In fact, the last file I provided to Lars time had the same problem, and on a
much larger scale.)

Having invested so much time and effort, I would like to see this issue progress
at a satisfactory pace. I have provided the evidence TWICE, but there seems to
be no further activity in tracing the problem.

Too much time wasted, IMHO. 

After opening, watch the page count.

Thanks!
Comment 24 michael.ruess 2006-03-23 10:09:53 UTC
Same problem as issue 60447.

*** This issue has been marked as a duplicate of 60447 ***
Comment 25 michael.ruess 2006-03-23 10:11:44 UTC
Closing duplicate.
Comment 26 michael.ruess 2006-03-23 10:15:39 UTC
Reopened issue, I wanted add the "duplicate comment in a completely different
issue. Sorry for this!
Comment 27 michael.ruess 2006-03-23 14:02:18 UTC
MRU->FLR: see the attached document. It is derived from the confidential
document. This is shrinked to three pages and all sensitive content has been
removed.
There you can see that the Character Style "Internet link" has a font height of
42 pt. But the font in the TOC shows 12 pt in MS Word though the character style
"Hyperlink" with 42 pt is used.
This makes the TOC blow up to more than 100 pages in the original large document.
This is quite similar to issue 58981 and issue 29139.
Comment 28 michael.ruess 2006-03-23 14:48:35 UTC
Created attachment 35177 [details]
Document
Comment 29 raindrops 2006-03-24 16:06:11 UTC
I think  Issue 29139 is different in nature...

Yes, issue 58981 also describes one part of the problem (but that issue was
reported later).
  
BTW this issue describes another pronblem:How the page-count changes. The
threads describe several aspects of THAT issue (Including WHY some possibilities
are ruled out as root cause).

If  issue 58981 is to be handled independently, we should put a dependendency
link in both these issues, and then concentrate on the larger issue described here: 

Why does the page count change?

To sum up the past discussion (so that we can carry it forward):
1. It can't be due to a background process: Even when OOo changes the page
count, it does not treat the document as changed (When we try to close the
document, OOo does not tell us that the document is changed, and should it save
the document?)

2. If we repeat the entire experiment a few times, the initial page count is the
same in each experiment. In other words, the page-adjustment process begins in
each sessiona afresh: It has no sense of history.

3. At this time, the entire document flickers, and so does the Navigator.
Further, some entries in the Navigator are grayed in the beginning, and as the
page count reduces, these entries turn black. (What is the meaning of a
gray-colored entry in the Navigator? And when this entry turns black, what is
the corresponding change happening in the actual document? Probably THIS is a clue.)

4. Some tables and images keep jumping forwards and backwards in a never-ending
oscillatory motion. (Probably this is another clue why the process never settles
down: It is not a "convergent" process.) In a electronic circuit, I would
describe this as an unstable system that oscillates. To stop the oscillation, we
have to change some timing, or break a loop. Probably there is some equivalent here?

Comment 30 raindrops 2006-03-25 09:37:00 UTC
The problem is ALSO present in the User Guide for OOo, which is under
preparation (see issue 29679). 

Each time the document opens with a page count of 457, which increases to 463 in
4-5 minutes. The Navigator and main document flicker (but compared to my
document, the flicker is negligible.)

Here is comparison between the two documents:
____________________________________
Attribute---- OOO   ----  My 
              Guide     document
____________________________________

Size (MB)--- 5.52 ------ 2.89
Pages-------- 463 ------ 326
Headings----- 751 ------ 262
Tables ------  75 ------ 249
Graphics----- 366 ------  763
Bookmarks ---   0 ------  373
Frames-------  45 ------    0
Hyperlinks--- 783 ------ 1167
Sections-----   1 ------    2
references---   7 ------    0
Indexes -----   2 ------    2
Notes -------   3 ------    0
Draw obj.----   0 ------    0
______________________________________

To sum up, the major difference seems to be in the following:
* The density of tables in My doc is 5 times that of OOo doc. Besides, many of
my tables are long tables spanning over multiple pages; and several others are
nested tables.
* My doc starts with a large graphic
* My doc contains 373 bookmarks (against OOo guide's 0)
* The density of hyperlinks per page is DOUBLE in my doc. On top of that, when I
use ExtendedPDF on my doc, it gives a HUGE list of orphaned links. (But I
checked some of the links, and they seemed perfectly OK.)
* The density of graphics per page in my doc is almost 3 times. Almost all of
these graphics are inside tables. Some are in merged cells of a row.
* My doc contains 2 sections, against OO guide's 1.

BTW I have modified my document to remove all frames. I have also added many
pages compared to the last version. But the new version almost always hangs
after a few minutes. It shows white screen, and does not recover at all. 

I feel that all these problems are somehow related...
Comment 31 Mathias_Bauer 2006-07-04 14:21:18 UTC
target 2.x
Comment 32 Mathias_Bauer 2006-08-30 14:55:48 UTC
assigned to hbrinkm
Comment 33 Mathias_Bauer 2007-12-03 17:05:34 UTC
according to release status meeting: target 3.x
Comment 34 Mathias_Bauer 2007-12-03 17:09:55 UTC
.
Comment 35 Marcus 2017-05-20 11:15:25 UTC
Reset assigne to the default "issues@openoffice.apache.org".