include/oox/core/relations.hxx | 1 + oox/source/core/relations.cxx | 9 +++++++++ oox/source/drawingml/shape.cxx | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit d2c08569373551144b141bbdeea76894cf7fc82b Author: Caolán McNamara <caol...@redhat.com> Date: Wed Mar 5 09:42:06 2014 +0000 Revert "remove unused code oox::core::Relations::getRelationsFromType" we need it again now This reverts commit 77c45eb25eb462bacdf7d658d6cb485f755beaa5. Change-Id: I3e171d95e4f50c8e26824da2f6e6817d3b597d4d diff --git a/include/oox/core/relations.hxx b/include/oox/core/relations.hxx index bbe2968..4254b99 100644 --- a/include/oox/core/relations.hxx +++ b/include/oox/core/relations.hxx @@ -82,6 +82,7 @@ public: /** Returns the first relation with the passed type. */ const Relation* getRelationFromFirstTypeFromOfficeDoc( const OUString& rType ) const; /** Finds all relations associated with the passed type. */ + RelationsRef getRelationsFromType( const OUString& rType ) const; RelationsRef getRelationsFromTypeFromOfficeDoc( const OUString& rType ) const; /** Returns the external target of the relation with the passed relation identifier. */ diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx index 4122678..d2e1b28 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 b40356a..3a2ebae 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() );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits