summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2018-01-23Various loplugin in --enable-gtk3-kde5 codeStephan Bergmann
Change-Id: I006e7fddcb58edb597867e0dd6f2b81ddac3457e
2018-01-23tdf#69254: Tweak mapping from CoreText weight to our FontWeight a bitTor Lillqvist
Make the mapping of light weights more likely to hit different enum values for slightly different weights. We want to be able to distinguish between for instance Overpass Light (with weight -0.4) and Overpass ExtraLight (with weight -0.5). Change-Id: If83fbce68149b267a49ef9bcb6624d8790de7c56 Reviewed-on: https://gerrit.libreoffice.org/48409 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2018-01-23Various loplugin in --enable-gtk3-kde5 codeStephan Bergmann
Change-Id: Ic12464f01950a5037bb6819a2722aba5a7e3e2e6
2018-01-23Support opening of (some) remote URLs through the KDE file dialogMilian Wolff
LO already supports http, https, webdav and webdavs through the WebDAVContentProvider. Ftp is supported via FTPContentProvider and then finally we have the GIOContentProvider that can potentially support SMB, if the dependencies for that are met. We now configure the KDE file dialog to allow these remote protocols. Note that this filtering depends on https://phabricator.kde.org/D10024 and https://phabricator.kde.org/D10025 to have any effect. Then we rewrite the URLs we receive from KIO to a format that is supported by LO. Most notably, we prepend `vnd.sun.star.` to the webdav URL schemes, such that they get picked up by the WebDAVContentProvider. Then finally, we clear the username from the smb:// URLs we get from KIO, as that prevents GIO from opening them. In all cases, the user will get prompted a second time for the credentials required to access the remote resource. This is unfortunate, but better than nothing. In the future, we may solve this issue through either a separate KIO UCP or by getting support for the FDO Secret Service specification in KWallet. Change-Id: I91df28434b115639c2698968e2a672b3320bf8e2 Reviewed-on: https://gerrit.libreoffice.org/48350 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-23Introduce gtk3_kde5 vcl pluginMilian Wolff
This is a hybrid plugin which mostly wraps the GTK3 vclplug. Only the file and folder picker are replaced by KDE dialogs. This gives us a well-maintained GTK LO base with basic KDE integration with minimum effort. To prevent issues with nested event loops, the KDE dialogs are launched from a separate process, the new lo_kde5filepicker helper executable. A trivial stdin/stdout IPC mechanism transfers the data between LO and the Qt/KDE helper. The usage of an external process also allows us to copy'n'paste between LO and the KDE file dialog without freezing the UI, as would happen when one would do this in-process. This is in general also the architecture applied by the kmozillahelper, which is used to integrate KDE file dialogs into Firefox. While the KDE dialog is shown, the GTK3 main window is disabled and close requests are ignored. The KDE dialog in turn also sets the LO window as transient parent. Together, this makes the illusion perfect and the KDE dialog behaves like a modal dialog. This works properly also with multiple LO main windows, and only individual windows will get blocked as one would expect. Functionality wise, most of the features of the KDE4 dialog are supported. You can pick files and folders, and save files under a new name. Some custom checkbox widgets are supported, but lists, buttons and preview widgets are not yet implemented. Also, loading remote files via KIO is not possible yet. Change-Id: I1a97cf7c272307a19ace4222d5f12253bc722829 Reviewed-on: https://gerrit.libreoffice.org/47718 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-23Band aid fix build --with-kde5Katarina Behrens
Change-Id: Ifbcfdbb74bffaf88296351ec72536e16a4073b60 Reviewed-on: https://gerrit.libreoffice.org/48102 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-23Extend build system to support linking against KDE Frameworks 5Milian Wolff
Pass --enable-kde5 to autogen.sh to enable this feature. Then add kde5 to the list of externals to link against KF5. I will introduce other code that depends on KF5 though which will leverage this feature. Change-Id: I17e434a53ac769000b0f805b1f41cdc5c2c84ee2 Reviewed-on: https://gerrit.libreoffice.org/47715 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-23The CT prefix is used by the CoreText APITor Lillqvist
Surely we should not be using it for our own things in our Quartz code, that is misleading. Also bin a silly typedef. Change-Id: Ie932e8784128246ca449608aad3dc96a575ec9d5
2018-01-23new loplugin: pointerboolNoel Grandin
look for possibly bogus implicit conversions to bool when passing (normally pointer) args to bool params. this plugin comes in the wake of a couple of bugs caused by refactoring, where some of the call sites were not currently updated. Of the changes, the following are real bugs: desktop/../dp_persmap.cxx StartInputFieldDlg in sw/../fldmgr.cxx which occurred as a result of commit 39d719a80d8c87856c84e3ecd569d45fa6f8a30e Date: Tue May 3 11:39:37 2016 +0200 tdf#99529 sw: don't pop up input field dialog before inserting field CSerializationURLEncoded::encode_and_append in forms/../serialization_urlencoded.cxx XclExpCFImpl::XclExpCFImpl in sc/../xecontent.cxx I have no idea how to properly fix this, just made a guess. SwDocTest::test64kPageDescs in sw/qa/core/uwriter.cxx which looks like a simple copy/paste error. Change-Id: I795ebd5ef485a1d36863dc27fe13832989f5a441 Reviewed-on: https://gerrit.libreoffice.org/48291 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-23its defineresource not define resourceCaolán McNamara
regression from commit 64d624b65124ac02d8ee59b135593fd9d8eb9067 Date: Sat Jan 9 22:55:28 2016 +0100 Fix typos Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Change-Id: Ifdf45e97b81523c84c73b93d14ed75b7b6909f77 Reviewed-on: https://gerrit.libreoffice.org/48355 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-23tdf#112153: Set button theme properlyTelesto
Change-Id: I0665880c0d0348fcbb3bcf04d9172405c8e31eb7 Reviewed-on: https://gerrit.libreoffice.org/48334 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-01-23tdf#114985: Tell NSWindow to never use automatic window tabbingTelesto
Based on https://codereview.chromium.org/2325313002/ Change-Id: I8838449d57b1d1b010491a405c87645d38199fdf Reviewed-on: https://gerrit.libreoffice.org/48330 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-01-23tdf#114460 vcl: handle nested parentheses in PDF roundtripMiklos Vajna
The roundtrip of the pdf image failed due to this. Change-Id: I88a9657e242dd2659f9bf06233e5fcbfeb43ceb5 Reviewed-on: https://gerrit.libreoffice.org/48362 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-23EPUB export, fixed layout: add chapter names to the navigation documentMiklos Vajna
Extend vcl::PDFExtOutDevData so that it's possible to use it outside the PDF export; this way the EPUB export can know which chapters start on which page. This means fixed and reflowable layout has the same table of contents, instead of just Page <N> in the fixed layout case. Change-Id: I935fb23c66ec747431b91e83b0e677d4e5f704b9 Reviewed-on: https://gerrit.libreoffice.org/48332 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-23More loplugin:cstylecast on WindowsStephan Bergmann
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-22ofz#5573 Out of memoryCaolán McNamara
Change-Id: Ifb5cfdd87d7b26d18fcb66279afa7ef06beea9e3 Reviewed-on: https://gerrit.libreoffice.org/48323 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-22loplugin:redundantcast (clang-cl)Stephan Bergmann
Change-Id: If1a5289ce346fa94f7aa8080a50572d6f9cade53 Reviewed-on: https://gerrit.libreoffice.org/48314 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-22Presumably misplaced castStephan Bergmann
...that was originally introduced as int intRadius = (int) radius + 1.0; in 05363527d84119c6759cdd638c76b041f2aa67b7 "Separable Gaussian Blur and Unsharpen Mask filter", and presumably was meant to cover the whole right-hand- side addition, not just "radius". Change-Id: I3c14f4055e74e3e4dcccbddce060a86f9bcc23f0 Reviewed-on: https://gerrit.libreoffice.org/48005 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-22tdf#109062 restore osx scrollwheel logicCaolán McNamara
to pre commit f7d2bf216afa10268e6a7c1d4613a2fd8f7c7f3c Date: Tue May 16 10:12:09 2017 +0100 Resolves: tdf#103174 & rhbz#1367846 improve gtk3 trackpad scrolling state. Change-Id: If5a494441731e73136158b4905c2744ba8bc8875 Reviewed-on: https://gerrit.libreoffice.org/48249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-22C++17 deprecated std::shared_ptr::unique()Michael Stahl
Most of these calls are in assertions, and the ones that aren't should be guarded by SolarMutex, so the thread safety concerns that caused unique() to be deprecated don't look relevant, so use use_count(), which oddly enough isn't deprecated. Change-Id: Ia166615af6c3ce85145c391752669c7461bd35fb Reviewed-on: https://gerrit.libreoffice.org/48222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-22improve RTL detection in TextEngineNoel Grandin
the ubidi_getLogicalRun call returns a direction bool in bit 0, so the old code would only have been correct for embedding level 0. found by an up and coming loplugin. Change-Id: I56658981fbd32caf0d961d47d76b668f1dd1b680 Reviewed-on: https://gerrit.libreoffice.org/48261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-21uitest: add checked to radio button propertiesMarkus Mohrhard
Change-Id: I7e5a3f4b743029fc1a8ee01d9a4ab6ea49f9b73c Reviewed-on: https://gerrit.libreoffice.org/48274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-01-21Make the condition more obviousMaxim Monastirsky
No need to look at possible enum values each time. Change-Id: I3191ab08d91c8f954ecfb027f1ab26b25a021f14 Reviewed-on: https://gerrit.libreoffice.org/48258 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-01-20tdf#115023 Check mpControlData for nullptrMaxim Monastirsky
Control::ImplClearLayoutData happens to be called post dispose, but Control::dispose already destroyed mpControlData. So put back the nullptr check that was removed in e8b49f09074fe184374bee5062715357427ae044 ("new loplugin: useuniqueptr: vcl"). (But IMHO it's odd that we even try to send lose focus events to disposing windows. So maybe it would make sense to replace the "! pOldFocusWindow->IsDisposed()" check inside Window::ImplGrabFocus with "isDisposed()" which comes from VclReferenceBase, and set much earlier?) Change-Id: Iddaf7e05d6cb56c28a34884876770753fcf7179e Reviewed-on: https://gerrit.libreoffice.org/48246 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-01-20Resolves: tdf#115106 don't assume fullscreen is impressCaolán McNamara
writer can too, so revert this part of commit 277395b6266c57a7709c3c47986f135f6789c8e7 Author: Caolán McNamara <caolanm@redhat.com> Date: Tue Jun 13 18:09:08 2017 +0100 make opengl transitions under X flicker free on enter/leave which should restore matters to its former glory, at this point gtk3 opengl transition support now works so it all moot to me now. Change-Id: I78a8a774aead6482d0541575dbf10ad977ceccc0 Reviewed-on: https://gerrit.libreoffice.org/48207 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-20WB_NOPOINTERFOCUS can be added after the button is createdMaxim Monastirsky
Change-Id: I3f06aa8ea4edb981d201210b783c4624ffd68d16 Reviewed-on: https://gerrit.libreoffice.org/48175 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-01-20More loplugin:cstylecast on macOSStephan Bergmann
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Iff4877e8a42804c952c48c13332caf0a83c92870 Reviewed-on: https://gerrit.libreoffice.org/48216 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19loplugin:redundantcast (after loplugin:cstylecast, macOS)Stephan Bergmann
Change-Id: I4b40f768ec6b0e42e91d7a6af6d5c23a94ab9e9d Reviewed-on: https://gerrit.libreoffice.org/48192 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19new loplugin:emptyifNoel Grandin
Change-Id: I1092115a0ceb3a5e6680a4b724b129f98a892c42 Reviewed-on: https://gerrit.libreoffice.org/48128 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-19vcl osx: fix decimal separator key when localizedWard van Wanrooij
If you use OS X and an international locale (e.g. Locale setting: Dutch (Netherlands) and select Decimal separator key: Same as locale setting (,) in Preferences/Language Settings/Languages using the decimal separator key on the numeric keypad still results in a '.' instead of the expected ','. Tested and confirmed using latest LO build on 10.11.6 and 10.12.6 using both the wired and wireless Apple keyboard. The cause for this is that the decimal separator key sends a KEY_POINT (like the regular . key on the alphanumeric part) and the code expects a KEY_DECIMAL for the decimal separator key. Fixed by changing the combination of KEY_POINT and mask NSNumericPadKeyMask to KEY_DECIMAL. Change-Id: Iaf1ecf538c3e1a49ad512851cf16dd4dd991cb06 Reviewed-on: https://gerrit.libreoffice.org/45362 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-18Include android/compatibility.hxx from ubiquitous sal/config.hStephan Bergmann
...instead of having to add it to more and more individual .cxx files, as the need arises. Change-Id: If1e893c79abf1c1bb7fb7b89dcb9bd423a7f1b94 Reviewed-on: https://gerrit.libreoffice.org/48108 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-18Don't allow tearoff under WaylandMaxim Monastirsky
as floating toolbars aren't movable there. Change-Id: I543344946f02d5a336ff738b4d6d9f9b21c595e9 Reviewed-on: https://gerrit.libreoffice.org/48096 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-01-18Move toolbars to the border window tearoff mechanismMaxim Monastirsky
and remove the one from ImplPopupFloatWin. Implemented using the FloatWinTitleType::TearOff case, which was unused otherwise. Change-Id: I82a86e5f5897ce1f2e76a2404bb382cbc007700c Reviewed-on: https://gerrit.libreoffice.org/48095 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-01-18tdf#115057 Never use ImplPopupFloatWin for anything except ToolBoxMaxim Monastirsky
ImplPopupFloatWin draws the window title and frame directly on the client window, which is incompatible with .ui layouts, as they try to occupy the whole available space. Instead just use a plain FloatingWindow whenever possible, and change the border window code to mimic the behavior of ImplPopupFloatWin, wrt removing part of the frame of toolbar popups w/o a title. Change-Id: If72ea89e31f913470faad7fcb8083f9b9787c9a8 Reviewed-on: https://gerrit.libreoffice.org/48094 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-01-18lok dialog: enable MessageDialog tunnelingHenry Castro
Change-Id: I05b270a19e29c5ed3a2482fd8163e61e66bfdf74 Reviewed-on: https://gerrit.libreoffice.org/47772 Reviewed-by: pranavk <pranavk@collabora.co.uk> Tested-by: pranavk <pranavk@collabora.co.uk>
2018-01-18Fix typosAndrea Gelmini
Change-Id: Iaad78e5f1100df1ca69d34bf7693e4a9feac17eb Reviewed-on: https://gerrit.libreoffice.org/48084 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-17coverity#1427627 'Constant' variable guards dead codeCaolán McNamara
Change-Id: I1b286dbacdcff35baf7c7802eec85859ae8e78c2 Reviewed-on: https://gerrit.libreoffice.org/48052 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-17Fix typosAndrea Gelmini
Change-Id: Id1c7ddf6c49ec709e38947a82731fe31a64aad04 Reviewed-on: https://gerrit.libreoffice.org/48076 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-17use the same shade of grey as Online UI usesAndras Timar
Change-Id: Idb6dc80f4943323f80bc6851bc184798627722ef Reviewed-on: https://gerrit.libreoffice.org/48056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-01-17Fix --enable-kde4Stephan Bergmann
...after 2ea733e525773e5631210e9503fd8415a72c2ea9 "loplugin:useuniqueptr in SalXLib" Change-Id: I430458b7e95b4814775f80b688259bc960268f9d
2018-01-17loplugin:unnecessaryparen extend to delete statementsNoel Grandin
Change-Id: Ic4383ea948876a26f791f0e5b0110cef978a26e1 Reviewed-on: https://gerrit.libreoffice.org/48027 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-17loplugin:useuniqueptr in OpenGLSalGraphicsImplNoel Grandin
Change-Id: I0d0e4da9c081c890ffd7dcaf051e3a3900345c35
2018-01-17loplugin:useuniqueptr in SalXLibNoel Grandin
Change-Id: Id3f8cf95479aa4e03bc6dcb05c5475ae462cfe5a
2018-01-17loplugin:useuniqueptr in X11SalVirtualDeviceNoel Grandin
Change-Id: I812fb31ec802d2c20e2e82693be127d42df73a69
2018-01-17loplugin:useuniqueptr in PspSalInfoPrinterNoel Grandin
Change-Id: I77494fca8f0c326aa35872640b99596597116ef2
2018-01-17loplugin:useuniqueptr in PPDParserNoel Grandin
Change-Id: Iafd63c276d430ea2a08286921f593bc56587e71c
2018-01-17loplugin:useuniqueptr in PrinterJobNoel Grandin
Change-Id: I029cb5e5c117ea1c337509420b11589aa29cb383
2018-01-17loplugin:useuniqueptr in GlyphCacheNoel Grandin
Change-Id: I4d6cca83f321f74faae7d2c6d0481a864f5f0b95
2018-01-17loplugin:useuniqueptr in GraphicFilterNoel Grandin
Change-Id: Ib359da131c84c291504a9df210a3b222fd77bd0c
2018-01-17loplugin:useuniqueptr in ImplAllSettingsDataNoel Grandin
Change-Id: If1894bd1a77fa1aab72896574357bd9852f66708