It is inherited per CSS Fonts, so the children of a group must inherit
it when set on the group.
Change-Id: I3a7f1c58b249e0d647c3b8a15f9e2043b7d6c891
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/209212
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
We added a rectangle using PolygonHairlinePrimitive2D to the
HiddenGeometryPrimitive2D, so we can mark the boundary of the
SVG image. The problem with using the hairline primitive for this
is that the hairline size is grown by 0.5 in each direction
(implGrowHairline, which is called in getB2DRange), which also makes
our SVG size 1px bigger than it should be.
Using FilledRectanglePrimitive2D instead fixes this problem as the
rectangle isn't grown in size.
Also needed to change a lot of tests that were using SVG images
and asserted the size of the image in ome way.
Change-Id: Ic2aa98b3df1f0746e4cfbd3474b6a93d0f4072ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200440
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit aa2c07951b565cd5464a36a2b0721f888ab8531c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200433
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
And not truncate it to an integer value.
Add additional overload for attribute that takes an enumerated type, otherwise
the compiler will complain about ambiguous conversion because it cannot
choose between the attribute that takes a integral value and the one that
takes a double value.
Change-Id: I9eae22817ec3b26da7b9468d1c8b5e6f3e900538
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201193
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
This commit fixes the incorrect positioning and scaling of Metafiles
rendered via EMF+ DrawImagePoints.
Key changes:
- Implemented a normalization matrix for Metafiles to properly map
source coordinates (SrcRect) to the destination.
- Updated EMFPImage to parse and store bounds from nested EMF headers,
ensuring correct dimensions (x, y, width, height) are available.
Change-Id: I07b4d99c334611a10e7faff42b76699f04fa1520
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201084
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
Since some code needs flexibility in error handling, where hardcoded
error value of -1 wasn't handy, o3tl::convertToHex was changed to
accept the error value as its template parameter.
Change-Id: Ifc771cc8fa29a801d4556dea969fc3ea7e620df5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199367
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
these were skipped in previous runs, since they contain some code behind #if
After inspecting these, it seems like the removals should not cause trouble.
Change-Id: I867ffc53254057e4bae43690214a2ab7ce0caa8f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197493
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
because we run this test with set_non_application_font_use=abort so we
don't expect any glyph substitution, and the default setup is without
any bundled Japanese font.
Change-Id: I2e7ead7404fbacb768c06502a52cde629c1a1116
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195407
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
I get a bunch of warnings when opening e.g. Writer:
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
warn:svgio:38509:18012388:svgio/source/svgreader/SvgNumber.cxx:74: SvgNumber not set (!)
This happens when reading translate transform without y position. Since
y is optional, we should initialize aTransY to avoid the noisy warning.
Change-Id: I503a126aa7ce0be9caca366247710dd46316b255
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191872
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
This is follow up to commit:
commit b9f0caad5d
Author: Khaled Hosny <khaled@aliftype.com>
Date: Tue Aug 23 04:13:28 2022 +0200
tdf#66819: Disable ligatures with character spacing
Even though editengine was applying letter spacing, when drawing with
drawinglayer, letter spacing was not propagated which caused VCL to not
disable the ligature features.
Change-Id: Ia8bf2231478720262484a757e16fe5afec3cd28e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191512
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Jenkins
SubpixelPositioning was until now activated when *any* MapMode was set,
but there is another case this is needed: When a TextSimplePortionPrimitive2D is rendered by a SDPR.
In that case a TextLayouterDevice is used (to isolate all Text-related
stuff that should not be at OutputDevice) combined with a 'empty'
OutDev -> no MapMode.
The DXArray for Primitives (see that TextPrimitive) is defined in the
Unit-Text_Coordinate-System, thus in (0..1) ranges. That allows to
have the DXArray transformation-independent and thus re-usable and
is used since the TextPrimitive was created.
If there is a DXArray missing at the text Primitive (as is the case
with SVG imported ones, but allowed in general) one gets automatically
created during the SalLayout creation for rendering. Unfortunately there
(see GenericSalLayout::LayoutText, usages of GetSubpixelPositioning) the
coordinates get std::round'ed, so all up to that point correctly
calculated metric information in that double-precision dependent coordinate space gets *shredded*.
To avoid that, SubpixelPositioning has to be activated. While this
might be done in the future for all cases (SubpixelPositioning ==
true), for now add this case for all usages of TextLayouterDevice to
not break old stuff.
NOTE: Due to higher precision I had to adapt some values for SVGIO
tests: That is expected since higher precision leads to less-wide
results internally. I checked testdocs that deviations are minimal and
have better quality with SubpixelPositioning then before.
Change-Id: Iab5aa6336cdb18224fd06472bf6badc9eb0fce3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189993
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
now that Bitmap can handle transparency.
Which exposes a bug in skia, where an unfortunate optimisation
breaks bitmaps with alpha data, because it overwrites said
alpha data.
So remove that skia optimisation.
Change-Id: If821f6f04f464ee4ad42ba1c6571db6c69525ece
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
The embedding cannot rely on SVG providing all
values of x/y/w/h, so added fallbacks to real
geometric size. Also removed double-adding
geometry.
Change-Id: I1914ed0c3e1e42ba899db4f3eb9193fd29e9c4be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179831
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
These are only sent to an external API expecting char*-like strings,
or for comparison. Having every assertXPath having three of _[ou]str
is too much syntactic noise, making the unit tests almost unreadable.
Change-Id: Ic004a36ea75e7bfe0b96f405c40f926a957b51cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174416
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins