Bug 121140 - Misleading GPG encryption option
Summary: Misleading GPG encryption option
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: Moritz Duge
Keywords: filter:pdf, implementationError
: 117928 154747 (view as bug list)
Depends on:
Blocks: Document-Options
  Show dependency treegraph
Reported: 2018-11-03 10:09 UTC by Timur Davletshin
Modified: 2024-07-11 12:04 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Timur Davletshin 2018-11-03 10:09:48 UTC
Misleading GPG encryption option in file save dialog

Steps to Reproduce:
1. Cleate new document
2. Type something
3. Open file save dialog 
4. Choose Flat ODT or txt choose "Encrypt with GPG key" option and save

Actual Results:
Open created file in text editor, file is unencrypted.

Expected Results:
Disable GPG encryption option for non-compatible file formats.

Reproducible: Always

User Profile Reset: Yes

Additional Info:
Comment 1 Thorsten Behrens (allotropia) 2018-11-11 23:44:02 UTC
*** Bug 117928 has been marked as a duplicate of this bug. ***
Comment 2 Thorsten Behrens (allotropia) 2018-11-11 23:58:19 UTC
Right, depending on the selected output format, checkbox should get disabled, like it's currently happening for the password checkbox already.
Comment 3 QA Administrators 2019-11-13 03:33:13 UTC Comment hidden (obsolete)
Comment 4 Timur Davletshin 2019-11-13 06:46:52 UTC
Still can reproduced in:

Build ID: a64200df03143b798afd1ec74a12ab50359878ed
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk2; 
Locale: en-US (C.UTF-8); UI-Language: en-US
Calc: threaded
Comment 5 QA Administrators 2021-11-13 05:46:04 UTC Comment hidden (obsolete)
Comment 6 Andrew Watson 2023-05-02 09:19:57 UTC
Bug still present in:

Version: / LibreOffice Community
Build ID: 5b1f5509c2decdade7fda905e3e1429a67acd63d
CPU threads: 4; OS: Mac OS X 10.14.6; UI render: default; VCL: osx
Locale: en-GB (en_GB.UTF-8); UI: en-GB
Calc: threaded
Comment 7 Moritz Duge 2024-05-21 23:07:18 UTC
As far as I understand what's happening and what needs to be changed:

FileDialogHelper_Impl needs to respect GPGENCRYPTION from SfxFilterFlags as it respects ENCRYPTION for the password checkbox.



Currently (2024-05-22) the "Encrypt with GPG key" checkbox is simply always enabled. For FODT and also for TXT, DOC, PPT, XLS, ... and everything else.

Saving a DOCX with GPG enabled results in an error. But pretty much every other document than ODT saves an unencrypted document without complaining if the GPG check box is enabled.

Only ODT (with the exception of FODT) gives the expected encrypted result. So for every other format GPG should be disabled.
And it looks like SfxFilterFlags::GPGENCRYPTION is already holds this information for disabling the GPG check box. FileDialogHelper_Impl just needs to use that information.
Comment 8 Moritz Duge 2024-05-24 13:53:34 UTC
See here for which feature is supported for which file format. That's what the SfxFilterFlags are matched with via GetFilterFlags()
ODF is here for example.
This ticket is about the GPGENCRYPTION feature.
Comment 9 Moritz Duge 2024-07-11 12:04:13 UTC
*** Bug 154747 has been marked as a duplicate of this bug. ***