summaryrefslogtreecommitdiff
path: root/framework/source/layoutmanager/toolbarlayoutmanager.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/layoutmanager/toolbarlayoutmanager.cxx')
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx22
1 files changed, 13 insertions, 9 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index aca93c4e2f03..d5708db9e895 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -440,12 +440,13 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL )
{
bool bNotify( false );
- SolarMutexClearableGuard aReadLock;
- uno::Reference< frame::XFrame > xFrame( m_xFrame );
- uno::Reference< awt::XWindow2 > xContainerWindow( m_xContainerWindow );
- aReadLock.clear();
-
- bNotify = false;
+ uno::Reference<frame::XFrame> xFrame;
+ uno::Reference<awt::XWindow2> xContainerWindow;
+ {
+ SolarMutexGuard aReadLock;
+ xFrame.set(m_xFrame);
+ xContainerWindow.set(m_xContainerWindow);
+ }
if ( !xFrame.is() || !xContainerWindow.is() )
return false;
@@ -457,11 +458,14 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL )
uno::Sequence< beans::PropertyValue > aPropSeq( 2 );
aPropSeq[0].Name = "Frame";
- aPropSeq[0].Value <<= m_xFrame;
+ aPropSeq[0].Value <<= xFrame;
aPropSeq[1].Name = "Persistent";
aPropSeq[1].Value <<= true;
- uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager );
- aReadLock.clear();
+ uno::Reference<ui::XUIElementFactory> xUIElementFactory;
+ {
+ SolarMutexGuard aReadLock;
+ xUIElementFactory.set(m_xUIElementFactoryManager);
+ }
implts_setToolbarCreation();
try