summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-09-22vcl: [loplugin:badstatics] pManagerMichael Stahl
Move this to class GenericUnixSalData, which is deleted on shutdown. Change-Id: I6366c12f255bfeca737b22259c3f58ffa2c6222c Reviewed-on: https://gerrit.libreoffice.org/42632 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-22move TestImportOLE2 where it can be used by fftesterCaolán McNamara
Change-Id: I7b41d9ec673cfb96f51b5008540df63fe78a7581 Reviewed-on: https://gerrit.libreoffice.org/42639 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-22vcl: [loplugin:badstatics] aAppMichael Stahl
DemoApp::xMSF doesn't need to be a member. Change-Id: I3b2d0d4c58ab04e0a82b31938c5f64b274ca004e
2017-09-22vcl: [loplugin:badstatics] aApplicationMichael Stahl
VisualBackendTestApp::xMSF doesn't need to be a member. Change-Id: I307ba56377b822a148db809c16b8ff05708d0ca7
2017-09-22vcl: [loplugin:badstatics] PPDParserMichael Stahl
class PPDContext actually looks harmless but it has an out-of-line destructor so the plugin can't see that it's harmless, so use default destructor instead. Change-Id: I921a4cdaeb5c8fe286615162b9e9c2a8db47b300 Reviewed-on: https://gerrit.libreoffice.org/42633 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-22vcl: [loplugin:badstatics] aInstanceMichael Stahl
Move this to struct ImplSVWinData, which is deleted on shutdown. Change-Id: Ie604c2105f1176858b4050fb34d37cf376f8f82a Reviewed-on: https://gerrit.libreoffice.org/42631 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-22vcl: [loplugin:badstatics] xCharClassMichael Stahl
There's even 2 of these; move them to struct ImplSVData which is deleted on shutdown. Change-Id: I8040cd6f9f31c0a1ab48987a490395f316d52220 Reviewed-on: https://gerrit.libreoffice.org/42630 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-22tdf#111994 WIN workaround PostMessage delaysJan-Marek Glogowski
Fixes the "Multiple timers in queue" assertion by effectively removing it. When debugging it became obvious, that PostMessage returns, even if the message was not yet added to the message queue. The assert happens, because we start the timer in the Scheduler before Invoke(), so it fires, if we block in Invoke(), and then reset the timer after Invoke, if there were changes to the Task list. In this case it fires during Invoke(), the message is added. We restart the timer, first by stopping it (we wait in DeleteTimerQueueTimer, to be sure the timer function has either finished or was not run). And the try to remove the message with PeekMessageW, which doesn't remove the posted message. Then the timer is restarted, and when the event is processed, we end up with an additional timer event, which was asserted. As a fix this adds a (microsecond) timestamp to the timer message, which is validated in the WinProc function. So if we stop the timer too fast, the event is ignored based on the timestamp. And while at it, the patch moves timer related variables from SalData into WinSalTimer. Change-Id: Ib840a421e8bd040d40f39473e1d44491e5b332bd Reviewed-on: https://gerrit.libreoffice.org/42575 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-22Fix typosAndrea Gelmini
Change-Id: I51700733fda3a08570085ed6745961cd1680eabd Reviewed-on: https://gerrit.libreoffice.org/42588 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-09-21Ignore AquaBlinker on Scheduler shutdownJan-Marek Glogowski
Change-Id: If107d2ac01b7be91be34ff753b52f307a6e10f58
2017-09-21ofz#3454 Floating-point-exceptionCaolán McNamara
Change-Id: I2432bff8e1c102b83f0b7aff1303a03539ce0350 Reviewed-on: https://gerrit.libreoffice.org/42580 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-21Rename GetSelectEntryPos -> GetSelectedEntryPosSamuel Mehrbrodt
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4 Reviewed-on: https://gerrit.libreoffice.org/42283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21Rename GetSelectEntry -> GetSelectedEntrySamuel Mehrbrodt
Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce Reviewed-on: https://gerrit.libreoffice.org/42282 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21Workaround static Task destruction errorJan-Marek Glogowski
A task has to get the SchedulerLock to remove itself from the Scheduler list. This doesn't work, if the Task is static, as the static Scheduler might be destroyed earlier. In this case we fail with the following backtrace: #0 SchedulerMutex::acquire #1 Task::~Task #2 __run_exit_handlers Thanks to Michael Stahl to catching this backtrace. As a workaround this marks static tasks, so they ignore the SchedulerMutex in the destructor, We also mark all scheduled Tasks as "static" in DeInitScheduler, as their cleanup was already done. In the end all Tasks should be removed from static objects. Change-Id: I38be3206378b9449193efaccbc96896ac8de9478 Reviewed-on: https://gerrit.libreoffice.org/42574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-21add fods fuzzerCaolán McNamara
Change-Id: I3cc5a0d8bb24dd33b63ed82866a4acfb7a2dd043 Reviewed-on: https://gerrit.libreoffice.org/42459 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-21ofz#2869 avoid oom with bmp rle imagesCaolán McNamara
and to the sanity checks on remaining data size *after* the seek to the offset, which requires moving the read of the palette to remain before that seek Change-Id: I687a79fb3f109556c1a7aaa9423f77a1eb98a3cf Reviewed-on: https://gerrit.libreoffice.org/42461 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-21WaE: -Wunused-variableTor Lillqvist
Change-Id: I6bcc39cd749f8cdbe550b94346c5cb8fd9f67097
2017-09-21tdf#99784 OSX run GUI stuff in the main threadJan-Marek Glogowski
The extension manager starts dialogs from its own thread. But the OSX backend currently doesn't defer these calls to the main thread. This implements the deference by running the called function in the main thread, using a code ^Block, and returning the result via a SalYieldMutex member. Change-Id: Id8977991e3eda91da27c23d8021e028d4f4cefe5 Reviewed-on: https://gerrit.libreoffice.org/42448 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-20Related: tdf#101881 keys not handled by native menubar sent to vcl oneCaolán McNamara
so 'o' pops up native menu, shift+o is unhandled by native, sent to vcl one which pops up some shoddy emulated version of the o menu Change-Id: Id6b0d27dd81f8a6d141cef79cc4825703c923636 Reviewed-on: https://gerrit.libreoffice.org/42538 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-20Ignore DrawWorkStartupTimer on Scheduler shutdownJan-Marek Glogowski
Change-Id: Ia0cf4311b42dfa170ce429a958a26afd9c70ff0c
2017-09-19rename GetGenericData to GetGenericUnixSalDataNoel Grandin
Change-Id: Id95334da347c8341d9d190307603218eedb9c1e6 Reviewed-on: https://gerrit.libreoffice.org/42457 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-19rename SalGenericData to GenericUnixSalDataNoel Grandin
since it's generic over the various unixen, not anything else Change-Id: I994d5c9be99134b804e96bc045bf054fd9b434ef Reviewed-on: https://gerrit.libreoffice.org/42455 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-19rename GtkData to GtkSalDataNoel Grandin
to match all of the other SalData derivates Change-Id: I1d40ea5934edbeab747c10570657ac7d23230840 Reviewed-on: https://gerrit.libreoffice.org/42454 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-19ofz#3427: boost::bad_rationalCaolán McNamara
I'm quite content for an exception on bogus input Change-Id: Ie08396b3479114159e546395dca5370aed380378 Reviewed-on: https://gerrit.libreoffice.org/42469 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-19Assert active Tasks on scheduler de-initJan-Marek Glogowski
This shuts down the VCL scheduler later in the DeInitVCL call and asserts active pending tasks, as these will never be processed after shutdown. There is currently a TODO whitelist, so the unit tests still pass but probably most of these should be fixed. No task in the list looks critical - all seem to do some idle / cleanup work. This also processes all the Idles before shutdown. All seem to be of type sfx::SfxItemDisruptor_Impl. Change-Id: I9cc484a525cc2bacd54c4f271f86997517393e92 Reviewed-on: https://gerrit.libreoffice.org/40533 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-19expose fodt to oss-fuzzCaolán McNamara
Change-Id: Ifdc71fc4a1defbd5c07b93c844a8ccaa055969aa Reviewed-on: https://gerrit.libreoffice.org/42451 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-19loplugin:unnecessaryoverrideStephan Bergmann
Change-Id: I37c338fd08df3dc102963ccffc65c1f0684653be
2017-09-19loplugin:overrideStephan Bergmann
Change-Id: I439beb03e18cbdabf89bfacad63911c2910ad772
2017-09-19Inconsistent declarations of ImplSalYieldMutexAcquireWithWaitStephan Bergmann
...introduced with 3840aede596e6fc24f7ed7df9100fb028134aac6 "Unify SolarMutex implementations" (causing link failure and clang-cl loplugin:unreffun with 64 bit Windows builds) Change-Id: I273d15e74ad88648ebbccb33f1348497779cc488
2017-09-19Unify SolarMutex implementationsJan-Marek Glogowski
All backends implement the SolarMutex in mostly the same way. So this consolidates this code into a GenericSolarMutex. We still need the abstract SolarMutex class for the fake AKA fascade implementation in dbaccess. The patch also replaces various places of direct mutex usage with either SolarMutexGuard or SolarMutexReleaser objects. Change-Id: Ia0146dd6c51a3b9a513cc6af34a66def58aad831 Reviewed-on: https://gerrit.libreoffice.org/42325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2017-09-18ofz#3419 Null-dereference READCaolán McNamara
Change-Id: I32c5d5039034ac76262223e42a1f27d6f1b84cb5
2017-09-18add fodt fuzzerCaolán McNamara
Change-Id: I3e4de4b9dab96f0e4bc9ca90896c2c54ae66ca20 Reviewed-on: https://gerrit.libreoffice.org/42251 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-18vcl: [loplugin:reservedid]Michael Stahl
Change-Id: I47d4322f094456761e497b3ca5feb5a5dfc73704
2017-09-18Acknowledge that WinSalGraphicsImpl::drawPolyLine modifies pPtAryStephan Bergmann
Change-Id: Idde44857f8ace883cc759321c71e2ca7a4359334 Reviewed-on: https://gerrit.libreoffice.org/42406 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-18Use even more WIN32_LEAN_AND_MEANMike Kaganski
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5 Reviewed-on: https://gerrit.libreoffice.org/42398 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-17detect corrupted job setupCaolán McNamara
Change-Id: I0d3b4850c3d4c015a0a7e5d36d87113a749c7e0f Reviewed-on: https://gerrit.libreoffice.org/42383 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-16Use more WIN32_LEAN_AND_MEANMike Kaganski
https://msdn.microsoft.com/en-us/aa383745 Change-Id: I83528dc8e6a5e119e7aa816219d35f1ea3723b96 Reviewed-on: https://gerrit.libreoffice.org/42338 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-16tdf#79877 add button text for 'previous' button (gtk-media-previous)Bernhard Widl
Change-Id: I605849cd753ed3f33b8dec5921488730dc9682dd Reviewed-on: https://gerrit.libreoffice.org/42332 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-15some defaults for when config is unavailableCaolán McNamara
Change-Id: I0fd7cedbf9957707d56f99b5801dacf3a8868f02 Reviewed-on: https://gerrit.libreoffice.org/42337 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-15Fix BASIC storage that stored an HTML <P> elementEike Rathke
&lt;P STYLE=&quot;margin-bottom: 0cm&quot;&gt; ended up in the XML stream, Regression from commit 2e0a25ce2b87d3a4bbf944025fc3720933fb391d Date: Fri Sep 8 08:31:42 2017 +0200 loplugin:constantparam that removed/kept the wrong path of !bHTML/bHTML Change-Id: I29ad9c4e7dff7a2d5537f5e52e7316aff7347c7a
2017-09-15consistent naming of externals: png -> libpngMichael Stahl
Change-Id: I82d95e74318600b390d5add716773c658817e504 Reviewed-on: https://gerrit.libreoffice.org/42296 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-15consistent naming of externals: jpeg-turbo->libjpeg-turboMichael Stahl
Change-Id: I63fcebc36559c2698bbedd3501285a388ce8c257 Reviewed-on: https://gerrit.libreoffice.org/42291 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-14use unique_ptr for mpControlFontNoel Grandin
Change-Id: I71eed3254cf073b754c1a634315e6e739a816606 Reviewed-on: https://gerrit.libreoffice.org/42264 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-14loplugin:externvar (clang-cl)Stephan Bergmann
Change-Id: I83245eb7d616d87b74326f49911b1fa5fc58431e
2017-09-14clang-tidy modernize-use-emplace in vclNoel Grandin
Change-Id: Ie0a6d105b0167431275e628935df4f4c1a36d070 Reviewed-on: https://gerrit.libreoffice.org/42259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13no need to call GetNumerator() / GetDenominator() for FractionNoel Grandin
simplify the calculations - why have a Fraction and then just split it up for the calculation? Change-Id: I81af95e1ee1633f77e088c0990f308b1c169a6a2 Reviewed-on: https://gerrit.libreoffice.org/42242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-13Blind macOS -Werror,-Wunreachable-code fixStephan Bergmann
Change-Id: Ice41b6394bc4fc8e4b1d7b9c5689019361883b59
2017-09-13drop first/last link callbackCaolán McNamara
of course this stuff is exposed through uno through com::sun::star::awt::XSpinListener so VclEventId::SpinfieldFirst and VclEventId::SpinfieldLast have to be retained Change-Id: Icbf31cc8c62f2bc3bc0ccf966c0fd4f5c43dcf6b Reviewed-on: https://gerrit.libreoffice.org/42231 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-13Enable -Wunreachable-codeStephan Bergmann
...motivated by <https://gerrit.libreoffice.org/#/c/41565/2> adding dead code at the end of a switch statement, after the last case's "break". -Wunreachable-code appears to work well on Clang, while it appears to have no effect on GCC. Most of the affected places are apparently temporary/TODO/FIXME cases of disabling code via "if (false)", which can be written with an extra set of parentheses as "if ((false))" to silence -Wunreachable-code on Clang (which thus needed loplugin:unnecessaryparen to be adapted accordingly). In some cases, the controlling expression was more complex than just "false" and needed to be rewritten by taking it out of the if statement to silence Clang. One noteworthy case where the nature of the disabled code wasn't immediately apparent: Sep 12 16:59:58 <sberg> quikee, is that "if (false)" in ScExponentialSmoothingDialog::ApplyOutput (sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx) some work-in- progress or dead code? Sep 12 17:02:03 <quikee> sberg: WIP, but you can remove it Sep 12 17:04:47 <sberg> quikee, I'll wrap the false in an extra set of parentheses for now, to silence -Wunreachable-code (I wouldn't want to remove it, as I have no idea whether I should then also remove the "Initial value" comment preceding it) Sep 12 17:07:29 <quikee> sberg: both are different ways to calculate the "intital value"... so no Another case where the nature of the dead code, following while (true) loops without breaks, is unclear is sd/source/ui/remotecontrol/BluetoothServer.cxx, where I added TODO markers to the workarounds that silence the warnings for now. basic/source/sbx/sbxvalue.cxx had a variable of type double, of automatic storage duration, and without an initalizer at the top of a switch statement. Clang warning about it is arguably a false positive. Apart from that, this didn't find any cases of genuinely dead code in the existing code base. Change-Id: Ib00b822c8efec94278c048783d5997b8ba86a94c Reviewed-on: https://gerrit.libreoffice.org/42217 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-13Change assertion failure to SAL_WARNTor Lillqvist
I hit it multiple times and have no interest in figuring out why. Or time. Change-Id: I3f22c8b62fdcf987b760ac16bfe8a21a8870d33e Reviewed-on: https://gerrit.libreoffice.org/42212 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>