summaryrefslogtreecommitdiff
path: root/vcl/source/window
AgeCommit message (Collapse)Author
2020-02-03make some headers privateCaolán McNamara
as shown with ./bin/find-headers-to-move-inside-modules.py Change-Id: I7662417e76fe00c0fc352957560e104b6c2a3d61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87850 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-03loplugin:unusedmethodsNoel Grandin
Change-Id: I8a2d86145a951bcaae891240b1ed6f539d93634c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87854 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-02don't include vcl/button.hxx from vcl/layout.hxxCaolán McNamara
Change-Id: I16a1b392c33734ef89f26e7ff9318573e9bfce88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87817 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-01no direct users of slider.hxx outside vcl anymoreCaolán McNamara
Change-Id: I6bf80bb125512a483aba3aed3c5a6a16d14e31d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87755 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-01support arbitrary widgets in toolbars via children of GtkToolItemCaolán McNamara
Change-Id: I6dcc146ba3a55f263f71e29a17b5e75de2bbe130 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87784 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-31loplugin:singlevalfieldsNoel Grandin
Change-Id: I77ccf3f36363e182a644b98cdf720f1381a5cceb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87766 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-30loplugin:unusedfieldsNoel Grandin
Change-Id: Ifb9c91b3e8d6c2dd3a639a239fa41e7d5c7a4ee6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87735 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-30vcl: fix UB in vcl::Cursor::ImplDoShow()Miklos Vajna
pWindow->mpWindowImpl can be nullptr here, see online.git's unit-load-torture test: vcl/source/window/cursor.cxx:204:54: runtime error: member access within null pointer of type 'WindowImpl' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior vcl/source/window/cursor.cxx:204:54 in (And one more similar case in Window::ImplGrabFocus().) Change-Id: Idd145082b58c10139be53e9b997efedeb0cec364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87709 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-01-29Resolves: tdf#130130 Insert menu, multiple hotkey never reaches 3rd itemCaolán McNamara
Change-Id: Ica70be71094229a12c16eee1d3ff6960b7e06734 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87657 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-28the only VclComboBoxNumeric left has a patternCaolán McNamara
so the !pattern case is dead Change-Id: Ib8d8c2fc4d9929cf5b66f389fddc23189448bd47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87639 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-28move private TimeBox to toolkit-only headersCaolán McNamara
move private DateBox to toolkit-only headers move private CurrencyBox to toolkit-only headers move private PatternBox to toolkit-only headers move private CurrencyField to toolkit-only headers move private CurrencyFormatter to toolkit-only headers Change-Id: If5ba9e07b20cdc69ca554af388ec9d9e362cbf9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87555 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-28New loplugin:unsignedcompareStephan Bergmann
"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>
2020-01-26remove some unused local varsNoel Grandin
found by a more aggressive variant of loplugin:unusedvariables. This is my first pass, committing the simplest and most obviously unnecessary vars Change-Id: I9676a6e39a101937097788548764506c93811c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87414 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-26rename some local variablesNoel Grandin
mostly to make the job of my very aggressive unused local vars plugin easier Change-Id: Ifc21a920841f8589f8b7e10de39dba6622a5d501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87399 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-25tdf#130137 Replace remaining uses of WNT define checks with _WIN32A_GAN
Change-Id: If95f1ea5a81de62eb4f725e5fcb30ccb8530062a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87372 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-24loplugin:makeshared in svgio..writerperfectNoel Grandin
Change-Id: I0f8de0f78c7a8fb78d47ee5dfed09019b4eb5288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87357 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-23Avoid explicit casts to smaller sal_uInt16 from larger long resp. intStephan Bergmann
...in what might be attempts to avoid warnings about signed vs. unsigned comparisons Change-Id: I9d6b9f1fce6de829103c5c35d5d606ce0398807a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87241 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-21weld gallery panelCaolán McNamara
Change-Id: I4aebb3f90e9943044d106a507972c39434988f03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87003 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-20loplugin:unusedfieldsNoel Grandin
Change-Id: If130c8a4861998d7eafd2e9525592f3c811ec21c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-20loplugin:unusedmethodsNoel Grandin
Change-Id: Ie5e90b3c834a1154ec49dc765a5031f6bdd35923 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87070 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-19tdf#74702: clean up of OutputDevice::SetMapModeAdrien Ollier
All changes are formatted using clang-format utility. Change-Id: Icfa7ae22bc06e57c7f7cb512813966dcefd4fc40 Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/83601 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2020-01-18Remove redundant castsStephan Bergmann
They had been added with d2986be1a8d896782b8cb846b0028eaa752e0384 "INTEGRATION: CWS vcl83: #i82823# remove warnings (thanks pjanik)" before dbbf365921b50009db8ea86b90c99f3a26c467bc "INTEGRATION: CWS vcl87: #i86882# use long for gemoetry like the rest of the Sal interface does" changed the SalFrameGeometry::n*Decoration members from 'unsinged int' to 'unsigned long'. So back then the sums were of type 'long' + 'long' + 'long' + 'unsigned int' => 'long' or 'unsigned long' (depending on whether 'long' is larger than 'int'), while now it is 'long' + 'long' + 'long' + 'unsigned long' => 'unsigned long' Change-Id: Ia8c7a8ccd858675c909e39497256be7783a8fd2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87012 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-16drop Application::GetAppWindowCaolán McNamara
Change-Id: I8f1640b0ed816101305a893646de8ed9750d1247 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86889 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2020-01-14Related: tdf#127782 resize the print dialog to its optimum size...Caolán McNamara
after expander is activated Change-Id: I3f87243f0502829e048173987c8998898d351adf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86575 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-01-13loplugin:unusedmethodsNoel Grandin
Change-Id: I4eae284cf763b260dd9349bf8d31f46612916de1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86654 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-10lok: avoid emission storms of un-necessary invalidations.Michael Meeks
Common when constructing widgets with VclBuilder - which avoids the 'Show' detection Pranav introduced in 8de98e61fbc. This saves ~80% of the ~100k mostly bogus calls I get to: desktop::CallbackFlushHandler::processWindowEvent when opening and closing a few windows. Change-Id: Ie508d6e19274472b85543275aee33f078ddcbbb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86534 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-09android: avoid expensive load of un-used sidebar icons on mobile.Michael Meeks
Change-Id: I34c24c40009eeb4e8edbac785f9367f1dc3d56c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86468 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-08add a scheme to host welded toolbar dropdown windows in unwelded toolbarsCaolán McNamara
Change-Id: I72c9896798740a760eac479bdccaf7825872c01b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86420 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-01-08tdf#129879 Fix wrong order of buttonsTomáš Chvátal
Change-Id: I0cb135c5b8298fd7c5579673d0eaff7068a03842 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86425 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Jenkins
2020-01-07Use virtual method instead of switch in parent classAdrien Ollier
Change-Id: I53129ed6b57eb13898a426de0a2ba72c7d6674de Signed-off-by: Adrien Ollier <adr.ollier@hotmail.fr> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/83825 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-01-06Removed redundant semicolonsAndrea Gelmini
Change-Id: Ife14b8c3f7d121deb390deb5f405dd42d3016acf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86156 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-01-02tdf#129662 vcl: rtl: fix scrollbar in dropdownsMiklos Vajna
Regression from commit d4714b0fdb81e6e561ae526cc517ecc9a40a603e (tdf#101978 vcl combobox/listbox floating window: avoid flicker, 2019-06-17). High-level vcl double-buffering never set up RTL status of the virtual device correctly, but now that double-buffering is used at more places, this got noticed. Change-Id: Iba378cef3a693b0712389fab519f38ee222577d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86134 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-26tdf#129004 Make shift+F6 cycle order reverse of F6Jim Raykowski
Change-Id: I52013b4c54ef5e457d9fa19210d08d9c042fed45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/83637 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2019-12-24sal_Char->char in vclNoel Grandin
Change-Id: I4359b7042f98586e2c9f5529d83d769cdf3d033c Reviewed-on: https://gerrit.libreoffice.org/85775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-23sfx2: tolerate missing LOKNotifier on FloatingWindow hideAshod Nakashian
It seems the assumption is that if we get to hide state then we must have initialized properly and set a LOKNotifier. But this seems not to always hold, for whatever reason. Here we are more forgiving if we don't have LOKNotifier. Change-Id: Id21ec83489776f34228dd31f63e711b0dd77af55 Reviewed-on: https://gerrit.libreoffice.org/85401 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> (cherry picked from commit 25d8db8598ac54fe3ef1d6f40076ff19db87cd2f) Reviewed-on: https://gerrit.libreoffice.org/85686 Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-23vcl: don't use null window in FloatingWindow HitTestAshod Nakashian
Change-Id: I551f31cf30c7a58642becebe0256684055d0703a Reviewed-on: https://gerrit.libreoffice.org/85383 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 65685bac09a4320602f4dda5151d247c5a83a75c) Reviewed-on: https://gerrit.libreoffice.org/85402 Tested-by: Jenkins
2019-12-20tdf#127022 vcl: fix Windows RTL menu barMiklos Vajna
Regression from commit e8d5b8beb5958147235ff955ed38c47b51d860ff (tdf#113714 vcl menu bar window: avoid flicker, 2019-05-20), the problem was that while the original render context has RTL set up correctly, the intermediate virtual device had it disabled all the time. Change-Id: Ic063c4a6c0537891c0bfceb8927edb97cf1c6e86 Reviewed-on: https://gerrit.libreoffice.org/85624 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-12-19get native gtk widgets in sidebars workingCaolán McNamara
Change-Id: If65aef1249f54a87d7854c3fa2db4319a24a5a05 Reviewed-on: https://gerrit.libreoffice.org/85326 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-19add a SystemChildWindow::GetOptimalSize overrideCaolán McNamara
Change-Id: I812d996e78a6d627fda6612307ca4cb2f111b6a9 Reviewed-on: https://gerrit.libreoffice.org/85325 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-18lok: vcl: fix multiple floatwin removal case more robustly.Michael Meeks
Instead of this over-clever approach of recursively removing items which can easily fail, build a list, then iterate it in-line while disabling recursion. also includes: lok: vcl: fix multiple floatwin removal case. We need to progress in our while loop to remove children, even if they are currently not in popup-mode; fixes infinite loop with two popups present concurrently. Change-Id: Ic7b7f8e13a466d254abe53b77bc166c6a89fa8c3 Reviewed-on: https://gerrit.libreoffice.org/85368 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-18Fix typoAndrea Gelmini
Change-Id: Ic1daa649bbe73f2237f4e83e85cda88ba041e1f3 Reviewed-on: https://gerrit.libreoffice.org/85365 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-18Fix typoAndrea Gelmini
Change-Id: I2bebd1ea9e8bd7815f6a0fccf5a87af68c84fbb7 Reviewed-on: https://gerrit.libreoffice.org/85364 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-12-18vcl: sfx2: LOK: Support per-view popup windowsAshod Nakashian
While we do support multiple views, there is only one state for popup/floating windows, that also includes the dialogs open and related windows/data. This adds support to allow each view to have its own popups and state, thus allowing multiple users to interact with the dialogs independently of one another. (cherry picked from commit b50c341a53911f1d725947a4d8d3d2f782c94079) Change-Id: I3786a561ca6ca113ad12425bdb491e5a30bd1a28 Reviewed-on: https://gerrit.libreoffice.org/82440 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/85221 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-12-17loplugin:expandablemethodsNoel Grandin
Change-Id: Ifc269d9996928085a3ab78033788465b4f029368 Reviewed-on: https://gerrit.libreoffice.org/85255 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-16sidebar: check for valid current deck before closingAshod Nakashian
Also, cleanup unused/unnecessary LOKNotifier logic from Deck.cxx and use emplace_back where possible. Change-Id: I300c5158b12593e8130f5b6273c1ea3bcbefea7f Reviewed-on: https://gerrit.libreoffice.org/82402 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-12-14tdf#127148 select-all on tabbing into version box in help->aboutCaolán McNamara
and allow select-all in readonly multiline edits too. Arguably this might be a universal settings, but just enable it for the about dialog for now. Change-Id: Ic2e64fe26593adf4ae630d1be1a7b196a5a0216c Reviewed-on: https://gerrit.libreoffice.org/85127 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-12-12tdf#123076 Get paper size for print previewGabor Kelemen
Initialize from current paper size which can be different from A4 Change-Id: Iae5e33d79c0783a32dad8635a66cc3fbe83dc568 Reviewed-on: https://gerrit.libreoffice.org/84920 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2019-12-12Remove some redundant user-provided dtorsStephan Bergmann
...which silences various -Wdeprecated-copy-dtor warnings from Clang 10 trunk about copy functions being implicitly defined as non-deleted even though the class has a user-declared dtor Change-Id: I3409d403c3c709de4ad94eccbc2d7869e41847cc Reviewed-on: https://gerrit.libreoffice.org/85032 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-12-11lok: Support per-view help dataTamás Zolnai
Used for showing tooltip windows in LO online. Change-Id: I8b6a7272c75025e717923c839fa8fd9f4cab2903 Reviewed-on: https://gerrit.libreoffice.org/84717 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/84803 Tested-by: Jenkins
2019-12-11tdf#105518 F6: Skip infobar when it has no childrenJim Raykowski
Change-Id: Id5375d9acfd20844a56da20fcf08c709423f75e0 Reviewed-on: https://gerrit.libreoffice.org/83636 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>