summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-03-09 21:10:04 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-03-09 22:04:31 +0000
commitd22519f62bcd1325f1e7cc920a115b68fccd1922 (patch)
tree3b761a7f8c25f8f765c8d25662a803e47b5a7167 /comphelper
parentd44168795aed842d524e3a349962f2b98a8ac504 (diff)
V801: Decreased performance
Change-Id: Id8cd45d2844c121f63684734ab3546c24a1aab32
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx14
-rw-r--r--comphelper/source/misc/instancelocker.cxx4
-rw-r--r--comphelper/source/misc/instancelocker.hxx2
-rw-r--r--comphelper/source/xml/ofopxmlhelper.cxx27
4 files changed, 21 insertions, 26 deletions
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 1b5c22816bf5..212af0cc2a16 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -92,7 +92,7 @@ class ImplEventAttacherManager
sal_Int16 nVersion;
public:
ImplEventAttacherManager( const Reference< XIntrospection > & rIntrospection,
- const Reference< XComponentContext > xContext );
+ const Reference< XComponentContext >& rContext );
virtual ~ImplEventAttacherManager();
// Methods of XEventAttacherManager
@@ -358,21 +358,21 @@ Reference< XEventAttacherManager > createEventAttacherManager( const Reference<
ImplEventAttacherManager::ImplEventAttacherManager( const Reference< XIntrospection > & rIntrospection,
- const Reference< XComponentContext > xContext )
+ const Reference< XComponentContext >& rContext )
: aScriptListeners( aLock )
- , mxContext( xContext )
+ , mxContext( rContext )
, mxIntrospection( rIntrospection )
, nVersion(0)
{
- if ( xContext.is() )
+ if ( rContext.is() )
{
- Reference< XInterface > xIFace( xContext->getServiceManager()->createInstanceWithContext(
- OUString( "com.sun.star.script.EventAttacher" ), xContext) );
+ Reference< XInterface > xIFace( rContext->getServiceManager()->createInstanceWithContext(
+ OUString( "com.sun.star.script.EventAttacher" ), rContext) );
if ( xIFace.is() )
{
xAttacher = Reference< XEventAttacher2 >::query( xIFace );
}
- xConverter = Converter::create(xContext);
+ xConverter = Converter::create(rContext);
}
Reference< XInitialization > xInit( xAttacher, UNO_QUERY );
diff --git a/comphelper/source/misc/instancelocker.cxx b/comphelper/source/misc/instancelocker.cxx
index 9fe7b5c81cda..204d1a9baca3 100644
--- a/comphelper/source/misc/instancelocker.cxx
+++ b/comphelper/source/misc/instancelocker.cxx
@@ -239,9 +239,9 @@ uno::Reference< uno::XInterface > SAL_CALL OInstanceLocker::Create(
OLockListener::OLockListener( const uno::WeakReference< lang::XComponent >& xWrapper,
const uno::Reference< uno::XInterface >& xInstance,
sal_Int32 nMode,
- const uno::Reference< embed::XActionsApproval > xApproval )
+ const uno::Reference< embed::XActionsApproval >& rApproval )
: m_xInstance( xInstance )
-, m_xApproval( xApproval )
+, m_xApproval( rApproval )
, m_xWrapper( xWrapper )
, m_bDisposed( false )
, m_bInitialized( false )
diff --git a/comphelper/source/misc/instancelocker.hxx b/comphelper/source/misc/instancelocker.hxx
index ad777eb754d7..058190827f81 100644
--- a/comphelper/source/misc/instancelocker.hxx
+++ b/comphelper/source/misc/instancelocker.hxx
@@ -101,7 +101,7 @@ public:
OLockListener( const ::com::sun::star::uno::WeakReference< ::com::sun::star::lang::XComponent >& xWrapper,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xInstance,
sal_Int32 nMode,
- const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XActionsApproval > xApproval );
+ const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XActionsApproval >& rApproval );
virtual ~OLockListener();
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx b/comphelper/source/xml/ofopxmlhelper.cxx
index 8a78fcb05a83..d110a48c2145 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -37,31 +37,30 @@ using namespace ::com::sun::star;
namespace comphelper {
-
-uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadRelationsInfoSequence( const uno::Reference< io::XInputStream >& xInStream, const OUString & aStreamName, const uno::Reference< uno::XComponentContext > xContext )
+uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadRelationsInfoSequence( const uno::Reference< io::XInputStream >& xInStream, const OUString & aStreamName, const uno::Reference< uno::XComponentContext >& rContext )
throw( uno::Exception )
{
OUString aStringID = "_rels/";
aStringID += aStreamName;
- return ReadSequence_Impl( xInStream, aStringID, RELATIONINFO_FORMAT, xContext );
+ return ReadSequence_Impl( xInStream, aStringID, RELATIONINFO_FORMAT, rContext );
}
-uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadContentTypeSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext > xContext )
+uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadContentTypeSequence( const uno::Reference< io::XInputStream >& xInStream, const uno::Reference< uno::XComponentContext >& rContext )
throw( uno::Exception )
{
OUString aStringID = "[Content_Types].xml";
- return ReadSequence_Impl( xInStream, aStringID, CONTENTTYPE_FORMAT, xContext );
+ return ReadSequence_Impl( xInStream, aStringID, CONTENTTYPE_FORMAT, rContext );
}
-void SAL_CALL OFOPXMLHelper::WriteRelationsInfoSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< uno::Sequence< beans::StringPair > >& aSequence, const uno::Reference< uno::XComponentContext > xContext )
+void SAL_CALL OFOPXMLHelper::WriteRelationsInfoSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< uno::Sequence< beans::StringPair > >& aSequence, const uno::Reference< uno::XComponentContext >& rContext )
throw( uno::Exception )
{
if ( !xOutStream.is() )
throw uno::RuntimeException();
- uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(xContext);
+ uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(rContext);
xWriter->setOutputStream( xOutStream );
@@ -116,13 +115,13 @@ void SAL_CALL OFOPXMLHelper::WriteRelationsInfoSequence( const uno::Reference< i
}
-void SAL_CALL OFOPXMLHelper::WriteContentSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< beans::StringPair >& aDefaultsSequence, const uno::Sequence< beans::StringPair >& aOverridesSequence, const uno::Reference< uno::XComponentContext > xContext )
+void SAL_CALL OFOPXMLHelper::WriteContentSequence( const uno::Reference< io::XOutputStream >& xOutStream, const uno::Sequence< beans::StringPair >& aDefaultsSequence, const uno::Sequence< beans::StringPair >& aOverridesSequence, const uno::Reference< uno::XComponentContext >& rContext )
throw( uno::Exception )
{
if ( !xOutStream.is() )
throw uno::RuntimeException();
- uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(xContext);
+ uno::Reference< xml::sax::XWriter > xWriter = xml::sax::Writer::create(rContext);
xWriter->setOutputStream( xOutStream );
@@ -176,16 +175,13 @@ void SAL_CALL OFOPXMLHelper::WriteContentSequence( const uno::Reference< io::XOu
}
-
-
-
-uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const OUString& aStringID, sal_uInt16 nFormat, const uno::Reference< uno::XComponentContext > xContext )
+uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadSequence_Impl( const uno::Reference< io::XInputStream >& xInStream, const OUString& aStringID, sal_uInt16 nFormat, const uno::Reference< uno::XComponentContext >& rContext )
throw( uno::Exception )
{
- if ( !xContext.is() || !xInStream.is() || nFormat > FORMAT_MAX_ID )
+ if ( !rContext.is() || !xInStream.is() || nFormat > FORMAT_MAX_ID )
throw uno::RuntimeException();
- uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( xContext );
+ uno::Reference< xml::sax::XParser > xParser = xml::sax::Parser::create( rContext );
OFOPXMLHelper* pHelper = new OFOPXMLHelper( nFormat );
uno::Reference< xml::sax::XDocumentHandler > xHelper( static_cast< xml::sax::XDocumentHandler* >( pHelper ) );
@@ -199,7 +195,6 @@ uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::Read
return pHelper->GetParsingResult();
}
-
OFOPXMLHelper::OFOPXMLHelper( sal_uInt16 nFormat )
: m_nFormat( nFormat )
, m_aRelListElement( "Relationships" )