diff options
author | christianju <christianjunker@gmail.com> | 2014-02-10 02:30:48 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-03-03 17:38:33 +0100 |
commit | 0035b3218d8652652e62afe89eddfd28a9021b75 (patch) | |
tree | 3ea9fc13cab8197bb4a2b48a9f633f9f0efa1052 | |
parent | ec39578e5cb4b7e81bf5c539c248966d609c7257 (diff) |
fdo#61320: Allow user to choose whether to create thumbnails inside odf.
Change-Id: I8c8129534ebcca32941ad76b201bb9a0243d8c3e
-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 |