summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-06 08:50:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-06 09:54:25 +0200
commit24eae7bd702f3f6dd790be7ac38ac16e9fe6a375 (patch)
tree56398264184709e84517c2e843aa3a0894cc1c51 /oox
parentfad919eb0d30b2303193e1c00ba765514957652c (diff)
clang-tidy performance-unnecessary-value-param
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8 Reviewed-on: https://gerrit.libreoffice.org/60068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/drawingml/textbodycontext.hxx2
-rw-r--r--oox/inc/drawingml/textbodypropertiescontext.hxx4
-rw-r--r--oox/source/drawingml/shape.cxx11
-rw-r--r--oox/source/drawingml/textbodycontext.cxx4
-rw-r--r--oox/source/drawingml/textbodypropertiescontext.cxx7
-rw-r--r--oox/source/export/vmlexport.cxx2
-rw-r--r--oox/source/ppt/layoutfragmenthandler.cxx2
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx3
-rw-r--r--oox/source/vml/vmlshapecontext.cxx26
9 files changed, 32 insertions, 29 deletions
diff --git a/oox/inc/drawingml/textbodycontext.hxx b/oox/inc/drawingml/textbodycontext.hxx
index 39ae7b8a1b59..577316258fec 100644
--- a/oox/inc/drawingml/textbodycontext.hxx
+++ b/oox/inc/drawingml/textbodycontext.hxx
@@ -32,7 +32,7 @@ class TextBodyContext final : public ::oox::core::ContextHandler2
{
public:
TextBodyContext( ::oox::core::ContextHandler2Helper const & rParent, TextBody& rTextBody );
- TextBodyContext( ::oox::core::ContextHandler2Helper const & rParent, ShapePtr pShapePtr );
+ TextBodyContext(::oox::core::ContextHandler2Helper const& rParent, const ShapePtr& pShapePtr);
virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
diff --git a/oox/inc/drawingml/textbodypropertiescontext.hxx b/oox/inc/drawingml/textbodypropertiescontext.hxx
index b6305866e014..7964f1546be6 100644
--- a/oox/inc/drawingml/textbodypropertiescontext.hxx
+++ b/oox/inc/drawingml/textbodypropertiescontext.hxx
@@ -34,8 +34,8 @@ public:
const ::oox::AttributeList& rAttributes,
TextBodyProperties& rTextBodyProp );
- TextBodyPropertiesContext( ::oox::core::ContextHandler2Helper const & rParent,
- const ::oox::AttributeList& rAttributes, ShapePtr pShapePtr );
+ TextBodyPropertiesContext(::oox::core::ContextHandler2Helper const& rParent,
+ const ::oox::AttributeList& rAttributes, const ShapePtr& pShapePtr);
virtual ::oox::core::ContextHandlerRef onCreateContext( ::sal_Int32 Element, const ::oox::AttributeList& rAttribs ) override;
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 2f7cd0722938..6b5f9ac79b0e 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -429,12 +429,11 @@ static inline SdrTextHorzAdjust lcl_convertAdjust( ParagraphAdjust eAdjust )
return SDRTEXTHORZADJUST_LEFT;
}
-static inline void lcl_createPresetShape( uno::Reference<drawing::XShape>& xShape,
- const OUString& rClass,
- const OUString& rPresetType,
- const CustomShapePropertiesPtr pCustomShapePropertiesPtr,
- const TextBodyPtr pTextBody,
- const GraphicHelper& rGraphicHelper )
+static inline void lcl_createPresetShape(uno::Reference<drawing::XShape>& xShape,
+ const OUString& rClass, const OUString& rPresetType,
+ const CustomShapePropertiesPtr& pCustomShapePropertiesPtr,
+ const TextBodyPtr& pTextBody,
+ const GraphicHelper& rGraphicHelper)
{
if (!xShape.is() || !pCustomShapePropertiesPtr || !pTextBody)
return;
diff --git a/oox/source/drawingml/textbodycontext.cxx b/oox/source/drawingml/textbodycontext.cxx
index 6279b129cf02..cbd1e420ee5a 100644
--- a/oox/source/drawingml/textbodycontext.cxx
+++ b/oox/source/drawingml/textbodycontext.cxx
@@ -164,8 +164,8 @@ TextBodyContext::TextBodyContext( ContextHandler2Helper const & rParent, TextBod
{
}
-TextBodyContext::TextBodyContext( ContextHandler2Helper const & rParent, ShapePtr pShapePtr )
-: TextBodyContext( rParent, *pShapePtr->getTextBody() )
+TextBodyContext::TextBodyContext(ContextHandler2Helper const& rParent, const ShapePtr& pShapePtr)
+ : TextBodyContext(rParent, *pShapePtr->getTextBody())
{
mpShapePtr = pShapePtr;
}
diff --git a/oox/source/drawingml/textbodypropertiescontext.cxx b/oox/source/drawingml/textbodypropertiescontext.cxx
index 6de4a0764cbd..9f1549c87126 100644
--- a/oox/source/drawingml/textbodypropertiescontext.cxx
+++ b/oox/source/drawingml/textbodypropertiescontext.cxx
@@ -49,9 +49,10 @@ using namespace ::com::sun::star::xml::sax;
namespace oox { namespace drawingml {
// CT_TextBodyProperties
-TextBodyPropertiesContext::TextBodyPropertiesContext( ContextHandler2Helper const & rParent,
- const AttributeList& rAttribs, ShapePtr pShapePtr )
-: TextBodyPropertiesContext( rParent, rAttribs, pShapePtr->getTextBody()->getTextProperties() )
+TextBodyPropertiesContext::TextBodyPropertiesContext(ContextHandler2Helper const& rParent,
+ const AttributeList& rAttribs,
+ const ShapePtr& pShapePtr)
+ : TextBodyPropertiesContext(rParent, rAttribs, pShapePtr->getTextBody()->getTextProperties())
{
mpShapePtr = pShapePtr;
}
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index a071c6d4ff12..e980c9a7d325 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -210,7 +210,7 @@ bool VMLExport::IsWaterMarkShape(const OUString& rStr)
return rStr.match("PowerPlusWaterMarkObject") || rStr.match("WordPictureWatermark");
}
-void VMLExport::OverrideShapeIDGen(bool bOverrideShapeIdGen, const OString sShapeIDPrefix)
+void VMLExport::OverrideShapeIDGen(bool bOverrideShapeIdGen, const OString& sShapeIDPrefix)
{
m_bOverrideShapeIdGeneration = bOverrideShapeIdGen;
if(bOverrideShapeIdGen)
diff --git a/oox/source/ppt/layoutfragmenthandler.cxx b/oox/source/ppt/layoutfragmenthandler.cxx
index e73a33e1d0c1..2f5f237dae90 100644
--- a/oox/source/ppt/layoutfragmenthandler.cxx
+++ b/oox/source/ppt/layoutfragmenthandler.cxx
@@ -42,7 +42,7 @@ namespace oox { namespace ppt {
// CT_SlideLayout
LayoutFragmentHandler::LayoutFragmentHandler(XmlFilterBase& rFilter, const OUString& rFragmentPath,
- SlidePersistPtr pMasterPersistPtr)
+ const SlidePersistPtr& pMasterPersistPtr)
: SlideFragmentHandler(rFilter, rFragmentPath, pMasterPersistPtr, Layout)
{
}
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index bb939fbaf70d..1ba3cdbd2e7e 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -159,7 +159,8 @@ void ResolveTextFields( XmlFilterBase const & rFilter )
}
}
-void PresentationFragmentHandler::saveThemeToGrabBag(oox::drawingml::ThemePtr pThemePtr, const OUString& sTheme)
+void PresentationFragmentHandler::saveThemeToGrabBag(const oox::drawingml::ThemePtr& pThemePtr,
+ const OUString& sTheme)
{
if (!pThemePtr)
return;
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index efeb188a42b5..eb78598274c5 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -452,11 +452,11 @@ void ShapeTypeContext::setStyle( const OUString& rStyle )
}
}
-ShapeContext::ShapeContext(ContextHandler2Helper const & rParent,
- std::shared_ptr<ShapeBase> pShape, const AttributeList& rAttribs)
- : ShapeTypeContext( rParent, pShape, rAttribs )
- , mrShape( *pShape )
- , mrShapeModel( pShape->getShapeModel() )
+ShapeContext::ShapeContext(ContextHandler2Helper const& rParent,
+ const std::shared_ptr<ShapeBase>& pShape, const AttributeList& rAttribs)
+ : ShapeTypeContext(rParent, pShape, rAttribs)
+ , mrShape(*pShape)
+ , mrShapeModel(pShape->getShapeModel())
{
// collect shape specific attributes
mrShapeModel.maType = rAttribs.getXString( XML_type, OUString() );
@@ -562,10 +562,11 @@ void ShapeContext::setVmlPath( const OUString& rPath )
mrShapeModel.maVmlPath = rPath;
}
-GroupShapeContext::GroupShapeContext(ContextHandler2Helper const & rParent,
- std::shared_ptr<GroupShape> pShape, const AttributeList& rAttribs)
- : ShapeContext( rParent, pShape, rAttribs )
- , mrShapes( pShape->getChildren() )
+GroupShapeContext::GroupShapeContext(ContextHandler2Helper const& rParent,
+ const std::shared_ptr<GroupShape>& pShape,
+ const AttributeList& rAttribs)
+ : ShapeContext(rParent, pShape, rAttribs)
+ , mrShapes(pShape->getChildren())
{
}
@@ -577,9 +578,10 @@ ContextHandlerRef GroupShapeContext::onCreateContext( sal_Int32 nElement, const
return xContext.get() ? xContext : ShapeContext::onCreateContext( nElement, rAttribs );
}
-RectangleShapeContext::RectangleShapeContext(ContextHandler2Helper const & rParent,
- const AttributeList& rAttribs, std::shared_ptr<RectangleShape> pShape)
- : ShapeContext( rParent, pShape, rAttribs )
+RectangleShapeContext::RectangleShapeContext(ContextHandler2Helper const& rParent,
+ const AttributeList& rAttribs,
+ const std::shared_ptr<RectangleShape>& pShape)
+ : ShapeContext(rParent, pShape, rAttribs)
{
}