summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-09-25Some simplificationMike Kaganski
Change-Id: I7b455d1cb33bba2b3f2dfb3f469639519cd3076d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140552 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-24vcl: Removed unused PrintFontInfo and support codeKhaled Hosny
Change-Id: I4e4d67b5ff57585a02eaba9372599e767d31229d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140549 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-24vcl: Remove unused PrintFontManager::getFontBoundingBox()Khaled Hosny
Change-Id: I0aed5ec3bbab91a1fe57996a2f647b758369308c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140548 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-24use faster TempFile for font subset writingNoel Grandin
by not asking for the name or URL, we stay on the happy path, which is faster on Windows Change-Id: Ia333ab251fc0fc4129ad0610412c5c509914a58e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140453 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-24vcl: accept bitmap fonts in OpenTTFontFile()Khaled Hosny
We never subset such fonts after: commit 77cce80bb56801acf22da2149bd597d0d7793e3b Author: Khaled Hosny <khaled@aliftype.com> Date: Thu Sep 22 23:35:12 2022 +0200 vcl: tdf#121327 PDF export for bitmap color fonts But PrintFontManager::analyzeSfntFile() calls this function for non-subsetting uses, it probably shouldn’t since all info it should possibly need can come from FontConfig, but re-instate this for now. This check is very blunt and it would lead to empty fonts in PDF if we ever try to subset such a font, but lets clean this up later. Change-Id: I804d0244ee24a4b4e92b36efd26b376cbe40784d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140542 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-24simplify CmapSubTableNoel Grandin
use vector rather than handrolling it Change-Id: Ie160d5d60470e01434c61d80a2c7965e9126d508 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-24flattenTrueTypeTableGenericNoel Grandin
Change-Id: I197b2f45943513af7a514c92b5896bda659adf9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140536 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-24flatten TrueTypeTablePostNoel Grandin
Change-Id: Ifafd87770732dd3f461dbb6823b92796331fa683 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140529 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-23ofz: bump sc-rtf and html max lengthsCaolán McNamara
Change-Id: Ic7c596b59a420dc098ae61298d9fa048f826662c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140528 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-23Removed duplicated includeAndrea Gelmini
Change-Id: Idc57a6d048d730acf9f59c565bc7a57928eb3aa5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140515 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-23Fix GraphicTest::testLoadSVGZ() on non-default DPIXisco Fauli
Change-Id: I6f6435a285e34cf27798265d9d98f15337991b54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140406 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-09-23sw content controls, combo box: add PDF exportMiklos Vajna
Map it to vcl::PDFWriter::ComboBoxWidget, which knows that this has list items + allows free-form user input as well. PDF 32000-1:2008 Table 230 documents those field flag bits. Change-Id: Ifb99625c2ab8792b756ad52a3f6d599507c5773f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140480 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-09-23remove some dead codeNoel Grandin
after commit 590796ca0866168e3129d2abd0a0197114cddcdc Author: Noel Grandin <noelgrandin@gmail.com> Date: Wed Sep 21 20:44:42 2022 +0200 convert TrueTypeTable to C++ class Change-Id: I5c656011ebe37529788cea6a749c07ada2378385 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140433 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-23vcl: Use glyph names from the font in Type 3 fontsKhaled Hosny
Some PDF viewers might use glyph names to guess corresponding character, and it also makes debugging the PDF output a little bit easier. Change-Id: Ibe7f28d10814a9deb467129c85fed914fb7b3f9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140465 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-23vcl: tdf#121327 PDF export for bitmap color fontsKhaled Hosny
This change extracts the PNG data from the sbix/CBDT tables and embeds them as PDF Type 3 glyphs. In case the font supports both color layers and color bitmaps, the color layer take priority. This also reverts the part of the following commit that allowed bitmap fonts when creating font subsets because this is not needed now as the such fonts will now not reach the subsetting code. commit dcf7792da2aa2a1ef774a124f7b21f68fff0fd15 Author: Khaled Hosny <khaledhosny@eglug.org> Date: Tue Aug 27 15:19:15 2019 +0200 Make Noto Color Emoji font work on Linux Change-Id: I350ec97956f37ae574956b22712869fd6d1a6990 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140457 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-23cid#1515535 Explicit null dereferencedCaolán McNamara
get length of glyf before std::move it Change-Id: If2d9a2cc533d65ef4b8e0481cf7db677bf5e4349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140472 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-23-Werror=class-memaccessStephan Bergmann
...since 590796ca0866168e3129d2abd0a0197114cddcdc "convert TrueTypeTable to C++ class" Change-Id: I9c1908ba0618f5a04bc669e722ea5ad54ae217b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140471 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-23cid#1515534 invalidate_iteratorJulien Nabet
Change-Id: Ib7763b2a7df858ad8749eca35d3e7518a39fad75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140470 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-22tdf#151107 swap job orientation if paper matching swapped width/heightCaolán McNamara
if we eventually are forced to pick a final paper size which has the orthogonal orientation than that requested, then swap the orientation of the jobdata too and re-init the orientation to defaults in Printer::SetPaperSizeUser when we set a new user paper size rather than keeping the orig Change-Id: Ie9e783575734c7f9eec3984efd1357cae5375130 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140358 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-22pass in bDontSwap rather than use a local staticCaolán McNamara
Change-Id: I8758802064476199f34d57e0937ee56cef6e0363 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140429 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-22convert TrueTypeTable to C++ classNoel Grandin
Change-Id: I06f01c79414380e37dc006cc7f7fdce1976035f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-22Related: tdf#151107 EnvC65 page size is inconsistent with EnvC5 and EnvC6Caolán McNamara
*PageSize EnvC5/C5 Envelope: "<</PageSize [459 649] /ImagingBBox null>> setpagedevice" *PageSize EnvC6/C6 Envelope: "<</PageSize [323 459] /ImagingBBox null>> setpagedevice" but... *PageSize EnvC65/C65 Envelope: "<</PageSize [324 648] /ImagingBBox null>> setpagedevice" use the EnvC6/EnvC5 dimensions for EnvC65 instead of *PageSize EnvC65/C65 Envelope: "<</PageSize [323 649] /ImagingBBox null>> setpagedevice" Change-Id: I7a13d141435e2d4fc202dab59b8c6be12ff9610f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140409 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-21crashtesting: disable glyph caching for "XB Roya" fontCaolán McNamara
as seen in tdf119074-1.odt. harfbuzz upstream bug of https://github.com/harfbuzz/harfbuzz/issues/3824 filed to look for guidance. Change-Id: I792f86334c2a2958b175a0e14334a0a7a6ba81d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140345 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-21use more string_view in vclNoel Grandin
Change-Id: I66f96a305bb095716023ae1e565950971826bce0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140242 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-21convert TrueTypeCreator to a C++ classNoel Grandin
Change-Id: I07cd2dfeb947f555b31bd0dccb91fb76f549c675 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-21use more unique_ptrNoel Grandin
Change-Id: I7836a1b1813d16db53ca0d6cc2b2ff2ae95e70cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140267 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-21convert GlyphOffsets to a C++ classNoel Grandin
Change-Id: If693a5d0a94da666fd0361d45a3047890d9dec8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140265 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-21convert HexFmt to a C++ classNoel Grandin
Change-Id: Iebe385b1a6d51ab2c179a27eef4fb1199bc3aa41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140264 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-21NameID must encompass the full OpenType Name ID rangeStephan Bergmann
...to avoid CppunitTest_vcl_fontfeature CPPUNIT_TEST_NAME=FontFeatureTest::testGetFontFeaturesOpenType failing with > vcl/source/font/PhysicalFontFace.cxx:376:48: runtime error: load of value 259, which is not a valid value for type 'NameID' > #0 in vcl::font::PhysicalFontFace::GetName(vcl::font::NameID, LanguageTag const&) const at vcl/source/font/PhysicalFontFace.cxx:376:48 > #1 in vcl::font::FeatureCollector::collectForTable(unsigned int) at vcl/source/font/FeatureCollector.cxx:124:44 > #2 in vcl::font::FeatureCollector::collect() at vcl/source/font/FeatureCollector.cxx:198:9 > #3 in OutputDevice::GetFontFeatures(std::vector<vcl::font::Feature, std::allocator<vcl::font::Feature>>&) const at vcl/source/outdev/font.cxx:169:23 > #4 in FontFeatureTest::testGetFontFeaturesOpenType() at vcl/qa/cppunit/FontFeatureTest.cxx:143:5 after 06a23b7b4d23a31a4808c68f00e1be42d8218737 "vcl: Add PhysicalFontFace::GetName()". Per <https://harfbuzz.github.io/harfbuzz-hb-ot-name.html#hb-ot-name-id-t>, hb_ot_name_id_t is a typedef for unsigned int, and per its referenced <https://learn.microsoft.com/en-us/typography/opentype/spec/name> OpenType Name IDs are apparently uint16 values covering the whole value range (e.g., "Name IDs 256 to 32767, inclusive, are reserved for font-specific names"). We could thus presumably use something like std::uint16_t as the underlying type for NameID, but lets play it safe (and avoid potential data loss when casting from hb_ot_name_id_t to NameID) and simply use hb_ot_name_id_t as the underlying type. Change-Id: I50768c5ae6174500d959ba63fdbc15fe416f8777 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140301 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-20use O[U]String in TrueType codeNoel Grandin
instead of manual memory management Change-Id: Iccde191bfcfbf9ff2488205fffc12b94b46ab658 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-20ofz#51592 TimeoutCaolán McNamara
Change-Id: I8e3c80ae6d041fc1460807ec3869c4b6845116f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140227 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-20vcl: tdf#138325 pass PostScript name down to CreateCFFfontSubset()Khaled Hosny
If we don’t pass the name from the caller, it will try to read it from the CFF table but some fonts has CFF table without a PostScript name so we end up with a dummy value. Change-Id: Ie7c46cdf5542ce83a57b60dee35dbb704a898f18 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140220 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-20vcl: Add PhysicalFontFace::GetName()Khaled Hosny
Change-Id: I91cc7bd0b9c9ce8d59a31d17a354fb3f2be29499 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140219 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-20sw content controls: add a11y description for PDF exportMiklos Vajna
Acrobat Reader shows these descriptions on mouse hovering on a form widget. Change-Id: I8614222e46c992baca8a57b13a948f88973e8911 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140215 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-09-20Simplify a bit by using sal_uInt16 in vcl/BitmapPopArtFilterJulien Nabet
Since we're in the "if (bRet)" block, it means 22 bool bRet = isPalettePixelFormat(aBitmap.getPixelFormat()) 23 || aBitmap.Convert(BmpConversion::N8BitColors); is verified. isPalettePixelFormat implementation is: 29 constexpr bool isPalettePixelFormat(PixelFormat ePixelFormat) 30 { 31 assert(ePixelFormat != PixelFormat::INVALID); 32 return sal_uInt16(ePixelFormat) <= 8; 33 } So we know we're using 8 bits max and this line: pWriteAcc->GetBitCount() can't give more than 8 and we can safely declare nEntryCount as sal_uInt16 (idem for "n" just below) Since "nFirstEntry" and "nLastEntry" are related to "nEntryCount", idem for mnIndex they can also be sal_uInt16. Thanks to these, we can avoid all sal::static_int_cast<sal_uInt16> conversions. Change-Id: I8cac2d01f00be33c86058c7a6eb7b9e25fb2635e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140206 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-19loplugin:unreffun (clang-cl)Stephan Bergmann
...and with ScopedFontHDC::fsp gone, there appears to be no reason to keep ScopedFontHDC::m_aFSP alive for the whole lifetime of the ScopedFontHDC instance Change-Id: I1028bc24f49f3bbaf6e23c09aef4459418267154 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140100 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-19tdf#151052 set Windows darkmode "ToolTextColor" to same as "WindowTextColor"Caolán McNamara
they are the same in light mode, so do the same in darkmode Change-Id: Ib0186383fcd7f8d74c7ada6826c6955a747e4ecd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140195 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-19tdf#150992: fix crash popart filter to an SVG imageJulien Nabet
part of bt: 6 0x00007f018c80186f in BitmapPalette::operator[](unsigned short) const (this=0x5576a198fe48, nIndex=176) at vcl/source/bitmap/bitmappalette.cxx:139 7 0x00007f018c3d1fce in BitmapInfoAccess::GetPaletteColor(unsigned short) const (this=0x5576a2bbc520, nColor=176) at include/vcl/BitmapInfoAccess.hxx:121 8 0x00007f018c85b63f in BitmapPopArtFilter::execute(BitmapEx const&) const (this=0x7fffb7394728, rBitmapEx=...) at vcl/source/bitmap/BitmapPopArtFilter.cxx:73 9 0x00007f018c83e66b in BitmapFilter::Filter(BitmapEx&, BitmapFilter const&) (rBmpEx=..., rFilter=...) at vcl/source/bitmap/bitmapfilter.cxx:22 10 0x00007f01905e5bd4 in SvxGraphicFilter::ExecuteGrfFilterSlot(SfxRequest const&, GraphicObject&) (rReq=..., rFilterObject=...) at svx/source/dialog/grfflt.cxx:202 some gdb info (gdb) p nIndex $1 = 176 (gdb) p mpImpl->GetBitmapData().size() $2 = 34 full bt here: https://bugs.documentfoundation.org/attachment.cgi?id=182499 See https://bugs.documentfoundation.org/show_bug.cgi?id=150992#c2 for some comments the main thing that makes me think that the order is reversed is the "nLastEntry" treatment. Indeed with the current sort, mnCount with 0 come first nLastEntry = nEntryCount - 1 (unless there's no color at all) Change-Id: I3b89f2f4d6f115ea9f6752c49bad776a33f0b020 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140153 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-09-19vcl: Handle alpha in Type 3 glyphsKhaled Hosny
Change-Id: Ic21089ae8aeca1402fd5c4c46851dcd06a480723 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140146 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19vcl: Fix Type 3 glyph widthsKhaled Hosny
It seems we need the values to be in unscaled font units not PS units. Modify LogicalFontInstance::GetGlyphWidth() to return unscaled values when requested and the TT-to-PS conversion conditionally in PDFWriter. Change-Id: I94e7cdc0ecf842a0cf87fddaa4467966f698ae3d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140126 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19vcl: tdf#104403 PDF export for layered color fontsKhaled Hosny
Support color fonts using color layers from OpenType COLR table and color palettes from CPAL table. This uses PDF Type 3 fonts to wrap the layers into individual glyphs that can be drawn normally. Type 3 glyphs can use arbitrary PDF code, so here we output the layers in the regular font subset and then draw then in the Type 3 glyph with colors applied to them. This supports only version 0 of COLR table (solid colors only), the new but more powerful version 1 of the table is not yet supported. Change-Id: I4bf36f5b608a0ac15411104d8a6af893fb69a5c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140125 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19vcl: Add PhysicalFontFace::UnitsPerEm()Khaled Hosny
Change-Id: I9239085aabe450499193e74ac91d6a16437545c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140124 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19tdf#149797 Change highlight background color in some controlsIlhan Yesil
The highlight and highlighttext colors can be set for some controls. So as example a selected item in a listbox can now be paint with anothers colors then the standard blue. Controls are: listbox, combobox, edit field and some special edit fields like date, currency and others. Change-Id: Iace2dd9a1a61abb7819b6c81eb0b8030912db32b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136691 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2022-09-19vcl: Add PhysicalFontFace API to get color layersKhaled Hosny
Change-Id: Ic221582a04982f0b1565089fa0beff1b34a749d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140123 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19vcl: Don’t use temporary files for CreateFontSubset()Khaled Hosny
The callers pass a path to a temporary file for the function to write to, then they immediately read from it. This change cuts the unnecessary use of temporary files and passes the subset font data around instead. The CFF subsetting code really wants files and needs more invasive change, so it still uses a temporary files but this is hidden from its caller. Change-Id: I2a2117e967b76fb903ff0d32c435925049bc6e56 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140122 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-19Rename MouseNotifyEvent to NotifyEventTypeSamuel Mehrbrodt
Also contains keyboard and focus events, not only mouse events Change-Id: Iec1d6c341b01a489ba80fe9634ea3579afb02ea9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139970 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-09-18tdf#151039: use the same defaults also for FontSubsetInfo::m_aFontBBoxMike Kaganski
The defaults for "maFontBBox is not valid" case were already introduced in commit 2d1f08d63942666c0094904f50ba8c512ab69b9d Author Release Engineers <releng@openoffice.org> Date Thu Aug 27 12:02:29 2009 +0000 CWS-TOOLING: integrate CWS otf01 but it used the four elements of maFontBBox unconditionally in later calculations. Possibly that code path is untested, because unless the wrong size is greater than 4, it would always crash. Unfortunately, use of { 0, 0, 0, 0 } here (as Khaled proposed in the bug, for "garbage in, garbage out" principle) is impossible: the PDF with such data shows an error in Acrobat Reader: "The font contains a bad /BBox". As Khaled mentioned, a better fix would be to use the equivalent font extents from head table. Change-Id: I949db23d8af7c1fd4c2362655bf602eea0e70062 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140121 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-09-18use more string_view in utl::TempFileNoel Grandin
Change-Id: I151c66479053b9b5b7699a4938a622b4320aeaa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140104 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-17ofz: bump sc-rtf and html max lengthsCaolán McNamara
Change-Id: Id3400c686fefbf395e459ee9a654382bac87f141 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140102 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-17loplugin:staticmethods (clang-cl)Stephan Bergmann
Change-Id: I875b60fba5267e158ac85d1442133f1bd4bfe560 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140099 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>