summaryrefslogtreecommitdiff
path: root/vcl
AgeCommit message (Collapse)Author
2017-11-02tdf#113225 - reset framebuffer count when resetting OpenGLContextMichael Meeks
Otherwise we can fail to allocate a new one when we need it post reset. http://crashreport.libreoffice.org/stats/crash_details/e4f26191-15d5-441a-868f-9ada21ef4424 Change-Id: Icc5ec6c51338e18a0a1bc890f56670e8fe9c73ea Reviewed-on: https://gerrit.libreoffice.org/43508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 856d734ee1665b6aa7304847c3a923af09066016) Reviewed-on: https://gerrit.libreoffice.org/43550 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 2e19422859f685ccd391b89467d8c88a46311222) Reviewed-on: https://gerrit.libreoffice.org/44067 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com>
2017-11-02tdf#109343 Fix paste as .RTF on MacXisco Fauli
Change-Id: Ida0433437301ea2803373e534df3d42f67d6aff8 Reviewed-on: https://gerrit.libreoffice.org/43513 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> (cherry picked from commit dd0bc7323014c528fefb516cacae0591f270862a) Reviewed-on: https://gerrit.libreoffice.org/44013 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-10-27Avoid throwing C++ exception across libjpeg C framesStephan Bergmann
It causes trouble at least for (non-debug) 32-bit ARM Flatpak builds, where CppunitTest_vcl_filters_test aborts with an uncaught css::uno::RuntimeException. This is a partial revert of 6889fa826eef6bd1074d77507818e71dfe8ba152 "rework jpeg error handling to throw rather than setjmp to avoid leaks", switching back to setjmp/longjmp but trying to keep the leaks fixed by introducing any relevant local variables before the setjmps. Change-Id: Ia5984528ea98be1c89a21aee800b247120f88a89 Reviewed-on: https://gerrit.libreoffice.org/43494 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit cfbb8b5090537e79ba70e250ddee86d53facbe15) Reviewed-on: https://gerrit.libreoffice.org/43535 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Rene Engelhard <rene@debian.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-17Different take on tdf#108406: exclude helpimg from installed themesKatarina Behrens
as it still might get selected as default theme under some circumstances and removing it from list in optgdlg.cxx leads to crash This reverts commit 60adba3fb904ed66251ff39c82fe20bec151ef0b but allegedly still crashes on Debian Change-Id: Ib853cc27058d8635482f19a8db26075d64103e1b Reviewed-on: https://gerrit.libreoffice.org/42545 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7e7b9652f44f01fbaf5bc3fde454ba41ce0fe0f7) Reviewed-on: https://gerrit.libreoffice.org/42753 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-10-14tdf#107605: Fix reading version 0 OS/2 font tableKhaled Hosny
The version 0 table os exactly 78 bytes since it does not have any of the extra fields from the later versions. Change-Id: Ie2e478bdefb201b988dc0844240d4ff193d66583 Reviewed-on: https://gerrit.libreoffice.org/43375 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-10-05Resolves: tdf#112827 gtk3 menubar not RTL under RTL localesCaolán McNamara
(cherry picked from commit addd1c34502b959e329354d73808c222986d4b74) Signed-off-by: Lior Kaplan <kaplanlior@gmail.com> Change-Id: Iab4a2980483eb3cd31f8722bd8e5d4eb68b06716 Reviewed-on: https://gerrit.libreoffice.org/43147 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-04tdf#112486 Do not force GDI in no OpenGLXisco Fauli
See: http://nabble.documentfoundation.org/Re-Minutes-of-ESC-call-2017-09-21-tt4223238.html Change-Id: I19bb4b58d2260fd23c32a687a9f504540c229985 Reviewed-on: https://gerrit.libreoffice.org/42898 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 5440837e02dee8bc884e02be697bfd4def621d26) Reviewed-on: https://gerrit.libreoffice.org/43109 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-10-04tdf#107605: Fix line height cslculation for broken fontsKhaled Hosny
Change-Id: I06368dd15d7898dda61bc07b0f96bf82b00733b9 Reviewed-on: https://gerrit.libreoffice.org/43095 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> (cherry picked from commit 9bc39be417a4c436cbe18391fc87e5e835551b07) Reviewed-on: https://gerrit.libreoffice.org/43108 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-25fix some leaksCaolán McNamara
Change-Id: I06a3971d1d269b49b2a7954f977469fbc3d16f35 Reviewed-on: https://gerrit.libreoffice.org/42721 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-19ofz#3419 Null-dereference READCaolán McNamara
Change-Id: I32c5d5039034ac76262223e42a1f27d6f1b84cb5 (cherry picked from commit 3e8ef0e1a40a14d1c2bdb5345ed59941c765356b) Reviewed-on: https://gerrit.libreoffice.org/42464 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-09-18detect corrupted job setupCaolán McNamara
Change-Id: I0d3b4850c3d4c015a0a7e5d36d87113a749c7e0f Reviewed-on: https://gerrit.libreoffice.org/42384 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-09-15gtk3: flicker-free opengl transitionsCaolán McNamara
leave the GtkGLArea opengl context alone except for the final render into it, create a new context for the slide transitions to play with set up a pair of framebuffers, a scratch one to let the transitions render into, the other to take a snapshot when the transition is finished with it and then tell GtkGLArea we're ready to render it and when the callback comes around copy the snapshot into it. Change-Id: I3515614baf7eea0ff53c46edbaf9cf66f926eef2 hidpi+gtk3: move setting the opengl slide viewport to when the window size is set, and adjust to gtk3 hidpi scaling factor Change-Id: Id9bd0defd0b6ae640ac57f88133d954202d4bcc3 Reviewed-on: https://gerrit.libreoffice.org/42143 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 1a547a566eba5943f9e4d9987baf4aee80846dd1) Reviewed-on: https://gerrit.libreoffice.org/42153 Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-15Resolves: tdf#107730 ensure per-thread epoxy_handle_external_wglMakeCurrentCaolán McNamara
Change-Id: Idc1e2da3a02715a09b5b8f4e8e736b8806e59f8e Reviewed-on: https://gerrit.libreoffice.org/41927 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 4cc634327a752d633ea341252d8f4845157f887b) Reviewed-on: https://gerrit.libreoffice.org/41936 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-09-15Resolves: tdf#104141 CAIRO_FORMAT_A1 vs N1BitLsbPalCaolán McNamara
where vcl transparency is the opposite of cairo's so we've been switching the source color to the opposite for drawing on CAIRO_FORMAT_A1 and then sucking out the bits "as-is" to give the right results. Now instead use the right source color and toggle CAIRO_FORMAT_A1 bitmaps to N1BitLsbPal in getBitmap. Then additionally toggle all N1BitLsbPal bitmaps input to drawBitmap to CAIRO_FORMAT_A1 when making a cairo surface from them. Change-Id: I45c6d4f3894c6a22a07a3bd65950cd8070e8eaff Reviewed-on: https://gerrit.libreoffice.org/40453 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 d148340babf6c973f7d463909d7a51e16c953248) Resolves: tdf#111483 1 bit bitmaps with non-standard black/white indexes can be left "untoggled" when converted to cairo A1 Reviewed-on: https://gerrit.libreoffice.org/41895 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 3cb59bff332b02f607d15b5ed41b4438e8102980) Change-Id: I18f3e2109cd4b57bce584545090e26c931de1200 Resolves: tdf#111073 incorrect gif background color a) set correct palette entries for the 1bit bitmap returned b) only use a BITMASK for the mask (like its AnimatedGraphicPrimitive2D brother in drawinglayer does) Change-Id: I704997de554dc4d0e523458d45ab329815b5046a Resolves: rhbz#1467512 mask not created as 1 bit depth Change-Id: Ib5bdd594efd41eb881dfc4e2454b72e4739ffd56 Reviewed-on: https://gerrit.libreoffice.org/39693 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 bea1dc5f8d17c1011cdfab1ff540f3e4b3a4d1bb) Reviewed-on: https://gerrit.libreoffice.org/41924 Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-15Resolves: tdf#110452 stop menubar processing Alt+foo if handled by core widgetCaolán McNamara
Reviewed-on: https://gerrit.libreoffice.org/41884 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 3266c3bf545cc3045f843f764b4c420241d9e4da) Change-Id: I69f975d0f7a753e55f72fcd63f6580e958a80f38 Reviewed-on: https://gerrit.libreoffice.org/41894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-09-14tdf#108722 vcl: fix bugs in TextEngine with TEXTATTR_PROTECTEDMichael Stahl
1. If the cursor is at the end of the paragraph, attributes ending at that position are skipped in TextEngine::FindCharAttrib(). 2. If a TEXTATTR_PROTECTED is found, TextView::KeyInput() retains the selection that was extended to cover the attribute after deleting the text, because it compares to the initial selection. Why delete/backspace keys only work with the "gtk" vcl-plug but not "gtk3", "gen" or "kde4" is a mystery to me. Change-Id: Id7a6f298332f5a99454c793dd2dd6d424a975ad4 (cherry picked from commit d918a8086af56d1869e465baae64d960e56066d1) Reviewed-on: https://gerrit.libreoffice.org/42119 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-13tdf#108963 PDF export of editeng text highlight: handle rotated textMiklos Vajna
The highlight rectangle was not rotated, handle it similar to PDFWriterImpl::drawStrikeoutChar(). (cherry picked from commit da705eff910f512623a689aaf28604270fb8f1c4, but testcase is left out as pdfium in libreoffice-5-4 does not provide the FPDFPageObj_GetBounds() API) Change-Id: I97a5b1fc05706729c58c92b90d6808629af8ca4c Reviewed-on: https://gerrit.libreoffice.org/42185 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-09-13tdf#108299: Limit the width and height of opengl bitmap to...Dennis Francis
GL_MAX_TEXTURE_SIZE in OpenGLSalBitmap::Create() Change-Id: I3d9538cc8004241972bc63d09eeb2914ce511df6 Reviewed-on: https://gerrit.libreoffice.org/42194 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit de55aa0f639a451aae05ec515cfa58d4bbdd8816) Reviewed-on: https://gerrit.libreoffice.org/42226
2017-09-10Resolves: tdf#111864 render progress bar for Ambiance theme properlyCaolán McNamara
Change-Id: I8ce43e4516413ea3779a128b374a931b080ae970 Reviewed-on: https://gerrit.libreoffice.org/41881 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-09-08tdf#110737 set user-events to a lower priority than system redrawCaolán McNamara
Change-Id: Ic6672fcce4cb5516d388fee22120383ccc70a4a5 Reviewed-on: https://gerrit.libreoffice.org/42067 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-09-06Resolves: tdf#107249 round ascent/descent/extleading on conversion to intCaolán McNamara
Change-Id: Ia3ab5960d5288f5831aaa4ade800ca7513dad766 Reviewed-on: https://gerrit.libreoffice.org/41955 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-09-05Resolves: tdf#112180: avoid crash with specific ttfCaolán McNamara
Change-Id: I8cde147279173bffec0c991eb7676f5d4641138d Reviewed-on: https://gerrit.libreoffice.org/41939 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-08-29Resolves: tdf#111760 cancel file dialog on terminateCaolán McNamara
schedule cancel dialog in query termination, take ownership of the desktop and re-schedule terminate to be re-attempted after the dialog is cancelled Change-Id: I5c061b47959baba138c6c23aaae365f28e9cf167 Reviewed-on: https://gerrit.libreoffice.org/41677 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-29Resolves: tdf#111925 we need to take the buffered data len into accountCaolán McNamara
Change-Id: I8aee1f17e6ec1042e7b67942e5bcad0bb3bbf840 Reviewed-on: https://gerrit.libreoffice.org/41645 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-29vcl: fix double-free of ErrorInfoMichael Stahl
The only value that ErrorHandler::GetErrorString() adds over ErrorStringFactory::CreateString() is that it will delete the pInfo a 2nd time, because the ErrorInfo::GetErrorInfo() returns the same object twice. This may fix it, but it's generally hard to tell what this brain damaged error handling code will do. (regression from 1167df7df59e37fddef0c40c4d27cb2e82e10922) Change-Id: I22f446bee669cae8c5288bcc2f1e1d0299f5b384 (cherry picked from commit 41fb6822cbc2f82333ea54db816f60616f827e49) Reviewed-on: https://gerrit.libreoffice.org/41537 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-08-28ofz#3092 Direct-leakCaolán McNamara
Change-Id: Ib10bd9bd2e6e712cb0a9c1906600543f786d7f53 Reviewed-on: https://gerrit.libreoffice.org/41619 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-17tdf#110988 Middle click does not paste primary selectionNoel Grandin
regression from commit 65b7b6322b662785bf032e66c76abc36c9a2bb0e "loplugin:unusedenumconstants read-only constants in vcl" Reviewed-on: https://gerrit.libreoffice.org/41111 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 5b3b0a91edc4c468c7c9c132cd066c0d25de9706) Change-Id: I262dd4c9cd1dc6eca82521f5fd9fbfc952fb7745 Reviewed-on: https://gerrit.libreoffice.org/41133 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-14Related tdf#101467: fix a leak with pSalMask (vcl/bitmapex)Julien Nabet
+ initialize pSalBmp+pSalMask to nullptr Change-Id: I320e9cf98ef8224e98303bec1e58f59dc5b1ad4e Reviewed-on: https://gerrit.libreoffice.org/41097 Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 68b0a61f7d4f89fd25b7725830b828c821da7dad) Reviewed-on: https://gerrit.libreoffice.org/41109 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11tdf#111497: fix leak in FindFontSubstitute with CFReleaseJulien Nabet
Change-Id: I9d7de52b4a1ee102b233b982e97ecbf731b476f2 Reviewed-on: https://gerrit.libreoffice.org/40895 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit 986cd454b2a39ac380b137148f944c0d5ead2631) Reviewed-on: https://gerrit.libreoffice.org/40896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-08-10tdf#111432: fix leaks in AddTempDevFont with CFReleaseJulien Nabet
Change-Id: I11183b7fd21d2398de9e5f5854763cef96963caa Reviewed-on: https://gerrit.libreoffice.org/40845 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr> (cherry picked from commit bc5bd201609ae197f320823880e66187ae94c98a) Reviewed-on: https://gerrit.libreoffice.org/40847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-08-09Resolves: tdf#99286 for jpeg dpi use apis that know about MapUnit::MapPixelCaolán McNamara
move the code which can do this from sw to vcl Change-Id: I9940fb80ecdbfe8f70afc500c691288ed0993701 Reviewed-on: https://gerrit.libreoffice.org/40931 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-27gtk3: Resolves: tdf#109277 take modifier key into account for dndCaolán McNamara
Change-Id: Id0aa4ced8644ddbee9e1a0453887f07907547aae (cherry picked from commit 0c840d9bf308464d58a2df8aaa1e61481b5e4f52) Reviewed-on: https://gerrit.libreoffice.org/40476 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-07-27Resolves: tdf#109289 add SvxColorListBox::IsValueChangedFromSavedCaolán McNamara
and remove PushButton::IsValueChangedFromSaved Change-Id: Ib1c51e27fd708c5d4811c90ef5659b4d55dd8860 (cherry picked from commit 39fd7e97c253153a10161ef3694b64e90e65e80a) Related: tdf#109289 move PushButton::IsValueChangedFromSaved to consumer inheriting the IsValueChangedFromSaved from PushButton has allowed undesirable behaviour to be selected Change-Id: Ifccb1657d2565005e6f9e239c6118f2e5ae7970c (cherry picked from commit 247607727986df0fd0fef198459eb6646e056ea3) Reviewed-on: https://gerrit.libreoffice.org/40484 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-07-25tdf#109281 add fallback to GDI back when we can't bind a DCTomaž Vajngerl
Change-Id: Ideae3a5bcacfaadd2cb9d6b014a449d423d332dc Reviewed-on: https://gerrit.libreoffice.org/40395 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-07-21tdf#107166 improve AA mode selection, retry, more checksTomaž Vajngerl
Major problem when setting the render mode and the text antialias mode is that when you set the render mode to something that isn't compatible with the text antialias mode, then every next call will cause an error (invalid parameters). So we need to be sure that we never set incompatible modes. Additionally we just need to set it one time when we create the surface and not every time we draw. If we get the D2DERR_RECREATE_TARGET we can create a new render target and retry the whole call. Somethimes this is not possible so we try 3 times and the give up. We need to add more checks where we exit early or not continue with some calls as any additional calls could taint the draw state and some things wouldn't be drawn. For example if we calculate the sizes of 0 glyphs we shouldn't continue with binding the hDC with an "empty" rectangle. This will fail and cause some text that is called afterwards to not draw. Change-Id: I8f802da2e7ece0bf16d665f2e5011ffaa5267fca Reviewed-on: https://gerrit.libreoffice.org/40260 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-07-19tdf#109194 cleanse startup notification foo from envThorsten Behrens
So when the desktop environment does startup notification, this DESKTOP_STARTUP_ID gets passed on to the launched application. Problem is, XDG spec says app should read it from the env, then discard - which LibreOffice never does. When passed on to child processes, funny effects might ensue, so let's just erase this at the end of VCL init, when I'm reasonably sure every gtk/kde/whatnot backend did read it. Change-Id: I1f758c7a02455028d2b520c144ffe32538621f19 Reviewed-on: https://gerrit.libreoffice.org/40153 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 8180b6801dca2052a9d40411f9bbdcc96198c52f) Reviewed-on: https://gerrit.libreoffice.org/40164 Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-07-16tdf#107166 BindDC doesn't handle 0 width/height rect consistentlyTomaž Vajngerl
When binding a GDI device context to D2D we need to provide a rectangle where the surface will have effect. When we just need some font information we need to bind the DC too, but we aren't really interested what the rectangle is, so we just provided a 0,0,0,0 rectangle in that case. This sometimes fails with a "out of memory" result and is dependent on the renderer. Instead of 0,0,0,0 rectangle we rather define a 0,0,1,1 rectangle which should never fail. This is not problematic as for actual rendering we later rebind with an actual rectangle. Change-Id: I79c7f0cf4d69f213370ed26a811a908ed16070ff Reviewed-on: https://gerrit.libreoffice.org/39902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-16vcl: fix -Werror=format (32-bit GCC)Michael Stahl
Change-Id: Ia7afb5b9750704797ff8030688d0531c27d80836 (cherry picked from commit c356884319f254fdd944376fe2f841532dc36433) Reviewed-on: https://gerrit.libreoffice.org/39965 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-07-15tdf#104883 Don't call InstallFontconfigResources if it's not availableSamuel Mehrbrodt
We need to call it once because we have no other way to detect whether it's working or not. But if we receive an error the first time, we disable it from now on. Change-Id: I67dba8b65660ff7e05bdf2ddc18b565550901cd1 Reviewed-on: https://gerrit.libreoffice.org/39894 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-07-14fix crash when aInkBoxes might be emptyMarkus Mohrhard
e.g. http://crashreport.libreoffice.org/stats/signature/WinFontInstance::CacheGlyphToAtlas(bool,HDC__%20*,HFONT__%20*,int,SalGraphics%20&) Change-Id: I0f32b549c687c2da6534f59a13ce1c5d57047829 Reviewed-on: https://gerrit.libreoffice.org/39874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 008d7abcdd246cfc9bef6cbdbef85890ca2efd69) Reviewed-on: https://gerrit.libreoffice.org/39877 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-06tdf#106990 set cleartype setting / force to use GDI render modeTomaž Vajngerl
With this we read the system setting for cleartype and set it to the render target we are using. Additionally we set the GDI like rendering mode which forces that the text is rendered similar as this was done with GDI. Change-Id: If6fb72bc371accf50278c968c94e625aee3f0953 Reviewed-on: https://gerrit.libreoffice.org/39602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit a5a3e82e99e7a60ec65c339dd0463af5c680cead) Reviewed-on: https://gerrit.libreoffice.org/39647 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-07-04Resolves: tdf#108452 gtk3 xbm cursors invisible on black bgCaolán McNamara
Change-Id: I5c9b27862da6ac76ae38542f85a51f9aefdd013d Reviewed-on: https://gerrit.libreoffice.org/39112 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-29Don't let m_nGrabLevel become negative, tdf#108705 relatedEike Rathke
... which then later leads to 2 Giga loops on the next GtkSalFrame dtor call, for example on the second AutoFilter button popup in Calc. Fall-out from commit 9b32355ea6d8d5e34363ba0c57e74d75d7a7b1b7 Date: Fri Jun 23 12:48:12 2017 +0100 Resolves: tdf#108705 remove grabs on widget before destroying it that brought this to surface. Change-Id: I0edb7eec9384c716800f07ef1ed91fc8f1d7c119 (cherry picked from commit 637d917d7551fed19c9685f974fb3e732a8f97e2) Reviewed-on: https://gerrit.libreoffice.org/39387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-23Resolves: tdf#108705 remove grabs on widget before destroying itCaolán McNamara
Change-Id: If02a0b4340788db638c74b98e855258145643452 Reviewed-on: https://gerrit.libreoffice.org/39166 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-22ofz#2287 check multiplyCaolán McNamara
Change-Id: Ibc4c93ac1f5686a476b5e303347dc951daa58e33 Reviewed-on: https://gerrit.libreoffice.org/38910 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-06-19silence DrMemory warning about Selected font handle deletedCaolán McNamara
This might actually matter in practice given https://stackoverflow.com/questions/27422871/does-deletedc-automatically-unselect-objects "DCs get a default 1x1x1 bitmap when they're created. This will leak if you don't put it back." Change-Id: Ib2d361995621ad429277ff52cb8c9fdfc0009953 Reviewed-on: https://gerrit.libreoffice.org/38875 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 ceb6b00e3d861825dd59c8b565b122c2eadfb2cb) Reviewed-on: https://gerrit.libreoffice.org/38954 Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-06-16tdf#99680 modified clipping for PDF exportVasily Melenchuk
If clipping is requested, but no clipping region is defined, clipping is ignored. This squashes the following 3 commits: Change-Id: I793c1de1f4f6b0203727c0ff6aa8adecc43ad413 Reviewed-on: https://gerrit.libreoffice.org/38021 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Change-Id: Id4565858b0135b3177044558db87a68ef828955b Reviewed-on: https://gerrit.libreoffice.org/38403 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Change-Id: I102722140e216cb9ad29107aae3bdaa70472d471 Reviewed-on: https://gerrit.libreoffice.org/38694 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/38825 Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-06-14make opengl transitions under X flicker free on enter/leaveCaolán McNamara
Change-Id: I109637dc6b3d23c0beca21f3cf0c7ba918ecb4f8 Reviewed-on: https://gerrit.libreoffice.org/38752 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-06-06tdf#94632 Enable sifr dark and set fallbackYousuf Philips
Change-Id: If77b33acf4f8d3e2e9c38b3e5ef359a1fc966910 Reviewed-on: https://gerrit.libreoffice.org/38387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Yousuf Philips <philipz85@hotmail.com> (cherry picked from commit 59c0682c46e52aa18bdbee4c14ef05af9329de33) Reviewed-on: https://gerrit.libreoffice.org/38426 Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-30tdf#107682 - Repeated images replace correct ones in exported PDFMarco Cecchetti
The problem was due to the buffer acquire methods: in Bitmap::Checksum (old implementation) Bitmap::AcquireReadAccess is used to get the bitmap buffer: indeed this method relies on SalBitmap::AcquireBuffer (which is used in the new implementation) but in case the buffer acquisition fails, instead of giving up, it tries to update the imp bitmap instance embedded in the bitmap (see BitmapInfoAccess::ImplCreate). The solution is to perform this further attemp in Bitmap::Checksum when the value returned by ImpBitmap::GetChecksum is 0. Change-Id: Ib901ac941db57756e9a951bacbc573ca206316e0 Reviewed-on: https://gerrit.libreoffice.org/38167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>