summaryrefslogtreecommitdiff
path: root/vcl/unx
AgeCommit message (Collapse)Author
2018-02-19weld: hook up help responseCaolán McNamara
and keep the current legacy ownership behaviour when welding the legacy backend Change-Id: I7e1f90f2d235abf0e10062b4be11ba5150bbdbfb Reviewed-on: https://gerrit.libreoffice.org/49918 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-16gtk3_kde5: Checkboxes on the left, texts on the rightKatarina Behrens
QFormLayout does it the other way round (text left, checkbox right) and it looks odd, so use QGridLayout Change-Id: Iff4255f695ce17561bac44e496a3567e1b438581 Reviewed-on: https://gerrit.libreoffice.org/49815 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-02-16native dialog initial basisCaolán McNamara
Change-Id: I392be563e38257390f748c70bb71c67a66778ddd Reviewed-on: https://gerrit.libreoffice.org/49677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-15gtk3_kde5: advertise vcl plugin correctly in about dialogThorsten Behrens
Change-Id: Icfe977f7f9750003d992d795cad8cd86d7055e59 Reviewed-on: https://gerrit.libreoffice.org/49813 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-02-12Fix typosAndrea Gelmini
Change-Id: Ia01f85e87706b02ffb816b3385765e2729dafa02 Reviewed-on: https://gerrit.libreoffice.org/49585 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-09Fix conditionSamuel Mehrbrodt
OSL_DEBUG_LEVEL is always set as it seems Change-Id: Ie555f705fd13de778463c8073e86d30b3ce09073 Reviewed-on: https://gerrit.libreoffice.org/49476 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-02-09Sync the fix with Muffin upstream changesMaxim Monastirsky
See: https://github.com/linuxmint/muffin/commit/f3fce7898ba8aa82c4c82a50af2bb44c0ff79ddf Change-Id: Ic569bb7139fcb12e9549fa136c269f1a7ed10cb3 Reviewed-on: https://gerrit.libreoffice.org/49453 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-02-08Disable NET_WM_PING for all debug buildsSamuel Mehrbrodt
To allow debugging under Gnome 3 Change-Id: I75e3a3fe797c4973072b46f9ee58270fd0e366c5 Reviewed-on: https://gerrit.libreoffice.org/49417 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-02-08tdf#86739 Option to set image anchor type in image insert dialogSamuel Mehrbrodt
This adds the selectbox to (hopefully) all filepickers: - LO native - GTK/GTK3 - KDE4 - KDE5 - Windows - macOS Change-Id: I01bd42b1ca18e0f691b879647a6cb1b62177d3ce Reviewed-on: https://gerrit.libreoffice.org/49311 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-02-05vcl: remove BitmapColor Color() operatorChris Sherlock
BitmapColor has a Color() operator. However, this is confusing and tends to hide that the two classes aren't the same. I have converted this to GetColor(). Change-Id: I0be2dcb3fc420e7be9c8d04330e7a3fe69a5412a Reviewed-on: https://gerrit.libreoffice.org/48245 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-02loplugin:useuniqueptr in X11SalFrameNoel Grandin
Change-Id: If8693b106f8755e506375f1a65754c972971700f Reviewed-on: https://gerrit.libreoffice.org/49129 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02Replace some front/pop_front by for-range loops+clearJulien Nabet
Change-Id: I8a9239667b0d80ee2fa6ebbc8a19ba4c0076c2fb Reviewed-on: https://gerrit.libreoffice.org/49107 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-02-02loplugin:useuniqueptr in GtkSalFrameNoel Grandin
Change-Id: Ia98080d5c214824624ca4cbe875038374919f662 Reviewed-on: https://gerrit.libreoffice.org/49132 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02loplugin:useuniqueptr in SalGtkFilePickerNoel Grandin
Change-Id: I3cbe4121c1cb323ad00e110bcdb1f61334e656bc Reviewed-on: https://gerrit.libreoffice.org/49131 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-02loplugin:useuniqueptr in NWPixmapCacheNoel Grandin
Change-Id: Ibf9f5c3ec3ea502bb93942516936ff844235b4d3 Reviewed-on: https://gerrit.libreoffice.org/49130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-01Convert 2 lists in vectors in X11_selection (vcl)Julien Nabet
by replacing front/pop_front calls with use for-range loops with a call clear() afterwards Change-Id: I5eadebadca688dc2bb9818b67ca8b5f4ddb06acc Reviewed-on: https://gerrit.libreoffice.org/49089 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-31Modernize a bit vcl (part5)Julien Nabet
by using for range loops Change-Id: I52d6e6c9e1c2c321dc81d8258943a1a9a611441c Reviewed-on: https://gerrit.libreoffice.org/48987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-30Fix compilation with GCC 4.8Milian Wolff
Workaround a bug in variadic template parameter pack expansion in lambdas that affects GCC 4.8. The workaround expands the pack outside the lambda into a custom functor that then calls readIpcArgs. Change-Id: I7a2d8572a6f2b330bb22a4f18f5cc13fd7ef9b45 Reviewed-on: https://gerrit.libreoffice.org/48895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-27Fix typosAndrea Gelmini
Change-Id: I914ac70f39028caebafb874e871f11017fda7795 Reviewed-on: https://gerrit.libreoffice.org/48682 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-26Remove redundant(?) initialization of frame geometryStephan Bergmann
The memset of maGeometry was added with 79e2c2577527578629d7bb719a88396645a4cc49 "INTEGRATION: CWS vclplug" in 2003, before f7be39169fef0823e04f556cc9c9fdcda34d8685 "INTEGRATION: CWS presenterview" in 2008 introduced a user-provided _SalFrameGeometry default ctor, which sets all members except nWidth and nHeight to 0, and sets nWidth and nHeight to 1. So the memset effectively set nWidth and nHeight to back 0 (whether or not that was by design or by accident after the latter commit), but that seems to be unnecessary after all, seeing that a SAL_USE_VCLPLUGIN=gen soffice appears to stll work well after removing the memset. Change-Id: Ic6d1c6476a1234e84dca1e560149cd1e9af37b73 Reviewed-on: https://gerrit.libreoffice.org/48696 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-26Fix typosAndrea Gelmini
Change-Id: I334f0bd5636940ea8105dcf93b95b3af28894aad Reviewed-on: https://gerrit.libreoffice.org/48546 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-25lo_kde5filepicker: cleanup main and add version and help optionsMilian Wolff
This way users can figure out what this tool is about. Most notably, you can run it now with `-h, --help` as one would expect. Change-Id: If8dd3142bdcc96d2962a2647b2187d75666b9394 Reviewed-on: https://gerrit.libreoffice.org/48592 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-25Properly restore size of KDE5 file picker dialogMilian Wolff
The event filter we installed prevented the show event from reaching the KDEPlatformFileDialogHelper::show method. This prevented the dialog from being restored to the size chosen by the user previously. Change-Id: I7af457f19f59d27bd104f8f70d9f4767da6641ee Reviewed-on: https://gerrit.libreoffice.org/48591 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-25Properly quit the lo_kde5filepicker on Quit commandMilian Wolff
Quitting the event loop is not enough, we also have to get out of the readCommands loop. Return false for this scenario. Also exit the command when an unhandled command comes in, we cannot really recover the stream from this anyways. Change-Id: I7d58724ea0364565e476516d5645cb436ce1d461 Reviewed-on: https://gerrit.libreoffice.org/48590 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-25gtk3_kde5: port away from boost::processMilian Wolff
While this uglifies the code, it removes a dependency on newer boost 1.64+ which ships boost::process. This helps on systems where LO is linked against system boost and an older version of boost is used. Additionally, and this is the main motivation, this makes it easier to backport these changes to 5.2, where the bundled boost is also only at 1.60. To keep the required changes at a minimum, the osl_* API for reading from/writing to the stdout/stdin of the helper process, we buffer the responses on a line-by-line basis. Note that one cannot simply reuse osl_readLine on the non-seekable oslFileHandle. Instead, we have to roll our own simplistic readLine implementation... Change-Id: I1197e38cb2416e926d8ba985accd6c10d78bcc52 Reviewed-on: https://gerrit.libreoffice.org/48490 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2018-01-25Fix typosAndrea Gelmini
Change-Id: If75cf86a65c6f03c6c467efb677e2f7e3e5da576 Reviewed-on: https://gerrit.libreoffice.org/48547 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-24Use a more conventional way of zero-initializing class membersStephan Bergmann
...to avoid upcoming GCC 8 -Werror=class-memaccess ("clearing an object of non- trivial type ‘class SalVisual’") Change-Id: Id9c5a6fa7e084b5abd549c99d07f05f183d56a52 Reviewed-on: https://gerrit.libreoffice.org/48402 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-24fix kde4 vclplug buildNoel Grandin
by reverting parts of commit de8f6b25de6fbe813fe172542e7eff1596b37335 loplugin:unused-returns in vcl and reverting commit 78bb1a2a51a991f605ae5c51d813697673bbc67 Fix --enable-kde4 codeHEAD <noelgrandin> sberg, is that safe ^^ ? I was just about to push a partial revert of the commit that caused the breakage <sberg> noelgrandin, oops, I'd naively assumed that all impls of Dispatch had just always returned true Change-Id: Icbca450a76de30a04bc90a2887066840191c9d5f
2018-01-24Fix --enable-kde4 codeStephan Bergmann
...after de8f6b25de6fbe813fe172542e7eff1596b37335 "loplugin:unused-returns in vcl" Change-Id: I82414b20b7dbb9e7ba361c0f4d9451c74ea4d4f2
2018-01-24loplugin:unused-returns in vclNoel Grandin
Change-Id: I507320900a47f604d17ed7d402d531a7cbdf744e Reviewed-on: https://gerrit.libreoffice.org/48331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-23Fix typosAndrea Gelmini
Change-Id: I05a1234d7bcbae6f4851abd34ff7acec5853f5f5 Reviewed-on: https://gerrit.libreoffice.org/48329 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-23Removed duplicated includeAndrea Gelmini
Change-Id: I20d4304013e12035e522fd1b1e0c201d49961114 Reviewed-on: https://gerrit.libreoffice.org/48434 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-23Various loplugin in --enable-gtk3-kde5 codeStephan Bergmann
Change-Id: I006e7fddcb58edb597867e0dd6f2b81ddac3457e
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-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-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-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-17Fix --enable-kde4Stephan Bergmann
...after 2ea733e525773e5631210e9503fd8415a72c2ea9 "loplugin:useuniqueptr in SalXLib" Change-Id: I430458b7e95b4814775f80b688259bc960268f9d
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-17tdf#114935 Move the focus back to the documentMaxim Monastirsky
... after selecting a color from a floating picker, similar to what we do for the font name/size toolbar controls. But moving the focus didn't work properly under gtk2, as it was cycling the focus between the floater and the main window with each click. The cause for this was the GrabFocus call made by ValueSet/PushButton upon clicking, which resulted in a XSetInputFocus in GtkSalFrame::ToTop. But removing this XSetInputFocus would break keyboard handling inside floating windows (as in tdf#104368), given that GtkSalFrame::Init sets the input hint to false. Setting the input hint to false is a hack needed for some WMs to not steal the focus from the main window, when showing floating toolbars. This mostly affects Compiz and Metacity (and its forks Marco and Muffin, but fixed in recent Mutter - see gnome#773210). Other WMs nowadays seems to deduce the desired no-focus initial state, from the toolbar window type hint. According to wm-spec, one way to make a newly mapped window not steal the focus is to set 0 to _NET_WM_USER_TIME (and this method is indeed used by gtk). This helps for Compiz (w/o messing with the input hint), but not for Metacity, which will anyway unfocus the parent window. The only solution that seems to work so far, is to start with the input hint as false, and change it to true after the window is mapped. And do this craziness only for Metacity and its forks, just in case... (although I didn't actually notice any problems with this in place, under other WMs.) (I also considered fixing tdf#114935 by making ValueSet/ PushButton not grab the focus on click, by setting WB_NOPOINTERFOCUS on them. But that will be just a partial solution, as e.g. if a user selects a different palette from the palettes list, the focus will stuck in that list.) Change-Id: Id8241bc809c445ff4e46f1a747b9af5ed57e5a1c Reviewed-on: https://gerrit.libreoffice.org/47690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-01-15More loplugin:cstylecast: vclStephan Bergmann
Change-Id: I74d1555b461fd8ea316380423fcde2d167714170
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin
with something like git grep -nP '(.*)\s*<\s*(.*)\s*\?\s*\g1\s*:\s*\g2' -- *.?xx Change-Id: Id5078b35961847feb78a66204fdb7598ee63fd23 Note: we also convert a>b?b:a Reviewed-on: https://gerrit.libreoffice.org/47736 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>