diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-21 15:00:08 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-21 06:20:39 +0000 |
commit | abf04f6b0ad0dd83b4d479723144593e2f83ede0 (patch) | |
tree | 5f2e2eb0cde929743e7f199c6756b2f351e1bc9e /vcl/qa | |
parent | 6b65a0e83c4798f117be61af91dbaebdc85e94b7 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/font.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
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 |