summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2007-08-17 12:34:49 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2007-08-17 12:34:49 +0000
commite43c6faa8219bbe9ce00f6b333a039f91d7dff17 (patch)
tree4680e3839b6a160f96135dd02bb19685c479fe9b /dbaccess/source/ui
parentea51bb7266d89e9b3771ebe5758ef9c637750f0e (diff)
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
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r--dbaccess/source/ui/querydesign/querycontainerwindow.cxx31
1 files changed, 28 insertions, 3 deletions
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 <com/sun/star/util/XCloseable.hpp>
#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#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);