summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2021-03-10Fix an OUString constructionStephan Bergmann
...introduced with 9d161857f1d4afcb772b477455797a2da0e47a9b "tdf#127471 correct EMF/WMF im/export for scaled font" Change-Id: I2b807e102ca7f71a61794f511dee302c7e509026 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111095 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit e0f2256b90fb30a5a7858f93c168d9da12061e70) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112221 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-03-10tdf#127471 correct EMF/WMF im/export for scaled fontArmin Le Grand (Allotropia)
If FontScaling is used, system-dependent data is held at vcl::Font Width(). Already if not scaled, we have three definitions: Width is zero, Width is equal to Height (unx) or - on Windows - Width equals avgFontWidth. If used it is W!=H where on unx Width equals Height multiplied with the scale factor. On Windows, this is Width multiplied with the only there existing avgFontWidth. Unfortunately that is ex/imported (since ever) undetected to EMF/WMF thus making EMF/WMF files containing FontScaling system-dependent - on which system was LO running when creating the file? The error can be seen when loading such a EMF/WMF on the vice-versa system, the FontScale is very ugly and wrong. Since EMF/WMF *are* Windows-specific formats the Windows-like definition is the correct one. This change makes all other systems export that now, and adapt on import to their system- specific definition (assuming coming from Windows). As can be seen, the difficulty is that these adaptions are necessary on non-Windows plattforms, but these do not have that avgFontWidth available. Thus I made a deep-dive investigation and multiple experiments to create a as similar as possible value to apply the needed calculations. For details and discussion refer to the bug description. Change-Id: I983fb6d882e2e8fccf9c8460f01509201d8157f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111000 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112089
2021-03-09tdf#116983 tdf#136175: retry if failedMike Kaganski
Debugging the test case from the latter bug report shows that indeed the call to OleGetClipboard may fail first time, as jasonkres had suspected in the former bug. So follow the suggestion in tdf#116983, and retry the failing calls several times in case of failure. Many thanks to Telesto for preparing a clear bug report with reliable test case. Co-authored-by: jasonkres Change-Id: Ib3c497da830bc5faac586bcfe1eededa54bfa117 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111825 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> (cherry picked from commit cf1c835e8016f8f1eefea6d625a913c0ac343a63) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112075 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-03-09tdf#127471 improve SVM FontScaling im/exportArmin Le Grand (Allotropia)
Due to svg::Font Width and it's expression of FontScaling being system-dependent the FontScaling when exchanging beween win-based SVM creators and others was creating errors. Corrected this to work now with newly created SVM files in both directions. For more aspects see discussion in task. Change-Id: I326e4e7e895a9dfc3cdfc5323174ca81e22795e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110330 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com> (cherry picked from commit 40b56cd8da8c38582dc4660b486993d1b4711535) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112088
2021-03-09tdf#138314 Change selected tab text color on macOS Big SurThorsten Wagner
Change text color of selected tabs starting with macOS 10.16 (not with macOS 11.0) to ensure compatibilty with macOS SDKs prior to 11 used within LibreOffice build process Backport of d8fc89cdfd0043838c4bc2d3b5a50bf5abfc6738 to LibreOffice 7.1 Change-Id: Ib2b7042878596271c194331eaab1915d11124210 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112105 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-08tdf#138122 Detect window scaling for multi display configurations on macOSThorsten Wagner
(1) Activate window scaling when at least one retina display is connected (2) Remove environment variable VCL_MACOS_FORCE_WINDOW_SCALING (3) Disable related unit tests unless bitmap scaling has been implemented Backport of 0c36f364b14aacd0eeb53087ae2fce54402dc741 and 06d918dcc47ae3f1c511cbdccfeacc8adb123f28 for LibreOffice 7.1 Change-Id: I20b075bf4e2927d62a04cd935e4496721b4c695d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112106 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-05actually restore the original HFONTLuboš Luňák
A mistake I made when fixing tdf#137122. Change-Id: Ie3a258de69e17d8cedb3bf722841af1054bd0fe1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111972 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 0087dc55121808a7fbf09cd94549b44dc17707dd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111927
2021-03-03tdf#140606 make PDF parsing more lenient and prevent a crashTomaž Vajngerl
If the external document can't be opened, it tried to continue with the export anyway, which eventually lead to a crash. This is fixed by handling this situation and prevent a crash, however the part of the document in this case isn't exported. The document couldn't be opened because of a parsing error - there was a unexpected null character instead of a whitespace, which made the parser panic. Fix this by making the parser more lenient in such a situation when there is an unexpected null and try to continue parsing. Bug document seems to be created with a buggy PDF writer, but other PDF readers don't complain when parsing the document so it looks to be a valid. qpdf --check doesn't complain either. Change-Id: I61eb281e821ccd195ef006d778556e25d1c7f5e3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111820 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 2c1ed5a5dad827cde032f27a4348e81be15889bc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111857 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-03tdf#140537 scroll-wheeling shouldn't affect disabled scrollbarsCaolán McNamara
Change-Id: I5d8659c7d431d35d628b12cebfe6a4b4f9cab9ef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111703 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-03-01generic Skia workaround for VCL sending empty size (tdf#140288)Luboš Luňák
There have already been commits to handle this, but the case of getting the wrong size the first was still broken (or was fixed in the past and got broken again). Try to be generic by forcing these to be always considered to be offscreen and force non-zero size there. Change-Id: Ie366a296f7f6645333630fa31e9fe18d54c7fba8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111528 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 9d8c04d2d5529626d649af3fcebb6d4b65193b28) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111711 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-01make sure Skia DWrite matches the given HFONT exactly (tdf#137122)Luboš Luňák
The problem appears to be that we use our private copy of the Dejavu Sans fonts, installed using AddFontResourceExW( FR_PRIVATE ), but that's not for whatever reason available for DirectWrite, which made CreateFontFromLOGFONT() find the system-installed Dejavu Sans, and if there was a difference between the two, then incorrect glyph ids were used. Use CreateFontFaceFromHdc(), which seems to match exactly. For private fonts this later fails the check with GetSystemFontCollection(), which would be nice to handle somehow, but I don't know how to get a font collection containing those fonts other than modifying SalFont to use DirectWrite API to install the fonts. Change-Id: I10d8fcb618f3b4decbb0198274331d7beaf843d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111522 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111773 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-01it's enough to have one Skia font managerLuboš Luňák
Change-Id: I5dd29178e1a1ec1081820912f49fd387eb3f822b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111521 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 9cd95b10936450b5d1d60319192c25c4aea05fa3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111772 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-22fix sporadic crash in sd_misc_tests on windowsNoel Grandin
we end up trying to process a timer message, but from inside the vcl de-init function, which means the timer stuff has already been de-initialised. Change-Id: I94703219754f1ccabd3065fc5ea437f39264197b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110397 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 14eff34dd10c047de222813eb16198b295b31d54) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111314 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-02-16always optimize bitmap transform to translate+scale if possible (tdf#138068)Luboš Luňák
Commit 828504974d70111e make OutputDevice::DrawTransformedBitmapEx() always call DrawTransformBitmapExDirect() in preference to explicitly converting to DrawBitmapEx() if the transformation wanted was at most translate+scale, in the hopes that these days the backend implementations work well enough. But it turns out only the Skia backend handles that without loss of performance. So always do the conversion to DrawBitmapEx() if possible. It's so simple that it possibly makes sense to always do this, regardless of the backend. Change-Id: I6eba68e672334c38433f53980f49400499f5d8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110716 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 9d89d98d3349502b56da4bdd6ea287ac4cde9ce5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110779 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-16tdf#140207 Qt downscale the ExtTextInputPosJan-Marek Glogowski
Qt reports the unscaled pixel values to the IM, so simply divide all values reported by SalEvent::ExtTextInputPos by the window's scale factor. This correctly positions the IM window on a scaled LO window. Change-Id: Ia639ee3e5fc0e47f7017896b34730bbda7f06a16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110945 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 41cffc379259fec626a282ca243a9750d96d1c63) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110915 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2021-02-15ImplGetTabRect(ImplTabItem*) variant always returns 0 with default argsCaolán McNamara
so TabControl::GetPageId(const Point& rPos) doesn't work since... commit 6540912ae1a570fd8c2318f77b757e07b87c0707 Date: Sun Jun 16 21:41:31 2019 +0000 VCL merge most of NotebookbarTabControlBase Change-Id: Ia99911e753dbe2bb22dc892c6bddc0392fab97a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110684 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-02-13tdf#140225 call cancel before destroying menubarCaolán McNamara
a) in case there are some menus open cancel them before removing their parent menubar b) before a GtkSalMenu is deleted clear the action-group of its members squash of... Related: tdf#140225 ignore activate/deactivate of a disposed VclMenu prep work for improved solution for tdf#140225 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110699 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Related: tdf#140225 when clearing pItemList, keep SalMenu in sync with their removal during menu teardown Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110703 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Resolves: tdf#140225 remove action when item is removed from GtkSalMenu and we have previously ensured that all items are removed by Menu::dispose before GtkSalMenu dtor is called Change-Id: I9ec59c52c72b8b58976a8ee41727ca7612ebf6b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110564 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-02-03tdf#139869 vcl: fix lazy-loading of BMP images with logic sizeMiklos Vajna
Regression from commit 7b355669c6ddeab2e6cec692d6afdff41c61d0fb (Function to load graphic swapped out (loaded on demand), 2018-04-14), the code assumes that the map mode and size of a graphic is the same when the image is not yet loaded and when it's loaded already. This was not the case for the BMP import, where ImplReadDIBBody() produced a map mode with scaling and MapUnit::MapMM as the map unit, while GraphicDescriptor assumed that the logic size is always MapUnit::Map100thMM. This resulted in SwNoTextNode::HasContour() using one map mode when the contour polygon is imported and an other one was used while renderin, effectively hiding the image. Fix the problem by extending GraphicDescriptor, so a format detector can opt in to provide its own map mode and size according to that map mode, this way the detector and the BMP import will create matching map modes and sizes, resulting in a visible image in the bugdoc. (cherry picked from commit ddc0714c40c6ea85336431a88b523f3e5c63a3f8) Change-Id: I71e786a4601c63f58da2e6ab9d7681ec6dd7b806 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110320 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-27NSApplication's appearance property exists in macOS 10.14 and later onlyTor Lillqvist
Change-Id: I12f586d91e40da130f59eeba3ab65e07eec088d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110013 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110015 Tested-by: Jenkins (cherry picked from commit 02bb41dd5197503d0d8b7d8be0a8cd220c0d1c85) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109988 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-01-27tdf#129180 Fix default paper size in the dropdownGabor Kelemen
Seems like a few calls to getJobPageSize() are necessary before the Page size list can get a correct value. This is why the problem appeared only on opening the dialog but opening/closing the printers Properties dialog fixed it. Thanks to Justin Luth for the idea! Note: for testing, change among paper sizes supported by the printer, e.g. A4, Legal and Letter. See also tdf#134646 Change-Id: I792139e274886c1b232ef97a4f1e800e6b32cf71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109655 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 3c85bf2af5ae2f7b180db8f8abf2d4e997491bb9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109979 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-27tdf#139609 avoid fetching unnecessary xid under gtk3Caolán McNamara
because of the side effects using a bare GtkGrid as m_pSocket in vcl/unx/gtk3/gtk3gtkobject.cxx is perhaps a poor choice, getting its xid causes poor side effects wrt events belonging to its child widgets getting delivered to the SalFrame widget, so duplicate scrolling after showing a opengl slide and/or showing a video and lots of flickering we're (generally at least) not using the xid under gtk3 so don't set it unless it's explicitly asked for. Happily the gtk Player::createPlayerWindow doesn't use its arg[0] xid in any case, so don't bother setting it for that backend. Change-Id: I1c59a607a332635091782c3b49de10647558f301 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109941 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> and... use an accessor for SystemEnvData::aWindow with an eye to making it on-demand Change-Id: If6cefd68a336dc6afe23591c857bd71034215b54 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109929 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110005 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-27Fix crash in ProcessEventsToIdle debug codeJan-Marek Glogowski
... and that code formatting is from clang-format. Change-Id: Ia73780f5f756a8c3493d27263347190289e4c953 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109999 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 0c7e8ef07fe9ba7ebc95fdeb5f58275decb4f0fc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109976 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-26Resolves: tdf#106484 Print Properties Device tab dropdown change not detectedCaolán McNamara
probably since... commit 07602e5a8b869be1c45158cf71d6015d17a5f797 Date: Wed Jun 24 17:31:32 2015 +0200 tdf#91362: Don't override printer page autodetection if printer settings haven't been modified Change-Id: I6a7cb7c7ae00d7d31defe7bc1d191a6bff3ff31c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109888 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-25drop RadioButton arg defaultsCaolán McNamara
the nBits arg in builder.cxx was in the wrong place Change-Id: Id4d0dd6919444cb39cf0d9e593f46d324f343a31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109682 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-22tdf#135590 rotated paper sizes reported as portrait size they are notCaolán McNamara
since... commit ff4896a2af1df6138e9246fe1588dfe8c3748f1a Date: Fri Jun 29 11:36:03 2018 -0300 Sets paper sizes listbox in print dialog see as the above commit added some uses of doSloppyFit to vcl I imagine the calls there want to be able to match rotated paper sizes, but in the cases of tdf#135590 we don't want that behaviour because it doesn't match what the user is presented with, the width and height are swapped. So drop matching against swapped height/width by default, but let calls added in 'Sets paper sizes listbox in print dialog' continue to match rotated sizes. Change-Id: I34aeddf12a7ca22234fbc6394487d3c8da7772ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109792 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-22RadioButton tick in a different place than CheckBox tickCaolán McNamara
since... commit 302a00a3190743f5e6d2b61e5b40e493c4744b7e Date: Thu Jun 6 17:14:53 2019 +0900 tdf#124947 fix hit area of the radio buttons, size in ios theme so under gen in tools, options, load/save, microsoft office the radio in export as: shading is much higher than the create mso lock file checkmark Change-Id: Ib057c0725352f6a178df006e92024fedf9b82b79 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109683 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-20Enable pasting of LINK data from the system pasteboard on macOSTor Lillqvist
Also add more documentation on how the flavorMap array works. The interesting thing is that the code stores anything you throw at it on the system pasteboard. But in another LibreOffice process, it won't accept types not mentioned in the array even if it as such is a type that other parts of the code would look for. Thus, adding the "application/x-openoffice-link;windows_formatname=\"Link\"" type to the array means that if there is such data on the system pasteboard (from an earlier or simultaneous run of LibreOffice), it will be pasteable also in a different LibreOffice process from the one that put it there. (While at it, order the FLAVOR_FOO variable definitions to be in the same order as their use in the array entries.) Change-Id: I913cc732e4dfb32d4b098505aa10806976db6326 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109384 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109472 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-20Fix handling of the OBJECTDESCRIPTOR clipboard (pasteboard) type on macOSTor Lillqvist
This fixes a demonstrable problem, and affects only macOS. This is also on the path towards fixing https://github.com/CollaboraOnline/online/issues/849 , even if the code touched here is for macOS only. The iOS pasteboard handling code is based on the macOS one. We need the pasteboard to have the OBJECTDESCRIPTOR type as a MIME type that includes the typename attribute, because the code in sc checks for that when it decides whether it is a proper OBJECTDESCRIPTOR. Simplify the data in the flavorMap array. No need to duplicate the same MIME type string as both the pasteboard type and MIME type, for those cases where the MIME type is used diretly as pasteboard type. We also know that for those types, the MIME type might have additional parameters, so be more lenient in checking. With this change, and my recent change to sot, this now works: Start LibreOffice. Open a spreadsheet. Select a cell range. (It can include formulas.) Edit > Copy. Quit LibreOffice. Start LibreOffice again. Open a spreadsheet. Edit > Paste. You get the very same cells that you pasted as such (with relative cell addresses in formulas properly adjusted, as expected). Previously, it would paste an image of the copied cell range, which is fairly pointless. There is still lots of opportunity for cleanup in the clipboard code for macOS and iOS. It is presumably rather pointless to put images on the pasteboard in Windows bitmap format, for instance. Just PNG should be enough. No idea why the code provides the TIFF pasteboard type for images. Ditto for Windows metafiles (WMF and EMF). It is also unclear how useful the EMBED_SOURCE or LINK_SOURCE types are on macOS, for instance. Change-Id: I573648480b03972b506203b4f470d513bcb81212 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109297 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109357 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-19tdf#139368 new database dialog doesn't have focus on start-center launchCaolán McNamara
the original issue all the way back of commit 82abd23f3ee1900b7579e5a0afa23581d5836f01 tdf#93317 Modified Document Dialog misses focus on Gtk3 eventuallly solved with commit 1092cc0c75f6d2ab649dd31b1db9f0a9f0944355 Related: tdf#100337 revert x-crossplatform ToTop... is possibly all redundant in the contemporary situation. Try using gdk_x11_display_get_user_time for X where the problem arises and leave things along in the apparently working wayland case Change-Id: Ia31b88e2760574e1d580d4bff509b06c07e5f0f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109585 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-18tdf#138122: Fix vcl for iOS after 1a167625314bf36b735176ed488e6ba9b5e9b675Tor Lillqvist
Make vcl compile again for iOS and make the Collabora Office iOS app work again when built against a master build of core. For now, keep the old versions of the functions touched by 1a167625314bf36b735176ed488e6ba9b5e9b675 in vcl/ios/salios.cxx, and move the modified versions to the new file vcl/osx/salmacos.cxx. Keep the functions as they were except that ifdefs for MACOSX or IOS are expanded. Keep the formatting as it was to make comparisons easier. Thus add the new files to the clang-format exclusion list. While at it, also move vcl/quartz/salgdiutils.cxx to vcl/osx as it is compiled only for macOS anyway. Change-Id: I990ef678f2263031d4a5af8cc547fffe185d17c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109480 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109501 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-18CGLayerHolder::getScale() can be constTor Lillqvist
(Will be required by upcoming bugfix.) Change-Id: I727b2b5f1035ae70d62d3c5339a814161e3ec92a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108663 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109494 Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-18tdf#138122 Add window scaling for retina displays on macOSThorsten Wagner
(1) Remove hack to make application look as if being linked against SDK 10.13 (2) Use quad storage size on virtual devices for displaying on retina displays thereafter (3) Apply workaround to downsample bitmaps from scaled layers (to be implemented) (4) Disable dark mode (to be implemented) (5) Provide new environment variables: VCL_MACOS_FORCE_WINDOW_SCALING: window scaling on non retina displays VCL_MACOS_FORCE_DARK_MODE: enable dark mode (macOS 10.14, iOS 13 and newer) VCL_MACOS_USE_SYSTEM_APPEARANCE: use light mode or dark mode (macOS 10.14, iOS 13 and newer) as configured by system preferences Change-Id: I99877cd62a98cb91bcbf27af62b043c31c5f5fc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109072 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109495 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-18tdf#138314 Change selected tab text color on macOS Big SurThorsten Wagner
Starting with macOS Big Sur, coloring has changed. Currently there is no documentation which system color should be used for selected tab text. As a workaround text color is changed for macOS Big Sur and newer only. Change-Id: I2e8c83527775c17f95e5e4afe70577442e14715e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109479 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109502 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-18tdf#138829 don't grab focus to roadmap label when sync timer firesCaolán McNamara
Change-Id: Icc8a03a2ce5d63f3a2c477671a9aa52aefd1df96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109351 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-17tdf#139643: fix missing PDF/UA flagJulien Nabet
Regression from: https://cgit.freedesktop.org/libreoffice/core/commit/vcl/source/gdi/pdfwriter_impl.cxx?id=a795886762a6a4aabd601183598c4e6c819bcb1f author Arnaud Versini <arnaud.versini@libreoffice.org> 2019-09-20 19:01:34 +0200 committer Arnaud Versini <arnaud.versini@libreoffice.org> 2020-02-08 15:03:07 +0100 commit a795886762a6a4aabd601183598c4e6c819bcb1f (patch) tree 93a58d738bf27a0c5f75f80dc7e651763916ee5f /vcl/source/gdi/pdfwriter_impl.cxx parent a2f62a861ba7036e689070c47f72214b1bdd49d4 (diff) Add minimum support for PDF/A3 here: sal_Int32 PDFWriterImpl::emitDocumentMetadata() { - if (!m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_UA) + if( !m_bIsPDF_A1 && !m_bIsPDF_A2 && !m_bIsPDF_A3 ) Change-Id: Id4b3b9a74ccf5a5abd9e7149cb09b3475dd4ffee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109399 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2021-01-17tdf#137695 shrink widget height below natural min within data browserCaolán McNamara
Change-Id: Iba3c12376200b7ce800b48155a4b84ca2e47d63f Change-Id: Iba3c12376200b7ce800b48155a4b84ca2e47d63f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109350 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-15tdf#138848 add truncate-multiline to all GtkEntries and GtkSpinButtonsCaolán McNamara
except for extensions/uiconfig/spropctrlr/ui/multiline.ui Change-Id: Ia2eca14332ffd4ac6e277c7529f17eca3ba29c0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109311 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-13tdf#139074: Revert "WIN replace clipboard update thread with Idle" et alStephan Bergmann
This reverts commit 9617bc9544cd569066ff187c3672a87fe28fe17f "WIN replace clipboard update thread with Idle" plus follow-up commits f5ab8bcbfd20ecce4a358f62ee3f81b8b968a5de "WIN don't notify clipboard change with SolarMutex" and c921f9bd64187823af2356d7a8ceb77444c17219 "Release solar mutex before using an apartment-threaded COM object". The Gerrit Jenkins Windows builds had started to abort after timeout for almost all builds now. Going back to before the youngest of the above three commits, c921f9bd64187823af2356d7a8ceb77444c17219 "Release solar mutex before using an apartment-threaded COM object" did not improve things (see the <https://gerrit.libreoffice.org/c/core/+/109100> "Test build #1, DO NOT SUBMIT" chain, where three out of three of the Gerrit Jenkins Windows builds timed out). But going back to before the oldest of the above three commits, 9617bc9544cd569066ff187c3672a87fe28fe17f "WIN replace clipboard update thread with Idle", does look promising (see the <https://gerrit.libreoffice.org/c/core/+/109155> "Test build #7, DO NOT SUBMIT" chain, where three out of three of the Gerrit Jenkins Windows builds succeeded). So the hope is that reverting all three commits brings back a green master, allowing us to understand and fix the actual issue later. Change-Id: Ie83ba742f216396b49f561d19c2cda7758740502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109158 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 694b400f56842cd29ad1a960853cde5aef91e4f0) Additional information regarding the backport to libreoffice-7-1: c921f9bd64187823af2356d7a8ceb77444c17219 "Release solar mutex before using an apartment-threaded COM object" was never backported to libreoffice-7-1 so this patch only reverts 9617bc9544cd569066ff187c3672a87fe28fe17f "WIN replace clipboard update thread with Idle" and f5ab8bcbfd20ecce4a358f62ee3f81b8b968a5de "WIN don't notify clipboard change with SolarMutex" in libreoffice-7-1 branch. The backport was done using gerrit's interface by Xisco Fauli and no conflict was found while cherry-picking it. However, this change wasn't backported: --- a/vcl/win/dtrans/WinClipboard.cxx +++ b/vcl/win/dtrans/WinClipboard.cxx @@ -91,9 +84,6 @@ CWinClipboard::~CWinClipboard() uno::Reference<datatransfer::XTransferable> SAL_CALL CWinClipboard::getContents() { - DBG_TESTSOLARMUTEX(); - SolarMutexReleaser aReleaser; - osl::MutexGuard aGuard(m_aMutex); so it was added manually. See https://gerrit.libreoffice.org/c/core/+/109115 Change-Id: Ie83ba742f216396b49f561d19c2cda7758740502 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109115 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-12Avoid assertion failure related to cursor sizes on macOSTor Lillqvist
No idea why this assertion failure started to show up now (at least when viewing a presentation slide show). Anyway, apparently the code needs to handle 256x256 cursors, too, and not just 128x128 and 32x32 ones. Apparently the assertion failure is caused by icon-themes/colibre/vcl/res/null.png. Sadly I don't really understand the code around here, but this commit gets rid of the assertion failure, and that is good enough for me for now. This problem was reported in a comment in the otherwise unrelated tdf#138122, and the assertion failure caused a hang, which is not good, reported as tdf#139535. That general problem is not fixed by this commit. Change-Id: I1390f00e03e0766d54969d9d62311a55da8e8945 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109083 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109164 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-11set fill color when filling alphavdev area for gradients (tdf#138959)Luboš Luňák
When drawing a gradient to an alpha-enabled output device, make the area also opaque (=black in the alphavdev). Change-Id: I2ba1a598e0bf6291e5422253352a201e224af2b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108806 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 41cabebf9c95459c2c1912528446c45e70c3f203) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108906 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-01-04tdf#138801 vcl: fix lazy-loading of GIF images with logic sizeMiklos Vajna
Regression from commit edda1e5fc8113aa4744e32f97c96a3cc311485ca (DOCX import: lazy-read images without external headers, 2018-04-20), the immediate problem is that GIF images from docx are now lazy-loaded. The deeper problem is that GIF images normally only have pixel size and can have an optional logic size as well (LO-specific extension). The bugdoc in question is a DOCX file, which contains a .png stream, which is in fact a GIF image, with that STARDIV extension in it. Now the initial parsing (that only extracts the metadata) didn't read the logic size, so the preferred map mode was pixels, but later when the actual read happened, the preferred map mode changed to mm100. Thid does not play nicely with writerfilter/ code that sets a different wrap polygon depending on if the (assumed to be final) map mode is pixels or not. Fix the problem by reusing the "is this an animation" GIF parser to also extract the logic size of the GIF image, if it has one. This way we still lazy-load the GIF image, but the preferred map mode won't hange from pixels to mm100 during the real read. Change-Id: Ia6c66e1c4fa0cb23a1daf537e7179b081ef90def Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108125 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit c24d9447b809416575972585a5ad48e14f8d9ad9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108182 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-02ofz#29113 short readCaolán McNamara
Change-Id: I107d8abeac419ba4e70a5880054c9195c60464ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108350 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-22left/top variable names don't match propertyCaolán McNamara
Change-Id: I3bca14652fba5a3aad9816417ac7f94b8651f3a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108012 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-21Fix reversed values for gtk_container_child_set (vcl/gtk3)Julien Nabet
Change-Id: Ie9597a72380d4c7fe0647a175febfccf362bd20f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108090 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-17WIN don't notify clipboard change with SolarMutexJan-Marek Glogowski
Regression from commit 52a7eb58f5c137b6de76cc49be07dd43c42a6d6c ("WIN replace clipboard update thread with Idle"). Previously the notification was done without the SolarMutex. Now it's run via an Idle and SolarMutex is required by the Scheduler, so release it. Foreign contents is again protected by the clipboard lock. And also unlock the SolarMutex in getContents, to prevent a deadlock in the clipboard STA thread, if it's already processing other request, like CXNotifyingDataObject::GetData, blocking on the SolarMutex. Change-Id: I6855b045b3065289ec7833498f6785ee31eda61c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107675 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit f5ab8bcbfd20ecce4a358f62ee3f81b8b968a5de) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107894 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-12-16tdf#138661 don't emit value-changed when not changed by userCaolán McNamara
in the FormattedSpinButton which is the standard mode for these signals and what the SpinButton does, and in this case the FormattedSpinButton is considered "modified" when it shouldn't be Change-Id: I26865e099c02fdd2745c41b347b7006d8560fb20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107710 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-16tdf#138950 allow up to one short read to not trigger cancelling importCaolán McNamara
Change-Id: Iedbfc344c311c40244ba2f58c56c62ac47584028 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107713 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-15tdf#138936 gradient missing under RTL from writer comment marginsCaolán McNamara
Change-Id: I57533f033f9528b7c89162967b392eb5abb4d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107702 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-13tdf#138857 fix font replacement table GUIJan-Marek Glogowski
- fix the get_text calls missed in tdf#136534, so combo box entry and table selection are synced again - unselect the table row, if the combo box entry doesn't match anymore the selected table row. - empty the combo box entries on multiple selection (allowd for mass delete only) - move the "apply replacement table" checkbox before the table - also change the comboboxes's sensitivity when toggling the "apply replacement table" checkbox. Change-Id: Ib509e46e3a468ece6ab20e6be41c04caec3265ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107642 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 579cf9548615e8535a0569a8eb4cdf325fbbbac7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107621 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-12-13WIN replace clipboard update thread with IdleJan-Marek Glogowski
Little "fallout" patch when moving code from /dtrans/** to /vcl/win/dtrans and merging CWinClipbImpl into CWinClipboard while I tried to reproduce tdf#62196... And since we now process the notification in the main thread, we can get rid of m_pfncClipViewerCallbackMutex, which brings us down from 6 (!) to 4 mutexes (if Mike counted correct) in the Windows clipboard code... ok, technically the scheduler / Idle adds its mutex to this count, but that is not related to the clipboard handling on Windows ;-) This also moves the UnregisterClassW into the OLE thread, which already calls RegisterClassW, to be more consistent. This now also gets merged, because it seem to fix a deadlocks when running CppunitTest_sc_macros_test in a loop, which is unclear where it comes from and I can't reproduce. Tinderboxes and Gerrit also still seem fine. Change-Id: Iacbda0bdf6c98f27f6e59964d541524cb45ade24 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107168 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 9617bc9544cd569066ff187c3672a87fe28fe17f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107622 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>