summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2023-01-20 08:32:31 -0500
committerJustin Luth <jluth@mail.com>2023-02-11 16:08:35 +0000
commita942e6e5ecfdd9ff83fc7febb8234c8f0e2813db (patch)
treeba3a84e4816fc0df9cdb9bfa4077fee70ad72df8
parentf7afed99a807a9ce42edf84cab36a4710ddcd58e (diff)
assert commit looking for example document to test theory.
related tdf#125038 FORMTEXT/REF:fix spurious text outside IF field speculated that this should always return false, since the IF statement is not processed at all. However, there are no documents that match this condition in the existing unit tests, so a wider net is needed. Change-Id: I8a5a0fd077cc141abc5438cacd0de77fcfe7c476 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145931 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index d048d600f496..7f4c800b1002 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -292,11 +292,16 @@ static bool IsFieldNestingAllowed(const FieldContextPtr& pOuter, const FieldCont
case FIELD_IF:
case FIELD_MERGEFIELD:
case FIELD_REF:
+ case FIELD_PAGE:
+ case FIELD_NUMPAGES:
{
// LO does not currently know how to evaluate these as conditions or results
return false;
}
default:
+ SAL_WARN("writerfilter","found field["<<*pInner->GetFieldId()<<"] defined in FieldTypes.hxx");
+ assert(false && "looking for example documents using { IF } with fields for condition or result");
+ return false;
break;
}
break;