summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-04-11 09:23:29 +0200
committerNoel Grandin <noel@peralex.com>2016-04-11 11:38:57 +0200
commit9f877f677346968774d4366f105114fe7f36dd69 (patch)
treed8fb1f3924b5956c8f693acb8df33ba9757f9dc1 /oox
parentb9d091e7d4eb3014aa6198f64f414702105b5aab (diff)
clang-tidy performance-unnecessary-value-param in oox
Change-Id: I1ac86906ea21c00f8d77834c94583be7d9e9974e
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/drawingml/chart/typegroupconverter.hxx2
-rw-r--r--oox/inc/drawingml/table/tablecell.hxx2
-rw-r--r--oox/inc/drawingml/table/tableproperties.hxx2
-rw-r--r--oox/source/core/xmlfilterbase.cxx20
-rw-r--r--oox/source/crypto/DocumentDecryption.cxx2
-rw-r--r--oox/source/drawingml/chart/typegroupconverter.cxx2
-rw-r--r--oox/source/drawingml/table/tablecell.cxx4
-rw-r--r--oox/source/drawingml/table/tableproperties.cxx6
-rw-r--r--oox/source/export/chartexport.cxx62
-rw-r--r--oox/source/export/drawingml.cxx60
-rw-r--r--oox/source/export/shapes.cxx60
-rw-r--r--oox/source/export/vmlexport.cxx2
-rw-r--r--oox/source/helper/grabbagstack.cxx2
-rw-r--r--oox/source/helper/propertymap.cxx10
-rw-r--r--oox/source/ole/vbaexport.cxx10
-rw-r--r--oox/source/ppt/pptshapegroupcontext.cxx2
-rw-r--r--oox/source/shape/ShapeFilterBase.cxx2
-rw-r--r--oox/source/shape/ShapeFilterBase.hxx2
-rw-r--r--oox/source/vml/vmlformatting.cxx2
-rw-r--r--oox/source/vml/vmltextbox.cxx2
20 files changed, 128 insertions, 128 deletions
diff --git a/oox/inc/drawingml/chart/typegroupconverter.hxx b/oox/inc/drawingml/chart/typegroupconverter.hxx
index 694d97fed960..c4fb0543f7ec 100644
--- a/oox/inc/drawingml/chart/typegroupconverter.hxx
+++ b/oox/inc/drawingml/chart/typegroupconverter.hxx
@@ -153,7 +153,7 @@ public:
/** Sets the passed OOXML marker style at the passed property set. */
void convertMarker( PropertySet& rPropSet, sal_Int32 nOoxSymbol, sal_Int32 nOoxSize,
- ModelRef< Shape > xShapeProps ) const;
+ const ModelRef< Shape >& xShapeProps ) const;
/** Sets the passed OOXML line smoothing at the passed property set. */
void convertLineSmooth( PropertySet& rPropSet, bool bOoxSmooth ) const;
/** Sets the passed OOXML bar 3D geometry at the passed property set. */
diff --git a/oox/inc/drawingml/table/tablecell.hxx b/oox/inc/drawingml/table/tablecell.hxx
index 5b7baf9928da..e936d0777cdc 100644
--- a/oox/inc/drawingml/table/tablecell.hxx
+++ b/oox/inc/drawingml/table/tablecell.hxx
@@ -73,7 +73,7 @@ public:
oox::drawingml::TextBodyPtr getTextBody(){ return mpTextBody; };
void pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase,
- ::oox::drawingml::TextListStylePtr pMasterTextListStyle,
+ const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle,
const css::uno::Reference < css::table::XCell >& rxCell,
const TableProperties& rTableProperties,
const TableStyle& rTable,
diff --git a/oox/inc/drawingml/table/tableproperties.hxx b/oox/inc/drawingml/table/tableproperties.hxx
index 5f49be8e1d23..cf4d0cd2afcf 100644
--- a/oox/inc/drawingml/table/tableproperties.hxx
+++ b/oox/inc/drawingml/table/tableproperties.hxx
@@ -53,7 +53,7 @@ public:
void pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBase,
const css::uno::Reference < css::beans::XPropertySet > & xPropSet,
- ::oox::drawingml::TextListStylePtr pMasterTextListStyle );
+ const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle );
private:
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index 5551dc06ccf8..29534d008937 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -209,7 +209,7 @@ XmlFilterBase::~XmlFilterBase()
mxImpl->maFastParser.setDocumentHandler( nullptr );
}
-void XmlFilterBase::checkDocumentProperties(Reference<XDocumentProperties> xDocProps)
+void XmlFilterBase::checkDocumentProperties(const Reference<XDocumentProperties>& xDocProps)
{
mbMSO2007 = false;
if (!xDocProps->getGenerator().startsWithIgnoreAsciiCase("Microsoft"))
@@ -508,7 +508,7 @@ OUString XmlFilterBase::addRelation( const Reference< XOutputStream >& rOutputSt
}
static void
-writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const OUString& sValue )
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const OUString& sValue )
{
pDoc->startElement( nXmlElement, FSEND );
pDoc->writeEscaped( sValue );
@@ -516,7 +516,7 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const OUString& sValue )
}
static void
-writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const sal_Int32 nValue )
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const sal_Int32 nValue )
{
pDoc->startElement( nXmlElement, FSEND );
pDoc->write( nValue );
@@ -524,7 +524,7 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const sal_Int32 nValue )
}
static void
-writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const util::DateTime& rTime )
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const util::DateTime& rTime )
{
if( rTime.Year == 0 )
return;
@@ -547,7 +547,7 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const util::DateTime& rTi
}
static void
-writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const Sequence< OUString >& aItems )
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const Sequence< OUString >& aItems )
{
if( aItems.getLength() == 0 )
return;
@@ -564,7 +564,7 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const Sequence< OUString
}
static void
-writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const LanguageTag& rLanguageTag )
+writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const LanguageTag& rLanguageTag )
{
// dc:language, Dublin Core recommends "such as RFC 4646", which is BCP 47
// and obsoleted by RFC 5646, see
@@ -574,7 +574,7 @@ writeElement( FSHelperPtr pDoc, sal_Int32 nXmlElement, const LanguageTag& rLangu
}
static void
-writeCoreProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProperties )
+writeCoreProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >& xProperties )
{
OUString sValue;
if( rSelf.getVersion() == oox::core::ISOIEC_29500_2008 )
@@ -621,7 +621,7 @@ writeCoreProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xPro
}
static void
-writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProperties )
+writeAppProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >& xProperties )
{
rSelf.addRelation(
"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",
@@ -716,7 +716,7 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp
}
static void
-writeCustomProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProperties )
+writeCustomProperties( XmlFilterBase& rSelf, const Reference< XDocumentProperties >& xProperties )
{
uno::Reference<beans::XPropertyAccess> xUserDefinedProperties( xProperties->getUserDefinedProperties(), uno::UNO_QUERY );
Sequence< PropertyValue > aprop( xUserDefinedProperties->getPropertyValues() );
@@ -800,7 +800,7 @@ writeCustomProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xP
pAppProps->endElement( XML_Properties );
}
-XmlFilterBase& XmlFilterBase::exportDocumentProperties( Reference< XDocumentProperties > xProperties )
+XmlFilterBase& XmlFilterBase::exportDocumentProperties( const Reference< XDocumentProperties >& xProperties )
{
if( xProperties.is() )
{
diff --git a/oox/source/crypto/DocumentDecryption.cxx b/oox/source/crypto/DocumentDecryption.cxx
index 8dcf4cadaa44..a57b5671063d 100644
--- a/oox/source/crypto/DocumentDecryption.cxx
+++ b/oox/source/crypto/DocumentDecryption.cxx
@@ -360,7 +360,7 @@ Sequence<NamedValue> DocumentDecryption::createEncryptionData(const OUString& rP
return aEncryptionData.getAsConstNamedValueList();
}
-bool DocumentDecryption::decrypt(Reference<XStream> xDocumentStream)
+bool DocumentDecryption::decrypt(const Reference<XStream>& xDocumentStream)
{
bool aResult = false;
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
index a4ddb2c996b9..ee1c0c45cc2d 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -446,7 +446,7 @@ void TypeGroupConverter::convertFromModel( const Reference< XDiagram >& rxDiagra
}
void TypeGroupConverter::convertMarker( PropertySet& rPropSet, sal_Int32 nOoxSymbol, sal_Int32 nOoxSize,
- ModelRef< Shape > xShapeProps ) const
+ const ModelRef< Shape >& xShapeProps ) const
{
if( !isSeriesFrameFormat() )
{
diff --git a/oox/source/drawingml/table/tablecell.cxx b/oox/source/drawingml/table/tablecell.cxx
index 47f41033b8e0..ce8ecbcbf212 100644
--- a/oox/source/drawingml/table/tablecell.cxx
+++ b/oox/source/drawingml/table/tablecell.cxx
@@ -180,9 +180,9 @@ void applyTableCellProperties( const Reference < css::table::XCell >& rxCell, co
xPropSet->setPropertyValue( "TextVerticalAdjust", Any( eVA ) );
}
-void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, ::oox::drawingml::TextListStylePtr pMasterTextListStyle,
+void TableCell::pushToXCell( const ::oox::core::XmlFilterBase& rFilterBase, const ::oox::drawingml::TextListStylePtr& pMasterTextListStyle,
const css::uno::Reference < css::table::XCell >& rxCell, const TableProperties& rTableProperties,
- const TableStyle& rTableStyle, sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow )
+ const TableStyle& rTableStyle, sal_Int32 nColumn, sal_Int32 nMaxColumn, sal_Int32 nRow, sal_Int32 nMaxRow )
{
TableStyle& rTable( const_cast< TableStyle& >( rTableStyle ) );
TableProperties& rProperties( const_cast< TableProperties& >( rTableProperties ) );
diff --git a/oox/source/drawingml/table/tableproperties.cxx b/oox/source/drawingml/table/tableproperties.cxx
index 048e4204ec34..2d45310d1aa7 100644
--- a/oox/source/drawingml/table/tableproperties.cxx
+++ b/oox/source/drawingml/table/tableproperties.cxx
@@ -52,7 +52,7 @@ TableProperties::~TableProperties()
{
}
-void CreateTableRows( uno::Reference< XTableRows > xTableRows, const std::vector< TableRow >& rvTableRows )
+void CreateTableRows( const uno::Reference< XTableRows >& xTableRows, const std::vector< TableRow >& rvTableRows )
{
if ( rvTableRows.size() > 1 )
xTableRows->insertByIndex( 0, rvTableRows.size() - 1 );
@@ -66,7 +66,7 @@ void CreateTableRows( uno::Reference< XTableRows > xTableRows, const std::vector
}
}
-void CreateTableColumns( Reference< XTableColumns > xTableColumns, const std::vector< sal_Int32 >& rvTableGrid )
+void CreateTableColumns( const Reference< XTableColumns >& xTableColumns, const std::vector< sal_Int32 >& rvTableGrid )
{
if ( rvTableGrid.size() > 1 )
xTableColumns->insertByIndex( 0, rvTableGrid.size() - 1 );
@@ -256,7 +256,7 @@ const TableStyle& TableProperties::getUsedTableStyle( const ::oox::core::XmlFilt
}
void TableProperties::pushToPropSet( const ::oox::core::XmlFilterBase& rFilterBase,
- const Reference < XPropertySet >& xPropSet, TextListStylePtr pMasterTextListStyle )
+ const Reference < XPropertySet >& xPropSet, const TextListStylePtr& pMasterTextListStyle )
{
uno::Reference< XColumnRowRange > xColumnRowRange(
xPropSet->getPropertyValue("Model"), uno::UNO_QUERY_THROW );
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index d88e940b5a15..b4a819c7c4db 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -736,8 +736,8 @@ void ChartExport::_ExportContent()
}
}
-void ChartExport::exportChartSpace( Reference< css::chart::XChartDocument > xChartDoc,
- bool bIncludeTable )
+void ChartExport::exportChartSpace( const Reference< css::chart::XChartDocument >& xChartDoc,
+ bool bIncludeTable )
{
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_chartSpace ),
@@ -775,7 +775,7 @@ void ChartExport::exportChartSpace( Reference< css::chart::XChartDocument > xCha
pFS->endElement( FSNS( XML_c, XML_chartSpace ) );
}
-void ChartExport::exportExternalData( Reference< css::chart::XChartDocument > xChartDoc )
+void ChartExport::exportExternalData( const Reference< css::chart::XChartDocument >& xChartDoc )
{
// Embedded external data is grab bagged for docx file hence adding export part of
// external data for docx files only.
@@ -825,7 +825,7 @@ void ChartExport::exportExternalData( Reference< css::chart::XChartDocument > xC
}
}
-void ChartExport::exportChart( Reference< css::chart::XChartDocument > xChartDoc )
+void ChartExport::exportChart( const Reference< css::chart::XChartDocument >& xChartDoc )
{
Reference< chart2::XChartDocument > xNewDoc( xChartDoc, uno::UNO_QUERY );
mxDiagram.set( xChartDoc->getDiagram() );
@@ -919,7 +919,7 @@ void ChartExport::exportChart( Reference< css::chart::XChartDocument > xChartDoc
pFS->endElement( FSNS( XML_c, XML_chart ) );
}
-void ChartExport::exportMissingValueTreatment(uno::Reference<beans::XPropertySet> xPropSet)
+void ChartExport::exportMissingValueTreatment(const uno::Reference<beans::XPropertySet>& xPropSet)
{
if (!xPropSet.is())
return;
@@ -952,7 +952,7 @@ void ChartExport::exportMissingValueTreatment(uno::Reference<beans::XPropertySet
FSEND);
}
-void ChartExport::exportLegend( Reference< css::chart::XChartDocument > xChartDoc )
+void ChartExport::exportLegend( const Reference< css::chart::XChartDocument >& xChartDoc )
{
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_legend ),
@@ -1066,7 +1066,7 @@ OString calcRotationValue(sal_Int32 nRotation)
}
-void ChartExport::exportTitle( Reference< XShape > xShape )
+void ChartExport::exportTitle( const Reference< XShape >& xShape )
{
OUString sText;
Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY );
@@ -1388,7 +1388,7 @@ void ChartExport::exportManualLayout(const css::chart2::RelativePosition& rPos,
pFS->endElement(FSNS(XML_c, XML_layout));
}
-void ChartExport::exportPlotAreaShapeProps( Reference< XPropertySet > xPropSet )
+void ChartExport::exportPlotAreaShapeProps( const Reference< XPropertySet >& xPropSet )
{
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_spPr ),
@@ -1400,7 +1400,7 @@ void ChartExport::exportPlotAreaShapeProps( Reference< XPropertySet > xPropSet )
pFS->endElement( FSNS( XML_c, XML_spPr ) );
}
-void ChartExport::exportFill( Reference< XPropertySet > xPropSet )
+void ChartExport::exportFill( const Reference< XPropertySet >& xPropSet )
{
if ( !GetProperty( xPropSet, "FillStyle" ) )
return;
@@ -1419,7 +1419,7 @@ void ChartExport::exportFill( Reference< XPropertySet > xPropSet )
}
}
-void ChartExport::exportBitmapFill( Reference< XPropertySet > xPropSet )
+void ChartExport::exportBitmapFill( const Reference< XPropertySet >& xPropSet )
{
if( xPropSet.is() )
{
@@ -1445,7 +1445,7 @@ void ChartExport::exportBitmapFill( Reference< XPropertySet > xPropSet )
}
}
-void ChartExport::exportGradientFill( Reference< XPropertySet > xPropSet )
+void ChartExport::exportGradientFill( const Reference< XPropertySet >& xPropSet )
{
if( xPropSet.is() )
{
@@ -1511,7 +1511,7 @@ void ChartExport::exportDataTable( )
}
}
-void ChartExport::exportAreaChart( Reference< chart2::XChartType > xChartType )
+void ChartExport::exportAreaChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
sal_Int32 nTypeId = XML_areaChart;
@@ -1528,7 +1528,7 @@ void ChartExport::exportAreaChart( Reference< chart2::XChartType > xChartType )
pFS->endElement( FSNS( XML_c, nTypeId ) );
}
-void ChartExport::exportBarChart( Reference< chart2::XChartType > xChartType )
+void ChartExport::exportBarChart( const Reference< chart2::XChartType >& xChartType )
{
sal_Int32 nTypeId = XML_barChart;
if( mbIs3DChart )
@@ -1619,7 +1619,7 @@ void ChartExport::exportBarChart( Reference< chart2::XChartType > xChartType )
pFS->endElement( FSNS( XML_c, nTypeId ) );
}
-void ChartExport::exportBubbleChart( Reference< chart2::XChartType > xChartType )
+void ChartExport::exportBubbleChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_bubbleChart ),
@@ -1642,7 +1642,7 @@ void ChartExport::exportBubbleChart( Reference< chart2::XChartType > xChartType
pFS->endElement( FSNS( XML_c, XML_bubbleChart ) );
}
-void ChartExport::exportDoughnutChart( Reference< chart2::XChartType > xChartType )
+void ChartExport::exportDoughnutChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_doughnutChart ),
@@ -1663,7 +1663,7 @@ void ChartExport::exportDoughnutChart( Reference< chart2::XChartType > xChartTyp
namespace {
-std::vector<Sequence<Reference<chart2::XDataSeries> > > splitDataSeriesByAxis(Reference< chart2::XChartType > xChartType)
+std::vector<Sequence<Reference<chart2::XDataSeries> > > splitDataSeriesByAxis(const Reference< chart2::XChartType >& xChartType)
{
std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitSeries;
std::map<sal_Int32, size_t> aMapAxisToIndex;
@@ -1704,7 +1704,7 @@ std::vector<Sequence<Reference<chart2::XDataSeries> > > splitDataSeriesByAxis(Re
}
-void ChartExport::exportLineChart( Reference< chart2::XChartType > xChartType )
+void ChartExport::exportLineChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
@@ -1747,7 +1747,7 @@ void ChartExport::exportLineChart( Reference< chart2::XChartType > xChartType )
}
}
-void ChartExport::exportPieChart( Reference< chart2::XChartType > xChartType )
+void ChartExport::exportPieChart( const Reference< chart2::XChartType >& xChartType )
{
sal_Int32 eChartType = getChartType( );
if(eChartType == chart::TYPEID_DOUGHNUT)
@@ -1779,7 +1779,7 @@ void ChartExport::exportPieChart( Reference< chart2::XChartType > xChartType )
pFS->endElement( FSNS( XML_c, nTypeId ) );
}
-void ChartExport::exportRadarChart( Reference< chart2::XChartType > xChartType)
+void ChartExport::exportRadarChart( const Reference< chart2::XChartType >& xChartType)
{
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_radarChart ),
@@ -1802,7 +1802,7 @@ void ChartExport::exportRadarChart( Reference< chart2::XChartType > xChartType)
pFS->endElement( FSNS( XML_c, XML_radarChart ) );
}
-void ChartExport::exportScatterChart( Reference< chart2::XChartType > xChartType )
+void ChartExport::exportScatterChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
std::vector<Sequence<Reference<chart2::XDataSeries> > > aSplitDataSeries = splitDataSeriesByAxis(xChartType);
@@ -1844,7 +1844,7 @@ void ChartExport::exportScatterChart( Reference< chart2::XChartType > xChartType
}
}
-void ChartExport::exportStockChart( Reference< chart2::XChartType > xChartType )
+void ChartExport::exportStockChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_stockChart ),
@@ -1893,7 +1893,7 @@ void ChartExport::exportHiLowLines()
pFS->endElement( FSNS( XML_c, XML_hiLowLines ) );
}
-void ChartExport::exportUpDownBars( Reference< chart2::XChartType > xChartType)
+void ChartExport::exportUpDownBars( const Reference< chart2::XChartType >& xChartType)
{
if(xChartType->getChartType() != "com.sun.star.chart2.CandleStickChartType")
return;
@@ -1940,7 +1940,7 @@ void ChartExport::exportUpDownBars( Reference< chart2::XChartType > xChartType)
}
}
-void ChartExport::exportSurfaceChart( Reference< chart2::XChartType > xChartType )
+void ChartExport::exportSurfaceChart( const Reference< chart2::XChartType >& xChartType )
{
FSHelperPtr pFS = GetFS();
sal_Int32 nTypeId = XML_surfaceChart;
@@ -1955,7 +1955,7 @@ void ChartExport::exportSurfaceChart( Reference< chart2::XChartType > xChartType
pFS->endElement( FSNS( XML_c, nTypeId ) );
}
-void ChartExport::exportAllSeries(Reference<chart2::XChartType> xChartType, bool& rPrimaryAxes)
+void ChartExport::exportAllSeries(const Reference<chart2::XChartType>& xChartType, bool& rPrimaryAxes)
{
Reference< chart2::XDataSeriesContainer > xDSCnt( xChartType, uno::UNO_QUERY );
if( ! xDSCnt.is())
@@ -1966,7 +1966,7 @@ void ChartExport::exportAllSeries(Reference<chart2::XChartType> xChartType, bool
exportSeries(xChartType, aSeriesSeq, rPrimaryAxes);
}
-void ChartExport::exportSeries( Reference<chart2::XChartType> xChartType,
+void ChartExport::exportSeries( const Reference<chart2::XChartType>& xChartType,
Sequence<Reference<chart2::XDataSeries> >& rSeriesSeq, bool& rPrimaryAxes )
{
OUString aLabelRole = xChartType->getRoleOfSequenceForSeriesLabel();
@@ -2373,7 +2373,7 @@ void ChartExport::exportSeriesValues( const Reference< chart2::data::XDataSequen
pFS->endElement( FSNS( XML_c, nValueType ) );
}
-void ChartExport::exportShapeProps( Reference< XPropertySet > xPropSet )
+void ChartExport::exportShapeProps( const Reference< XPropertySet >& xPropSet )
{
FSHelperPtr pFS = GetFS();
pFS->startElement( FSNS( XML_c, XML_spPr ),
@@ -2385,7 +2385,7 @@ void ChartExport::exportShapeProps( Reference< XPropertySet > xPropSet )
pFS->endElement( FSNS( XML_c, XML_spPr ) );
}
-void ChartExport::exportTextProps(Reference<XPropertySet> xPropSet)
+void ChartExport::exportTextProps(const Reference<XPropertySet>& xPropSet)
{
FSHelperPtr pFS = GetFS();
pFS->startElement(FSNS(XML_c, XML_txPr), FSEND);
@@ -2984,7 +2984,7 @@ const char* toOOXMLPlacement( sal_Int32 nPlacement )
}
void writeLabelProperties(
- FSHelperPtr pFS, const uno::Reference<beans::XPropertySet>& xPropSet, const LabelPlacementParam& rLabelParam )
+ const FSHelperPtr& pFS, const uno::Reference<beans::XPropertySet>& xPropSet, const LabelPlacementParam& rLabelParam )
{
if (!xPropSet.is())
return;
@@ -3244,7 +3244,7 @@ void ChartExport::exportGrouping( bool isBar )
FSEND );
}
-void ChartExport::exportTrendlines( Reference< chart2::XDataSeries > xSeries )
+void ChartExport::exportTrendlines( const Reference< chart2::XDataSeries >& xSeries )
{
FSHelperPtr pFS = GetFS();
Reference< chart2::XRegressionCurveContainer > xRegressionCurveContainer( xSeries, UNO_QUERY );
@@ -3396,7 +3396,7 @@ void ChartExport::exportTrendlines( Reference< chart2::XDataSeries > xSeries )
}
}
-void ChartExport::exportMarker(Reference< chart2::XDataSeries > xSeries)
+void ChartExport::exportMarker(const Reference< chart2::XDataSeries >& xSeries)
{
Reference< XPropertySet > xPropSet( xSeries, uno::UNO_QUERY );
chart2::Symbol aSymbol;
@@ -3579,7 +3579,7 @@ Reference< chart2::data::XDataSequence> getLabeledSequence(
}
-void ChartExport::exportErrorBar(Reference< XPropertySet> xErrorBarProps, bool bYError)
+void ChartExport::exportErrorBar(const Reference< XPropertySet>& xErrorBarProps, bool bYError)
{
sal_Int32 nErrorBarStyle = cssc::ErrorBarStyle::NONE;
xErrorBarProps->getPropertyValue("ErrorBarStyle") >>= nErrorBarStyle;
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 16f4cb67b84d..dd9266975290 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -131,7 +131,7 @@ void DrawingML::ResetCounters()
maWdpCache.clear();
}
-bool DrawingML::GetProperty( Reference< XPropertySet > rXPropertySet, const OUString& aName )
+bool DrawingML::GetProperty( const Reference< XPropertySet >& rXPropertySet, const OUString& aName )
{
try
{
@@ -146,7 +146,7 @@ bool DrawingML::GetProperty( Reference< XPropertySet > rXPropertySet, const OUSt
return false;
}
-bool DrawingML::GetPropertyAndState( Reference< XPropertySet > rXPropertySet, Reference< XPropertyState > rXPropertyState, const OUString& aName, PropertyState& eState )
+bool DrawingML::GetPropertyAndState( const Reference< XPropertySet >& rXPropertySet, const Reference< XPropertyState >& rXPropertyState, const OUString& aName, PropertyState& eState )
{
try
{
@@ -245,7 +245,7 @@ void DrawingML::WriteSolidFill( const OUString& sSchemeName, const Sequence< Pro
mpFS->endElementNS( XML_a, XML_solidFill );
}
-void DrawingML::WriteSolidFill( Reference< XPropertySet > rXPropSet )
+void DrawingML::WriteSolidFill( const Reference< XPropertySet >& rXPropSet )
{
// get fill color
if ( !GetProperty( rXPropSet, "FillColor" ) )
@@ -347,7 +347,7 @@ bool DrawingML::EqualGradients( awt::Gradient aGradient1, awt::Gradient aGradien
aGradient1.StepCount == aGradient2.StepCount;
}
-void DrawingML::WriteGradientFill( Reference< XPropertySet > rXPropSet )
+void DrawingML::WriteGradientFill( const Reference< XPropertySet >& rXPropSet )
{
awt::Gradient aGradient;
if( GETA( FillGradient ) )
@@ -485,7 +485,7 @@ void DrawingML::WriteGradientFill( awt::Gradient rGradient )
}
}
-void DrawingML::WriteLineArrow( Reference< XPropertySet > rXPropSet, bool bLineStart )
+void DrawingML::WriteLineArrow( const Reference< XPropertySet >& rXPropSet, bool bLineStart )
{
ESCHER_LineEnd eLineEnd;
sal_Int32 nArrowLength;
@@ -556,7 +556,7 @@ void DrawingML::WriteLineArrow( Reference< XPropertySet > rXPropSet, bool bLineS
}
}
-void DrawingML::WriteOutline( Reference<XPropertySet> rXPropSet )
+void DrawingML::WriteOutline( const Reference<XPropertySet>& rXPropSet )
{
drawing::LineStyle aLineStyle( drawing::LineStyle_NONE );
@@ -943,7 +943,7 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
return sRelId;
}
-OUString DrawingML::WriteBlip( Reference< XPropertySet > rXPropSet, const OUString& rURL, bool bRelPathToMedia, const Graphic *pGraphic )
+OUString DrawingML::WriteBlip( const Reference< XPropertySet >& rXPropSet, const OUString& rURL, bool bRelPathToMedia, const Graphic *pGraphic )
{
OUString sRelId;
BitmapChecksum nChecksum = 0;
@@ -985,7 +985,7 @@ OUString DrawingML::WriteBlip( Reference< XPropertySet > rXPropSet, const OUStri
return sRelId;
}
-void DrawingML::WriteBlipMode( Reference< XPropertySet > rXPropSet, const OUString& rURL )
+void DrawingML::WriteBlipMode( const Reference< XPropertySet >& rXPropSet, const OUString& rURL )
{
BitmapMode eBitmapMode( BitmapMode_NO_REPEAT );
if (GetProperty( rXPropSet, "FillBitmapMode" ) )
@@ -1006,7 +1006,7 @@ void DrawingML::WriteBlipMode( Reference< XPropertySet > rXPropSet, const OUStri
}
}
-void DrawingML::WriteBlipOrNormalFill( Reference< XPropertySet > xPropSet, const OUString& rURLPropName )
+void DrawingML::WriteBlipOrNormalFill( const Reference< XPropertySet >& xPropSet, const OUString& rURLPropName )
{
// check for blip and otherwise fall back to normal fill
// we always store normal fill properties but OOXML
@@ -1017,12 +1017,12 @@ void DrawingML::WriteBlipOrNormalFill( Reference< XPropertySet > xPropSet, const
WriteFill(xPropSet);
}
-void DrawingML::WriteBlipFill( Reference< XPropertySet > rXPropSet, const OUString& sURLPropName )
+void DrawingML::WriteBlipFill( const Reference< XPropertySet >& rXPropSet, const OUString& sURLPropName )
{
WriteBlipFill( rXPropSet, sURLPropName, XML_a );
}
-void DrawingML::WriteBlipFill( Reference< XPropertySet > rXPropSet, const OUString& sURLPropName, sal_Int32 nXmlNamespace )
+void DrawingML::WriteBlipFill( const Reference< XPropertySet >& rXPropSet, const OUString& sURLPropName, sal_Int32 nXmlNamespace )
{
if ( GetProperty( rXPropSet, sURLPropName ) )
{
@@ -1035,7 +1035,7 @@ void DrawingML::WriteBlipFill( Reference< XPropertySet > rXPropSet, const OUStri
}
}
-void DrawingML::WriteBlipFill( Reference< XPropertySet > rXPropSet, const OUString& sBitmapURL, sal_Int32 nXmlNamespace, bool bWriteMode, bool bRelPathToMedia )
+void DrawingML::WriteBlipFill( const Reference< XPropertySet >& rXPropSet, const OUString& sBitmapURL, sal_Int32 nXmlNamespace, bool bWriteMode, bool bRelPathToMedia )
{
if ( !sBitmapURL.isEmpty() )
{
@@ -1061,7 +1061,7 @@ void DrawingML::WriteBlipFill( Reference< XPropertySet > rXPropSet, const OUStri
}
}
-void DrawingML::WritePattFill( Reference< XPropertySet > rXPropSet )
+void DrawingML::WritePattFill( const Reference< XPropertySet >& rXPropSet )
{
if ( GetProperty( rXPropSet, "FillHatch" ) )
{
@@ -1083,7 +1083,7 @@ void DrawingML::WritePattFill( Reference< XPropertySet > rXPropSet )
}
}
-void DrawingML::WriteSrcRect( Reference< XPropertySet > rXPropSet, const OUString& rURL )
+void DrawingML::WriteSrcRect( const Reference< XPropertySet >& rXPropSet, const OUString& rURL )
{
GraphicObject aGraphicObject = GraphicObject::CreateGraphicObjectFromURL(rURL);
Size aOriginalSize = aGraphicObject.GetPrefSize();
@@ -1110,7 +1110,7 @@ void DrawingML::WriteSrcRect( Reference< XPropertySet > rXPropSet, const OUStrin
}
}
-void DrawingML::WriteStretch( css::uno::Reference< css::beans::XPropertySet > rXPropSet, const OUString& rURL )
+void DrawingML::WriteStretch( const css::uno::Reference< css::beans::XPropertySet >& rXPropSet, const OUString& rURL )
{
mpFS->startElementNS( XML_a, XML_stretch, FSEND );
@@ -1164,7 +1164,7 @@ void DrawingML::WriteTransformation( const Rectangle& rRect,
mpFS->endElementNS( nXmlNamespace, XML_xfrm );
}
-void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, bool bSuppressRotation )
+void DrawingML::WriteShapeTransformation( const Reference< XShape >& rXShape, sal_Int32 nXmlNamespace, bool bFlipH, bool bFlipV, bool bSuppressRotation )
{
SAL_INFO("oox.shape", "write shape transformation");
@@ -1204,7 +1204,7 @@ void DrawingML::WriteShapeTransformation( Reference< XShape > rXShape, sal_Int32
WriteTransformation( Rectangle( Point( aPos.X, aPos.Y ), Size( aSize.Width, aSize.Height ) ), nXmlNamespace, bFlipH, bFlipV, OOX_DRAWINGML_EXPORT_ROTATE_CLOCKWISIFY(nRotation) );
}
-void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsField, sal_Int32 nElement /*= XML_rPr*/, bool bCheckDirect/* = true */)
+void DrawingML::WriteRunProperties( const Reference< XPropertySet >& rRun, bool bIsField, sal_Int32 nElement /*= XML_rPr*/, bool bCheckDirect/* = true */)
{
Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
Reference< XPropertyState > rXPropState( rRun, UNO_QUERY );
@@ -1465,7 +1465,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, bool bIsFiel
mpFS->endElementNS( XML_a, nElement );
}
-OUString DrawingML::GetFieldValue( css::uno::Reference< css::text::XTextRange > rRun, bool& bIsURLField )
+OUString DrawingML::GetFieldValue( const css::uno::Reference< css::text::XTextRange >& rRun, bool& bIsURLField )
{
Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
OUString aFieldType, aFieldValue;
@@ -1579,7 +1579,7 @@ OString DrawingML::GetUUID()
return OString(str, SAL_N_ELEMENTS(str));
}
-void DrawingML::WriteRun( Reference< XTextRange > rRun )
+void DrawingML::WriteRun( const Reference< XTextRange >& rRun )
{
Reference< XPropertySet > rXPropSet( rRun, UNO_QUERY );
sal_Int16 nLevel = -1;
@@ -1681,7 +1681,7 @@ OUString GetAutoNumType(sal_Int16 nNumberingType, bool bSDot, bool bPBehind, boo
return OUString();
}
-void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sal_Int16 nLevel )
+void DrawingML::WriteParagraphNumbering( const Reference< XPropertySet >& rXPropSet, sal_Int16 nLevel )
{
if( nLevel < 0 || !GETA( NumberingRules ) )
return;
@@ -1842,7 +1842,7 @@ void DrawingML::WriteParagraphNumbering( Reference< XPropertySet > rXPropSet, sa
}
}
-sal_Int32 DrawingML::getBulletMarginIndentation (Reference< XPropertySet > rXPropSet,sal_Int16 nLevel, const OUString& propName)
+sal_Int32 DrawingML::getBulletMarginIndentation (const Reference< XPropertySet >& rXPropSet,sal_Int16 nLevel, const OUString& propName)
{
if( nLevel < 0 || !GETA( NumberingRules ) )
return 0;
@@ -1917,7 +1917,7 @@ void DrawingML::WriteLinespacing( LineSpacing& rSpacing )
}
}
-void DrawingML::WriteParagraphProperties( Reference< XTextContent > rParagraph )
+void DrawingML::WriteParagraphProperties( const Reference< XTextContent >& rParagraph )
{
Reference< XPropertySet > rXPropSet( rParagraph, UNO_QUERY );
Reference< XPropertyState > rXPropState( rParagraph, UNO_QUERY );
@@ -1991,7 +1991,7 @@ void DrawingML::WriteParagraphProperties( Reference< XTextContent > rParagraph )
}
}
-void DrawingML::WriteParagraph( Reference< XTextContent > rParagraph )
+void DrawingML::WriteParagraph( const Reference< XTextContent >& rParagraph )
{
Reference< XEnumerationAccess > access( rParagraph, UNO_QUERY );
if( !access.is() )
@@ -2026,7 +2026,7 @@ void DrawingML::WriteParagraph( Reference< XTextContent > rParagraph )
mpFS->endElementNS( XML_a, XML_p );
}
-void DrawingML::WriteText( Reference< XInterface > rXIface, const OUString& presetWarp, bool bBodyPr, bool bText, sal_Int32 nXmlNamespace )
+void DrawingML::WriteText( const Reference< XInterface >& rXIface, const OUString& presetWarp, bool bBodyPr, bool bText, sal_Int32 nXmlNamespace )
{
Reference< XText > xXText( rXIface, UNO_QUERY );
Reference< XPropertySet > rXPropSet( rXIface, UNO_QUERY );
@@ -2277,7 +2277,7 @@ void DrawingML::WritePresetShape( const char* pShape, MSO_SPT eShapeType, bool b
mpFS->endElementNS( XML_a, XML_prstGeom );
}
-void DrawingML::WriteCustomGeometry( Reference< XShape > rXShape )
+void DrawingML::WriteCustomGeometry( const Reference< XShape >& rXShape )
{
uno::Reference< beans::XPropertySet > aXPropSet;
uno::Any aAny( rXShape->queryInterface(cppu::UnoType<beans::XPropertySet>::get()));
@@ -2651,7 +2651,7 @@ sax_fastparser::FSHelperPtr DrawingML::CreateOutputStream (
return p;
}
-void DrawingML::WriteFill( Reference< XPropertySet > xPropSet )
+void DrawingML::WriteFill( const Reference< XPropertySet >& xPropSet )
{
if ( !GetProperty( xPropSet, "FillStyle" ) )
return;
@@ -2718,7 +2718,7 @@ void DrawingML::WriteStyleProperties( sal_Int32 nTokenId, const Sequence< Proper
}
}
-void DrawingML::WriteShapeStyle( Reference< XPropertySet > xPropSet )
+void DrawingML::WriteShapeStyle( const Reference< XPropertySet >& xPropSet )
{
// check existence of the grab bag
if ( !GetProperty( xPropSet, "InteropGrabBag" ) )
@@ -2926,7 +2926,7 @@ void DrawingML::WriteShapeEffect( const OUString& sName, const Sequence< Propert
}
}
-void DrawingML::WriteShapeEffects( Reference< XPropertySet > rXPropSet )
+void DrawingML::WriteShapeEffects( const Reference< XPropertySet >& rXPropSet )
{
if( !GetProperty( rXPropSet, "InteropGrabBag" ) )
return;
@@ -2985,7 +2985,7 @@ void DrawingML::WriteShapeEffects( Reference< XPropertySet > rXPropSet )
mpFS->endElementNS(XML_a, XML_effectLst);
}
-void DrawingML::WriteShape3DEffects( Reference< XPropertySet > xPropSet )
+void DrawingML::WriteShape3DEffects( const Reference< XPropertySet >& xPropSet )
{
// check existence of the grab bag
if( !GetProperty( xPropSet, "InteropGrabBag" ) )
@@ -3270,7 +3270,7 @@ void DrawingML::WriteShape3DEffects( Reference< XPropertySet > xPropSet )
mpFS->endElementNS( XML_a, XML_sp3d );
}
-void DrawingML::WriteArtisticEffect( Reference< XPropertySet > rXPropSet )
+void DrawingML::WriteArtisticEffect( const Reference< XPropertySet >& rXPropSet )
{
if( !GetProperty( rXPropSet, "InteropGrabBag" ) )
return;
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index f8339025d11f..ea5cc61e2eb4 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -374,7 +374,7 @@ ShapeExport::ShapeExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, ShapeHashMap
mpURLTransformer.reset(new URLTransformer);
}
-void ShapeExport::SetURLTranslator(std::shared_ptr<URLTransformer> pTransformer)
+void ShapeExport::SetURLTranslator(const std::shared_ptr<URLTransformer>& pTransformer)
{
mpURLTransformer = pTransformer;
}
@@ -390,7 +390,7 @@ awt::Size ShapeExport::MapSize( const awt::Size& rSize ) const
return awt::Size( aRetSize.Width(), aRetSize.Height() );
}
-bool ShapeExport::NonEmptyText( Reference< XInterface > xIface )
+bool ShapeExport::NonEmptyText( const Reference< XInterface >& xIface )
{
Reference< XPropertySet > xPropSet( xIface, UNO_QUERY );
@@ -431,7 +431,7 @@ bool ShapeExport::NonEmptyText( Reference< XInterface > xIface )
return false;
}
-ShapeExport& ShapeExport::WriteBezierShape( Reference< XShape > xShape, bool bClosed )
+ShapeExport& ShapeExport::WriteBezierShape( const Reference< XShape >& xShape, bool bClosed )
{
SAL_INFO("oox.shape", "write open bezier shape");
@@ -484,17 +484,17 @@ ShapeExport& ShapeExport::WriteBezierShape( Reference< XShape > xShape, bool bCl
return *this;
}
-ShapeExport& ShapeExport::WriteClosedBezierShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteClosedBezierShape( const Reference< XShape >& xShape )
{
return WriteBezierShape( xShape, true );
}
-ShapeExport& ShapeExport::WriteOpenBezierShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteOpenBezierShape( const Reference< XShape >& xShape )
{
return WriteBezierShape( xShape, false );
}
-ShapeExport& ShapeExport::WriteGroupShape(uno::Reference<drawing::XShape> xShape)
+ShapeExport& ShapeExport::WriteGroupShape(const uno::Reference<drawing::XShape>& xShape)
{
FSHelperPtr pFS = GetFS();
bool bToplevel = !m_xParent.is();
@@ -613,7 +613,7 @@ static bool lcl_IsOnWhitelist(OUString& rShapeType)
}
-ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
{
SAL_INFO("oox.shape", "write custom shape");
@@ -785,7 +785,7 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape )
return *this;
}
-ShapeExport& ShapeExport::WriteEllipseShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteEllipseShape( const Reference< XShape >& xShape )
{
SAL_INFO("oox.shape", "write ellipse shape");
@@ -830,14 +830,14 @@ ShapeExport& ShapeExport::WriteEllipseShape( Reference< XShape > xShape )
return *this;
}
-ShapeExport& ShapeExport::WriteGraphicObjectShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteGraphicObjectShape( const Reference< XShape >& xShape )
{
WriteGraphicObjectShapePart( xShape );
return *this;
}
-void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const Graphic* pGraphic )
+void ShapeExport::WriteGraphicObjectShapePart( const Reference< XShape >& xShape, const Graphic* pGraphic )
{
SAL_INFO("oox.shape", "write graphic object shape");
@@ -932,7 +932,7 @@ void ShapeExport::WriteGraphicObjectShapePart( Reference< XShape > xShape, const
pFS->endElementNS( mnXmlNamespace, XML_pic );
}
-ShapeExport& ShapeExport::WriteConnectorShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteConnectorShape( const Reference< XShape >& xShape )
{
bool bFlipH = false;
bool bFlipV = false;
@@ -1023,7 +1023,7 @@ ShapeExport& ShapeExport::WriteConnectorShape( Reference< XShape > xShape )
return *this;
}
-ShapeExport& ShapeExport::WriteLineShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteLineShape( const Reference< XShape >& xShape )
{
bool bFlipH = false;
bool bFlipV = false;
@@ -1081,7 +1081,7 @@ ShapeExport& ShapeExport::WriteLineShape( Reference< XShape > xShape )
return *this;
}
-ShapeExport& ShapeExport::WriteNonVisualDrawingProperties( Reference< XShape > xShape, const char* pName )
+ShapeExport& ShapeExport::WriteNonVisualDrawingProperties( const Reference< XShape >& xShape, const char* pName )
{
GetFS()->singleElementNS( mnXmlNamespace, XML_cNvPr,
XML_id, I32S( GetNewShapeID( xShape ) ),
@@ -1091,13 +1091,13 @@ ShapeExport& ShapeExport::WriteNonVisualDrawingProperties( Reference< XShape > x
return *this;
}
-ShapeExport& ShapeExport::WriteNonVisualProperties( Reference< XShape > )
+ShapeExport& ShapeExport::WriteNonVisualProperties( const Reference< XShape >& )
{
// Override to generate //nvPr elements.
return *this;
}
-ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteRectangleShape( const Reference< XShape >& xShape )
{
SAL_INFO("oox.shape", "write rectangle shape");
@@ -1152,7 +1152,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
return *this;
}
-typedef ShapeExport& (ShapeExport::*ShapeConverter)( Reference< XShape > );
+typedef ShapeExport& (ShapeExport::*ShapeConverter)( const Reference< XShape >& );
typedef std::unordered_map< const char*, ShapeConverter, rtl::CStringHash, rtl::CStringEqual> NameToConvertMapType;
static const NameToConvertMapType& lcl_GetConverters(DocumentType eDocumentType)
@@ -1195,7 +1195,7 @@ static const NameToConvertMapType& lcl_GetConverters(DocumentType eDocumentType)
return shape_converters;
}
-ShapeExport& ShapeExport::WriteShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteShape( const Reference< XShape >& xShape )
{
OUString sShapeType = xShape->getShapeType();
SAL_INFO("oox.shape", "write shape: " << sShapeType);
@@ -1210,7 +1210,7 @@ ShapeExport& ShapeExport::WriteShape( Reference< XShape > xShape )
return *this;
}
-ShapeExport& ShapeExport::WriteTextBox( Reference< XInterface > xIface, sal_Int32 nXmlNamespace )
+ShapeExport& ShapeExport::WriteTextBox( const Reference< XInterface >& xIface, sal_Int32 nXmlNamespace )
{
// In case this shape has an associated textbox, then export that, and we're done.
if (GetDocumentType() == DOCUMENT_DOCX && GetTextExport())
@@ -1244,7 +1244,7 @@ ShapeExport& ShapeExport::WriteTextBox( Reference< XInterface > xIface, sal_Int3
return *this;
}
-void ShapeExport::WriteTable( Reference< XShape > rXShape )
+void ShapeExport::WriteTable( const Reference< XShape >& rXShape )
{
OSL_TRACE("write table");
@@ -1436,7 +1436,7 @@ void ShapeExport::WriteTable( Reference< XShape > rXShape )
mpFS->endElementNS( XML_a, XML_graphic );
}
-void ShapeExport::WriteTableCellProperties(Reference< XPropertySet> xCellPropSet)
+void ShapeExport::WriteTableCellProperties(const Reference< XPropertySet>& xCellPropSet)
{
sal_Int32 nLeftMargin(0), nRightMargin(0);
@@ -1459,7 +1459,7 @@ void ShapeExport::WriteTableCellProperties(Reference< XPropertySet> xCellPropSet
mpFS->endElementNS( XML_a, XML_tcPr );
}
-void ShapeExport::WriteTableCellBorders(Reference< XPropertySet> xCellPropSet)
+void ShapeExport::WriteTableCellBorders(const Reference< XPropertySet>& xCellPropSet)
{
BorderLine2 aBorderLine;
@@ -1523,7 +1523,7 @@ void ShapeExport::WriteTableCellBorders(Reference< XPropertySet> xCellPropSet)
}
}
-ShapeExport& ShapeExport::WriteTableShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteTableShape( const Reference< XShape >& xShape )
{
FSHelperPtr pFS = GetFS();
@@ -1554,7 +1554,7 @@ ShapeExport& ShapeExport::WriteTableShape( Reference< XShape > xShape )
return *this;
}
-ShapeExport& ShapeExport::WriteTextShape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteTextShape( const Reference< XShape >& xShape )
{
FSHelperPtr pFS = GetFS();
@@ -1640,7 +1640,7 @@ void ShapeExport::WriteMathShape(Reference<XShape> const& xShape)
mpFS->endElementNS(XML_mc, XML_AlternateContent);
}
-ShapeExport& ShapeExport::WriteOLE2Shape( Reference< XShape > xShape )
+ShapeExport& ShapeExport::WriteOLE2Shape( const Reference< XShape >& xShape )
{
Reference< XPropertySet > xPropSet( xShape, UNO_QUERY );
if (!xPropSet.is())
@@ -1842,23 +1842,23 @@ ShapeExport& ShapeExport::WriteOLE2Shape( Reference< XShape > xShape )
return *this;
}
-ShapeExport& ShapeExport::WriteUnknownShape( Reference< XShape > )
+ShapeExport& ShapeExport::WriteUnknownShape( const Reference< XShape >& )
{
// Override this method to do something useful.
return *this;
}
-size_t ShapeExport::ShapeHash::operator()( const Reference < XShape > rXShape ) const
+size_t ShapeExport::ShapeHash::operator()( const Reference < XShape >& rXShape ) const
{
return rXShape->getShapeType().hashCode();
}
-sal_Int32 ShapeExport::GetNewShapeID( const Reference< XShape > rXShape )
+sal_Int32 ShapeExport::GetNewShapeID( const Reference< XShape >& rXShape )
{
return GetNewShapeID( rXShape, GetFB() );
}
-sal_Int32 ShapeExport::GetNewShapeID( const Reference< XShape > rXShape, XmlFilterBase* pFB )
+sal_Int32 ShapeExport::GetNewShapeID( const Reference< XShape >& rXShape, XmlFilterBase* pFB )
{
if( !rXShape.is() )
return -1;
@@ -1870,12 +1870,12 @@ sal_Int32 ShapeExport::GetNewShapeID( const Reference< XShape > rXShape, XmlFilt
return nID;
}
-sal_Int32 ShapeExport::GetShapeID( const Reference< XShape > rXShape )
+sal_Int32 ShapeExport::GetShapeID( const Reference< XShape >& rXShape )
{
return GetShapeID( rXShape, mpShapeMap );
}
-sal_Int32 ShapeExport::GetShapeID( const Reference< XShape > rXShape, ShapeHashMap* pShapeMap )
+sal_Int32 ShapeExport::GetShapeID( const Reference< XShape >& rXShape, ShapeHashMap* pShapeMap )
{
if( !rXShape.is() )
return -1;
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index 9c069e9a2304..6597aca2b4c2 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -68,7 +68,7 @@ VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr pSerializer, VMLTextExport*
memset( m_pShapeTypeWritten, 0, ESCHER_ShpInst_COUNT * sizeof( bool ) );
}
-void VMLExport::SetFS( ::sax_fastparser::FSHelperPtr pSerializer )
+void VMLExport::SetFS( const ::sax_fastparser::FSHelperPtr& pSerializer )
{
m_pSerializer = pSerializer;
}
diff --git a/oox/source/helper/grabbagstack.cxx b/oox/source/helper/grabbagstack.cxx
index 71bea8e26bea..fdae712d00e8 100644
--- a/oox/source/helper/grabbagstack.cxx
+++ b/oox/source/helper/grabbagstack.cxx
@@ -43,7 +43,7 @@ PropertyValue GrabBagStack::getRootProperty()
return aProperty;
}
-void GrabBagStack::appendElement(const OUString& aName, Any aAny)
+void GrabBagStack::appendElement(const OUString& aName, const Any& aAny)
{
PropertyValue aValue;
aValue.Name = aName;
diff --git a/oox/source/helper/propertymap.cxx b/oox/source/helper/propertymap.cxx
index 1e9cf8e01b18..82860c380f10 100644
--- a/oox/source/helper/propertymap.cxx
+++ b/oox/source/helper/propertymap.cxx
@@ -286,7 +286,7 @@ Reference< XPropertySet > PropertyMap::makePropertySet() const
}
#if OSL_DEBUG_LEVEL > 0
-static void lclDumpAnyValue( Any value)
+static void lclDumpAnyValue( const Any& value)
{
OUString strValue;
Sequence< OUString > strArray;
@@ -449,7 +449,7 @@ static void lclDumpAnyValue( Any value)
}
#ifdef DBG_UTIL
-void PropertyMap::dump( Reference< XPropertySet > rXPropSet )
+void PropertyMap::dump( const Reference< XPropertySet >& rXPropSet )
{
Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
Sequence< Property > props = info->getProperties ();
@@ -552,7 +552,7 @@ static void printParameterPairData(int level, EnhancedCustomShapeParameterPair &
fprintf (stderr, "}");
}
-static const char* lclDumpAnyValueCode( Any value, int level = 0)
+static const char* lclDumpAnyValueCode( const Any& value, int level = 0)
{
OUString strValue;
Sequence< OUString > strArray;
@@ -899,7 +899,7 @@ static const char* lclDumpAnyValueCode( Any value, int level = 0)
return "";
}
-void PropertyMap::dumpCode( Reference< XPropertySet > rXPropSet )
+void PropertyMap::dumpCode( const Reference< XPropertySet >& rXPropSet )
{
Reference< XPropertySetInfo > info = rXPropSet->getPropertySetInfo ();
Sequence< Property > props = info->getProperties ();
@@ -928,7 +928,7 @@ void PropertyMap::dumpCode( Reference< XPropertySet > rXPropSet )
}
}
-void PropertyMap::dumpData(Reference<XPropertySet> xPropertySet)
+void PropertyMap::dumpData(const Reference<XPropertySet>& xPropertySet)
{
Reference<XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo();
Sequence<Property> aProperties = xPropertySetInfo->getProperties();
diff --git a/oox/source/ole/vbaexport.cxx b/oox/source/ole/vbaexport.cxx
index 2041d50e1bef..35833dc24eec 100644
--- a/oox/source/ole/vbaexport.cxx
+++ b/oox/source/ole/vbaexport.cxx
@@ -73,7 +73,7 @@ void exportUTF16String(SvStream& rStrm, const OUString& rString)
}
}
-bool isWorkbook(css::uno::Reference<css::uno::XInterface> xInterface)
+bool isWorkbook(const css::uno::Reference<css::uno::XInterface>& xInterface)
{
css::uno::Reference<ooo::vba::excel::XWorkbook> xWorkbook(xInterface, css::uno::UNO_QUERY);
return xWorkbook.is();
@@ -762,7 +762,7 @@ void writePROJECTMODULE(SvStream& rStrm, const OUString& name, const sal_uInt16
}
// section 2.3.4.2.3
-void writePROJECTMODULES(SvStream& rStrm, css::uno::Reference<css::container::XNameContainer> xNameContainer, const std::vector<sal_Int32>& rLibrayMap)
+void writePROJECTMODULES(SvStream& rStrm, const css::uno::Reference<css::container::XNameContainer>& xNameContainer, const std::vector<sal_Int32>& rLibrayMap)
{
css::uno::Sequence<OUString> aElementNames = xNameContainer->getElementNames();
sal_Int32 n = aElementNames.getLength();
@@ -785,7 +785,7 @@ void writePROJECTMODULES(SvStream& rStrm, css::uno::Reference<css::container::XN
}
// section 2.3.4.2
-void exportDirStream(SvStream& rStrm, css::uno::Reference<css::container::XNameContainer> xNameContainer, const std::vector<sal_Int32>& rLibraryMap, const OUString& projectName)
+void exportDirStream(SvStream& rStrm, const css::uno::Reference<css::container::XNameContainer>& xNameContainer, const std::vector<sal_Int32>& rLibraryMap, const OUString& projectName)
{
SvMemoryStream aDirStream(4096, 4096);
@@ -867,7 +867,7 @@ void exportVBAProjectStream(SvStream& rStrm)
}
// section 2.3.1 PROJECT Stream
-void exportPROJECTStream(SvStream& rStrm, css::uno::Reference<css::container::XNameContainer> xNameContainer,
+void exportPROJECTStream(SvStream& rStrm, const css::uno::Reference<css::container::XNameContainer>& xNameContainer,
const OUString& projectName, const std::vector<sal_Int32>& rLibraryMap)
{
css::uno::Sequence<OUString> aElementNames = xNameContainer->getElementNames();
@@ -992,7 +992,7 @@ void exportPROJECTwmStream(SvStream& rStrm, const css::uno::Sequence<OUString>&
rStrm.WriteUInt16(0x0000); // terminator
}
-void getCorrectExportOrder(css::uno::Reference<css::container::XNameContainer> xNameContainer, std::vector<sal_Int32>& rLibraryMap)
+void getCorrectExportOrder(const css::uno::Reference<css::container::XNameContainer>& xNameContainer, std::vector<sal_Int32>& rLibraryMap)
{
css::uno::Sequence<OUString> aElementNames = xNameContainer->getElementNames();
sal_Int32 n = aElementNames.getLength();
diff --git a/oox/source/ppt/pptshapegroupcontext.cxx b/oox/source/ppt/pptshapegroupcontext.cxx
index d7337b1b8a56..b2acee7e84bb 100644
--- a/oox/source/ppt/pptshapegroupcontext.cxx
+++ b/oox/source/ppt/pptshapegroupcontext.cxx
@@ -138,7 +138,7 @@ void PPTShapeGroupContext::importExtDrawings( )
}
}
-void PPTShapeGroupContext::applyFontRefColor(oox::drawingml::ShapePtr pShape, const oox::drawingml::Color& rFontRefColor)
+void PPTShapeGroupContext::applyFontRefColor(const oox::drawingml::ShapePtr& pShape, const oox::drawingml::Color& rFontRefColor)
{
pShape->getShapeStyleRefs()[XML_fontRef].maPhClr = rFontRefColor;
std::vector< oox::drawingml::ShapePtr >& vChildren = pShape->getChildren();
diff --git a/oox/source/shape/ShapeFilterBase.cxx b/oox/source/shape/ShapeFilterBase.cxx
index 9071715cb24a..efe8e1f202e9 100644
--- a/oox/source/shape/ShapeFilterBase.cxx
+++ b/oox/source/shape/ShapeFilterBase.cxx
@@ -42,7 +42,7 @@ const ::oox::drawingml::Theme* ShapeFilterBase::getCurrentTheme() const
return mpTheme.get();
}
-void ShapeFilterBase::setCurrentTheme(::oox::drawingml::ThemePtr pTheme)
+void ShapeFilterBase::setCurrentTheme(const ::oox::drawingml::ThemePtr& pTheme)
{
mpTheme = pTheme;
}
diff --git a/oox/source/shape/ShapeFilterBase.hxx b/oox/source/shape/ShapeFilterBase.hxx
index 61ecc8c0ecb7..a99c90c239ba 100644
--- a/oox/source/shape/ShapeFilterBase.hxx
+++ b/oox/source/shape/ShapeFilterBase.hxx
@@ -44,7 +44,7 @@ public:
/** Has to be implemented by each filter, returns the current theme. */
virtual const ::oox::drawingml::Theme* getCurrentTheme() const override;
- void setCurrentTheme(::oox::drawingml::ThemePtr pTheme);
+ void setCurrentTheme(const ::oox::drawingml::ThemePtr& pTheme);
/** Has to be implemented by each filter to return the collection of VML shapes. */
virtual ::oox::vml::Drawing* getVmlDrawing() override;
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index 1d1dedbe0b65..73452ec21145 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -853,7 +853,7 @@ beans::PropertyValue lcl_createTextpathProps()
return aRet;
}
-void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, uno::Reference<drawing::XShape> xShape) const
+void TextpathModel::pushToPropMap(ShapePropertyMap& rPropMap, const uno::Reference<drawing::XShape>& xShape) const
{
if (moString.has())
{
diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx
index 09b87b397edf..395bf1e3c1ea 100644
--- a/oox/source/vml/vmltextbox.cxx
+++ b/oox/source/vml/vmltextbox.cxx
@@ -73,7 +73,7 @@ OUString TextBox::getText() const
return aBuffer.makeStringAndClear();
}
-void TextBox::convert(uno::Reference<drawing::XShape> xShape) const
+void TextBox::convert(const uno::Reference<drawing::XShape>& xShape) const
{
uno::Reference<text::XTextAppend> xTextAppend(xShape, uno::UNO_QUERY);
for (PortionVector::const_iterator aIt = maPortions.begin(), aEnd = maPortions.end(); aIt != aEnd; ++aIt)