Download it now!
Bug 120343 - Export to PDF opens PDF before the properties have been edited and the PDF is created
Summary: Export to PDF opens PDF before the properties have been edited and the PDF is...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.4.0 target:6.3.0.1 target:6.2.5
Keywords: bibisected, bisected, filter:pdf, regression
: 121566 125435 132550 (view as bug list)
Depends on:
Blocks: PDF-Export-Options-Dialog File-Properties Dialog-Tunneling-Regressions
  Show dependency treegraph
 
Reported: 2018-10-05 12:23 UTC by katonkar
Modified: 2020-05-14 20:30 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description katonkar 2018-10-05 12:23:48 UTC
Description:
If "edit properties before saving" and "show PDF after creation" are both enabled, then LO 6.1 tries to open the not yet created OR during the last export already created PDF file while showing the file properties window. I am using the German version, so the English options might be called differently.


Steps to Reproduce:
1. Enable the edit file properties before saving option in general options.
2. Open the Export to PDF dialog.
3. Enable the open PDF after creation option in that dialog.
4. Click on Export

Actual Results:
LO tries to open the PDF before it's created and fails if a file with that name does not exist. At the same time it shows the file properties dialog.

Expected Results:
Show the properties, then export, then show the file.


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: TextDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: yes
Comment 1 Oliver Brinzing 2018-10-06 12:07:18 UTC
reproducible with

Version: 6.2.0.0.alpha0+ (x64)
Build ID: 315e585f283e6e4a5f1ac11e7d17a638d04e82b0
CPU threads: 4; OS: Windows 10.0; UI render: default; VCL: win; 
Locale: de-DE (de_DE); Calc: threaded
Comment 2 Xisco Faulí 2018-10-16 16:17:11 UTC
Not reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.15; Render: default;
Comment 3 BogdanB 2018-10-16 17:42:15 UTC
This bug is also on
Version: 6.1.1.0.0+
Build ID: 5a56b72413d5f555c854e36d3bd2fd50ec21644c
CPU threads: 4; OS: Linux 4.15; UI render: GL; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-6-1, Time: 2018-08-15_02:45:13
Locale: en-US (ro_RO.UTF-8); Calc: group threaded
Comment 4 BogdanB 2018-10-16 17:44:23 UTC
This bug is NOT in:
Versiune: 6.0.6.2
Identificator construire: 1:6.0.6-0ubuntu0.18.04.1
Fire CPU: 4; OS: Linux 4.15; Redare UI: implicit; VCL: gtk3; 
Setări regionale: ro-RO (ro_RO.UTF-8); Calc: group threaded
Comment 5 BogdanB 2018-10-16 17:53:30 UTC
I bibisected on 6.1

7bd5cd88118ab6d926a7bc7500255ac66ca0ad2d is the first bad commit
commit 7bd5cd88118ab6d926a7bc7500255ac66ca0ad2d
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Fri Mar 2 20:24:27 2018 +0100

    source sha:0950917b9514069e8dbf92b9c0fbd44b492a7cd1
    
    source sha:0950917b9514069e8dbf92b9c0fbd44b492a7cd1

