Commit Graph
1623 Commits
Author SHA1 Message Date
Noel Grandin e367e59e37 loplugin:unusedfields
Change-Id: Ie27afe4c2438c44baece4b926572584c6695dc39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120774
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-20 11:28:46 +02:00
Noel Grandin 2e74c1107b use visitor callback to avoid container construction (tdf#105575)
Change-Id: I4dd3382ceca82f93664e66b32bcfa7c74eb58fdc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120606
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18 21:17:19 +02:00
Caolán McNamara 88bf1749f1 undo changes to TextAlign
revert commit 8689bd5490
Author: Caolán McNamara <caolanm@redhat.com>
Date:   Thu Jul 29 20:49:29 2021 +0100

    convert TextAlign to scoped enum

lets leave this as it always was

Change-Id: Id4d2a5644974cdd2b0ed6d361d5c52629674d057
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120626
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-08-18 12:53:31 +02:00
Tomaž Vajngerl aad823538b drawinglayer: remove recurring def. of namespace wmfemfhelper
Change-Id: Ie997afa3127fce9fe9de5b0359f54b1890dd6a21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120558
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-08-17 06:03:19 +02:00
Noel Grandin 9753428dfc rtl::Static -> thread-safe static local
Change-Id: If5b7181fb1bb3f3f21ec3742680e5a3e12b21b73
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120431
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13 15:35:36 +02:00
Noel Grandin fa01f5a1fe tdf#105575 Slow rendering when using a Logo command
Remove dynamic_cast'ing to Primitive2D, expensive and unnecessary

<quikee[m]> noelgrandin: nobody is using XPrimtive that is not
derived from BasePrimitive2D in an extension ... mainly as it is
not even possible

Change-Id: I68224021f0fbc35fe2a973198ba78d2b41ea172d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120417
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-13 12:49:00 +02:00
Stephan Bergmann 0dab89d88f Remove harmful static_cast<int>
...that were present ever since the code's introduction in
c6df405c6c "#i39532#", but cause
`instdir/program/soffice --headless --convert-to pdf` of doc/abi5309-1.doc from
the crash-testing corpus to fail under UBSan with

> drawinglayer/source/processor2d/vclhelperbufferdevice.cxx:278:64: runtime error: -3.77964e+18 is outside the range of representable values of type 'int'

Change-Id: Ieff00d6fe91e2ffef46876ef308351d3689c5ffe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120055
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-08-05 10:05:42 +02:00
Miklos Vajna c88ff9298b tdf#142436 svx: fix handling of linked background images
Regression from commit 9fb7aaf570 (Make
linked graphic register into LinkedManager again, 2018-04-13), the
problem was that now SvXMLImport::loadGraphicByURL() produces a Graphic
that has its type set to GraphicType::Default, but when
drawinglayer::primitive2d::createNewSdrFillGraphicAttribute() consumes
this graphic, it expects that the type is either a bitmap or a metafile.

Fix the problem by explicitly loading the image when the default-type,
origin-url-set case happens: this is rendering, so no problem to load
the URL and that will give us the expected graphic type.

This is also meant to keep the original problem fixed, since the Graphic
that is part of the doc model is unchanged.

Change-Id: If5bba09faa23ef35f99152d4b5d30cd9cf67ace8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119935
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2021-08-03 15:00:22 +02:00
Tomaž Vajngerl d5765ae2f9 drawinglayer: extract Prop. Value conversion from ViewInformation2D
ViewInformation2D doesn't need to know anything about the Sequence
of PropertyValue that is used for parameters when constructing it
through UNO API. This can be done outside of ViewInfromation2D and
it doesn't need to be responsible for that internally inside the
ViewInformation2D. With this we get ViewInformation2D, which is much
simpler and isn't prone to YAGNI.

Change-Id: I3836237a1d26e38145b52136c3204931ae7c6b79
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119721
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-07-31 06:35:49 +02:00
Tomaž Vajngerl 13efd364c0 drawinglayer: remove extendedInformation from ViewInformation2D
We actually never use extended information when normally using
the ViewInformation2D. The exception here is when we construct it
from property values, where the unknown property values are then
stored into the extended information sequence and then later
reconstructed when we convert it back to a sequence of property
values. Just for that case we don't neeed to expose the extended
information to the outside and create it, as that is then a
implementation detail for the UNO use case.

I am also not convinced we need it when creating ViewInformation2D
with the sequence of property values - it certantly not expected
that we need to preserve the property values at all, but that is
something that needs to be checked.

Change-Id: I3b8d533cd412aac8b89ca2921738d6487be5cf45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119720
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-07-31 06:23:54 +02:00
Caolán McNamara 8689bd5490 convert TextAlign to scoped enum
Change-Id: Id2c466eacb44f0ea6adba75a0ac0be8be8e7ed4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119682
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-30 16:40:56 +02:00
Noel Grandin 28993c0a8d use officecfg for drawing options
Change-Id: Idba40d9816f29c0e4bc4a468b8c0a2cbb74d09d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119481
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-25 20:05:10 +02:00
Noel Grandin 88c85c8aa3 flatten vcl::LazyDelete
we can allocate the stored value in-line and avoid some pointer-chasing

Change-Id: I828814b127923cdcec1bf57b3b64dffab4cffaaf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119298
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-22 10:15:49 +02:00
Bartosz Kosiorek 3adfb2d35b EMF+ tdf#142941 Fixes SrcRect implementation in DrawImage record
Change-Id: Ice82518d50c50fa6eff8bbcc111fcf287d34d77c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118363
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-07-13 21:03:49 +02:00
BaiXiaochun 3128fd02c0 Purge out when safe rtl::math ( isValidArcArg / sin / cos )
/** If a value is a valid argument for sin(), cos(), tan().
IEEE 754 specifies that absolute values up to 2^64 (=1.844e19) for the
radian must be supported by trigonometric functions.  Unfortunately, at
least on x86 architectures, the FPU doesn't generate an error pattern for
values >2^64 but produces erroneous results instead and sets only the
"invalid operation" (IM) flag in the status word :-(  Thus the application
has to handle it itself.
*/

chart2/source/tools/RelativePositionHelper.cxx
Function name: RelativePositionHelper::getCenterOfAnchoredObject
From here: suppose it's related to the orientation of the chart << 2^64

chart2/source/view/main/LabelPositionHelper.cxx
LabelPositionHelper::LabelPositionHelper
Suppose: setup label position.
There won't be angles grater than 360º.

chart2/source/view/main/PlottingPositionHelper.cxx
PolarPlottingPositionHelper::transformUnitCircleToScene
Suppose: maybe disc chart orientation?
Internal angle should be safe.

chart2/source/view/main/ShapeFactory.cxx
ShapeFactory::getSizeAfterRotation
Suppose: rotate shape
Internal angle should be safe.

drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
Constant 100% safe

sc/source/core/data/documen4.cxx
bool ScDocument::Solver
Suppose: the tangent is being used as numerical derivative (Regula falsi algorithm)
So no impossible angles

scaddins/source/analysis/bessel.cxx
Filtered it out as bad imput

Change-Id: Ib348cca6ce13263d087b6731f93f58d8a15cc725
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118193
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
2021-07-03 21:57:29 +02:00
Bartosz Kosiorek 4992780d2b EMF+ tdf#142941 Fixes for SrcRect in DrawImagePoints
The SrcRect could be specified outside of source bitmap.
In such cases the Destination bitmap should be displayed as shifted
(eg. if position is negative), and scaled properly.
Change-Id: Ied6d339703999faaae061802ef6a28e190d5a176

Change-Id: Ia9772ced282684c2c94a261d97d30b53921d6171
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118345
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-07-03 14:59:06 +02:00
Bartosz Kosiorek 09218e0d4a Fix code style for primitive2dxmldump.cxx
Because the primitive2dxmldump.cxx file has already code style
similar to desired (76 lines out of 631 need mofication),
with this commit I enabled clang-format on
drawinglayer/source/tools/primitive2dxmldump.cxx

It will allow to keep the same code style in all LO components.

Change-Id: I76fbd704ab51fd685bf400d71d24a7abe48049d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118247
Tested-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-07-02 04:08:15 +02:00
Bartosz Kosiorek 574dc1e8ff EMF+ tdf#142995 tdf#142997 tdf#143076 Add alignment support for DrawString
With this commit, real size of the text is used to make
proper horizontal alignment. Additionally vertical alignment
is added and fix for Center alignment was applied

Change-Id: I17d9fd7de7f00f5e69f99c5b09061eb6059be67e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117794
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-07-01 23:50:31 +02:00
Bartosz Kosiorek 9e8c35cc3f EMF+ tdf#142975 Add brush support to DrawString record
Change-Id: Icfcb4199dcd755fb20e14a8166571b6d6e763f2e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117671
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-06-23 18:24:38 +02:00
Tomaž Vajngerl f6b9f671d1 move BufferedDecompositionPrimitive2D impl. into its own file
Change-Id: I180ed5378765237f69ccf721448dd799df2b457b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117666
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-23 01:49:18 +02:00
Tomaž Vajngerl 7e47816636 drawinglayer: put BufferedDecompositionPrimitive2D in its own file
And fix includes all over the place...

Change-Id: I6e2696bbeeac6ab7467cac70545fa7209aa981a8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117528
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-21 02:22:32 +02:00
Tomaž Vajngerl 81e3d9daed drawinglayer: remove ImplPrimitive2DIDBlock macro
We can just implement the simple getPrimitive2DID method in all
primitives. The ImplPrimitive2DIDBlock macro doesn't save us
anything.

Change-Id: I02f44d4891d7b340220890bf52a7ebfc8e41850a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117509
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-06-20 14:07:20 +02:00
Bartosz Kosiorek befa3f75fd EMF+ WMF Update the variable names and add additional TODO warnings
Change-Id: I78b05fe3c293494195bdd37c3030147b1f21228e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117148
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-06-17 18:24:57 +02:00
Luboš Luňák f62a353a7f "drawinglayer" -> "drawinglayer.emf" log area for some emf code
Change-Id: I83fa2d40225f83b82cea7f8934f4afdee181abe3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117000
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-06-11 10:18:55 +02:00
Bartosz Kosiorek 01ded1e6d3 WMF tdf#55058 tdf#142722 Add implementation of BitBlt and StretchBlt
With previous implementation, only BitBlt record with 1 bit color depth
was supported and StretchBlt was not implemented at all.

With this commit the support for 1 bit, 24 bit and 32 bit,
for both BitBlt and StretchBlt were added.

Change-Id: I061b2beae8c2f143ddff9c8c8bb64bf52f4cf502
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116873
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-06-09 20:19:27 +02:00
Bartosz Kosiorek 33d2cf7008 WMF Change the sign of read fields in BITBLT and DIB records
Additionally the names of variables were improved,
and additional checks were added for unsupported cases
Change-Id: Id84ef1218c5c2a40c8d01f2d40857d892badbb9f

Change-Id: I1b8571d0a627827bc1e67c2bfc6c1932d58c5233
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116744
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-06-05 20:20:24 +02:00
Miklos Vajna 26d2b19d4e sw HTML export: fix pixel size of shapes
- the twips logic size was set, but it was consumed as mm100 logic size,
  so the pixel size was about half of the correct one

- the HTML export didn't write a logic size ("CSS pixels size") for
  shapes

Change-Id: I37f6b4acde9d1298fae81f9975e9db95485631ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116691
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2021-06-04 14:54:45 +02:00
Bartosz Kosiorek 3afac94679 fix: extend the primitive dump, with information about line cap and joint
Change-Id: I5c67d360236ec67c41bc45a9018f0ff0d0ec1d3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116611
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-06-02 19:39:55 +02:00
Noel Grandin 039c7999d4 no need to allocate this separately
Change-Id: I78260d3e6ad8ce96db4353fede18d5e3a6808402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116400
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-30 20:18:52 +02:00
Luboš Luňák 9bf9fea0af properly draw only parts of FillGradientPrimitive2D (tdf#139000)
The size of the whole gradient is getDefinitionRange(), while
getOutputRange() gives the area of it to draw.

Change-Id: I85dd7fe51bcc9c332a6fb0e6748d5ac89266b910
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115923
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-21 16:53:21 +02:00
Noel Grandin 3d36ff1a1d loplugin:unusedfields
Change-Id: Ib574403a7f7f8b11c6263c9c19ec6b65c8374ddd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115753
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-18 21:42:10 +02:00
Tomaž Vajngerl 1bcad85a5d drawinglayer: move converter.hxx to public include
Change-Id: I71a15c532ba161d69585bd47631b3a8e2f6ddd66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115304
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-11 01:16:23 +02:00
Luboš Luňák 7603d51e77 add a unittest for impress drawing a dotted line in tdf#136957
Change-Id: Icabe039df29e9b3b9155656863120e3df7ef650b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115118
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-06 11:23:11 +02:00
Luboš Luňák 565824df07 fix dashed line info conversion for metafile (tdf#136957)
My previous change had two problems:
- It didn't handle correctly the case when something repeated,
  such as dash-dot-dot.
- The rounding when setting lengths was a left-over from my first
  attempt when LineInfo used integers and not floats.

Change-Id: I914241590b1ddec22df04c05dfe65e76e921ee52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114940
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-01 00:17:46 +02:00
Luboš Luňák b71d9a6d15 do not apply line dashing in drawinglayer (tdf#136957)
basegfx::utils::applyLineDashing() is not as good as the actual
VCL backend dashing, and there are some rounding errors because of
all the canvas transformation matrices or whatever, which leads
to the drawing problem. So use LineInfo to carry the dashing
information.
As a part of this change, also make LineInfo use doubles instead
of ints. The use of transformation matrices means that the values
may be fractional and less than one.

Change-Id: Ia5ac7d266cab344b7137052c81fbd96c1ce28003
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114710
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-29 16:05:53 +02:00
Noel Grandin b153d147c9 remove support for BITMASK in vcl backends
Rather use a proper alpha channel if we need transparency.

This is another small step towards merged alpha in our vcl
layer.

I suspect the intent in a lot of this code was to save memory.
Which have been a thing way back then, but these days our
backends mostly end up doing a copy-and-convert to a real
alpha channel anyway, so the existing code is actually
now a pessimisation.

Change-Id: I4a2bcbb2f76b841f05bc00580f364492829c69de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114808
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-29 08:40:56 +02:00
Caolán McNamara c33f08ca36 createPixelProcessor2DFromOutputDevice won't return null
nor will createProcessor2DFromOutputDevice

Change-Id: I1e0359ef2f94eeaf2da9a89d9e9dfb615587d3da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114814
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-28 21:37:43 +02:00
Noel Grandin 1325d8161a loplugin:moveopt
An attempt that did not find anything convincing enough to finish it up
and make it permanently active.
So just leave it in /store for now.

Change-Id: I1750e177655a4a510da100f880ba81bf762be277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114742
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-27 22:11:58 +02:00
Noel Grandin ddd2639a48 drop mask from BitmapEx
So that we have fewer cases to deal with when we transition to
32-bit bitmaps.

(*) rename maMask to maAlphaMask, since now it is only being used
for alpha duties.
(*) drop mbAlpha and mbTransparent to simplify state management,
the only thing we need to check for alpha is if maAlphaMask is
non-empty.

Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-26 12:51:58 +02:00
Noel Grandin 988e282731 loplugin:constantparam
Change-Id: I1d518bef47c838d03d8526a6a8fffd36d2ee68d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114074
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-17 16:49:38 +02:00
Caolán McNamara 3077f05a21 update PCHs
Change-Id: Id3728ac0011d3deed7e56081e3a854c7fa5336f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113959
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-12 09:47:35 +02:00
Luboš Luňák e76a4d62fa update PCHs
Change-Id: Ia9d04447f927e270a55500e7f35723a729bc01dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113801
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-08 17:23:08 +02:00
Hossein ea5641baee Updated README.md files to represent current code / use Markdown format
Previously, all of the README files have been renamed to README.md
and now, the contents of these files were changed to use Markdown
format. Other than format inconsistency, some README.md files lacked
information about modules, or were out of date. By using LibreOffice
/ OpenOffice wiki and other documentation websites, these files were
updated. Now every README.md file has a title, and some description.
The top-level README.md file is changed to add links to the modules.
The result of processing the Markdown format README.md files can be
seen at: https://docs.libreoffice.org/

Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-07 17:47:16 +02:00
Caolán McNamara e90a9b6782 update pches
Change-Id: I835c8fcc237ece5cf9d7a3b261645139d022e9b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113652
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-06 17:57:09 +02:00
Bartosz Kosiorek aa17ea3d36 tdf#37281 tdf#45820 tdf#48916 tdf#55058 EMF Implement complex clipping
As the visual glitches were resolved with:
https://gerrit.libreoffice.org/c/core/+/113423

It is time for enabling complex clipping.

Change-Id: I12edc88fc9a55c8deedf3d87faeb50cfe0067a01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113520
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-04-03 15:30:46 +02:00
Tomaž Vajngerl 88a177f827 vcl: remove GetBitCount and GetColorCount from Bitmap{Ex}
We can cast the PixelFormat enum to int for the same information
and we can use the enum to reduce ambiguity when possible.

Change-Id: I6ea648139465568cdeb12e5f5f75c7b609365bf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113188
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-04-02 06:28:39 +02:00
Noel c7483d48df drop operator bool and operator! from Bitmap and BitmapEx
IRC chat:
<quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap
  has the same problem as Graphic and the reason why you dropped that
  commit 7334034ae9
  "drop Graphic::operator bool"
<noelgrandin> quikee[m], hmmm, good point
<noelgrandin> maybe I should just drop both operator bool and
  operator! in favor of IsEmpty
<quikee[m]> noelgrandin: I don't remember what the problem is I just
  remembered we dropped it Graphic :) sure, dropping everything for
  IsEmpty is probably the best

Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-28 10:26:06 +02:00
Noel 83b011b61e create operator bool for Bitmap
so we can use a more natural syntax than "!!"

Change-Id: I8152a0d3ce37115fc83d332a26725ca1d28d959a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113147
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-26 11:58:03 +01:00
Tomaž Vajngerl b849373b2b vcl: add initializer_list constructor to BitmapPalette and use it
Change-Id: Ib24266e435765bd5e05193aea5cee61d7a9346b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113133
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-03-26 08:18:19 +01:00
Mike Kaganski a0656ec6fc const OUString -> const OUStringLiteral
Mostly automated rewrite

Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-25 10:06:26 +01:00