summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
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
2018-01-17loplugin:useuniqueptr in LogicalFontInstanceNoel Grandin
Change-Id: Id0ba44d9080294576dbafc47e68dff41a8257d29
2018-01-17loplugin:useuniqueptr in PDFExtOutDevDataNoel Grandin
Change-Id: I1607fa0f1d6385ccff657be2f892b876575b9674
2018-01-17loplugin:useuniqueptr in VectorGraphicDataNoel Grandin
Change-Id: I73badcdf544b1c3508c9eb9e489b049a9fa12928
2018-01-17loplugin:useuniqueptr in OctreeNoel Grandin
Change-Id: I26824107dbcf5d313409e301059a37a59b59a05b
2018-01-17loplugin:useuniqueptr in TransparencyEmitNoel Grandin
Change-Id: I7cc2d329cb6238c7933f087fd94d1409756512ff
2018-01-17loplugin:useuniqueptr in WindowImplNoel Grandin
Change-Id: I6a24f9fdf574276281d4a67caec426df14b2dd8c
2018-01-17loplugin:useuniqueptr in ImplWinDataNoel Grandin
Change-Id: Iea0e657bed5a8008f82534494cb0965a9749f1b2
2018-01-17loplugin:useuniqueptr in OutDevStateNoel Grandin
Change-Id: I9e29ca57eb3f00987dbac74cf7da2222f5b6d869
2018-01-17loplugin:useuniqueptr in TextEngineNoel Grandin
Change-Id: Iff5d10c4e962994823ec4ce6a765f4456c677352
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-17Handle focus_on_click glade property for buttonsMaxim Monastirsky
It maps to our WB_NOPOINTERFOCUS. Change-Id: Ib00e696801b72de2c931e282ed8d50c972fa59fb Reviewed-on: https://gerrit.libreoffice.org/47990 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2018-01-16tdf#114939 vcl: don't use StarOffice MD5 in PDF exportMichael Stahl
Unfortunately rtl_digest_MD5 has the same bug as SHA1. Always use real MD5 here, to avoid interop issues. Change-Id: I97173dc6d33a8f096702c29efa31a4544e582ad1
2018-01-16ofz#5423 TimeoutCaolán McNamara
Change-Id: I4d102c0370f336ed778e4578db697f520cc740b3 Reviewed-on: https://gerrit.libreoffice.org/48009 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-16ofz#5402 TimeoutCaolán McNamara
Change-Id: Id296f83b92fa8109ccbe8c4360e1d7d0ec199a4d Reviewed-on: https://gerrit.libreoffice.org/47983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-16Fix typosAndrea Gelmini
Change-Id: I078626eaa3155cc429320cc8c1532003b382b22a Reviewed-on: https://gerrit.libreoffice.org/47855 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-15vcl: No need for a double-linked list of dialogs in Execute().Jan Holesovsky
Instead use a simple vector. Change-Id: I50652468cf06ba681d5caccb74a52b32c6c507a0 Reviewed-on: https://gerrit.libreoffice.org/47910 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-15lokdialog: Allow closing the Format Cell dialogs in any order.Jan Holesovsky
Includes also lots of infrastructural changes, making the conversion of the rest of the dialogs much easier. StartExecuteAsync should be used in-place of StartExecuteModal and the latter removed from the code-base incrementally. More common code from Dialog::Execute should be moved to ImplStartExecuteModal in a next step, as this is used more widely. Change-Id: Idb2c1ec790e38f582438471a0419a56cdcf1439d Reviewed-on: https://gerrit.libreoffice.org/47722 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-01-15More loplugin:cstylecast: vclStephan Bergmann
Change-Id: I74d1555b461fd8ea316380423fcde2d167714170
2018-01-15loplugin:useuniqueptr in ImplToolBoxPrivateDataNoel Grandin
Change-Id: I5a88f6052899c9dcea818084aefcb63b0460cf2d Reviewed-on: https://gerrit.libreoffice.org/47838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15loplugin:useuniqueptr in ImplSplitSetNoel Grandin
Change-Id: Ibade5376c545fe5281ac171385bbb2aa02627512 Reviewed-on: https://gerrit.libreoffice.org/47837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-15loplugin:useuniqueptr in CursorNoel Grandin
Change-Id: I5de300709409311b7a1d451ee1d314596cf2e879 Reviewed-on: https://gerrit.libreoffice.org/47836 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>