diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2014-10-10 14:08:49 +0900 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-10-11 14:24:09 +0000 |
commit | c51f77b1c02d03a4932d1b20ba6440465d265d48 (patch) | |
tree | b9b7968ff18e2562593a6d966b7e194d6a85caf1 /oox | |
parent | b592b3e89ee8cccd77dbe59a5d7965e3529c265e (diff) |
fdo#75757: remove inheritance to std::map
from oox::core::Relations.
Change-Id: If2e0109a2ad6598436177b7638cb6d568fb2d3d6
Reviewed-on: https://gerrit.libreoffice.org/11899
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/relations.cxx | 15 | ||||
-rw-r--r-- | oox/source/core/relationshandler.cxx | 2 |
2 files changed, 9 insertions, 8 deletions
diff --git a/oox/source/core/relations.cxx b/oox/source/core/relations.cxx index 4122678e5e01..5c75b3394cfe 100644 --- a/oox/source/core/relations.cxx +++ b/oox/source/core/relations.cxx @@ -52,20 +52,21 @@ OUString createOfficeDocRelationTypeStrict(const OUString& rType) } -Relations::Relations( const OUString& rFragmentPath ) : - maFragmentPath( rFragmentPath ) +Relations::Relations( const OUString& rFragmentPath ) + : maMap() + , maFragmentPath( rFragmentPath ) { } const Relation* Relations::getRelationFromRelId( const OUString& rId ) const { - const_iterator aIt = find( rId ); - return (aIt == end()) ? 0 : &aIt->second; + ::std::map< OUString, Relation >::const_iterator aIt = maMap.find( rId ); + return (aIt == maMap.end()) ? 0 : &aIt->second; } const Relation* Relations::getRelationFromFirstType( const OUString& rType ) const { - for( const_iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt ) + for( ::std::map< OUString, Relation >::const_iterator aIt = maMap.begin(), aEnd = maMap.end(); aIt != aEnd; ++aIt ) if( aIt->second.maType.equalsIgnoreAsciiCase( rType ) ) return &aIt->second; return 0; @@ -74,10 +75,10 @@ const Relation* Relations::getRelationFromFirstType( const OUString& rType ) con RelationsRef Relations::getRelationsFromTypeFromOfficeDoc( const OUString& rType ) const { RelationsRef xRelations( new Relations( maFragmentPath ) ); - for( const_iterator aIt = begin(), aEnd = end(); aIt != aEnd; ++aIt ) + for( ::std::map< OUString, Relation >::const_iterator aIt = maMap.begin(), aEnd = maMap.end(); aIt != aEnd; ++aIt ) if( aIt->second.maType.equalsIgnoreAsciiCase( createOfficeDocRelationTypeTransitional(rType) ) || aIt->second.maType.equalsIgnoreAsciiCase( createOfficeDocRelationTypeStrict(rType) )) - (*xRelations)[ aIt->first ] = aIt->second; + xRelations->maMap[ aIt->first ] = aIt->second; return xRelations; } diff --git a/oox/source/core/relationshandler.cxx b/oox/source/core/relationshandler.cxx index 20adc05cfb64..4802b8f83e05 100644 --- a/oox/source/core/relationshandler.cxx +++ b/oox/source/core/relationshandler.cxx @@ -76,7 +76,7 @@ Reference< XFastContextHandler > RelationsFragment::createFastChildContext( OSL_ENSURE( mxRelations->count( aRelation.maId ) == 0, "RelationsFragment::createFastChildContext - relation identifier exists already" ); - mxRelations->insert( Relations::value_type( aRelation.maId, aRelation ) ); + mxRelations->insert( ::std::map< OUString, Relation >::value_type( aRelation.maId, aRelation ) ); } } break; |