diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-11-25 18:52:50 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-11-28 21:07:13 +0100 |
commit | 0e4ff2261f3c2c9dada5816f11095652e028c3dd (patch) | |
tree | 517042ca6f076fadaefb20e3129a2e35c5014ecb /vcl/qa/cppunit/pdfexport | |
parent | ff41bc546edb4f28ac0852fc8a95fe5dbde40a10 (diff) |
tdf#67866 sc,sd: PDF/UA export: set language in Catalog
sw already does this, and it's recommended in
https://www.w3.org/WAI/GL/WCAG20-TECHS/PDF16.html
Change-Id: I0ce36442ec1b223c40f53fac3683ad7bb0e2bc6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143307
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'vcl/qa/cppunit/pdfexport')
-rw-r--r-- | vcl/qa/cppunit/pdfexport/pdfexport.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx index 962995a0d6e1..1e7a6788acf4 100644 --- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx +++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx @@ -839,6 +839,16 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testAlternativeText) } } } + + // tdf#67866 check that Catalog contains Lang + auto* pCatalog = aDocument.GetCatalog(); + CPPUNIT_ASSERT(pCatalog); + auto* pCatalogDictionary = pCatalog->GetDictionary(); + CPPUNIT_ASSERT(pCatalogDictionary); + auto pLang = dynamic_cast<vcl::filter::PDFLiteralStringElement*>( + pCatalogDictionary->LookupElement("Lang")); + CPPUNIT_ASSERT(pLang); + CPPUNIT_ASSERT_EQUAL(OString("en-US"), pLang->GetValue()); } CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf105972) |