summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2021-04-20Adapt CPPUNIT_ASSERT to C++20 deleted ostream << for sal_Unicode (aka char16_t)Stephan Bergmann
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html> "char8_t backward compatibility remediation", as implemented now by <https://gcc.gnu.org/ git/?p=gcc.git;a=commit;h=0c5b35933e5b150df0ab487efb2f11ef5685f713> "libstdc++: P1423R3 char8_t remediation (2/4)" for -std=c++2a, deletes operator << overloads that would print an integer rather than a (presumably expected) character. But for simplicity (and to avoid issues with non-printing characters), keep printing an integer here. Change-Id: I751b99ee32d418eb488131ffa130d6f7d6d38dc7 Reviewed-on: https://gerrit.libreoffice.org/84348 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 5d8f0fad50f90195a11873c70ddab4644f5839ea) Conflicts: cppu/qa/test_any.cxx svl/qa/unit/lockfiles/test_lockfiles.cxx sw/qa/extras/ooxmlimport/ooxmlimport.cxx sw/qa/extras/rtfexport/rtfexport4.cxx sw/qa/extras/uiwriter/uiwriter.cxx
2021-04-20Adjust various unit tests past-backportsThorsten Behrens
Change-Id: I44fac2793a62a8cd33b0d5c8b28c1db726960a77
2021-04-13vcl pdf tokenizer: fix handling of dict -> array -> dict tokensMiklos Vajna
Needed to be able to parse the /Reference key of signatures. (cherry picked from commit 056c1284d6a68525002c54bef10834cc135385db) Conflicts: vcl/qa/cppunit/filter/ipdf/ipdf.cxx Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8f46af565680bef0ff8ca32781e6d813a7446543) Change-Id: I6b81089a3f58a2de461ad92ca5a891c284f8686a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107084 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2021-04-07xmlsecurity: handle MDP permission during PDF verifyMiklos Vajna
(cherry picked from commit 586f6abee92af3cdabdce034b607b9a046ed3946) Conflicts: include/vcl/filter/PDFiumLibrary.hxx vcl/source/pdf/PDFiumLibrary.cxx xmlsecurity/source/helper/pdfsignaturehelper.cxx Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105785 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 00479937dc071246cc27f33fd6397668448a7ed9) Change-Id: I626fca7c03079fb0374c577dcfe024e7db6ed5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107085 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2021-04-07vcl pdf tokenizer: fix handling of dict -> array -> dict tokensMiklos Vajna
Needed to be able to parse the /Reference key of signatures. (cherry picked from commit 056c1284d6a68525002c54bef10834cc135385db) Conflicts: vcl/qa/cppunit/filter/ipdf/ipdf.cxx Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105626 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 8f46af565680bef0ff8ca32781e6d813a7446543) Change-Id: I6b81089a3f58a2de461ad92ca5a891c284f8686a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107084 Tested-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2021-04-07xmlsecurity: pdf incremental updates that are non-commenting are invalidMiklos Vajna
I.e. it's OK to add incremental updates for annotation/commenting purposes and that doesn't invalite existing signatures. Everything else does. (cherry picked from commit 61834cd574568613f0b0a2ee099a60fa5a8d9804) Conflicts: include/vcl/filter/PDFiumLibrary.hxx vcl/source/pdf/PDFiumLibrary.cxx xmlsecurity/qa/unit/signing/signing.cxx Change-Id: I4607c242b3c6f6b01517b02407e9e7a095e2e069
2021-04-06xmlsecurity: detect unsigned incremental update between signaturesMiklos Vajna
(cherry picked from commit 7468d5df5ec79783eae84b62bdc5ecf12f0ca255) Conflicts: vcl/source/filter/ipdf/pdfdocument.cxx xmlsecurity/source/pdfio/pdfdocument.cxx Change-Id: I269ed858852ee7d1275adf340c8cc1565fc30693 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99480 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-04-06pdfium: only init pdfium library once and destroy on LO exitTomaž Vajngerl
With more and more usage of PDFium, it is hard to keep track of the life-time of the PDFium library, so it can happen that a FPDF_DestroyLibrary happens when we still have another instance where PDFium is still use. The result of this is a crash. To prevent this, just initialize the library once and delete, when on LO exit. This can be improved in the future to only keep the library active when in actual use. [ Leaving out the vector graphic search bits, the motivation is to just have this in libreoffice-7-0, so that recent pdf sig verify improvements can be backported. ] (cherry picked from commit 067a8a954c8e1d8d6465a4ab5fb61e93f16c26c2) Conflicts: vcl/source/graphic/VectorGraphicSearch.cxx svx/source/svdraw/svdpdf.cxx svx/source/svdraw/svdpdf.hxx vcl/Library_vcl.mk vcl/qa/cppunit/pdfexport/pdfexport.cxx vcl/source/filter/ipdf/pdfread.cxx Change-Id: I5c7e5de7f8b97d10efb394c67c7a61b976c8d57c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102317 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit b7de766b4dc5b4810277069bcf53a9f3737e87da)
2021-04-06pdfium: only init pdfium library once and destroy on LO exitTomaž Vajngerl
With more and more usage of PDFium, it is hard to keep track of the life-time of the PDFium library, so it can happen that a FPDF_DestroyLibrary happens when we still have another instance where PDFium is still use. The result of this is a crash. To prevent this, just initialize the library once and delete, when on LO exit. This can be improved in the future to only keep the library active when in actual use. [ Leaving out the vector graphic search bits, the motivation is to just have this in libreoffice-7-0, so that recent pdf sig verify improvements can be backported. ] (cherry picked from commit 067a8a954c8e1d8d6465a4ab5fb61e93f16c26c2) Conflicts: vcl/source/graphic/VectorGraphicSearch.cxx Change-Id: I5c7e5de7f8b97d10efb394c67c7a61b976c8d57c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102317 Tested-by: Miklos Vajna <vmiklos@collabora.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit b7de766b4dc5b4810277069bcf53a9f3737e87da) Conflicts: svx/source/svdraw/svdpdf.cxx svx/source/svdraw/svdpdf.hxx vcl/Library_vcl.mk vcl/qa/cppunit/pdfexport/pdfexport.cxx vcl/source/filter/ipdf/pdfread.cxx
2020-08-05Revert "tdf#134646 Remove "nearest paper matching" feature"Samuel Mehrbrodt
This reverts commit 1864add19d0703bb9e4588961ee1cb3a1aa6e15c.
2020-07-13tdf#134646 Remove "nearest paper matching" featureSamuel Mehrbrodt
This was introduced with da62b0feb684b34ab191fb0f03ed5432c14cba97 to find the best paper size for user defined page sizes. However, this leads to problems with Impress: Slides have screen sizes which have no relation to paper sizes. For the slide site "Screen (16:9)" the page size "Executive" is the nearest matching size. However, this paper is (though supported by printers), very uncommon. We do not want the nearest matching paper size the printer supports, but rather we want to fit the slide on the printer default paper. Note that finding a matching print paper still works (and it even has some fuzzy matching), so some sort of "nearest paper matching" still exists, (but with sane limits). Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98396 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 3cfc390ecd7c7e9095c77383c460c522437bdabe) Change-Id: Ie60023d64b251954aa50e8bbdd36f6a290b9f278
2019-10-09tdf#124391 Fix doubled menu in global menuSamuel Mehrbrodt
Regression from 3bedbfd9b3cee5a8d2da6ee0486859bd725979ba Change-Id: I56473a2b0620f90f23b1bcde3ae1290801021038 Reviewed-on: https://gerrit.libreoffice.org/80465 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-09-05tdf#127189 FreeType <= 2.8 will fail to render stretched horizontal brace...Caolán McNamara
glyphs in starmath at a fairly low stretch ratio. The failure will set CAIRO_STATUS_FREETYPE_ERROR on the surface which cannot be cleared, so all further painting to the surface fails. This appears fixed in 2.9 with https://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=91015cb41d8f56777f93394f5a60914bc0c0f330 "Improve complex rendering at high ppem" Change-Id: I8cbf8347ccd29beda4057b14f2e68678f6030bf4 Reviewed-on: https://gerrit.libreoffice.org/78590 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-08-29tdf#126007 tdf#122355 online help won't look into a dialog notebookCaolán McNamara
when the focus is on the help button, offline will through the help fallback route, but online will just fire and forget and let the server side do a fallback, which can't know what the current notebook page was. so bodge it to look at the notebook page right from the start if there is one and its the help button itself which starts the request Change-Id: Ida1d3101d838d99639dda12c438414c16b1ccda5 Reviewed-on: https://gerrit.libreoffice.org/77550 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-08-19Resolves: tdf#126951 crash in custom slide showCaolán McNamara
on selecting entry 0 which doesn't exist Change-Id: I67656bed63f9055bc6c5dd5781e79f967996500d Reviewed-on: https://gerrit.libreoffice.org/77560 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 5d3e9ababc0b3e049a7556b210bb6349e3e3322c) Reviewed-on: https://gerrit.libreoffice.org/77696 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-08-14tdf#124700 don't pull from or insert into cache for PixelSnapHairlineCaolán McNamara
Change-Id: I7ca0f556164b6bc462cee3c5532733dbd6b68a2b Reviewed-on: https://gerrit.libreoffice.org/77457 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Jenkins
2019-08-14tdf#126808 vcl: fix crash due to leaking the frame's buffer vdevMiklos Vajna
This vdev is used to do vcl-level double-buffering, which is off by default, but e.g. listboxes/comboboxes use it to avoid flicker with Windows GDI. The root cause was introduced in commit ea5e83abcfa1406c401b8a1ec91efda65373b74b (tdf#92982 vcl: stop creating/disposing the paint buffer in PaintHelper, 2015-07-30), which removed the explicit mpBuffer.disposeAndClear() in the PaintHelper dtor, but forgot to explicitly dispose it elsewhere. This is now a much more visible problem since commit d4714b0fdb81e6e561ae526cc517ecc9a40a603e (tdf#101978 vcl combobox/listbox floating window: avoid flicker, 2019-06-17) as the infrastructure is used for all list/comboboxes. Fix the problem by explicitly disposing the vdev before deleting the frame data, so the underlying GDI resource is released, even if we have a reference cycle. Change-Id: Ia217bbd78780a214308e497044e73e378ee8ecd6 Reviewed-on: https://gerrit.libreoffice.org/77370 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit e71093c0bc52426647a9d3a41ac0643bbc6cb0c6) Reviewed-on: https://gerrit.libreoffice.org/77395 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-08-13Resolves: tdf#122358 ensure right/bottom borders are included in damage regionCaolán McNamara
a simple safely backportable expand of damage region by one pixel Change-Id: If4d226d8546d55b00172d826c8816b09b55d54ef Reviewed-on: https://gerrit.libreoffice.org/77209 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-07-11kde4: Add missing include to fix buildMichael Weghorn
Fixes this build failure as reported e.g. by tinderbox [1]: In file included from /usr/include/c++/7/bits/locale_conv.h:41:0, from /usr/include/c++/7/locale:43, from /usr/include/c++/7/iomanip:43, from include/com/sun/star/uno/Any.hxx:27, from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/XInterface.hpp:9, from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/Exception.hpp:8, from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/uno/RuntimeException.hpp:8, from workdir/UnoApiHeadersTarget/udkapi/normal/com/sun/star/lang/XTypeProvider.hpp:8, from include/cppuhelper/compbase.hxx:25, from vcl/unx/kde4/KDE4FilePicker.hxx:22, from vcl/unx/kde4/KDESalInstance.cxx:20: /usr/include/c++/7/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = SalVirtualDevice]’: /usr/include/c++/7/bits/unique_ptr.h:268:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = SalVirtualDevice; _Dp = std::default_delete<SalVirtualDevice>]’ .../vcl/unx/kde4/KDESalInstance.cxx:70:107: required from here /usr/include/c++/7/bits/unique_ptr.h:76:22: error: invalid application of ‘sizeof’ to incomplete type ‘SalVirtualDevice’ static_assert(sizeof(_Tp)>0, [1] https://tinderbox.libreoffice.org/cgi-bin/gunzip.cgi?tree=libreoffice-6-2&brief-log=1562787602.2042 Change-Id: I1da444b80447ec8896ff9898684ee14fd3933b18 Reviewed-on: https://gerrit.libreoffice.org/75381 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2019-07-09KDE4 create KDESalGraphics based X11VirtualDeviceJan-Marek Glogowski
In the spirit of commit 5ee408eb4c9f ("tdf#125673 KDE5 implement a KDE5SalVirtualDevice"), this might help with KDE4 graphics problems, like the ones mentioned in tdf#126272. Change-Id: I50875b69e1c1494803f08746bfc3b99a57e36414 Reviewed-on: https://gerrit.libreoffice.org/75281 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-06-29tdf#125606 Qt5 directly show tooltips + respect the help areaJan-Marek Glogowski
I'm not sure why this redirection was implemented, which also ommited the provided help area. I tried hard to use vc::Window code in the beginning, but that also mirrors the cursor position for the window. Using Qt here is simply straight forward, so just do that, Reviewed-on: https://gerrit.libreoffice.org/74548 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit ab5f341efd144adb6b7d0e00fece76a2153acd10) Reviewed-on: https://gerrit.libreoffice.org/74571 (cherry picked from commit e3988fa785c0430ae708527cbc5a7baa6d9d55a6) Change-Id: Ia8c4efc1e43b915c4b071ee26d4da37d7580817c Reviewed-on: https://gerrit.libreoffice.org/74854 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-06-28Resolves: tdf#126134 EndDialog on disposed dialogCaolán McNamara
Change-Id: I079fb2bb786b66b843e8e3960643cf2db6387c79 Reviewed-on: https://gerrit.libreoffice.org/74823 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Tested-by: Michael Stahl <Michael.Stahl@cib.de>
2019-06-25tdf#126054 uses after free when menubutton and menu torn down during executionCaolán McNamara
Change-Id: Ib79da121941863421bc12afa27e27cdd7e2e81e3 Reviewed-on: https://gerrit.libreoffice.org/74697 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-25Resolves: tdf#125168 label mnemonic appearing in database urlCaolán McNamara
Change-Id: I39531ae2a656c16c7355d73b76cb918d3535f7b0 Reviewed-on: https://gerrit.libreoffice.org/74604 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-06-21tdf#125670 just check gradient clipping on drawingJan-Marek Glogowski
Otherwise the gradient won't be commited to the Metafile, as mbOutputClipped will be true, because the output device will have just one pixel size. Reviewed-on: https://gerrit.libreoffice.org/73423 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 710f3c63af2d8bee7d5e860614145799a3f0e491) tdf#125777 restore old RenderContext before return Related: tdf#125670 avoid possible performance issues for the general case but retain recording of gradient to metafile 6acf23675414983bd07639703f43aa934c0a48ed 5efde15f1c192b15fe647362803442ac947b63de Change-Id: Ia0c6569a28f2aa1a8f0e051b61d429e0ab23ef97 Reviewed-on: https://gerrit.libreoffice.org/74507 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 6047d537b5ea8f13f7e8d4739621c866af1d13fb) Reviewed-on: https://gerrit.libreoffice.org/74515 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-18tdf#125921 Qt5 set WM_CLASS for top level windowsJan-Marek Glogowski
Uses the same naming then the gtk3 backend, i.e. "libreoffice" for the instance name and different class names for the module windows, like "libreoffice-writer". These names are referenced in the desktop files a StartupWMClass and for example used to pin an app to the task bar. Change-Id: Ic9b8890536f6413ab59d2e0da866e2280ab3181a Reviewed-on: https://gerrit.libreoffice.org/74014 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 77a3c443d35c7d966217f02ea9189cb1819c7828) Reviewed-on: https://gerrit.libreoffice.org/74082 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 1a1e13333e8145c7a78ddb23b540b0832cadd446) Reviewed-on: https://gerrit.libreoffice.org/74193
2019-06-18KDE5 move screensafer inhibiting code into Qt5Jan-Marek Glogowski
There will presumably be more X11 specific code later to implement some "fix" for tdf#119202. Moving the screensafer inhibitor is rather uncontroversial in comparion, so start with it and use it to carry the matching configure.ac changes. A little "nightmare" are all the clashing X11 / Qt type undefs, but I couldn't find a better solution while the inhibitor continues to include the X11 headers in it's header. Reviewed-on: https://gerrit.libreoffice.org/74015 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit b5323c72ff7e5bcde34089e49fe98e589dcc5acb) Change-Id: I55c89c76726d30a890178488484e954207267e89 Reviewed-on: https://gerrit.libreoffice.org/74081 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit 9c37c306158267d942a0a1debc3845db1c923ceb) Reviewed-on: https://gerrit.libreoffice.org/74192
2019-06-17Resolves: tdf#125883 if old and new text will be the same don't change itCaolán McNamara
that way the cursor and selection is left alone Change-Id: Id6efa7e2fe27f031761271fd591de7a73a1f6963 Reviewed-on: https://gerrit.libreoffice.org/74160 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-17tdf#121486: Correct scale of broken fonts on WindowsKhaled Hosny
Some fonts have negative tmAveCharWidth which makes no sense (fonts can't have negative glyph width, so the average can't be negative) and it would cause our code to apply negative scale to the glyphs of these fonts making them drawn on the flipped horizontally. Fix this by using the absolute value so it is always positive. Change-Id: I731e7aad80dae734847679a1b08c6ac78111e16c Reviewed-on: https://gerrit.libreoffice.org/74109 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> (cherry picked from commit 8fffb56940c6eb81674000cdb718edc79603a6c5) Reviewed-on: https://gerrit.libreoffice.org/74123 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-06-15Qt5 move and init static m_ActiveDragSourceJan-Marek Glogowski
Change-Id: Iab82151b8d1a8281c9999983b9de5f35dfb0442e Reviewed-on: https://gerrit.libreoffice.org/74013 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 5195c5bcd8be5f3b183659ead272cd86b8774cc1) Reviewed-on: https://gerrit.libreoffice.org/74091 (cherry picked from commit bf1a7feb2b871409e61512b8faf415fc87d4c631) Reviewed-on: https://gerrit.libreoffice.org/74096 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-06-14tdf#92079 vcl: fix missing image background on dialog from basicMiklos Vajna
Regression from commit e5bb5c52aeaeb60c8592b004efd88c30242e03a1 (add RenderContext to Window::PushPaintHelper, use Erase correctly, 2015-05-18), the problem was the unconditional ApplySettings() call in the direct painting case. It's not clear what was the intent of that addition, since vcl::Window::ApplySettings() is virtual, and the default implementation is empty. But at least the Dialog subclass sets the background there, leading to the loss of the original bitmap background. Fix the problem by explicitly restoring the old background after ApplySettings() at least in the bitmap case. (Wallpaper is copy-on-write, so no problem to make a copy before ApplySettings() unconditionally.) (cherry picked from commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1) Change-Id: I89768a1331f9dc1ea4508336723484d112156338 Reviewed-on: https://gerrit.libreoffice.org/74023 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 4046b51e6f6bd31b0188d9c00273a1761254a9d6) Reviewed-on: https://gerrit.libreoffice.org/74034 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2019-06-14tdf#125673 KDE5 implement a KDE5SalVirtualDeviceJan-Marek Glogowski
We just need AcquireGraphics() to return a KDE5Graphics. Otherwise the BufferDevice's SVP will use a SvpSalGraphics instead of the KDE5Graphics, which knows about Qt's theming. Reviewed-on: https://gerrit.libreoffice.org/73673 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 2cb6a591b643a0f65dc58f060f60cc707ad3589c) Reviewed-on: https://gerrit.libreoffice.org/73722 Change-Id: I0ea646df260f2067d61c753f03dee01a003f382a Reviewed-on: https://gerrit.libreoffice.org/73963 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2019-06-13tdf#125591 DOC import: lazy-load metafiles with explicit sizeMiklos Vajna
Regression from commit 69b62cfcbd364d7f62142149c2f690104b217ca1 (tdf#125281 DOC import: fix size of lazy-loaded metafiles, 2019-05-27), the problem is that setting the preferred size of a Graphic swaps it in. Avoid this by extending ImportUnloadedGraphic(): if a size hint is provided, then that will be used instead of info from the graphic descriptor (which is usually only meaningful for bitmaps). This way we maintain the correct size and we're back to lazy-loading metafiles from binary MSO files as well. (cherry picked from commit acb803b730f2c6bd82e39beab58949ec14f85eb0) and: CppunitTest_sw_ww8import: disable failing assert on Windows It fails only sometimes, it's yet clear why. (cherry picked from commit b5d624c4af1085d4670149e9c1d280da7bc9add0) Change-Id: Ide12d12166110e98ea47b5347dd24fb203b22da3 Reviewed-on: https://gerrit.libreoffice.org/73961 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-06-13tdf#125550 vcl menu bar / floating window: fix text colorMiklos Vajna
Regression from commit e8d5b8beb5958147235ff955ed38c47b51d860ff (tdf#113714 vcl menu bar window: avoid flicker, 2019-05-20), the problem was that a freshly created VirtualDevice doesn't have the default text color, so we need to initialize that explicitly based on the render context text color. Also introduce a BufferDevice to do this initialization, instead of fixing this in MenuBarWindow::Paint(), then copy&pasting the fix to MenuFloatingWindow::Paint(). Change-Id: Ib171cd52e7cabe0bc3c639821f558d8303039fe6 Reviewed-on: https://gerrit.libreoffice.org/73269 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 42bf893a8479f70d7d8f00e03105ce15e8545f8b) Reviewed-on: https://gerrit.libreoffice.org/73314 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Michael Weghorn <m.weghorn@posteo.de>
2019-06-13tdf#125692 SalObject always holds a SystemChildWindowJan-Marek Glogowski
Let's just face reality and store it as a VclPtr. And this is needed, because Qt, like VCL, uses deferred deletion, and has no way to filter events to QObjects out of its event queue easily. This way the qt5 plugin can report focus changes for SalObjects without a crash, which happens when you close a presentation with a video by click. And in addition it reverts the workaround introduced in commit e770bacc85a0 ("Qt5 workaround modal change after show bug"), as it seems this bug is a use-after-free error, introduced by LO. Thanks Michael Weghorn for catching that! Maybe someone should also rename SalObject... Reviewed-on: https://gerrit.libreoffice.org/73567 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 2dc6bdd1d5789ace0500cad90f5d2eb930888bb9) Reviewed-on: https://gerrit.libreoffice.org/73921 Change-Id: I0bc64ea64f95dfc7a838799c4a04de183adfefcf Reviewed-on: https://gerrit.libreoffice.org/73962 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
2019-06-13Qt5 correctly hide menu bar in tabbed modeJan-Marek Glogowski
Change-Id: I179780c2df5637b8a28c3a77b829319b1a64845b Reviewed-on: https://gerrit.libreoffice.org/73924 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 9758b9b6e52e8e8a8a5cc24b51d62a853a3def82) Reviewed-on: https://gerrit.libreoffice.org/73926 (cherry picked from commit 221f27433900490e2b00bd4ed6957ab36ecadb33) Reviewed-on: https://gerrit.libreoffice.org/73927 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-06-13Revert "tdf#120836 KDE5: Clipboard: don't put images to clipboard"Luboš Luňák
My previous commit has disabled setting non-text for selection, so this workaround is no longer needed (and it very much looks like a workaround, I see no good reason for never putting images in the clipboard). This reverts commit c8b0c382c6330865df50ae7cf7360c8a2c08ebe6. Change-Id: I0206211e3ff0adcb89f8ca5410831a428e71fb51 Reviewed-on: https://gerrit.libreoffice.org/72370 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com> (cherry picked from commit 0d58f51d7672c569c93c6e814dbfffa586eebfb7) Reviewed-on: https://gerrit.libreoffice.org/73929 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-06-13do not add non-text to PRIMARY selection in VclQt5ClipboardLuboš Luňák
E.g. tdf#80853 repeatedly sets the selection, which results in the entire document getting converted to html. Other VCL backends seem to be even faster, it looks like they convert the data only on-demand, but this at least makes things bearable. Change-Id: Ib08423bd89d7c7065ad0522338979f1ce66701c7 Reviewed-on: https://gerrit.libreoffice.org/72369 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 294d4ed6aab4ae6dbf859626545cf6d75194bacd) Reviewed-on: https://gerrit.libreoffice.org/73928 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-06-13Qt5 implement SalSurface support for cairoJan-Marek Glogowski
Current qt5+cairo uses the plain VCL canvas. This patch is just a copy of Gtk3Surface (minus comments) with a different update call. This way the Cairo path now uses the Cairo canvas instead. It fixes at least tdf#122668 for me, but other Impress bugs might be fixed this way too. Reviewed-on: https://gerrit.libreoffice.org/72921 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Aleksei Nikiforov <darktemplar@basealt.ru> (cherry picked from commit 86cab846c1a122dd4dd5f5c4ca5750a0fc397c6b) [This also squashes the backport of commit cc237438f6d1c7ee3a391b51402aaa71cd347b6b ("qt5: Make it compile with '-Werror=shadow'") in to the same commit.] Change-Id: Iba511c851001753328293c28e53eaa4acc4315d0 Reviewed-on: https://gerrit.libreoffice.org/73198 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-06-12Resolves: rhbz#1719378 wrong signature for GtkGestureLongPress::pressedCaolán McNamara
Change-Id: Ib4c47189d5c9c89433f0c7de194ebb9777dc7bac Reviewed-on: https://gerrit.libreoffice.org/73831 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-06-10Revert "tdf#108687 vcl: always enable tabstop on radio buttons"Justin Luth
This reverts LO 6.2 commit f2cd1c3c7cce2699d1341f726fc90cf30b52612c because it caused regression tdf#125609. There are places where radio-groups are not properly defined, and things are a big mess. So reverting to previous behaviour for 6.2 stable. This can be a fairly serious regression, because the value of the radio buttons can change just by tabbing around. Leaving the commit in place for master/6.3, so that a proper solution to all problems can be developed and tested. Change-Id: I3c71e47934c9d979d1cb22e56535f7ea3b33130c Reviewed-on: https://gerrit.libreoffice.org/73618 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-07Qt5 make Qt5Widdget's frame a private referenceJan-Marek Glogowski
Kind of a regression from commit 4d382636b0b1 ("qt5: Add basic a11y support"), which made it public for a single call. Change-Id: I631a861a98388223770cfca2704c3ddee6a0a8a0 Reviewed-on: https://gerrit.libreoffice.org/71836 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 8c71d28069acffa2d4590a4acf95a98d1415b563) Reviewed-on: https://gerrit.libreoffice.org/73650 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-06-07tdf#124694 gtk3 GtkFixed takes the max size of all its children...Caolán McNamara
as its preferred size, causing it to not clip its child, but grow instead to match Change-Id: I57f740177aae619d11966f5382a6cc5f7a964be3 Reviewed-on: https://gerrit.libreoffice.org/73170 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-06-06Resolves: rhbz#1712823 prefer help strings to a11y strings when availableCaolán McNamara
Reviewed-on: https://gerrit.libreoffice.org/69934 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit b70053ba681a9b62afd6fa700ad94256d98d8dc7) Change-Id: I50b36f697b8dd9ff8108392d48a7050702edbfbe Reviewed-on: https://gerrit.libreoffice.org/72880 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-06-05Qt5 use precise timer to prevent unneeded restartsJan-Marek Glogowski
We just have one driving timer. Not much to sync with. Gets rid of these annoying scheduler restart messages. The idea of coarse, synced timer events sounds nice to have, but LO currently can't handle it in a sensible sense.. Change-Id: I169c2bb582aca0e03b00e24dc364ac9b19162c3b Reviewed-on: https://gerrit.libreoffice.org/73392 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 677db60166106e33bc2329f868f96cf2fb85f11b) Reviewed-on: https://gerrit.libreoffice.org/73411 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> (cherry picked from commit f85d99ede4054876f608819e808c9b03c6a03481) Reviewed-on: https://gerrit.libreoffice.org/73464 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-06-05tdf#107487 fix font fallback for non-BMP characters.Mark Hung
Non-BMP characters use two sal_Unicodes. It is necessary to advnace with OUString::iterateCodePoints safely instead of nCharPos + 1. Change-Id: Iea1005f05421b1021a9b3ff611439357d4dcba9e Reviewed-on: https://gerrit.libreoffice.org/73326 Tested-by: Jenkins Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> (cherry picked from commit 16faad3657fad114aa984f92a14a5f212a2f8ff5) Reviewed-on: https://gerrit.libreoffice.org/73537 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-06-05tdf#124694 gtk2 GtkFixed takes the max size of all its children...Caolán McNamara
as its preferred size, causing it to not clip its child, but try and grow instead to match Change-Id: Ibea269d475a4b35a43b6cab2ab432a830d8ff1ff Reviewed-on: https://gerrit.libreoffice.org/73174 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-06-04tdf#125506 tdf#121241: only use rObjectToDevice if neededXisco Fauli
Use same logic as in vcl/unx/generic/gdi/gdiimpl.cxx Reviewed-on: https://gerrit.libreoffice.org/73319 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit 93477d1a963e38e3319013e43835a8ffef200972) Reviewed-on: https://gerrit.libreoffice.org/73328 Change-Id: I7a7a8c4b3355f5621ba1603939a3757cd03e7777 Reviewed-on: https://gerrit.libreoffice.org/73396 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-06-03tdf#122200 Qt5AccessibleWidget: Handle special offset valuesMichael Weghorn
Handle special values for offset in 'Qt5AccessibleWidget::attributes' the same way that the base class's 'QAccessibleTextWidget::attributes' does, s. [1]. In particular, an offset matching the text length can be passed e.g. by "accerciser" or screen readers, which previously resulted in an 'IndexOutOfBoundsException' being thrown when the index was later checked in the call to 'VCLXAccessibleStatusBarItem::getCharacterAttributes'. See also 'IAccessibleText::attributes' documentation at [2] and the page on special offset values referenced there [3]. [1] https://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/accessible/qaccessiblewidgets.cpp?h=5.12.4#n791 [2] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible_text.html#a29e5c8f69ec13c683ed6bca53333e6a5 [3] https://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/_general_info.html#_specialOffsets Change-Id: I623995aeb689b31c5b49fb3ace8e4dd4c18927d2 Reviewed-on: https://gerrit.libreoffice.org/73225 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 93c81657c6111b4bb97a2bb9ec155465f9a6f523) Reviewed-on: https://gerrit.libreoffice.org/73379
2019-05-31tdf#124484: resize slideshow window so it spans all displaysKatarina Behrens
Change-Id: I55b4ab8ec5059110525c5194e1133c65bbd07fec Reviewed-on: https://gerrit.libreoffice.org/73183 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> Reviewed-on: https://gerrit.libreoffice.org/73257 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>