From abf04f6b0ad0dd83b4d479723144593e2f83ede0 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Thu, 21 Jan 2016 15:00:08 +1100 Subject: vcl: add embeddable font property functions to Font class Added setter and getter for embeddable font property to the Font class. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test this flag. Change-Id: I7f4ddf09d4a122c7c335b017efcb95f1774ae0d8 Reviewed-on: https://gerrit.libreoffice.org/21650 Tested-by: Jenkins Reviewed-by: Chris Sherlock --- vcl/qa/cppunit/font.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'vcl/qa') diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx index 224c8cdaaac6..a57395c05d76 100644 --- a/vcl/qa/cppunit/font.cxx +++ b/vcl/qa/cppunit/font.cxx @@ -28,6 +28,7 @@ public: void testItalic(); void testQuality(); void testBuiltInFontFlag(); + void testEmbeddableFontFlag(); void testSymbolFlagAndCharSet(); CPPUNIT_TEST_SUITE(VclFontTest); @@ -38,6 +39,7 @@ public: CPPUNIT_TEST(testItalic); CPPUNIT_TEST(testQuality); CPPUNIT_TEST(testBuiltInFontFlag); + CPPUNIT_TEST(testEmbeddableFontFlag); CPPUNIT_TEST(testSymbolFlagAndCharSet); CPPUNIT_TEST_SUITE_END(); }; @@ -121,6 +123,16 @@ void VclFontTest::testBuiltInFontFlag() CPPUNIT_ASSERT_EQUAL( true, aFont.IsBuiltInFont() ); } +void VclFontTest::testEmbeddableFontFlag() +{ + vcl::Font aFont; + + CPPUNIT_ASSERT_EQUAL( false, aFont.CanEmbed() ); + + aFont.SetEmbeddableFlag( true ); + CPPUNIT_ASSERT_EQUAL( true, aFont.CanEmbed() ); +} + void VclFontTest::testSymbolFlagAndCharSet() { // default constructor should set scalable flag to false -- cgit