summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)AuthorFilesLines
2018-06-25Use Tango as default icon theme when Breeze is not includeddistro/collabora/lov-6.0.5Tor Lillqvist1-0/+6
Change-Id: Id81c2355abfbdf29599842f06ad8b3c754db708b (cherry picked from commit d62acf55f17f5b1213f150fb4fb0fd2e8bb0b9b0) Reviewed-on: https://gerrit.libreoffice.org/56418 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.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/55795 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2018-06-18vcl: refresh font cache only on real changeAshod Nakashian4-7/+8
GTK3 emits way too many style-updated, which triggers font cache updates. The avoidance of unecessary font cache updates was first implemented in 29c55564. Unfortuantely, it seems that the current font-options was never set as last-seen font-options, so still to many fonts-changed were emitted Change-Id: I01a47d4d7fb033e335b1a49ffa6e1bb98f7fd28d Reviewed-on: https://gerrit.libreoffice.org/55668 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-06-12Fix build with GLM 0.9.9.0, tdf#118070Louis Sautier1-0/+6
One of the test files was forgotten in 953c4add8fd76d88f49a81ae4c21a1fdcc007e57 Change-Id: I0315433c688ff7edb2ba599bbef203cac9de3022 Reviewed-on: https://gerrit.libreoffice.org/55554 Reviewed-by: Rene Engelhard <rene@debian.org> Tested-by: Rene Engelhard <rene@debian.org> (cherry picked from commit 5f1bf6598b5725ad1e50ae9f7ec7524cc8a834fa) Reviewed-on: https://gerrit.libreoffice.org/55556 (cherry picked from commit 4731827db269a11b8f12e22076a2f3c297298450) Reviewed-on: https://gerrit.libreoffice.org/55557 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 3a2505715f91cc871004aad064f11516d0027ed6) Reviewed-on: https://gerrit.libreoffice.org/55639 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-05-29tdf#117850: Just call _Exit() in our applicationWillTerminate:Tor Lillqvist1-0/+3
Sure, it is just a workaround, but a very effective workaround. Change-Id: Id0daff048a27dae5cf8fb5e0e949c5b21e03fc86 Reviewed-on: https://gerrit.libreoffice.org/54924 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit aa81a086bd3dcd7d6b830951619f310bd0aff30c) Reviewed-on: https://gerrit.libreoffice.org/54995 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-05-29tdf#113143 PDF export: fix mis-scaled JPGs on Impress note pagesMiklos Vajna3-65/+114
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-29tdf#117628 crash after closing media player with X11 backendCaolán McNamara2-7/+6
Change-Id: I812da5ddf7343573f93ea64e592442edb31cad2d Reviewed-on: https://gerrit.libreoffice.org/54912 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 Vajna5-23/+95
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 Vajna3-0/+52
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-18tdf#117477/tdf#100243: blacklist Intel HD Graphics 630 for Lenovo...Julien Nabet1-0/+6
+ Intel(R) Iris(TM) Graphics 550 from https://cgit.freedesktop.org/libreoffice/core/commit/?id=ecaabbf527f6f6207ce1ca8924708d23e6db45f5 See https://bugs.documentfoundation.org/show_bug.cgi?id=117477#c4 Change-Id: Ifdd55d5b26ae7ef6d635527050296aa69c2244ab Reviewed-on: https://gerrit.libreoffice.org/54015 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-on: https://gerrit.libreoffice.org/54501 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-16tdf#96947 vcl opengl win: fix background of menu items w/ check/radio marksMiklos Vajna1-13/+38
Extract the actually used bounding box from the rendering code and reuse that for OpenGL texture purposes, so the available and the used size can't mismatch. The background itself is almost invisible, but the borders were lost due to this size difference. (cherry picked from commit b160db926b574b7e9d6696d49dbbce8dd289aade) Change-Id: I31b3e5aa0c0106461b90bfaab3a84d45b33afd71 Reviewed-on: https://gerrit.libreoffice.org/54324 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-05-14Resolves: tdf#117413 char doubling appearing under X with gtk3Caolán McNamara2-16/+22
like happened on gtk2, so make the rhbz#1283420 bodge happen for XLIB surfaces, regardless of the backend Change-Id: Ic51679a71523e8cc76832858411b102d915638cf Reviewed-on: https://gerrit.libreoffice.org/53897 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jean-Baptiste Faure <jbfaure@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-05-04tdf#109143 PDF export: don't reuse compressed bitmaps for cropped imagesMiklos Vajna3-3/+51
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-05-03tdf#116365 vcl opengl: respect max texture size when creating texturesMiklos Vajna1-0/+9
I can't reproduce the crash, but the image in the bugdoc is a large one (23100 x 1364 pixels) and it was black for me. It's rendered correctly now. (cherry picked from commit a3cbd06872b2f9ee9253e5879f590ff1b9eaf365) Change-Id: I72c395af12ef88cf1352602492b84e1dcd04ed14 Reviewed-on: https://gerrit.libreoffice.org/53771 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-26Resolves: tdf#116951 rhbz#1569331 start is G_MAXINTCaolán McNamara2-4/+16
and text is nullptr, seeing as an end G_MAXINT translates to str len, assume the same for start Reviewed-on: https://gerrit.libreoffice.org/53376 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 697ebd15d646e41bb69726f7b438ebbfaff141b0) Related: tdf#116951 rhbz#1569331 end should be in terms of unicode chars not bytes Reviewed-on: https://gerrit.libreoffice.org/53175 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 d4a01820ae094ef2d4ec2196334120600b1c9621) Change-Id: I05114019abb6c283586cd5c23ed1d148c9cf71d3 Reviewed-on: https://gerrit.libreoffice.org/53176 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-26tdf#95843: Wait for fire_glxtest_process also in --headless modeStephan Bergmann2-0/+18
Discussed with mmeeks on IRC that fire_glxtest_process is probably called as early as possible so that its reuslt is ready by the time it is needed in the non-headless case. So best fix for headless is probably to just wait for the sub-process at an opportune point, instead of redesigning the whole mess so that fire_glxtest_process would only be called once its result is actually needed. Change-Id: I4ea9c9d54b83c9695a3b72317e68fed0c410da0e Reviewed-on: https://gerrit.libreoffice.org/53154 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 4bacf58f4af44ac8c4632b43289ccfcc07e5820c) Reviewed-on: https://gerrit.libreoffice.org/53170 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-04-23Related: rhbz#1396729 use cairo_surface_create_similarCaolán McNamara7-31/+55
where we can Change-Id: If6fd729a9cbf834faef33586b5bd886aad2fbe1d Reviewed-on: https://gerrit.libreoffice.org/52726 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 b524de950c6eb0bc61d05d41fe69b67ab59b16c6) cairo_surface_create_similar_image is >= cairo 1.12.0 (cherry picked from commit 2ca4b505b25e13c9f422c28252f5b7533b8e3270) Change-Id: I1805e5680beff6c632016686aa661efe25a8c2f8 Reviewed-on: https://gerrit.libreoffice.org/53021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-04-18vcl: WNT: *really* avoid calling SHAddToRecentDocs() from unit testsMichael Stahl1-0/+3
On Windows 10, Explorer spends ridiculous amounts of CPU with updating its recent documents view while tests are running. (cherry picked from commit 94c264859f621e8e7c793fad2beb6528659433bf) It's much better to check IsHeadlessMode anyway because that is set in more situations, and if you run soffice --headless you probably don't want the corresponding files to show up in Explorer's Recently list. (cherry picked from commit b07e8a7e16ba69e822a309ec280d1987f90021a3) Change-Id: I8ada3659d05c94d072ba30859090e835a595e9ea Reviewed-on: https://gerrit.libreoffice.org/53115 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-04-18tdf#113197 Add MaskPrimitive (clip) to EMF/WMF if neededArmin Le Grand1-5/+27
Added code to quartz vcl implementation that takes care when BitmapPalette.count != (depth^^2)-1 - which may be the case anytime. If then a bitmap value exists that goes beyond that count, a invalid access was executed Change-Id: Iab332c91b8753aab85e9d365323f5c9e531efab2 Reviewed-on: https://gerrit.libreoffice.org/44058 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/53085 Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2018-04-17tdf#117033 - Tooltips show the wrong symbol for MOD3 combinationsheiko tietze1-6/+6
Symbol for MOD3 added Change-Id: Idb76199fbff240fe39c96ed837db098a4283d70b Reviewed-on: https://gerrit.libreoffice.org/52957 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit e422efcaff1bf789343a73a16e46b00f303e3032) Reviewed-on: https://gerrit.libreoffice.org/53015 Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com>
2018-04-12tdf#116563: floating windows must get input focus at some pointKatarina Behrens1-9/+5
This partially reverts commit bb6a8dce405bd0f and means we need a different solution for tdf#48300 on X11-based Linux frontends. Send _NET_ACTIVE_WINDOW signal only if we want to activate window that has been minimized (ToTopFlags::RestoreWhenMin) or covered by other windows (ToTopFlags::ForegroundTask). Change-Id: I529baf6cc1174728b54bae4c658cf95631da19d6 Reviewed-on: https://gerrit.libreoffice.org/51867 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit 0db4e7f60c92313327ae5b1e4307ed4fedfaa6f5) Reviewed-on: https://gerrit.libreoffice.org/52378 Tested-by: Xisco Faulí <xiscofauli@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 McNamara3-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 Hosny6-38/+277
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-21tdf#115420 fix DC usecount and drop wrong assertsJan-Marek Glogowski4-17/+8
For DC initialization we check the thread ID to assign a normal or cached DC to the corresponding WinSalGraphics variable. The cached DC has a usage count, as there are some limits on cached DCs count (DCX_CACHE). But for the WinSalGraphics DC init and release the variable just matters for the accounting, and generally which thread is doing the calls: the non-main thread always has to relay them to the main application thread. Since we're releasing all WinSalGraphics in ~WinSalFrame and do all release and re-init in ImplSetParentFrame, there is no way to correspond the thread ID to the WinSalGraphics variable. So this drops the wrong assertions based on the WinSalGraphics variables and renames the GETDC message to GETCACHEDDC to make usage of a cached DC (DCX_CACHE) more obvious. As a consequence of the different release DC handling this also fixes the accounting of the cached DCs, wich was broken in the initial fix; commit c15ea73f960bbd3d2a4b0c43b467ac62eeba3505 Change-Id: I11ce52a1b4005f26567f92588437fa37bf227a2e Reviewed-on: https://gerrit.libreoffice.org/51318 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 8939cb9456ee76a848cc8089747f280751092cf8) Reviewed-on: https://gerrit.libreoffice.org/51549 Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-03-20rhbz#1392145 ensure titlebar close button matches 'outside' directionCaolán McNamara3-2/+34
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-13tdf#115649: ensure we own SolarMutex in the callbackMike Kaganski1-0/+2
The crash is caused by releasing SolarMutex we don't own; the release happens in Application::Reschedule() inside SalPrintAbortProc. The crashing callstack: ucrtbase.dll!abort() mergedlo.dll!comphelper::GenericSolarMutex::doRelease(bool bUnlockAll) Line 72 mergedlo.dll!SalYieldMutex::doRelease(bool bUnlockAll) Line 177 [Inline Frame] mergedlo.dll!SolarMutexReleaser::{ctor}() Line 1473 mergedlo.dll!WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents) Line 550 mergedlo.dll!ImplYield(bool i_bWait, bool i_bAllEvents) Line 469 mergedlo.dll!SalPrintAbortProc(HDC__ * hPrnDC, int __formal) Line 1308 gdi32full.dll!vSAPCallback() gdi32full.dll!ExtEscapeImpl() gdi32.dll!ExtEscape() [Frames may be missing, no binary loaded for KMUU727V.DLL] KMUU727V.DLL!0000000011d0dc21() Change-Id: I955eab7894186900d0d99e28f62d87cc645e4a5a Reviewed-on: https://gerrit.libreoffice.org/51052 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 43bf50d5ced4b878f747075f8c0f1b32991c290e) Reviewed-on: https://gerrit.libreoffice.org/51153 Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-03-13forcepoint #27 check region bands loaded from stream for consistencyCaolán McNamara3-6/+32
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-13forcepoint #25 ensure null terminationCaolán McNamara1-5/+9
Change-Id: I37f4787fb5772e959c45280d9650adcc15591033 Reviewed-on: https://gerrit.libreoffice.org/51129 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-03-08tdf#115420 WIN clean up WinSalFrames DC handlingJan-Marek Glogowski2-184/+170
We still don't return a SalGraphics object from AcquireGraphics without a valid DC. But internally we keep the WinSalGraphics objects around, so we now have to verify the DC before using it. In the end this also fixes the leak of the threaded SalGraphics of the frame. Change-Id: I267c96c04b7d00cb66a6c84c63d1373ebe0f529f Reviewed-on: https://gerrit.libreoffice.org/50908 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit c15ea73f960bbd3d2a4b0c43b467ac62eeba3505) Conflicts: vcl/win/window/salframe.cxx Also includes the following patch: WIN rename SalFrames SalGraphics pointers This renames mpGraphics => mpLocalGraphics and mpGraphics2 to mpThreadGraphics. Change-Id: I649b956abc9587f1be74872d439fefc5f5b21135 Reviewed-on: https://gerrit.libreoffice.org/50907 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit 352bd98892c1cdf95756a49f38c84212eebffd7b) Reviewed-on: https://gerrit.libreoffice.org/50958 Reviewed-by: Michael Meeks <michael.meeks@collabora.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 Melenchuk2-10/+25
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-26tdf#103571: Avoid spurious heavy SalEvent::DisplayChanged callbacksTor Lillqvist2-16/+56
It seems that on some Macs that the NSApplicationDidChangeScreenParametersNotification is sent for unknown reasons quite often. I can reproduce the problem by changing the Dock size in System Preferences while LibreOffice is running, but others seem to get it without resorting to such trickery. The code used to invoke the SalEvent::DisplayChanged callback in all cases, which can be extremely heavy, as it involves re-measuring text layouts all over the place in all open document windows. Avoid that if the geometry in fact has not changed. Sure, there still is the problem that LibreOffice can become unresponsive for several seconds when the display geometry *does* change, like when you attach or detach a display. Change-Id: I659881e5e392bd599f6be190835e32a77d9f4725 Reviewed-on: https://gerrit.libreoffice.org/50249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 715b7b6f346fdd9c856db268dcd66334b58c273c) Reviewed-on: https://gerrit.libreoffice.org/50264 Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
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-23tdf#67744, tdf#68889: Fix weight reported by the system for these fontsTor Lillqvist1-1/+24
A hack, but oh well. Let's hope there won't be a lot of these special cases. Maybe some generic heuristic would be better. Like if a font's GetStyleName() is "Medium", "Medium Oblique", or "Medium Italic" then always force its weight to be WEIGHT_NORMAL? Reviewed-on: https://gerrit.libreoffice.org/50172 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 1d7f96a324a4c2ab82a04513c6a38dc31fd061fa) Change-Id: I13580d27acfb0cc200bdb0cc1911518675d3e32e Reviewed-on: https://gerrit.libreoffice.org/50198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2018-02-23tdf#100784 macOS: Don't attempt to handle shortcuts via the menubarMaxim Monastirsky1-1/+2
... when it's hidden. Change-Id: I7930afb8124dd552843512cd30bce4d82ade0c70 Reviewed-on: https://gerrit.libreoffice.org/49399 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit 9d77e7551e56b85d7f1b40bc42b9ba6876091f22) Reviewed-on: https://gerrit.libreoffice.org/49707 Reviewed-by: Tor Lillqvist <tml@collabora.com>
2018-02-22tdf#103690: Set up notifications only after VCL has been initialisedTor Lillqvist3-0/+11
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 Hosny2-95/+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>