Bug 115218 - Grey Calc window when opening the address list spreadsheet after a mail merge
Summary: Grey Calc window when opening the address list spreadsheet after a mail merge
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: high normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.1.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-01-25 06:27 UTC by Aron Budea
Modified: 2018-02-07 17:15 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (55.69 KB, image/png)
2018-01-25 06:27 UTC, Aron Budea
Details
Reproducer script. (1.41 KB, text/x-python)
2018-02-06 11:07 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-01-25 06:27:38 UTC
Created attachment 139352 [details]
Screenshot

Follow the steps of bug 115103 (repeated below):

- Open the attached DOC or DOCX (eg. attachment 139208 [details]), and run Tools -> Mail Merge Wizard...
- Skip to step 3, and add the attached XLS (attachment 139209 [details]) as address list.
- Do not specify an address block or salutation, just finish the merge.

Extra step:
- Now open the XLS at the same time.

=> The Calc window appears grey (see screenshot).
Calc window appears fine after closing and reopening the spreadsheet. Apparently the spreadsheet opens in read-only mode the first time, not sure if that's relevant, read-only files look just fine when opened otherwise.

Observed using LO 6.1 daily build (eb8c84846bdba32c17b23e7da6742463085bec9d) / Windows 7.
Bug doesn't occur with LO 6.0.0.2.
=> regression

Bibisected to the following commit using repo bibisect-win32-6.1. Adding Cc: to Miklos Vajna, please take a look sometimes.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=4a0f506f0d8c2a017f0cf880481d3c0c32a48909
author		Miklos Vajna <vmiklos@collabora.co.uk>	2018-01-17 17:24:35 +0100
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-01-18 09:14:42 +0100

framework: disable layout manager in hidden frames
Comment 1 Miklos Vajna 2018-02-06 11:05:17 UTC
I'm attaching a simple python script to see how to have the benefit of the original commit, so that it's possible to fix this without breaking the original use-case. I guess the problem is that I used the existing "Hidden" flag, which had the "load hidden for now, may be visible later" meaning, while my commit assumed it also means "hidden, and never will be visible".

Based on this the script now uses a dedicated HiddenForConversion flag as well, then disabling the framework-level layout manager can be condition on that new flag, not affecting existing MM code.
Comment 2 Miklos Vajna 2018-02-06 11:07:01 UTC
Created attachment 139627 [details]
Reproducer script.

Use it like this:

./soffice.bin "--accept=socket,host=localhost,port=2083;urp;StarOffice.ServiceManager"

then

PYTHONPATH=/opt/libreoffice/program URE_BOOTSTRAP=file:///opt/libreoffice/program/fundamentalrc ./test.py "file:///opt/libreoffice/sdk/examples/cpp/DocumentLoader/test.odt"
Comment 3 Commit Notification 2018-02-06 19:43:30 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=42c58f1c0ca4d310834f561f9145df340a893af1

tdf#115218 framework: decouple HiddenForConversion from Hidden

It will be available in 6.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.