User: kz      
Date: 05/03/03 16:10:01

Modified:
 /dba/dbaccess/source/ui/uno/
  DBTypeWizDlgSetup.cxx

Log:
 INTEGRATION: CWS fwkpostbeta03 (1.3.12); FILE MERGED
 2005/02/15 09:10:04 as 1.3.12.1: #i40349# add db models to global model 
collection; provide document events for all db models

File Changes:

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

File [changed]: DBTypeWizDlgSetup.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx?r1=1.5&r2=1.6
Delta lines:  +14 -11
---------------------
--- DBTypeWizDlgSetup.cxx       21 Feb 2005 11:57:20 -0000      1.5
+++ DBTypeWizDlgSetup.cxx       4 Mar 2005 00:09:59 -0000       1.6
@@ -65,6 +65,9 @@
 #ifndef _COM_SUN_STAR_DOCUMENT_XEVENTLISTENER_HPP_
 #include <com/sun/star/document/XEventListener.hpp>
 #endif
+#ifndef _COM_SUN_STAR_CONTAINER_XSET_HPP_
+#include <com/sun/star/container/XSet.hpp>
+#endif
 #ifndef DBAUI_DBTYPEWIZDLGSETUP_HXX
 #include "DBTypeWizDlgSetup.hxx"
 #endif
@@ -76,6 +79,7 @@
 #endif
 
 using namespace dbaui;
+namespace css = ::com::sun::star;
                          
 extern "C" void SAL_CALL createRegistryInfo_ODBTypeWizDialogSetup()
 {
@@ -129,17 +133,16 @@
 
     try
     {
-        Reference< ::com::sun::star::document::XEventListener > 
xDocEventBroadcaster(_rxFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.GlobalEventBroadcaster"))),
-            UNO_QUERY);
-        if ( xDocEventBroadcaster.is() )
-        {
-            ::com::sun::star::document::EventObject aEvent(xDBContext, 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnNew")) );
+        Reference< css::container::XSet > 
xModelCollection(_rxFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.GlobalEventBroadcaster"))),UNO_QUERY_THROW);
+        xModelCollection->insert(css::uno::makeAny(xDBContext));
+
+        Reference< css::document::XEventListener > 
xDocEventBroadcaster(xDBContext,UNO_QUERY_THROW);
+        ::com::sun::star::document::EventObject aEvent(xDBContext, 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnNew")));
             xDocEventBroadcaster->notifyEvent(aEvent);
         }
-    }
     catch(Exception)
     {
-        OSL_ENSURE(0,"Could not create GlobalEventBroadcaster!");
+        OSL_ENSURE(0,"Could not create append model to global model 
collectiona and broadcaste document events for it!");
     }
     Reference <com::sun::star::ui::dialogs::XExecutableDialog> 
xDBWizardExecute( xDBWizard, UNO_QUERY );
     xDBWizardExecute->execute();




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

Reply via email to