office-gobmx/svx/CppunitTest_svx_unit.mk
Regina Henschel bc886f5238 tdf#98584 Correct import draw:transform values skewY and matrix
Covers tdf#98583 and tdf#98565 too.
TRBaseGeomety (API) uses for skewX the same angle orientation as
written to file. But that results in mathematically wrong matrices.
Change sign where needed.
Vertical shearing is converted and written to file by LO as sequence
rotation * shear horizontal * scale. Same should happen on reading.
Because LO does not write skewY itself, I have used the angle
orientation, that was used in OOo1.1.5 and that is used in
Scribus 1.5.4.
Import generates a transformation matrix from the draw:transform
attribute. That is a mathematically correct matrix. It is applied
to the shape via TRSetBaseGeometry. But that uses a wrong sign in
the shear angle. Therefore conversion of mathematical matrix to
TRBaseGeometry matrix is needed.
The draw:transform attribute can generate a scaling, which needs to
be applied on top of the scaling made from svg:width and svg:height.
Such happens on import of skewY() and might happen with matrix().
SdrPathObject puts scaling form svg:width and svg:height directly
into the coordinates of its points. It had ignored any additional
scaling. I have add a part to detect and apply it.

Change-Id: I7636b9feec432cf403e7c6ef8dbd6a769793d144
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86244
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2020-01-17 18:03:38 +01:00

59 lines
1.4 KiB
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_CppunitTest_CppunitTest,svx_unit))
$(eval $(call gb_CppunitTest_use_externals,svx_unit,\
boost_headers \
libxml2 \
))
$(eval $(call gb_CppunitTest_use_sdk_api,svx_unit))
$(eval $(call gb_CppunitTest_set_include,svx_unit,\
-I$(SRCDIR)/svx/source/inc \
-I$(SRCDIR)/svx/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_add_exception_objects,svx_unit, \
svx/qa/unit/svdraw/test_SdrTextObject \
svx/qa/unit/customshapes \
svx/qa/unit/classicshapes \
svx/qa/unit/svdraw \
svx/qa/unit/unodraw \
svx/qa/unit/xoutdev \
svx/qa/unit/XTableImportExportTest \
))
$(eval $(call gb_CppunitTest_use_libraries,svx_unit, \
basegfx \
drawinglayer \
sal \
sfx \
svxcore \
svx \
tl \
unotest \
vcl \
utl \
comphelper \
cppuhelper \
cppu \
test \
unotest \
))
$(eval $(call gb_CppunitTest_use_sdk_api,svx_unit))
$(eval $(call gb_CppunitTest_use_ure,svx_unit))
$(eval $(call gb_CppunitTest_use_vcl,svx_unit))
$(eval $(call gb_CppunitTest_use_rdb,svx_unit,services))
$(eval $(call gb_CppunitTest_use_configuration,svx_unit))
# vim: set noet sw=4 ts=4: