Files
odfstudio/vcl/CppunitTest_vcl_map.mk
Christopher Sherlock d8cc011331 vcl: add comprehensive tests for OutputDevice mapping and transformations
This change introduces a suite of tests targeting the MapMode logic,
coordinate conversions, and view transformations in OutputDevice to
safeguard the recent CoordinateMapper refactoring.

Changes:
- Added a TestVirtualDevice wrapper to expose protected OutputDevice
  methods (ImplLogicHeightToDevicePixel, SetOutOffXPixel, etc.)
  without requiring VCL_DLLPUBLIC exports.
- Added tests validating LogicToLogic edge cases, notably VCL's
  additive treatment of MapMode origins.
- Added tests verifying standard LogicToPixel conversion math
  (e.g., verifying 100thMM to Pixel at 96 DPI).
- Added tests ensuring that SetMapMode and SetRelativeMapMode
  correctly propagate state down to the mapper and scale output.
- Added testViewTransformation to ensure that GetViewTransformation()
  matrices produce results mathematically equivalent to LogicToPixel.
- Added basegfx to CppunitTest_vcl_map.mk dependencies to support
  the matrix math in the new tests.

Change-Id: Ib98874ed0041a2579d8b941b781c7a4101b69215
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203261
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-04-14 20:57:03 +02:00

43 lines
1.0 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,vcl_map))
$(eval $(call gb_CppunitTest_set_include,vcl_map,\
-I$(SRCDIR)/vcl/inc \
$$(INCLUDE) \
))
$(eval $(call gb_CppunitTest_add_exception_objects,vcl_map, \
vcl/qa/cppunit/vclmaptest \
))
$(eval $(call gb_CppunitTest_use_libraries,vcl_map, \
test \
tl \
unotest \
vcl \
basegfx \
))
$(eval $(call gb_CppunitTest_use_externals,vcl_map, \
boost_headers \
))
$(eval $(call gb_CppunitTest_use_sdk_api,vcl_map))
$(eval $(call gb_CppunitTest_use_ure,vcl_map))
$(eval $(call gb_CppunitTest_use_vcl,vcl_map))
$(eval $(call gb_CppunitTest_use_rdb,vcl_map,services))
$(eval $(call gb_CppunitTest_use_configuration,vcl_map))
# vim: set noet sw=4 ts=4: