summaryrefslogtreecommitdiff
path: root/toolkit
AgeCommit message (Collapse)AuthorFilesLines
2019-08-12Fix typosAndrea Gelmini6-8/+8
Change-Id: Ic472270afa13d2c96a4c7ccc185d183c3b7ade2c Reviewed-on: https://gerrit.libreoffice.org/77277 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-08tdf#74702: use OutputDevice::GetBackgroundColor()Chris Sherlock1-1/+1
Apply the Liskov substitution principle to OutputDevice::GetBackgroundColor(). This helps in SmTmpDevice::Impl_GetColor() because it no longer needs to know about what type of OutputDevice it is calling to get the background color. This forced a rename of basctl::ModulWindowLayout::GetBackgroundColor() to be GetSyntaxBackgroundColor(), but this is a happy coincidence as it makes the function intent clearer anyway. Change-Id: I11298a63cb01c187f3a8a4a2c9e90eacda6c3e6b Reviewed-on: https://gerrit.libreoffice.org/75521 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-08-07Resolves: tdf#126717 default that formcontrols show acceleratorsCaolán McNamara1-0/+3
Change-Id: I755cb19d08ae2a2036a86422d2e455c1033a54df Reviewed-on: https://gerrit.libreoffice.org/77085 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): toolkitStephan Bergmann30-114/+114
Change-Id: I598d89be70d476663ffef95029015cba17bf09b9 Reviewed-on: https://gerrit.libreoffice.org/76636 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-21loplugin:referencecasting in test..toolkitNoel Grandin7-29/+20
Change-Id: Ib1e6ba9c3849256b81fa5fa395e891226a044f7c Reviewed-on: https://gerrit.libreoffice.org/76029 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-19tdf#125609 toolkit: don't use XTabController::getControlsJustin Luth1-8/+7
Calling XTabController::getControls was supposed to give performance improvements (coded in OOo), but it pulls cached information which is not up to date if this listener for elementInserted events is handled before the formController's listener. It is missing the most recently created control - and thus it never sees the last control in the form, and fails to create the radio group. Additionally, when all of the controls are not yet created, this function seems to be designed to catch that and immediately return. With the "optimization" the missing controls were never noticed, and so unnecessary processing continued - a performance detriment while the form is being built. My impresssion is that the local getControl() function is not terribly inefficient, so the performance impact seems minimal, especially since it now only makes the call once and caches the result itself. Since not-yet-peered controls cause the function to again terminate early (as it was designed to do), this may have unintended side effects, in case anything was designed in the past 10+ years expecting the old behaviour, so I have no intention of back-porting this. Change-Id: Ica8ddab69043a30b23d008cd8db5df1c13b94ad2 Reviewed-on: https://gerrit.libreoffice.org/75163 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
2019-07-18cid#1448511 silence Out-of-bounds accessCaolán McNamara1-0/+1
Change-Id: I11920faa3327bfc74e9bfe8a94864a9caaa9b147 Reviewed-on: https://gerrit.libreoffice.org/75803 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-04remove some unneede vcl/bitmap.hxx includesNoel Grandin1-1/+0
Change-Id: Ibdc79538276992193e61f6dc16ddd3fd1ab80b82 Reviewed-on: https://gerrit.libreoffice.org/75069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-30Simplify Sequence iterations in toolkitArkadiy Illarionov19-307/+214
Use range-based loops or replace with STL functions Change-Id: I8129ca201dd7017fc4064b04834f41d69cc01274 Reviewed-on: https://gerrit.libreoffice.org/74926 Tested-by: Jenkins Reviewed-by: Arkadiy Illarionov <qarkai@gmail.com>
2019-06-21VCL 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>
2019-06-21simplify some getSupportedServiceNamesNoel Grandin2-4/+2
Change-Id: I81195505d6006b6587f7b98c1545919083f0e588 Reviewed-on: https://gerrit.libreoffice.org/74497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-18tdf#39593 Remove toolkit::GridColumn::getImplementationArkadiy Illarionov3-13/+4
Replace with comphelper::getUnoTunnelImplementation. Change-Id: I6b32cf388f32e7aa8f073daea0423fcbf169386d Reviewed-on: https://gerrit.libreoffice.org/74235 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-18loplugin:logexceptionnicely in toolkit..unoxmlNoel Grandin1-4/+4
Change-Id: I0a3126545f9ef98640f6dd166290e9b9e91b8355 Reviewed-on: https://gerrit.libreoffice.org/74244 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-17Add comphelper::getUnoTunnelImplementation templateArkadiy Illarionov8-15/+15
Use it instead of classname::getImplementation from UNO3_GETIMPLEMENTATION_* Change-Id: Ifcc8cfcd6369c576250008c76ce31ba79ea3a596 Reviewed-on: https://gerrit.libreoffice.org/74107 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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/73956 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-12weld OrganizeDialogCaolán McNamara1-1/+1
Change-Id: I976edb0b49c8439d1723be4544b10a5375b8e1d3 Reviewed-on: https://gerrit.libreoffice.org/73755 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-06-12toolkit: initialize primitive types explicitlyAshod Nakashian1-3/+3
Change-Id: I1e09d458d1c6c4842750368fbd45ef326fa1bedb Reviewed-on: https://gerrit.libreoffice.org/70160 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/73491 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2019-06-04tdf#39593 remove IMPL_XUNOTUNNEL* macrosArkadiy Illarionov14-47/+41
Replace with UNO3_GETIMPLEMENTATION* macros. Replace single usage of IMPL_XUNOTUNNEL_MINIMAL with it's body. Change-Id: I7d4ad76399b999ebb2178ecf57edcf6bd2aa6c3e Reviewed-on: https://gerrit.libreoffice.org/73424 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@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>