From e43c6faa8219bbe9ce00f6b333a039f91d7dff17 Mon Sep 17 00:00:00 2001 From: Ivo Hinkelmann Date: Fri, 17 Aug 2007 12:34:49 +0000 Subject: INTEGRATION: CWS qssyncterm (1.16.42); FILE MERGED 2007/08/08 08:21:06 cd 1.16.42.1: #150128# Prevent creation of add-on toolbars in beamer --- .../source/ui/querydesign/querycontainerwindow.cxx | 31 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'dbaccess/source/ui/querydesign/querycontainerwindow.cxx') diff --git a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx index d07b55c09ba7..36f5b33cdb65 100644 --- a/dbaccess/source/ui/querydesign/querycontainerwindow.cxx +++ b/dbaccess/source/ui/querydesign/querycontainerwindow.cxx @@ -4,9 +4,9 @@ * * $RCSfile: querycontainerwindow.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: kz $ $Date: 2007-05-10 10:40:27 $ + * last change: $Author: ihi $ $Date: 2007-08-17 13:34:49 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -69,6 +69,10 @@ #ifndef _COM_SUN_STAR_UTIL_XCLOSEABLE_HPP_ #include #endif +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include +#endif + //......................................................................... namespace dbaui { @@ -77,6 +81,7 @@ namespace dbaui using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; + using namespace ::com::sun::star::beans; //===================================================================== //= OQueryContainerWindow @@ -227,7 +232,27 @@ namespace dbaui ::dbaui::notifySystemWindow(this,m_pBeamer,::comphelper::mem_fun(&TaskPaneList::AddWindow)); - m_xBeamer.set(m_pViewSwitch->getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Frame")),UNO_QUERY); + Reference < XFrame > xBeamerFrame( m_pViewSwitch->getORB()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.frame.Frame")),UNO_QUERY ); + m_xBeamer.set( xBeamerFrame ); + + // notify layout manager to not create internal toolbars + Reference < XPropertySet > xPropSet( xBeamerFrame, UNO_QUERY ); + try + { + const ::rtl::OUString aLayoutManager( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" )); + Reference < XPropertySet > xLMPropSet; + + Any a = xPropSet->getPropertyValue( aLayoutManager ); + if ( a >>= xLMPropSet ) + { + const ::rtl::OUString aAutomaticToolbars( RTL_CONSTASCII_USTRINGPARAM( "AutomaticToolbars" )); + xLMPropSet->setPropertyValue( aAutomaticToolbars, Any( sal_False )); + } + } + catch( Exception& ) + { + } + OSL_ENSURE(m_xBeamer.is(),"No frame created!"); m_xBeamer->initialize( VCLUnoHelper::GetInterface ( m_pBeamer ) ); m_xBeamer->setName(FRAME_NAME_QUERY_PREVIEW); -- cgit