diff options
Diffstat (limited to 'svx/qa/unit')
-rw-r--r-- | svx/qa/unit/core.cxx | 9 | ||||
-rw-r--r-- | svx/qa/unit/svdraw.cxx | 11 |
2 files changed, 2 insertions, 18 deletions
diff --git a/svx/qa/unit/core.cxx b/svx/qa/unit/core.cxx index e627215807d2..f834222ea009 100644 --- a/svx/qa/unit/core.cxx +++ b/svx/qa/unit/core.cxx @@ -47,16 +47,9 @@ CPPUNIT_TEST_FIXTURE(Test, testChartExportToPdf) maTempFile.GetURL()); // Then make sure we get a valid, non-empty PDF: - auto pPdfium = vcl::pdf::PDFiumLibrary::get(); - if (!pPdfium) - return; - SvMemoryStream aMemory; - aMemory.WriteStream(*maTempFile.GetStream(StreamMode::READ)); - std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument - = pPdfium->openDocument(aMemory.GetData(), aMemory.GetSize(), OString()); // Without the accompanying fix in place, this test would have failed, because the output was // empty (0 bytes). - CPPUNIT_ASSERT(pPdfDocument); + std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport(); int nPageCount = pPdfDocument->getPageCount(); CPPUNIT_ASSERT_GREATER(0, nPageCount); } diff --git a/svx/qa/unit/svdraw.cxx b/svx/qa/unit/svdraw.cxx index 4373d2b5d608..c1c8bc435a9a 100644 --- a/svx/qa/unit/svdraw.cxx +++ b/svx/qa/unit/svdraw.cxx @@ -497,16 +497,7 @@ CPPUNIT_TEST_FIXTURE(SvdrawTest, testPageViewDrawLayerClip) save("writer_pdf_Export"); // Then make sure that line shape gets clipped: - SvFileStream aFile(maTempFile.GetURL(), StreamMode::READ); - SvMemoryStream aMemory; - aMemory.WriteStream(aFile); - std::shared_ptr<vcl::pdf::PDFium> pPDFium = vcl::pdf::PDFiumLibrary::get(); - if (!pPDFium) - { - return; - } - std::unique_ptr<vcl::pdf::PDFiumDocument> pDoc - = pPDFium->openDocument(aMemory.GetData(), aMemory.GetSize(), OString()); + std::unique_ptr<vcl::pdf::PDFiumDocument> pDoc = parsePDFExport(); std::unique_ptr<vcl::pdf::PDFiumPage> pPage1 = pDoc->openPage(0); CPPUNIT_ASSERT_EQUAL(3, pPage1->getObjectCount()); std::unique_ptr<vcl::pdf::PDFiumPage> pPage2 = pDoc->openPage(1); |