Commit Graph

199 Commits

Author SHA1 Message Date
Noel Grandin
cc903aee97 fix some "deffer" spelling
Change-Id: I8fa9782242e92d754eaa131d424eb0a26f04a319
Reviewed-on: https://gerrit.libreoffice.org/40394
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25 13:25:59 +02:00
Noel Grandin
72f36adb93 loplugin:constparams in vcl
Change-Id: I36afe2107e07ffb9b73c0b76be600e3e999a0fd4
Reviewed-on: https://gerrit.libreoffice.org/40116
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-18 09:57:26 +02:00
Noel Grandin
4250b25c6a teach unnecessaryparen loplugin about identifiers
Change-Id: I5710b51e53779c222cec0bf08cd34bda330fec4b
Reviewed-on: https://gerrit.libreoffice.org/39737
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-10 09:57:24 +02:00
Noel Grandin
8914595d46 loplugin:unusedfields in vcl part1
Change-Id: I67d176003f39992cd0ff9271a7d6ce26d2cb6619
Reviewed-on: https://gerrit.libreoffice.org/38828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-17 15:06:52 +02:00
Jochen Nitschke
b3eb843766 cleanup tools/debug.hxx includes
with command
> git grep -l tools/debug.hxx |
  xargs grep -L DBG_ |
  xargs sed -i '/#include *\(<\|\"\)tools\/debug.hxx.*/d'

don't change files in includes/ and */pch

Change-Id: Ie429d6a7dca5dfa1073e0f5ba037f7c84bdbec08
Reviewed-on: https://gerrit.libreoffice.org/37349
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-08 08:33:01 +02:00
Maxim Monastirsky
fe0451259d tdf#103158 ctrl+shift should work on key up
Under gtk/gtk3 we send CommandEventId::ModKeyChange on
key down, to support the auto-accelerator feature. But
at least the handler in SwEditWin::Command must get it
on key up, in order to not interfere with other
ctrl+shift+X shortcuts, which work on key down.

To achieve that, we need:

- On key up pass the key that was just released, instead
  of the current state of nothing being pressed.

- Have a flag of whether it's a key down or up event, so
  it can be checked by the application code.

Change-Id: If188d6ccdc3b214a2c3ed20aad291d74d46b358f
Reviewed-on: https://gerrit.libreoffice.org/37275
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-05-05 11:27:33 +02:00
Chris Sherlock
da64d198ec tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25 09:31:31 +02:00
James Raykowski
dd0824c92a tdf#89329 Use std::unique_ptr for ImplData in vcl/syswin
Change-Id: I5cf16991bba0cec80c7fbaf32f4529e4f022201b
Reviewed-on: https://gerrit.libreoffice.org/36590
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-17 01:34:57 +02:00
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
Noel Grandin
8c00536d87 Convert WindowType to scoped enum
Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9
Reviewed-on: https://gerrit.libreoffice.org/34219
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-14 10:44:08 +00:00
Caolán McNamara
f67dc04cfd Resolves: tdf#101972 skip invalidating labels on alt if autoaccel is disabled
so no Invalidate will be called if auto accelerators are not enabled
so there should be no blinking under windows

Change-Id: Iccc5dad7af41f39ac02d3be93e935f2d926a82a6
2017-02-09 10:28:44 +00:00
Noel Grandin
32a461bdd6 loplugin: unnecessary destructor vbahelper..vcl
Change-Id: I6b7800d4a456391251168f7923a1ec7a5ca9efc9
Reviewed-on: https://gerrit.libreoffice.org/33577
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-27 06:50:02 +00:00
Jan-Marek Glogowski
bf110d40ef Change all Idle* LINKs to be Timer*
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles
Link in the Timer class. Now there are two possible solution:

  1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or
  2. split the inheritance of Idle from Timer again to maintain
     different Link<>s and move all common code into a TimerBase.

While the 1st is more correct, the 2nd has a better indicator for
Idles. This implements the first solution.

And while at it, this also converts all call sites of SetTimeoutHdl
and SetIdleHdl to SetInvokeHandler and gets rid of some local Link
objects, which are just passed to the SetInvokeHandler call.

It also introduces ClearInvokeHandler() and replaces the respective
call sites of SetInvokeHandler( Link<Timer *, void>() ).

Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-23 20:49:05 +01:00
Jan-Marek Glogowski
fdc612619c Refactor Scheduler to add Task class
Moves all the "task-specific" stuff into a Task class and just
keeps the "real" static Scheduler functions in the original
Scheduler class.

Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
2017-01-17 16:08:47 +01:00
Jan-Marek Glogowski
9e51007039 tdf#97087 GDB pretty print the Scheduler task list
In addition to the GDB pretty printer, this annotates a lot more
Timers and Idles.

Change-Id: I5b93fab02161b23bb753e65ef92643a04fb0789c
2017-01-17 16:08:46 +01:00
Noel Grandin
e8b49f0907 new loplugin: useuniqueptr: vcl
Change-Id: Idcbc8655108ff57c06c33bbcabd652387bf3c4ec
Reviewed-on: https://gerrit.libreoffice.org/32948
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-13 06:49:23 +00:00
Szymon Kłos
9152f16b79 tdf#102059 NotebookBar accessible using F6 key
Change-Id: I873c49d8c0557eb3702de921fb5d2281acfed526
Reviewed-on: https://gerrit.libreoffice.org/32459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-01-05 09:36:54 +00:00
Caolán McNamara
1b5e144b4e SetPin and IsPinned are in an always-false circular isolated relationship
Change-Id: I4fb3aaa8a5e8c62091fbc542deae6af3a113a608
2017-01-03 14:12:25 +00:00
Noel Grandin
2d48f5fc0a convert VCLEVENT constants to scoped enum
Change-Id: Ic8ccb0a9715ec05182dacddab2c015b0de6a0fba
Reviewed-on: https://gerrit.libreoffice.org/31675
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-07 07:10:39 +00:00
Noel Grandin
e6ffb539ee loplugin:vclwidgets check for assigning from VclPt<T> to T*
Inspired by a recent bug report where we were assigning the result
of VclPtr<T>::Create to a raw pointer.

As a consequence, we also need to change various methods that were
returning newly created Window subclasses via raw pointer, to
instead return those via VclPtr

Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b
Reviewed-on: https://gerrit.libreoffice.org/31318
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-29 06:45:42 +00:00
Michael Stahl
6bb20609a2 vcl: rename Window::Notify to EventNotify
There is annoying overloading between Window::Notify and
SfxListener::Notify, and the Window one has apparently fewer
implementations, so rename that and remove lots of disambiguating
"using Notify" in multiply inheriting classes.

Change-Id: I8b597fd9e70cf2e7103b9dfa7cc666e79e7aff49
2016-11-24 22:56:34 +01:00
Caolán McNamara
7e2ef433d2 Resolves: tdf#102957 revert SetMinOutputSizePixel workaround
of

commit afeddaf7e0
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Wed Dec 16 10:46:10 2015 +0000

    Related: rhbz#1281906 set a min size on un-resizeable non-layout dialogs

and using a mixture of gtk_window_set_default_size before its visible, and
gtk_window_set_default_size + gtk_window_resize after its shown now works for
me under wayland so the original problem can be solved that way

Change-Id: Iaf8fd3019a7e902ad07b6825f919c6f25288e9b7
2016-11-15 15:08:26 +00:00
Caolán McNamara
e71ef59f2b sigh, then you can't shrink manually past size request
Change-Id: Ia919f65f93a3dad0af06a2fa4f7b42b5f9ae2052
2016-11-15 14:04:01 +00:00
Caolán McNamara
1aeff41c4a Resolves: tdf#102957 revert SetMinOutputSizePixel workaround
of

