Commit Graph
410 Commits
Author SHA1 Message Date
Samuel Mehrbrodt 9fc9e5bc9e tdf#173381 PDF export: Make sure that link contents are always set
Use name, link text or the link itself - depending on what is available.

Change-Id: Iea6654e2aae22d39c031b2cb953c34a5a1ce42ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210458
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
2026-09-07 08:07:57 +02:00
Xisco Fauli eb0c65a1a1 UnoApiTest: pass PDFium to parsePDFExport as parameter
so we can check if it's not a nullptr at test level

Change-Id: Icfe580b27f3ad4a28b328f0fac8cf93e05c50b54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210484
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-04 15:32:19 +02:00
Miklos Vajna 4eb008acce pdfium: update to 7988
- fix build against our bundled ICU
- update external/pdfium/extractpatterns.patch to work after the
  upstream commit fc790866bf26d977b2ea3a0c3938bb52895309ea (Consolidate
  CFX_RenderDevice and remove CPDF_WindowsRenderDevice, 2026-06-29), which
  folded CFX_DefaultRenderDevice into CFX_RenderDevice.
- update CppunitTest_vcl_pdfexport2: mostly likely needed after the
  upstream commit 2f7a54a926a1b8e51aff9ac2aca5cccb29920aae (Partially
  fix RTL character and line reading order in CPDF_TextPage, 2026-07-24)
- CppunitTest_vcl_pdfexport: same

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I25612e6696a24588b9bf045e666047e6c2955d7c
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8557
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit a7149002917e82ef07250d2e964537118294993a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210417
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-03 15:51:52 +02:00
Andrea Gelmini 0974df2160 Fix typos
Change-Id: Icd5b8ad9f175c85ac1d8df644679fab945c0de0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210373
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-02 15:33:22 +02:00
Manish Bera 6f61236fd9 Add drop cap paint tests
Change-Id: Ifc1647aa684a89558646cfb536a046ff9b37131b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209132
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2026-08-21 14:35:27 +02:00
Michael Stahl a3623692c3 vcl: fix PDFEncryptorR6 padding
RFC 8018 / PKCS #5 as referenced in ISO-32000-2:2020 "7.6.3.1 General"
always adds padding.

Signed-off-by: Michael Stahl <michael.stahl@collabora.com>
Change-Id: I2bd783a19a9aaf8276dc4e81cfa26239e1c11a0d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8626
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit d998d34f568fabd2de918b761f30a1277942aeb4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209278
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-19 11:31:20 +02:00
Michael Stahl 01de4c0213 vcl: PDFEncryptorR6: fix subtle off-by-one in computeHashR6
The end condition `E.back() > (nRound - 32)` is using the wrong value of
`nRound` and so the loop can end too early.

This has caused a few CI builds to fail after pushing the padding fix,
as the input to `computeHashR6` includes a random IV it happened rarely.

Fix it by counting the iterations of the loop that have been done.

Signed-off-by: Michael Stahl <michael.stahl@collabora.com>
Change-Id: I8bbdc85439789db3753942b1292ba48d39b76541
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8625
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 082e5a49669e2d9058c2b3675c829a495b2044f3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209277
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-08-19 00:20:39 +02:00
Christian Lohmaier 507604d8f7 pdfexport2.cxx: fix type mismatch on 32bit Windows vs 64bit size_t
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): error C2672: 'CppUnit::assertEquals': no matching overloaded function found
workdir/UnpackedTarball/cppunit/include\cppunit/TestAssert.h(161): note: could be 'void CppUnit::assertEquals(const T &,const T &,CppUnit::SourceLine,const std::string &)'
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): note: 'void CppUnit::assertEquals(const T &,const T &,CppUnit::SourceLine,const std::string &)': template parameter 'T' is ambiguous
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): note: could be 'sal_uInt64'
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): note: or       'size_t'
vcl/qa/cppunit/pdfexport/pdfexport2.cxx(5438): note: 'void CppUnit::assertEquals(const T &,const T &,CppUnit::SourceLine,const std::string &)': could not deduce template argument for 'const T &' from 'sal_uInt64'

the aCIDSet.GetSize is a sal_uInt64, but size_t is only 32bit on Windows x86

Change-Id: I9d1f6a99f8badbf1c191abf7ebe3235a6b24917c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209079
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Jenkins
2026-08-11 17:09:20 +02:00
Khaled Hosny 9061517ef3 vcl: Drop the now unused CFF charset parser
Change-Id: Idd4e33fa413b9a00391b9c1f57c29404bfa6a0aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208914
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-08-01 15:04:18 +02:00
Khaled Hosny be4a7b0793 tdf#171869: Embed fonts with glyf outlines as composite fonts too
Their subsets were embedded as simple TrueType fonts. Simple TrueType
fonts select glyphs through the cmap table of the subset font, and we
had to give the subset font a fake cmap table that mapped codes to glyph
ID sequentially. This was a gross hack.

