mirror of
https://github.com/LibreOffice/core.git
synced 2025-08-15 20:47:46 +00:00

Previously, we silently discarded fonts which rights disallowed editing of documents. This change introduces a choice, where user can opt to either discard the restricted fonts, or switch to read-only mode. 1. When user opens a document with restricted embedded fonts, which are already installed on the system, those fonts are not considered as restricted. 2. Trying to switch to edit mode will show the dialog again, allowing to discard those fonts to allow editing. 3. Saving the document will discard restricted fonts not installed on the system in any case. 4. Even though saving discards those fonts from file, it doesn't switch to edit mode, because it doesn't reload the document, that is needed to reload embedded font data (and release respective font files). 5. Opening a document initially in read-only mode skips the dialog. TODO: avoid showing those fonts in the font lists. Change-Id: Ia7c9b6c3f727720e64e4df8d1c4a8e3641b067bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189366 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins