[Libreoffice-commits] core.git: Branch 'libreoffice-6-4' - sax/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 6 13:15:50 UTC 2019


 sax/source/tools/fastserializer.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 35191846feb19751e247cd228d7dcc6ddfdf2c8b
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Thu Dec 5 11:42:59 2019 +0100
Commit:     László Németh <nemeth at numbertext.org>
CommitDate: Fri Dec 6 14:14:10 2019 +0100

    cleanup "tdf#117274 XLSX export: fix VML comment shape type id"
    
    Limit special MSO ID check for attribute values.
    
    Follow-up of commit c5d37d324cd6d17114c209de1862344ad58a1d93.
    
    Change-Id: I0f16b0df0c5575b799bb505a93c660c15b3273c5
    Reviewed-on: https://gerrit.libreoffice.org/84549
    Tested-by: Jenkins
    Reviewed-by: László Németh <nemeth at numbertext.org>
    (cherry picked from commit 579db0d2d3d2ddf5a5f8feaa2e7cc4dde81d7701)
    Reviewed-on: https://gerrit.libreoffice.org/84592

diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index cc7293a6a3f9..a362ff438383 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -130,9 +130,7 @@ namespace sax_fastparser {
         if (nLen == -1)
             nLen = pStr ? strlen(pStr) : 0;
 
-        if ( !bEscape ||
-            // tdf#127274 don't escape the special VML shape type id "#_x0000_t202"
-            (pStr && strcmp(pStr, "#_x0000_t202") == 0) )
+        if (!bEscape)
         {
             writeBytes( pStr, nLen );
             return;
@@ -465,7 +463,12 @@ namespace sax_fastparser {
 
             writeBytes(sEqualSignAndQuote, N_CHARS(sEqualSignAndQuote));
 
-            write(rAttrList.getFastAttributeValue(j), rAttrList.AttributeValueLength(j), true);
+            const char* pAttributeValue = rAttrList.getFastAttributeValue(j);
+
+            // tdf#127274 don't escape the special VML shape type id "#_x0000_t202"
+            bool bEscape = !(pAttributeValue && strcmp(pAttributeValue, "#_x0000_t202") == 0);
+
+            write(pAttributeValue, rAttrList.AttributeValueLength(j), bEscape);
 
             writeBytes(sQuote, N_CHARS(sQuote));
         }


More information about the Libreoffice-commits mailing list