Embedding them as CIDFontType2 instead lets the CMap and the CIDToGIDMap
do the mapping, as they now already for fonts with a CFF table. The cmap
table is not needed as all now.

PDFium grows the top of the glyph bounding box by a 64th for composite
fonts but not for simple ones, which makes many tests to now fail. We
now patch that out to keep both kinds of embedding measuring glyphs the
same.

Change-Id: I4d136b0e5d2c63afd56e25a81aec16364e570cca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208839
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-31 07:07:11 +02:00
Khaled Hosny f889fe0a21 tdf#171869: Write a CIDSet for composite font subsets in PDF/A-1
PDF/A-1 requires the font descriptor of a subsetted CIDFont to have a
CIDSet listing the CIDs of its font program, and fonts with a CFF table
are now embedded as CIDFont subsets.

PDF/A-2 and PDF/A-3 do not require one, and PDF 2.0 deprecates it.

Change-Id: I34fc883ec5b10b404b48b3b9a5dd816fabb28940
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208835
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-31 07:07:02 +02:00
Khaled Hosny be1a60ef33 tdf#171869: Embed CFF fonts in PDF without converting to Type 1
Instead of converting CFF table to a Type 1 font and embedding that, we
now embed the CFF table directly without modification.

This allows us to get rid of the CFF parsing code with its security
issues.

The CFF table is embedded as FontFile3 (/Subtype/CIDFontType0C) stream
of a CIDFontType0.

This is a rework of previous attempt in:

    commit d9a6a3f7f0
    Author: Khaled Hosny <khaled@aliftype.com>
    Date:   Sun Apr 12 18:46:43 2026 +0200

        vcl: embed fonts with CFF table as OpenType fonts

That tried to embed them as full OpenType fonts, which was broken for
CID-keyed fonts and got reverted in:

commit 4c3c87e79d
Author: Khaled Hosny <khaled@aliftype.com>
Date:   Thu Apr 30 02:56:06 2026 +0300

    tdf#171869 vcl: restore Type1 PFB conversion for CFF fonts

Next version of harfbuzz-subset library will have an option to write an
identity charset (GID == CID) for CID-keyed fonts, so embedded as CFF
table will now work equally for both name-keyed and CID-keyed fonts.

As in interim solution (until we can require that version of HarfBuzz),
we now have a small module that parses only the CFF charset to get CID
mapping.

Change-Id: I57b0f722174613b91373c972e0c8eba3efeea5f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208804
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-31 07:06:52 +02:00
Caolán McNamara 778fd158b5 crashtesting: tag a nested table in a repeated header row only once
reproduce by exporting to tagged PDF/UA a document where an outer table
spans more than one page and its repeated header row carries a nested
table.

 #4  SwTaggedPDFHelper::BeginTag (...) at engine/sw/source/core/text/EnhancedPDFExportHelper.cxx:627
 #5  SwTaggedPDFHelper::BeginBlockStructureElements (...) at engine/sw/source/core/text/EnhancedPDFExportHelper.cxx:1827
 #6  SwTaggedPDFHelper::SwTaggedPDFHelper (...) at engine/sw/source/core/text/EnhancedPDFExportHelper.cxx:460
 #7  SwLayoutFrame::PaintSwFrame (...) at engine/sw/source/core/layout/paintfrm.cxx:3659
 #8  SwTabFrame::PaintSwFrame (...) at engine/sw/source/core/layout/paintfrm.cxx:4649

the header row is laid out again on each page, so the nested table gets
a master frame per page. the follow-headline check only looked at the
innermost enclosing table, so a nested table inside an outer table's
headline was not recognised as a repeat and was tagged once per page.

