summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Krot <Serge.Krot@cib.de>2017-10-04 09:45:53 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2017-10-06 19:15:32 +0200
commitf4cbd31465d3737855e694b7341fb3bc063d63c4 (patch)
treef9da0af65df713440766c58d674e9b06a3a82d9a
parent4054051cd5aee8cbc6cd2b3384b4ab3d6b6a6ace (diff)
related tdf#66398 remove useless breaks
Change-Id: I39caad06bcd645d582c180195a839113759b57a1 Reviewed-on: https://gerrit.libreoffice.org/43159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--writerfilter/source/ooxml/factoryimpl.py5
-rw-r--r--writerfilter/source/ooxml/factoryimpl_ns.py6
2 files changed, 2 insertions, 9 deletions
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;
}
""")