summaryrefslogtreecommitdiff
path: root/vcl/unx/generic
AgeCommit message (Collapse)Author
2018-02-27replace Color(COL_*) with COL_*Noel Grandin
using git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)" | xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g" and then some manual fixup where the resulting expression no longer compiled Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4 Reviewed-on: https://gerrit.libreoffice.org/50372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26vcl: consolidate ColorOf() and GrayOf() functionsChris Sherlock
Change-Id: Ic80dda409ceaff89be5f249cf906abbb40679f3c Reviewed-on: https://gerrit.libreoffice.org/50272 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-22loplugin:changetoolsgen in vclNoel Grandin
Change-Id: I0fc68cf51fb23ed9bb86a5087e8247c81b024494 Reviewed-on: https://gerrit.libreoffice.org/50107 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-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-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-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-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-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-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-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-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-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-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>
2018-01-14Fix typosAndrea Gelmini
Change-Id: I2b4988e1d81fe60f7699362480cd739d2620c053 Reviewed-on: https://gerrit.libreoffice.org/47856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-12More loplugin:cstylecast: vclStephan Bergmann
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I363c01a1ae9e863fca4fb4589829492d7280d711
2018-01-11[API CHANGE] migrate PackageKit usage to Modify2Caolán McNamara
xid dropped in favour of application_id Change-Id: Id1eb43aa9c8dfb4eac82f99eff0f84c5320e0da0 Reviewed-on: https://gerrit.libreoffice.org/47661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-10tdf#79077: Harmonize PapersizeFromSetup checkboxes in printer configKatarina Behrens
job setup and options tab page. Also fix a small UI regression Change-Id: I48532ac4e188d68008e947924da651239262d8b2 Reviewed-on: https://gerrit.libreoffice.org/47703 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-01-06convert tolerance params to sal_uInt8 (second try)Noel Grandin
first attempt was in commit e75abe6e0a4ea250366bb29c0ece697e9b1b80a1, reverted in 7accac097688832d8682a88a0176c3e1482ffade Change-Id: I460e9ab5fcca3a99656e5d8434fa04c2387d7183 Reviewed-on: https://gerrit.libreoffice.org/47463 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-05tdf#114837 FILEOPEN: Image is blankNoel Grandin
revert commit e75abe6e0a4ea250366bb29c0ece697e9b1b80a1 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Dec 12 09:33:14 2017 +0200 convert tolerance params to sal_uInt8 for now. Change-Id: Iafaada0fb338f60ecc9f94aafe138500dfb27cf7 Reviewed-on: https://gerrit.libreoffice.org/47453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-23loplugin:passstuffbyref improved returns in vclNoel Grandin
Change-Id: I0b103df2e7ce59093869f547225c95865d33da27 Reviewed-on: https://gerrit.libreoffice.org/46916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22use SyncDbusSessionHelper for font install requestsCaolán McNamara
don't need to have two implementations here and can reduce ifdef forest Change-Id: I972159ece9cce417aefd5ec4acf5ba5d1d08317b Reviewed-on: https://gerrit.libreoffice.org/46968 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-22tdf#79077: Mildly improved user experienceKatarina Behrens
Change-Id: I3cf63d06c3c238ed936a8dd0287cfbe02e8e39be Reviewed-on: https://gerrit.libreoffice.org/46936 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-12-21set dbus id for existing DbusSessionHelper usersCaolán McNamara
Change-Id: I64329e21ae79b6607856de9781bee0274b9cb136 Reviewed-on: https://gerrit.libreoffice.org/46854 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-20tdf#79077: Cleanup PapersizeFromSetup related codeKatarina Behrens
Change-Id: If77c43a7eb97de0a2e23195a9539f00e452343d8 Reviewed-on: https://gerrit.libreoffice.org/45096 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-12-20tdf#79077: copy 'paper from printer setup' toggleKatarina Behrens
into printer properties dialog, it is rather badly accessible (almost invisible) in File > Print > Options tabpage Change-Id: I18d538a20dc207c359ae1e7c2c914a68daf58f31 Reviewed-on: https://gerrit.libreoffice.org/43956 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-12-19inline use-once typedefsNoel Grandin
Change-Id: I5c3ffc03c26b3428f1f336e6ecba7838a1cf1157 Reviewed-on: https://gerrit.libreoffice.org/46764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19coverity#1426314 silence Resource leakCaolán McNamara
Change-Id: I266463184f902df11943a23fa4129086c6441783 Reviewed-on: https://gerrit.libreoffice.org/46703 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-16sal_uLong->SalPrinterError in SalPrinterNoel Grandin
and define a default implementation in the base class that returns SalPrinterError::NONE, since only one of the subclasses wants to override and return something useful Change-Id: Id41ff90693527e8624cc2993b7481114af85fcee Reviewed-on: https://gerrit.libreoffice.org/46509 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-15Protect all LogicalFontInstance constructorsJan-Marek Glogowski
This way LogicalFontInstance can just be constructed by a PhysicalFontFace based factory. The patch also drops the wrong "Java logical font" comment added by commit 125cdf3404e60cf78f2a5547e9a06ce994df5c8e. Change-Id: Ibd5d7da0c3a65dbfa2c8ae6b05cf616d39b749f2 Reviewed-on: https://gerrit.libreoffice.org/46475 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-12-15sal_uIntPtr->sal_uInt32 in X11SalGraphicsImplNoel Grandin
which matches the call sites Change-Id: I4db0c87f29c3368f32d600a10b5f43cb5ea6027c Reviewed-on: https://gerrit.libreoffice.org/46483 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-13convert tolerance params to sal_uInt8Noel Grandin
since their range is 0-255 Also drop pTols from ImplColReplaceParam, since it is always nullptr. Change-Id: I9e9ab7f7596e18cab1d67dd69922e5ac9867f45b Reviewed-on: https://gerrit.libreoffice.org/46274 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-10Use some for range loops in vclJulien Nabet
Change-Id: I58a334e4d1252b2addd6784ab60d15b60593f722 Reviewed-on: https://gerrit.libreoffice.org/46184 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-07loplugin:constparamsNoel Grandin
Change-Id: Ia322ecf8f80b28c58ec33d17ca9607401a92534b Reviewed-on: https://gerrit.libreoffice.org/45959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>