office-gobmx/external/boost
Mike Kaganski a5a49657dc tdf#158442: fix opening hybrid PDFs on Windows
Commit 046e954595 (Try to revert to use
of file_iterator from boost on Windows, 2023-10-31) had introduced a
problem that pdfparse::PDFReader::read couldn't create file_iterator
for files already opened with write access: mmap_file_iterator ctor
on Windows used single FILE_SHARE_READ as dwSharedMode parameter for
CreateFileA WinAPI; and that failed, when the file was already opened
using GENERIC_WRITE in dwDesiredAccess - which happens when opening
stream in TypeDetection::impl_detectTypeFlatAndDeep.

Fix this by patching boosts' mmap_file_iterator constructor to use
FILE_SHARE_READ | FILE_SHARE_WRITE, like we do in osl_openFile.

But there was a pre-existing problem of using char-based CreateFileA
API, which disallows opening any files with names not representable
in current Windows codepage. Such hybrid PDF files would still fail
creation of the file_iterator, and open as PDF.

Fix that by further patching boost to have wstring-based constructors
for file_iterator and mmap_file_iterator on Windows, which would call
CreateFileW.

Change-Id: Ib190bc090636159ade390b3dd120957d06d7b89b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160218
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-01 16:13:38 +01:00
..
include/boost
0001-Avoid-boost-phoenix-placeholders-uarg1.10-ODR-violat.patch.2
boost-emscripten-noshm.patch.0
boost-emscripten-nowasm.patch.0
boost-ios.patch.0
boost.6142.warnings.patch.1
boost.between.warning.patch
boost.fallback.encoding.patch
boost.file_iterator.sharing_win.patch
boost.noiconv.patch
boost_1_59_0.mpl.config.wundef.patch
boost_1_59_0.property_tree.wreturn-type.patch
boost_1_63_0.undef.warning.patch.1
clang-cl.patch.0
Makefile
Module_boost.mk
msvc2017.patch.0
README
repack_tarball.sh
rtti.patch.0
StaticLibrary_boost_date_time.mk
StaticLibrary_boost_filesystem.mk
StaticLibrary_boost_iostreams.mk
StaticLibrary_boost_locale.mk
StaticLibrary_boost_system.mk
UnpackedTarball_boost.mk

From [http://www.boost.org/].

Apart from the spirit parsing framework, LibreOffice currently mostly
uses the smart pointers, pool memory and binders functionality.