diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2020-06-20 08:43:58 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2020-06-22 08:13:31 +0200 |
commit | 51d529c18dadb05754590a01ce4c1f06f41cf412 (patch) | |
tree | 11f0e024fada00d11bc36399a5f2c3cbdc8b35a0 /sd | |
parent | d91dba41d283db9bc83789ca258b1a6001d761ae (diff) |
pdf export: support pop-up annotation for notes / comments
This changes pdf export for annotation, so the comments are
exported as "text" annotation with an child "pop-up" annotations.
This seems to be more common what PDF readers do (even when text
annotation only should be enough).
Also changes the test, so that it now works as expected.
Change-Id: I95bc12939f490effe7759dad54e136c44e44a2f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96765
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/SdrPdfImportTest.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sd/qa/unit/SdrPdfImportTest.cxx b/sd/qa/unit/SdrPdfImportTest.cxx index 4bbb24de4035..e8dd60b0a806 100644 --- a/sd/qa/unit/SdrPdfImportTest.cxx +++ b/sd/qa/unit/SdrPdfImportTest.cxx @@ -231,14 +231,13 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport) auto pPDFPage = pPDFDocument->openPage(0); CPPUNIT_ASSERT(pPDFPage); - // TODO: Should be 2 really - CPPUNIT_ASSERT_EQUAL(1, pPDFPage->getAnnotationCount()); + CPPUNIT_ASSERT_EQUAL(2, pPDFPage->getAnnotationCount()); auto pPDFAnnotation1 = pPDFPage->getAnnotation(0); CPPUNIT_ASSERT_EQUAL(1, pPDFAnnotation1->getSubType()); // Text annotation - //auto pPDFAnnotation2 = pPDFPage->getAnnotation(1); - //CPPUNIT_ASSERT_EQUAL(16, pPDFAnnotation2->getSubType()); // Pop-up annotation + auto pPDFAnnotation2 = pPDFPage->getAnnotation(1); + CPPUNIT_ASSERT_EQUAL(16, pPDFAnnotation2->getSubType()); // Pop-up annotation // Load document again mxComponent = loadFromDesktop(aTempFile.GetURL()); @@ -249,7 +248,7 @@ CPPUNIT_TEST_FIXTURE(SdrPdfImportTest, testAnnotationsImportExport) SdPage* pPage = pNewViewShell->GetActualPage(); CPPUNIT_ASSERT(pPage); - //CPPUNIT_ASSERT_EQUAL(false, pPage->getAnnotations().empty()); + CPPUNIT_ASSERT(!pPage->getAnnotations().empty()); } #endif // HAVE_FEATURE_PDFIUM |