summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-08-22 09:10:40 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-08-22 09:10:40 +0200
commitc319ccfc37ee6d05e08227799045ff26ea985432 (patch)
tree5613ee23ee5b3ccd1cce723d203f9040561e8a2e /basic
parent73b2ea1dfa32566f9f94d5d6e7919ba7d13f6f2c (diff)
Revert "Simplify ImplRepository::impl_getLocationForModel return type"
This reverts commit 72305ed49d4c9ba968d7bf6d8d5ae564bb92147d, which was bogus, cf. the comment in ImplRepository::getDocumentBasicManager about recursive calls.
Diffstat (limited to 'basic')
-rw-r--r--basic/source/basmgr/basicmanagerrepository.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/basic/source/basmgr/basicmanagerrepository.cxx b/basic/source/basmgr/basicmanagerrepository.cxx
index a292ccc62c3e..bcf0855f8472 100644
--- a/basic/source/basmgr/basicmanagerrepository.cxx
+++ b/basic/source/basmgr/basicmanagerrepository.cxx
@@ -107,7 +107,7 @@ namespace basic
@precond
our mutex is locked
*/
- BasicManager*
+ BasicManager*&
impl_getLocationForModel( const Reference< XModel >& _rxDocumentModel );
/** creates a new BasicManager instance for the given model
@@ -232,7 +232,7 @@ namespace basic
thus a recursive call of this function will find and return it
without creating another instance.
*/
- BasicManager* pBasicManager = impl_getLocationForModel( _rxDocumentModel );
+ BasicManager*& pBasicManager = impl_getLocationForModel( _rxDocumentModel );
if ( pBasicManager == NULL )
impl_createManagerForModel( pBasicManager, _rxDocumentModel );
@@ -363,12 +363,12 @@ namespace basic
}
- BasicManager* ImplRepository::impl_getLocationForModel( const Reference< XModel >& _rxDocumentModel )
+ BasicManager*& ImplRepository::impl_getLocationForModel( const Reference< XModel >& _rxDocumentModel )
{
Reference< XInterface > xNormalized( _rxDocumentModel, UNO_QUERY );
DBG_ASSERT( _rxDocumentModel.is(), "ImplRepository::impl_getLocationForModel: invalid model!" );
- BasicManager* location = m_aStore[ xNormalized ];
+ BasicManager*& location = m_aStore[ xNormalized ];
return location;
}