summaryrefslogtreecommitdiff
path: root/vcl/CppunitTest_vcl_mapmode.mk
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-02-13 16:08:01 +1100
committerTomaž Vajngerl <quikee@gmail.com>2016-02-24 11:20:39 +0000
commita8c2e437a38fcb0cda9f3e8569f32185597f893f (patch)
tree40e38b9ab241e9eccb07be967149df7049722c3e /vcl/CppunitTest_vcl_mapmode.mk
parentdaa1882dc2360cead712c3f100cbef0f35c74f5d (diff)
tdf#85761 vcl: JPEG export does not save PPI values correctly
JPEG values are currently hardcoded to 96PPI when we export JPEGs. The Graphic class doesn't have an easy way to get the PPI, but this can actually be calculated from the pref size and pref map mode (no idea why it is called "Pref"). Interestingly, you need to get a multiplier to work this out, relative to units of 100th mm. The EPS filter code had a function that does exactly this, but it's entirely based on MapMode units so it was really implemented in the wrong class IMO. I have thus moved it out of PSWriter and into MapMode. This also fixes tdf#65695, which was partially fixed, but had the JPEG PPI hardcoded to 96dpi. Also fixes tdf#97481. Change-Id: Iedb674141dd4e22fcbfb7be357dc777f732aa3aa Reviewed-on: https://gerrit.libreoffice.org/22339 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/22380 Reviewed-on: https://gerrit.libreoffice.org/22454
Diffstat (limited to 'vcl/CppunitTest_vcl_mapmode.mk')
-rw-r--r--vcl/CppunitTest_vcl_mapmode.mk53
1 files changed, 53 insertions, 0 deletions
diff --git a/vcl/CppunitTest_vcl_mapmode.mk b/vcl/CppunitTest_vcl_mapmode.mk
new file mode 100644
index 000000000000..daee48078e31
--- /dev/null
+++ b/vcl/CppunitTest_vcl_mapmode.mk
@@ -0,0 +1,53 @@
+# -*- 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_mapmode))
+
+$(eval $(call gb_CppunitTest_set_include,vcl_mapmode,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/vcl/inc \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,vcl_mapmode, \
+ vcl/qa/cppunit/mapmode \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,vcl_mapmode,boost_headers))
+
+$(eval $(call gb_CppunitTest_use_libraries,vcl_mapmode, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ svt \
+ test \
+ tl \
+ tk \
+ unotest \
+ vcl \
+ $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,vcl_mapmode,\
+ udkapi \
+ offapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,vcl_mapmode))
+$(eval $(call gb_CppunitTest_use_vcl,vcl_mapmode))
+
+$(eval $(call gb_CppunitTest_use_components,vcl_mapmode,\
+ configmgr/source/configmgr \
+ i18npool/util/i18npool \
+ ucb/source/core/ucb1 \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,vcl_mapmode))
+
+# vim: set noet sw=4 ts=4: