summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-10-04vcl: Fix thinko from recent commitKhaled Hosny
From: commit 29de4d6e1afcf2ad79056e4ad4403c3d4bdda4a0 Author: Khaled Hosny <khaled@aliftype.com> Date: Mon Oct 3 21:53:38 2022 +0200 tdf#150665: Fix justifying spacing marks Change-Id: Ic312db0080526e66b918d6ca9edb09c6a669e449 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140944 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-04vcl: Remove holes in GlyphItemFlags and make 8-bitKhaled Hosny
Change-Id: Iab83fbacab5232d34ea422183ae4bb4944686f54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140926 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-04tdf#150665: Fix justifying spacing marksKhaled Hosny
We shouldn’t be concerned whether a character is combining mark or not, what we really care about is whether the font classifies it as mark glyph, so check for that. Furthermore, for our purposes a mark glyph forms a cluster with the preceding glyph, so we can use IN_CLUSTER flag and drop the IS_DIACRITIC flag. This fixes the big above and a few other issues I found myself. Remove also overzealous asserts in pdfwriter, they are long past their usefulness. Change-Id: I7c87868a5c5877774bb42343079cad6e89380961 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140925 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-03tdf#151262 drop subpixel->logic pos assertsCaolán McNamara
which have served their bootstrapping purpose Change-Id: I04b832fde21e4932ed191d972737bee97510f53a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140903 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-03tdf#150786 use the same colors for pdf widgets regardless of themeCaolán McNamara
use StyleSettings::SetStandardStyles() Change-Id: Idf08872fabfe50cbc73091e17dd3ad7a4acc6715 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140900 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-03vcl: Drop redundant checkKhaled Hosny
The code already does the same check above. Change-Id: Ia9a9bd743235f888af1bb8ff2bd7f16e9776619e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140898 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-03tdf#112152: Fix subsetting empty glyphsKhaled Hosny
When traversing the components of composite glyphs, the code was treating a component pointing to an empty glyph (e.g. space) as an error, but it is not. An overzealous bounds check. Regression from: commit 41007842ed9bb5d6165792a197769f72dae55a2c Author: Martin Hosken <martin_hosken@sil.org> Date: Thu Sep 10 10:14:18 2015 +0700 Refactor graphite integration and update graphite Change-Id: Ie352f17cb08cd5762ff2a339662248a536b4e934 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140897 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-03use G_MAXINT to create an "invalid" path to use to unset cursorCaolán McNamara
Change-Id: I475a64ac3977bad716ce6f94a88ff02af37a932c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140847 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-10-01Unused constantsKhaled Hosny
Change-Id: Ic43a4e52b5ea40e54b368815e504840cb2c78aab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140845 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-01Unused includeKhaled Hosny
Change-Id: Ie6b2a0cebab375e8b66d5a9658dbb0cc03b8c704 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140844 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-01tdf#72456: Don’t cache macOS font listKhaled Hosny
The “system” font list is used for both actual system fonts and fonts we add with AddTempDevFont(), so the caching makes loading embedded fonts broken the first time the file is opened, requiring a next open without closing the application. The callers, I think, are careful not to call GetDevFontList() unless they really want to refresh the font list, so the caching is probably superfluous if not wrong. Change-Id: Ie14cc473a64425fd5270bc65ffd61dea2d873cfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140840 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-01Revert "Use libo_CHECK_SYSTEM_MODULE for eot"Khaled Hosny
This reverts commit ce54ba96f38b4af3aab1a7064078ee406eb021c6 and the followup commit 88c511981e31c73dced95b5dc3c200fdf2a4e932. Both effectively disabled enabling libeot support. See also: https://lists.freedesktop.org/archives/libreoffice/2022-August/089205.html Change-Id: I54780c69ca83b230b0c9b3b18065782fb5626da6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140838 Tested-by: René Engelhard <rene@debian.org> Reviewed-by: René Engelhard <rene@debian.org> Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-01tdf#72456: Support font embedding on macOSKhaled Hosny
With the previous commit, when we want the full font data we pass 0 for table tag. This does not work with CoreText’s CTFontCopyTable(), we we emulate it by using hb_face_builder to construct a full font from individual font tables. Change-Id: I0edb10982434872221466e9ec9ef9cd39087967a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140831 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-01vcl: Use PhysicalFontFace::GetRawFontData() for font embeddingKhaled Hosny
Change-Id: I6f7c4508f7cef022eaf65a998cb242078d3771c6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140826 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-01vcl: Remove unused AquaSalGraphics::GetRawFontData()Khaled Hosny
It was used for subsetting, but we switched subsetting to a more generic code path a while ago. Change-Id: I6066b7697268e9444587d73810f9465488aa4740 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140825 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-01vcl: Use a hb_face_t wrapper in TrueTypeFaceKhaled Hosny
We don’t need full access to PhysicalFontFace. This will be needed when we use hb-subset API for instantiating variable fonts. Change-Id: I2578525cd54167d01cd2748d5ac1900c607867a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140823 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-10-01Fix typoAndrea Gelmini
Change-Id: Ice3068f3b20c0f8a20e8b3c05ddf358b971f66ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140810 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-10-01Fix typoAndrea Gelmini
Change-Id: Ib547189e0f87f3e3a3096dd587127706474983cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140809 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-10-01vcl: Move TrueTypeFace where it is usedKhaled Hosny
No need to make it module public. Easier to modify it. Change-Id: I119381d463c8f176b355fc7df111011ae518b49d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140821 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-30vcl: Use LogicalFontInstance::GetScale()Khaled Hosny
Change-Id: I5f79fddd4e514c8224446e2327528002e9daa566 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140808 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-30vcl: Use the same underline sizes for overlinesKhaled Hosny
It makes no since to have overline of different sizes than underlines, and in fonts with big ascenders (like Amiri), we end up calculating much thicker overline than underline. Change-Id: I97e9818c94e815b2eb57813ab22329bc833fd34c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140804 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-30vcl: Use font’s underline/strike position and sizeKhaled Hosny
This respects the values set by font designer, which are usually better than the values we calculate especially for fonts with deep descenders (like Amiri). Old code is kept as fallback in case the font does not provide such values. Change-Id: I51a5147e4c6e006d1dcd13817ed21f0f62b47e97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140803 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-30vcl: Apply variations to font metricsKhaled Hosny
Use HarfBuzz API instead of reading the raw font table directly, since HarfBuzz will apply the font variations as needed. For non-variable fonts we still also use HarfBuzz font metrics API, but in a more fine-grained way to maintain backward-compatibility. Change-Id: If6b12a11ecb63356be92ef4f0714355ae77378f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140799 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-30use gtk_tree_path_new_from_string here too for consistencyCaolán McNamara
Change-Id: I5d4795fcaf20ae89c18ddb1d75ca93f078e0e3fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140798 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-30gtk_tree_model_get_iter: assertion 'path->depth > 0' failedCaolán McNamara
seen in format, cells in calc try an explicit depth Change-Id: I395563d2b412b2ca8839292296f9dad6db704620 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140797 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-30vcl: No need to get font face from GetNextGlyphs()Khaled Hosny
We can take it from the font instance. Change-Id: I54c507d498c58e271c479b0a615b165345a1c33b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140788 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-29ofz#51859 Integer-overflowCaolán McNamara
Change-Id: I985164aad4f0133c258d6bdb8a4f38a75c3f7edf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140736 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-29split utl::TempFile into fast and named variantsNoel Grandin
which makes it easier to know what each variant requires to stay on it's happy path Change-Id: I3275a2543573367714bc78092e882f6535507285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-09-27tdf#151187 don't check glyph substitute positionsCaolán McNamara
to see if they can be perfectly round tripped back to original application provided positions. This may have already served its purpose that there aren't unexpected gotchas and could be retired. Change-Id: Id30d00d0c1649c5d80d43b57887a6e6cfa8fb5be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140673 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-27sufficient at this point to silently allow MissingJustBulletCaolán McNamara
to not assert that there are unexpected glyph substitutions Change-Id: Ie4231c84fc1a509f86eac4242270c9e496bf7e35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140649 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-27tdf#150916 make unselect in combobox dropdown same as initially unselectedCaolán McNamara
a similar issue as seen in tdf#148197 Change-Id: I3848fe7b48f6148a5ae13d484c866953fed83c90 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140647 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-27Fix some headless window sizes on Windows, to make `make check` more reliableStephan Bergmann
...by making it more resilient against varying screen sizes. On my 2560x1600 Windows laptop, three `make check` tests systematically failed, and apparently all of them were caused by that larger-than-average screen (similar to what has been detailed in the commit message of 3db6a93c558c55eed085b4386228f9951bb08936 "Compute a better GetDefaultCenterPos"): * CppunitTest_sw_layoutwriter > test/source/xmltesttools.cxx:191:testTdf134298::TestBody > equality assertion failed > - Expected: 2 > - Actual : 3 > - In <>, XPath '/root/page' number of nodes is incorrect * CppunitTest_sw_ooxmlexport12 > sw/qa/extras/ooxmlexport/ooxmlexport12.cxx:526:testObjectCrossReference::TestBody > equality assertion failed > - Expected: Text 2 > - Actual : 2 * CppunitTest_sw_uiwriter2 > sw/qa/extras/uiwriter/uiwriter2.cxx:2702:testTdf122942::TestBody > equality assertion failed > - Expected: 2 > - Actual : 1 Those tests are all run with both SAL_USE_VCLPLUGIN=svp and --headless. But svp is only present on Linux and is thus ignored on Windows. And --headless, while preventing any windows from actually being shown, nevertheless uses the GUI code to set up window sizes. So the idea here is to hack the Windows backend in strategic places so that it uses "appropriate" window sizes in --headless mode to make `make check` succeed. The Linux svp backend has a single place in vcl/headless/svpframe.cxx where it hardcodes the number of monitors to 1 and the screen size to 1024x768. However, for the Windows backend, code determining and using those values is somewhat spread, but it turned out that there is one strategic place in ImplSalGetWorkArea that does what we want (without touching the reported number of monitors at all), without (it appears) negatively affecting other scenarios. (It appears that macOS, also not supporting an svp backend, is similarly affected. But it looks harder there to come up with such a strategic place to hardcode --headless window sizes, and at least my own macOS build's `make check` is unaffected as I use a default scaled 1829x1080 screen resolution there instead of the "raw" 3840x2160.) Change-Id: I822241f81497b9f6bed8e9688eddbe7d798c6b34 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140588 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-09-27tdf#144348: Remove EmojiOne Color fontKhaled Hosny
The EmojiFont setting is now a comma-separated list of the three common color emoji fonts, it should fallback to the next font if the first is missing. Change-Id: I7aa134f914ab829704e9b707f511f166a81a0089 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140623 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-09-26crashtesting: don't assert on bogus font name in embedded ttfCaolán McNamara
seen with kde156448-1.pdf, fontforge also warns about the fontname. Looks like the name starts in little endian (wrong) before switching to big endian and/or is initially out by one. 䄀爀椀愀氀-BoldItalic should have been Arial-BoldItalic Change-Id: I4cd9f8bc6bc70d6e9a91c24801629ba140a3b675 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140614 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-09-26jsdialog: send action not update for spin button valueSzymon Kłos
This will help us to reduce payload and fix bug where in Chrome regenerated spin field always focused "arrow down" button after click on the "arrow up". Use value from formatter - the same as generated in widget update JSON. Change-Id: I6ace90eb532e894daacb563bc9fb93332fd755ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138700 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Rashesh Padia <rashesh.padia@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140579 Tested-by: Jenkins
2022-09-26tdf#119788 tdf#117173 add accessibility NOTIFICATION roleJim Raykowski
and use it to make screen readers announce notifications from the 'Find and Replace' dialog Change-Id: Ifcf9304883e2e824ea1b7998d7767e474b87c8b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139709 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
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>