Bug 48348 - VIEWING FILEOPEN spreadsheet saved from page preview opens to grey background
Summary: VIEWING FILEOPEN spreadsheet saved from page preview opens to grey background
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 Beta1
Hardware: Other All
: low minor
Assignee: Kohei Yoshida
URL:
Whiteboard: bibisected35 target:3.6.0
Keywords: regression
: 49829 50253 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-05 11:12 UTC by Terrence Enger
Modified: 2012-06-07 11:15 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
page preview window showing only gray background (46.35 KB, image/png)
2012-04-05 11:12 UTC, Terrence Enger
Details
typescript of terminal session (1.77 KB, text/plain)
2012-04-05 11:14 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Terrence Enger 2012-04-05 11:12:32 UTC
Created attachment 59529 [details]
page preview window showing only gray background

I am running on ubuntu-natty (11.4) with desktop "Ubuntu Classic (no
effects)".  My LibreOffice is master, commit id 1199713, pulled
2012-04-01, and built with configuration parameters ...

    --disable-mozilla
    --enable-symbols
    --enable-dbgutil
    --enable-crashdump
    --disable-build-mozilla
    --without-system-postgresql
    --enable-python=internal


To see the problem ...

(1) Run soffice.bin.  Program displays Writer document "Untitled 1".

(2) Take menu option File > New > Spreadsheet.  Program displays Calc
    document "Untitled 2" with cell A1 selected as the current cell.

(3) In cell A1 of "Untitled 2", type "blah blah<Enter>".  Program
    displays "blah blah" in A1 and selects cell A2 as the current
    cell.

(4) In the toobar, click the icon "Page Preview".  Program displays
    the Page Preview.  Note that the contents of cell A1 are visible.

(5) Take menu option File > "Save As ...".  The program displays the
    Save dialog.

(6) Finish saving the file as /tmp/c.odt.  The program displays the
    Page Preview window "c.ods : 2".  Note that the contents of cell
    A1 are visible.

(7) Take menu option File > Close.  The program closes window
    "Untitled 2" and displays "Untitled 1".

(8) Take menu option File > "Recent Documents ..." > /tmp/c.ods.

    Actual result: The program opens window c.ods in Page Preview
    mode, and the document area shows only a gray background.
    Screenshot attached.

    Preferred result: The program opens window c.ods in editing mode,
    and document contents are visible.

    Acceptable result: The program opens window c.ods in Page Preview
    mode, and the contents of cell A1 are visible.


Comparable user actions in Writer show no obvious problem.


Bug 42076 "Removing print ranges results in gray background" is
similar to my current report in that the reporter complains about a
gray background and a commenter suggests that Page Preview is
implicated.  The user actions leading to that report are, however,
quite different.


Attachment coming soon:  typescript of terminal session during
execution of those steps.
Comment 1 Terrence Enger 2012-04-05 11:14:19 UTC
Created attachment 59530 [details]
typescript of terminal session
Comment 2 Rainer Bielefeld Retired 2012-04-24 22:27:59 UTC
[Reproducible] with "LibreOffice 3.5.3.1 (RC1) German UI/Locale [Build-ID: 21cb047-d7e6025-9ba54fc-b4a51a8-f42372b] on German WIN7 Home Premium (64bit),

Already saw that with LibO 3.5.0Beta1

Was ok with 
Server installation of  Master "LibO-dev 3.5.0 – WIN7 Home Premium (64bit) GERMAN UI [Build ID: 130028f-b211287-090bcba-45cf606-05891e7]" Win-x86@9-Voreppe - 2011-11-30)

LibO 3.4.5

@Reporter:
With what Master version did you observe the problem?
Comment 3 Korrawit Pruegsanusak 2012-05-05 08:34:15 UTC
[NOT REPRODUCE] in 3.4.4 Windows XP, it shows page preview (equals "Acceptable result")

