From d2c08569373551144b141bbdeea76894cf7fc82b Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 5 Mar 2014 09:42:06 +0000 Subject: Revert "remove unused code oox::core::Relations::getRelationsFromType" we need it again now This reverts commit 77c45eb25eb462bacdf7d658d6cb485f755beaa5. Change-Id: I3e171d95e4f50c8e26824da2f6e6817d3b597d4d --- oox/source/core/relations.cxx | 9 +++++++++ oox/source/drawingml/shape.cxx | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'oox') diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx index 4122678e5e01..d2e1b28190b2 100644 --- a/oox/source/core/relations.cxx +++ b/oox/source/core/relations.cxx @@ -71,6 +71,15 @@ const Relation* Relations::getRelationFromFirstType( const OUString& rType ) con return 0; } +RelationsRef Relations::getRelationsFromType( const OUString& rType ) const +{ + RelationsRef xRelations( new Relations( maFragmentPath ) ); + for( const_iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt ) + if( aIt->second.maType.equalsIgnoreAsciiCase( rType ) ) + (*xRelations)[ aIt->first ] = aIt->second; + return xRelations; +} + RelationsRef Relations::getRelationsFromTypeFromOfficeDoc( const OUString& rType ) const { RelationsRef xRelations( new Relations( maFragmentPath ) ); diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index b40356a470a6..3a2ebae8ddb1 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1208,7 +1208,7 @@ uno::Sequence< uno::Sequence< uno::Any > > Shape::resolveRelationshipsOfType(co core::RelationsRef xRels = rFilter.importRelations( sFragment ); if ( xRels ) { - core::RelationsRef xImageRels = xRels->getRelationsFromTypeFromOfficeDoc( sType ); + core::RelationsRef xImageRels = xRels->getRelationsFromType( sType ); if ( xImageRels ) { xRelListTemp.realloc( xImageRels->size() ); -- cgit