summaryrefslogtreecommitdiff
path: root/vcl/CppunitTest_vcl_fontmetric.mk
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-13 03:05:29 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-13 01:08:45 +0000
commit8bfccd3a71d911b6da6c108a1312b712431f99d8 (patch)
treeade625c2d9d2df16d99cc371117e8a57e6dd68a8 /vcl/CppunitTest_vcl_fontmetric.mk
parentc71b5b4d2ec76c0a204f9515dece1e0e0689ce3c (diff)
vcl: Create accessor and mutator for font scaling in FontMetric
This is fragile code! There are actually *two* classes that do almost precisely the same thing, they are: - ImplFontMetric, and - ImplFontMetricData They both have much in common, including their class name, and even most of their functionality. In fact, they both have common accessor functions. When I look at the code, it looks like OutputDevice is actually given an ImplFontMetricData object, which it then uses to populate an ImplFontMetric object... Basically, I'm going to merge these classes. To do so, I'm going to do the following: Step 1: Implement accessor functions for ImplFontMetric and FontMetric (then remove the friendship of this class to OutputDevice!) Step 2: Write a unit test for each accessor function in ImplFontMetric Step 3: Ensure that ImplFontMetric and ImplFontMetricData use some sort of smart pointer (probably an intrusive_ptr like I did ages ago with FontCharMap) Step 4: Merge the two classes together once their class interfaces are the same and I am satisfied they do the same thing Step 5: Find all instances of inefficient usage - for instance, I can do away with the code that copies the ImplFontMetricData attributes into an ImplFontMetric object. Change-Id: I07c1cb848774b130fa2ca60b51da53e07754dd00 Reviewed-on: https://gerrit.libreoffice.org/21399 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/CppunitTest_vcl_fontmetric.mk')
-rw-r--r--vcl/CppunitTest_vcl_fontmetric.mk53
1 files changed, 53 insertions, 0 deletions
diff --git a/vcl/CppunitTest_vcl_fontmetric.mk b/vcl/CppunitTest_vcl_fontmetric.mk
new file mode 100644
index 000000000000..5206db23d20b
--- /dev/null
+++ b/vcl/CppunitTest_vcl_fontmetric.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_fontmetric))
+
+$(eval $(call gb_CppunitTest_set_include,vcl_fontmetric,\
+ $$(INCLUDE) \
+ -I$(SRCDIR)/vcl/inc \
+))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,vcl_fontmetric, \
+ vcl/qa/cppunit/fontmetric \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,vcl_fontmetric,boost_headers))
+
+$(eval $(call gb_CppunitTest_use_libraries,vcl_fontmetric, \
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ svt \
+ test \
+ tl \
+ tk \
+ unotest \
+ vcl \
+ $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,vcl_fontmetric,\
+ udkapi \
+ offapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,vcl_fontmetric))
+$(eval $(call gb_CppunitTest_use_vcl,vcl_fontmetric))
+
+$(eval $(call gb_CppunitTest_use_components,vcl_fontmetric,\
+ configmgr/source/configmgr \
+ i18npool/util/i18npool \
+ ucb/source/core/ucb1 \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,vcl_fontmetric))
+
+# vim: set noet sw=4 ts=4: