Age | Commit message (Collapse) | Author |
|
Change-Id: I271cc67ecf34acbf0edbda960e33315fb6a1f9dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100041
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This implements native PopupMenus for the qt5 VCL plugin,
which not only gives them the native look and feel, but also
makes context menus faster (tdf#128921), accessible (e.g. to the
Orca screen reader, tdf#122053), and makes them work for a case
in Base's relationship dialog where entries in the non-native context
menu were not selectable/clickable (tdf#130341).
For now, this always shows the popup menu at cursor position, which
can be changed by taking the Rectangle passed to
'Qt5Menu::ShowNativePopupMenu' into account if there should be any
need.
Change-Id: Ie52cbc682acacb92716ff51e8bf7f1ab07d34cf0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88512
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
"Find explicit casts from signed to unsigned integer in comparison against
unsigned integer, where the cast is presumably used to avoid warnings about
signed vs. unsigned comparisons, and could thus be replaced with
o3tl::make_unsigned for clairty." (compilerplugins/clang/unsignedcompare.cxx)
o3tl::make_unsigned requires its argument to be non-negative, and there is a
chance that some original code like
static_cast<sal_uInt32>(n) >= c
used the explicit cast to actually force a (potentially negative) value of
sal_Int32 to be interpreted as an unsigned sal_uInt32, rather than using the
cast to avoid a false "signed vs. unsigned comparison" warning in a case where
n is known to be non-negative. It appears that restricting this plugin to non-
equality comparisons (<, >, <=, >=) and excluding equality comparisons (==, !=)
is a useful heuristic to avoid such false positives. The only remainging false
positive I found was 0288c8ffecff4956a52b9147d441979941e8b87f "Rephrase cast
from sal_Int32 to sal_uInt32".
But which of course does not mean that there were no further false positivies
that I missed. So this commit may accidentally introduce some false hits of the
assert in o3tl::make_unsigned. At least, it passed a full (Linux ASan+UBSan
--enable-dbgutil) `make check && make screenshot`.
It is by design that o3tl::make_unsigned only accepts signed integer parameter
types (and is not defined as a nop for unsigned ones), to avoid unnecessary uses
which would in general be suspicious. But the STATIC_ARRAY_SELECT macro in
include/oox/helper/helper.hxx is used with both signed and unsigned types, so
needs a little oox::detail::make_unsigned helper function for now. (The
ultimate fix being to get rid of the macro in the first place.)
Change-Id: Ia4adc9f44c70ad1dfd608784cac39ee922c32175
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87556
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I0f8de0f78c7a8fb78d47ee5dfed09019b4eb5288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87357
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
found using 'git grep', I tried using clang-tidy, but it only
successfully found a tiny fraction of these
Change-Id: I61c7d85105ff7a911722750e759d6641d578da33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I6a456979a6cfcd7920dc468baf9b23013cb701a4
Reviewed-on: https://gerrit.libreoffice.org/79783
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
SalMenu's event handling is not really compatible with QAction.
LO expects to get something like an activate event, which happens
without any menu state update. The item handler will then update
the item state, as expected by LO.
I'm not sure how this could be implemented in a good way in Qt, so
this patch is just a hack. If the item is checkable, we invert its
state before handling it. This just works correctly for single items,
not radio groups, but it does the trick for this bug. And since
setChecked() just emits toggled(), triggered() won't run twice.
Maybe someone can come up with a better way using event filters, if
ever needed.
Change-Id: Ic32d07525ce8f394b83d04f53689d1669ddc9d83
Reviewed-on: https://gerrit.libreoffice.org/74590
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: I179780c2df5637b8a28c3a77b829319b1a64845b
Reviewed-on: https://gerrit.libreoffice.org/73924
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
You can't tab into the menu bar, but if you add a corner widget,
it will be enlisted in the parent's focus chain! Interestingly
the menu bar even is considered to have the focus, if the widget
is focused, and will handle key events, but this can probably be
considered consistent.
So this just denies the button any focus, as this is a mouse-only
widget, and clicking it will close the document window.
Change-Id: I3c48d85ca56b6a54daf01f444dddc736e7ebb8e7
Reviewed-on: https://gerrit.libreoffice.org/73186
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: Ibfa4d493ed752a03554020c6ab06bfc38745d97d
Reviewed-on: https://gerrit.libreoffice.org/71871
Tested-by: Jenkins
Reviewed-by: Aleksei Nikiforov <darktemplar@basealt.ru>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
This includes some not-so-nice lifetime handling of the button
"clicked" connection handling. I decided to keep the code in
one place, simply always forcing a disconnect on show, instead
of a more "optimized" code version in SetFrame.
First we try to get the icon from the system theme, but use LO's
own icon theme as a fallback.
Change-Id: Ic0459623ec907b9a54bef4670bf65cf587cd47ea
Reviewed-on: https://gerrit.libreoffice.org/71784
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
Change-Id: Iead091fee3b6c72d610f42598edb7cbb681d0cd4
Reviewed-on: https://gerrit.libreoffice.org/71870
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
|
|
qt5 didn't provide implementation of virtual SalMenu::ShowMenuBar
so native menu bar was visible at all times. Hopefully notebookbar
fans are happier now
Change-Id: Ie581397521369160e16f40231bade40100dcd6f6
Reviewed-on: https://gerrit.libreoffice.org/69327
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
|
|
... and also convert KDE5FilePicker. And Qt5Frame.
The UNO methods in Qt5FilePicker/KDE5FilePicker have to ensure that the
thread actually owns SolarMutex, because if RunInMainThread() is
called without that it will deadlock.
Change-Id: Ie4d2f494ac81c799ec7c9a3acb3a9b0f77bb6361
Reviewed-on: https://gerrit.libreoffice.org/68357
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
|
|
Set correct parent menu in function Qt5Menu::InsertMenuItem
instead of just returning it and setting it later if needed.
Change-Id: Id866987e91ec1d57c720735da6afc44109aa901a
Reviewed-on: https://gerrit.libreoffice.org/68437
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Also add item bits change notification function
for SalMenu to properly convert regenerated menu items
to check or radiocheck items.
Change-Id: I61f16a771b484644bbefd9afaf2776232d38a2f9
Reviewed-on: https://gerrit.libreoffice.org/68438
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I003703f0bc2e1697124e068a68bfb2e24c33cd1a
Reviewed-on: https://gerrit.libreoffice.org/68351
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
This change fixes displaying of elements of 'Styles' menu of Writer
Change-Id: I455a4f1c37aa7bc6641ebdd15eec23f18a8430d9
Reviewed-on: https://gerrit.libreoffice.org/66387
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Remove unnecessary destructor
Move MenuBar clearing out of DoFullMenuUpdate function
Change-Id: I0fb916c6935b2f8a675e75adf696d99203a2c016
Reviewed-on: https://gerrit.libreoffice.org/66386
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Also correct action group of menu
Change-Id: Ie7eddd3cdc9fa1c36fdeaa1e96eb5d50d7126c09
Reviewed-on: https://gerrit.libreoffice.org/66146
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I9fc5e6630560f285eeb7ef4dbc5e39ccabd5f0df
Reviewed-on: https://gerrit.libreoffice.org/66147
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I5a07526aa5187313977d6f7c244541be83b5edbc
Reviewed-on: https://gerrit.libreoffice.org/65930
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
|
|
Just as is already done in 'Qt5Menu::InsertMenuItem',
the text needs to be converted in 'Qt5Menu::SetItemText'
as well.
Change-Id: I03c8f2e6fe0e926a3f7e4be5b7eac70f1bd9850f
Reviewed-on: https://gerrit.libreoffice.org/64796
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
Change-Id: Ic4aef6b22d5b9c7262a534e26363c8f8cef99859
Reviewed-on: https://gerrit.libreoffice.org/64321
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Treat submenu items similarly to action items.
Qt5MenuItem controls lifetime of menus and actions instead of QMenu or QMenuBar.
Qt5MenuItem may need to remove menus, and thus it may need to delete it.
But if QMenu or QMenuBar owns menu, then on application exit a crash may happen
due to order of destruction of objects.
Change-Id: I66138c5692bd4955e78a805cc774ff9fc8fefb99
Reviewed-on: https://gerrit.libreoffice.org/63886
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
|
|
Change-Id: I61f870010003fae98d792f95d7fdac0e59d4305c
Reviewed-on: https://gerrit.libreoffice.org/63885
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
|
|
Separate HandleMenuActivateEvent function call from HandleMenuCommandEvent function call
since first one might update some of menus. Also add call to HandleMenuDeActivateEvent function.
Delete action with Qt5MenuItem to reflect the change in actual menu.
Also update underlying qt-based menu from Qt5Menu::InsertItem function.
And update Qt5Menu::SetItemImage to work with different types of descendants of SalBitmap.
This code is shared between Qt5 and KDE5 plugins, but KDE5 plugin uses SvpSalBitmap instead of Qt5Bitmap.
New image conversion process is borrowed from GTK plugin code.
This approach is used in order to properly process transparency channel if it's present, and it is present usually.
This change also fixes tdf#120789.
Change-Id: Ifdc64c3e5d80782955b52e2da8fcff4844d2dc25
Reviewed-on: https://gerrit.libreoffice.org/63862
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
|
|
Change-Id: I721910bbbd558827e9a5de1f8763426b460f08fa
Reviewed-on: https://gerrit.libreoffice.org/63861
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
|
|
Change-Id: I8d26503d68ed3dcc37574e247de3eae02b4e0f53
|
|
This finally enables opening a new frame and setting its menu from
an extension, but it is still far from stable, loads of threading
landmines like this all over the code
Change-Id: Icf4b67796b0669425ecb7c2c142c21e184024534
Reviewed-on: https://gerrit.libreoffice.org/62737
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
As described in the QMenuBar documentation,
a single ampersand in a menu item text is used to
set the shortcut for the menu, while "&&" is used to
get a real ampersand character.
Change-Id: Idf510641c8919ff8223114413851cb3ee7d7b4a2
Reviewed-on: https://gerrit.libreoffice.org/62405
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
|
|
which seem to have snuck back in since the great rounds of removals.
Change-Id: I85f7f5f4801c0b48dae8b50f51f83595b286d6a1
Reviewed-on: https://gerrit.libreoffice.org/62229
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If9b67bf866ed9fe38f69d440deeb2eccb87301bc
Reviewed-on: https://gerrit.libreoffice.org/62237
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
|
|
Menu entry dispatchers may be cleared (after they've been initially
set) when an extension comes with its own menu entries. Activating
the entry sets the dispatcher again so that dispatching a command
can proceed
Change-Id: I3909fb5eb6e6e2fa7db0418aca17009e60f01372
Reviewed-on: https://gerrit.libreoffice.org/62180
Tested-by: Jenkins
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
|
|
Change-Id: I145a496bbc5b375bc309815b18f2c31fa4d50d6c
Reviewed-on: https://gerrit.libreoffice.org/60012
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I8f987e30b2a78e173fd8f3ebb9f33e4720f6588b
Reviewed-on: https://gerrit.libreoffice.org/60011
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
Change-Id: I4758bc5afa9f9eaced7763b9923250f27df14259
Reviewed-on: https://gerrit.libreoffice.org/58834
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
this is meant to solve the problem of native menu bar overlapping
w/ non-native, as well as the inability to place an object or select
text dragging the mouse cursor w/ LMB pressed
Change-Id: I29f590ebf79d1ecc7e17b402125384cf13774bf3
Reviewed-on: https://gerrit.libreoffice.org/58171
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it.
This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes.
This commit adds missing headers to every file found by:
grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG')
to directory vcl
Change-Id: I205fe0f4e80a66cd9c3b19f7e9716411da1d1cf5
Reviewed-on: https://gerrit.libreoffice.org/58221
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Ia7f28a54f253f0263cc781feb5997bb51bb640b2
Reviewed-on: https://gerrit.libreoffice.org/55193
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I9539eb77f663e1174919ae801495801f81571710
|
|
just between us girls, I hate you clang-format
Change-Id: I4cd041eff7a9fa01eb9192cf357e3f07a26fa6ad
|
|
Change-Id: I015bbb0a337b917096ca6f542a73c24c79fbef7d
|
|
Change-Id: If64227af287006cb4f9b980dac97b2fb401eac88
|
|
Change-Id: I01997caa22e14c1350bd83100edb74397ebab5d7
|
|
Change-Id: If3a134f67f59d3238c27eb0fef99bf49a8970433
|
|
something's wrong though, they don't really show
Change-Id: Id8559fd9b6a5d4b2b49442d179571d31a99b5b20
|
|
Change-Id: I88bb70b1e443821cc8d1904039f2a8fb52df1ff9
|
|
Change-Id: Ieaac0966b167d82c8bdeb60f3ce4b9cc8589ec62
|
|
Change-Id: Icab19e31f7aa737351460790d2028114b24284ad
|