summaryrefslogtreecommitdiff
path: root/vcl/source
AgeCommit message (Collapse)AuthorFilesLines
2018-10-26tdf#120807 check for valid ImplGetWindowImpl()Jan-Marek Glogowski1-1/+1
Change-Id: Ia1135d11990abc303849bd1b6a549c82008c79de Reviewed-on: https://gerrit.libreoffice.org/62260 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit db0051744330d82986e8f2629a027bc4a5dc1b4a) Reviewed-on: https://gerrit.libreoffice.org/62280 Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-10-16tdf#90376 revert the dock windows' Idles to TimersJan-Marek Glogowski1-19/+17
The dock windows' Timers were converted to Idles in commit eef25e0e7c03 ("changed timers to idles"). Since the Idles poll the mouse buttons, they starve all lower priority events. From the comment in ImplDockFloatWin2::Move, this is a hack to get the mouse release event from the window decorations in X11. Change-Id: Ibba3c58dd8b3d95dbd9296cc111ab32968bee230 Reviewed-on: https://gerrit.libreoffice.org/59590 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit afd49c198769b5e7fc01a68ce7a6847aa0d0ddd8) Reviewed-on: https://gerrit.libreoffice.org/60720 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit e3a745f7604b084a7bb5fb6f18d5b50b5e137a98) Reviewed-on: https://gerrit.libreoffice.org/61466
2018-10-03tdf#119458 reorganize sw background Idle handlingJan-Marek Glogowski1-0/+5
This is the squashed version of the following commits: - ce68889678bc tdf#119458 always start the SwDocIdle - 107f0e6dba57 tdf#119458 fix sw background Idle state handling - 771544544ee1 tdf#119458 fix sw background Idle unblocking - 3bd8316718fd tdf#119458 just wakeup Scheduler on active Idle While the first commit was really wrong, the third is just an optimization to prevent unnecessary wakeups and Idle task interrups from new calls to StartIdling(). The 4th one contains the reset of the Idle state on run, which was probably the main origin of the problem and allows to wake up the Scheduler without moving the Task to the end of the queue. Starting the SwDocIdle in StartIdeling() just reintroduces the bug fixed in commit 401cba4c20fb ("tdf#116370 cleanup Writer idle job handing"), so trading one bug for the other. For the real solution we have to handle two states: 1. The SwDocIdle being active 2. The SwDocIdle being blocked For the first state we can just use the active state of the Idle itself. Since it's not a AutoIdle, it will be turned of, if invoked. Either some Idle handler will want to be run it again or some other thread might start it again, if needed. Since we're now tracking the wanted Idle state via the active task flag, we can drop the explicit mbStartIdleTimer handling. As a result of the first change, we can't stop the Idle anymore when blocking it. But the Idle itself checks its ready state via IsDocIdle() in its UpdateMinPeriod function, so we have to add the blocking state to IsDocIdle(). But we can't handle the correct state when blocking via a tasks mbActive bool, as this also schedules the task and starts the scheduler timer. So reintroduce a bool for the unblock state. This should prevent fdo#73165, which I couldn't reproduce, but just to be sure. More importantly this patch resets the m_bStartOnUnblock when the Idle job actually runs. This run should already determinates if more Idle work needs to be done, and others can still call BeginIdling() to ensure further processing. Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jenkins Reviewed-on: https://gerrit.libreoffice.org/59536 (cherry picked from commit ce68889678bca3b51c258452f7bfdd21982e4a0d) Reviewed-on: https://gerrit.libreoffice.org/59586 (cherry picked from commit 107f0e6dba57a5b27366a35a5cdb184079546df0) Reviewed-on: https://gerrit.libreoffice.org/59692 (cherry picked from commit 771544544ee13ec98961f93b5313a7d2e29429cd) Reviewed-on: https://gerrit.libreoffice.org/59730 (cherry picked from commit 3bd8316718fdfed454c01a9c4ae6af6beb34437d) Change-Id: I2d4328f31644017b09786ff4cba45cf7643f0a4b (cherry picked from commit f1fb30cf43eda45137ab96177238a29c3725789d) Reviewed-on: https://gerrit.libreoffice.org/59757 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 20e46a6ca5b62f7177f799eae9e0f26e659fd03b) Reviewed-on: https://gerrit.libreoffice.org/59769 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> (cherry picked from commit 3abec366a3fdb8657d69e24b69b4338121f80b22) Reviewed-on: https://gerrit.libreoffice.org/60724
2018-08-03forcepoint#66 make sure we don't get stuck endlessly reparsingCaolán McNamara1-3/+8
Change-Id: Ie2733e8d7f73e5f6a072604c477e949cd944189a Reviewed-on: https://gerrit.libreoffice.org/58466 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-03forcepoint#66 protect against infinite parse recurseCaolán McNamara1-9/+12
Change-Id: I0313cc141469a00b7d6a5bd15400e9d5a8f686cf Reviewed-on: https://gerrit.libreoffice.org/58452 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-08-03forcepoint#65 pdf page visiting revisits itselfCaolán McNamara1-4/+16
Change-Id: I6d9eb75f0850a94814fb4d69ea1442b826674496 Reviewed-on: https://gerrit.libreoffice.org/58418 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-07-26forcepoint#53 restrict to expected index rangeCaolán McNamara1-2/+7
Change-Id: I22f01e5a3e3cf51b014ac841cd14071dce5baf0f Reviewed-on: https://gerrit.libreoffice.org/57922 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2018-07-05Resolves: tdf#115816 second 'Insert' menu is pasteCaolán McNamara1-0/+1
reuse existing translation to be backportable wrt no new translations Change-Id: I1fb94f66d696f836e8f6a10ba2d6933f69cfac95 Reviewed-on: https://gerrit.libreoffice.org/56245 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-06-29tdf#116208 vcl opengl: fix lack of updates in status barMiklos Vajna1-0/+3
Commit f0821f9a347c7752a3c741c3451a2f1630173720 (Cache text layout of statusbar items, 2017-06-08) was a performance improvement of not laying out the text of status bar text during each & every paint. One of these places didn't work correctly with Chinese text, so commit a4ed3d9a1ffa1b51ba4352a955c950235f099fdc (tdf#115353 Status bar: no cache in settext, 2018-03-01) attempted to disable the caching at that particular place by removing the update of the cache. This resulted in lack of updates, e.g. during typing into Writer and checking the word count part of the status bar. Fix this (and at the same time keep the original problem fixed) by still not using the layout cache and that problematic place, but instead of just not updating the cache actually invalidate it -- probably that was the intention in the force place already. (cherry picked from commit 0ad7226aee21cc6dbb30d061d76491b01e39de66) Change-Id: Ib7b91e5f24bc68d2f8cae2efea64340585ad9bd5 Reviewed-on: https://gerrit.libreoffice.org/56437 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-06-25tdf#103913 keep ".emf" file extension and mime typeLászló Németh1-0/+16
in documents, don't change them to wmf and image/x-wmf silently, resulting for example, dropping or rejecting modified documents by firewall packet filtering. Reviewed-on: https://gerrit.libreoffice.org/56045 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> Conflicts: svx/source/xml/xmlgrhlp.cxx (cherry-pick from commit 4cb1e86e5217f09e1d98e51e46803a06fb72f5ce) Change-Id: I3b8634ae022c7c026b0ed4ebc345c1c3b3f96337 Reviewed-on: https://gerrit.libreoffice.org/56084 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-06-19tdf#114736 no need to call AdjustLayout hereTamas Bunth1-7/+0
Change-Id: Iae8c953155d46e53cffdf3483e3b4b95157719f6 Reviewed-on: https://gerrit.libreoffice.org/48761 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/49033 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-06-11tdf#102928 PDF export: do recompress CMYK imagesMiklos Vajna2-0/+11
The export filter writes /DeviceRGB unconditionally, so for now don't optimize CMYK image handling here. Though the added GraphicDescriptor API allows supporting this natively in the export filter in the future. (cherry picked from commit 70537c8295f1b0a0c58b061dfca6cbc9def0d65b) Change-Id: I76b44b910948467aeb1f15e5ae765201d183c99d Reviewed-on: https://gerrit.libreoffice.org/55378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-29tdf#113143 PDF export: fix mis-scaled JPGs on Impress note pagesMiklos Vajna1-2/+4
This is really similar to commit 4c2172a3e973bc6351107a3a1b554c77b40b75dd (tdf#106702 PDF export: fix missing images from Writer headers/footers, 2018-05-22) just this one is about the size of the output rectangle for JPG content, while the previous problem was about the position of them. Also extract PdfExportTest::exportAndParse() from the last two tests to avoid duplication. (cherry picked from commit 89dc667cebfec5315f0c0361e49d759e88458689) Change-Id: I9812924d505e9fdaca2a95b4990e7aaa5e44fd7f Reviewed-on: https://gerrit.libreoffice.org/54989 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-05-27tdf#106702 PDF export: fix missing images from Writer headers/footersMiklos Vajna2-5/+22
Position of an image is determined by the relevant bitmap scale metafile action when recompressing images. The same position was determined by PDFExtOutDevData "meta" info when not recompressing images. This second rectangle was never correct for images repeated in Writer headers/footers on non-first pages: the position was relative to the page, while PDF export sets the map mode (origin) of the output device during export, so such positions are expected to be absolute ones. The root of the problem seems to be that header images in Writer are both repeated (as the user sees it) and unrepeated (as the doc model sees it), and by the time we want to get its position, we only see the unrepeated SdrObject. Fix the problem by using the correct position from the scale action and not from PDFExtOutDevData if possible. (Also give up on running CppunitTest_vcl_pdfexport in the non-pdfium case, most of the tests there do require pdfium anyway, and the growing ifdef forest in that file just made it hard to read the code.) (cherry picked from commit 4c2172a3e973bc6351107a3a1b554c77b40b75dd) Conflicts: vcl/Module_vcl.mk vcl/qa/cppunit/pdfexport/pdfexport.cxx Change-Id: I31c14d4bd223b2804859982542ebd6d5f9abd312 Reviewed-on: https://gerrit.libreoffice.org/54690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-23tdf#104893 vcl opengl: fix assert failure when starting chart editingMiklos Vajna1-2/+13
OpenGLContext::prepareForYield() assumed that in case we have a current context, then it's the last one, but that's not the case for chart windows since commit 78b100ec9cb0db2f7b33ece5ad3287a67a37246f (only init the OpenGL context if we need it, 2016-06-07), which creates an OpenGLContext instance (which is then the last one in the context list) but explicitly doesn't initialize it (so that it would become the current one). Fix the problem by resetting not the last but the last current context. (cherry picked from commit 2a6171ed6fb85b3419dcf5cf1346cf1eec447987) Change-Id: Ie0e96927473290590cd6333e5cdcb7daa009431b Reviewed-on: https://gerrit.libreoffice.org/54516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2018-05-18tdf#105954 PDF export, ReduceImageResolution: fix re-compressing large imagesMiklos Vajna1-0/+5
Expensive re-compress is not pointless when the user opts in to reduce resolution. (cherry picked from commit 9fd6b6b1f5b83d923a47252b744358721761d9cf) Conflicts: vcl/qa/cppunit/pdfexport/pdfexport.cxx vcl/source/gdi/pdfextoutdevdata.cxx Change-Id: I1e04c6d4f0d95d41808ef885082239645401b2e2 Reviewed-on: https://gerrit.libreoffice.org/54470 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-04tdf#109143 PDF export: don't reuse compressed bitmaps for cropped imagesMiklos Vajna1-3/+9
PDF wants to loose the pixels masked out by cropping, so the "reuse original compressed image" optimization should not be used in that case. (cherry picked from commit be3ef7b0e5e51c1d97309ce3b6d5cac1fbd025d0) Conflicts: vcl/source/gdi/pdfextoutdevdata.cxx Change-Id: Ifdf2cc4ff6bff0ed456a2159395314817c1cf417 Reviewed-on: https://gerrit.libreoffice.org/53772 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-07Avoid crash-reporter crash.Michael Meeks1-5/+10
http://crashreport.libreoffice.org/stats/crash_details/f5086a7d-3c67-46e4-945e-e0882a604eee Change-Id: Ic9ceed2e736a4ad1c155a31d3b2dc453e6a562aa Reviewed-on: https://gerrit.libreoffice.org/52119 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/52516 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-04-04ofz#7165 set a recursion limit for svm in svmCaolán McNamara2-6/+38
Change-Id: Id9089986012588690b6d5e33cd71d094ef2357dd Reviewed-on: https://gerrit.libreoffice.org/51983 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
2018-03-23tdf#115117: Fix PDF ToUnicode CMAP for ligaturesKhaled Hosny2-37/+56
Move the glyph to character(s) mapping to CommonSalLayout where we have enough information to do this properly. This correctly handles ligatures at end of run that wasn’t handled before, and also fixes a bug in the PDF writer code when there is more than one ligature in the run (it forgot to clear aCodeUnitsPerGlyph vector after each iteration). Also drop the “temporary” fix for rotated glyph from 2009 that does not seem to be needed now (the document from that bug exports correctly after this change). Change-Id: I5b5b1f4470bbd0ef05cbbc86dfa29d2ff51249ea Reviewed-on: https://gerrit.libreoffice.org/51617 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit b94a66ebc8db6c5ca9c7dcfdfbb06b49deae4939) Reviewed-on: https://gerrit.libreoffice.org/51715
2018-03-20rhbz#1392145 ensure titlebar close button matches 'outside' directionCaolán McNamara1-1/+2
Change-Id: I20e925c58adb56acd4d1a63720d330c8b6613441 Reviewed-on: https://gerrit.libreoffice.org/51434 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-20tdf#115353 tdf#114743 Use first valid glyphTamas Bunth1-11/+23
in AdjustLayout. Change-Id: Iaa9a0cde2bd35fed5cbc9ebf0690341812679b6f Reviewed-on: https://gerrit.libreoffice.org/49542 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-13forcepoint #27 check region bands loaded from stream for consistencyCaolán McNamara2-5/+30
Change-Id: I92376b5fb4208c78fa25a94d4dd394256793161c Reviewed-on: https://gerrit.libreoffice.org/51145 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-03-07tdf#115353 Status bar: no cache in settextTamas Bunth1-3/+0
Change-Id: I6c1312bbba553be738e23cee0c76d589c809dff8 Reviewed-on: https://gerrit.libreoffice.org/50584 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/50743 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-02forcepoint #16: fix heap-use-after-freeMiklos Vajna1-1/+3
PDFDocument::Tokenize() in the aKeyword == "obj" case allocates a PDFObjectElement, stores it as an owning pointer inside rElements, and also stores two non-owning references to it in m_aOffsetObjects and m_aIDObjects. So make sure those 2 other containers are also cleared then elements go away. LO_TRACE="valgrind" bin/run pdfverify <sample> doesn't report errors anymore after the fix. Change-Id: Ie103de3e24a1080257a79e53b994e8536a9597bc Reviewed-on: https://gerrit.libreoffice.org/50631 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2018-03-02forcepoint #14 check to see if we incremented at allCaolán McNamara1-3/+6
Change-Id: Ia4670adbddcc8501cf522be296b3061a3529f880 Reviewed-on: https://gerrit.libreoffice.org/50606 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-03-01tdf#115297: alternative fix for displaying 1bit imagesVasily Melenchuk1-9/+1
Previous fixes for 1bit monochrome / paletted images produced some regressions, so here is attempt to fix problem at the root. Partially reverted 66dbd4da3afcadb1393daf9be9cecff71b86509a and fixed in a different way without tdf#115297, tdf#114726 and related. Change-Id: I6849ed5ac41770ba905c930065c80e58509dba2e Reviewed-on: https://gerrit.libreoffice.org/50454 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 25cd843664919974f0d21ca7a0b02cc43e9eeabb) Reviewed-on: https://gerrit.libreoffice.org/50540 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2018-02-26forcepoint #6 release virtual devices before releasing font cacheCaolán McNamara1-4/+5
Change-Id: Iacfbe7da788235c96519ecd106d09ab534c83849 Reviewed-on: https://gerrit.libreoffice.org/50284 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-22tdf#103690: Set up notifications only after VCL has been initialisedTor Lillqvist1-0/+4
On some Macs, it seems that LibreOffice (or any app?) gets an NSApplicationDidChangeScreenParametersNotification as soon as it has started and asked for such a notification. Our handler for that notification assumes that VCL is initialised. Thus we should not ask for such notifications before VCL has been initialised. I could not reproduce the reported crash with an unmodified LibreOffice, only after inserting a sleep after the notifications had been set up. But I am fairly sure this change fixes the problem. Change-Id: I18d342eb7dc0c77cb7fc8623756bead65a1bd329 Reviewed-on: https://gerrit.libreoffice.org/50164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/50197 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-02-22forcepoint #4Caolán McNamara1-6/+21
Thanks to Antti Levomäki and Christian Jalio from Forcepoint. Change-Id: I569ca80267ad9b5a21da0029ba903d2a4c45a035 Reviewed-on: https://gerrit.libreoffice.org/50085 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-21tdf#115315 Cursor not in focus with new documentTelesto1-1/+1
Partial revert of 7aae8772aa18744cb1bbd8348272be99cc882c47 ("Clear VclPtr instance reference on removed UserEvents.") Disposing of child controls should not affect focus events of the parent frame. Change-Id: I583311050560a2851cfcc372741b675b52375d06 Reviewed-on: https://gerrit.libreoffice.org/49855 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 11fab5aeaaa72012c63b2c812656a932ef0debf9) Reviewed-on: https://gerrit.libreoffice.org/49869 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-09various sft fixesCaolán McNamara1-24/+71
use ptr diff rather than int (cherry picked from commit 5b426038a7befcaf0d05824ffb20200ff8833ad3) fix mem leak (cherry picked from commit 603cb6cf31a5212d03736a552770e5734b0e8066) check more table sizes (cherry picked from commit 1828490bb22f1c8273c4a9f5b1db819b173ca70d) check cmap offset (cherry picked from commit 683d9883ad8fd6568e6a7832e5bb347c1d043e4b) check tableoffset against size (cherry picked from commit ae73c3ff112e1ed38eb4678ac5745990661a2e66) check ntables offset (cherry picked from commit 75a171a405afd6eac236af93aa9d29a9c3ec9c64) use safeint on calculations (cherry picked from commit 139b6c6cf898467098f3a6f29fa84013a182285f) simplify returns (cherry picked from commit e8b2aad1cb2107304761e68aa380b5c29d8ef22f) extend to cover the last byte needed (cherry picked from commit c7b0117f26a386c98a721ff3897479c268103d74) bounds check (cherry picked from commit bb32616bdd6e3b327654bab0e1d790d8d50b893d) move largest bounds check to start (cherry picked from commit f832198e6a33052c7cc86b25843badfb962a2ae8) Change-Id: Ia174fd94c57cc3c899c10e1c0dc5968965a50427 0d329357ac282d4652b0f7ebc401cbd51963461b 004a6d322f60d916cc4635b362ce948e8a10d7c7 5aae26c38f3645020f0e1d6d7b6877c2727af1b4 a79be052dd3f6b6ed38fb326558924c853af5fff d75f5f4b578fd176c17e5763569f1403260c6594 c063786ba41aa9a985f505e62b43d3d543a0d48f 1a67cb2f1c686032438852fec1267a59fbd04d7f 5177d42b47a4bca614878dce4a69ab16b5cfe163 6d32a6b6f1dd91db42a3f154700ea55603f0e4dd 03fe80f9568759b829fac4e9bcfd496efebe6a26 Reviewed-on: https://gerrit.libreoffice.org/49484 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-09check O_hhea and O_vhea sizesCaolán McNamara1-3/+7
Change-Id: I82e47732815f0112801c8c3a3e5b0b09ac25610a Reviewed-on: https://gerrit.libreoffice.org/49438 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2018-02-09check O_head sizeCaolán McNamara1-2/+6
Change-Id: Idf5d30eaed0196cfa9266e35131c538c606a0960 Reviewed-on: https://gerrit.libreoffice.org/49365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit b10ae2faae6f3c448bbab71585550387e18cc248) Reviewed-on: https://gerrit.libreoffice.org/49366 Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-09check table size before reading nglyphsCaolán McNamara1-1/+2
Change-Id: Ib511fdf16006877ca76085137eb9200601b2f8f7 Reviewed-on: https://gerrit.libreoffice.org/49363 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 08dd51bfcaa6b493e134bcc7787cc18c36ad5db1) Reviewed-on: https://gerrit.libreoffice.org/49435 Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-09Removed unused code for reading kern tableKhaled Hosny1-79/+0
Change-Id: I66b17dbee0a04e61b99e23933a7fed4be30f3a93 Reviewed-on: https://gerrit.libreoffice.org/49426 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> (cherry picked from commit e3caecb5a33288dd46a80b2ffcc47a2288305052) Reviewed-on: https://gerrit.libreoffice.org/49451 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-02-08tdf#112990: Hack-around: Do not crash on mac with opengl enabledXisco Fauli1-0/+9
Change-Id: Id8d1ffe593fa42b7e37e26e8d66ffad87d6685c1 Reviewed-on: https://gerrit.libreoffice.org/49251 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Bunth <btomi96@gmail.com> (cherry picked from commit c83d2ac99dc3da4ef85b193543a93e02e3858844) Reviewed-on: https://gerrit.libreoffice.org/49442 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2018-02-08return early on short streamCaolán McNamara1-0/+2
Change-Id: Ia9cb4dec5358281322a2428c5f2153836a1ee1af Reviewed-on: https://gerrit.libreoffice.org/49374 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-08stay within font boundsCaolán McNamara1-1/+6
Change-Id: Ie8ed610b71cb1b20963827c2be97155d2d8aa22c Reviewed-on: https://gerrit.libreoffice.org/49370 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-08what matters is the availability of the last element, not the firstCaolán McNamara1-2/+3
Change-Id: I23d3abdbe62b735d66261fb337613da88cc4206b Reviewed-on: https://gerrit.libreoffice.org/49379 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-08check kern table sizeCaolán McNamara1-2/+2
Change-Id: I65b5f0a8950d54c00d6fd7c385ca1c5dca2ef2c8 Reviewed-on: https://gerrit.libreoffice.org/49383 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-07sanity check cmap table sizeCaolán McNamara1-0/+6
Change-Id: I010c2fd221bcd86a62efd9996a0c34930828cb6d Reviewed-on: https://gerrit.libreoffice.org/49349 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-05tdf#115416 allow build with classic libjpegCaolán McNamara1-1/+2
Change-Id: I96252e1a78dbc52d21095e11b7bdb0807e5d76b6 Reviewed-on: https://gerrit.libreoffice.org/49205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-04tdf#32935 tdf#49134 tdf#114466 Activate newly opened modal dialogsMike Kaganski1-1/+6
... based on ForceFocusAndToFront setting Change-Id: Ic76faa082f433d5a0150e49c30d7eda3c6c24c5f Reviewed-on: https://gerrit.libreoffice.org/48287 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/49214 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2018-01-29gtk3: single click with selection set doesn't unselectCaolán McNamara1-1/+1
this is a safe backportable fix, the unconditional nFlags |= SelectionEngineFlags::CMDEVT looks the real dubious thing to me, but only the gtk3 backend has swipe support so just returning immediately on a swipe definitely ok Change-Id: Iade26d0d9260ce76dfb2766ac9e5ca9fa9275bf4 Reviewed-on: https://gerrit.libreoffice.org/48529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-27tdf#115057 Never use ImplPopupFloatWin for anything except ToolBoxMaxim Monastirsky3-4/+4
ImplPopupFloatWin draws the window title and frame directly on the client window, which is incompatible with .ui layouts, as they try to occupy the whole available space. Instead just use a plain FloatingWindow whenever possible, and change the border window code to mimic the behavior of ImplPopupFloatWin, wrt removing part of the frame of toolbar popups w/o a title. Change-Id: If72ea89e31f913470faad7fcb8083f9b9787c9a8 Reviewed-on: https://gerrit.libreoffice.org/48094 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit 829b0564959411d0cc64169fe69153a714050c0d) Reviewed-on: https://gerrit.libreoffice.org/48202 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-23tdf#115023 Check mpControlData for nullptrMaxim Monastirsky1-1/+2
Control::ImplClearLayoutData happens to be called post dispose, but Control::dispose already destroyed mpControlData. So put back the nullptr check that was removed in e8b49f09074fe184374bee5062715357427ae044 ("new loplugin: useuniqueptr: vcl"). (But IMHO it's odd that we even try to send lose focus events to disposing windows. So maybe it would make sense to replace the "! pOldFocusWindow->IsDisposed()" check inside Window::ImplGrabFocus with "isDisposed()" which comes from VclReferenceBase, and set much earlier?) Change-Id: Iddaf7e05d6cb56c28a34884876770753fcf7179e Reviewed-on: https://gerrit.libreoffice.org/48246 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit 2a2b37202a735b34da914c03b2f6e1495f833b51) Reviewed-on: https://gerrit.libreoffice.org/48251 Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-23tdf#114460 vcl: handle nested parentheses in PDF roundtripMiklos Vajna1-0/+9
The roundtrip of the pdf image failed due to this. (cherry picked from commit f58a16d5987c8e8c16580c514ce0c7b0895b4105) Change-Id: I88a9657e242dd2659f9bf06233e5fcbfeb43ceb5 Reviewed-on: https://gerrit.libreoffice.org/48378 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-23its defineresource not define resourceCaolán McNamara1-1/+1
regression from commit 64d624b65124ac02d8ee59b135593fd9d8eb9067 Date: Sat Jan 9 22:55:28 2016 +0100 Fix typos Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Change-Id: Ifdf45e97b81523c84c73b93d14ed75b7b6909f77 Reviewed-on: https://gerrit.libreoffice.org/48356 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-01-11tdf#113874 Guard against invalid statesSamuel Mehrbrodt2-2/+5
Change-Id: I013dd4eb81f0fbef25d9f58e27fe72d800d910ba Reviewed-on: https://gerrit.libreoffice.org/47702 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit d2763bde00f0f840585e1ec4c8f94c0ef804a580) Reviewed-on: https://gerrit.libreoffice.org/47744 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>