[Libreoffice-commits] core.git: xmloff/source

Noel (via logerrit) logerrit at kemper.freedesktop.org
Fri Dec 4 20:19:26 UTC 2020


 xmloff/source/text/XMLTextMarkImportContext.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 9f8b7280903f2a0b0202bc7fbc4fd807cc78045e
Author:     Noel <noelgrandin at gmail.com>
AuthorDate: Fri Dec 4 15:51:33 2020 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Dec 4 21:18:45 2020 +0100

    no need to use GetLocalName here
    
    Change-Id: Iafd55f0a7d12c6833cae82d49350a5642b637764
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107224
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 7d53c7b5af4d..4aad5f380f70 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -166,7 +166,7 @@ void XMLTextMarkImportContext::startFastElement( sal_Int32 nElement,
         m_rHelper.pushFieldCtx( m_sBookmarkName, m_sFieldName );
     }
 
-    if (IsXMLToken(GetLocalName(), XML_BOOKMARK_START))
+    if ((nElement & TOKEN_MASK) == XML_BOOKMARK_START)
     {
         const OUString sHidden    = xAttrList->getOptionalValue(XML_ELEMENT(LO_EXT, XML_HIDDEN));
         const OUString sCondition = xAttrList->getOptionalValue(XML_ELEMENT(LO_EXT, XML_CONDITION));
@@ -241,12 +241,12 @@ static auto PopFieldmark(XMLTextImportHelper & rHelper) -> void
     }
 }
 
-void XMLTextMarkImportContext::endFastElement(sal_Int32 )
+void XMLTextMarkImportContext::endFastElement(sal_Int32 nElement)
 {
     static const char sAPI_bookmark[] = "com.sun.star.text.Bookmark";
 
     lcl_MarkType nTmp{};
-    if (!SvXMLUnitConverter::convertEnum(nTmp, GetLocalName(), lcl_aMarkTypeMap))
+    if (!SvXMLUnitConverter::convertEnum(nTmp, SvXMLImport::getNameFromToken(nElement), lcl_aMarkTypeMap))
         return;
 
     if (m_sBookmarkName.isEmpty() && TypeFieldmarkEnd != nTmp)


More information about the Libreoffice-commits mailing list