Age | Commit message (Collapse) | Author |
|
Added rotation support for DrawString and DrawDriverString
The EmfPlusDrawString record specifies text output with string formatting.
The EmfPlusDrawDriverString record specifies text output
with character positions.
Now both EMF+ records properly support rotation.
Change-Id: I15a7a6dd2b8a209cf2aac2af75d7dd89cedd1aeb
|
|
Change-Id: Ifbe81b851b17858a915105c102af6f4d8f2c81fa
Reviewed-on: https://gerrit.libreoffice.org/60800
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 4a63deaebf99d92525ff9c4349792c6ab9d5e5a7)
|
|
Change-Id: I065635393763af774b45cbba6bd85c4334383b93
Reviewed-on: https://gerrit.libreoffice.org/56458
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
(cherry picked from commit 8e5441469e07e85c5bd278ac5777eb2b550f900a)
|
|
Change-Id: Ifb5c17e13faf6e9d246e1668ef7916957a5296b6
Reviewed-on: https://gerrit.libreoffice.org/55679
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit d5db9b8a8f99bed76c9a3e195a28049d677610a9)
|
|
Change-Id: I16e9e083811c6e14861da1ba1df7d46e8c8771d7
Reviewed-on: https://gerrit.libreoffice.org/54974
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
(cherry picked from commit 0a2035492c66bc323d84ad6c2c4cbc0dc3c9d9aa)
|
|
With previous implementation only Pixel unit was supported.
Other units (eg. inch, milimeters, points, world) was treated
as Pixel.
With this patch the correct unit conversion was implemented to following records:
- FontObject
- PenObject
- SetWorldTransform
As a result records are properly scaled.
Tested with DrawString record from:
https://bugs.documentfoundation.org/attachment.cgi?id=140287
Change-Id: I77435ad8f1bbac08f298a03d91d0c7f1f1734e5c
Reviewed-on: https://gerrit.libreoffice.org/52825
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
(cherry picked from commit e58dc868a6ac0df24adf88f32f90a9e4fc6fdae9)
|
|
With EMF+ Only mode, still the EMF records could be used for
displaying objects, by using Get Device Context (GetDC).
Files identified as EMF+ Only can contain both EMF+ records and EMF records. All EMF+
records are used to render the image. The EMF records that are part of the drawing are those
preceded by a Get Device Context record.
Unfortunately after finishing EMF drawing, the clip region was
not reset. As a result records after EMF record was not displayed.
With this patch, the issue was fixed by resetting clip region.
Change-Id: I998b14e7c3b56a7711ba6a7bec08ec2097e0dfce
Reviewed-on: https://gerrit.libreoffice.org/52897
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
(cherry picked from commit a2851d562cdfaf06e5f767030677846f3f129b1c)
Reviewed-on: https://gerrit.libreoffice.org/53093
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Tested-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
(cherry picked from commit 674e8c5412e938191ad3e928e9a52b5420bec85c)
|
|
With previous implementation of closing shapes, we are adding
new line between last and first point.
It was causing wrong border shape during displaying.
With this patch proper method was used to fix that.
Change-Id: If0a084700401edd9d3b8a57cb27154079828e6ed
Reviewed-on: https://gerrit.libreoffice.org/52857
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Patrick Jaap <patrick.jaap@tu-dresden.de>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
(cherry picked from commit 5024688f5e2d99b704fff05d2dddf12c397a4aa9)
|
|
Many users noticing that EMF DrawString is shifted horizontally in same cases.
It is caused by missing implementation of:
- StringAlignment:
Near: Alignment is to the left side of the layout rectangle
Center: Specifies that alignment is centered
between the origin and extent of the layout rectangle.
Far: Alignment is to the right side of the layout rectangle
- Leading Margin: specifies the length of the space to add
to the starting position of a string
- trailing Margin: Length of the space to leave following a string.
With this path this missing parameters are implemented.
It was tested with document:
https://bugs.documentfoundation.org/attachment.cgi?id=131334
In following document StringAlignmentCenter and LeadingMargin is not set:
https://bugs.documentfoundation.org/attachment.cgi?id=124180
I make sure that there is no regression (the image should be displayed
as without the patch.
Change-Id: I7909a1d02ffd558a3bf91bd41f6945830252724d
Reviewed-on: https://gerrit.libreoffice.org/52696
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Patrick Jaap <patrick.jaap@tu-dresden.de>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
(cherry picked from commit ba662ea44083107f10184a4f01b94f9b8e3ed3dc)
Reviewed-on: https://gerrit.libreoffice.org/52808
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
(cherry picked from commit 32e7640dc6113945fcd48ce3c0e74cf095da9670)
|
|
Added code to quartz vcl implementation that takes care
when BitmapPalette.count != (depth^^2)-1 - which may
be the case anytime. If then a bitmap value exists that
goes beyond that count, a invalid access was executed
Change-Id: Iab332c91b8753aab85e9d365323f5c9e531efab2
Reviewed-on: https://gerrit.libreoffice.org/44058
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/53085
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
(cherry picked from commit 6e591f06e39c69c270c8c01e9ed138d315720624)
|
|
With current EMF+ implementation all filled figures,
does not support transparency.
This patch add transparency support for following EMF+ records:
- DrawDriverString
- DrawString
- FillEllipse
- FillRects
- FillPolygon
- FillPie
- FillPath
- FillRegion
Change-Id: I1e59ea90bdf5fafc07ff9417fccace44872bbecd
Reviewed-on: https://gerrit.libreoffice.org/52021
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
(cherry picked from commit aee1904446cd0508cdf06fd23155373b5018dfed)
|
|
Change-Id: I0a9f332cc66e43caa4e1611006fa765cad063539
Reviewed-on: https://gerrit.libreoffice.org/51915
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 7127598586faf612250129f1914c8a0ee9de5a5a)
|
|
Change-Id: Ic27c3bbac12f66b30ff2f30f558180127cc73a51
Reviewed-on: https://gerrit.libreoffice.org/51874
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
(cherry picked from commit 94c1f958d381b715816921f80e4142a052b77242)
|
|
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/45828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Patrick Jaap <patrick.jaap@tu-dresden.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
...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>
|
|
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>
|
|
Change-Id: Ib50fa1ac36f06dbd7e5e921f9c13c5d5ac8bb138
Reviewed-on: https://gerrit.libreoffice.org/44869
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: I0f40f7178be126229c8963b56e6a15313acc19a7
Reviewed-on: https://gerrit.libreoffice.org/44868
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: I9b381f456d4c96369fdf7e94f161fde2723ebead
Reviewed-on: https://gerrit.libreoffice.org/44842
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: I60366d4a27fdf5a3cc020ca54f4a2aa9b974db5e
Reviewed-on: https://gerrit.libreoffice.org/44795
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: I00ab6ac7a5e157cff469c2afd5e14d5f06f01bd0
Reviewed-on: https://gerrit.libreoffice.org/44432
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
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>
|
|
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>
|
|
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>
|
|
Change-Id: Iff2bb06a209a6c089fec12b5f888ca4ef7c38c1b
Reviewed-on: https://gerrit.libreoffice.org/44289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
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>
|
|
Change-Id: I22a6747446d5571a883555db748ca3d40579cb13
Reviewed-on: https://gerrit.libreoffice.org/44222
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
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>
|
|
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>
|
|
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>
|
|
This reverts commit bdb9cc1702d4e125db8c379f3b535bbd9f845b95.
Breaks Mac unit tests in sw_ooxmlexport4
|
|
Change-Id: If5ce156b7d60d30be8451902beb8330b7177b26e
Reviewed-on: https://gerrit.libreoffice.org/43858
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
|
|
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>
|
|
SvStream::ReadFloat already does that, and SvStream is initialised
to SvStreamEndian::LITTLE by default.
Change-Id: I5859e43014533bcebef9d4b8f0678c516193b92e
|
|
Insert constructor everywhere, except a couple places that apparently
want to compare GetMapUnit().
Change-Id: I1910deb60562e5e949203435e827057f70a3f988
|
|
Change-Id: I4dc2d5a5fbbded5f4c7a1417c150fe6b1a73a69d
|
|
Change-Id: If235956228d7f807817d9ffff3da652bd6485ffa
Reviewed-on: https://gerrit.libreoffice.org/43834
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
the gif in question has gif disposal mode "previous" set
on the first frame
Change-Id: I5234b0bd810af9e8e858dabac373fc4651dbb52e
Reviewed-on: https://gerrit.libreoffice.org/43613
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: I52693e59a37e36fa0bb21732efe90af84fe6d6c6
|
|
Change-Id: I7855c76e820efce96778b1c19ec71dffcc4b4abb
Reviewed-on: https://gerrit.libreoffice.org/43621
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I2fab3b9a111513ac711a6480eb240de99eea1991
Reviewed-on: https://gerrit.libreoffice.org/43486
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1b128aa467286b5ae5e0d3cc298ee59f3e6ec12d
Reviewed-on: https://gerrit.libreoffice.org/43408
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Patrick Jaap <patrick.jaap@tu-dresden.de>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
DrawString:
The value 'fontAttribute' is optional and may be null,
results in missing characters.
DrawImage:
The case of 'metafile' was missing and leads to
low resolution rendering.
Change-Id: I81566d884975fda832f4a5af6663c837f355c383
Reviewed-on: https://gerrit.libreoffice.org/43367
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
|
|
Change-Id: I20fd2665f9fed59b45127dd4aa3dbce0fc58ac17
Reviewed-on: https://gerrit.libreoffice.org/43006
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
When we get an EMF+ comment record (which is NOT an EMF comment
record, EMF has comment records which is how you store EMF+
records, EMF+ records also have comment records for "private
data") then if we are a debug build then dump the private data
to stdout.
To make this work, set:
SAL_LOG=+INFO.cppcanvas.emf+WARN.cppcanvas.emf
Change-Id: I293875f45b692971379a5945ff7feb273bc54c73
Reviewed-on: https://gerrit.libreoffice.org/42558
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
We should warn if EMF+ record < 12 bytes. Similarly, if the
record size is less than 12 bytes, that's evidence of a
corrupted EMF+ record, same with if the length or datasize
is too long. Thus we should warn at this point.
Also - if an if statement is not part of another if/else block
then best to have a newline separating them so they don't
look like they are part of that block.
Change-Id: I914c754fe7437d6d4b6f2e4aec2d28475eaf5d70
Reviewed-on: https://gerrit.libreoffice.org/43004
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
to either startsWith or == or !=
Change-Id: I595dd9d89d32134827980c4ba10f88584430137d
Reviewed-on: https://gerrit.libreoffice.org/42988
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|