office-gobmx/sc/qa/extras
Miklos Vajna 7d56dae337 tdf#127236 vcl: fix missing encryption of PDF images during export
Regression from commit 78e25558e8
(tdf#106059 PDF export: create a reference XObject for JPG images with
PDF data, 2017-02-23), once a PDF image was inserted to a document, an
encrypted PDF export lost those images.

The reason for this is that we started to preserve PDF images as vector
data with the above commit, but this means we copied over PDF objects
from PDF images to the export result as-is, so encryption was not
performed for them.

Fix this by separating the write of the PDF object headers, stream
content and object footer and then calling
checkAndEnableStreamEncryption() / disableStreamEncryption() for each
object, even if it's not something our PDF export created but comes from
a PDF image.

Note that when existing PDF files are signed, PDF objects are also
copied into a vcl::filter::PDFDocument, but such PDF images are never
encrypted, so it's fine to have stub implementations in
vcl::filter::PDFDocument.

Change-Id: I2f74b9f51cd35b4319221532ca890e197bab9cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137242
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2022-07-20 12:54:45 +02:00
..
testdocuments tdf#99514 - implement Value2 for compatibility 2022-06-30 03:36:15 +02:00
anchor.cxx
check_data_pilot_field.cxx
check_data_pilot_table.cxx
check_xcell_ranges_query.cxx
htmlexporttest.cxx
macros-test.cxx CppunitTest_sc_macros_test: move test where it belongs 2022-06-15 14:35:05 +02:00
new_cond_format.cxx
recordchanges-test.cxx
scannotationobj.cxx
scannotationshapeobj.cxx
scannotationsobj.cxx
scarealinkobj.cxx
scarealinksobj.cxx
scautoformatobj.cxx
scautoformatsobj.cxx
sccellcursorobj.cxx
sccellfieldsobj.cxx
sccellformatsenumeration.cxx
sccellformatsobj.cxx
sccellobj.cxx
sccellrangeobj.cxx
sccellrangesobj.cxx
sccellsearchobj.cxx
sccellsenumeration.cxx
sccellsobj.cxx
scchartobj.cxx
scchartsobj.cxx
scconsolidationdescriptorobj.cxx
scdatabaserangeobj.cxx
scdatabaserangesobj.cxx
scdatapilotfieldgroupitemobj.cxx
scdatapilotfieldgroupobj.cxx
scdatapilotfieldgroupsobj.cxx
scdatapilotfieldobj.cxx
scdatapilotfieldsobj.cxx
scdatapilotitemobj.cxx
scdatapilotitemsobj.cxx
scdatapilottableobj.cxx
scdatapilottablesobj.cxx
scddelinkobj.cxx
scddelinksobj.cxx
scdocumentconfigurationobj.cxx
scdrawpageobj.cxx
scdrawpagesobj.cxx
sceditfieldobj-cell.cxx
sceditfieldobj-header.cxx
scfilterdescriptorbase.cxx
scfunctiondescriptionobj.cxx
scfunctionlistobj.cxx
scheaderfieldsobj.cxx
scheaderfootercontentobj.cxx
scimportdescriptorbaseobj.cxx
scindexenumeration_cellannotationsenumeration.cxx
scindexenumeration_cellarealinksenumeration.cxx
scindexenumeration_databaserangesenumeration.cxx
scindexenumeration_datapilotfieldsenumeration.cxx
scindexenumeration_datapilotitemsenumeration.cxx
scindexenumeration_datapilottablesenumeration.cxx
scindexenumeration_ddelinksenumeration.cxx
scindexenumeration_functiondescriptionenumeration.cxx
scindexenumeration_labelrangesenumeration.cxx
scindexenumeration_namedrangesenumeration.cxx
scindexenumeration_scenariosenumeration.cxx
scindexenumeration_sheetcellrangesenumeration.cxx
scindexenumeration_sheetlinksenumeration.cxx
scindexenumeration_spreadsheetsenumeration.cxx
scindexenumeration_spreadsheetviewpanesenumeration.cxx
scindexenumeration_subtotalfieldsenumeration.cxx
scindexenumeration_tableautoformatenumeration.cxx
scindexenumeration_tablechartsenumeration.cxx
scindexenumeration_tablecolumnsenumeration.cxx
scindexenumeration_tableconditionalentryenumeration.cxx
scindexenumeration_tablerowsenumeration.cxx
scindexenumeration_textfieldenumeration.cxx
sclabelrangeobj.cxx
sclabelrangesobj.cxx
scmodelobj.cxx
scnamedrangeobj.cxx
scnamedrangesobj.cxx
scoutlineobj.cxx
scpdfexport.cxx tdf#127236 vcl: fix missing encryption of PDF images during export 2022-07-20 12:54:45 +02:00
screcentfunctionsobj.cxx
scscenariosobj.cxx
scshapeobj.cxx
scsheetlinkobj.cxx
scsheetlinksobj.cxx
scsortdescriptorbaseobj.cxx
scspreadsheetsettings.cxx
scspreadsheetsettingsobj.cxx
scstylefamiliesobj.cxx
scstylefamilyobj.cxx
scstyleobj.cxx
scsubtotaldescriptorbase.cxx
scsubtotalfieldobj.cxx
sctablecolumnobj.cxx
sctablecolumnsobj.cxx
sctableconditionalentryobj.cxx
sctableconditionalformat.cxx
sctablerowobj.cxx
sctablerowsobj.cxx
sctablesheetobj.cxx
sctablesheetsobj.cxx
sctablevalidationobj.cxx
sctabviewobj.cxx
scuniquecellformatsenumeration.cxx
scuniquecellformatsobj.cxx
scviewpaneobj.cxx
vba-macro-test.cxx tdf#149579: sc_vba_macro_test: Add unittest 2022-06-17 13:24:31 +02:00