summaryrefslogtreecommitdiff
path: root/toolkit
AgeCommit message (Collapse)AuthorFilesLines
2018-04-05enable mapping direct from awt::XWindow and weld::WindowCaolán McNamara2-0/+6
Change-Id: I33b1309a4b81bfd84449213099c4f3f781413e00 Reviewed-on: https://gerrit.libreoffice.org/52456 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-03pass area param to DBG_UNHANDLED_EXCEPTIONNoel Grandin13-29/+29
and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke5-5/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-31loplugin:unusedmethodsNoel Grandin2-12/+0
Change-Id: Idca950f341a8a0521ea2fa3d705164fcf2481027 Reviewed-on: https://gerrit.libreoffice.org/52183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-29loplugin:unusedmethodsNoel Grandin2-43/+0
Change-Id: I7805ac9bc6f8c0aa5ba4804777e7d7c2c29a78f3 Reviewed-on: https://gerrit.libreoffice.org/52066 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-22move btndlg from vcl to toolkitCaolán McNamara4-1/+459
Change-Id: Iecc528bce1df9a67af43f9d9dd3ed41af24b0fad Reviewed-on: https://gerrit.libreoffice.org/51713 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-22move MessBoxStyle to last consumerCaolán McNamara1-0/+25
Change-Id: I1edbf247999cd59cee4d268ed686e8ed9b61d99f Reviewed-on: https://gerrit.libreoffice.org/51712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-19remove unused ucbstreamhelper includesJochen Nitschke3-3/+0
and a few vclunohelper includes Change-Id: I4803605766d155fe5044c2a65c0444631146831c Reviewed-on: https://gerrit.libreoffice.org/51496 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-16move framework/toolkit use of BitmapEx::GetMask inside vclNoel Grandin1-3/+2
Change-Id: I2a942377d6e9b8b09673e5ad2804e0e7fb2bb943 Reviewed-on: https://gerrit.libreoffice.org/51387 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-16drop support for GraphicObject URLs in toolkitTomaž Vajngerl2-20/+3
Change-Id: I86d18232b8fcb34272d3cc04f65a7dc72248591a Reviewed-on: https://gerrit.libreoffice.org/51328 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-12loplugin:redundantfcast look for redundant copies in return statementsNoel Grandin1-2/+1
Change-Id: I5f416c865dfe1c36018784246a8007452eb42008 Reviewed-on: https://gerrit.libreoffice.org/50996 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-06use more Color in toolkitNoel Grandin6-60/+59
Change-Id: I88860e4180db2c46acda1739235c248a38bb068d Reviewed-on: https://gerrit.libreoffice.org/50798 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28convert COL_ constants to be of type ColorNoel Grandin2-7/+7
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27cast MessBox into exileCaolán McNamara3-0/+306
Change-Id: I2fccc06b2228c1e7fd791d049d951d3a09f0f814 Reviewed-on: https://gerrit.libreoffice.org/50432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-27remove unused vclunohelper.hxx includesJochen Nitschke4-4/+0
Change-Id: I68178379e5493d0e738861a4dce5aa6e4b58cd22 Reviewed-on: https://gerrit.libreoffice.org/50393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27replace Color(COL_*) with COL_*Noel Grandin2-2/+2
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-27convert remaining WarningBox to weld::MessageDialogCaolán McNamara1-0/+13
Change-Id: I7e3c156a6ad47ac232636ae274280c1cb7556d4a
2018-02-26convert remaining ErrorBox to weld::MessageDialogCaolán McNamara1-0/+26
and convert remaining QueryBox to weld::MessageDialog Change-Id: Ifb4c316dee8eabf57c4940c44e29c65a2781aa6c
2018-02-25convert remaining InfoBox to weld::MessageDialogCaolán McNamara1-0/+13
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8 Reviewed-on: https://gerrit.libreoffice.org/50205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-22loplugin:changetoolsgen in tools..toolkitNoel Grandin8-26/+26
Change-Id: I3d87ee59258567b5a82cb459248539faea1b3ca9 Reviewed-on: https://gerrit.libreoffice.org/50101 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-21New loplugin:nestedunnamedStephan Bergmann3-111/+84
Change-Id: Ifb434589ef08428ce609bc7a40b015d4df13224c Reviewed-on: https://gerrit.libreoffice.org/50048 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-02-20make it possible to set parent window for printer error messagesCaolán McNamara1-1/+2
Change-Id: I0effa3645454ef9d03393ae8b256cd624ca04f03 Reviewed-on: https://gerrit.libreoffice.org/50008 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-08Different approach for tdf#115227Maxim Monastirsky2-52/+49
This reverts the previous attempt of commit 250ad9311a613d9b4e1cf5cf5fdaf33d9b326220 ("tdf#115227 svtools: suppress UNO notifications for color selectors"), in favor of a different fix. The advantage of this new approach is that is doesn't affect events other than activate/deativate, and that it covers more cases: Toolbar popups even if not based on svtools::ToolbarPopup, or if closed by clicking outside them, font name/size and paragraph style toolbar controls, notebookbar, context and main menus (for the non gtk3 native case, the gtk3 native menus left for a future investigation). For now, keep this logic inside toolkit, but ideally it should be in vcl (after reviewing vcl internal listeners). One side effect that I noticed after this change, is that there is a deactivation/activation pair which suppressed when e.g. opening a new document from the start center. But I'm not sure if that's a problem, given that the focus state of the top window as a whole wasn't changed, only its contents, and there are other APIs to track activation of document components. This happens because the source and the target windows of those events are the same, and we need to suppress this case to fix the font name/size style controls, and also the color picker after 27473d1c0f8ba3006262001cbefff33f639a19ac ("tdf#114935 Move the focus back to the document"). Otherwise we'll need to find another way to move the focus to the document w/o triggering listeners. Another case that will see a change in behavior, is document event listeners in dbaccess, as the Focus/UnFocus events there are based on top window activation/deactivation. However, I think it's a good change, as currently just opening of a toolbar popup or main/context menus there triggers those document events, making them useless. I would like to also mention here, that in fact those top window activation events never really worked as tdf#115227 expects them, as the superfluous events for at least the font name/size, style and color toolbar buttons existed already in OOo. The behavior of the color buttons changed in LO for a few years, but regressed again in the work on a real focus grabbing for floating windows starting with commit dd46727b99d4bb5135451aa7e5e1bdb197373843 ("Resolves; tdf#87120 no keyboard navigation inside floating windows"). That work also introduced superfluous events when using menus. And a note about the change in menubarwindow.cxx: When a menubar popup is closed it's deleted using the lazydelete mechanism, which reparents the popup window, so it doesn't appear anymore in the hierarchy of the document window. Moreover, I suspect that at some point the lazydelete thing will be replaced by a VclPtr mechanism, which might break this even further, so the event won't appear as coming from the popup window (which might be already disposed at this stage). So instead, temporarily set the menubar window as the current focus window, so the activation will appear as if it was coming from the menu bar window itself. Change-Id: I292232adfcbd1a31d66ce394cd2f1bf42a013ecb Reviewed-on: https://gerrit.libreoffice.org/48746 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-27Fix typosAndrea Gelmini1-2/+2
Change-Id: I8d5a8251a01af7cdf9832d98d8a6573b907f8532 Reviewed-on: https://gerrit.libreoffice.org/48683 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-27Fix typosAndrea Gelmini1-1/+1
Change-Id: Id1a19f2c8b44131773d4d5270a607c1907b16597 Reviewed-on: https://gerrit.libreoffice.org/48684 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jens Carl <j.carl43@gmx.de>
2018-01-27Fix typosAndrea Gelmini1-4/+4
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-25tdf#115227 svtools: suppress UNO notifications for color selectorsMiklos Vajna1-16/+39
This is nominally a regression from commit 43bc3031483d172eccd72c3804e2d4fc2ef37de4 (unify color selectors, 2016-10-28), but that just changed the Writer color picker to behave the same way as the Impress one. The Impress one started to emit these events with daeed90f4586eb9533041fb89bee163a5193596c (re-base on ALv2 code. Includes:, 2012-11-15), to fix i#118707, improving accessibility. That means either the focus changes and then accessibility is happy or the focus does not change and then the UNO API client only gets events when the user actually switches to an other window. Fix the problem with suppressing UNO-level notifications for the problematic events, by moving the existing VclListenerLock to a public header and using it at two more places in svtools. This should address not just color selectors, but in general other toolbar menus / popup windows. Change-Id: If427708c5b9fe4fa49cb8f00ec04b32cb28eb391 Reviewed-on: https://gerrit.libreoffice.org/48570 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2018-01-25Fix typosAndrea Gelmini1-1/+1
Change-Id: Ieef0e3f21eb12cb5b72d39da4bc0a8c60dd0d5ce Reviewed-on: https://gerrit.libreoffice.org/48545 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-23new loplugin: pointerboolNoel Grandin1-1/+1
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-17loplugin:useuniqueptr in VCLXWindowNoel Grandin1-2/+2
Change-Id: Iefec174c7dc3dbd52bdb9f6d7ebe6c8c42c031e9
2018-01-17loplugin:useuniqueptr in VCLXGraphicsNoel Grandin1-5/+4
Change-Id: If753b871831a9954048becd0aca73769e23163ec
2018-01-15More loplugin:cstylecast: toolkitStephan Bergmann7-31/+31
Change-Id: I65b3c17c516d364326ce6dc3f7ba90c885a3e5e3
2018-01-15convert a<b?a:b to std::min(a,b)Noel Grandin1-2/+2
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-12More loplugin:cstylecast: toolkitStephan Bergmann28-182/+181
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: Iaee0fee0cbc6e5311342b83d847cb89bd1056973
2018-01-08toolkit: disable the UnitConversion test only on WNTMichael Stahl1-3/+6
The Mac problem cited in 43dd63898c145ebeb918f1d6ce094cf5c68548c8 is unrelated. Change-Id: I2cba950d1b6df356fb5ecffdfe9d1f686f895ef4
2018-01-07disable toolkit unit conversion test for nowMarkus Mohrhard1-3/+3
There seems to be a bunch of problems: On OSX the test crashes when no display can be found: https://ci.libreoffice.org/job/lo_gerrit/25298/Config=macosx_clang_dbgutil/console On windows the position seems to be wrong on some boxes, e.g.: D:/lode/dev/core/toolkit/qa/cppunit/UnitConversion.cxx(149) : error : Assertion Test name: `anonymous namespace'::ToolkitTest::testXUnitConversion equality assertion failed - Expected: 100 - Actual : 72 - Window pos wrong Change-Id: Id100817cf9024986f790c2bfbf2ddaefcd2dd080
2018-01-05toolkit: disable UnitConversion test for non-default resolution on WNTMichael Stahl1-0/+22
Apparently this fails currently for unknown reasons, see report by Luke Benes at https://lists.freedesktop.org/archives/libreoffice/2017-December/079196.html Change-Id: Ib4c79fbc6a4353ab51612836f51196bc37a90ae1 Reviewed-on: https://gerrit.libreoffice.org/47444 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-05toolkit: convert UnitConversion test to C++Michael Stahl5-214/+247
Just translate the test, it checks just a tiny fraction of what it does just like the Java version. Change-Id: I85b4c890d970a00402d7f1b6f13d4e9ea2dd6e3c Reviewed-on: https://gerrit.libreoffice.org/47443 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-04loplugin:unusedfieldsNoel Grandin2-76/+23
fix the ReturnStmt check Change-Id: I95076076bd1313d23798c4615ea12910c86ed9a8 Reviewed-on: https://gerrit.libreoffice.org/47309 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-19inline use-once typedefsNoel Grandin1-2/+1
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-16clang-tidy modernize-use-equals-default in toolkitJochen Nitschke5-29/+0
Change-Id: I3c46fd48130dcec081de1f7807405f252ec247e0 Reviewed-on: https://gerrit.libreoffice.org/46593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-13tools: reimplement SVLIBRARY macro & remove it from solar.hMichael Stahl1-1/+1
Change-Id: I03f8f5fd656d62410821f2f2851f1c584c97d1f4
2017-12-13DELETEZ->std::unique_ptr in toolkit,unotoolsNoel Grandin2-6/+3
Change-Id: I2263e233ae03575e53ab4e7894a7507423afd32e Reviewed-on: https://gerrit.libreoffice.org/46397 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin27-83/+83
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-07loplugin:salcall handle static methodsNoel Grandin1-1/+1
Change-Id: Id6820abec4b8ca8bee26d62b333fd30b42a14aec Reviewed-on: https://gerrit.libreoffice.org/46007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-06Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxxStephan Bergmann2-1/+2
...and fix the fallout Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92 Reviewed-on: https://gerrit.libreoffice.org/45195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-30loplugin:unnecessaryparen: signed numeric literalsStephan Bergmann2-2/+2
Change-Id: I75c8224452ca9c3711a2ccaca9ecf549fa59cb64 Reviewed-on: https://gerrit.libreoffice.org/45549 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23Make loplugin:unnecessaryparen look through implicitStephan Bergmann1-1/+1
...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 Grandin1-1/+1
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 Bergmann1-1/+1
...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>