Anyway, here comes the bibisect log:
git bisect start
# good: [65fd30f5cb4cdd37995a33420ed8273c0a29bf00] source-hash-d6cde02dbce8c28c6af836e2dc1120f8a6ef9932
git bisect good 65fd30f5cb4cdd37995a33420ed8273c0a29bf00
# bad: [4c30602f43475389f81b1d981ce8ee9a3410b9d9] source-hash-85c6244b85b29c1d2bb9d89b62e9512dd65378b5
git bisect bad 4c30602f43475389f81b1d981ce8ee9a3410b9d9
# good: [2faf4bc12ab490370d2196dedbc8091f9b09d0a5] source-hash-418a35f4861e863feb39eec73f4a39a87fbcb1f3
git bisect good 2faf4bc12ab490370d2196dedbc8091f9b09d0a5
# good: [2faf4bc12ab490370d2196dedbc8091f9b09d0a5] source-hash-418a35f4861e863feb39eec73f4a39a87fbcb1f3
git bisect good 2faf4bc12ab490370d2196dedbc8091f9b09d0a5
# good: [b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4] source-hash-ce60138d339a5eb2a174a5d27063249acf2cac42
git bisect good b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4
# good: [b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4] source-hash-ce60138d339a5eb2a174a5d27063249acf2cac42
git bisect good b6fca7e58854bc617c5fc9a75d1c1720b0d7e1a4
# good: [216e447cb0a457985f20d4db481fa9c73b0bb775] source-hash-55c5ea43a59e505297fb6fa20b77aaa28f7c67bc
git bisect good 216e447cb0a457985f20d4db481fa9c73b0bb775
# bad: [569ab0259fc5fcc3190d9ae9c44e1e28570bc8bd] source-hash-817bf1d41bb07aeb3ed7649d25c2b44ee4acb1fe
git bisect bad 569ab0259fc5fcc3190d9ae9c44e1e28570bc8bd
# bad: [ed3f955f538bad00cdac118df31daaacf098f9e1] source-hash-2c4537471c932b65e6f72e41881b505c4bbad12c
git bisect bad ed3f955f538bad00cdac118df31daaacf098f9e1
# good: [db3589a1e013d6095c1ce486b705dd9ee685b308] source-hash-ceb55cd688cebede8cef8408540019fe54528869
git bisect good db3589a1e013d6095c1ce486b705dd9ee685b308

So, the commit range to look is http://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=ceb55cd688cebede8cef8408540019fe54528869..2c4537471c932b65e6f72e41881b505c4bbad12c
Comment 4 Korrawit Pruegsanusak 2012-05-13 00:08:46 UTC
*** Bug 49829 has been marked as a duplicate of this bug. ***
Comment 5 Rainer Bielefeld Retired 2012-05-22 21:27:42 UTC
*** Bug 50253 has been marked as a duplicate of this bug. ***
Comment 6 Korrawit Pruegsanusak 2012-05-30 04:28:40 UTC
@kohei, unfortunately your commits that fix bug 32826 regarding calc print preview are in the range. Could you please have a look here? Thanks!
Comment 7 Kohei Yoshida 2012-06-01 05:23:14 UTC
The right solution is to disallow file save from the preview window.  I'll look into it.
Comment 8 Kohei Yoshida 2012-06-01 05:25:11 UTC
This is technically a not regression though, since even if the previous implementation may have given you the illusion of this "working", it was a result of several levels of ugly hacks in various places to make something do stuff that it was never designed to or capable of.
Comment 9 Kohei Yoshida 2012-06-05 23:14:04 UTC
I'm done with this.  Now you can't save the document directly from the page preview mode in Calc.

It won't help those documents created prior to this, but when you open such document, just exit the page preview mode and go back into the preview mode again should display the content.
Comment 10 Terrence Enger 2012-06-07 11:15:54 UTC
I mention this loophole just to maintain my reputation as a
nit-picking nerd, not to suggest that the problem deserves further
effort ...

If an open document has the changed flag set, then the Print Preview
page of the spreadsheet offers File > "Save All".  If the spreadsheet
has its changed flag set, then that menu option saves the spreadsheet
so that it displays the grey background next time.