summaryrefslogtreecommitdiff
path: root/framework/source/layoutmanager
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-05-27 20:46:20 +0200
committerJan Holesovsky <kendy@suse.cz>2011-05-27 20:46:20 +0200
commit9df8682ced86258da76a730ecf354c788fffc1f2 (patch)
tree590af31bfe3d5cfd0d4de4812a0bd696b9415d2b /framework/source/layoutmanager
parentb41941a81473b48e895ab3a30905986b029facc4 (diff)
parenta79c69155ec42ce6817980b6c875f9b39041d2d4 (diff)
Merge remote-tracking branch 'origin/integration/dev300_m106'
Conflicts: basic/source/classes/sbunoobj.cxx basic/source/inc/runtime.hxx basic/source/runtime/step1.cxx desktop/source/deployment/dp_services.cxx drawinglayer/prj/d.lst drawinglayer/source/primitive2d/makefile.mk sfx2/source/appl/appinit.cxx sfx2/source/appl/appquit.cxx sfx2/source/inc/appdata.hxx sfx2/source/view/viewfrm.cxx svx/source/fmcomp/gridctrl.cxx vbahelper/source/vbahelper/vbahelper.cxx
Diffstat (limited to 'framework/source/layoutmanager')
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 097ce914072a..defe4e6c7a1b 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -422,6 +422,14 @@ bool ToolbarLayoutManager::requestToolbar( const ::rtl::OUString& rResourceURL )
bool bMustCallCreate( false );
uno::Reference< ui::XUIElement > xUIElement;
+ ReadGuard aReadLock( m_aLock );
+ uno::Reference< frame::XFrame > xFrame( m_xFrame );
+ aReadLock.unlock();
+
+ uno::Reference< frame::XModel > xModel( impl_getModelFromFrame( xFrame ));
+ if ( implts_isPreviewModel( xModel ))
+ return false; // no toolbars for preview frame!
+
UIElement aRequestedToolbar = impl_findToolbar( rResourceURL );
if ( aRequestedToolbar.m_aName != rResourceURL )
{