summaryrefslogtreecommitdiff
path: root/vcl/unx/generic
AgeCommit message (Collapse)Author
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>
2017-12-06loplugin:redundantcastStephan Bergmann
Change-Id: I7e73878f263be57d91a1db2fc3d65d411bd49228 Reviewed-on: https://gerrit.libreoffice.org/45912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-04new loplugin salcall: remove unnecessary SAL_CALLNoel Grandin
In this first commit, I use the plugin to verify the consistency of our SAL_CALL annotations. The point being to make the next commit more mechanical in nature, purely using the rewriter. There are various chunks of unix-only code that have never had to be compiled by MSVC, hence the inconsistencies. In bridges, I had to inline some typedefs to make the verification code happy, since it cannot see into typedefs. Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0 Reviewed-on: https://gerrit.libreoffice.org/45502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23Make loplugin:unnecessaryparen look through implicitStephan Bergmann
...similar to how <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent" does for loplugin:simplifybool Change-Id: I23eef400af71c582d380c9bae6546ce06e8a1e18 Reviewed-on: https://gerrit.libreoffice.org/45122 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-22drop duplicate methodCaolán McNamara
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12 Reviewed-on: https://gerrit.libreoffice.org/45075 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-15loplugin:flatten in vclNoel Grandin
Change-Id: I3527477277a9ae96eaf9fd068232f672da7c28c3 Reviewed-on: https://gerrit.libreoffice.org/44753 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-14use std::unique_ptr for SalLayoutNoel Grandin
to make the ownership passing around more obvious Change-Id: I147ec6d9cfe7566cf3600685e0730ed741c2d90d Reviewed-on: https://gerrit.libreoffice.org/43454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-14No need for bestmaxFrameSizeForScreenSize to be declared publiclyTor Lillqvist
It is used only inside vcl, and it should stay that way. Change-Id: Ia1a14ab13cb7d3580771c880f959abb2b695b032 Reviewed-on: https://gerrit.libreoffice.org/44698 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2017-11-13Fix typosAndrea Gelmini
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-11Replace list by vector for ShowNativeDialog (vcl)Julien Nabet
Change-Id: I1101c5b5426507ce8e5fd1ed34930f385f527775 Reviewed-on: https://gerrit.libreoffice.org/44639 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-10tdf#48300 kde4+gen: bring forward the window with already opened docKatarina Behrens
Send _NET_ACTIVE_WINDOW message to the mapped frame with the timestamp of current X11 server time (the real timestamp, not CurrentTime constant, otherwise e.g. KWin focus stealing prevention would kick in) Change-Id: I637e1c3548b874e7267f8fc71ffcca4b1a82a412 Reviewed-on: https://gerrit.libreoffice.org/44409 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-11-09rename AvoidConfig to FuzzingCaolán McNamara
cause that's what its really used for and a couple of cases are not specifically about avoiding config but avoiding uninteresting disk acccess and what not Change-Id: I4c6454f98388579fcd0bf9798321d30408ab65ee Reviewed-on: https://gerrit.libreoffice.org/44491 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-08ofz speed up fuzzers a tadCaolán McNamara
Change-Id: I4ed35408e3640d2b141218599cd895c09da1e2b0 Reviewed-on: https://gerrit.libreoffice.org/44427 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-07tdf#112770 Filter input on the correct windowJan-Marek Glogowski
This filters the input event on the correct window in SalX11Display::Dispatch. I'm not sure there is a point of skipping the filter for input events, which are not on our windows, as we already filter all non-key input events. Has been like that in the initial import, but whi knows what input methods do with different events... After reviewing the original "Unify SalUserEvent handling" commit e310c00709ed4fe0788aeff5142e3581d8b4d319, I found two more places, which now have handled user events wrong and fixed them. Change-Id: I50a60f6dacc3f795e659b6fbfd107548d07a3341 Reviewed-on: https://gerrit.libreoffice.org/44371 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-11-06QT5 fix build issues & cleanupsJan-Marek Glogowski
1. Linking problem on Windows due to Windows macros via <vcl/sysdata.hxx> include 2. Drop the custom MOC target for the old KF5 plugin 3. Correctly handle QT5 build without using QFont 4. ImplJobSetup is in the VL library, not the gen plugin Change-Id: Iad97b1b9b57a8c356aaa88178aff03d0c14558c7
2017-11-06QT5 first stab on implementing CommonSalLayoutJan-Marek Glogowski
CommonSalLayout doesn't rally have an interface. It's cluttered with #ifdefs. Currently we have to move the Qt5Font into the VCL library. Someone should refactor this... Doen't render any text yet, but reports some sizes. Eventually that would cut down the public interface again. Change-Id: I12f32affb05b37e070c6cbc80db01779f84590b6
2017-11-06loplugin:constparams in various(2)Noel Grandin
Change-Id: I533a7eb724b15e168a28dc92cd5962a39bc96e7c Reviewed-on: https://gerrit.libreoffice.org/44313 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-05PPDCache: fix segfault due to access after deleteAshod Nakashian
Regression introduced in: commit afe4d2527ec72e7493a2b1431559652ef45bebab Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Wed Oct 18 09:43:21 2017 +0200 use std::unique_ptr in PPDCache Removing a naked pointer before inserting a possibly existing one in a container is safe. This insured uniqueness (as the comment suggests). However with unique_ptr, removal before inserting deletes the pointer (when it exists), and the insertion now taints the container with a wild pointer. The fix is to skip adding if the pointer is already in the container and add only when missing. Change-Id: Ifc6b517451abb564949ccadfee10d98bf827540d Reviewed-on: https://gerrit.libreoffice.org/44333 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2017-11-02improve constparam lopluginNoel Grandin
lots of little fixes to make the logic less pessimistic Change-Id: If368822984250b11b98c56f5890177a1402e8660 Reviewed-on: https://gerrit.libreoffice.org/44168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-02vcl: fix dbg_util build after enum class changeThorsten Behrens
Fixup after 74ab2a686144545255a2f07dde3f14f66f37753e Change-Id: I57492bdee7cc4d3676b476a2a867211e5aa0bd13
2017-11-01Replace some lists by vectors in generic/print (vcl)Julien Nabet
Change-Id: I1fdbdbb62a30a3bd81b7e24bf15c8ccb64a2ef44 Reviewed-on: https://gerrit.libreoffice.org/44151 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-31ReleaseYieldMutex is always called with trueNoel Grandin
so drop param and rename to ReleaseYieldMutexAll Change-Id: Ic4fcee24d46405659e54363c87f21d88696b0ce1 Reviewed-on: https://gerrit.libreoffice.org/44057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-30Constify some VCL interface functionsJan-Marek Glogowski
This drops the bPaintEnd optimization for vertical and horizontal lines on Windows, where Polyline and LineTo exclude painting the last pixel of the line. Instead we just always set the last pixel. It also merges the various "SetPixel" call sites into a common drawPixelImpl function. Change-Id: I01cc3c01c908ba74f7978fa90eaaf8d88f923ae3 Reviewed-on: https://gerrit.libreoffice.org/43939 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-10-29cppcheck: unusedVariableJochen Nitschke
Change-Id: I0fcfd512b7abce38a6865c93f6147658b7dfe493 Reviewed-on: https://gerrit.libreoffice.org/44020 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-27Remove some old KDE3 and TDE stuffJan-Marek Glogowski
Both VCL plugins are long gone. We currently just keep the desktop detection. Generally fall back to gtk in VCL detection. Change-Id: I35830868cb75d16ae7b90b20df699929cefa4636 Reviewed-on: https://gerrit.libreoffice.org/43940 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-26Simplify and remove useless aRemovePrinters list (vcl)Julien Nabet
Change-Id: I33120b62b114bbac62752888301e62268f45768c Reviewed-on: https://gerrit.libreoffice.org/43852 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-25Resolves: tdf#113435 device tab missing from print dialogCaolán McNamara
Change-Id: I6119d1cbd5484ac2a26d60a7db4ac8fc11165561 Reviewed-on: https://gerrit.libreoffice.org/43818 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-23loplugin:includeform: vclStephan Bergmann
Change-Id: Id7dea3917740aaf4db8dada5e2bea6e117d714ea
2017-10-23tdf#96505 Get rid of cargo cult long integer literalsudareechk
Removed 1L and 0L in vcl/ directory files Change-Id: I0f5d134e0602d00ba058d34054b3dbfbc4233983 Reviewed-on: https://gerrit.libreoffice.org/42599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>