User: obo     
Date: 05/07/22 02:00:22

Modified:
 /dba/dbaccess/source/ui/querydesign/
  querycontroller.cxx

Log:
 INTEGRATION: CWS dba20v2 (1.99.82); FILE MERGED
 2005/07/19 13:45:59 fs 1.99.82.1: #i52166# close preview frame with 
XCloseable::close, not with XComponent::dispose (this was a bug which was 
revealed by a previous change in framework code)

File Changes:

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

File [changed]: querycontroller.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/querydesign/querycontroller.cxx?r1=1.99&r2=1.100
Delta lines:  +13 -3
--------------------
--- querycontroller.cxx 10 Mar 2005 16:53:56 -0000      1.99
+++ querycontroller.cxx 22 Jul 2005 09:00:17 -0000      1.100
@@ -106,6 +106,9 @@
 #ifndef _COM_SUN_STAR_FRAME_XLOADEVENTLISTENER_HPP_
 #include <com/sun/star/frame/XLoadEventListener.hpp>
 #endif
+#ifndef _COM_SUN_STAR_UTIL_XCLOSEABLE_HPP_
+#include <com/sun/star/util/XCloseable.hpp>
+#endif
 #ifndef _COM_SUN_STAR_SDBCX_XVIEWSSUPPLIER_HPP_
 #include <com/sun/star/sdbcx/XViewsSupplier.hpp>
 #endif
@@ -680,10 +683,17 @@
                case SID_DB_QUERY_PREVIEW:
                        try
                        {
-                               Reference<XFrame> xXFrame( 
getContainer()->getPreviewFrame());
-                               if ( xXFrame.is() )
+                Reference< ::com::sun::star::util::XCloseable > xCloseFrame( 
getContainer()->getPreviewFrame(), UNO_QUERY );
+                               if ( xCloseFrame.is() )
+                               {
+                    try
+                    {
+                        xCloseFrame->close( sal_True );
+                    }
+                    catch( const Exception& )
                                {
-                                       ::comphelper::disposeComponent( xXFrame 
);
+                       OSL_ENSURE( sal_False, 
"OQueryController::Execute(SID_DB_QUERY_PREVIEW): *nobody* is expected to veto 
closing the preview frame!" );
+                    }
                                }
                                else
                                        
Execute(ID_BROWSER_QUERY_EXECUTE,Sequence< PropertyValue >());




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

Reply via email to