summaryrefslogtreecommitdiff
path: root/vcl/source
AgeCommit message (Collapse)AuthorFilesLines
2016-07-18Related: rhbz#1343766 a11y queries during dispose trigger listbox crashesCaolán McNamara1-0/+2
though not able to reproduce, I have an in-house complaint similar to commit f120abb446bf3f5230ed06a3b148654dde36bb94 Author: Caolán McNamara <caolanm@redhat.com> Date: Wed Jun 8 11:35:15 2016 +0100 Resolves: rhbz#1343766 a11y queries during dispose trigger combobox crashes except with a listbox in the bt (cherry picked from commit c615943bda57eadfa73c14a7314938aabe0bd16f) Change-Id: Id31561e009a1f0ec9272a0e7216296e4017e5688 Reviewed-on: https://gerrit.libreoffice.org/27189 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 583207377705dea2bfe09db3e33d7947c473d862)
2016-07-13opencl: OpenCLZone, detect CL device change and disable CL on crashTomaž Vajngerl1-0/+5
Guard OpenCL calls with OpenCLZone, so if a OpenCL call crashes we detect this and disable OpenCL so next time the user doesn't encounter the crash at the same calculation because he has a broken OpenCL drivers. Similar has been implemented for OpenGL with good results. Additionaly we persistently remember a known good OpenCL device ID and driver version so we can match this and perform calculation tests when they change. This is to ensure that the selected OpenCL device performs as we expect. In this commit the calculation tests aren't included yet. Remove complex static initializer in opencl wrapper library. Reviewed-on: https://gerrit.libreoffice.org/27064 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit f41eb66302208f384a475fb20c98b6d1b0676cb6) Change-Id: I1a8b81ee31298731efcf63dc6a476955afc035e9 Reviewed-on: https://gerrit.libreoffice.org/27103 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit e1ef22371613f384cc2f6fc75d022cb01bf92af7)
2016-07-13Resolves: tdf#100463 tolerence in contour editor doesn't workCaolán McNamara1-18/+18
probably since commit f51f03a46102333bac6a7fe06bc8538492f413a5 Author: Stephan Bergmann <sbergman@redhat.com> Date: Wed Mar 5 12:24:14 2014 +0100 Do not needlessly truncate MinMax argument before comparison with bounds Change-Id: I5c92f0af3e05ad68ed88fa860b36e8426e160bf9 (cherry picked from commit d5bd18ecac5806b7b4e39a1919b6b56df0f94ce3) Reviewed-on: https://gerrit.libreoffice.org/27102 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 95024423f38a5050f614e2d14837eebdbc348a4a)
2016-07-12vcl: extract scale convolution from bitmap to its own class/fileTomaž Vajngerl2-375/+406
Change-Id: Ibb10aa7450b78ca2709da38857f095ccbc679c54 (cherry picked from commit 5919f0bbe82129e25962be88db4156dd7daa2a36)
2016-07-12loplugin:unusedfieldsNoel Grandin3-5/+0
Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864 (cherry picked from commit ec3f72415850bd865eb030cf2b7edb55b99d4756)
2016-07-12Remove excess newlinesChris Sherlock4-12/+0
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> (cherry picked from commit a238b1f8d304bf1e2ffb357937f3ec888ee8ac89) Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
2016-07-12update loplugin stylepolice to check local pointers varsNoel Grandin10-312/+312
are actually pointer vars. Also convert from regex to normal code, so we can enable this plugin all the time. Reviewed-on: https://gerrit.libreoffice.org/24391 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com> (cherry picked from commit e8fd5a07eca70912ddee45aaa34d434809b59fb7) Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
2016-07-12vcl: fix loplugin:stylepoliceMiklos Vajna1-4/+4
Change-Id: I40455e04a5f69dc0956ccb01c48d8a40245a4506 (cherry picked from commit 2465cb26763b2ed8de65f35bce791fb55fe0e746)
2016-07-12GDIMetaFile: rename members missing their prefixesMiklos Vajna1-126/+138
Reviewed-on: https://gerrit.libreoffice.org/24360 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 65827ea3ebe99da58fc94ff9be2e1e579eb1e0a2) Change-Id: Ie21807952d74b89b0e8b6f376f8807737b6685f0
2016-07-01Revert "vcl: desktop terminate, to dispose objects"Ashod Nakashian1-9/+2
This reverts commit 1ce3fbfa868bda383b89ea1e54a37b8bc44c7be5.
2016-06-18crashreport: 644837b5-c445-4779-a75d-dd69fc2e3a6fCaolán McNamara2-5/+10
drop hint of previous window to get mouse wheel event when that window is disposed in order to drop any references to it immediately that happens to avoid anything else lingering too late move the VclPtr into ImplSVData alongside the rest of the things like this so we can remove the static VclPtr which itself replaced a relatively harmless static Window* (cherry picked from commit bdfccfde308f0267965933a8273e6e9201a2c67c) (cherry picked from commit 35205c6e3e2f85d9b7db935689ec949c98e7e431) Change-Id: I1e172071b711b6e4ded9a813ee3de730d3dfdf38 Reviewed-on: https://gerrit.libreoffice.org/26337 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit f7ad46993279d1da56980fc100b3961e5e349400)
2016-06-16gtk3: some changes towards enabling native gtk3 popup menusCaolán McNamara1-8/+7
these menubar things can be menu things and can then do away with the casting, no logic changes intended Change-Id: Ibb1b5354d5e1483327f172d6890e134f1e4b9ee4
2016-06-13Resolves: rhbz#1343766 a11y queries during dispose trigger combobox crashesCaolán McNamara1-0/+6
Change-Id: I29863ca95e64ccd31795f78c29c89ff35009d718 (cherry picked from commit f120abb446bf3f5230ed06a3b148654dde36bb94) (cherry picked from commit f7b0cbf1df98a1c42fe25cfdbd9977fba78347c8) Reviewed-on: https://gerrit.libreoffice.org/26057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 62a30dd22805eab1785703114ebf060a00cf9170)
2016-06-12lok: reset the font list when there are no itemsHenry Castro1-0/+10
In the pre-init stage the devices were initialized with no font list, but later the font list is updated. So those devices were not updated. Change-Id: I157d4c7079f9b1252916eb92b512aadb8e77329f (cherry picked from commit 260f3ff257d7839119c8221397d18a516afd8799)
2016-06-12vcl: desktop terminate, to dispose objectsHenry Castro1-2/+9
In the preinit stage, the Desktop terminate() method is never called when lo_startmain thread is disposing objects. This produces debug assertions and osl assertions. It is forced to call terminate() method, when a tiled rendering case is active then it has a clean disposing objects process. However DBGGUI_DEINIT_SOLARMUTEXCHECK() check is moved at the end to prevent debug assertions solar mutex complains. Change-Id: I4a9b6398296d9150ab748a8d48868a08e7232909 (cherry picked from commit ba29b6ddf4c079a93a8484e95aa42daf2b54a54b) (cherry picked from commit 58c4cd90d34aab5eb13380ef05d67ea7d2aaa225)
2016-06-12vcl: assign NULL after deletingHenry Castro2-4/+8
In the preinit stage, the VCL initialization is done by the parent process and when the lo_startmain thread de-initialize the VCL, some services are disposed early, and it causes segmentation violation. So it is ensured that pointers to service objetcs is set NULL after the delete. Change-Id: I65ecfc2d2694a981ec2986988efabdfd28d0cce4 (cherry picked from commit fca0980ec866279cc40ed1233bbddb2e4abe2fae) (cherry picked from commit 48eac22cce93c08d13022a7215b9549379453695)
2016-06-12vcl: add isInitVCL, to not initialize twiceHenry Castro1-1/+11
In the preinit stage, the VCL is initialized in the parent process and when the lo_startmain thread is started, the thread initialize VCL again. It is not necessary to initialize twice. Change-Id: I819cf0125afe7760c3f4d91c420d36a3a383902c (cherry picked from commit f0f7eb475ba402ceafa1d6f1956e7dfe7779615d) (cherry picked from commit 19349554e77a23c0cb551b886f51e854ca174df0)
2016-06-11Resolves: tdf#100248 vcl menu scroll timer still active post disposeCaolán McNamara1-0/+6
Change-Id: I8988a42e7e505c967661c4a5f3c1e4ef3fbc08e0 (cherry picked from commit f89b9d8b8064a2f323f5b3362f88cb873bad8fcc) (cherry picked from commit 7def34c0f013b0c9ac1b8ee39e800577bfa800e7) Reviewed-on: https://gerrit.libreoffice.org/26125 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 11ca1ad43cc2def184ff7629e3880ccab6b8a1f1)
2016-06-11only init the OpenGL context if we need itMarkus Mohrhard1-6/+40
Change-Id: I8634589bc0c8ef317089eb08c07974ed81d98982 Reviewed-on: https://gerrit.libreoffice.org/26050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 8a94e538c3306b2af1a76c724e4dcae0e3968164)
2016-06-03vcl: fix "sgv" import filter on 64-bit MSVCMichael Stahl2-133/+216
This filter reads entire structs at a time from the SvStream, including structs that are derived from other structs. This happens to work fine with GCC by chance, but MSVC AMD64 by default aligns structs to 8 bytes, and that means if sizeof(super-stuct) = 20 then 4 bytes of padding are inserted and that ruins the import. This causes vcl_filters_test to go into an infinite loop reading SaveAsPicture.sgv. Fix this by reading each member of the structs separately, which also means that the filter doesn't need to byte-swap every member on big-endian platforms since SvStream methods already do that. Change-Id: I237725dbcde5232006728179e645776fcb79cac3 (cherry picked from commit af8509fa194e6747c82a9df9a1c465be82a32637) Reviewed-on: https://gerrit.libreoffice.org/25830 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-06-03vcl: GIF import: don't use __LP64__ to check for a 64-bit systemMichael Stahl1-1/+1
__LP64__ is not defined in MSVC AMD64 builds, since it doesn't have 64-bit longs. This caused the vcl_filters_test to fail because loading the file for which that check is a work-around succeeded. Change-Id: I4df48d4b196a1d08e9bd5ef61b64ec63501037c9 (cherry picked from commit f6ed2305abb0289ad51605ceeaee607a0bc8d7bd) Reviewed-on: https://gerrit.libreoffice.org/25829 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-31tdf#100159: On Windows, compile GL shaders in advance, disable GL on failureTor Lillqvist2-5/+113
This is a combination of multiple commits in master, adapted for this branch as necessary: Don't claim to be reading a file before trying to open it Avoid redundancy: The same information was logged in readProgramBinary() Use VCL_GL_INFO here Failing to open a cached shader binary is a no reason for a SAL_WARN. It is normal that they don't exist when first trying, that is the very nature of a 'cache'. Move exithelper.h to include. We will want to use EXITHELPER_NORMAL_RESTART in vcl, too. If the shader compilation or loading of an already compiled shader fails, disable OpenGL in the registry and exit with the EXITHELPER_NORMAL_RESTART status. The wrapper process will thus run soffice.bin once more, and this time OpenGL will not be used. Change-Id: I54d92f150975d3fa72d93f3f679b16c90ee38f02 Reviewed-on: https://gerrit.libreoffice.org/25708 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-05-31tdf#100092: Deterministic scheduling to prevent unpredictable behavior.Jan Holesovsky2-1/+38
Low priority idles can fire more or less randomly, and consequently two consequent runs of LibreOffice differ in the amount of the idles that have been performed during an operation. This commit adds a possibility to turn on a 'deterministic mode' where two subsequent runs of LibreOffice trigger about the same amount of events when they perform the same set of operations. Change-Id: I92566ef4eee20e7d604cfd48f01c4df30c77e653 Reviewed-on: https://gerrit.libreoffice.org/25712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-05-31Resolves: tdf#92695 protect both branches against missing ToolItemCaolán McNamara1-8/+7
(cherry picked from commit ab0dc9524a36a394e97df9499bf1f5e4b94cfdca) (cherry picked from commit c845c7bf597caa11b1617ab71029c499819028bc) Related: tdf#92695 we already have ImplGetItem from mnHighItemId here no logic change intended (cherry picked from commit c380f0fc125f50ad8efca2ce032d3d2a67d78f0a) (cherry picked from commit df668868917d1dac11d49f1f650c43666fadea54) Change-Id: Ide54fddf7b217e65a405bd80853d5302a419f046 a53a21db56c857e1274c60f846fc955fef9e3dfb Reviewed-on: https://gerrit.libreoffice.org/25711 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-30Related: tdf#87967 valgrind reported invalid reads on 1 pixel wide bitmapCaolán McNamara1-5/+5
Change-Id: Iddd18280c780d8b9f5e11fcc2af80749917192c4 (cherry picked from commit a9d2302d4d0732a0c1203bbb7c0182b8de59403d) (cherry picked from commit 6fb88a0c67150a751f59ebcba5f5419b24e6f4a7) Reviewed-on: https://gerrit.libreoffice.org/25533 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-25opengl: track the state of blend, DrawArrays on OpenGLProgramTomaž Vajngerl1-1/+5
This adds tracking of GL_BLEND and glBlendFunc which are usually set when setting up the current draw call on OpenGLProgram with SetBlendFunc method. Until now the final draw call (glDrawArrays) was called outside of OpenGLProgram. This is a problem because we need to know if we did call SetBlendFunc or not between when we used or reused the current program. So we added DrawArrays to OpenGLProgram and refactored all draw calls in OpenGLSalGraphicsImpl to use this. From now on glDrawArrays should not be called directly but always through OpenGLProgram. (cherry picked from commit e480b2cf3e362760de8e35cbb950104e47ebe7ec) Change-Id: I530b4b948af8a962669a3751e1a95ff3986ffec9 Reviewed-on: https://gerrit.libreoffice.org/25359 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-18tdf#99574 fix sluggish scrollbar for an immediate paintTomaž Vajngerl1-0/+5
Change-Id: I34e87ac580aa1ddb6bc3851bbe99689189c787f6 (cherry picked from commit 9f0e3802e621fb02efde1778c151b93630cdd2fa) Reviewed-on: https://gerrit.libreoffice.org/24912 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-17tdf#99383 vcl: don't dispatch events from SolarMutexReleaserMichael Stahl1-2/+5
Having SolarMutexReleaser effectively do Reschedule() on WNT and not on other platforms doesn't seem such a good idea. Let's try to restrict it so that it still calls ImplSalYieldMutexAcquireWithWait() but no longer dispatches messages, timers and idles. (regression from 482c52e91fe41a52e68827e9bf64a9736427d517) Change-Id: I52a2c88e9c2473e35909bf270b9e3ae7acbe0d17 (cherry picked from commit ea3ce0b3073c72f474365e438ddabd19de915b76) Reviewed-on: https://gerrit.libreoffice.org/24623 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-05-06opengl: combined commits for state trackingTomaž Vajngerl1-2/+6
Includes commits: opengl: track state of active and bound textures in context ba0a5708803d899de4c40cfe2c1697ae83b4827a opengl: track the state of scissor test and the dimensions 51e953a3579fb91f30f7f0d6159b737684976959 opengl: track the state of stencil test b8f0e6452cc019744c44997c92831d94086b35b7 opengl: sync scissor and stencil state, generic capability state a57d048f88ba6cac3ce1550e2a8a143a8887eb05 opengl: track the state of glViewport 540fee2dc7553152914f7f1d8a41921e765087ef Change-Id: I770a6a744c0c41850c576b928f027375962088aa Reviewed-on: https://gerrit.libreoffice.org/24508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-05-06Resolves: tdf#98940 (-1 not mapping to maximum string length anymore)Matteo Casalin1-1/+1
Change-Id: I58e4a63bce17b880a97c7ccfb4d42dfb930e54c5 Reviewed-on: https://gerrit.libreoffice.org/24268 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit eca3455190ed9a2c4796e7954f2533dc71cd1ab6) Reviewed-on: https://gerrit.libreoffice.org/24654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-05-03tdf#90319: make image flipping work when aLinearContext(...) code path chosenpasqualm1-14/+5
Image flipping can be processed following different code paths in bitmap.cxx. Has been verified that it was broken in Linux Mint (with cinnamon) because there a buggy code path was chosen which was not fixed in commit 3119440a80282692640378fde5e37974ab63f096 in master. This commit solves the problem for this code path Change-Id: I22257e70761ca5469c0424b5f9925681cfd4e2e3 Reviewed-on: https://gerrit.libreoffice.org/22753 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jacobo Aragunde Pérez <jaragunde@igalia.com> (cherry picked from commit 1e3d634e413abf2b4c2a6c70a87586d8c598054c) Reviewed-on: https://gerrit.libreoffice.org/23852 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-04-28tdf#89866 tdf#96504 vcl: fix printing of form controls with imagesMichael Stahl2-14/+2
Originally in 2004 commit 0339e43208cd7b98d302e420b39ac32911acaa56 added a "DBG_ASSERT( GetOutDevType() != OUTDEV_PRINTER, "DrawImage(): Images can't be drawn on any mprinter" );" Recently commit f749ffbdf4c007f1a42bcafc9c2723c47bac22d1 made the mistake of trusting this assertion to be correct and added Printer::DrawImage() overrides that do a hard "assert()" now and don't do any drawing. Armin claims that the implementation of OutputDevice::DrawImage() should actually work for Printer as well due to fall-backs and thus the original DBG_ASSERT was misleading. This matters when printing documents that contain form controls such as ImageControl. Additionally, Image::Draw() should not return early when IsDeviceOutputNecessary() is false, because that is the case when printing, where instead a meta-file is recorded. The called OutputDevice::DrawBitmapEx() will check IsDeviceOutputNecessary() internally anyway. This check was actually always there, so i do not understand how this should have worked in LO 4.2, as the bug reporters claim. (cherry picked from commit ef52ce82bf55b37279e344ea5fef67b4277fb009) Change-Id: I92ba19e7036197d1dde88c361f8e1cb59fae3a60 Reviewed-on: https://gerrit.libreoffice.org/24439 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-26-Werror=misleading-indentation (GCC 6)Stephan Bergmann2-4/+8
Change-Id: I50b57b3e78758271411bdb4c3d58a2413578db1c (cherry picked from commit d0e1cb02d87968bdfd6bbedecf41cd5a6ed1c644) Signed-off-by: David Tardon <dtardon@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/24405 Tested-by: Jenkins <ci@libreoffice.org>
2016-04-15lp#1560328: clear cache before disposing rest of VCLBjoern Michaelsen1-0/+3
Change-Id: Iac325cf934953c61cb4dbbb67cfbab1777dc45cc Reviewed-on: https://gerrit.libreoffice.org/24039 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-04-06tdf#98989: vcl: fix handling of non-scalable fonts like "Courier"Michael Stahl1-1/+6
For a VirtualDevice only scalable fonts are cloned, but for non-scalable bitmap fonts still an empty PhysicalFontFamily with no PhysicalFontFace is created, which causes text to disappear (height 0). Suppress creation of such families like it was done in LO 4.3, so that the fall-back can handle it and map "Courier" to "Courier New". (regression from 8d6697587776136f3121733e1c29d4200720dbd9) (cherry picked from commit 2f89245fb7e1c94bed49dde10b08ab1cf41b597b) Change-Id: I6542a3f7a01bdf46ae2bcf328fa04064f7f86332 Reviewed-on: https://gerrit.libreoffice.org/23850 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-04-05opengl: fix loading shader with preamble that uses #versionTomaž Vajngerl1-2/+2
The preamble was inserted into a false position so the shader could was constructed incorrectly and would fail to compile. Change-Id: I4c51adde9014a326bbe38a5d2d17dd0047e33195 Reviewed-on: https://gerrit.libreoffice.org/23463 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-03-25tdf#94734: fix icon in sidebar disappears when changing font colourBjoern Michaelsen1-1/+9
- properly initalize maImageOriginal along with maImage in various places - this is a regression from 27d94c482e82ea5d4f202109614c6fb3578fb0a4 - that commit is mostly innocent in itself though, only exposing omissions from b8f21298288890d52c06fef6c84441634c56c986 - having both maImage and maImageOriginal is extremely fragile as-is -- likely I'd be helpful to have them private in ImplToolItem and then a SetImage accessor with a tristate eOriginal/eCached/eBoth enum parameter to prevent oversights like this in the future ... Change-Id: I294d7ed8e07be5cadec0ae251cc08c8d089bd059 Reviewed-on: https://gerrit.libreoffice.org/23505 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2016-03-24tdf#98600 and tdf#98622 fix metafile parsing (part2)Noel Grandin3-1/+7
more regressions from commit db17d3c1 "new loplugin: memoryvar" Change-Id: I611697f2bc818f2f42a704bfb5297637c30060c9 (cherry picked from commit d4163c17ef47fdbc7d45adc5803b9844739b3324) Reviewed-on: https://gerrit.libreoffice.org/23470 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-03-24tdf#98600 and tdf#98622 fix metafile parsingNoel Grandin1-0/+2
regression from commit db17d3c1 "new loplugin: memoryvar" Change-Id: I8b11871cadcf50649533680be51c767d6bb98350 (cherry picked from commit c5bee7b8c1055e5052a261c8755bdb150fb27494) Reviewed-on: https://gerrit.libreoffice.org/23469 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-03-15tdf#79679 vcl: dashed lines show as solid lines when importing EMF filesChris Sherlock4-37/+17
Backported to 5.1 Issue is a regression in commit 09c722873b2d378d2d155f5f1dd7d8f3fb2012e9. (EMF/WMF: fix rendering of pen styles (dash, dot, dashdot, dashdotdot). I've looked at how the latest version of Word on the Mac works, and it turns out that the spacings for the PenStyle enumerations in the LogPen objects for all the create pen EMF records are as follows: * PS_DOT - ■ □ ■ □ ■ □ ■ □ ■ □ ■ * PS_DASHDOT - ■ ■ ■ □ ■ □ ■ ■ ■ □ ■ * PS_DASHDOTDOT - ■ ■ ■ □ ■ □ ■ □ ■ ■ ■ (where ■ is the actual filled in area, and □ is the space between the filled in areas) In other words, each dash fills in the space of three dots, and there is the one dot worth of empty space between the dashes and dots. Each "dot" has a width and height equal to the width specified in the pen. So basically, we seem to be arbitrarily setting the dot, dash and distance lengths arbitrarily, which were reasonable guesses but tended to produce very odd lines at different zoom levels. Change-Id: Ie8b5fa396e4fb0f480cb3594c8129a59f472c1b8 Reviewed-on: https://gerrit.libreoffice.org/22886 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/22923 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-03-15vcl: move graph.[hx]xx to graphic.[hc]xxChris Sherlock22-22/+22
It's IMO a bit confusing to see a "graph" header that doesn't strictly deal with graphs, but graphics. Backporting to 5.1 series to allow for easier backporting of other potential hotfixes. Change-Id: Ic37c6cd78e23d05939486f98667144c4453bb0a3 Reviewed-on: https://gerrit.libreoffice.org/22949 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2016-03-15vcl: yield more cleanly and do less work for now.Michael Meeks1-3/+2
Change-Id: Ia3469fe4eb53f73fc85ee3c62db1411f9f4d1fb8 Reviewed-on: https://gerrit.libreoffice.org/23250 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-03-14Related: tdf#98419 set a min size on un-resizeable non-layout dialogsCaolán McNamara1-0/+4
(see also rhbz#1281906) a min size equates to a size-request which is reliable under gtk3+wayland as the dialog contents size. a default size equates to the size of the dialog, which includes decorations under wayland (cherry picked from commit afeddaf7e0d11ad9b1df0c80bcc3f50caa87e21a) Change-Id: I20baf00fb5952ab93628f4dd6891779ce682783c Reviewed-on: https://gerrit.libreoffice.org/23121 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2016-03-08tdf#98052 - even polygons were not drawn on the alpha deviceMarco Cecchetti1-0/+2
Change-Id: I5725ec23869b295c8021bef0330ee6f69f206351 Reviewed-on: https://gerrit.libreoffice.org/23026 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2016-03-06vcl: fix winmtf.hxx file to include constantsChris Sherlock1-4/+5
Change-Id: I3aa97c31d5e20bd506a8090f2613a21b9cc47b0b Reviewed-on: https://gerrit.libreoffice.org/22964 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-03-06Fix the import of line joins and caps from EMF filesStephan van den Akker1-2/+34
Backported fix to 5.1 Change-Id: I976336d35366b661e402db484820b4dd9a7b0228 Reviewed-on: https://gerrit.libreoffice.org/22821 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/22946 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-03-04tdf#98052 - polypolygons were not drawn on the alpha deviceMarco Cecchetti1-0/+2
In OutputDevice::DrawPolyPolygon when b2dpolygon are used for drawing the source polygon is not drawn on the alpha device. Change-Id: I54f4e5a13469d9844866cea61b074420219b836d Reviewed-on: https://gerrit.libreoffice.org/22893 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
2016-03-01Improve the import of pen styles from EMF filesStephan van den Akker1-12/+24
Change-Id: I643c29befeb29b7b1cdd66375f661f4adb0e6cfa Reviewed-on: https://gerrit.libreoffice.org/22638 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com> (cherry picked from commit 9db34a7712e277389b2041cfbd77a60476d7f7f1) Reviewed-on: https://gerrit.libreoffice.org/22714 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2016-02-24Ensure processEventsToIdle process events (including from the OS) until idle.Michael Meeks2-15/+17
Change-Id: I9578849b0e78af15ddeb1e6495a48ccfb3f1c44a Reviewed-on: https://gerrit.libreoffice.org/22651 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit b952aaacb1a6ef628226ef2699fac9fab936f20b) Reviewed-on: https://gerrit.libreoffice.org/22652 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-02-24tdf#97662 - Try to preserve original compressed JPEGs harder.Marco Cecchetti3-18/+55
Avoiding de-compressing and re-compressing them saves lots of time too. Avoid PNG compressing de-compressed JPEGs, and avoid JPEG compressing de-compressed PNGs. Change-Id: Iafa5d4b347da46dedb9431b6870f34b2b6fcad99 Reviewed-on: https://gerrit.libreoffice.org/22656 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>