summaryrefslogtreecommitdiff
path: root/toolkit
AgeCommit message (Collapse)AuthorFilesLines
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin3-4/+4
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09tdf#124400 a11y: add accessible IDSamuel Thibault1-0/+13
Such ID is not meant to be presented to the user, but to be an ID which is stable over application development. Typically, this is the gtkbuilder ID. Such an ID can then be used to identify a given well-known accessible object independently from the current locale, user-visible labelling, or dialog structure. This can then be used for tailored screen reading (e.g. automatically announcing the content of a well-known object), or for automatic regression testing (to check the behavior of well-known objects). Uniqueness within the window is thus desirable when returning a non-empty string. This adds XAccessibleXContext2 to augment XAccessibleXContext with getAccessibleId(). The VCL implementation just takes Window::get_id(), i.e. the gtkbuilder id, which is enough for most use cases for now. atk_object_wrapper_new then passes it to atk_object_set_accessible_id() for AT-SPI technologies to pick it up. Change-Id: Iea0ad08d036e539dbcfec1a9be026c8da8d17357 Reviewed-on: https://gerrit.libreoffice.org/71743 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins
2019-05-08tdf#43157 Clean up OSL_VERIFY (replace with SAL_WARN)Jens Carl1-22/+48
Replace OSL_VERIFY with if-statement and SAL_WARN. Change-Id: I356a875e1364f3d16f562f3cfa0b41e0939e43d5 Reviewed-on: https://gerrit.libreoffice.org/71923 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-06Fix indentationSamuel Mehrbrodt1-1/+1
Change-Id: Icc3c1c601dcd2f950f5af4e2dbf2455a59636154 Reviewed-on: https://gerrit.libreoffice.org/71849 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-06Throw exception when peer for tabpage container is missingSamuel Mehrbrodt2-0/+6
To give extension developers a clue what is missing Change-Id: I4a4727bdbf0522f8dd398c7aa877e49235efeb86 Reviewed-on: https://gerrit.libreoffice.org/71751 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-02Use hasElements to check Sequence emptiness in [t-u]*Arkadiy Illarionov3-3/+3
Similar to clang-tidy readability-container-size-empty Change-Id: Idefe55e37f5c837c889548ffe7c5711400012a4d Reviewed-on: https://gerrit.libreoffice.org/71667 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-26Convert DBG_ASSERT to exceptionSamuel Mehrbrodt1-1/+4
Change-Id: I661de626d21df3ad2ec962a37e4bb33d53a958bc Reviewed-on: https://gerrit.libreoffice.org/71342 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-04-26Convert DBG_ASSERT to assertSamuel Mehrbrodt1-4/+2
Change-Id: Ia28bf8fa53fa81c73a422c2af280e0418bd2aaf0 Reviewed-on: https://gerrit.libreoffice.org/71341 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-04-26Fix typosSamuel Mehrbrodt2-3/+3
Change-Id: I155673b9b1b2ba1f275877ce7885cf3f99fcb2e3 Reviewed-on: https://gerrit.libreoffice.org/71340 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-04-17Fix uses of variables before their lifetimes beginStephan Bergmann1-1/+1
All of those have been broken with recent loplugin:sequentialassign changes (and have been found with a new plugin to be commited). The code in SbUnoClass::Find (basic/source/classes/sbunoobj.cxx) looks suspicious, but has been effectively like that ever since at least c25ec0608a167bcf1d891043f02273761c351701 "initial import", so just marked it with a TODO comment for now. Change-Id: I0d691cb55ef317cf2b16b0490169de7ec97375cf Reviewed-on: https://gerrit.libreoffice.org/70874 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-04-17tdf#122920 Send UNO mouse events to parent window listeners as wellSamuel Mehrbrodt1-34/+50
When user registers a mouse listener to a window, he expects to receive mouse events when a user clicks in somewhere in that window, even if it's technically a widget inside that window Change-Id: Ie6d3f8b140e4a5b516051014282b43775ecec59e Reviewed-on: https://gerrit.libreoffice.org/70512 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-04-15improve loplugin simplifyconstructNoel Grandin3-13/+12
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-15loplugin:sequentialassign in test..toolsNoel Grandin6-14/+7
Change-Id: I3a6c5807c3262dde6756551e9e955c4ceae09b4f Reviewed-on: https://gerrit.libreoffice.org/70732 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-10tdf#42949 Fix IWYU warnings in include/vclGabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. There were some changes since last run and some omitted files Change-Id: I666ac8ed7d06684e252ca590e3d7d454e9e10975 Reviewed-on: https://gerrit.libreoffice.org/70497 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-07Don't use resettable/clearable guard where plain guard is enoughMike Kaganski1-2/+2
Also use scope where possible. This allows to limit guard scope at language level; visualises the scope clearly; and helps avoiding errors like fixed in commit 61e4437c857854b331fa01da6f39b2b3b58a800b. Change-Id: Ifeca96e2df8e8a0897770d9546b2536806275f41 Reviewed-on: https://gerrit.libreoffice.org/70376 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-31tdf#120703 PVS: remove redundant static castsMike Kaganski1-2/+1
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I54976062dc3f62eaaa79f89eff54454f0b24ac2c Reviewed-on: https://gerrit.libreoffice.org/69989 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-28tdf#124385: toolkit: do not fail if ResourceListener is not definedVasily Melenchuk1-1/+8
If current control (for example TabPageContainer) is missing resource listener property we should not fail script with exception. Just behave as with empty ResourceListener. Change-Id: I260feec775a5d197bebc9414b652dd6f89e35035 Reviewed-on: https://gerrit.libreoffice.org/69740 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-03-28return by unique_ptr from createDefaultWidgetNoel Grandin1-8/+8
Change-Id: I2b2c944ed090173aba36395457a84985f0cf6665 Reviewed-on: https://gerrit.libreoffice.org/69794 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-24weld SvxSearchDialogCaolán McNamara1-0/+3
I have to use the other way to specify an a11y role, both are implemented in the vcl parser, but in my gtk3-3.24.7 the role tag crashes the gtk parser, while the other route works fine. The CONTENT_FLOWS_TO accessibility relation is another additional complexity over the norm Change-Id: Ia096bcbe9f00f9944e4e4d5ad9bb1a52d19c7b3f Reviewed-on: https://gerrit.libreoffice.org/69569 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-17tdf#120703 PVS: remove redundant static castsMike Kaganski1-1/+1
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I6d1523e71b3e06be1cf41abaabb44e49fe11cd8e Reviewed-on: https://gerrit.libreoffice.org/69369 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-11i#119731 Hyperlink Control on dialog EditorShubham Goyal1-0/+1
Change-Id: I34132931eba103aec5f9622be9c3bf2dd4de237d Reviewed-on: https://gerrit.libreoffice.org/69001 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-03-08tdf#123772 Add testSamuel Mehrbrodt2-0/+80
Change-Id: Id46bf2b293c4465f5c58f503c75904639d59f168 Reviewed-on: https://gerrit.libreoffice.org/68701 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-03-07log nice exception messages whereever possibleNoel Grandin3-8/+12
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin2-22/+22
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin2-22/+22
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin2-22/+22
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-01expand out IMPL_XTYPEPROVIDER_START macroNoel Grandin13-168/+408
and make cppu::OTypeCollection::getTypes be const Change-Id: I2dd1c0bacb2e1872f8b7a0da72f73013b04bef3c Reviewed-on: https://gerrit.libreoffice.org/68536 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-01Fix typoSamuel Mehrbrodt1-1/+1
Change-Id: I9af60e867813e4222183517dfebbfef11d256b83 Reviewed-on: https://gerrit.libreoffice.org/68530 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-01tdf#123772 UnoControlDialogModel: Don't ignore property "Sizeable"Samuel Mehrbrodt1-0/+10
which is supposed to make the dialog resizable, but was silently ignored. Change-Id: Ifa2d2ea70c769f7785ac044ab2b681802c54bc17 Reviewed-on: https://gerrit.libreoffice.org/68515 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-02-27loplugin:unnecessaryoverride look for more patternsNoel Grandin2-27/+0
like bool Foo::bar() { b = Super::bar(); return b; } Change-Id: I5e4c8005a3da7d7487c9039c35dcbb1d17e65bd7 Reviewed-on: https://gerrit.libreoffice.org/68418 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-22loplugin:unusedfields in toolkitNoel Grandin2-9/+2
Change-Id: Ida146892e786aa05cd9b94cd647a1c5849ecc2ce Reviewed-on: https://gerrit.libreoffice.org/68162 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18fix comparison of std::lower_bound resultNoel Grandin1-1/+2
turns out using a compare operator that takes something other than the element type as a parameter is really hard to get right. The changes in: basic/source/classes/propacc.cxx comphelper/source/property/propagg.cxx vcl/source/font/font.cxx are a regression from commit 35e80e9726b5fee6a00caa58349a4b5d924dad7c Date: Fri Oct 19 16:01:19 2018 +0200 when calling std::lower_bound The change in toolkit/source/awt/vclxtoolkit.cxx is a regression from commit 76dd28afc9c0eb632a5dd20eb51704ee0bbc4b58 Date: Tue Oct 9 16:27:11 2018 +0200 loplugin:staticvar in various Change-Id: Icf6db22e1fc091517a53dd3624913c8c2071c106 Reviewed-on: https://gerrit.libreoffice.org/67954 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-14tdf#123439 Assert wrt PointerStyle fails when moving cursor over toolbarNoel Grandin1-1/+1
regression from commit a2b687a88feedfae0087bfc999b3cf49b9d3d24b Date: Tue Feb 12 10:12:03 2019 +0200 Pointer is pointless Change-Id: I727e68c71f4ebacb9adae83f1f9b43ce999d5374 Reviewed-on: https://gerrit.libreoffice.org/67803 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13Pointer is pointlessNoel Grandin1-2/+2
since it is just a wrapper around PointerStyle Change-Id: I51f065e0d4ad8bd91f5c84c5819048c720a19267 Reviewed-on: https://gerrit.libreoffice.org/67711 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11new loplugin writeonlyvarsNoel Grandin1-6/+0
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski1-1/+1
Change-Id: I62cb3b8927d664b3d5359ee6ac7db30d354f4821 Reviewed-on: https://gerrit.libreoffice.org/67496 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-02-11loplugin:indentation in lingucomponent..toolsNoel Grandin12-33/+31
Change-Id: I96ed4c51ce3fe45c1cb69a7d7ff917f1e152462e Reviewed-on: https://gerrit.libreoffice.org/67607 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-08Avoid index for single getToken callMatteo Casalin1-2/+1
Change-Id: I4b7dfd024369258efb84ec8d1c1cd16f4a7aa730 Reviewed-on: https://gerrit.libreoffice.org/66944 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-02-06basic: fix for UnoControlTabPageModel get/set propertiesVasily Melenchuk1-2/+3
The userformscontainers is required property to pass checks in getter/setter, but returning true instead of actual type is not a best idea. So let's return actually expected dummy empty container. Change-Id: I5cc3e5462ed82f6f2f8e5a45d9fc2d9f9ce1c76f Reviewed-on: https://gerrit.libreoffice.org/67431 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2019-02-04tdf#87884: UnoControlTabPageModel is using tabs w/o WB_NOBORDERVasily Melenchuk1-1/+4
No border attribute is a special case for vcl/TabControl, so by defualt created with corresponding UNO interface tabs were invisible. To create invisible tabs there is already "tabcontrolnotabs"(?) Change-Id: I3cc9baef9106f6c3fb5688daadbb5844d2b2a008 Reviewed-on: https://gerrit.libreoffice.org/67188 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-02-04tdf#87884: basic: fix for UnknownPropertyExceptionVasily Melenchuk1-0/+7
UnoControlTabPageModel had no USERFOMRCONTAINERS property and this was causing an exception during any attempt to set its properties. Change-Id: Icc432d7a431ecd861ac4f00a96ec75165bec168c Reviewed-on: https://gerrit.libreoffice.org/66801 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2019-01-23Replace macro with templateStephan Bergmann2-15/+15
Change-Id: I0b444eae51b65caf740e625e65137ff9ff8ce4da Reviewed-on: https://gerrit.libreoffice.org/66782 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-15tdf#42949 Fix IWYU warnings in include/toolkit/*Gabor Kelemen22-1/+28
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Icebcf1a6ab073dce935a74ce79ee0f302b62e8a8 Reviewed-on: https://gerrit.libreoffice.org/65947 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-14tdf#122250 Crash when running extensionNoel Grandin1-0/+2
as a consequence of commit 4e07987ce8134312920682e3481c3f8e3d7b66c3 Date: Thu Aug 25 15:08:55 2016 +0200 cid#1371154 Missing move assignment operator this extensions appears to pass bogus data into VCLXWindow::setProperty, so I had to workaround that when debugging Change-Id: Ib6728c0a990bd7cfbfed43d79b7560bd2f7f5a67 Reviewed-on: https://gerrit.libreoffice.org/66293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-11Replace OUStringBuffer::appendCopy with append(std::u16string_view)Stephan Bergmann1-3/+3
...which is more general Change-Id: I94f28f8eda887120cf5f143b4549e0339b60e6a7 Reviewed-on: https://gerrit.libreoffice.org/66155 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-08convert "*xxx.get()" to "*xxx"Noel Grandin1-1/+1
Change-Id: Ic307226591ff9702957ccdec486ccf70357eb6d9 Reviewed-on: https://gerrit.libreoffice.org/65951 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-07tdf#42949 Fix IWYU warnings in include/vcl/[v-x]*Gabor Kelemen5-0/+6
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I98f49765c6b74808dcbd692e0f375dd2848fcfd4 Reviewed-on: https://gerrit.libreoffice.org/65614 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-11loplugin:useuniqueptr in svtools,toolkitsNoel Grandin1-5/+4
Change-Id: Ied7768293e7781772205c9e8f9fb743a584e3125 Reviewed-on: https://gerrit.libreoffice.org/64880 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-10tdf#42949 Fix IWYU warnings in include/vcl/s*Gabor Kelemen3-1/+3
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ie87d27dd2c385a63349e0b322fd067ba03d2d152 Reviewed-on: https://gerrit.libreoffice.org/64479 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann2-2/+2
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>