diff options
author | ekuiitr <jhaekansh80@gmail.com> | 2017-12-27 18:55:49 +0800 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-01-10 15:20:44 +0100 |
commit | 728104b31c89c93c8211fcd78a2c7a38192268eb (patch) | |
tree | efa65f4d3c233d696e7abbe2fbf0dbbf28e74c37 /basic | |
parent | c2bc2c4633e92349cac390c05d245d1a812986c4 (diff) |
tdf#96099 Removed some trivial typedefs related to UnOrderedMap and size_t.
Change-Id: I59d3d0b2c1097b5ca96505dc99a4a104b4f8ab48
Reviewed-on: https://gerrit.libreoffice.org/47082
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sb.cxx | 15 | ||||
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 4 |
2 files changed, 8 insertions, 11 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 1dcd71704399..79e40d298660 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -173,14 +173,13 @@ void SAL_CALL DocBasicItem::disposing( const lang::EventObject& /*rEvent*/ ) namespace { typedef ::rtl::Reference< DocBasicItem > DocBasicItemRef; -typedef std::unordered_map< const StarBASIC *, DocBasicItemRef > DocBasicItemMap; -class GaDocBasicItems : public rtl::Static<DocBasicItemMap,GaDocBasicItems> {}; +class GaDocBasicItems : public rtl::Static<std::unordered_map< const StarBASIC *, DocBasicItemRef >,GaDocBasicItems> {}; const DocBasicItem* lclFindDocBasicItem( const StarBASIC* pDocBasic ) { - DocBasicItemMap::iterator it = GaDocBasicItems::get().find( pDocBasic ); - DocBasicItemMap::iterator end = GaDocBasicItems::get().end(); + auto it = GaDocBasicItems::get().find( pDocBasic ); + auto end = GaDocBasicItems::get().end(); return (it != end) ? it->second.get() : nullptr; } @@ -193,13 +192,13 @@ void lclInsertDocBasicItem( StarBASIC& rDocBasic ) void lclRemoveDocBasicItem( StarBASIC& rDocBasic ) { - DocBasicItemMap::iterator it = GaDocBasicItems::get().find( &rDocBasic ); + auto it = GaDocBasicItems::get().find( &rDocBasic ); if( it != GaDocBasicItems::get().end() ) { it->second->stopListening(); GaDocBasicItems::get().erase( it ); } - DocBasicItemMap::iterator it_end = GaDocBasicItems::get().end(); + auto it_end = GaDocBasicItems::get().end(); for( it = GaDocBasicItems::get().begin(); it != it_end; ++it ) { it->second->clearDependingVarsOnDelete( rDocBasic ); @@ -1936,8 +1935,8 @@ Reference< frame::XModel > StarBASIC::GetModelFromBasic( SbxObject* pBasic ) void StarBASIC::DetachAllDocBasicItems() { - DocBasicItemMap& rItems = GaDocBasicItems::get(); - DocBasicItemMap::iterator it = rItems.begin(), itEnd = rItems.end(); + std::unordered_map< const StarBASIC *, DocBasicItemRef >& rItems = GaDocBasicItems::get(); + auto it = rItems.begin(), itEnd = rItems.end(); for (; it != itEnd; ++it) { DocBasicItemRef xItem = it->second; diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 829db9b695e4..8a67a697e5f0 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -3200,8 +3200,6 @@ Reference< XTypeDescriptionEnumeration > getTypeDescriptorEnumeration( const OUS return xEnum; } -typedef std::unordered_map< OUString, Any > VBAConstantsHash; - VBAConstantHelper& VBAConstantHelper::instance() { @@ -3278,7 +3276,7 @@ VBAConstantHelper::getVBAConstant( const OUString& rName ) SbxVariable* pConst = nullptr; init(); - VBAConstantsHash::const_iterator it = aConstHash.find( rName.toAsciiLowerCase() ); + auto it = aConstHash.find( rName.toAsciiLowerCase() ); if ( it != aConstHash.end() ) { |