tagging the same frame a second time aborts on the assert that each
frame is tagged only once, so walk every enclosing table and treat the
frame as an artifact when any of them is a repeated follow headline.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I173c229fc46b8fbf7575c6a19293f54431dbe0e9
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5967
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
(cherry picked from commit 9c31ded970a549fac846ad4f45349c70fde114d4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208731
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-07-28 14:36:56 +02:00
Khaled Hosny 0162dbc58c tdf#171737: Improve PDF text extraction a bit
If we decide /AxtualText tags are needed, then the ToUnicode map for the
given glyph is broken and there is no point in keeping it.

Previously we kept it for tools that don’t support /ActualText, but this
seem to actually make things worse for tools that support it. Tools that
don’t support /ActualText are broken and can’t be helped anyway, so we
now drop the ToUnicode mapping in this case.

Change-Id: Ie223dbb24c307398c70099ca2e58c56ec791ae8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208547
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-24 23:44:34 +02:00
Khaled Hosny 9d6fe8f519 vcl: make GenerateVariableFontPSName() consistent across platforms
Sort axes by fvar order, so the order in the variations list does not
matter. Also filter-out default axis values in
WinFontFace::GetVariations(), so that default instance returns no
variations like other platforms.

This makes text expectations for 3 tests match on Windows now.

Change-Id: I1dcd01a4620376ea6e27e573212f3d6347d454c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208465
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-07-23 09:29:42 +02:00
Khaled Hosny a89d18c5d0 vcl: Enable testTdf155161 on Windows
It was disabled on Windows from the start, but it passes now thanks to
the recent fixes to Windows font code.

Change-Id: Id6a824955ef70c42d83f4175105eb313d51aa70c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208470
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-07-22 18:53:17 +02:00
Xisco Fauli bab072a4a1 Revert "vcl: Read font data with DirectWrite on Windows"
This reverts commit c223e23aaa.

This also reverts:

Revert "CppunitTest_sw_globalfilter: fix test on Windows"

This reverts commit ac64d1a9eb.

Revert "CppunitTest_sc_pdf_export: fix test on Windows"

This reverts commit 380c2e88a3.

Revert "CppunitTest_vcl_pdfexport: disable test on Windows"

This reverts commit bc1a3afa6e.

Revert "CppunitTest_vcl_pdfexport2: disable test on Windows"

This reverts commit a9b98f039c.

Revert "CppunitTest_sw_core_text: disable test on Windows"

This reverts commit 63584e7f9f.

Some tests in vcl/qa/cppunit/pdfexport/pdfexport.cxx
needed to be adapted

Change-Id: Ib7d8a0e7debdc4bb2241f8e73004fb10810e2db1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208235
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-19 02:06:35 +02:00
Xisco Fauli a9b98f039c CppunitTest_vcl_pdfexport2: disable test on Windows
gerrit_windows_wsl was configure to build with 'make build'
so this failure wasn't caught in time.
Now gerrit_windows_wsl builds with 'make build unitcheck slowcheck'
and it fails with
[_RUN_____] `anonymous namespace'::testTdf144222::TestBody
warn:vcl:5064:1724:vcl/win/window/salframe.cxx:1046: WinSalFrame::SetIcon(): Could not load large icon !
warn:vcl:5064:1724:vcl/win/window/salframe.cxx:1047: WinSalFrame::SetIcon(): Could not load small icon !
*** Exception 0xc0000005 occurred ***

	at _NLG_Return2, address 0x7FFE9FAD0357 in C:\WINDOWS\SYSTEM32\VCRUNTIME140D.dll
	at hb_memcpy in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-algs.hh: line: 1137:
	at hb_array_t<char const >::copy<hb_serialize_context_t,char const ,0> in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-array.hh: line: 346:
	at OT::glyf_impl::SubsetGlyph::serialize in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\SubsetGlyph.hh: line: 30:
	at OT::glyf::serialize<hb_array_t<OT::glyf_impl::SubsetGlyph const > > in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\glyf.hh: line: 58:
	at OT::glyf::subset in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\glyf.hh: line: 130:
	at _hb_subset_table_try<OT::glyf> in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table.hh: line: 46:
	at _hb_subset_table<OT::glyf const > in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table.hh: line: 168:
	at _hb_subset_table_other in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table-other.cc: line: 17:
	at _subset_table in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 270:
	at hb_subset_plan_execute_or_fail in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 433:
	at hb_subset_or_fail in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 359:
	at vcl::font::PhysicalFontFace::CreateFontSubset in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\font\PhysicalFontFace.cxx: line: 573:
	at vcl::PDFWriterImpl::emitFonts in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 2093:
	at vcl::PDFWriterImpl::emitResources in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 2300:
	at vcl::PDFWriterImpl::emitCatalog in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 4254:
	at vcl::PDFWriterImpl::emit in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 5392:
	at vcl::pdf::PDFWriter::Emit in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter.cxx: line: 55:
	at PDFExport::Export in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdfexport.cxx: line: 1198:
	at PDFFilter::implExport in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdffilter.cxx: line: 183:
	at PDFFilter::filter in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdffilter.cxx: line: 248:
	at SfxObjectShell::ExportTo in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 2746:
	at SfxObjectShell::SaveTo_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 1861:
	at SfxObjectShell::PreDoSaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 3266:
	at SfxObjectShell::CommonSaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 3054:
	at SfxObjectShell::APISaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objserv.cxx: line: 330:
	at SfxBaseModel::impl_store in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\sfxbasemodel.cxx: line: 3247:
	at SfxBaseModel::storeToURL in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\sfxbasemodel.cxx: line: 1830:
	at UnoApiTest::save in E:\jenkins\workspace\gerrit_windows_wsl\test\source\unoapi_test.cxx: line: 376:
	at `anonymous namespace'::testTdf144222::TestBody in E:\jenkins\workspace\gerrit_windows_wsl\vcl\qa\cppunit\pdfexport\pdfexport2.cxx: line: 4584:
	at std::invoke<void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\type_traits: line: 1686:
	at std::_Invoker_ret<std::_Unforced>::_Call<void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2117:
	at std::_Call_binder<std::_Unforced,0,void (__cdecl `anonymous namespace'::testTdf144222::*)(void),std::tuple<`anonymous namespace'::testTdf144222 *>,std::tuple<> > in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2127:
	at std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &>::operator()<> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2181:
	at std::invoke<std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &> &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\type_traits: line: 1670:
	at std::_Func_impl_no_alloc<std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf144222::*&)(void),A0xfeb83449::testTdf144222 * &>,void>::_Do_call in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 880:
	at std::_Func_class<void>::operator() in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 926:
	at CppUnit::TestCaller<`anonymous namespace'::testTdf144222>::runTest in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\include\cppunit\TestCaller.h: line: 175:
	at CppUnit::TestCaseMethodFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp: line: 33:
	at `anonymous namespace'::Protector::protect in E:\jenkins\workspace\gerrit_windows_wsl\test\source\vclbootstrapprotector.cxx: line: 37:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at `anonymous namespace'::Prot::protect in E:\jenkins\workspace\gerrit_windows_wsl\unotest\source\cpp\unobootstrapprotector\unobootstrapprotector.cxx: line: 79:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at `anonymous namespace'::Prot::protect in E:\jenkins\workspace\gerrit_windows_wsl\unotest\source\cpp\unoexceptionprotector\unoexceptionprotector.cxx: line: 181:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at CppUnit::DefaultProtector::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\DefaultProtector.cpp: line: 15:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at CppUnit::ProtectorChain::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 86:
	at CppUnit::TestResult::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp: line: 184:
	at CppUnit::TestCase::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp: line: 91:
	at CppUnit::TestComposite::doRunChildTests in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 64:
	at CppUnit::TestComposite::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 24:
	at CppUnit::TestComposite::doRunChildTests in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 64:
	at CppUnit::TestComposite::run in E:\jwarn:svl.items:5064:1724:svl/source/items/style.cxx:55: SfxStyleSheetBase left 23; SfxStyleSheetBasePool left 1
warn:unotools.config:5064:1724:unotools/source/config/configmgr.cxx:147: ConfigManager not empty
enkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 24:
	at CppUnit::TestRunner::WrappingSuite::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestRunner.cpp: line: 47:
	at CppUnit::TestResult::runTest in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp: line: 152:
	at CppUnit::TestRunner::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestRunner.cpp: line: 96:
	at `anonymous namespace'::ProtectedFixtureFunctor::run in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 328:
	at main2 in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 482:
	at sal_main in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 612:
	at main in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 602:
	at invoke_main in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 79:
	at __scrt_common_main_seh in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 288:
	at __scrt_common_main in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 331:
	at mainCRTStartup in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp: line: 17:
	at BaseThreadInitThunk, address 0x7FFEB411E8D7 in C:\WINDOWS\System32\KERNEL32.DLL
	at RtlUserThreadStart, address 0x7FFEB5ACC53C in C:\WINDOWS\SYSTEM32\ntdll.dll

Change-Id: I5452bb65f62e632b7d4d473849830c1d0d45b6c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208202
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-17 12:50:42 +02:00
Xisco Fauli bc1a3afa6e CppunitTest_vcl_pdfexport: disable test on Windows
gerrit_windows_wsl was configure to build with 'make build'
so this failure wasn't caught in time.
Now gerrit_windows_wsl builds with 'make build unitcheck slowcheck'
and it fails with
[_RUN_____] `anonymous namespace'::testTdf106702::TestBody
warn:sfx.doc:13248:244:sfx2/source/doc/doctemplates.cxx:480: init_Impl(): Could not create root
warn:vcl:13248:244:vcl/win/window/salframe.cxx:1046: WinSalFrame::SetIcon(): Could not load large icon !
warn:vcl:13248:244:vcl/win/window/salframe.cxx:1047: WinSalFrame::SetIcon(): Could not load small icon !
*** Exception 0xc0000005 occurred ***

	at _NLG_Return2, address 0x7FFE7D410357 in C:\WINDOWS\SYSTEM32\VCRUNTIME140D.dll
	at hb_memcpy in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-algs.hh: line: 1137:
	at hb_array_t<char const >::copy<hb_serialize_context_t,char const ,0> in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-array.hh: line: 346:
	at OT::glyf_impl::SubsetGlyph::serialize in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\SubsetGlyph.hh: line: 30:
	at OT::glyf::serialize<hb_array_t<OT::glyf_impl::SubsetGlyph const > > in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\glyf.hh: line: 58:
	at OT::glyf::subset in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\OT\glyf\glyf.hh: line: 130:
	at _hb_subset_table_try<OT::glyf> in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table.hh: line: 46:
	at _hb_subset_table<OT::glyf const > in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table.hh: line: 168:
	at _hb_subset_table_other in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset-table-other.cc: line: 17:
	at _subset_table in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 270:
	at hb_subset_plan_execute_or_fail in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 433:
	at hb_subset_or_fail in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\harfbuzz\src\hb-subset.cc: line: 359:
	at vcl::font::PhysicalFontFace::CreateFontSubset in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\font\PhysicalFontFace.cxx: line: 573:
	at vcl::PDFWriterImpl::emitFonts in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 2093:
	at vcl::PDFWriterImpl::emitResources in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 2300:
	at vcl::PDFWriterImpl::emitCatalog in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 4254:
	at vcl::PDFWriterImpl::emit in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter_impl.cxx: line: 5392:
	at vcl::pdf::PDFWriter::Emit in E:\jenkins\workspace\gerrit_windows_wsl\vcl\source\pdf\pdfwriter.cxx: line: 55:
	at PDFExport::Export in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdfexport.cxx: line: 1198:
	at PDFFilter::implExport in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdffilter.cxx: line: 183:
	at PDFFilter::filter in E:\jenkins\workspace\gerrit_windows_wsl\filter\source\pdf\pdffilter.cxx: line: 248:
	at SfxObjectShell::ExportTo in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 2746:
	at SfxObjectShell::SaveTo_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 1861:
	at SfxObjectShell::PreDoSaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 3266:
	at SfxObjectShell::CommonSaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objstor.cxx: line: 3054:
	at SfxObjectShell::APISaveAs_Impl in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\objserv.cxx: line: 330:
	at SfxBaseModel::impl_store in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\sfxbasemodel.cxx: line: 3247:
	at SfxBaseModel::storeToURL in E:\jenkins\workspace\gerrit_windows_wsl\sfx2\source\doc\sfxbasemodel.cxx: line: 1830:
	at UnoApiTest::save in E:\jenkins\workspace\gerrit_windows_wsl\test\source\unoapi_test.cxx: line: 376:
	at `anonymous namespace'::testTdf106702::TestBody in E:\jenkins\workspace\gerrit_windows_wsl\vcl\qa\cppunit\pdfexport\pdfexport.cxx: line: 2284:
	at std::invoke<void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\type_traits: line: 1686:
	at std::_Invoker_ret<std::_Unforced>::_Call<void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2117:
	at std::_Call_binder<std::_Unforced,0,void (__cdecl `anonymous namespace'::testTdf106702::*)(void),std::tuple<`anonymous namespace'::testTdf106702 *>,std::tuple<> > in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2127:
	at std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &>::operator()<> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 2181:
	at std::invoke<std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &> &> in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\type_traits: line: 1670:
	at std::_Func_impl_no_alloc<std::_Binder<std::_Unforced,void (__cdecl `anonymous namespace'::testTdf106702::*&)(void),A0xeeec7064::testTdf106702 * &>,void>::_Do_call in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 880:
	at std::_Func_class<void>::operator() in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\functional: line: 926:
	at CppUnit::TestCaller<`anonymous namespace'::testTdf106702>::runTest in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\include\cppunit\TestCaller.h: line: 175:
	at CppUnit::TestCaseMethodFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp: line: 33:
	at `anonymous namespace'::Protector::protect in E:\jenkins\workspace\gerrit_windows_wsl\test\source\vclbootstrapprotector.cxx: line: 37:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at `anonymous namespace'::Prot::protect in E:\jenkins\workspace\gerrit_windows_wsl\unotest\source\cpp\unobootstrapprotector\unobootstrapprotector.cxx: line: 79:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at `anonymous namespace'::Prot::protect in E:\jenkins\workspace\gerrit_windows_wsl\unotest\source\cpp\unoexceptionprotector\unoexceptionprotector.cxx: line: 181:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at CppUnit::DefaultProtector::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\DefaultProtector.cpp: line: 15:
	at CppUnit::ProtectorChain::ProtectFunctor::operator() in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 21:
	at CppUnit::ProtectorChain::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\ProtectorChain.cpp: line: 86:
	at CppUnit::TestResult::protect in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp: line: 184:
	at CppUnit::TestCase::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestCase.cpp: line: 91:
	at CppUnit::TestComposite::doRunChildTests in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 64:
	at CppUnit::TestComposite::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 24:
	at CppUnit::TestComposite::doRunChildTests in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 64:
	at CppUnit::TestComposite::run in E:\jewarn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:legacy.osl:13248:244:sw/source/core/layout/newfrm.cxx:315: Who didn't deregister?
warn:sal.osl:13248:244:sal/osl/all/debugbase.cxx:106: unexpected number of class SvxUnoTextRangeBase: 2; Expected: 0
warn:svl.items:13248:244:svl/source/items/style.cxx:55: SfxStyleSheetBase left 1; SfxStyleSheetBasePool left 2
warn:unotools.config:13248:244:unotools/source/config/configmgr.cxx:147: ConfigManager not empty
nkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestComposite.cpp: line: 24:
	at CppUnit::TestRunner::WrappingSuite::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestRunner.cpp: line: 47:
	at CppUnit::TestResult::runTest in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestResult.cpp: line: 152:
	at CppUnit::TestRunner::run in E:\jenkins\workspace\gerrit_windows_wsl\workdir\UnpackedTarball\cppunit\src\cppunit\TestRunner.cpp: line: 96:
	at `anonymous namespace'::ProtectedFixtureFunctor::run in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 328:
	at main2 in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 482:
	at sal_main in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 612:
	at main in E:\jenkins\workspace\gerrit_windows_wsl\sal\cppunittester\cppunittester.cxx: line: 602:
	at invoke_main in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 79:
	at __scrt_common_main_seh in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 288:
	at __scrt_common_main in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl: line: 331:
	at mainCRTStartup in D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_main.cpp: line: 17:
	at BaseThreadInitThunk, address 0x7FFE8F63E8D7 in C:\WINDOWS\System32\KERNEL32.DLL
	at RtlUserThreadStart, address 0x7FFE90A8C53C in C:\WINDOWS\SYSTEM32\ntdll.dll

Change-Id: Idac749da0d53abc3187943f73cb737c827e662d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208201
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-07-17 12:50:28 +02:00
Justin Luth 83303053d7 tdf#172169 sw ms import: line portion IsUsedToCalcLineSpacingHeight
Most of this patch is just No-Functional-Change cleanup/renaming.
The only change is the new function IsUsedToCalcLineSpacingHeight.

This fixes (only for non-ODF formats and new documents)
a LO 7.1 regression from
commit d336e6c260
which caused intra-paragraph line-spacing calculations
to ignore the size of most non-plain-text content.

Specifically broken for both ODT and Microsoft formats
were things like fields, content controls, and FieldMarkCheckboxes.

But that 'regression' also had some 'good' results.
Things that it accidentally fixed (in terms of Microsoft interop)
were Tabstops, Hidden text, and Footnote/Endnote markers.

P.S. No attempt was made to 'fix' regressed ODT files.

SAFETY FACTOR: Very safe
It fixes MS formats - and doesn't affect previous ODT files.

make CppunitTest_sw_ooxmlexport25 \
    CPPUNIT_TEST_NAME=testTdf172169_intraLinespacing

The VCL test is hit because the .fodt has no config:config-item,
so it picks up the new default.
This is a reference field with 1.15 line spacing and 96pt font.
make CppunitTest_vcl_pdfexport CPPUNIT_TEST_NAME=testTdf142806

Change-Id: I24cb1af505550b47fae8e7b61b3345f0346da52d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205456
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2026-06-27 01:30:42 +02:00
Jonathan Clark 943c5248c7 tdf#146572 sw: Fix extra spaces at the end of wrapped bidi portions
Regression due to the following commit:

 commit 93d7bdcb85
 Author: Bartosz Kosiorek <gang65@o2.pl>
 Date:   Mon May 2 14:59:26 2011 +0200

     fdo#33167, i#20878: Show spaces at the end of line

     The spaces weren't shown at the end of lines when viewing the document
     with the non-printing characters. This helps editing the spaces after a
     line in left aligned paragraphs.

This change effectively reverts what is still left of that commit in the
Writer code. It was likely useful at some point, but in testing it no
longer seems to have any user-facing effect other than causing tdf#146572.

As a side effect of this change, certain left-aligned LTR lines that
wrapped at spaces will now end with a hole portion. A number of tests
had to be updated to account for this extra portion.

Change-Id: Ia3cf2beae45f6dbe429ef9305de98b9ab99f59e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206258
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-06-09 17:31:58 +02:00
Jonathan Clark 95fdc0b589 tdf#117941 vcl: Fix invisible RTL strikeout chars in PDF export
Strikeout characters are drawn over the struck-out text, always as LTR
strings positioned at the leftmost position of the text. Due to a
1-character typo, the PDF exporter was drawing the strikeout characters
as RTL rather than LTR, which made them extend to the left outside the
clipping area, rather than covering the struck-out text as intended.

Change-Id: If4ef3a745a76526c2dfb8af6133b2bf729e92fbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205995
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2026-06-04 13:43:46 +02:00
Samuel Mehrbrodt c042c153bf tdf#172153 pdfexport: ToC title should not be inside of ToC
PDF/UA requires that a <TOC> must have only <TOCI> children,
so a heading is not allowed here.

Put the heading in front of the table of contents.
Also change it from a <caption> to a <h1> element.

Change-Id: Ie8fa42b503e76cda988747adad6d2724cf6bffbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205467
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
2026-05-22 06:11:41 +02:00
Jean-Michel Hautbois 63f2b6308d tdf#153935 vcl: PDF/UA export: emit /Scope and /Tabs on PDF 1.4
PDF/A-1 forces the PDF version to 1.4, which caused
PDFWriterImpl::setStructureAttribute() and PDFPage::emit() to skip
two entries that PDF/UA-1 nonetheless mandates:

* /Scope /Column on TH, gated to PDF 1.5+ in commit 28b06bb723
  ("tdf#149140 vcl: PDF/UA export: Scope attribute exists since
   PDF 1.5")
* /Tabs /S on pages with annotations, gated to PDF 1.5+ in commit
  fa3f04bdd4 ("tdf#148934 PDF/UA export: add Contents entry to
   Link annotations")

ISO 14289-1:2014, Clause 7.5 and Clause 7.18.3 require those entries
on a PDF/UA-1 file regardless of the PDF version. Relax both checks
so the entries are also emitted when UniversalAccessibilityCompliance
is requested. The resulting file is PDF/UA-1 conforming and best-
effort PDF/A-1 (the extra entries are tolerated by PDF/A-1 readers).

Add a test testTdf153935 derived from testTdf149140, asserting
/Scope /Column on TH and /Tabs /S on annotated pages when
SelectPdfVersion=1 and PDFUACompliance=true are combined.

Change-Id: Iab98946ab557cca4b578af87ea0b655445ec3cc4
Signed-off-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205155
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-14 09:56:18 +02:00
Jonathan Clark 03259a4b3f tdf#155557 sw: Fix underline width calculation for portions with kashida
Writer has a special code path for underlines that span font changes.
This special code path did not handle kashida justification, and would
draw underlines that were too short to connect to the following portion.

Change-Id: I31ff2c3a1cea0e7e4339a0533e568e421c20d52d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204604
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2026-04-30 15:56:36 +02:00
Jonathan Clark 7d4a9f683c tdf#168698 i18nutil: Adjust Syriac justification rules
This change makes two adjustments to the Syriac justification kashida
insertion position algorithm:

- Previously, the first pass scanned from end to midpoint exclusive.
  This has been updated so kashida positions at the midpoint are
  prioritized over kashida positions in the first half of the word.

- Fixes a bug that made midpoint calculation include vowel marks and
  other diacritics.

Change-Id: I615cde5cdb54e7afe5fccdf4d536ce7aef211395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204141
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2026-04-23 04:33:30 +02:00
Khaled Hosny 05eeac8b30 tdf#155853: Fix loading named instances of embedded variable fonts
Don’t parse font files manually addFontFile(). We are adding the font to
FontConfig and it will scan the font file already, so instead of parsing
it again ourselves we now get the font from properties from the
FontConig pattern.

Change-Id: If74f412392d4a5ea565ff4716488f43d5dec04f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203595
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-04-15 16:03:12 +02:00
Khaled Hosny 67447893fc tdf#171624: Add PDF export tests for font-variation-settings
Test that font-variation-settings with arbitrary axis values (wght=623,
wdth=87) produce distinct font subsets in PDF export. Tests both writer
(ODT) and editengine (ODP) paths.

The test font is a subset of Amstelvar with wdth and wght axes and
Latin-1 character range.

Change-Id: Ic2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203249
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-04-06 19:30:29 +02:00
Jaume Pujantell 59f7c0491a tdf#150076 embed background pdf
When exporting to PDF a document with a background image on the page.
The image would always be exported as a bitmap at a fix resolution, even
if the original data had vector form (like a pdf or svg).

This ensures that the original vector data is also exported as it is
done with regularly inserted images.

Change-Id: I7f363614ba375e01a4b076c961ce91dae8c2351b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/202994
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2026-03-31 17:33:57 +02:00
Xisco Fauli 1ed8bf0011 UnoApiTest: factor out common code for setting LO_IMPORT_USE_PDFIUM
Change-Id: I1b3c66b9098163ce17b6a4c812cc448cc5cd594c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201366
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-03-11 10:47:57 +01:00
Xisco Fauli 44e3a21666 CppunitTest_vcl_pdfexport: drop obsolete condition
Since
commit 8c3e219a83
Author: Xisco Fauli <xiscofauli@libreoffice.org>
Date:   Mon Apr 3 16:45:30 2023 +0200

    tdf#154549: vcl_pdfexport: Add unittest

but it seems it's no longer true

Change-Id: I494affc30c80d3fdc1728ecc2d0631d9460e0c96
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201271
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-03-10 12:11:44 +01:00
Xisco Fauli 8fc4c1623b CppunitTest_vcl_pdfexport: fix build on Windows
Change-Id: I4909e2635ebbe3dcea23824adeaae6d7de72c5ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201171
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-03-08 13:57:55 +01:00
Khaled Hosny 150b3deb2a Downgrade CFF2 table to CFF if we have a new enough HarfBuzz
Instead of drawing the outlines as Type 3 fonts, we now convert CFF2
table to CFF which then goes to our regular PDF embedding process (i.e
it gets converted to Type 1 fonts for now).

The test expectations are updated to reflect that.

Change-Id: I1923010a72241e0178967da3924ab91fe2df9910
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200976
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-03-05 02:15:01 +01:00
Andrea Gelmini 59ba4bdbbd Fix typo
Change-Id: Ic4a792f49332a282c1d86257b13105e306136879
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200902
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-03-04 09:24:35 +01:00
Khaled Hosny 1802e84d03 tdf#153368: Support optical size for variable fonts, part 4
Support saving/loading font-optical-sizing in Writer. The
font-optical-sizing property is enabled on the standard style for new
documents, and for old documents it remains unset for backward
compatibility.

Add no-op stubs to DOCX, RTF, WW8, and HTML filters.

Change-Id: I87e3de603785dbd588099bfbd72e13e4538fc420
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200536
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
2026-03-02 21:45:29 +01:00
Khaled Hosny 247430c3ed Parse hexadecimal escapes in vcl::filter::PDFNameElement
We write these escapes rather liberally in COSWriter::appendName(), so we
should parse them when reading.

Change-Id: Ie9f7626de287fd5038ca198a7143a95c3471ce92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200446
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-02-26 19:39:11 +01:00
Xisco Fauli 651064b9dd tdf#157517: vcl_pdfexport2: improve test
Change-Id: I5c5e1fd232fe5f52b837fe39a6db2b642affc923
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200418
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-02-26 16:41:03 +01:00
Xisco Fauli 39e7972184 CppunitTest_vcl_pdfexport2: factor out common code
Change-Id: Ifde48d17130e56186420a8388c79f76c801c99fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200410
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-02-26 16:40:50 +01:00
Xisco Fauli 7f8f3a0152 tdf#138792: vcl_pdfexport2: Add test
Change-Id: Ib72700b7eb62ab38ed86600f4c0ea0a9050d44e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200401
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-02-26 15:47:03 +01:00
Xisco Fauli e9bf377a94 tdf#153472: vcl_pdfexport2: Add test
Change-Id: I20aaea6122c9de0a727ec06f12fd05ca2c98b231
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200337
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-02-25 16:47:55 +01:00
Xisco Fauli 5dbf35a932 tdf#168057: Don't use aliases in StructElem when exporting to PDF/UA-2
Otherwise, the validator will fail with
'Non-standard structure type http://iso.org/pdf2/ssn:/Standard is not
mapped to a standard type'
because we are using 'Standard' instead of 'P'

Change-Id: Ifa7cff7f6914a2e25a5c31887c191360b810c9b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200312
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-02-25 14:50:11 +01:00
Xisco Fauli 9451ea4191 CppunitTest_vcl_pdfexport2: simplify test
Change-Id: I93755554d7b664a0255d85e037de989497a44cfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200208
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-02-25 09:03:42 +01:00
Xisco Fauli c3a6396438 tdf#170448: vcl_pdfexport2: Add test
Change-Id: Id393322801fa36b5cff74cf7f9ad5ffa2a457368
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200198
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-02-24 20:35:23 +01:00
Xisco Fauli b60d2fd89e tdf#160196: vcl_pdfexport2: Add test
Change-Id: I803908a4d23d428d7a86475f209fc20d9b01d211
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200070
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-02-23 20:55:10 +01:00
Xisco Fauli e1159ba4fe tdf#152218: vcl_pdfexport2: Add test
Change-Id: I56d6f3ced197afbd104b6bb2428cb50b6dffc124
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200054
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-02-23 20:55:03 +01:00
Xisco Fauli d9035e3cbd UnoApiTest: validate PDF/UA, PDF/A-1b, PDF/A-2b or PDF/A-3b by default
Change-Id: I984b5fb16bf36beb9468940a7d34248b17eaa3f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200051
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-02-23 18:29:05 +01:00
Khaled Hosny 079d72659a Add tests for generating PostScript names of variable fonts
Change-Id: I936ebe92bbbce17ce053baf8e1ba33a4866eda72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199865
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
2026-02-21 07:43:18 +01:00
Xisco Fauli b800fe7802 tdf#157517: vcl_pdfexport2: Add test
Change-Id: I9084c5b57e1d59064f026b3f391444ce60fad552
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199899
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-02-21 07:31:04 +01:00
Xisco Fauli 61fd51b76e tdf#136805: vcl_pdfexport2: Add test
Change-Id: I3473769738bfe1c9674def30b2d4620fd18bf26f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199891
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-02-20 22:22:22 +01:00
Xisco Fauli 0197d810c2 tdf#167290: export CreationDate with DateTime format
Otherwise, the validator fails with
"The value of CreationDate entry from the document
Info dictionary and its matching XMP property "xmp:CreateDate"
are not equivalent
(Info /CreationDate = D:20260220154049+01'00', XMP xmp:CreateDate = 2025-12-31T11:13:40.000+01)

The call to osl_getDateTimeFromTimeValue was removed in
commit 07ac61f2c6
Author: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
Date:   Mon Aug 28 11:16:34 2023 +0300

    tdf#138792: PDF export: fix date of xmp:CreateDate

for no apparent reason

Change-Id: I4c6948769797a4e446239316de2857851b31565e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199886
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-02-20 22:18:15 +01:00