summaryrefslogtreecommitdiff
path: root/vcl/unx
AgeCommit message (Collapse)AuthorFilesLines
2017-11-17Resolves: tdf#112549 use gtk3 to set gtk2 window fullscreen...Caolán McNamara2-4/+7
for current monitor mode as well as all-monitors mode Change-Id: I9de864dc0b416d18937f6ee90f432a8254fe987f Reviewed-on: https://gerrit.libreoffice.org/44870 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17Make loplugin:casttovoid more resilient against macrosStephan Bergmann1-2/+1
...in the type at the start of a ParmVarDecl, so that it does not erroneously assume in isSharedCAndCppCode that the whole decl is in "the body of a macro definition". (Even better might be to check the whole ParmVarDecl is inside one macro body.) Turns out that vcl/unx/gtk/gtkdata.cxx indirectly includes stdbool.h via some vcl/inc/unx/saldisp.hxx -> workdir/UnpackedTarball/epoxy/include/epoxy/glx.h -> workdir/UnpackedTarball/epoxy/include/epoxy/gl.h, and Clang's stdbool.h contains > /* Don't define bool, true, and false in C++, except as a GNU extension. */ > #ifndef __cplusplus > #define bool _Bool > #define true 1 > #define false 0 > #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) > /* Define _Bool, bool, false, true as a GNU extension. */ > #define _Bool bool > #define bool bool > #define false false > #define true true > #endif since <http://llvm.org/viewvc/llvm-project?view=revision&revision=115028> "Define _Bool, bool, true, and false macros in <stdbool.h> when we're in a GNU-compatible C++ dialect. Fixes <rdar://problem/8477819>" while GCC's stdbool.h has meanwhile been improved with <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=216679> "C++11 explicitly forbids macros for bool, true and false" to > #ifndef __cplusplus > > #define bool _Bool > #define true 1 > #define false 0 > > #else /* __cplusplus */ > > /* Supporting _Bool in C++ is a GCC extension. */ > #define _Bool bool > > #if __cplusplus < 201103L > /* Defining these macros in C++98 is a GCC extension. */ > #define bool bool > #define false false > #define true true > #endif > > #endif /* __cplusplus */ Change-Id: I42caab83ac6e4d5e5297376136a6bbe6f3d70818
2017-11-16vcl: StyleSettings - start to unwind code duplication.Michael Meeks4-60/+22
This should be a pure re-factor, plus: switch from Serif -> Sans font default for the UI (wow). enable larger font size for LOK only that avoids a hard to debug svx junit test failure. Change-Id: Id438026064983ea4907819bab55c4be740954605 Reviewed-on: https://gerrit.libreoffice.org/44625 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-11-15loplugin:flatten in vclNoel Grandin13-515/+530
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 Grandin3-5/+5
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 Lillqvist3-0/+3
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-13Removed include checkAndrea Gelmini1-3/+0
<unx/gtk/gtksalmenu.hxx> is already included at the beginning of the file. So no need to check to include it. Change-Id: I66988734271fa8fe8434e8090337f0ab14a8b994 Reviewed-on: https://gerrit.libreoffice.org/44646 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-13Fix typosAndrea Gelmini2-2/+2
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 Nabet3-8/+7
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-11vcl: StyleSettings - start to unwind code duplication.Michael Meeks4-24/+11
This should be a pure re-factor, plus headless tweak. Change-Id: Iad7f524ea76625601b3f85cc13a50311ed1de171 Reviewed-on: https://gerrit.libreoffice.org/44624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-11-10Related: tdf#112549 gtk3 hide/show menubar on enter/exit fullscreenCaolán McNamara2-10/+10
Change-Id: I0436d0f3404a88abd81c4eedea09b16c81536b61 Reviewed-on: https://gerrit.libreoffice.org/44599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-10tdf#48300 kde4+gen: bring forward the window with already opened docKatarina Behrens3-3/+37
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-09Prevent GTK assertion with FilePicker dialogMark Page1-3/+10
If "use-header-bar" property of the dialog is set to TRUE, it uses a GtkHeaderBar for action buttons instead of the action area. Change-Id: I9cebbce76d81ca50538e7d24133aa45e628d29b8 Reviewed-on: https://gerrit.libreoffice.org/44490 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-09rename AvoidConfig to FuzzingCaolán McNamara2-2/+2
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 McNamara1-1/+3
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-07Resolves: rhbz#1505379 gtk3+X: open comboboxes block sessionCaolán McNamara1-5/+11
if there's none of our windows under the mouse when clicked then close the popup window. There's similar code for gtk2, but using deprecated apis, do this again but with the recommended apis Change-Id: I9d844d098d09d0109dcbbc06390562e83edda397 Reviewed-on: https://gerrit.libreoffice.org/44402 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 Glogowski3-26/+32
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 Glogowski1-1/+1
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 Glogowski1-1/+1
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-06QT5 rename from KF5Jan-Marek Glogowski27-3278/+0
Move out of unx, as this will eventually compile on other OS platforms. At least currently it doesn't contain platform dependant code. Change-Id: Iea0bebf574201881ea158381fe7ba8af2a9a6488
2017-11-06KF5 implement some more stuffJan-Marek Glogowski4-7/+238
Change-Id: Icc322ea94708f0799011a2e4ee1499c184254690
2017-11-06KF5 add initial SalBitmap implementationJan-Marek Glogowski5-1/+389
Change-Id: I1f7b1894272096a0f0b23b63c3eeae310fb28c6f
2017-11-06KF5 add initial SalObject implementationJan-Marek Glogowski3-2/+146
Change-Id: Id8d901e9d283ee93cc952e6af267dbafd7f9b9aa
2017-11-06KF5 add FontFace implementationJan-Marek Glogowski9-16/+312
To pass the "Application error: no fonts and no vcl resource found on your system" failure from OutputDevice::ImplInitFontList. Just saw there is a SAL_NO_FONT_LOOKUP, which probably also would have helped. Change-Id: I2c818313c4f8b0f1d36242281e5c51973315b642
2017-11-06KF5 minimal graphics supportJan-Marek Glogowski6-15/+166
This way we pass the "No mpGraphics set" message. Change-Id: I097a823c295b251304dfbec8a71eba31b3d2b9ef
2017-11-06KF5 add QWidget to Kf5FrameJan-Marek Glogowski5-11/+140
Change-Id: I53845519d0dda324c9544f057b18c6afd4cf858a
2017-11-06KF5 correctly initialize QApplicationJan-Marek Glogowski2-4/+103
This turned out more tricky then expected. Originally the KAboutData was assigned to a non-existing QApplication object. Somehow this was prevending the later crashes, if the QApplication was initialized before KAboutData and we were creating QWidgets. The problem turned out to be the referenced arguments to QApplication. While we already passed the command arguments from allocated / heap memory, the argc argument was just the local stack variable! The simple fix is to allocate an int to pass to QApplication and the crashes are gone when assigning KAboutData after QApplication. Also removes some Qt initialization warnings on startup. Change-Id: Ic5b1eea578039fd5875097d23de587b970a6dfca
2017-11-06KF5 seperate Qt5 detection from KF5Jan-Marek Glogowski1-6/+6
Splits the configure checks into a Qt5 and KF5 specific part. Change-Id: I0a616ba031e1f7fd0385219ac48179adb4bdaf14
2017-11-06KF5 add event processing codeJan-Marek Glogowski2-4/+85
Change-Id: Ida7c4858cb770d1ce2d05aa6adc332c89bddd795
2017-11-06KF5 initial VCL pluginJan-Marek Glogowski18-0/+1759
Something that compiles, basically just interface stubs. All used Svp classes don't use any cairo. Change-Id: I9a8858c930989438cc2a3f3346c01a7abc579d62
2017-11-06loplugin:constparams in various(2)Noel Grandin7-16/+16
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 Nakashian1-7/+7
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-04Replace lists by vectors in SalGtkFilePicker (vcl)Julien Nabet2-58/+47
Change-Id: Iaf6115080c7b22e2e5b7cbc04314a48ad7fecdae Reviewed-on: https://gerrit.libreoffice.org/44312 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-04gtk3: fix popover placement in RTLCaolán McNamara1-3/+6
Change-Id: I8c20b277ce943f915941b2af9353f98c66f9065c Reviewed-on: https://gerrit.libreoffice.org/44271 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-02improve constparam lopluginNoel Grandin5-6/+6
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 Behrens1-6/+6
Fixup after 74ab2a686144545255a2f07dde3f14f66f37753e Change-Id: I57492bdee7cc4d3676b476a2a867211e5aa0bd13
2017-11-01Replace some lists by vectors in generic/print (vcl)Julien Nabet4-7/+7
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 Grandin2-3/+3
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 Glogowski7-12/+12
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-30Replace list by vector for m_aListeners in gtk3 (vcl)Julien Nabet1-19/+18
Change-Id: I97ad632be7340ae7a628026ae8e8c45d813a49e4 Reviewed-on: https://gerrit.libreoffice.org/44032 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-29cppcheck: funcArgOrderDifferentJulien Nabet1-1/+1
Change-Id: Ic29d1229a9acdc7412159eab72cb245567a76788 Reviewed-on: https://gerrit.libreoffice.org/44030 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-10-29cppcheck: unusedVariableJochen Nitschke1-1/+0
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 Glogowski1-12/+2
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 Nabet1-9/+9
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 McNamara1-25/+7
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-25kde5: make VCLKDE5Application build againKatarina Behrens3-9/+11
Change-Id: Ia1f4d1254583d04d1993e9a0ce8ad1f1aaa868d3
2017-10-25kde5: fix glib detection for KF5Katarina Behrens1-1/+1
Change-Id: Ibd25502384cd248f1070d26266222e18fb9e2e47
2017-10-25kde5: avoid crash with null surfaceKatarina Behrens1-1/+2
Change-Id: Ie63e62995bee0fd950cea0668f5ae06c903b25a3
2017-10-25kde5: implement getCairoContextKatarina Behrens2-0/+15
Change-Id: Ib39ca1e1d73ad4dc91c70ac3f4cdd1bdd24c2b29
2017-10-25kde5: get/setLib works againKatarina Behrens3-1/+8
Change-Id: Icc007d5c08f88ffdeb6e2d033615dccb140862ea