summaryrefslogtreecommitdiff
path: root/toolkit
AgeCommit message (Collapse)AuthorFilesLines
2019-09-05tdf#93998 toolkit: restore support for setting dialog background from shapeMiklos Vajna2-4/+23
Regression from commit fb29e6eeeaad5255bb924ff59162a83ed80bfb0a (svx: removing GraphicURL and OWN_ATTR_GRAFURL, fix writerfilter, 2018-03-08), the problem was that an in-document macro tried to assign a bitmap shape to a dialog background, which broke during the image handling rework. Note that in this case the actual type of the "URL" is not interesting, we can just return an XGraphic and then take it on the other side as well, without re-introducing the intentionally removed graphic URLs which point to memory addresses. This also made it necessary to extend UnoDialogControl::ImplModelPropertiesChanged(), so that in case a graphic is assigned to the dialog model, then the dialog model -> dialog sync code doesn't just copy over the empty image URL string. With this, finally clicking on the button of the bugdoc makes the dialog show up with the correct background. (cherry picked from commit 3341986547b69bcb4c38e4ccb2f0853a3a569bb5) Change-Id: Id78269643289efb435b96a6a0b9f8a93fa49ec04 Reviewed-on: https://gerrit.libreoffice.org/78171 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-22VCL merge most of NotebookbarTabControlBaseJan-Marek Glogowski1-1/+1
NotebookbarTabControlBase (NBBTCB) tried to be clever and save a bool per TabControl page, by not adding a mbVisible to the ImplTabItem and misuse mbEnabled. The result is not only a bug with tab highlighting in notebook bars, but also a lot of duplicate code and additional virtual functions. Normal TabControls highlight correct. I'm not 100% sure about the dropped Resize()s, but the code in ImplPaint() and calculateRequisition() differs by three lines; which can be merged by adding the TabControl feature to hide tabs and not just disable them. I first tried to additionally merge ImplPlaceTabs() too, but the NBBTCB version differs much more and I didn't want to touch larger parts of TabControl. Change-Id: Ie6e18fb03b76b46e3627923eb1ac0f674c3eb7e8 Reviewed-on: https://gerrit.libreoffice.org/74126 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 6540912ae1a570fd8c2318f77b757e07b87c0707) Reviewed-on: https://gerrit.libreoffice.org/74568
2019-06-13unopkg gui crashes on shutdownCaolán McNamara1-1/+1
since... commit e655dc8bbf010e5ef89c32c2ebde56281b323925 Date: Thu May 9 18:24:18 2019 +0100 unipoll: let InitVCL tolerate double init. which changed InitVCL to return true if it was already initialized, tricking toolkit into thinking it was the first one to call InitVCL Change-Id: I33552a5e2caca909f8d63fbf5f23b9fbc4c2dfbd Reviewed-on: https://gerrit.libreoffice.org/73957 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-13weld OrganizeDialogCaolán McNamara1-1/+1
Change-Id: I976edb0b49c8439d1723be4544b10a5375b8e1d3 Reviewed-on: https://gerrit.libreoffice.org/73900 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-22New loplugin:dataStephan Bergmann1-1/+1
...following up on 1453c2c8f13bac64ecd1981af7cebf1c421808ac "prefer vector::data to &vector[0]" Change-Id: I7c113747d92d144a521d49b89384dd8bf1215c01 Reviewed-on: https://gerrit.libreoffice.org/72765 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-21Related tdf#122920 Treat UNO key events the same as mouse eventsSamuel Mehrbrodt1-15/+18
by sending the notifications to the parent windows as well Change-Id: Ibb33f608d7b9c3871aadd0c13db32effd99fe698 Reviewed-on: https://gerrit.libreoffice.org/72675 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-21tdf#125397: Fixes for threads and SolarMutex on iOSTor Lillqvist1-1/+8
We need to call SfxApplication::GetOrCreate() in lo_initialize() now. Otherwise we will crash in sfx2. No idea why it worked earlier. I think we want to avoid the "VCLXToolkit VCL main thread" ever running in the iOS app. I don't think we had it running earlier, but now for some reason it got started when creating a document from a template, and that seemed to cause a hang. Also, when creating a document from a template, lo_initialize() is called from the app's real main thread (the one that the process starts in). In that case we do want to release the SolarMutex after InitVCL() if this was the first time we called InitVCL(). Awful crack. Not really sure I fully understand all that is going on, but this change does seem to fix recent problems... All this thread and SolarMutex stuff is so incredibly fragile. Change-Id: Ib04498ad199b64f27701f89d2df7003bca316406
2019-05-19tdf#125207 [API CHANGE] extend css.awt.PrinterServer: XPrinterServer2brinzing1-1/+6
Change-Id: Ic2df8ac676ae786d9c0ea2ab3619f9f9de087ca7 Reviewed-on: https://gerrit.libreoffice.org/72135 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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>