summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)AuthorFilesLines
2017-12-19Report more debug information about caught exceptionStephan Bergmann2-6/+41
...in an attempt to track down why various tinderbox builds started to fail CppunitTest_sw_filters_test with an "Uncaught exception during Task::Invoke()!" abort. On IRC, jmux claims that catching exceptions and turning them into abort() here (instead of letting them propagate) is necessary: "The main problem was the wrong state in the scheduler. So something actually handled the exception, but the next caller into the scheduler had an invalid linked list of tasks, breaking things left and right." Change-Id: Ic3365e282404483518652c00160c2036b79991cf Reviewed-on: https://gerrit.libreoffice.org/46450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit ba81ac19b7aec4fd7f07fcec9f6ea6f85d9aaa24) Reviewed-on: https://gerrit.libreoffice.org/46532 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-12-18ofz: ensure null terminationCaolán McNamara1-2/+4
Change-Id: I6b6b0763e85a41d03f9e03c6abc17c6c311f6519 Reviewed-on: https://gerrit.libreoffice.org/46642 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-12-18tdf#114262 Respect text+image toolbar styleMaxim Monastirsky1-3/+4
Regression of 67c9d054517fc3b5cbc203c330eedef4b50f0e57 ("fdo#84938: replace TIB_ constants with enum"). Change-Id: Ib90473a80fd491f4a136b4e76864c107a9240990 Reviewed-on: https://gerrit.libreoffice.org/45920 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit 291ea673180a37912697646850959b3f6553cc7a) Reviewed-on: https://gerrit.libreoffice.org/46144 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-12-15tdf#114408 set correct tooltip rectangleCaolán McNamara1-2/+2
The original code tried to get the position of the window relative to its parent and then ask the parent to adjust that position to a position relative to the toplevel. But the position to use in that case should have be WindowImpl::nX/WindowImpl::nY not GetPosPixel() Much easier to just directly ask the the current window for its position relative to the toplevel. Change-Id: Iff202f052bc651a8c0e3a57ff3322e5e2a3e4b9a Reviewed-on: https://gerrit.libreoffice.org/46315 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-12-08tdf#108302: keep the font unrotated if @font isn't available.Mark Hung2-0/+18
We will create the font in ExTextOutRenderer for glyphs that are expected to be sideway in vertical writing, so we can reset the font escapement and orientation if @font ( windows notation of fonts for CJK vertical writing. ) isn't available. That will keep the font consistent with @fonts for those glyphs expected to be upright in vertical writing. Note that it is necessary to change text alignment of DC when such font is used. Change-Id: I1a4a6e8aa232119dd136beeb6c19505d7980a534 Reviewed-on: https://gerrit.libreoffice.org/45609 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit 2392238e480ecc1d1a5e2e69789e79c10f142d6c) Reviewed-on: https://gerrit.libreoffice.org/45919 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-07gpg4libre: add KDE4 fpicker gpg crypt chechboxThorsten Behrens1-0/+6
Change-Id: Iba8fb0e0ac732f36cd1d880884bde1121e6b1eab
2017-12-07gpg4libre: add gtk fpicker gpg crypt chechboxThorsten Behrens3-0/+6
Change-Id: I27b494530a2b61eb37c4a9f7c3e1f9845f045e66
2017-12-02Revert "tdf#114025 - avoid deadlock between x11 clipboard and ...Michael Stahl1-8/+6
... the lock dialog." SolarMutexReleaser hack can be avoided with the rtl_Instance fix from commit fa9c083c6071a0a4dc812f3c34731f347ddbabf7. This reverts commit b0e37303df56472fdc7782b977326c2391fdab07. Change-Id: Ib90cdec1420807afbadfd526a1ddb68d58db79c1 Reviewed-on: https://gerrit.libreoffice.org/45624 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit a246dc116a534cacef34c0e376a54391341b36e8) Reviewed-on: https://gerrit.libreoffice.org/45655 Tested-by: Michael Stahl <mstahl@redhat.com>
2017-12-01Resolves: tdf#114117 draw page shadow mangledCaolán McNamara1-4/+44
when cairo had to stretch the 1 pixel dimension to fit the area. When its this 1 pixel case set the same settings we use for the stipple effect to get the expected interpolation Change-Id: I42d87d6d01ebdb44083351a9632860f5f0a3bf63 Reviewed-on: https://gerrit.libreoffice.org/45512 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-25tdf#114025 - avoid deadlock between x11 clipboard and the lock dialog.Michael Meeks1-6/+8
Change-Id: I06e66f59531e7ff6a2e0bf874ebcf2a882d89b63 Reviewed-on: https://gerrit.libreoffice.org/45228 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-11-25Modernize pdfwriter_impl, part 2 (vcl)Julien Nabet1-25/+13
by using for range loops + find_if instead of loops Change-Id: Ide439a683e6b3c406811fe135a7651e26395cf1e Reviewed-on: https://gerrit.libreoffice.org/45257 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-24loplugin:countusersofdefaultparams in sw (1)Noel Grandin2-2/+2
Change-Id: I0d14f9c375f93079aef21ca4f1132adc4e1fe06c Reviewed-on: https://gerrit.libreoffice.org/45207 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-24don't worry about dangling timers at fuzzer exitCaolán McNamara1-1/+2
Change-Id: I9e18257f7e6e0438c6ce2801c0c2f8885b060870 Reviewed-on: https://gerrit.libreoffice.org/45214 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-24Modernize pdfwriter_impl by using for-range loops (vcl)Julien Nabet1-155/+143
Change-Id: I82354a03b94b126a7aed460d9cd46d37b8f38ada Reviewed-on: https://gerrit.libreoffice.org/45173 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-23tdf#111782: fix Wrong rendering of image radiobutton on Split Cells dialogG??bor Koruhely1-0/+5
The radio button icon was too big and there weren't enough space to render the bottom border, so I reduced the size of the radio button icon. Change-Id: Ie93f21ca730329716d0d209726e4d41c5d235b88 Reviewed-on: https://gerrit.libreoffice.org/45097 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2017-11-23gpg4libre: translatable strings for non-LibO filepickersKatarina Behrens1-0/+2
just strings, code using them is yet to be implemented Change-Id: I03b2c44f574b3212b39bf4aabedf01c577f35de9 Reviewed-on: https://gerrit.libreoffice.org/45156 Reviewed-by: Siegmund Gorr <siegmund.gorr@cib.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-23loplugin:unnecessaryparenStephan Bergmann1-4/+4
Change-Id: Iddf5ed0a611f6dec4d30d056729dfd6dcd1f37d9
2017-11-23loplugin:simplifyboolStephan Bergmann1-1/+1
Change-Id: If6084771aaa9d2bdc7ffca7550749cbb3bf8e084
2017-11-23Make loplugin:unnecessaryparen look through implicitStephan Bergmann10-40/+40
...similar to how <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent" does for loplugin:simplifybool Change-Id: I23eef400af71c582d380c9bae6546ce06e8a1e18 Reviewed-on: https://gerrit.libreoffice.org/45122 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23Replace some lists by vectors in vcl/headlessJulien Nabet4-11/+10
+use for range loops when loops included "std::list" Change-Id: Ic261571ef64b1a710233ff949c4feeb3cc4756cd Reviewed-on: https://gerrit.libreoffice.org/45109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-23Replace list by vector for m_aJPGs pdfwriter_impl (vcl)Julien Nabet2-7/+7
+use for range loop just for the loop containing "std::list" Change-Id: Ie30dc016e9a001d0bb4ecd31a75749093326e2f6 Reviewed-on: https://gerrit.libreoffice.org/45112 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin6-8/+8
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann2-4/+4
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-22ofz#4386/ofz#4387 AbrtCaolán McNamara2-0/+2
Change-Id: I2ed1ade1322102a0d6ac623156b9d3c2084b481c Reviewed-on: https://gerrit.libreoffice.org/45102 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-22replace check of eof and GetError with goodCaolán McNamara3-9/+8
Change-Id: I7d9f04262ab5420e9a14813fa1274bb9d01e3291 Reviewed-on: https://gerrit.libreoffice.org/45076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-22drop duplicate methodCaolán McNamara10-35/+35
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12 Reviewed-on: https://gerrit.libreoffice.org/45075 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-22Fix typoAndrea Gelmini1-1/+1
Change-Id: I591214b246f7702e52f71b95cdc2255bc296224b Reviewed-on: https://gerrit.libreoffice.org/45063 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-11-22loplugin:simplifybool re-activate the !! warningNoel Grandin1-1/+1
Change-Id: Iac7d82a1c228734177be536e9a6c41803c03637b Reviewed-on: https://gerrit.libreoffice.org/45035 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-21silence warningCaolán McNamara1-1/+1
Change-Id: I22e37ed4be19a39c061015f81938ab2d854db9b5 Reviewed-on: https://gerrit.libreoffice.org/45042 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-21auto cancel dialogs during file format testingCaolán McNamara2-0/+3
Change-Id: Iceef2f46759b28c0d3f60d8dcb8f470af78de3f0 Reviewed-on: https://gerrit.libreoffice.org/45043 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-21add docx support to fftesterCaolán McNamara1-0/+14
Change-Id: Ia761e23c011c53f8f786ac336efd4b9e94fc6e35 Reviewed-on: https://gerrit.libreoffice.org/45033 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-21assert that mnPngDepth can only be 16 hereStephan Bergmann1-0/+4
...due to how PNGReaderImpl::ImplReadHeader sets up the various PNGReaderImpl data members. Shows that the "(and, TODO, also in the mbAlphaChannel case)?" from bb11e1283e3d49ec1bfe14c4271edbd49af3e3c1 "ASan heap-buffer-overflow" does not need any further fixes. Change-Id: Ie942e22dc67b2704c7c74b7b70e474b34173e9d1
2017-11-21loplugin:unnecessaryparenStephan Bergmann1-1/+1
...with a Clang build with <https://reviews.llvm.org/D40167> "In stdbool.h, define bool, false, true only in gnu++98" locally fixed Change-Id: Ib85111cf8d058b6d7be6460af5266dfccb28c951
2017-11-21ASan heap-buffer-overflowStephan Bergmann1-0/+16
e.g. during CppunitTest_sd_misc_tests (see <https://ci.libreoffice.org/job/lo_ubsan/735/console>) after 66dbd4da3afcadb1393daf9be9cecff71b86509a "tdf#113918: Workaround: Load 1bpp indexed PNG as 8bpp indexed Bitmap". Looks like PNGReaderImpl::ImplDrawScanline also needs to special-case mnPngDepth == 1 in the mbTransparent case (and, TODO, also in the mbAlphaChannel case)? Change-Id: Ie6a0230ec606f7cc5aaf174b9c0075a3b4cb5b1d
2017-11-20tdf#113918: Workaround: Load 1bpp indexed PNG as 8bpp indexed BitmapTor Lillqvist1-3/+28
The alternative, to fix the X11 disaster area used by the gen, gtk, and kde4 VCL plugins, seemed more difficult. Somebody else with more time, feel free to revert and do that instead. Change-Id: I068ea27224ba98be25e01671546137ddd70691a7 Reviewed-on: https://gerrit.libreoffice.org/44957 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2017-11-20tdf#95656 vcl: correct offset for vkrn positionMark Hung1-3/+2
For Bopomofo tone marks to attach to anchor points. Change-Id: I66373790cb80515f4ab0ca9c166f78634eb4081c Reviewed-on: https://gerrit.libreoffice.org/44922 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin1-1/+1
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-18silence some coverity warningsCaolán McNamara2-2/+2
Change-Id: I5a530e37156b5cd36e8a07ac20851880a46f520d Reviewed-on: https://gerrit.libreoffice.org/44875 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17tdf#111717 consider CJK vertical writing for underline offsetMark Hung1-1/+4
Textline offset was based on horizontal font metrics. In vertical writing for CJK fonts, use descent as its underline offset so that the line is drawn at the edge of the bounding box to prevent overlap the CJK glyphs. Change-Id: Iaa01bdf3cbb694dcf925975cde3f0f7ba7b97dac Reviewed-on: https://gerrit.libreoffice.org/44720 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-11-17tdf#111967 translate offsets so it is relative to v originMark Hung1-0/+7
The offsets were 0 in HarfBuzz 1.3.3 but the value became something else and made text offsets toward upper-right after upgrading to HarfBuzz 1.4.8. Those values are offsets relative to the horizontal origin. But underlying renderer expect positionos relative to the vertical origin. Translate them back by adding the horizontal origin. Change-Id: If58d2c082b198bfd8789efb3df2be49869a04bf9 Reviewed-on: https://gerrit.libreoffice.org/44556 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-11-17ofz#4291 Direct-leakCaolán McNamara1-60/+70
can't reproduce this, but throw a guess at it Change-Id: Iff6198c463bbab4e3ef87ec62eaa13e88d016a23 Reviewed-on: https://gerrit.libreoffice.org/44890 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17Resolves: tdf#112549 use gtk3 to set gtk2 window fullscreen...Caolán McNamara2-4/+7
for current monitor mode as well as all-monitors mode Change-Id: I9de864dc0b416d18937f6ee90f432a8254fe987f Reviewed-on: https://gerrit.libreoffice.org/44870 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17ofz#4076 bad palette READCaolán McNamara1-2/+6
Change-Id: I54943d96baa6e2309bbf2cd3b6d8bcada2b76952 Reviewed-on: https://gerrit.libreoffice.org/44351 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17revert "tdf#95761 All Hotkeys with CTRL+ALT+ not worked"Manfred Blume1-3/+8
This was breaking keyboard functions in other locales, by essentially disabling use of left Ctrl-Alt as AltGr equivalent - fixes tdf#97908 This reverts commit 3ac9942c624cb627c8b09122498b45b05cf455f6 Change-Id: Ibee8cf0cb663f1995d0696afde8baea995f35f37 Reviewed-on: https://gerrit.libreoffice.org/44824 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-11-17Resolves: tdf#112943 don't close popups on resize if size didn't changeCaolán McNamara1-2/+3
Change-Id: If5331248f69098570c87da060595f5a85721c2d2 Reviewed-on: https://gerrit.libreoffice.org/44882 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17ofz#4245 need more componentsCaolán McNamara3-0/+12
Change-Id: Iab8d50dff1f20a31f7863217cfa69fb73727e4ef Reviewed-on: https://gerrit.libreoffice.org/44874 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-17loplugin:casttovoid (--disable-pdfium)Stephan Bergmann1-7/+2
Change-Id: I38017e3b191ef210facf46323c9a3bb5f54bf0a3
2017-11-17vcl: clean ImplFontMetricData::ImplInitTextLineSize a little bit.Mark Hung3-15/+20
Move initialization of FullstopCenteredFlag out of ImplFontMetricData::ImplInitTextLineSize since it has nothing to do with text lines. Change-Id: I1c2e383d980514c8727d736a3158325c1e0ccfda Reviewed-on: https://gerrit.libreoffice.org/44712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-11-17Make loplugin:casttovoid more resilient against macrosStephan Bergmann1-2/+1
...in the type at the start of a ParmVarDecl, so that it does not erroneously assume in isSharedCAndCppCode that the whole decl is in "the body of a macro definition". (Even better might be to check the whole ParmVarDecl is inside one macro body.) Turns out that vcl/unx/gtk/gtkdata.cxx indirectly includes stdbool.h via some vcl/inc/unx/saldisp.hxx -> workdir/UnpackedTarball/epoxy/include/epoxy/glx.h -> workdir/UnpackedTarball/epoxy/include/epoxy/gl.h, and Clang's stdbool.h contains > /* Don't define bool, true, and false in C++, except as a GNU extension. */ > #ifndef __cplusplus > #define bool _Bool > #define true 1 > #define false 0 > #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) > /* Define _Bool, bool, false, true as a GNU extension. */ > #define _Bool bool > #define bool bool > #define false false > #define true true > #endif since <http://llvm.org/viewvc/llvm-project?view=revision&revision=115028> "Define _Bool, bool, true, and false macros in <stdbool.h> when we're in a GNU-compatible C++ dialect. Fixes <rdar://problem/8477819>" while GCC's stdbool.h has meanwhile been improved with <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=216679> "C++11 explicitly forbids macros for bool, true and false" to > #ifndef __cplusplus > > #define bool _Bool > #define true 1 > #define false 0 > > #else /* __cplusplus */ > > /* Supporting _Bool in C++ is a GCC extension. */ > #define _Bool bool > > #if __cplusplus < 201103L > /* Defining these macros in C++98 is a GCC extension. */ > #define bool bool > #define false false > #define true true > #endif > > #endif /* __cplusplus */ Change-Id: I42caab83ac6e4d5e5297376136a6bbe6f3d70818
2017-11-17loplugin:useuniqueptr in MultiSalLayoutNoel Grandin2-7/+6
Change-Id: I57ac9cf988dfccfcb38c69ca9c66c2ad77bbdada Reviewed-on: https://gerrit.libreoffice.org/44819 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>