diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-09 10:11:00 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-09 12:41:09 +0000 |
commit | 5a308b1239a09417507b0d05090ff2d3418d5133 (patch) | |
tree | 990fa9015a4107e4916691eb4dee80fa5713e96b /xmloff | |
parent | c1a227600d0b16df283162d24f1a31f5c9cee474 (diff) |
V801: Decreased performance
Change-Id: Iba139ede7bd72e23c0b7a28a8a4ff38ea816725a
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/inc/xmlversion.hxx | 4 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLAxisContext.cxx | 14 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLExport.cxx | 58 | ||||
-rw-r--r-- | xmloff/source/chart/SchXMLImport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/core/SettingsExportHelper.cxx | 10 | ||||
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/forms/formlayerexport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/forms/layerexport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/forms/layerexport.hxx | 2 | ||||
-rw-r--r-- | xmloff/source/meta/xmlversion.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/style/xmlimppr.cxx | 4 | ||||
-rw-r--r-- | xmloff/source/text/txtparae.cxx | 20 | ||||
-rw-r--r-- | xmloff/source/xforms/xformsapi.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/xforms/xformsapi.hxx | 2 |
14 files changed, 68 insertions, 68 deletions
diff --git a/xmloff/inc/xmlversion.hxx b/xmloff/inc/xmlversion.hxx index c1b3e17e3446..bb5ef953873a 100644 --- a/xmloff/inc/xmlversion.hxx +++ b/xmloff/inc/xmlversion.hxx @@ -38,7 +38,7 @@ private: const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& maVersions; public: XMLVersionListExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rContext, const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions, const OUString &rFileName, com::sun::star::uno::Reference< com::sun::star::xml::sax::XDocumentHandler > &rHandler ); @@ -67,7 +67,7 @@ protected: public: XMLVersionListImport( - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rContext, com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions ); virtual ~XMLVersionListImport() throw(); diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 079dbb6cb0b4..502ef0838965 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -86,7 +86,7 @@ class DateScaleContext : public SvXMLImportContext public: DateScaleContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, - const Reference< beans::XPropertySet > xAxisProps ); + const Reference< beans::XPropertySet >& rAxisProps ); virtual ~DateScaleContext(); virtual void StartElement( const Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ) SAL_OVERRIDE; @@ -122,10 +122,10 @@ SchXMLAxisContext::SchXMLAxisContext( SchXMLImportHelper& rImpHelper, SchXMLAxisContext::~SchXMLAxisContext() {} -static Reference< chart::XAxis > lcl_getChartAxis(const SchXMLAxis& rCurrentAxis, const Reference< chart::XDiagram > xDiagram ) +static Reference< chart::XAxis > lcl_getChartAxis(const SchXMLAxis& rCurrentAxis, const Reference< chart::XDiagram >& rDiagram ) { Reference< chart::XAxis > xAxis; - Reference< chart::XAxisSupplier > xAxisSuppl( xDiagram, uno::UNO_QUERY ); + Reference< chart::XAxisSupplier > xAxisSuppl( rDiagram, uno::UNO_QUERY ); if( !xAxisSuppl.is() ) return xAxis; if( rCurrentAxis.nAxisIndex == 0 ) @@ -713,12 +713,12 @@ void SchXMLAxisContext::EndElement() namespace { -Reference< chart2::XAxis > lcl_getAxis( const Reference< chart2::XCoordinateSystem > xCooSys, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) +Reference< chart2::XAxis > lcl_getAxis( const Reference< chart2::XCoordinateSystem >& rCooSys, sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex ) { Reference< chart2::XAxis > xAxis; try { - xAxis = xCooSys->getAxisByDimension( nDimensionIndex, nAxisIndex ); + xAxis = rCooSys->getAxisByDimension( nDimensionIndex, nAxisIndex ); } catch( uno::Exception & ) { @@ -884,9 +884,9 @@ DateScaleContext::DateScaleContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, - const Reference< beans::XPropertySet > xAxisProps ) : + const Reference< beans::XPropertySet >& rAxisProps ) : SvXMLImportContext( rImport, nPrefix, rLocalName ), - m_xAxisProps( xAxisProps ) + m_xAxisProps( rAxisProps ) { } diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index e5eec219988a..9b80507d1927 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -198,12 +198,12 @@ public: const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, bool bExportContent ); void exportAxis( enum XMLTokenEnum eDimension, enum XMLTokenEnum eAxisName, - const Reference< beans::XPropertySet > xAxisProps, const Reference< chart2::XAxis >& xChart2Axis, + const Reference< beans::XPropertySet >& rAxisProps, const Reference< chart2::XAxis >& rChart2Axis, const OUString& rCategoriesRanges, bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid, bool bExportContent ); - void exportGrid( const Reference< beans::XPropertySet > xGridProperties, bool bMajor, bool bExportContent ); - void exportDateScale( const Reference< beans::XPropertySet > xAxisProps ); - void exportAxisTitle( const Reference< beans::XPropertySet > xTitleProps, bool bExportContent ); + void exportGrid( const Reference< beans::XPropertySet >& rGridProperties, bool bMajor, bool bExportContent ); + void exportDateScale( const Reference< beans::XPropertySet >& rAxisProps ); + void exportAxisTitle( const Reference< beans::XPropertySet >& rTitleProps, bool bExportContent ); void exportSeries( const com::sun::star::uno::Reference< com::sun::star::chart2::XDiagram > & xNewDiagram, @@ -961,13 +961,13 @@ void lcl_exportNumberFormat( const OUString& rPropertyName, const Reference< bea return aResult; } -bool lcl_exportDomainForThisSequence( const Reference< chart2::data::XDataSequence > xValues, OUString& rFirstRangeForThisDomainIndex, SvXMLExport& rExport ) +bool lcl_exportDomainForThisSequence( const Reference< chart2::data::XDataSequence >& rValues, OUString& rFirstRangeForThisDomainIndex, SvXMLExport& rExport ) { bool bDomainExported = false; - if( xValues.is()) + if( rValues.is()) { Reference< chart2::XChartDocument > xNewDoc( rExport.GetModel(), uno::UNO_QUERY ); - OUString aRange( lcl_ConvertRange( xValues->getSourceRangeRepresentation(), xNewDoc ) ); + OUString aRange( lcl_ConvertRange( rValues->getSourceRangeRepresentation(), xNewDoc ) ); //work around error in OOo 2.0 (problems with multiple series having a domain element) if( rFirstRangeForThisDomainIndex.isEmpty() || !aRange.equals(rFirstRangeForThisDomainIndex) ) @@ -2156,13 +2156,13 @@ namespace } } -void SchXMLExportHelper_Impl::exportDateScale( const Reference< beans::XPropertySet > xAxisProps ) +void SchXMLExportHelper_Impl::exportDateScale( const Reference< beans::XPropertySet >& rAxisProps ) { - if( !xAxisProps.is() ) + if( !rAxisProps.is() ) return; chart::TimeIncrement aIncrement; - if( (xAxisProps->getPropertyValue("TimeIncrement") >>= aIncrement) ) + if( (rAxisProps->getPropertyValue("TimeIncrement") >>= aIncrement) ) { sal_Int32 nTimeResolution = ::com::sun::star::chart::TimeUnit::DAY; if( aIncrement.TimeResolution >>= nTimeResolution ) @@ -2187,19 +2187,19 @@ void SchXMLExportHelper_Impl::exportDateScale( const Reference< beans::XProperty } } -void SchXMLExportHelper_Impl::exportAxisTitle( const Reference< beans::XPropertySet > xTitleProps, bool bExportContent ) +void SchXMLExportHelper_Impl::exportAxisTitle( const Reference< beans::XPropertySet >& rTitleProps, bool bExportContent ) { - if( !xTitleProps.is() ) + if( !rTitleProps.is() ) return; - std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( xTitleProps ); + std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( rTitleProps ); if( bExportContent ) { OUString aText; - Any aAny( xTitleProps->getPropertyValue( + Any aAny( rTitleProps->getPropertyValue( OUString( "String" ))); aAny >>= aText; - Reference< drawing::XShape > xShape( xTitleProps, uno::UNO_QUERY ); + Reference< drawing::XShape > xShape( rTitleProps, uno::UNO_QUERY ); if( xShape.is()) addPosition( xShape ); @@ -2216,11 +2216,11 @@ void SchXMLExportHelper_Impl::exportAxisTitle( const Reference< beans::XProperty aPropertyStates.clear(); } -void SchXMLExportHelper_Impl::exportGrid( const Reference< beans::XPropertySet > xGridProperties, bool bMajor, bool bExportContent ) +void SchXMLExportHelper_Impl::exportGrid( const Reference< beans::XPropertySet >& rGridProperties, bool bMajor, bool bExportContent ) { - if( !xGridProperties.is() ) + if( !rGridProperties.is() ) return; - std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( xGridProperties ); + std::vector< XMLPropertyState > aPropertyStates = mxExpPropMapper->Filter( rGridProperties ); if( bExportContent ) { AddAutoStyleAttribute( aPropertyStates ); @@ -2238,17 +2238,17 @@ namespace { //returns true if a date scale needs to be exported -bool lcl_exportAxisType( const Reference< chart2::XAxis > xChart2Axis, SvXMLExport& rExport) +bool lcl_exportAxisType( const Reference< chart2::XAxis >& rChart2Axis, SvXMLExport& rExport) { bool bExportDateScale = false; - if( !xChart2Axis.is() ) + if( !rChart2Axis.is() ) return bExportDateScale; const SvtSaveOptions::ODFDefaultVersion nCurrentODFVersion( SvtSaveOptions().GetODFDefaultVersion() ); if( nCurrentODFVersion <= SvtSaveOptions::ODFVER_012 )//do not export to ODF 1.2 or older return bExportDateScale; - chart2::ScaleData aScale( xChart2Axis->getScaleData() ); + chart2::ScaleData aScale( rChart2Axis->getScaleData() ); //#i25706#todo: change namespace for next ODF version sal_uInt16 nNameSpace = XML_NAMESPACE_CHART_EXT; @@ -2306,8 +2306,8 @@ void disableLinkedNumberFormat( void SchXMLExportHelper_Impl::exportAxis( enum XMLTokenEnum eDimension, enum XMLTokenEnum eAxisName, - const Reference< beans::XPropertySet > xAxisProps, - const Reference< chart2::XAxis >& xChart2Axis, + const Reference< beans::XPropertySet >& rAxisProps, + const Reference< chart2::XAxis >& rChart2Axis, const OUString& rCategoriesRange, bool bHasTitle, bool bHasMajorGrid, bool bHasMinorGrid, bool bExportContent ) @@ -2316,10 +2316,10 @@ void SchXMLExportHelper_Impl::exportAxis( SvXMLElementExport* pAxis = NULL; // get property states for autostyles - if( xAxisProps.is() && mxExpPropMapper.is() ) + if( rAxisProps.is() && mxExpPropMapper.is() ) { - lcl_exportNumberFormat( "NumberFormat", xAxisProps, mrExport ); - aPropertyStates = mxExpPropMapper->Filter( xAxisProps ); + lcl_exportNumberFormat( "NumberFormat", rAxisProps, mrExport ); + aPropertyStates = mxExpPropMapper->Filter( rAxisProps ); if (!maSrcShellID.isEmpty() && !maDestShellID.isEmpty() && maSrcShellID != maDestShellID) { @@ -2337,7 +2337,7 @@ void SchXMLExportHelper_Impl::exportAxis( mrExport.AddAttribute( XML_NAMESPACE_CHART, XML_NAME, eAxisName ); AddAutoStyleAttribute( aPropertyStates ); // write style name if( !rCategoriesRange.isEmpty() ) - bExportDateScale = lcl_exportAxisType( xChart2Axis, mrExport ); + bExportDateScale = lcl_exportAxisType( rChart2Axis, mrExport ); // open axis element pAxis = new SvXMLElementExport( mrExport, XML_NAMESPACE_CHART, XML_AXIS, true, true ); @@ -2350,12 +2350,12 @@ void SchXMLExportHelper_Impl::exportAxis( //date scale if( bExportDateScale ) - exportDateScale( xAxisProps ); + exportDateScale( rAxisProps ); Reference< beans::XPropertySet > xTitleProps; Reference< beans::XPropertySet > xMajorGridProps; Reference< beans::XPropertySet > xMinorGridProps; - Reference< chart::XAxis > xAxis( xAxisProps, uno::UNO_QUERY ); + Reference< chart::XAxis > xAxis( rAxisProps, uno::UNO_QUERY ); if( xAxis.is() ) { xTitleProps = bHasTitle ? xAxis->getAxisTitle() : 0; diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index ca1f63c02353..2c409e989c88 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -132,12 +132,12 @@ SchXMLImportHelper::~SchXMLImportHelper() SvXMLImportContext* SchXMLImportHelper::CreateChartContext( SvXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLocalName, - const Reference< frame::XModel > xChartModel, + const Reference< frame::XModel >& rChartModel, const Reference< xml::sax::XAttributeList >& ) { SvXMLImportContext* pContext = 0; - Reference< chart::XChartDocument > xDoc( xChartModel, uno::UNO_QUERY ); + Reference< chart::XChartDocument > xDoc( rChartModel, uno::UNO_QUERY ); if( xDoc.is()) { mxChartDoc = xDoc; diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index 66c10ae222ae..b36953f5a1b7 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -396,21 +396,21 @@ void XMLSettingsExportHelper::exportNameAccess( } void XMLSettingsExportHelper::exportIndexAccess( - const uno::Reference<container::XIndexAccess> aIndexed, + const uno::Reference<container::XIndexAccess>& rIndexed, const OUString& rName) const { DBG_ASSERT(!rName.isEmpty(), "no name"); - DBG_ASSERT(aIndexed->getElementType().equals(getCppuType( (uno::Sequence<beans::PropertyValue> *)0 ) ), + DBG_ASSERT(rIndexed->getElementType().equals(getCppuType( (uno::Sequence<beans::PropertyValue> *)0 ) ), "wrong IndexAccess" ); OUString sEmpty; - if(aIndexed->hasElements()) + if (rIndexed->hasElements()) { m_rContext.AddAttribute( XML_NAME, rName ); m_rContext.StartElement( XML_CONFIG_ITEM_MAP_INDEXED, true ); - sal_Int32 nCount = aIndexed->getCount(); + sal_Int32 nCount = rIndexed->getCount(); for (sal_Int32 i = 0; i < nCount; i++) { - exportMapEntry(aIndexed->getByIndex(i), sEmpty, false); + exportMapEntry(rIndexed->getByIndex(i), sEmpty, false); } m_rContext.EndElement( true ); } diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index db76c50e598e..67854f74de93 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -3221,7 +3221,7 @@ static void lcl_StoreGltfExternals( static void lcl_StoreGltfFallback( SvXMLExport& rExport, - const uno::Reference<beans::XPropertySet> xPropSet, + const uno::Reference<beans::XPropertySet>& rPropSet, const OUString& rURL ) { OUString sUrlPath; @@ -3251,7 +3251,7 @@ static void lcl_StoreGltfFallback( xTarget->openStorageElement(sUrlPath.copy(0,sUrlPath.lastIndexOf("/")), embed::ElementModes::WRITE)); /// Save the fallback image under the 'Models/Fallbacks/' folder - uno::Reference< graphic::XGraphic > xGraphic( xPropSet->getPropertyValue("FallbackGraphic"), uno::UNO_QUERY ); + uno::Reference< graphic::XGraphic > xGraphic( rPropSet->getPropertyValue("FallbackGraphic"), uno::UNO_QUERY ); if( xGraphic.is() ) { // Fallback storage diff --git a/xmloff/source/forms/formlayerexport.cxx b/xmloff/source/forms/formlayerexport.cxx index f0cba0b96101..1e8f43a459e3 100644 --- a/xmloff/source/forms/formlayerexport.cxx +++ b/xmloff/source/forms/formlayerexport.cxx @@ -112,7 +112,7 @@ namespace xmloff m_pImpl->exportAutoStyles(); } - void OFormLayerXMLExport::excludeFromExport( const Reference< XControlModel > _rxControl ) + void OFormLayerXMLExport::excludeFromExport( const Reference< XControlModel >& _rxControl ) { m_pImpl->excludeFromExport( _rxControl ); } diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx index 9057ae719402..4b618d47628d 100644 --- a/xmloff/source/forms/layerexport.cxx +++ b/xmloff/source/forms/layerexport.cxx @@ -749,7 +749,7 @@ namespace xmloff return m_pControlNumberStyles; } - void OFormLayerXMLExport_Impl::excludeFromExport( const Reference< XControlModel > _rxControl ) + void OFormLayerXMLExport_Impl::excludeFromExport( const Reference< XControlModel >& _rxControl ) { Reference< XPropertySet > xProps( _rxControl, UNO_QUERY ); OSL_ENSURE( xProps.is(), "OFormLayerXMLExport_Impl::excludeFromExport: invalid control model!" ); diff --git a/xmloff/source/forms/layerexport.hxx b/xmloff/source/forms/layerexport.hxx index f7d902389d3e..4a4e4146be94 100644 --- a/xmloff/source/forms/layerexport.hxx +++ b/xmloff/source/forms/layerexport.hxx @@ -298,7 +298,7 @@ namespace xmloff to the form layer exporter.<br/> Of course you have to do this before calling <member>exportForms</member></p> */ - void excludeFromExport( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel > _rxControl ); + void excludeFromExport( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControlModel >& _rxControl ); }; } // namespace xmloff diff --git a/xmloff/source/meta/xmlversion.cxx b/xmloff/source/meta/xmlversion.cxx index e41d31ef549c..41a525b14ba3 100644 --- a/xmloff/source/meta/xmlversion.cxx +++ b/xmloff/source/meta/xmlversion.cxx @@ -40,11 +40,11 @@ const char XMLN_VERSIONSLIST[] = "VersionList.xml"; // #110897# XMLVersionListExport::XMLVersionListExport( - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rContext, const com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions, const OUString &rFileName, Reference< XDocumentHandler > &rHandler ) -: SvXMLExport( xContext, "", rFileName, util::MeasureUnit::CM, rHandler ), +: SvXMLExport( rContext, "", rFileName, util::MeasureUnit::CM, rHandler ), maVersions( rVersions ) { _GetNamespaceMap().AddAtIndex( XML_NAMESPACE_DC_IDX, xmloff::token::GetXMLToken(xmloff::token::XML_NP_DC), @@ -99,9 +99,9 @@ sal_uInt32 XMLVersionListExport::exportDoc( enum ::xmloff::token::XMLTokenEnum ) } XMLVersionListImport::XMLVersionListImport( - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext, + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rContext, com::sun::star::uno::Sequence < com::sun::star::util::RevisionTag >& rVersions ) -: SvXMLImport(xContext, ""), +: SvXMLImport(rContext, ""), maVersions( rVersions ) { GetNamespaceMap().AddAtIndex( XML_NAMESPACE_FRAMEWORK_IDX, xmloff::token::GetXMLToken(xmloff::token::XML_NP_VERSIONS_LIST), diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx index 6bfe40cf98da..b85e0c7f7b71 100644 --- a/xmloff/source/style/xmlimppr.cxx +++ b/xmloff/source/style/xmlimppr.cxx @@ -366,7 +366,7 @@ void SvXMLImportPropertyMapper::FillPropertySequence( void SvXMLImportPropertyMapper::CheckSpecialContext( const ::std::vector< XMLPropertyState >& aProperties, const ::com::sun::star::uno::Reference< - ::com::sun::star::beans::XPropertySet > rPropSet, + ::com::sun::star::beans::XPropertySet >& rPropSet, _ContextID_Index_Pair* pSpecialContextIds ) const { OSL_ENSURE( rPropSet.is(), "need an XPropertySet" ); @@ -411,7 +411,7 @@ void SvXMLImportPropertyMapper::CheckSpecialContext( bool SvXMLImportPropertyMapper::FillPropertySet( const vector< XMLPropertyState >& aProperties, - const Reference< XPropertySet > rPropSet, + const Reference< XPropertySet >& rPropSet, _ContextID_Index_Pair* pSpecialContextIds ) const { bool bSet = false; diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 33876d24dfc8..06562eec50c7 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -148,8 +148,8 @@ namespace struct FrameRefHash : public unary_function<Reference<XTextFrame>, size_t> { - size_t operator()(const Reference<XTextFrame> xFrame) const - { return sal::static_int_cast<size_t>(reinterpret_cast<sal_uIntPtr>(xFrame.get())); } + size_t operator()(const Reference<XTextFrame>& rFrame) const + { return sal::static_int_cast<size_t>(reinterpret_cast<sal_uIntPtr>(rFrame.get())); } }; static bool lcl_TextContentsUnfiltered(const Reference<XTextContent>&) @@ -173,9 +173,9 @@ namespace public: typedef bool (*filter_t)(const Reference<XTextContent>&); BoundFrames( - const Reference<XEnumerationAccess> xEnumAccess, + const Reference<XEnumerationAccess>& rEnumAccess, const filter_t& rFilter) - : m_xEnumAccess(xEnumAccess) + : m_xEnumAccess(rEnumAccess) { Fill(rFilter); }; @@ -230,7 +230,7 @@ namespace xmloff class BoundFrameSets { public: - BoundFrameSets(const Reference<XInterface> xModel); + BoundFrameSets(const Reference<XInterface>& rModel); const BoundFrames* GetTexts() const { return m_pTexts.get(); }; const BoundFrames* GetGraphics() const @@ -342,16 +342,16 @@ void BoundFrames::Fill(const filter_t& rFilter) } } -BoundFrameSets::BoundFrameSets(const Reference<XInterface> xModel) +BoundFrameSets::BoundFrameSets(const Reference<XInterface>& rModel) : m_pTexts(new BoundFrames()) , m_pGraphics(new BoundFrames()) , m_pEmbeddeds(new BoundFrames()) , m_pShapes(new BoundFrames()) { - const Reference<XTextFramesSupplier> xTFS(xModel, UNO_QUERY); - const Reference<XTextGraphicObjectsSupplier> xGOS(xModel, UNO_QUERY); - const Reference<XTextEmbeddedObjectsSupplier> xEOS(xModel, UNO_QUERY); - const Reference<XDrawPageSupplier> xDPS(xModel, UNO_QUERY); + const Reference<XTextFramesSupplier> xTFS(rModel, UNO_QUERY); + const Reference<XTextGraphicObjectsSupplier> xGOS(rModel, UNO_QUERY); + const Reference<XTextEmbeddedObjectsSupplier> xEOS(rModel, UNO_QUERY); + const Reference<XDrawPageSupplier> xDPS(rModel, UNO_QUERY); if(xTFS.is()) m_pTexts.reset(new BoundFrames( Reference<XEnumerationAccess>(xTFS->getTextFrames(), UNO_QUERY), diff --git a/xmloff/source/xforms/xformsapi.cxx b/xmloff/source/xforms/xformsapi.cxx index 4f127a2f2d0e..adfcb3554e68 100644 --- a/xmloff/source/xforms/xformsapi.cxx +++ b/xmloff/source/xforms/xformsapi.cxx @@ -167,7 +167,7 @@ Reference<XPropertySet> xforms_findXFormsSubmission( void xforms_setValue( Reference<XPropertySet>& xPropertySet, const OUString& rName, - const Any rAny ) + const Any& rAny ) { xPropertySet->setPropertyValue( rName, rAny ); } diff --git a/xmloff/source/xforms/xformsapi.hxx b/xmloff/source/xforms/xformsapi.hxx index 558909aa3906..e4e8aaff04fc 100644 --- a/xmloff/source/xforms/xformsapi.hxx +++ b/xmloff/source/xforms/xformsapi.hxx @@ -47,7 +47,7 @@ com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet> xforms_findX void xforms_setValue( com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>& xPropSet, const OUString& rName, - const com::sun::star::uno::Any rAny ); + const com::sun::star::uno::Any& rAny ); template<typename T> void xforms_setValue( |