commit afeddaf7e0
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Wed Dec 16 10:46:10 2015 +0000

    Related: rhbz#1281906 set a min size on un-resizeable non-layout dialogs

and setting a size-request seems to do the right thing for me now under wayland
so the original problem can be solved that way

Change-Id: Ie2dd71c5a32131a60729448f0665d5cae2a83692
2016-11-15 13:23:44 +00:00
Noel Grandin
880bcf9ed8 loplugin:unnecessaryvirtual
Change-Id: I572b83949c7e643536b7d62567760546509e4d9f
Reviewed-on: https://gerrit.libreoffice.org/30514
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03 09:06:45 +00:00
Maxim Monastirsky
b197a47889 Height and Width seem to be swapped here
when height takes left-right borders, and width top-bottom.
And also - Why do we calculate the borders twice - as the call
to CalcWindowSize does this again?

Change-Id: I63a66939bd526a225ccac9bdd6262feba48da5c2
2016-10-11 00:07:44 +03:00
Maxim Monastirsky
9079d599ba Merge SystemWindow and FloatingWindow setPosSizeOnContainee methods
This reverts commit 95942b16f4
("Resolves: tdf#90481 fix cropped buttons"), and changes the
code in a way that seems to not crop buttons anymore. Tested
under gtk3 with File > Digital Signatures... and the toolbar
underline dropdown.

Change-Id: Idcb680c82f594f630b1dd7c76c42912e6b5a093a
2016-10-11 00:07:12 +03:00
Stephan Bergmann
106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Caolán McNamara
348dcf1edb Resolves: tdf#99324 accel underlines don't appear in extension option pages
because they are not widget-layout tab pages, we have to dive down
through the WB_DIALOGCONTROL widgets as well

Change-Id: I13dbf88878efd89794158ce43137381008e18890
2016-10-03 12:51:27 +01:00
Caolán McNamara
1bceb4e6ae fix indent
Change-Id: Ia1bc9fe3c2c3833e36ec6fb9636856049acf03ec
2016-10-03 12:51:27 +01:00
Caolán McNamara
bf882eb571 mbInitialLayoutDone is unused
Change-Id: Ic660ba53b450071ad222a3c1adb13e908dbf0023
2016-08-15 17:18:35 +01:00
Caolán McNamara
8f25e553b9 Resolves: tdf#99324 let bare tabpage in dialogs get toggled auto-mnemonics
Change-Id: Icdf2a908d131ff05a1c00b7305686edba26d4b24
2016-08-08 13:51:00 +01:00
Caolán McNamara
0321dbb9be Resolves: tdf#99324 let sidebar toggle auto-mnemonics on/off with alt
this returns things to passing the alt to the thing with the focus
and depends on ::Command handlers passing the alt-press/release back
up through the Command hierarchy to get to the default top-level
handler eventually

Change-Id: I869120f43810adfa2fac4670c2db143b790a1f9b
2016-08-02 10:22:33 +01:00
Caolán McNamara
76be678e74 rename ImplWindowAutoMnemonic and expose
Change-Id: Iddb0d84b6dbfeb263a68ddc3b8b5c39bbdcf46f6
2016-07-31 21:32:39 +01:00
Caolán McNamara
f305b88286 unhook the alt handling thing from SystemWindow
so it could be used from things that aren't dialogs

Change-Id: I649c5a05ad9c0634be9cef2bbe16a4643e58fc12
2016-07-29 16:36:36 +01:00
Caolán McNamara
545d5157f2 Resolves: tdf#95729 move 'alt' accel enable/disable down to systemwindow
from dialog and send the 'alt' to the active floating window, if there
is one, before trying the menubar.

so popups like the calc autofilter one can display their accelerators
when alt is pressed

