office-gobmx/filter
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
..
inc
qa tdf#127236 vcl: fix missing encryption of PDF images during export 2022-07-20 12:54:45 +02:00
source ofz#48643 Indirect-leak 2022-07-16 20:16:50 +02:00
uiconfig/ui Bump xmlfiltertabpagegeneral.ui to latest Glade 2022-06-15 16:46:57 +02:00
AllLangMoTarget_flt.mk
Configuration_filter.mk tdf#100522 Add support for exporting SVGZ in Draw 2022-06-22 14:11:14 +02:00
CppunitTest_filter_dialogs_test.mk gbuild: Remove MSVC 2013 legacy code 2017-04-21 18:18:44 +02:00
CppunitTest_filter_msfilter.mk
CppunitTest_filter_pdf.mk filter: allow PDF export to sign from the cmdline 2022-02-03 21:06:20 +01:00
CppunitTest_filter_priority.mk
CppunitTest_filter_svg.mk
CppunitTest_filter_textfilterdetect.mk tdf#139991: move 0-byte file handling to SfxFrameLoader_Impl::load 2022-04-13 15:46:59 +02:00
CppunitTest_filter_xslt.mk
CustomTarget_svg.mk
IwyuFilter_filter.yaml
JunitTest_filter_complex.mk
Library_filterconfig.mk
Library_graphicfilter.mk
Library_icg.mk gbuild: introduce plugin + loader concepts 2021-12-01 18:37:23 +01:00
Library_msfilter.mk
Library_odfflatxml.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_pdffilter.mk
Library_storagefd.mk
Library_svgfilter.mk Separate core drawinglayer func. into drawinglayercore library 2021-12-22 12:10:10 +01:00
Library_t602filter.mk
Library_textfd.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_xmlfa.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_xmlfd.mk
Library_xsltdlg.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Library_xsltfilter.mk Generally determine Rdb content from gb_*_set_componentfile calls 2021-12-10 08:14:24 +01:00
Makefile
Module_filter.mk
Package_docbook.mk
Package_xhtml.mk
Package_xslt.mk tdf#106525: Implement an XSLT import filter for ADO rowset XML 2017-04-05 05:17:22 +00:00
README.md
UIConfig_filter.mk

LibreOffice Filters

Filter registration and some simple filters (also descriptions).

Desperate splitting of code into small shared libraries for historical reasons presumably (OS/2 and Windows 3.x). The libraries produced from the code in each subdirectory of filter/source/graphicfilter are graphic format import or export filters. But they don't have uniform API. Some have either a GraphicImport or GraphicExport entry point, and are loaded and used in a uniform fashion from code in svtools/source/filter/filter.cxx. Others have different API and are loaded from other places. For instance icgm has ImportCGM, and is loaded and used by sd/source/filter/cgm/sdcgmfilter.cxx (!). Svgreader is used for "File -> Open" and then to choose the svg file. For "Insert -> Picture -> From File", see svgio/source/svgreader directory.

Filter Configuration

The filter configuration consists of two parts, the type definition in filter/source/config/fragments/types/ and the actual filter definition in filter/source/config/fragments/filters/.

Each file type e.g. text file should be represented by exactly one type definition. This type can then be referenced by several different filters, e.g. calc text, writer text.