summaryrefslogtreecommitdiff
path: root/sw/qa/core/text/text.cxx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-11-09 14:22:09 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-11-09 19:08:32 +0100
commit87dce617eb1cbbb650dda3e5dc557fa0a058e505 (patch)
treeee252c285326858fab6cd076b2ddcc10b5e94616 /sw/qa/core/text/text.cxx
parent7f8b79c21c3af20e443d487af0d40a36e611bda0 (diff)
UnoApiTest: factor out common code
Change-Id: I1d84d8c1e371016a4f4f068af1e9c76635f28cf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142490 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa/core/text/text.cxx')
-rw-r--r--sw/qa/core/text/text.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/sw/qa/core/text/text.cxx b/sw/qa/core/text/text.cxx
index 4127a3c1c108..d51f6c18f71c 100644
--- a/sw/qa/core/text/text.cxx
+++ b/sw/qa/core/text/text.cxx
@@ -128,7 +128,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testBibliographyUrlPdfExport)
save("writer_pdf_Export");
// Then make sure the field links the source.
- std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = LoadPdfFromTempFile();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
std::unique_ptr<vcl::pdf::PDFiumPage> pPdfPage = pPdfDocument->openPage(/*nIndex=*/0);
// Without the accompanying fix in place, this test would have failed, the field was not
// clickable (while it was clickable on the UI).
@@ -651,7 +651,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testContentControlPDF)
save("writer_pdf_Export");
// Then make sure that a fillable form widget is emitted:
- std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = LoadPdfFromTempFile();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -677,7 +677,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testCheckboxContentControlPDF)
save("writer_pdf_Export");
// Then make sure that a checkbox form widget is emitted:
- std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = LoadPdfFromTempFile();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -702,7 +702,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testDropdownContentControlPDF)
save("writer_pdf_Export");
// Then make sure that a dropdown form widget is emitted:
- std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = LoadPdfFromTempFile();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -727,7 +727,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testDateContentControlPDF)
save("writer_pdf_Export");
// Then make sure that a date form widget is emitted:
- std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = LoadPdfFromTempFile();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -756,7 +756,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testContentControlPDFFont)
save("writer_pdf_Export");
// Then make sure that the widget in the PDF result has that custom font size:
- std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = LoadPdfFromTempFile();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
pPage->onAfterLoadPage(pPdfDocument.get());
CPPUNIT_ASSERT_EQUAL(1, pPage->getAnnotationCount());
@@ -779,7 +779,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testComboContentControlPDF)
save("writer_pdf_Export");
// Then make sure that a combo box form widget is emitted:
- std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = LoadPdfFromTempFile();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1
@@ -816,7 +816,7 @@ CPPUNIT_TEST_FIXTURE(SwCoreTextTest, testRichContentControlPDF)
save("writer_pdf_Export");
// Then make sure that a single fillable form widget is emitted:
- std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = LoadPdfFromTempFile();
+ std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
std::unique_ptr<vcl::pdf::PDFiumPage> pPage = pPdfDocument->openPage(0);
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 1