summaryrefslogtreecommitdiff
path: root/vcl/qa
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-10-03 11:02:34 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-10-04 08:40:01 +0200
commitb68761f4a5cd22b48c3214c8be919cb4c84da241 (patch)
treed4939210d51101e560ec3d830f1ada3922e6d8dc /vcl/qa
parent9f9dec0679da48e49af09d8fa609955bca6db67b (diff)
pdfium: Support for InkStrokes and Vertices
This extends PDFium with getting InkStrokes and Vertices for annotations, which wasn't implemented before, and adds support to PDFium wrapper in LibreOffice. Change-Id: I570d53038a59ab830fcd5639583c75cf8adda86c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103885 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/qa')
-rw-r--r--vcl/qa/cppunit/PDFiumLibraryTest.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/PDFiumLibraryTest.cxx b/vcl/qa/cppunit/PDFiumLibraryTest.cxx
index 547c59872216..3fc4ba86a6c3 100644
--- a/vcl/qa/cppunit/PDFiumLibraryTest.cxx
+++ b/vcl/qa/cppunit/PDFiumLibraryTest.cxx
@@ -334,6 +334,10 @@ void PDFiumLibraryTest::testAnnotationsDifferentTypes()
CPPUNIT_ASSERT_EQUAL(0, pAnnotation->getObjectCount());
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
CPPUNIT_ASSERT_EQUAL(OUString("Freehand Text"), aContentsString);
+ CPPUNIT_ASSERT_EQUAL(size_t(1), pAnnotation->getInkStrokes().size());
+ auto const& aInkStrokes = pAnnotation->getInkStrokes();
+ auto const& aPoints = aInkStrokes[0];
+ CPPUNIT_ASSERT_EQUAL(size_t(74), aPoints.size());
}
{
@@ -353,6 +357,8 @@ void PDFiumLibraryTest::testAnnotationsDifferentTypes()
CPPUNIT_ASSERT_EQUAL(true, pAnnotation->hasKey("Vertices"));
OUString aContentsString = pAnnotation->getString(vcl::pdf::constDictionaryKeyContents);
CPPUNIT_ASSERT_EQUAL(OUString("Polygon Text"), aContentsString);
+ auto const& aVertices = pAnnotation->getVertices();
+ CPPUNIT_ASSERT_EQUAL(size_t(3), aVertices.size());
}
{