summaryrefslogtreecommitdiff
path: root/basic/source/classes/sb.cxx
diff options
context:
space:
mode:
authorekuiitr <jhaekansh80@gmail.com>2017-12-27 18:55:49 +0800
committerMichael Stahl <mstahl@redhat.com>2018-01-10 15:20:44 +0100
commit728104b31c89c93c8211fcd78a2c7a38192268eb (patch)
treeefa65f4d3c233d696e7abbe2fbf0dbbf28e74c37 /basic/source/classes/sb.cxx
parentc2bc2c4633e92349cac390c05d245d1a812986c4 (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/source/classes/sb.cxx')
-rw-r--r--basic/source/classes/sb.cxx15
1 files changed, 7 insertions, 8 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;