:040000 040000 b1ad2c3a6847cd15a5df7e0d659775fc2198806f 24ba0bea746a8877f11d0bdc08719586ae34e9ad M	instdir
Comment 6 Xisco Faulí 2018-10-16 21:02:13 UTC
(In reply to BogdanB from comment #5)
> I bibisected on 6.1
> 
> 7bd5cd88118ab6d926a7bc7500255ac66ca0ad2d is the first bad commit
> commit 7bd5cd88118ab6d926a7bc7500255ac66ca0ad2d
> Author: Jenkins Build User <tdf@pollux.tdf>
> Date:   Fri Mar 2 20:24:27 2018 +0100
> 
>     source sha:0950917b9514069e8dbf92b9c0fbd44b492a7cd1
>     
>     source sha:0950917b9514069e8dbf92b9c0fbd44b492a7cd1
> 
> :040000 040000 b1ad2c3a6847cd15a5df7e0d659775fc2198806f
> 24ba0bea746a8877f11d0bdc08719586ae34e9ad M	instdir

Thanks for bisecting this.
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=0950917b9514069e8dbf92b9c0fbd44b492a7cd1

author	Henry Castro <hcastro@collabora.com>	2018-03-01 16:11:44 -0400
committer	Henry Castro <hcastro@collabora.com>	2018-03-02 19:55:01 +0100
commit	0950917b9514069e8dbf92b9c0fbd44b492a7cd1 (patch)
tree	fa450d498c714295791e2f0a29d1bce87a52dd4e
parent	e802e960f8f7343eec1a14eba70b7affc6298968 (diff)
lokdialog: convert the dialog File -> Properties... to async exec

Adding Cc: to Henry Castro
Comment 7 Xisco Faulí 2018-11-22 09:39:06 UTC
*** Bug 121566 has been marked as a duplicate of this bug. ***
Comment 8 Xisco Faulí 2019-06-06 07:38:54 UTC
*** Bug 125435 has been marked as a duplicate of this bug. ***
Comment 9 V Stuart Foote 2019-06-06 13:14:57 UTC
Issue with the "Edit properties before saving"...

Patches [1] for bug 117895 problem commit [2] did not correct this mishandling of the "Edit properties before saving" used with "show PDF after creation". 

Also have issue of bug 119206 where those STR with "edit properties before saving" actually crashes LO (Windows build at least) doing a save on close--posting a fatal error dialog "LibreOfficeDev 6.4 Fatal Error  unsatisfied query for interface of type com.sun.star.document.XDocumentPropertiesSupplier!"


=-refs-=
[1] https://gerrit.libreoffice.org/57211 (patch for 6.2.0), https://gerrit.libreoffice.org/59142 (patch at 6.1.2)

[2] https://gerrit.libreoffice.org/50600 (regression lokdialog: convert the dialog File -> Properties... to async exec)
Comment 10 Xisco Faulí 2019-06-06 13:22:44 UTC
I guess a solution for this would be to check if 'Edit document properties before saving' option is enabled in https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/guisaveas.cxx?r=32eeb405#1666, and if true, wait until the properties dialog is closed to open the pdf document...
Comment 11 Xisco Faulí 2019-06-06 16:34:47 UTC
(In reply to Xisco Faulí from comment #10)
> I guess a solution for this would be to check if 'Edit document properties
> before saving' option is enabled in
> https://opengrok.libreoffice.org/xref/core/sfx2/source/doc/guisaveas.
> cxx?r=32eeb405#1666, and if true, wait until the properties dialog is closed
> to open the pdf document...

@Caolán, I thought you might be interested in this issue...
Comment 12 Caolán McNamara 2019-06-08 16:53:43 UTC
I think I see how to fix that
Comment 13 Commit Notification 2019-06-08 18:01:12 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/9df8a2eb8c216b16927aac2182b881b21d8b2d14%5E%21

Resolves: tdf#120343 show pdf in async pdf export dialog callback

It will be available in 6.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 14 Caolán McNamara 2019-06-08 18:12:47 UTC
backports to 6-3 and 6-2 in gerrit
Comment 15 Commit Notification 2019-06-08 18:34:19 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/63e86506d500dd6f61e12a6d526bd2bc33995a20%5E%21

Resolves: tdf#120343 show pdf in async pdf export dialog callback

It will be available in 6.3.0.1.

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

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2019-06-09 13:48:39 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/d3655c22aa393dd70459f42bee547c39306e4bf0%5E%21

Resolves: tdf#120343 show pdf in async pdf export dialog callback

It will be available in 6.2.5.

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

Affected users are encouraged to test the fix and report feedback.
Comment 17 Xisco Faulí 2019-06-10 09:16:23 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: ec905d131374f0860bac77c52873eed984b1966f
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!!
Comment 18 Aron Budea 2020-05-14 20:30:30 UTC
*** Bug 132550 has been marked as a duplicate of this bug. ***