summaryrefslogtreecommitdiff
path: root/vcl/source
AgeCommit message (Collapse)Author
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/38168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Marco Cecchetti <mrcekets@gmail.com>
2017-05-30Resolves: tdf#108111 backport mono checkboxes fixCaolán McNamara
replace the blue which will be set to transparent, with transparent and then we don't "manually" replace a color with transparent which makes tdf#108111 look right again (cherry picked from commit f1a8e00764b32c3b799ecd40dcb4dd632493bc45) Change-Id: I95923685d412145e88b672a50311c767d1425493 Reviewed-on: https://gerrit.libreoffice.org/38223 Reviewed-by: Justin Luth <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-29Resolves: tdf#108069 2nd OpenGLContext::init should dispose earlier resultsCaolán McNamara
Change-Id: If6bb9517a4081576347d71ddf26d020119d34247 (cherry picked from commit 0b9b36cafe29916a9fdeac420a49c174adb10c59) Reviewed-on: https://gerrit.libreoffice.org/38065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-05-25tdf#107868 PDF export of editeng fill color: restrict to logic map modesMiklos Vajna
The original use case was Writer/Impress shape text, but when the map mode is pixels, the reference device gives bogus values for the PixelToLogic() calls, affecting e.g. form controls. Just go back to the old way of not painting the background for those. (cherry picked from commit 919a4ef592b6026a7533a93682f39118fef29ce8) Conflicts: vcl/qa/cppunit/pdfexport/pdfexport.cxx Change-Id: I52f1901af15732274915fa3c77c06909b5164afb Reviewed-on: https://gerrit.libreoffice.org/37977 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-25tdf#103158 ctrl+shift should work on key upMaxim Monastirsky
Under gtk/gtk3 we send CommandEventId::ModKeyChange on key down, to support the auto-accelerator feature. But at least the handler in SwEditWin::Command must get it on key up, in order to not interfere with other ctrl+shift+X shortcuts, which work on key down. To achieve that, we need: - On key up pass the key that was just released, instead of the current state of nothing being pressed. - Have a flag of whether it's a key down or up event, so it can be checked by the application code. Reviewed-on: https://gerrit.libreoffice.org/37275 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> (cherry picked from commit fe0451259d2fb93c809c1bfa3baf5abd90019c58) Conflicts: include/vcl/commandevent.hxx vcl/source/window/commandevent.cxx vcl/unx/generic/window/salframe.cxx vcl/unx/gtk/gtksalframe.cxx vcl/unx/gtk3/gtk3gtkframe.cxx Change-Id: If188d6ccdc3b214a2c3ed20aad291d74d46b358f Reviewed-on: https://gerrit.libreoffice.org/37516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-05-24Resolves: tdf#103174 & rhbz#1367846 improve gtk3 trackpad scrollingCaolán McNamara
convert number of "lines" scrolled to double and allow fractional parts of lines/columns Change-Id: Ib99c815cfc8823e22fc1d76e201903c34ed0f61b Related: rhbz#1367846 queue and merge scroll events Reviewed-on: https://gerrit.libreoffice.org/37779 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7f60978b2ccd0e17816b78bde60c6e0e60a9d52e) Change-Id: Ib45f61bbb35bd240829491ac8a79803222974778 Reviewed-on: https://gerrit.libreoffice.org/37913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-05-16ofz#1605 check multiply and shiftCaolán McNamara
Change-Id: I6aad9ad23e7bf080b3b610223f92df7074530beb Reviewed-on: https://gerrit.libreoffice.org/37642 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-04-20vcl: protect Window from exceptions during construction.Michael Meeks
Probable fix for: http://crashreport.libreoffice.org/stats/crash_details/f69188bd-0fdd-4b74-9ec6-35b544cba0c9 Change-Id: I6442451785867f0fc2daf84776118b092d4d6a18 Reviewed-on: https://gerrit.libreoffice.org/36653 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 6827da5052bfe975a3b34af8dfa8af75d41e904c) Reviewed-on: https://gerrit.libreoffice.org/36674 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-04-12infinite SetDefaultSize->SetPosSize->SetDefaultSizeCaolán McNamara
https://retrace.fedoraproject.org/faf/reports/1278627/ presumably the 'optimal' starting size hits the invalid size path causing another attempt usin the optimal size, so force a valid initial fallback size Change-Id: I6c38ee5e1b90ce41a4550c8a8370e791f5c351b0 (cherry picked from commit 4930acb18bbd145fd995084cd95e3e9d631424ed) Reviewed-on: https://gerrit.libreoffice.org/36453 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-04-05tdf#104686: do not crash if Menu has been somehow disposedAron Budea
The rare crashes in MenuFloatingWindow::ImplGetStartY() and MenuFloatingWindow::ImplScroll(bool) likely happen because of a disposed Menu. Let's guard against invalid accesses. Change-Id: Ie31240abbc48c06edd40d0a95f319725cdb3db16 Reviewed-on: https://gerrit.libreoffice.org/36026 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/36151 Reviewed-by: Aron Budea <aron.budea@collabora.com>
2017-03-29Resolves: tdf#106155 avoid opengl for toplevel X window iconsCaolán McNamara
because an opengl context requires a toplevel window so it recurses to death. Only the gen/kde4 vclplugs are affected here Change-Id: If5396d183d90d1872931b170dc90c3a70d8ea6b6 (cherry picked from commit b012e83e1cd09a0b6f9ede94a5c2d72d24459ce4) Reviewed-on: https://gerrit.libreoffice.org/35803 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-29Attempted fix for mirrored geometry crasher.Michael Meeks
Only plausible cause is pWindow->GetParent() being null, while we have a pParent which has to be valid. http://crashreport.libreoffice.org/stats/crash_details/6161398d-17b6-4a93-aa70-a559efa07868 Code was initially introduced in this form: commit 4716735ba7d0ad133ff018481f94d6b4f201bbd9 Author: Stephan Schäfer <ssa@openoffice.org> Date: Thu Sep 19 15:46:19 2002 +0000 #103362# improve positioning and resizing of system windows No public report, sadly. And modified by commit fba46c6efd08d50fee92cc11546f3ed253a57af8 Author: Chris Sherlock <chris.sherlock79@gmail.com> Date: Mon Feb 3 16:46:04 2014 +1100 fdo#74424 Use Window::GetOutDev() to access ImplReMirrored() Part of the decoupling of Window from OutputDevice. We now get he Window's OutputDevice instance and manipulate this. Do not rely on the inherited function. where the GetParent()/pWindow->GetParent() problem surfaces Change-Id: Ia261028a4719525135e3fe4b00074427c1d9df6c Reviewed-on: https://gerrit.libreoffice.org/35796 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 d93b8268da982ad26db9e03156ce9b89f3410486) Reviewed-on: https://gerrit.libreoffice.org/35827 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-22Resolves: tdf#105463 convert bmps to pngCaolán McNamara
because bmps aren't seen since... commit c3043a3072465c489d3b20991b17d222771305eb Date: Mon Oct 31 13:28:26 2016 +0100 tdf#103591 icon theme name resolving, ui fixes, prioritize png - Prefer "png" over "svg" because for Tango theme we include both (cherry picked from commit a3c4f39868226151b4b01906cbcf1b6d40740a28) convert from bmp to png (cherry picked from commit 1b7d1d16e3a6826433271b3eed4a2d542585961b) Change-Id: I93755ac95c170c457b32adac07557ed48ad8beee 7fe47f47f19b93eab5d0cef0afde63e6f61c21b4 Reviewed-on: https://gerrit.libreoffice.org/35534 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-03-19tdf#106295 fix vertical orientation for fullwidth colon and semicolon.Mark Hung
Chinese users would expect fullwidth colon (U+FF1A) and semi-colon (U+FF1B) to be Tu( transformed upright ) instead of Tr ( Transformed rotated ) in vertical writing mode. Make them exceptions of UTR50 when language is zh. Change-Id: If7d01199973d73136a621bf2f32377da76ccb22a Reviewed-on: https://gerrit.libreoffice.org/34980 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/35382
2017-03-19Handle Tr vertical orientation before shapingKhaled Hosny
See https://github.com/behdad/harfbuzz/issues/355 (cherry picked from commit 5c617a811724a45dd8688869eeafac4c44f6a8aa) Change-Id: Ic82d74046980fae3e7a973fee90fe5bb4f2b8588 Reviewed-on: https://gerrit.libreoffice.org/35387 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Hung <marklh9@gmail.com>
2017-03-17tdf#106466: Use graphite2 shaper firstKhaled Hosny
We want to always prefer Graphite shaping when supported by the font, which is also what HarfBuzz does by default. Change-Id: I6670fc03b8e6b3d7e07e1b8e0062880524da1655 Reviewed-on: https://gerrit.libreoffice.org/35046 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> (cherry picked from commit 3cee50476e422e3ed84169cdcbe6bd9883fc9316) Reviewed-on: https://gerrit.libreoffice.org/35058 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-03-14tdf#106271 Cannot disable Menubar under UnitySamuel Mehrbrodt
Empty the global menu when the user wants to hide the menubar. When showing it again, the global menu is refilled. (cherry picked from commit f2fa5951bf3d02439a3e96d1f9d89962f0901edc) The following commits have been squashed into this commit: 1. Destroy menu widget when enabling Unity integration Like GtkSalMenu::ShowMenuBar did before f2fa5951bf3d02439a3e96d1f9d89962f0901edc ("tdf#106271 Cannot disable Menubar under Unity") Should fix https://lists.freedesktop.org/archives/libreoffice/2017- March/077225.html (cherry-picked from commit 27f89f08cf4086802ce67f12389414bef6ab64ca) 2. Don't use SetDisplayable when enabling Unity mode because now it tracks the global menu too, but all we need here is to hide the in-window menubar widget. (cherry-picked from commit 3daa6c66eb9a4c334d6f72a8fd4bb09d7360a913) Change-Id: I3c5e17100622cd8d22c4348cf90a76233dd0fd4c Reviewed-on: https://gerrit.libreoffice.org/34919 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-03-07tdf#103831, tdf#100986: Force using GDI when neededKhaled Hosny
Our DirectWrite renderer is incomplete and can’t handle rotated text or text with horizontal scaling, so route these two through GDI for now. Reviewed-on: https://gerrit.libreoffice.org/34848 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> (cherry picked from commit a51b7a1c3a7e7cf7b0c733e1dec40288278c1884) Change-Id: I87b85796a29e3acce782e01b4c629fec6f1a9e25 Reviewed-on: https://gerrit.libreoffice.org/34862 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-02ofz: Z_NEED_DICT is unsupportedCaolán McNamara
Change-Id: Ib0945d5a4606915aff9ee3019203caaf2a3cc7c5 (cherry picked from commit aacaacc16938b030a1341d8dbaf56c6a2efeb1dc) Reviewed-on: https://gerrit.libreoffice.org/34743 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-03-01Tolerate mouse move generation on disposed windows.Michael Meeks
http://crashreport.libreoffice.org/stats/crash_details/524d28fb-4fd2-4d11-83b1-1360b5ab5068 Change-Id: I19a13f751b5cf000c9938ff991d7d44bba0a4de7 Reviewed-on: https://gerrit.libreoffice.org/34756 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit a9be0b6a4e39240871a9b35ae9afd04f242a3ea4) Reviewed-on: https://gerrit.libreoffice.org/34757 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-28tdf#104482 Force updating progress bar on safeJan-Marek Glogowski
I don't know why the progress bar on load is handled differently then on safe. As a workaround, this converts all Flush() calls to Update() calls, but we should update the UI on safe correctly. Change-Id: I97d6fc5797d08e9556f7fa7f9f8110aef30b3772 (cherry picked from commit 0b08eacd79a2133a07410dfb99bcc04bb9dd2199) Reviewed-on: https://gerrit.libreoffice.org/34551 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-22Fix visible space on Mac with the new layout engineKhaled Hosny
This is not an issue on master since the alternative Mac code path is gone, but we need to skip it in 5.3 when the old layout engine is not used as well. Change-Id: Ib0c8fcf072229c59e15877815c9d88aed94672f0 Reviewed-on: https://gerrit.libreoffice.org/34433 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-16Resolves: ofz#576 unexpected exception with invalid fractionCaolán McNamara
(cherry picked from commit cff6cdb2ee37e836b9bab39500d24fcedc360121) Change-Id: I1d653775e88e9fa2ba7b62fce39d52fc21ffe363 Reviewed-on: https://gerrit.libreoffice.org/34069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-02-15Simple work-around for unpleasant framework shutdown to avoid crash.Michael Meeks
http://crashreport.libreoffice.org/stats/crash_details/2de31c06-da20-4280-916a-e282a337b16b Change-Id: I0b599de9b36f62d65988c1ab698f1559134fbf7c Reviewed-on: https://gerrit.libreoffice.org/34294 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 2c60e02bbfde8655828a5b019642f5e85f975e61) Reviewed-on: https://gerrit.libreoffice.org/34297 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-13Resolves: tdf#101972 skip invalidating labels on alt if autoaccel is disabledCaolán McNamara
so no Invalidate will be called if auto accelerators are not enabled so there should be no blinking under windows Change-Id: Iccc5dad7af41f39ac02d3be93e935f2d926a82a6 (cherry picked from commit f67dc04cfdd9e63a45ec6c8bc00829bce8f17d4b) Reviewed-on: https://gerrit.libreoffice.org/34076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-09ofz#574 sanitize png palette indexesCaolán McNamara
clarify we're not setting a pal index in the mask no logic changed intended, SetPixelIndex expands to this, just want to clarify that this is an alpha value, not an index into a palette (cherry picked from commit e5b23d924d60e7a0fb67c44c6dad3f4cb3bd5ddc) Change-Id: I006ffdf5c8c751e7e07b133716022e2a9b154478 e9bb188b116adf3eab4e2bb1d6da8badbaead88b Reviewed-on: https://gerrit.libreoffice.org/34035 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-02-01tdf#105461 PDF export: handle text fill colorMiklos Vajna
Text portion level background in Writer text was working already, as Writer paints its background explicitly, and then uses no text fill color in the metafile (that is turned into a PDF later). However, text fill color is used for Writer shape text and also in Impress. The rectangle is not just the text itself, but also the ascent / descent region, this matches the desktop rendering result. (cherry picked from commit ee32c7d8083ae1449d6b379034be92995c142da9) Change-Id: I644007ade43a8b9e663890643b826ae12c427ea5 Reviewed-on: https://gerrit.libreoffice.org/33794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-02-01ofz#502 negative indexCaolán McNamara
Change-Id: I2eb3da9d378cd8fdace5ccd644f501f5119f6698 Reviewed-on: https://gerrit.libreoffice.org/33740 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-26only alloc pDXAry if we are going to use itCaolán McNamara
Change-Id: I4fa075124ad55d3a06e1f3d21845f73778c841b6 Reviewed-on: https://gerrit.libreoffice.org/33588 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-26ofz#424 vcl: reset nLen tooMichael Stahl
Change-Id: I8794bfebaf729345bfd1aa44dcd66099db7ca1cd Reviewed-on: https://gerrit.libreoffice.org/33583 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-01-26Resolves: tdf#94457 our EmfPlusSetPageTransform is malformedCaolán McNamara
we write a single short, resulting in a record of 0x000C in length MS-EMFPLUS spec has EmfPlusSetPageTransform as 0x0010 in length because we're not writing the 4 byte PageScale value. the previous pageunit unit we are writing is of value 1, which is UnitTypeDisplay, the same spec says... "The unit of measure for page space coordinates, from the UnitType enumeration. This value SHOULD NOT be UnitTypeDisplay or UnitTypeWorld" and footnotes that with... "Windows never writes those values to the PageUnit field, but they are accepted with undefined results." Change-Id: Ic8b5ec463b59aab28ae9897947dfcdbd35b22048 Reviewed-on: https://gerrit.libreoffice.org/33559 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-26fix guardCaolán McNamara
Change-Id: If7787ca67f3c0d45ac0425a12719e92e0040bcc3 Reviewed-on: https://gerrit.libreoffice.org/33518 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2017-01-25ofz#463 unable to mmapCaolán McNamara
Reviewed-on: https://gerrit.libreoffice.org/33519 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit f6c465bc8e7583a8321f5c881cb008b980e0e3fa) Change-Id: I509faeda019f42bbe7cdc5fc249f2ea2076bb702 Reviewed-on: https://gerrit.libreoffice.org/33521 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2017-01-25ofz#439 protect against 0 len textCaolán McNamara
Change-Id: Ib67284636235b0d43df626a4aeed67f2bc64b491 Reviewed-on: https://gerrit.libreoffice.org/33375 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-24Resolves: ofz#424 guard against broken dxary lengthCaolán McNamara
Change-Id: Ia2569e963edd75cd6c27399d33e73bafe8b3f073 Reviewed-on: https://gerrit.libreoffice.org/33320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-19Resolves: tdf#98593 buttons in writer show different text at different zoomsCaolán McNamara
The DrawControlText always renders with a reference device positions but we pass in a rectangle which is derived a different way. So, add a GetControlTextRect which operates on the same reference device as DrawControlText so the rectangles match The rectangle is mapped from pixels to logic and back from logic to pixel, so add an argument to store the logic size from GetControlTextRect and re-use it without conversion on the cases where we pass back the original rectangle zooming in/out on the button in writer is now stable wrt text shown at all zoom levels Change-Id: Ic581eca67d0ff265e2753ab8b6c40e8fca7e6ae4 Reviewed-on: https://gerrit.libreoffice.org/33277 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 db9ef688edd86b31606e0dd6df6a77732faca49b) change DrawControlText to return new rect rather than change old one Change-Id: Id5c80ff263e429d4239a844db216e87a656edb2e (cherry picked from commit bc6479e92b56df742dd7339d337ffc78d2f9e4a1) Ref...DeviceTextLayout::GetTextArray is only called by Ref...DeviceTextLayout so set it as private to de-confuse this a little Change-Id: Idde7f78a767227cc2d52e417b6c39d12e1339745 (cherry picked from commit 3d002fdb8738d9bbc9b04c0270510e349bd58149) Reviewed-on: https://gerrit.libreoffice.org/33281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-18ofz#419 same problem as wmf and emfCaolán McNamara
this is the *third* effective copy of this, see the other two uses of LF_FACESIZE in wmf parsing Change-Id: I475b18314784ad072fe58730c361fc5ca6e65819 Reviewed-on: https://gerrit.libreoffice.org/33256 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-18ofz: reduce scope, check stream, validate nActionsCaolán McNamara
(cherry picked from commit bd78b28a1233e26c023a52df6b119d60a61d53ad) Change-Id: Ie420ad40b0d852708828620cd26c2f746398f5a8 Reviewed-on: https://gerrit.libreoffice.org/33259 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-17ofz#411: XPMReader::ImplGetColKey short readCaolán McNamara
Change-Id: I2e47ef6478b8349a562b294d0fbdad65c2a3b543 Reviewed-on: https://gerrit.libreoffice.org/33217 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-17tdf#105017 Crash when click a "New Theme..." in Gallery on detached SideBarNoel Grandin
caused by VclPtr fixes which meant instead of the dialog staying in an always-zero ref-count state, it went up to a ref-count of 1, then down to zero, which triggered a delete before the dialog had finished displaying. And revert my fix in commit 0c1cd678f71e519f5a4e623d93442e046485005a which just worked around the underlying problem Change-Id: Icb35535dd06a2d1db1016d00d106760847d87430 (cherry picked from commit cd9d8315141c3070f43e145ed4ee390e837eb73f) Reviewed-on: https://gerrit.libreoffice.org/33209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-14tdf#105017 Crash when click a "New Theme..." in Gallery on detached SideBarNoel Grandin
Change-Id: I6a3c44a0a08cf036776976d40c985889698c08ac Reviewed-on: https://gerrit.libreoffice.org/33041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit a076a062ceb02bd34a460819db61dcbfbca5c8d7) Reviewed-on: https://gerrit.libreoffice.org/33056 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-13ofz: ensure all not explicitly set indexes are zeroCaolán McNamara
Change-Id: Idbe6ceeb61d3dfe26f281349181e7a60f7e59000 (cherry picked from commit 14d9b3519adac8543b52ddb84e49eecbdd1d9eb2) Reviewed-on: https://gerrit.libreoffice.org/33035 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-01-12tdf#105151 - be more conservative about EndTracking / Tracking calls.Michael Meeks
We really shouldn't be emitting these into widgets after they are disposed - it serves only to confuse things. Restore behaviour to how it was before the VclPtr change for this. Change-Id: Ife666929f8aac0e4431a5e43970769692c11888c Reviewed-on: https://gerrit.libreoffice.org/32785 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit d788d37a16d382d7ff32a19e8d65e5c605ac55dd) Reviewed-on: https://gerrit.libreoffice.org/32789 Reviewed-by: Eike Rathke <erack@redhat.com>
2017-01-10ofz#394 xbm ParseDefine problemCaolán McNamara
Change-Id: I75fb761d23fdb3780088a9d209200429edb57a26 Reviewed-on: https://gerrit.libreoffice.org/32877 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-01-04vcl: hold VclPtrs to avoid possible lifecycle related crashers.Michael Meeks
Makes code on common EnableInput crash reporter trace safer. Change-Id: Ibcf218d0d2460383d12e19f48aaf0ab08e541532 Reviewed-on: https://gerrit.libreoffice.org/32706 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 61aa97c1be23398acb7e9160763b621f63c13d88) Reviewed-on: https://gerrit.libreoffice.org/32719 Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2017-01-04tdf#103626 don't scale application icon to prevent a start-up loopTomaž Vajngerl
Reviewed-on: https://gerrit.libreoffice.org/32382 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 96b95f5010be090ebae6f755d4d3891a2334332c) + commit e36d9ae2cbe45f33aaaef3eb33eff9d13ee04a66 Typo: scalePrecentage->scalePercentage Author: Julien Nabet <serval2412@yahoo.fr> Change-Id: I2e65ba16d93167dc4abb029c7e941e91be9a62ab Reviewed-on: https://gerrit.libreoffice.org/32401 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-01-02ofz#355: lsan detected leakCaolán McNamara
Direct leak of 1296 byte(s) in 6 object(s) allocated from: #0 0x5de7a0 in __interceptor_calloc /src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:72 #1 0xe0f2132 in hb_shape_plan_t* hb_object_create<hb_shape_plan_t>() /work/workdir/UnpackedTarball/harfbuzz/src/./hb-object-private.hh:129:24 #2 0xe0f2132 in hb_shape_plan_create /work/workdir/UnpackedTarball/harfbuzz/src/hb-shape-plan.cc:133 #3 0x85a3488 in CommonSalLayout::LayoutText(ImplLayoutArgs&) /src/libreoffice/vcl/source/gdi/CommonSalLayout.cxx:555:40 #4 0x3d97cf2 in OutputDevice::ImplLayout(rtl::OUString const&, int, int, Point const&, long, long const*, SalLayoutFlags, vcl::TextLayoutCache const*) const /src/libreoffice/vcl/source/outdev/text.cxx:1318:36 #5 0x3d990e1 in OutputDevice::GetTextArray(rtl::OUString const&, long*, int, int, vcl::TextLayoutCache const*) const /src/libreoffice/vcl/source/outdev/text.cxx:966:35 #6 0x3d98d2d in OutputDevice::GetTextWidth(rtl::OUString const&, int, int, vcl::TextLayoutCache const*) const /src/libreoffice/vcl/source/outdev/text.cxx:893:19 #7 0x485f630 in ImplFontMetricData::ImplInitTextLineSize(OutputDevice const*) /src/libreoffice/vcl/source/font/fontmetric.cxx:338:30 #8 0x3d6801e in OutputDevice::ImplNewFont() const /src/libreoffice/vcl/source/outdev/font.cxx:1095:42 #9 0x3d64d92 in OutputDevice::GetFontMetric() const /src/libreoffice/vcl/source/outdev/font.cxx:171:23 #10 0x8695053 in WinMtfFontStyle::WinMtfFontStyle(LOGFONTW&) /src/libreoffice/vcl/source/filter/wmf/winmtf.cxx:265:36 #11 0x8686b9b in std::__1::unique_ptr<WinMtfFontStyle, std::__1::default_delete<WinMtfFontStyle> > o3tl::make_unique<WinMtfFontStyle, LOGFONTW&>(LOGFONTW&) /src/libreoffice/include/o3tl/make_unique.hxx:27:35 #12 0x86eb23c in WMFReader::ReadRecordParams(unsigned short) /src/libreoffice/vcl/source/filter/wmf/winwmf.cxx:937:32 #13 0x86fb901 in WMFReader::ReadWMF() /src/libreoffice/vcl/source/filter/wmf/winwmf.cxx:1371:25 #14 0x47c5949 in ReadWindowMetafile(SvStream&, GDIMetaFile&) /src/libreoffice/vcl/source/filter/wmf/wmf.cxx:78:45 #15 0x61c7ac in LLVMFuzzerTestOneInput /src/libreoffice/vcl/workben/wmffuzzer.cxx:98:11 #16 0x1011f7e8 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:541:13 #17 0x10120544 in fuzzer::Fuzzer::RunOne(unsigned char const*, unsigned long) /src/libfuzzer/FuzzerLoop.cpp:492:3 #18 0x1013ecca in fuzzer::Fuzzer::RunOne(std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&) /src/libfuzzer/FuzzerInternal.h:118:41 #19 0x1011ee3d in fuzzer::Fuzzer::ShuffleAndMinimize(std::__1::vector<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >, std::__1::allocator<std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > > >*) /src/libfuzzer/FuzzerLoop.cpp:471:30 #20 0x100d0aea in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:533:6 #21 0x100c38c8 in main /src/libfuzzer/FuzzerMain.cpp:20:10 #22 0x7fef8459582f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f) Change-Id: Iaa23f8282a45b7c584410b5e8c7b6e9774a34aaf Reviewed-on: https://gerrit.libreoffice.org/32508 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit d19c05bbf0073033573ef428b63f37e7caa12337) Reviewed-on: https://gerrit.libreoffice.org/32586 Tested-by: Jenkins <ci@libreoffice.org>
2016-12-22Fix glyph Y offsetKhaled Hosny
Typo from 9eb4b14ffa57cd7bbdf0fc43096f5f1e65c8e388. Change-Id: I542b84cae50d09f2ed58a58ba9de519354a6900d Reviewed-on: https://gerrit.libreoffice.org/32352 Reviewed-by: Khaled Hosny <khaledhosny@eglug.org> Tested-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-22Resolves: ofz#313 cbBmiSrc > getDIBV5HeaderSizeCaolán McNamara
Change-Id: I67fb67dc0a4cb609b8f1391c1eb6dd395755a933 (cherry picked from commit 7485fc2a1484f31631f62f97e5c64c0ae74c6416)
2016-12-22valgrind: stick 0 at end of successfully read dataCaolán McNamara
Change-Id: Id79f68c9095ab313ac05d2c8b55df71788df81d3 (cherry picked from commit 0dfc6f70ab53a773ee05664235d7c8927ab20f2c)