xmloff/source/style/xmlexppr.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 4e509260aa892ae14b447d0f915f4875e9a1fc26
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Tue Apr 1 23:59:37 2025 +0200
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Wed Apr 2 09:42:55 2025 +0200

    tdf#165984 xmloff: don't export default end zone value "no-limit"
    
    They inherit the value of the hyphenation-zone or their
    ancestor (paragraph -> column -> page -> spread), so no need
    to export the default value "no-limit".
    
    Follow-up to commit 7d384fb1c232f7aa720436bc68dc1de334bf7297
    "tdf#165984 sw cui xmloff: add Paragraph/Column/Page/Spread end
    zone".
    
    Change-Id: I50a3bb9801402b000fe9861e592958a946953056
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183602
    Tested-by: Jenkins
    Reviewed-by: László Németh <nem...@numbertext.org>

diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 42170c371e4d..22b94995d683 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -941,6 +941,12 @@ sal_Int8 CheckExtendedNamespace(std::u16string_view 
sXMLAttributeName, std::u16s
              && (IsXMLToken(sValue, XML_PAGE_CONTENT_BOTTOM)
                  || IsXMLToken(sValue, XML_PAGE_CONTENT_TOP)))
         return nODFVersion & SvtSaveOptions::ODFSVER_EXTENDED ? 1 : -1;
+    // don't export end zones when they have the default no-limit value
+    else if (IsXMLToken(sXMLAttributeName, XML_HYPHENATION_ZONE_ALWAYS)
+        || IsXMLToken(sXMLAttributeName, XML_HYPHENATION_ZONE_COLUMN)
+        || IsXMLToken(sXMLAttributeName, XML_HYPHENATION_ZONE_PAGE)
+        || IsXMLToken(sXMLAttributeName, XML_HYPHENATION_ZONE_SPREAD))
+        return IsXMLToken(sValue, XML_NO_LIMIT) ? -1 : 1;
     return 0;
 }
 }

Reply via email to