summaryrefslogtreecommitdiff
path: root/tools/qa
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2019-04-27 11:18:42 +0900
committerTomaž Vajngerl <quikee@gmail.com>2019-04-27 06:48:18 +0200
commitcae53cf14d59bc2fa6317c9493197804928d6e5e (patch)
tree4420d17bf2c9f1aa001c98c5c140ebd7ed04c30e /tools/qa
parent55e28737e973b40f72d398c9bb7a4a41307eb562 (diff)
Decouple reading/writing of Color into GenericTypeSerializer
This adds GenericTypeSerializer, which is now responsible of serializing the Color into a stream (other types will follow), but only for the older version of the binary format. The new version we just write the sal_UInt32 mValue directly. This is a start of decoupling the serialization of generic types in tools and vcl module from the actual type, so we can in the future replace those with basegfx variant. Change-Id: I92738e7c178cac5cbca882dcbe45c80cc8269466 Reviewed-on: https://gerrit.libreoffice.org/71404 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'tools/qa')
-rw-r--r--tools/qa/cppunit/test_color.cxx18
1 files changed, 0 insertions, 18 deletions
diff --git a/tools/qa/cppunit/test_color.cxx b/tools/qa/cppunit/test_color.cxx
index 8ecf03572295..011fbcbdfa65 100644
--- a/tools/qa/cppunit/test_color.cxx
+++ b/tools/qa/cppunit/test_color.cxx
@@ -23,7 +23,6 @@ class Test: public CppUnit::TestFixture
public:
void testVariables();
void test_asRGBColor();
- void test_readAndWriteStream();
void test_ApplyTintOrShade();
void testGetColorError();
void testInvert();
@@ -32,7 +31,6 @@ public:
CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testVariables);
CPPUNIT_TEST(test_asRGBColor);
- CPPUNIT_TEST(test_readAndWriteStream);
CPPUNIT_TEST(test_ApplyTintOrShade);
CPPUNIT_TEST(testGetColorError);
CPPUNIT_TEST(testInvert);
@@ -107,22 +105,6 @@ void Test::test_asRGBColor()
CPPUNIT_ASSERT_EQUAL(OUString("ffffff"), aColor.AsRGBHexString());
}
-void Test::test_readAndWriteStream()
-{
- SvMemoryStream aStream;
- Color aReadColor;
-
- WriteColor(aStream, Color(0x12, 0x34, 0x56));
-
- aStream.Seek(STREAM_SEEK_TO_BEGIN);
-
- ReadColor(aStream, aReadColor);
-
- CPPUNIT_ASSERT_EQUAL(sal_uInt8(0x12), aReadColor.GetRed());
- CPPUNIT_ASSERT_EQUAL(sal_uInt8(0x34), aReadColor.GetGreen());
- CPPUNIT_ASSERT_EQUAL(sal_uInt8(0x56), aReadColor.GetBlue());
-}
-
OUString createTintShade(sal_uInt8 nR, sal_uInt8 nG, sal_uInt8 nB, OUString const & sReference, sal_Int16 nTintShade)
{
Color aColor(nR, nG, nB);