officecfg/registry/schema/org/openoffice/Office/Common.xcs | 9 +++++++++ sfx2/source/doc/objstor.cxx | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-)
New commits: commit 0035b3218d8652652e62afe89eddfd28a9021b75 Author: christianju <christianjun...@gmail.com> Date: Mon Feb 10 02:30:48 2014 +0100 fdo#61320: Allow user to choose whether to create thumbnails inside odf. Change-Id: I8c8129534ebcca32941ad76b201bb9a0243d8c3e diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index 5349984..1e681e9 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 965297c..883b75d 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits