summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-09-28 23:40:14 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-09-29 07:47:59 +0200
commitc74d97f1218a3592226a4fae4d4c1941dabe4f7a (patch)
tree6d03a9abe602435a6bd5140150dbd5b812fc2643
parent100dc387ffd7df84199dae51abd9de35440905f1 (diff)
oox: avoid else after return in WpgContext
It's less code and does the same. Change-Id: I9b08f5b5c982bbf3740d7d5d04156ae01d878705 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140718 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--oox/source/shape/WpgContext.cxx26
1 files changed, 11 insertions, 15 deletions
diff --git a/oox/source/shape/WpgContext.cxx b/oox/source/shape/WpgContext.cxx
index 8d83758b7316..339e7a70eac5 100644
--- a/oox/source/shape/WpgContext.cxx
+++ b/oox/source/shape/WpgContext.cxx
@@ -50,15 +50,13 @@ oox::core::ContextHandlerRef WpgContext::onCreateContext(sal_Int32 nElementToken
return new oox::shape::WpsContext(*this, uno::Reference<drawing::XShape>(), mpShape,
pShape);
}
- else
- {
- // Don't set default character height, Writer has its own way to set
- // the default, and if we don't set it here, editeng properly inherits
- // it.
- oox::drawingml::ShapePtr pShape = std::make_shared<oox::drawingml::Shape>(
- "com.sun.star.drawing.CustomShape", /*bDefaultHeight=*/false);
- return new oox::drawingml::ShapeContext(*this, mpShape, pShape);
- }
+
+ // Don't set default character height, Writer has its own way to set
+ // the default, and if we don't set it here, editeng properly inherits
+ // it.
+ oox::drawingml::ShapePtr pShape = std::make_shared<oox::drawingml::Shape>(
+ "com.sun.star.drawing.CustomShape", /*bDefaultHeight=*/false);
+ return new oox::drawingml::ShapeContext(*this, mpShape, pShape);
}
case XML_pic:
return new oox::drawingml::GraphicShapeContext(
@@ -72,12 +70,10 @@ oox::core::ContextHandlerRef WpgContext::onCreateContext(sal_Int32 nElementToken
pWPGShape->setFullWPGSupport(m_bFullWPGSupport);
return pWPGShape;
}
- else
- {
- return new oox::drawingml::ShapeGroupContext(
- *this, mpShape,
- std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GroupShape"));
- }
+
+ return new oox::drawingml::ShapeGroupContext(
+ *this, mpShape,
+ std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GroupShape"));
}
case XML_graphicFrame:
{