summaryrefslogtreecommitdiff
path: root/drawinglayer
AgeCommit message (Collapse)AuthorFilesLines
2018-03-26forcepoint #33 ensure payload is a EMFPPathCaolán McNamara1-2/+2
Change-Id: I0a9f332cc66e43caa4e1611006fa765cad063539 Reviewed-on: https://gerrit.libreoffice.org/51889 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-26forcepoint #32 survive missing emf pathsCaolán McNamara1-4/+10
Change-Id: Ic27c3bbac12f66b30ff2f30f558180127cc73a51 Reviewed-on: https://gerrit.libreoffice.org/51873 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-03-14tdf#115297: 1bit images displaying fixed (again)Vasily Melenchuk1-2/+4
Previous fix 25cd843664919974f0d21ca7a0b02cc43e9eeabb like any other before it have some regressions, so reverted. The root of most problems: fix for tdf#104141 d148340babf6c973f7d463909d7a51e16c953248, where mask drawing was implemented in bitmap drawing code. So instead of guessing for type of bitmap, mask is drawn with DrawBitmapEx resolving all known problems (tdf#114726, tdf#115297, tdf#113918 and tdf#104141). Change-Id: Ie00f7552d667e237b3c0f9505ee09cb51e85c43c Reviewed-on: https://gerrit.libreoffice.org/50828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-11Move (and rename) graphic stuff from svtools to vclTomaž Vajngerl1-1/+1
This is preparing to change how GraphicManager works where it won't base itself around GraphicObject anymore but Graphic. No functional or cosmetic change was made to the classes, only changes that were needed because of the move and rename. The only thing that wasn't moved is the GraphicRenderer as it is not needed in vcl for now (but makes sense to move it in the future to keep graphic stuff together). grfmgr was renamed to GraphicObject as the GraphicManager will be changed a lot and most likely moved out, so the name grfmgr won't make any sense anymore. All the UNO implementations were renamed with a prefix Uno and used the same name as the class name. This is made to be more specific which are the Uno objects (for example graphic.cxx contained the implementation of XGraphic, which is similar to graph.cxx contains Graphic). Change-Id: I54a2fa6c7e997469aaa7770db05244adb9f64137 Reviewed-on: https://gerrit.libreoffice.org/51068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-03-11Use for-range loops in drawinglayer and dtransJulien Nabet3-11/+10
Change-Id: I4d3368e2ffa4d98c04d69b8f5ef485558d812fda Reviewed-on: https://gerrit.libreoffice.org/51047 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-03-08loplugin:constantparam in desktop..i18npoolNoel Grandin1-14/+7
Change-Id: Ie2e1004c1ccc03777a8da9cb1144e89eb28ff313 Reviewed-on: https://gerrit.libreoffice.org/50928 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-07use more Color in cppcanvas..drawinglayerNoel Grandin1-4/+4
Change-Id: Ib0f15e8d4c01c1d2059cf32cc882042766d2a682 Reviewed-on: https://gerrit.libreoffice.org/50861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-05tdf#116001 Incorrect Colors in Chart Wall Area (2nd attempt)Noel Grandin1-3/+7
regression from commit b10c7022f1be6e4825269bd5872575b5b53744ef "use RawBitmap in BPixelRasterToBitmapEx" fix attempt at fixing it in commit 3d400321910ff0fe89ab8c70c59432e676cb1340 "tdf#116001 Incorrect Colors in Chart Wall Area" was incomplete. the drawinglayer code was (a) not initialising the background transparency on all pixels and (b) not calling the Color constructor correctly. Change-Id: I1cf7d7d5eb67ba472e17790b18c33d8e4b97ae4c Reviewed-on: https://gerrit.libreoffice.org/50764 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-03-01tdf#116001 Incorrect Colors in Chart Wall AreaNoel Grandin1-1/+1
regression from commit b10c7022f1be6e4825269bd5872575b5b53744ef "use RawBitmap in BPixelRasterToBitmapEx" we need to implement alpha support in vcl::bitmap::CreateFromData Change-Id: I68bebbe1dd15e3bb04de312309c1631d6bb7fe2d Reviewed-on: https://gerrit.libreoffice.org/50556 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-28convert COL_ constants to be of type ColorNoel Grandin1-1/+1
Change-Id: I0e25c8950ac26b851ff42f71e1471fcbe4770d48 Reviewed-on: https://gerrit.libreoffice.org/50373 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27remove unused vclunohelper.hxx includesJochen Nitschke1-1/+0
Change-Id: I68178379e5493d0e738861a4dce5aa6e4b58cd22 Reviewed-on: https://gerrit.libreoffice.org/50393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-27replace Color(COL_*) with COL_*Noel Grandin1-1/+1
using git grep -lwP "Color\s*\(\s*(COL_\w+)\s*\)" | xargs perl -pi -e "s/Color\s*\(\s*(COL_\w+)\s*\)//g" and then some manual fixup where the resulting expression no longer compiled Change-Id: I0e268d78611c3be40bba9f60ecfdc087a36c0df4 Reviewed-on: https://gerrit.libreoffice.org/50372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-20use RawBitmap in BPixelRasterToBitmapExNoel Grandin1-58/+43
part of making BitmapWriteAccess an internal detail of vcl/ Change-Id: I28b9e0e0b414489c564fb2f23c4de2390ad175c1 Reviewed-on: https://gerrit.libreoffice.org/49964 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-18remove use of FillBitmapURL and use FillBitmap as the alternativeTomaž Vajngerl1-13/+0
This is under the ongoing work to get rit of all usage of GraphicObject URLs Change-Id: I900e435ac36a4012ec36a2f0c1d909982c82660a Reviewed-on: https://gerrit.libreoffice.org/49895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-02-06convert SetPixel->SetPixelOnDataNoel Grandin1-4/+8
by extracting out the Y scanline computation from the innermost loop. Inspired by commit 078d01c1b6cb9bbd80aeadc49a71cc817413164c. Change-Id: Ic3c1827c01ed3aec629975749a551c7a68ae4a5e Reviewed-on: https://gerrit.libreoffice.org/48926 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-05vcl: remove BitmapColor Color() operatorChris Sherlock1-1/+1
BitmapColor has a Color() operator. However, this is confusing and tends to hide that the two classes aren't the same. I have converted this to GetColor(). Change-Id: I0be2dcb3fc420e7be9c8d04330e7a3fe69a5412a Reviewed-on: https://gerrit.libreoffice.org/48245 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-30ofz#5822 Divide-by-zeroCaolán McNamara1-1/+1
Change-Id: Ibfffd57f74b579f869115ad961aa2ec9b35faca3 Reviewed-on: https://gerrit.libreoffice.org/48889 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-01-29Fix typosAndrea Gelmini1-1/+1
Change-Id: Iedd82d035454c940d76a94c7e910c81827c1389c Reviewed-on: https://gerrit.libreoffice.org/48828 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-29clang-tidy modernize-use-equals-default in drawinglayerJochen Nitschke19-345/+84
Change-Id: I2fbcac7a22a881681bc8b84274e7d39f1cec18bf Reviewed-on: https://gerrit.libreoffice.org/48800 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24loplugin:unused-returns in drawinglayer..svxNoel Grandin1-3/+3
Change-Id: I033a78cc7fe7d8e5086f1c855c4aa371cc98dc7c Reviewed-on: https://gerrit.libreoffice.org/48400 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-24loplugin:unused-returns in vclNoel Grandin1-2/+1
Change-Id: I507320900a47f604d17ed7d402d531a7cbdf744e Reviewed-on: https://gerrit.libreoffice.org/48331 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-23More loplugin:cstylecast on WindowsStephan Bergmann1-3/+3
Automatic rewrite (of loplugin:cstylecast and loplugin:unnecessaryparen) after cab0427cadddb3aaf1349c66f2fa13a4234ba4b2 "Enable loplugin:cstylecast for some more cases" and a409d32e7f6fc09e041079d6dbc3c927497adfed "More loplugin:cstylecast" Change-Id: Ib3355159dd08333e1b7a8d091caf2069cdcc7862 Reviewed-on: https://gerrit.libreoffice.org/48317 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-19loplugin:useuniqueptr in EMFPBrushNoel Grandin2-45/+16
Change-Id: I86622a13583137605bf2b6468113da2eb5e4ee0b
2018-01-19loplugin:useuniqueptr in EMFPPenNoel Grandin2-6/+4
Change-Id: I2c3c7be4bc3b43f03c45724e7a002e862b50f24b
2018-01-19loplugin:useuniqueptr in GeoTexSvxMultiHatchNoel Grandin1-9/+6
Change-Id: I3d25a50ed7ebf78214c0d358243f7e286503b8f8
2018-01-19loplugin:useuniqueptr in ZBufferProcessor3DNoel Grandin1-7/+6
Change-Id: I73005afdaf20efe15321a2a073beb3ae4f7a63e3
2018-01-19loplugin:useuniqueptr in SvgRadialAtomPrimitive2DNoel Grandin1-6/+1
Change-Id: I00d1772732075848b25eb34d7c4b0386551c7e5f
2018-01-18Include android/compatibility.hxx from ubiquitous sal/config.hStephan Bergmann1-1/+0
...instead of having to add it to more and more individual .cxx files, as the need arises. Change-Id: If1e893c79abf1c1bb7fb7b89dcb9bd423a7f1b94 Reviewed-on: https://gerrit.libreoffice.org/48108 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-01-18android: use unified headers and llvm-c++ STL (x86) with NDK 16Christian Lohmaier1-1/+0
gnustl (and others) are to be removed in future versions of the ndk also bump gradle and build-tools to current versions along with it arm unfortunately crashes with llvm-c++, so keep with gnustl for now/fix that later Change-Id: Ic794c3293b599b77ec48096bf3283a99c09cbb79 Reviewed-on: https://gerrit.libreoffice.org/45163 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-01-16Fix typosAndrea Gelmini2-2/+2
Change-Id: Id3d1a07922d4ca05e3bbf61d4b5797a30fc5b23a Reviewed-on: https://gerrit.libreoffice.org/47872 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-16Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia976371bf52eb1216d8abe728d80bbb87a3c38a2 Reviewed-on: https://gerrit.libreoffice.org/47858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-01-12More loplugin:cstylecast: drawinglayerStephan Bergmann26-111/+111
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: I38baea4d1dd354e48eb90fc2fc385ef60485b5e3
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin2-2/+2
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-29loplugin:unnecessaryparen improve return checkNoel Grandin1-1/+1
Change-Id: I8128aa4b5fc60efd1dbf5971cdde11e588f5f64b Reviewed-on: https://gerrit.libreoffice.org/47167 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-22tdf#42949 Fix some Include What You Use warningsMiklos Vajna1-3/+0
Change-Id: I30121764303579a7cb4ded0f0f48cc1f8fff6c33 Reviewed-on: https://gerrit.libreoffice.org/46946 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-12-19Fix typosAndrea Gelmini1-1/+1
Change-Id: Ibffe19c1dfda9d0f4ba8d2a0761ad1222491007f Reviewed-on: https://gerrit.libreoffice.org/46599 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-11loplugin:salcall fix functionsNoel Grandin3-5/+5
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-08cppcheck: fix some reportsJulien Nabet1-3/+3
variableScope reports in comphelper/drawinglayer/editeng +filter/framework/l10ntools Change-Id: I4575428773e8b9b3efedabb44fdcd6d8175ac46a Reviewed-on: https://gerrit.libreoffice.org/46116 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-12-06Remove unused #include <vcl/metaact.hxx> from vcl/outdev.hxxStephan Bergmann2-0/+2
...and fix the fallout Change-Id: Ie514bd95d5a9f990a887566619031e9844c40b92 Reviewed-on: https://gerrit.libreoffice.org/45195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-12-06tdf#109340 Improve performance by reducing matrix multiplicationBartosz Kosiorek2-5/+5
Multiplication of two B2DHomMatrix with operator* is very CPU expensive, because 24 of double-precision floating point multiplication needs to be performed. With this patch I have reduced Multiplication of matrix, by creating combined Scale and Transform matrix at once. It allows to reduce matrix multiplication by one, and improve import time. Change-Id: I85fde6354e458659a0214514c6e05b8e2ee04185 Reviewed-on: https://gerrit.libreoffice.org/45704 Reviewed-by: Patrick Jaap <patrick.jaap@tu-dresden.de> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-12-06Related: tdf#105998 except cut and paste as bitmap instead of exportCaolán McNamara1-5/+20
Take a drawing rectangle in draw and cut and paste as bitmap to writer. The hairline border along the very right/bottom edge of the bitmap appear missing. fallback to default handlers which can distort the hairline to be visible Change-Id: Iedb580f65879628839c83e41092745ae7c11267c Reviewed-on: https://gerrit.libreoffice.org/45902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-11-26coverity#1421100 Uncaught exceptionCaolán McNamara1-1/+1
Change-Id: Id9cb50e0e3eace3365eefe29650e993694480d47
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann1-1/+1
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-21tdf#112500 Store world transform during graphic saveBartosz Kosiorek1-0/+2
Change-Id: Iefa51dcca6d6b896fbd41cefc0a115c501c45675 Reviewed-on: https://gerrit.libreoffice.org/44923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Patrick Jaap <patrick.jaap@tu-dresden.de> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-18tdf#111486 Multiply by whole base transformation, and not only by scale of itBartosz Kosiorek1-1/+2
Change-Id: Ib50fa1ac36f06dbd7e5e921f9c13c5d5ac8bb138 Reviewed-on: https://gerrit.libreoffice.org/44869 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-17tdf#111486 Use buildin methods for displaying matrixBartosz Kosiorek1-11/+2
Change-Id: I0f40f7178be126229c8963b56e6a15313acc19a7 Reviewed-on: https://gerrit.libreoffice.org/44868 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-17tdf#113451 Fix misplacing of lines by adding mappingChangedBartosz Kosiorek1-16/+9
Change-Id: I9b381f456d4c96369fdf7e94f161fde2723ebead Reviewed-on: https://gerrit.libreoffice.org/44842 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-17tdf#113704 EMF+ Add support for EmfPlusRecordTypeFillRegion recordBartosz Kosiorek2-18/+23
Change-Id: I60366d4a27fdf5a3cc020ca54f4a2aa9b974db5e Reviewed-on: https://gerrit.libreoffice.org/44795 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-16tdf#113704 Implement proper reading of the EmfPlusRegionNodeBartosz Kosiorek8-138/+131
Regions are specified as a binary tree of region nodes, and each node must either be a terminal node or specify one or two child nodes. Nodes contains two child nodes: RegionNodeDataTypeAnd = 0x00000001, RegionNodeDataTypeOr = 0x00000002, RegionNodeDataTypeXor = 0x00000003, RegionNodeDataTypeExclude = 0x00000004, RegionNodeDataTypeComplement = 0x00000005, Terminal nodes: RegionNodeDataTypeRect = 0x10000000, RegionNodeDataTypePath = 0x10000001, RegionNodeDataTypeEmpty = 0x10000002, RegionNodeDataTypeInfinite = 0x10000003 RegionNode must contain at least one element. Change-Id: I668e5892701b979f09bcf5bbce44a43226676192 Reviewed-on: https://gerrit.libreoffice.org/44324 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> Tested-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-14tdf#113758 EMF+ Add mapping of clipped region to the world space.Bartosz Kosiorek1-3/+10
OffsetClip record applies a translation transform on the current clipping region for the world space. Change-Id: I5d23f6aac944e4f23ea7c51e47fb551a20166446 Reviewed-on: https://gerrit.libreoffice.org/44699 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>