writerfilter/source/dmapper/DomainMapper_Impl.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit a942e6e5ecfdd9ff83fc7febb8234c8f0e2813db
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Fri Jan 20 08:32:31 2023 -0500
Commit:     Justin Luth <jl...@mail.com>
CommitDate: Sat Feb 11 16:08:35 2023 +0000

    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 <jl...@mail.com>

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;

Reply via email to