diff options
-rw-r--r-- | officecfg/registry/schema/org/openoffice/Office/Common.xcs | 9 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 53499848d35f..1e681e9715de 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -2154,6 +2154,15 @@ </info> <value>false</value> </prop> + <prop oor:name="GenerateThumbnail" oor:type="xs:boolean" oor:nillable="false"> + <!-- UIHints: Tools Options - General Save - [Section] Save --> + <info> + <desc>Specifies whether to generate a thumbnail image and place it inside the + the odf archive file, which makes it possible to see a preview of the document.</desc> + <label>Store a preview of this document</label> + </info> + <value>true</value> + </prop> <prop oor:name="CreateBackup" oor:type="xs:boolean" oor:nillable="false"> <!-- OldPath: General/Save/Documents --> <!-- OldLocation: soffice.cfg --> diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 965297c96112..883b75d3bcfb 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -99,6 +99,7 @@ #include <vcl/bitmapex.hxx> #include <svtools/embedhlp.hxx> #include <basic/modsizeexceeded.hxx> +#include <officecfg/Office/Common.hxx> #include <osl/file.hxx> #include <sfx2/signaturestate.hxx> @@ -1450,8 +1451,9 @@ sal_Bool SfxObjectShell::SaveTo_Impl } } - - if ( bOk && GetCreateMode() != SFX_CREATE_MODE_EMBEDDED && !bPasswdProvided ) + //fdo#61320: only store thumbnail image if the corresponding option is not disabled in the configuration + if ( bOk && officecfg::Office::Common::Save::Document::GenerateThumbnail::get() + && GetCreateMode() != SFX_CREATE_MODE_EMBEDDED && !bPasswdProvided ) { // store the thumbnail representation image // the thumbnail is not stored in case of encrypted document |