Change-Id: I52e45b72885b1b0a7362cecc30e41d218a48a58d
2016-07-11 13:25:15 +01:00
Noel Grandin
716844c6ab restore loplugin:vclwidget checking for calling clear() on VclPtr fields
Change-Id: I85eda1c33016c1461d897fc0a3b70457209a7405
Reviewed-on: https://gerrit.libreoffice.org/26806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-06 06:38:30 +00:00
Stephan Bergmann
ff177bf17d loplugin:stringconstant
Change-Id: I590e5f6e6752902caf3da0d5d1924d59b10c421c
2016-06-28 10:13:17 +02:00
Szymon Kłos
c4e0d6596d notebookbar: added slide transition tab
- created VclVBox control which creates SlideTransitionPane
- SlideTransitionPane extended with second constructor
  which loads ui in horizontal mode
- introduced CloseMethod for NotebookBar to kill widgets in right order

Change-Id: Ic3ba35cb7734aa744a4804c5b670fed7c1bec204
Reviewed-on: https://gerrit.libreoffice.org/25844
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2016-06-28 07:53:22 +00:00
Arnaud Versini
9c4d92c939 VCL : Simplify SystemWindow initialisation
Change-Id: I9a899cddd8effc1c5deef5db9124b21e9e958392
Reviewed-on: https://gerrit.libreoffice.org/26727
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28 06:34:15 +00:00
Noel Grandin
9c79945ca6 convert DBG_ASSERT in vcl
Change-Id: I732fb1a789f90ca7a7f393cc41a6afe84fecf3d3
Reviewed-on: https://gerrit.libreoffice.org/26200
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-17 06:38:57 +00:00
Noel Grandin
c748debd8f convert WINDOWSTATE_STATE to scoped enum
Change-Id: I5448c7e46042850f18970c7613ec5a37df57bce7
2016-05-10 08:42:17 +02:00
Noel Grandin
9c7222c11c convert WINDOWSTATE_MASK to scoped enum
Change-Id: Ic8259d81d8080c518aa07697e253a59cd6efaa4b
2016-05-10 08:40:10 +02:00
Jan Holesovsky
d039c4812d notebookbar: Rename NotebookBarWindow to NotebookBar, and move accordingly.
Change-Id: If04a8f62aba0bcb712ae6405db318a4bd073fc54
2016-03-30 11:01:30 +02:00
Szymon Kłos
1fb314832e notebookbar: Instantiate the notebookbar via sfx2 infrastructure.
Change-Id: Iaed4596246245560e646d9086e717d5fb516897e
2016-03-30 11:01:30 +02:00
Eike Rathke
94923b5140 Revert "tdf#96393: reuse layout if available"
This reverts commit 9fdd671fb2.

Not only introduced it the regression of
https://bugs.documentfoundation.org/show_bug.cgi?id=98437 in that
dialogs with options shown closed in a different size than they would be
opened with options not shown now open in the previous closed size, but
it also introduces regressions for dialogs with nested windows where if
the initial layout is skipped for the remembered outer window size the
inner windows are not initialized anymore.

One example is the Calc Manage Names dialog, where the table is a nested
window that now has an initial width 0 and thus the column headers that
should be equally sized distributed are lumped together at the top left
and only two are displayed instead of three and the table content is
messed up.

Change-Id: I319d931cde2b7b87261e4c04122b91cd0f64b117
Reviewed-on: https://gerrit.libreoffice.org/23402
Reviewed-by: pepp <pelloux@gmail.com>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-03-21 11:23:11 +00:00
Noel Grandin
f0f973da85 loplugin:constantparams in vcl/
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-16 08:42:37 +00:00
Tor Lillqvist
65de9aa744 Follow our code layout style
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-03 09:47:18 +02:00
Pierre-Eric Pelloux-Prayer
9fdd671fb2 tdf#96393: reuse layout if available
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-03-03 07:37:11 +00:00
Caolán McNamara
01695131f3 Resolves: tdf#93821 assume mbNoSaveBackground as true everywhere
Change-Id: I126aa5e9b96299eb25c2240d097859b3c0756535
2016-02-01 08:11:19 +00:00