summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorJacobo Aragunde Pérez <jaragunde@igalia.com>2014-02-14 17:59:40 +0100
committerJacobo Aragunde Pérez <jaragunde@igalia.com>2014-02-24 13:24:51 +0100
commit20a174ac1243fb6ad322347eb99c2d014bd4ca95 (patch)
tree9fe0bd7449d7263779c3d739010d3d430e407663 /comphelper
parentd2a48728617e00a91d1ad032bd11ab5bb556d15a (diff)
comphelper: code refactor
Change-Id: Ica71d0691cf02aeaa03b6570015d9828cd7daeed
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx16
1 files changed, 1 insertions, 15 deletions
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index c3c321c0835c..a3cdfa4ed2c4 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -1202,22 +1202,8 @@ uno::Reference < io::XInputStream > EmbeddedObjectContainer::GetGraphicStream( c
{
SAL_INFO( "comphelper.container", "comphelper (mv76033) comphelper::EmbeddedObjectContainer::GetGraphicStream( Object )" );
- // get the object name
- OUString aName;
- EmbeddedObjectContainerNameMap::iterator aIt = pImpl->maObjectContainer.begin();
- while ( aIt != pImpl->maObjectContainer.end() )
- {
- if ( (*aIt).second == xObj )
- {
- aName = (*aIt).first;
- break;
- }
-
- ++aIt;
- }
-
// try to load it from the container storage
- return GetGraphicStream( aName, pMediaType );
+ return GetGraphicStream( GetEmbeddedObjectName( xObj ), pMediaType );
}
bool EmbeddedObjectContainer::InsertGraphicStream( const com::sun::star::uno::Reference < com::sun::star::io::XInputStream >& rStream, const OUString& rObjectName, const OUString& rMediaType )