summaryrefslogtreecommitdiff
path: root/vcl/qa/cppunit
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/qa/cppunit')
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport2.cxx28
1 files changed, 23 insertions, 5 deletions
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
index c3660e5a9c13..43e3e16ec034 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
@@ -804,8 +804,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testMultiPagePDF)
SvMemoryStream& rObjectStream = pStream->GetMemory();
rObjectStream.Seek(STREAM_SEEK_TO_BEGIN);
+ SvMemoryStream aUncompressed;
+ ZCodec aZCodec;
+ aZCodec.BeginCompression();
+ aZCodec.Decompress(rObjectStream, aUncompressed);
+ CPPUNIT_ASSERT(aZCodec.EndCompression());
+
// Just check that the size of the page stream is what is expected.
- CPPUNIT_ASSERT_EQUAL(sal_uInt64(230), rObjectStream.remainingSize());
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(1236), aUncompressed.Tell());
}
{ // embedded PDF page 2
@@ -833,8 +839,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testMultiPagePDF)
SvMemoryStream& rObjectStream = pStream->GetMemory();
rObjectStream.Seek(STREAM_SEEK_TO_BEGIN);
- // Just check that the size of the page stream is what is expected
- CPPUNIT_ASSERT_EQUAL(sal_uInt64(309), rObjectStream.remainingSize());
+ SvMemoryStream aUncompressed;
+ ZCodec aZCodec;
+ aZCodec.BeginCompression();
+ aZCodec.Decompress(rObjectStream, aUncompressed);
+ CPPUNIT_ASSERT(aZCodec.EndCompression());
+
+ // Just check that the size of the page stream is what is expected.
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(3911), aUncompressed.Tell());
}
{ // embedded PDF page 3
@@ -862,8 +874,14 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testMultiPagePDF)
SvMemoryStream& rObjectStream = pStream->GetMemory();
rObjectStream.Seek(STREAM_SEEK_TO_BEGIN);
- // Just check that the size of the page stream is what is expected
- CPPUNIT_ASSERT_EQUAL(sal_uInt64(193), rObjectStream.remainingSize());
+ SvMemoryStream aUncompressed;
+ ZCodec aZCodec;
+ aZCodec.BeginCompression();
+ aZCodec.Decompress(rObjectStream, aUncompressed);
+ CPPUNIT_ASSERT(aZCodec.EndCompression());
+
+ // Just check that the size of the page stream is what is expected.
+ CPPUNIT_ASSERT_EQUAL(sal_uInt64(373), aUncompressed.Tell());
}
#endif
}