Bug 162419 - No error message when failing to export to PDF still opened with file-lock in LO Draw
Summary: No error message when failing to export to PDF still opened with file-lock in...
Status: CLOSED DUPLICATE of bug 123343
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Printing and PDF export (show other bugs)
Version:
(earliest affected)
24.2.4.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Error-Messages PDF-Export
  Show dependency treegraph
 
Reported: 2024-08-10 09:00 UTC by Eyal Rozenberg
Modified: 2024-08-10 16:42 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Writer Export as PDF warning of file replacement (8.29 KB, image/png)
2024-08-10 13:25 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2024-08-10 09:00:04 UTC
Reproduction instructions:

1. Get some (valid) PDF file.
2. Open the PDF in LibreOffice Draw.
3. From the opened Draw, create a new Writer document.
4. In Writer, Write some text, different than what the PDF has.
5. In Writer, On the menus, File > Export As... > PDF
6. Ok in the dialog
7. Choose the path of the PDF file.

Expected result:
File is not overwritten, error message box.

Actual result:
File is not overwritten, but NO error message box.

Build:
Version: 24.2.4.2 (X86_64) / LibreOffice Community
Build ID: 51a6219feb6075d9a4c46691dcfe0cd9c4fff3c2
CPU threads: 20; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_IL); UI: en-US
Calc: CL threaded
Comment 1 V Stuart Foote 2024-08-10 13:25:50 UTC
Created attachment 195795 [details]
Writer Export as PDF warning of file replacement

Wait, you *still* have the source PDF open in Draw?

Otherwise, I get the expected 'Confirm Save As' overwrite warning for the PDF file name.

=> WFM as expected. While over writing a file already open in LibreOffice, or any other program, would be a really stupid idea.
Comment 2 V Stuart Foote 2024-08-10 13:34:30 UTC
Following the STR of OP I do get the Export as PDF warning for existing file name, and OK of that warning does not in fact overwrite, when the original PDF is *still* open in soffice Draw module--and holding file lock.  

But to me that is exactly the correct behavior!
Comment 3 V Stuart Foote 2024-08-10 13:40:32 UTC
Enhancement to offer 'save-as' for the existing filename in use, and clear the file lock is open as bug 123343
Comment 4 V Stuart Foote 2024-08-10 13:40:52 UTC

*** This bug has been marked as a duplicate of bug 123343 ***
Comment 5 Eyal Rozenberg 2024-08-10 15:30:36 UTC
(In reply to V Stuart Foote from comment #1)
> Created attachment 195795 [details]
> Writer Export as PDF warning of file replacement
> 
> Wait, you *still* have the source PDF open in Draw?

Yes, says so in the title.

> Following the STR of OP I do get the Export as PDF warning for existing file
> name, and OK of that warning does not in fact overwrite, when the original
> PDF is *still* open in soffice Draw module--and holding file lock.  
> 
> But to me that is exactly the correct behavior!

But that's not the bug. The bug is that there is no warning about the overwrite being aborted. That is, the user will mistakenly believe that the overwrite has occurred, while in fact it has not.
Comment 6 V Stuart Foote 2024-08-10 16:41:03 UTC
The lack of a warning/option to save to a different file name is exactly bug 123343

@Eyal--you are a PIA to deal with!

*** This bug has been marked as a duplicate of bug 123343 ***
Comment 7 Eyal Rozenberg 2024-08-10 16:42:20 UTC
(In reply to V Stuart Foote from comment #6)
> The lack of a warning/option to save to a different file name is exactly bug
> 123343

It isn't, but as that would resolve this bug - I'll accept the dupe'ing.