Bug 33155 - Wrong pages names in "Page Break Preview"
Summary: Wrong pages names in "Page Break Preview"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 RC3
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: target:3.3.1
Keywords:
: 33488 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-01-15 08:03 UTC by vitriol
Modified: 2011-01-25 10:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test document (10.81 KB, application/force-download)
2011-01-15 08:03 UTC, vitriol
Details
Screenshot (17.66 KB, image/png)
2011-01-15 08:28 UTC, vitriol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description vitriol 2011-01-15 08:03:43 UTC
Created attachment 42078 [details]
Test document

Steps to reproduce:

1) Open the attached TestDoc.ods
2) Select View > "Page Break Preview"
3) Look at the pages names dragging down the side slider. The name "Page 1" is repeated twice.
4) If you reach the end of the document and then dragging up, now "Page 2" is repeated twice...

Thanks
Comment 1 vitriol 2011-01-15 08:28:24 UTC
Created attachment 42079 [details]
Screenshot

Screenshot attached
Comment 2 vitriol 2011-01-19 13:25:25 UTC
No feedback for this issue? This strange behavior is LibO specific for me. OOo 3.3 RC9 works fine.
Comment 3 Andras Timar 2011-01-20 01:22:46 UTC
I confirm the issue. It only happens when you scroll down with the slider. Page Up/Page Down keys work as expected.

I changed this part of code a few months ago, but I don't understand why it causes a regression. Kohei, could you please have a look at it?
http://cgit.freedesktop.org/libreoffice/calc/commit/?h=libreoffice-3-3&id=9fe87047580c7a2893ac290fb90edb67b76b3a90
Comment 4 Kohei Yoshida 2011-01-20 20:39:07 UTC
Well, basically, the page number string is 'Page %1' only during the first iteration.  In the second iteration it becomes 'Page 1', so the replacement of %1 with the real page number never takes place, and the page string gets stuck with 'Page 1'.

This bug happens only when the window is large enough to show several "Page X" strings.  Otherwise the loop always ends after the first iteration, hence the bug never hits.
Comment 5 Kohei Yoshida 2011-01-20 20:53:59 UTC
I've just fixed this on master.

http://cgit.freedesktop.org/libreoffice/calc/commit/?id=b6734b453ec636aff3cb14535da24865c9d66d9a

I'll ask for a sign-off so that we can cherry-pick this to 3.3.x.  But I'm not sure if we can put this into 3.3.0 final given this doesn't meet our blocker criteria.
Comment 6 Kohei Yoshida 2011-01-20 21:01:59 UTC
I'll mark this fixed.  I've already requested for review for the inclusion into 3.3.1.  I doubt that this fix will make it into 3.3.0 in this late RC cycle.
Comment 7 Kohei Yoshida 2011-01-20 21:20:12 UTC
Setting target to 3.4 which is what master is for currently.
Comment 8 Kohei Yoshida 2011-01-21 06:21:25 UTC
Cherry-picked to the 3.3.1 branch.
Comment 9 Kohei Yoshida 2011-01-25 10:43:17 UTC
*** Bug 33488 has been marked as a duplicate of this bug. ***