summaryrefslogtreecommitdiff
path: root/drawinglayer
AgeCommit message (Collapse)AuthorFilesLines
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>
2017-11-13tdf#113758 EMF+ Add support to OffsetClip recordBartosz Kosiorek2-3/+21
OffsetClip record applies a translation transform on the current clipping region for the world space. Change-Id: Iac024a3c2eaba58edc5bb59d817796b6022f559f Reviewed-on: https://gerrit.libreoffice.org/44597 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-09tdf#113707 EMF+ Add support for ResetClip recordBartosz Kosiorek2-1/+12
Change-Id: I00ab6ac7a5e157cff469c2afd5e14d5f06f01bd0 Reviewed-on: https://gerrit.libreoffice.org/44432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-09tdf#77229 tdf#113635 EMF+ Add support for Clip Union, Exclude and ComplementBartosz Kosiorek1-28/+37
Union: Replaces the existing region with the union of the existing and new regions. Exclude: Replaces the existing region with the part of itself that is not in the new region. Complement: Replaces the existing region with the part of the new region that is not in the existing region. Change-Id: Iabbe0ddfa082a332e94dd85b6444b234d1bdee35 Reviewed-on: https://gerrit.libreoffice.org/44380 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-06loplugin:constparams in cppcanvas,drawinglayerNoel Grandin10-14/+14
Change-Id: I15cac1411c985afe8d7cb9439214a8092702bdb8 Reviewed-on: https://gerrit.libreoffice.org/44343 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-06loplugin:finalclasses in drawinglayerNoel Grandin1-3/+1
Change-Id: I8922fc85ab23453791e3ce0b639d4ffafd31e967 Reviewed-on: https://gerrit.libreoffice.org/44315 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-04tdf#113635 Add support for Clip Intersect and XORBartosz Kosiorek2-26/+63
Change-Id: Iff2bb06a209a6c089fec12b5f888ca4ef7c38c1b Reviewed-on: https://gerrit.libreoffice.org/44289 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-04loplugin:constparams in various(1)Noel Grandin1-1/+1
Change-Id: Ic80ca59abc3e104c7adf0c1eff1d16addf48bc8b Reviewed-on: https://gerrit.libreoffice.org/44261 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-03tdf#111486 Fix component names in SAL_INFOsBartosz Kosiorek1-38/+24
Change-Id: I22a6747446d5571a883555db748ca3d40579cb13 Reviewed-on: https://gerrit.libreoffice.org/44222 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2017-11-03loplugin:constmethod in drawinglayerNoel Grandin9-27/+27
Change-Id: I6a33765f6589fc2941162eb2dcaa4e0a2d9e46e1 Reviewed-on: https://gerrit.libreoffice.org/44214 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01loplugin:constantparam in basegfxNoel Grandin1-1/+1
Change-Id: Ieabdd6f8d76cfc2ed75f2ec618def6591a9adc93 Reviewed-on: https://gerrit.libreoffice.org/44130 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-01loplugin:constantparam in d*Noel Grandin3-8/+7
Change-Id: I65c395157d2b68a549a6fecf9abf1fd46446d960 Reviewed-on: https://gerrit.libreoffice.org/44109 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-30Revert "tdf#113197 Add MaskPrimitive (clip) to EMF/WMF if needed"Thorsten Behrens1-25/+35
This reverts commit bdb9cc1702d4e125db8c379f3b535bbd9f845b95. Breaks Mac unit tests in sw_ooxmlexport4
2017-10-28tdf#106084 EMF+ Add support for RotateWorldTransform recordBartosz Kosiorek2-1/+19
Change-Id: If5ce156b7d60d30be8451902beb8330b7177b26e Reviewed-on: https://gerrit.libreoffice.org/43858 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-10-28tdf#113197 Add MaskPrimitive (clip) to EMF/WMF if neededArmin Le Grand1-35/+25
When the content of an imported EMF/WMF overlaps the defined size in PrefMapMode/PrefSize, add clipping to hide it. This was done in imports before EMF+ changes and is done in SVG, too. If needed, orig contained size and content still accessible using MetafilePrimitive2D::accessMetafile Change-Id: Id86ff3c0a9820637e3601c0c4f489a2d67d190d0 Reviewed-on: https://gerrit.libreoffice.org/43746 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>