User: vg      
Date: 2007-08-31 09:15:12+0000
Modified:
   dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx

Log:
 INTEGRATION: CWS rpt23fix06_SRC680 (1.25.22); FILE MERGED
 2007/08/29 14:00:53 as 1.25.22.1: #150518# disable layout manager for previews 
in general

File Changes:

Directory: /dba/dbaccess/source/ui/app/
=======================================

File [changed]: AppDetailPageHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppDetailPageHelper.cxx?r1=1.25&r2=1.26
Delta lines:  +12 -0
--------------------
--- AppDetailPageHelper.cxx     2007-07-17 13:21:33+0000        1.25
+++ AppDetailPageHelper.cxx     2007-08-31 09:15:10+0000        1.26
@@ -56,6 +56,12 @@
 #ifndef DBAUI_DBTREELISTBOX_HXX
 #include "dbtreelistbox.hxx"
 #endif
+#ifndef _COM_SUN_STAR_FRAME_XLAYOUTMANAGER_HPP_
+#include <com/sun/star/frame/XLayoutManager.hpp>
+#endif
+#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
+#include <com/sun/star/beans/XPropertySet.hpp>
+#endif
 #ifndef _COM_SUN_STAR_AWT_XTABCONTROLLER_HPP_
 #include <com/sun/star/awt/XTabController.hpp>
 #endif
@@ -1104,6 +1110,12 @@
                                m_xFrame = Reference < XFrame > ( 
getBorderWin().getView()->getORB()->createInstance( 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Frame")) ), 
UNO_QUERY );
                                m_xFrame->initialize( m_xWindow );
 
+                // work-around for #150518#: no layout manager (and thus no 
toolbars) in the preview
+                // Must be called after initialize ... but before any other 
call to this frame.
+                // Otherwhise frame throws "life time exceptions" as e.g. 
NON_INITIALIZED
+                Reference< XPropertySet > xFrameProps( m_xFrame, 
UNO_QUERY_THROW );
+                xFrameProps->setPropertyValue( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ), makeAny(Reference< 
XLayoutManager >()) );
+
                                Reference<XFramesSupplier> 
xSup(getBorderWin().getView()->getController()->getFrame(),UNO_QUERY);
                                if ( xSup.is() )
                                {




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to