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

Serge Krot Serge.Krot at cib.de
Fri Oct 6 17:16:04 UTC 2017


 writerfilter/source/ooxml/factoryimpl.py    |    5 ++---
 writerfilter/source/ooxml/factoryimpl_ns.py |    6 ------
 2 files changed, 2 insertions(+), 9 deletions(-)

New commits:
commit f4cbd31465d3737855e694b7341fb3bc063d63c4
Author: Serge Krot <Serge.Krot at cib.de>
Date:   Wed Oct 4 09:45:53 2017 +0200

    related tdf#66398 remove useless breaks
    
    Change-Id: I39caad06bcd645d582c180195a839113759b57a1
    Reviewed-on: https://gerrit.libreoffice.org/43159
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/writerfilter/source/ooxml/factoryimpl.py b/writerfilter/source/ooxml/factoryimpl.py
index 2168fff556d7..3605892fe71f 100644
--- a/writerfilter/source/ooxml/factoryimpl.py
+++ b/writerfilter/source/ooxml/factoryimpl.py
@@ -25,7 +25,7 @@ def createFastChildContextFromFactory(model):
 (OOXMLFastContextHandler* pHandler, OOXMLFactory_ns::Pointer_t pFactory, Token_t Element)
 {
     uno::Reference <xml::sax::XFastContextHandler> aResult;
-    Id nDefine = pHandler->getDefine();
+    const Id nDefine = pHandler->getDefine();
 
     if (pFactory.get() != NULL)
     {
@@ -33,7 +33,7 @@ def createFastChildContextFromFactory(model):
         Id nElementId;
         if (pFactory->getElementId(nDefine, Element, nResource, nElementId))
         {
-            Id nId = pFactory->getResourceId(nDefine, Element);
+            const Id nId = pFactory->getResourceId(nDefine, Element);
 
             switch (nResource)
             {""")
@@ -108,7 +108,6 @@ def fastTokenToId(model):
     print("""
 std::string fastTokenToId(sal_uInt32 nToken)
 {
-
     std::string sResult;
 #ifdef DEBUG_WRITERFILTER
 
diff --git a/writerfilter/source/ooxml/factoryimpl_ns.py b/writerfilter/source/ooxml/factoryimpl_ns.py
index 1134a14cb331..54e3b8c9060a 100644
--- a/writerfilter/source/ooxml/factoryimpl_ns.py
+++ b/writerfilter/source/ooxml/factoryimpl_ns.py
@@ -235,7 +235,6 @@ def printValueData(values):
                 output_else = "else "
             print("            else { return false; }")
             print("            return true;")
-            print("            break;")
     print("        }")
 
 
@@ -258,7 +257,6 @@ def factoryGetListValue(nsNode):
             appendValueData(values, valueData, idToLabel(valueNode.getAttribute("tokenid")))
         printValueData(values)
         print("        return false;")
-        print("        break;")
 
     print("""    default:
         break;
@@ -376,7 +374,6 @@ def factoryCreateElementMap(files, nsNode):
             print("        default: return false;")
             print("        }")
             print("        return true;")
-            print("        break;")
     print("    default:")
     print("        switch (nId)")
     print("        {")
@@ -384,10 +381,7 @@ def factoryCreateElementMap(files, nsNode):
     print("""        default: return false;
         }
         return true;
-        break;
     }
-
-    return false;
 }
 """)
 


More information about the Libreoffice-commits mailing list