summaryrefslogtreecommitdiff
path: root/vcl/qa/cppunit/pdfexport
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-11-02 16:34:56 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2023-11-03 13:41:08 +0100
commit822a0c4fcd4607d5247b828c69728a510684a442 (patch)
treeb86dbb2877566d4b83a7b3a3b4d9cf11f4791c31 /vcl/qa/cppunit/pdfexport
parent3d15de525534197960e9a9c64eba3ad2153aa113 (diff)
tdf#157028 vcl: PDF export: inline OBJR dictionaries
There seems to be no reason why SE child OBJR dictionaries are separate objects, they could just be inline. Change-Id: I9e4fcdf56d9b7454325f9d3ef7ba55bdc090f948 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158838 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins
Diffstat (limited to 'vcl/qa/cppunit/pdfexport')
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport.cxx90
-rw-r--r--vcl/qa/cppunit/pdfexport/pdfexport2.cxx72
2 files changed, 81 insertions, 81 deletions
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport.cxx b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
index 9db3cf63f187..ef317e600ca5 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport.cxx
@@ -2064,19 +2064,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2129,19 +2129,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2193,19 +2193,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2257,19 +2257,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2321,19 +2321,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2448,19 +2448,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816Link)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2513,19 +2513,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816Link)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2600,19 +2600,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816Link)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2665,19 +2665,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest, testTdf157816Link)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
index bfdd1ae8ea31..f7f2557f0594 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
@@ -2346,7 +2346,7 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testSpans)
auto nRef(0);
for (size_t i = 0; i < vKids102101.size(); ++i)
{
- auto pKid = dynamic_cast<vcl::filter::PDFReferenceElement*>(vKids102101[i]);
+ auto pKid = dynamic_cast<vcl::filter::PDFDictionaryElement*>(vKids102101[i]);
if (pKid)
{
++nRef; // annotation
@@ -2815,19 +2815,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157397)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2886,19 +2886,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157397)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -2959,19 +2959,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157397)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -3039,19 +3039,19 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf157397)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType
+ = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
auto pAnnotRef
- = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
auto pAnnot = pAnnotRef->LookupObject();
auto pAType = dynamic_cast<vcl::filter::PDFNameElement*>(pAnnot->Lookup("Type"));
CPPUNIT_ASSERT_EQUAL(OString("Annot"), pAType->GetValue());
@@ -3534,18 +3534,18 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testMediaShapeAnnot)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
- auto pAnnotRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ auto pAnnotRef
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
CPPUNIT_ASSERT_EQUAL(pAnnot, pAnnotRef->LookupObject());
}
}
@@ -3651,18 +3651,18 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFlyFrameHyperlinkAnnot)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
- auto pAnnotRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ auto pAnnotRef
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
CPPUNIT_ASSERT_EQUAL(pAnnot, pAnnotRef->LookupObject());
}
}
@@ -3795,18 +3795,18 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testFormControlAnnot)
for (size_t i = 0; i < pKids->GetElements().size(); ++i)
{
auto pNum = dynamic_cast<vcl::filter::PDFNumberElement*>(pKids->GetElement(i));
- auto pRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pKids->GetElement(i));
+ auto pObjR = dynamic_cast<vcl::filter::PDFDictionaryElement*>(pKids->GetElement(i));
if (pNum)
{
++nMCID;
}
- if (pRef)
+ if (pObjR)
{
++nRef;
- auto pObjR = pRef->LookupObject();
- auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->Lookup("Type"));
+ auto pOType = dynamic_cast<vcl::filter::PDFNameElement*>(pObjR->LookupElement("Type"));
CPPUNIT_ASSERT_EQUAL(OString("OBJR"), pOType->GetValue());
- auto pAnnotRef = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->Lookup("Obj"));
+ auto pAnnotRef
+ = dynamic_cast<vcl::filter::PDFReferenceElement*>(pObjR->LookupElement("Obj"));
CPPUNIT_ASSERT_EQUAL(pAnnot, pAnnotRef->LookupObject());
}
}