summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2016-01-21 15:13:22 +1100
committerChris Sherlock <chris.sherlock79@gmail.com>2016-01-21 06:22:48 +0000
commita5372932f787534d15d4e36ee8c297f3c6ac0888 (patch)
tree026ee6e3ad21000e402bc2ecf09b8b949bff5f6a /vcl/qa
parent078194f6d0ede81042f38fb687f5cc3180a48ad0 (diff)
vcl: add subsettable flag property functions to Font class
Added getter and setter for subsettable flag 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: I2a66f1c4876698e1ffeaf260b2b43d5308b71191 Reviewed-on: https://gerrit.libreoffice.org/21651 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.cxx13
1 files changed, 13 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/font.cxx b/vcl/qa/cppunit/font.cxx
index a57395c05d76..656d08917fb8 100644
--- a/vcl/qa/cppunit/font.cxx
+++ b/vcl/qa/cppunit/font.cxx
@@ -29,6 +29,7 @@ public:
void testQuality();
void testBuiltInFontFlag();
void testEmbeddableFontFlag();
+ void testSubsettableFontFlag();
void testSymbolFlagAndCharSet();
CPPUNIT_TEST_SUITE(VclFontTest);
@@ -40,6 +41,7 @@ public:
CPPUNIT_TEST(testQuality);
CPPUNIT_TEST(testBuiltInFontFlag);
CPPUNIT_TEST(testEmbeddableFontFlag);
+ CPPUNIT_TEST(testSubsettableFontFlag);
CPPUNIT_TEST(testSymbolFlagAndCharSet);
CPPUNIT_TEST_SUITE_END();
};
@@ -133,6 +135,17 @@ void VclFontTest::testEmbeddableFontFlag()
CPPUNIT_ASSERT_EQUAL( true, aFont.CanEmbed() );
}
+
+void VclFontTest::testSubsettableFontFlag()
+{
+ vcl::Font aFont;
+
+ CPPUNIT_ASSERT_EQUAL( false, aFont.CanSubset() );
+
+ aFont.SetSubsettableFlag( true );
+ CPPUNIT_ASSERT_EQUAL( true, aFont.CanSubset() );
+}
+
void VclFontTest::testSymbolFlagAndCharSet()
{
// default constructor should set scalable flag to false