summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2022-11-25vcl: list the glyphs and bound rects of a specified fontChris Sherlock
Change-Id: Ia635d83a5d3dd257948777e9f6976fecfeb4ee98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141526 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-25hb_draw_funcs_t needs harfbuzz >= 4.0.0Caolán McNamara
Change-Id: Ic84fcee9034865de42f1018d2358c19c5bd9b463 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143276 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-25vcl,sw: PDF/UA export: add BBox to text frames tooMichael Stahl
Change-Id: I6d6663520c3946eabb9bbb184899b0c4420732d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143248 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-25tdf#57423 sw: PDF/UA export: Alt texts for SwNoTextNodeMichael Stahl
* Specification: ISO 14289-1:2014, Clause: 7.3, Test number: 1 Figure tags shall include an alternative representation or replacement text that represents the contents marked with the Figure tag as noted in ISO 32000-1:2008, 14.7.2, Table 323 This was broken by the previous commit, which tied ObjectInfoPrimitive2D evaluation to StructureTagPrimitive2D, and is restored now, perhaps less elegantly. * Specification: ISO 14289-1:2014, Clause: 7.7, Test number: 1 All mathematical expressions shall be enclosed within a Formula tag as detailed in ISO 32000-1:2008, 14.8.4.5 and shall have Alt or ActualText attributes Haven't checked but it's possible that this worked before commit 2840352ba56a212d191cc16e08378c87672d7b73 - for SwOLENode embedded objects, no ObjectInfoPrimitive2D is created apparently. Change-Id: Ia0077199601f39f666012d31883f63cff115716f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143247 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-25pdfium: reduce size if cannot create bitmapSzymon Kłos
In files with large pages it was rendering white, empty content. That was because bitmap creation in the PDFium failed. This reduces the size to possible value. Signed-off-by: Szymon Kłos <szymon.klos@collabora.com> Change-Id: I093a6aff94104cdc8223d7b8cbc00ff9217021b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143037 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143243 Tested-by: Jenkins
2022-11-24tdf#147906 used std::hypot for Pythagorean additionBogdan B
Change-Id: Ie835faef0d66a9a34b007fdea847eb0f54da9068 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143167 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-11-24Resolves: tdf#152157 show update icon on all menubarsCaolán McNamara
and not just the active one, so they are of a consistent height with eachother. BubbleWindow is only shown for the active one. Change-Id: I157c8c8b0e2a219c20ffde01ec4a04ba93b7f0e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143241 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24tdf#149140 vcl: PDF/UA export: Scope attribute exists since PDF 1.5Michael Stahl
(regression from commit dfffe710d07f84f4152cf61ccd4a69279a26ff7c) Change-Id: I12e077d857d25db9636f2a06f953616ae2d907bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143209 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-24tdf#146479 Use basegfx fTools for converting the angle unitLeonid Ryzhov
Change-Id: I6128262cb0572b267e232f7a647e1c68f5144e68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143047 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-11-24split RemoveBubbleWindowCaolán McNamara
Change-Id: I635bb587b7306bc5f5756a0c24260f10587cc4c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143226 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24-Werror,-Wunused-private-fieldStephan Bergmann
...after a80239ede3236c84d7a05d0fbc0f299811fee6c0 "vcl: move creating DWFontFace to WinFontFace" Change-Id: Idb913ff524d9a2f462e521eeb7bcfad57d388455 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143230 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-11-24relax glyph assert wrt layout equivalencyCaolán McNamara
as per: https://github.com/harfbuzz/harfbuzz/issues/3888 Change-Id: I6e5a36fd0a5f4a3ceb979372d0f5d53ee5f65b0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143218 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-24tdf#148435 - avoid strange OS/X deadlock around AnyInput.Noel Grandin
Apparently calling AnyInput on Mac and filtering for just input, gives you window creation / re-sizing events which then trigger idle paint events which then deadlock if called with the scheduler lock. So just don't do this optimisation. Change-Id: I2b518fba607815241d3bd60407cdf51a4357aef4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143200 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-24Remove some unused includesMiklos Vajna
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from UnoApiTest. Change-Id: Ifba307353a11a14e033a230a291314bee86b51c8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143190 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-11-24ofz#53673 Integer-overflow LogicWidthToDeviceCoordinate takes Long anywayCaolán McNamara
Change-Id: I840ad3242ce434e841cd4159c2e7f0b146168138 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143193 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-23tdf#108497: instantiate variable fonts in PDFKhaled Hosny
Draw the outlines as PDF Type 3 glyphs until we can use HarfBuzz subsetter to instantiate the fonts before embedding. Change-Id: I811eaa8f7e5875db2eeb3755d69616242e263ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142028 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-23tdf#152094 don't attempt scroll paint optimization for devices with a mapmodeCaolán McNamara
Change-Id: I446cf9ee62faf564143d25db60643c9b6cd8e3d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143188 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-23rename ImplScroll to ImplScrollCalendarCaolán McNamara
to avoid collision with Window::ImplScroll Change-Id: I16e72ff842054979733b5149cd220a7a77f79351 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143187 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-23UnoApiTest: factor out createTempFileXisco Fauli
Change-Id: I8d7bb4593839d3660b6609d836b09d50b68f5712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143141 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-23Avoid memory leak on PostMessageW failureMike Kaganski
In addition to leaking memory, the struct holds a couple of VclPtr, so would prevent destroying referenced windows. Change-Id: I258b5f32aca033a602d7b2805b33bd08ba637309 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143154 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-23ofz#53628 Use a progress monitor to avoid TimeoutCaolán McNamara
LJT-01-003 of https://libjpeg-turbo.org/pmwiki/uploads/About/TwoIssueswiththeJPEGStandard.pdf Change-Id: I834e0891c4bb91907750282a26b8b803f94b8fb0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143131 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22crashtesting: restore workaroundCaolán McNamara
for tdf119074-1.odt, while I have a strong memory of testing that it solved the problem, I know find that it doesn't. Change-Id: Id7fc800702c6a417810cba22f180d933d9fcd9b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143125 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22ReduceInaccurate(32) makes no sense for Fraction based on sal_Int32Mike Kaganski
Change-Id: Ia265f9f5e1151efae6d2b4cbb3c06f4ddbcc06e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143068 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-11-22Resolves: tdf#152155 use gtk's knowledge of relative widget positionsCaolán McNamara
rather than effectively emulate it poorly Change-Id: If1c215892645d83937d97158a2d3f8ddac10364e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143104 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22tdf#147021 Use std::size() instead of SAL_N_ELEMENTS() macroLeonid Ryzhov
Change-Id: Iec561daa71b17cedf0ea4cd2b473df9591a7bf3b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142900 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2022-11-22CppunitTest_vcl_filter_ipdf: inherit from UnoApiTestXisco Fauli
Change-Id: I326ba676730268808f60e0593a5e7f813b503977 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143097 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-11-22tdf#135638 drawinglayer,svx,sw: PDF/UA export: put SdrObjects on anchorMichael Stahl
... frame in the structure tree. The problem is that in sw, the anchored objects are painted outside of the call to paint the page frame, which is what generates the /Document structure element. For Writer fly frames, this is handled via their SwFlyDrawObj painting, where SwTaggedPDFHelper::CheckReopenTag() finds the anchor frame and temporarily sets it as the structure parent, even if it's on a previous page. But all the SdrObjects on a page are painted by 2 calls to PaintLayer() and there isn't a call back into Writer now. Somehow this even causes a spurious line like "/Document<</MCID 7>>BDC" to be emitted outside any PDF object, which looks clearly wrong. Try to extend the SdrObjUserCall to get a way to retrieve the anchor frame's structure element index. Another option would be to extend ViewObjectContactRedirector to return the PDF Id in its subclass SwViewObjectContactRedirector, and it seems possible since its only one caller is ViewObjectContact::getPrimitive2DSequence(), but Armin adivses that the ViewObjectContactRedirector might go away in the future so it's better to use SdrObjUserCall. It's annoying that the mapping is a static members of SwEnhancedPDFExportHelper; possibly it could be in OutputDevice's PDFExtOutDevData instead? Change-Id: Id61faae469aba4f0bd278ab2324aae06c1fdde64 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143027 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-11-22use an alternative macOS themeing approach to support dark-modeCaolán McNamara
checkboxes, radiobuttons and pushbuttons look decent, focus ring works editboxes work, focus ring doesn't for some reason, so faked that in spinbuttons work list and combo boxes work scrollbars work, though with some degree of overly complicated fakery tabpanes and tabcontrols work sliders work progress bars work disclosure butttons in listtrees work a dark mode icon theme is automatically selected under dark mode Change-Id: I4835c7639f725a0154288440fcad400f618438e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141435 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22move workaround out of GtkInstanceExpander ctorCaolán McNamara
and into the builder so get the same result if there was an explicit expander instantiated or not Change-Id: Ia5af8de81d6fa0780cf507f565c6819e16cde43c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143093 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22ofz#53586 Out-of-memoryCaolán McNamara
Change-Id: I4442f6b6cd010706ccfded454e4c56b4ff001dbc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143077 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: Id18265f8d6470870730ffdc9ad879ef99f120aae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143056 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: If460dd5bfcab290e41513a47257c0de37757eb2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143059 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: I7ec467f46e0fac2655990a67bc4e78e39fdb489a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142931 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: I7ff944967188567ae00e09357fe83b8c3e639dcb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143060 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22drop newly unused FreetypeFontInfo::IsMicrosoftSymbolEncodedCaolán McNamara
Change-Id: I88098a212aa43a0942b3f5d1ad1ac985c4d4a1a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143019 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22ofz#53401 TimeoutCaolán McNamara
Change-Id: I929006b2b993fde110fb4d7d72fd6b1e6c146066 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143075 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: I2651182be3f06666686930996834559001e114c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143057 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: I894e3a67b9312b99ac2fd7290dfa73a0dafb28a7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142932 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: I1e542a5fce00e1c07019a828a7f45f1b7d2fe7c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143054 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: I20add5a23520c54425174959b4757720639413e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143055 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: I64a379e62e63e92fb7093df71f3ccd99a8cd69b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143058 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22tdf#143148 Use pragma once instead of include guardsBogdan B
Change-Id: Ifa8ad8539ad2fb828b45b9242b9e8196c48f5a74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143061 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2022-11-22loplugin:unusedfieldsNoel Grandin
Change-Id: Idaf9742358bcd485d6ac96593844b05bf0972fa7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-11-21add some checks for OpenSymbolCaolán McNamara
Change-Id: I98e1ee9f854d144cea3a305be6d53f8e86f6a7a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143020 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-21fix a comment typoCaolán McNamara
Change-Id: I6497222d5fcb29d51fb3ac70a57d09593b27fd26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143043 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-21vcl: fix accessing color font colorsKhaled Hosny
Don’t unconditionally access palette 0. Change-Id: I3de3f005371fcb9360ee0cf245a1d0a7434ffbd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143042 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-21Revert "vcl: test getting glyph boundary rect from LogicalFontInstance"خالد حسني
This reverts commit 0cef06f0a2c0963e8c1579b78975710e6af4471c. Reason for revert: https://gerrit.libreoffice.org/c/core/+/141234/comments/89325e55_2271cfe8 > Stephan Bergmann: > > I saw the unrelated <https://gerrit.libreoffice.org/c/core/+/143026/1> fail its Jenkins <https://ci.libreoffice.org/job/gerrit_windows/140750/> build on tb88-win with > > C:/cygwin64/home/tdf/jenkins/workspace/gerrit_windows/vcl/qa/cppunit/logicalfontinstance.cxx(53) : error : Assertion > Test name: VclLogicalFontInstanceTest::testglyphboundrect > equality assertion failed > - Expected: 51x82@(7,-80) > - Actual : 50x82@(7,-80) Change-Id: Idc4132adbaf0b051dcf955f3f1e7c44841c60117 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142928 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@aliftype.com>
2022-11-21tdf#143209 vcl: track partial scroll deltasJonas Eyov
this makes scrolling in calc smoother and makes left/up scrolling the same speed as right/down scrolling, which was previously not the case. prior to this change, Window::HandleScrollCommand only checked each event for being a large enough scroll to advance one unit. this happened in lcl_HandleScrollHelper by way of o3tl::saturating_cast, which meant that nonzero upward/leftward scrolls were always worth at least one unit, while downward/rightward scrolls needed to be larger than 1 to count. now, we accumulate partial scroll offsets in WindowImpl and perform a saturating cast on the absolute value, so behavior is symmetric and sensitive to accumulated small scroll values. this feels smoother and is more correct. Change-Id: Id3692d14edd45ed26f2952e3418e4d82806e1fc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142948 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-21drop FT_Select_CharmapCaolán McNamara
khaled: "I think this is probably a no-op now as we don’t call FT_Get_Char_Index anywhere (since mapping characters to glyphs is handled by HarfBuzz now). I think the whole symbol font concept might be no-op as HarfBuzz will internally use the symbol cmap subtable if the font has one and we don’t need to (or can) influence this." last use of FT_Get_Char_Index was removed with commit 23c5125148a8110d88385b29570bf0b7d4400458 Date: Thu May 10 15:46:06 2018 +0200 Use HarfBuzz to get Kashida width Change-Id: I0c0b008fa8b8b1e10125cc2aa10b9f079df795d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143018 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-11-21remove FontAttributes::meCharSetCaolán McNamara
its baked in that Symbol means RTL_TEXTENCODING_SYMBOL, so accept that status quo and make it explicit Change-Id: I78d90965e3d6b4543cd74a7847e13246485380d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143010 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>