diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-07-29 20:57:40 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-08-19 10:36:09 +0200 |
commit | d6b4a0a9a3fed1ba07125d7e9517f0a663fc4018 (patch) | |
tree | 3e755bc446c93b8f5748324d8d07bca93fd2c660 /vcl/qa | |
parent | b5ee39024198f4a820b5680152757c83bdb8f3bf (diff) |
vcl: save and load the page number when swapping the graphic
PDF vector graphic includes a page number, of the page that the
graphic is rendering. This however isn't remembered when swapping
out and back in the graphic, because the serialization format
doesn't include it.
This adds a version 2 of the serialization format, with an
additional page number (page index) attribute.
Also changes the GraphicTest to account for an additional 4 bytes
written and the change of the checksum.
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100836
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
(cherry picked from commit 28beaffba6a0ecaf351c84bed41443a6721d85b6)
Change-Id: Ic0fbfc4ad983f7880e06956da3b4664bd4b610d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100883
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r-- | vcl/qa/cppunit/GraphicTest.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/qa/cppunit/GraphicTest.cxx b/vcl/qa/cppunit/GraphicTest.cxx index 1630a599f7fd..7038ae4c6a11 100644 --- a/vcl/qa/cppunit/GraphicTest.cxx +++ b/vcl/qa/cppunit/GraphicTest.cxx @@ -318,10 +318,10 @@ void GraphicTest::testSwapping() CPPUNIT_ASSERT_EQUAL(true, bool(xStream)); // Check size of the stream - CPPUNIT_ASSERT_EQUAL(sal_uInt64(445), xStream->remainingSize()); + CPPUNIT_ASSERT_EQUAL(sal_uInt64(449), xStream->remainingSize()); std::vector<unsigned char> aHash = calculateHash(xStream); - CPPUNIT_ASSERT_EQUAL(std::string("304f17d9c56e79b95f6c337dab88709d4f9b61f0"), + CPPUNIT_ASSERT_EQUAL(std::string("878281e583487b29ae09078e8040c01791c7649a"), toHexString(aHash)); } @@ -390,10 +390,10 @@ void GraphicTest::testSwappingVectorGraphic() CPPUNIT_ASSERT_EQUAL(true, bool(xStream)); // Check size of the stream - CPPUNIT_ASSERT_EQUAL(sal_uInt64(349), xStream->remainingSize()); + CPPUNIT_ASSERT_EQUAL(sal_uInt64(353), xStream->remainingSize()); std::vector<unsigned char> aHash = calculateHash(xStream); - CPPUNIT_ASSERT_EQUAL(std::string("88b4c1c359e3cf7be005fbb46c93ffa6de9dcf4a"), + CPPUNIT_ASSERT_EQUAL(std::string("6ae83fc9c06ca253ada0b156d6e4700a4a028c34"), toHexString(aHash)); } |