diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-20 23:41:06 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-01-20 16:34:56 +0000 |
commit | 137c440ccddbc9b41b8a8997820b7c0253b4de64 (patch) | |
tree | d5374d2420c24f9259cc50cd7b184104ffa54585 /vcl/qa/cppunit | |
parent | ad236a3e1b456531ea758c2a3c5075860d823109 (diff) |
vcl: add built in font property functions to Font class
Added setter for built-in font property and IsBuiltInFontFlag to
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: I61ce33fe6ffb31be22c68ce8a94d0886ebdc8fcf
Reviewed-on: https://gerrit.libreoffice.org/21627
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'vcl/qa/cppunit')
-rw-r--r-- | vcl/qa/cppunit/font.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx index 5649b329ba59..224c8cdaaac6 100644 --- a/vcl/qa/cppunit/font.cxx +++ b/vcl/qa/cppunit/font.cxx @@ -27,6 +27,7 @@ public: void testPitch(); void testItalic(); void testQuality(); + void testBuiltInFontFlag(); void testSymbolFlagAndCharSet(); CPPUNIT_TEST_SUITE(VclFontTest); @@ -36,6 +37,7 @@ public: CPPUNIT_TEST(testPitch); CPPUNIT_TEST(testItalic); CPPUNIT_TEST(testQuality); + CPPUNIT_TEST(testBuiltInFontFlag); CPPUNIT_TEST(testSymbolFlagAndCharSet); CPPUNIT_TEST_SUITE_END(); }; @@ -109,6 +111,15 @@ void VclFontTest::testQuality() CPPUNIT_ASSERT_EQUAL( (int)50, aFont.GetQuality() ); } +void VclFontTest::testBuiltInFontFlag() +{ + vcl::Font aFont; + + CPPUNIT_ASSERT_EQUAL( false, aFont.IsBuiltInFont() ); + + aFont.SetBuiltInFontFlag( true ); + CPPUNIT_ASSERT_EQUAL( true, aFont.IsBuiltInFont() ); +} void VclFontTest::testSymbolFlagAndCharSet() { |