summaryrefslogtreecommitdiff
path: root/vcl/source/window
AgeCommit message (Collapse)Author
2016-03-16WaE: loplugin:nullptrCaolán McNamara
Change-Id: I279d0021e7cdfd7e2d73ec6542e9ba27f300606c
2016-03-16tdf#98607 - fix drag and drop regression.Michael Meeks
regressed in: f2f1f52d8b84ac088496a4964d799bb84007fc45 Added belt and braces fix. Thanks to Maxim for the bisect. Change-Id: I5b263870d76f44ef8833b27f0d8d391210216459 Reviewed-on: https://gerrit.libreoffice.org/23307 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-03-16attempt to address reported loplugin:vclwidgets warningCaolán McNamara
Change-Id: I6ccefa2d5d1c57cf9f1c4041d14c92d03ded1333
2016-03-16vcl: fix loplugin:defaultparamsMiklos Vajna
Change-Id: Ic947d1a4a341a778c88d1225b1a2ea66df697084
2016-03-16coverity#1355505 Uninitialized scalar fieldCaolán McNamara
Change-Id: I95d76b6c06d194b762ecd0534c51314744eb42ae
2016-03-16Related: tdf#98637 make this a tractable problemCaolán McNamara
This is just too hard, it would all be much easier if the ActionGroup existed right from the start of the entire process. So smuggle in to the ctor the toplevel frame that the menubar will be inserted into so we can use its ActionGroup from the start. That would suggest that we could then just keep the hierarchy in sync as it is created rather than finding opportune moments to update /generate it. Change-Id: I550f94a994210423ab9cea1986e643056cb5bd29 Reviewed-on: https://gerrit.libreoffice.org/23287 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-16loplugin:constantparams in vcl/Noel Grandin
also some improvements to the plugin Change-Id: I0e3a519d70756e577fcb1bd47dd66864b5b4c871 Reviewed-on: https://gerrit.libreoffice.org/23289 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-15loplugin:constantparamNoel Grandin
Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5
2016-03-13coverity#1355505 Uninitialized pointer fieldCaolán McNamara
Change-Id: I95259c8a572529f47ef4fddf59f9ca29d078b6f4
2016-03-13fix strange memory leak in VclBuilderMarkus Mohrhard
Change-Id: Iba34c25b19a94a8d4c147f8ccaef95f34183414b
2016-03-10Related: tdf#98419 gtk3: reimplement passing window move control to wm...Caolán McNamara
for wayland Dragging toolbars around to move them (starting with an undocked toolbar, not the moving outline fake thing) doesn't work under wayland (as far as I can see) without using gtk_window_begin_move_drag i.e. gtk_window_move doesn't work. But this is supposed to be used from the initial mouse click (while it works under wayland from a move, it doesn't work under X from a move) so rework the last attempt to occur right at the initial click to drag. Change-Id: I612f188b3e8482307bc816f5aa775530e6092eda
2016-03-09Resolves: rhbz#1315385 use preferred size if widget supports itCaolán McNamara
when deciding if a popup needs to be placed up or down to stay visible on screen Change-Id: I718e0ee4a79152e919ac95841e15d4b53764ac78
2016-03-08convert custom bibliography toolbar to .ui formatCaolán McNamara
Change-Id: I70eb0e2ff96879d1168b241852a0079f540b0319
2016-03-08loplugin:constantparams in vclNoel Grandin
Change-Id: I2114436f4bef3ac71a3035a206186cefaf88bca1 Reviewed-on: https://gerrit.libreoffice.org/23023 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-08Bin unneeded inclusions of dbggui.hxxTor Lillqvist
Change-Id: I5cac6fb0278e3952e2538f06188ed510644fcaa0
2016-03-07improve defaultparams lopluginNoel Grandin
to catch calling params with defaults like "= OUSString()" Change-Id: Iad060e318ed492c22f8be44e326174fe6d28fff9 Reviewed-on: https://gerrit.libreoffice.org/22932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07loplugin:unuseddefaultparam in variousNoel Grandin
Change-Id: I03d7381aad055cbe9bd905e4082586073f4112e0 Reviewed-on: https://gerrit.libreoffice.org/22900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-04loplugin:unuseddefaultparams in vcl and xmloffNoel Grandin
and teach the plugin about code that takes the address of a function Change-Id: Ia9d5afef44520aca236659e8176f1e27135ef4fc Reviewed-on: https://gerrit.libreoffice.org/22861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-03refactor these two bizarro positioning things into reusable chunksCaolán McNamara
Change-Id: I3f89aca650d31658ce17b3b1496a7babba23bdc6
2016-03-03Follow our code layout styleTor Lillqvist
Consistency is important. (I know that we are wildly inconsistent in many things, even inside individual source files. Like the spacing of the expression in an if statement. But putting an opening brace on a separate line is something we do quite consistently.) Change-Id: I7c50628653b94a4da0fc4dc8db8869a5f1a64527
2016-03-03tdf#96393: reuse layout if availablePierre-Eric Pelloux-Prayer
If position and size were loaded from the WindowStateData structure there's no need to recompute the layout. As an added benefit if the user previously resized/move the dialog, the new one will open using the same geometry. Change-Id: I306504080357f9be8f3e628ba13ca5dc2957dd52 Reviewed-on: https://gerrit.libreoffice.org/21850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-26gtk3: add a menubar close buttonCaolán McNamara
the css foo is modeled on the similiar gedit close buttons in its tabs Change-Id: I7af32ad0434a49c52eea215f797c502be7f96dac
2016-02-26loplugin:unuseddefaultparms in include/vcl (part2)Noel Grandin
including a fix for a rather glaring bug in BitmapTools.cxx Change-Id: Id9db990b993cfeea9039c5fbaaa91996adeae22a Reviewed-on: https://gerrit.libreoffice.org/22713 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-26loplugin:unuseddefaultparams in /include/vclNoel Grandin
Change-Id: I36daccd90bfa6ba0ee8b9e76bff2bd8494155a04 Reviewed-on: https://gerrit.libreoffice.org/22710 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-26loplugin:unuseddefaultparam in vcl/Noel Grandin
Change-Id: Ic09d160ed6e3cdcd95bc04844ee8f20cfcb286ec Reviewed-on: https://gerrit.libreoffice.org/22698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-24mark checkable toolbox menu entries as checkableCaolán McNamara
e.g. the toplevel toolbars put excess entries in menus. If the entry is not marked as checkable then a native gtk menu entry will appear to be stateless when it actually does have a toggle state Change-Id: I7168b44d59fd64dfe264ed8ca26355252d697251
2016-02-23gtk3: vcl popups flush any unexecuted Select events on popdownCaolán McNamara
so if the gtksalmenu integration wants to drive popups by setting a selection on the vcl popup, then the same flush is needed after ShowNativePopupMenu Change-Id: I59be60de5742d1e382cabefcbf0d8cdd5fc30b00
2016-02-22gtk3: some changes towards enabling native gtk3 popup menusCaolán McNamara
these menubar things can be menu things and can then do away with the casting, no logic changes intended Change-Id: Ibb1b5354d5e1483327f172d6890e134f1e4b9ee4
2016-02-22loplugin:commaoperator in vcl/Noel Grandin
Change-Id: Ia5bbce27d9e9526122ce1e27389c7845e6709f27
2016-02-22loplugin:write only fieldsNoel Grandin
Change-Id: I45895e9845a9037da207f001fece427452ed499f
2016-02-19new loplugin: find write-only fieldsNoel Grandin
Change-Id: I0f83939babacf92485420ee63f290a297d7cb717 Reviewed-on: https://gerrit.libreoffice.org/22498 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-18Resolves: tdf#97953 spinbuttons are not suitable for reuse as up/down arrowsCaolán McNamara
Change-Id: Ibcd7bd4099210a26513caac6e3b16a88a4c8abad
2016-02-18WaE: not necessary to pass this argument, it defaults to the same valueTor Lillqvist
[loplugin:defaultparams] I strongly dislike default parameters. And confusing boolean parameters. Here what I really would prefer would be to have two separate functions, InvalidateUpperSpin() and InvalidateLowerSpin() (or something like that), neither taking any parameter at all. Change-Id: I42c92339481cf576397822c318db1449a576a06a
2016-02-17tdf#97922 - Mend nonsensical spin invalidation to improve rendering.Michael Meeks
Change-Id: Ief3d95b0b03e8062115785461b3834a03f9fb52b
2016-02-17tdf#97922 - Mend nonsensical spin invalidation to improve rendering.Michael Meeks
Change-Id: I3a398c47c69cc292a681ebe2414d844c224f3e3e
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-15tdf#97665 Let's hope that over activation isn't really neededMaxim Monastirsky
- MenuBarManager::Activate has a check for duplicate activation, which makes the second activation attempt fail. Removing this check or deactivating after each activation will likely affect performance even more, but on the other hand should solve lp#1296715, which was the main reason of the over activation in the first place. So let's activate only one menu at a time, and do full activation only on the initial update. - Unfortunately the HUD activation callback doesn't work, so we still have to keep active status listener for all menu items. (Which is BTW against the recommendation in XPopupMenuController::updatePopupMenu IDL doc. Fortunately the performance problem hardly noticeable on modern hw.) Change-Id: I96affa72412f3f38160fdca4b6efd20ca68d059f Reviewed-on: https://gerrit.libreoffice.org/22369 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-02-12SAL_OBJECT_CLIP_ABSOLUTE is never usedCaolán McNamara
Change-Id: I090f9854589a26b8de78fcda1093ea0c19625c79
2016-02-12SAL_OBJECT_CLIP_EXCLUDERECTS is never usedCaolán McNamara
Change-Id: I60b267e84df2ca0e540fc3218faa9a3fc4c9c55d
2016-02-13vcl: include vcl headers via triangular brackets instead of quotesChris Sherlock
Change-Id: I311f7db622ce341527fe12a92b516f800b602f92
2016-02-12loplugin:unusedmethodsNoel Grandin
Change-Id: I0fb06079ff8a9d0b2f5a2929f31846f91391f5c4 Reviewed-on: https://gerrit.libreoffice.org/22229 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-10vcl: actually remove ImplTranslateCommandEvent!Chris Sherlock
Change-Id: Ic120f83c5809074d082a86f677790ce9df35abcb
2016-02-10vcl: ImplTranslate(Command|Mouse)Event changesChris Sherlock
ImplTranslateCommandEvent is used exactly once, so remove this function. ImplTranslateMouseEvent is used a few times, make it local to the file and tweak. Added comments to both areas explaining what is being done. Change-Id: I68cd424a1d586df44957a62a66de3c9876ab873e
2016-02-10vcl: move CommandEvent functions from header to cxx fileChris Sherlock
Moving functions from commandevent.hxx to commandevent.cxx, this means they are no longer inline, but there was no clear reason as to why they were inline in the first place! I've also reordered the header to ensure that CommandEvent is the first fully declared class, the data classes get declared after this (hence the forward declarations). This makes reading this header much easier. One more small thing: a few if statements had braces in the primary if block, but not in the else block, which is IMO bad style and can possibly lead to errors. I've made the else block use braces. Change-Id: I79b010bd66d3c9f4a74d4fa470f62d0263c811f4
2016-02-10Don't fall back to Tool Bar as accessible name for toolbarsNiklas Johansson
There is really no need to force an accessible name on the toolbar The fact that it is a toolbar is already given by the accessible role TOOL_BAR. By giving it the name Tool Bar will make some screen readers read Toolbar toolbar and then whatever control is in focus. Change-Id: Ie033f7f98ece2481b8e4b1ce72f4254a3cfd7303 Reviewed-on: https://gerrit.libreoffice.org/22088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-02-09tdf#94097: Move 'Print to file' option to the front pageKatarina Behrens
Change-Id: I4acc09d0a46d82cfc9a63cbffe8e53a1b86f3acd Reviewed-on: https://gerrit.libreoffice.org/21908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-02-09Revert "headless: don't let windows become really visible to avoid paints."Tor Lillqvist
Causes CppunitTest_sd_tiledrendering to fail. This reverts commit 8455fe462a5a0e82ed2f98d303d36623b5920f9d. Change-Id: Ida95ea8855110f2c4322ffdee8fc6865e46ccad3 Reviewed-on: https://gerrit.libreoffice.org/22226 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-02-09headless: don't let windows become really visible to avoid paints.Michael Meeks
Paint at the wrong time has a habit of allocating over-large OutputDevice's for the drawing layer; saves 7Mb of heap for a dummy tilebench document. Change-Id: Ie06df705a55faadea2b06fd24b904d95ae64fd83 Reviewed-on: https://gerrit.libreoffice.org/21919 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-02-09Formatting changes across all modulesChris Sherlock
+ Removed comment cruft + Tab formatting in number of files + Some commented out code removed + Tab characters replaced with spaces + Newline cleanup in quite a few files + Tweak header guard #endifs Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc Reviewed-on: https://gerrit.libreoffice.org/22221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08vcl: cmdevt.[hc]xx -> commandevent.[hc]xxChris Sherlock
Change-Id: I77b30f28ae5a6fad360d7cada9acfaa9c324408b Reviewed-on: https://gerrit.libreoffice.org/22216 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>