rpms/openoffice.org/devel openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch, 1.1, 1.2
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Dec 4 15:41:07 UTC 2006
- Previous message (by thread): rpms/gedit/devel gedit.spec,1.111,1.112
- Next message (by thread): rpms/apr/devel apr-1.2.8.tar.gz.asc, NONE, 1.1 .cvsignore, 1.8, 1.9 apr.spec, 1.61, 1.62 sources, 1.8, 1.9 upstream, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: caolanm
Update of /cvs/dist/rpms/openoffice.org/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21901
Modified Files:
openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch
Log Message:
upgrade to upstream solution
openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch:
dlg/dbwizsetup.cxx | 116 ++++++++++++++++++++++++++++++++++++++----------
inc/AsyncronousLink.hxx | 2
2 files changed, 95 insertions(+), 23 deletions(-)
Index: openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch 17 Nov 2006 16:29:10 -0000 1.1
+++ openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch 4 Dec 2006 15:41:00 -0000 1.2
@@ -1,148 +1,206 @@
Index: source/ui/dlg/dbwizsetup.cxx
===================================================================
RCS file: /cvs/dba/dbaccess/source/ui/dlg/dbwizsetup.cxx,v
-retrieving revision 1.18
-retrieving revision 1.18.12.1
-diff -u -r1.18 -r1.18.12.1
---- openoffice.org.orig/dbaccess/source/ui/dlg/dbwizsetup.cxx 20 Jun 2006 03:06:31 -0000 1.18
-+++ openoffice.org/dbaccess/source/ui/dlg/dbwizsetup.cxx 27 Jul 2006 07:19:47 -0000 1.18.12.1
-@@ -108,6 +108,9 @@
- #ifndef _DBAUI_DBADMIN_HRC_
- #include "dbadmin.hrc"
+retrieving revision 1.22
+retrieving revision 1.22.40.1
+diff -u -r1.22 -r1.22.40.1
+--- openoffice.org.orig/dbaccess/source/ui/dlg/dbwizsetup.cxx 18 Oct 2006 13:30:58 -0000 1.22
++++ openoffice.org/dbaccess/source/ui/dlg/dbwizsetup.cxx 4 Dec 2006 15:03:44 -0000 1.22.40.1
+@@ -114,15 +114,17 @@
+ #ifndef DBAUI_ASYNCRONOUSLINK_HXX
+ #include "AsyncronousLink.hxx"
#endif
-+#ifndef DBAUI_ASYNCRONOUSLINK_HXX
-+#include "AsyncronousLink.hxx"
++#ifndef _FILEDLGHELPER_HXX
++#include <sfx2/filedlghelper.hxx>
+#endif
++
++/** === begin UNO includes === **/
#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_
#include <com/sun/star/frame/XStorable.hpp>
#endif
-@@ -168,6 +171,9 @@
- #ifndef _COMPHELPER_SEQUENCEASHASHMAP_HXX_
- #include <comphelper/sequenceashashmap.hxx>
+ #ifndef _COM_SUN_STAR_UNO_XNAMINGSERVICE_HPP_
+ #include <com/sun/star/uno/XNamingService.hpp>
+ #endif
+-#ifndef _FILEDLGHELPER_HXX
+-#include <sfx2/filedlghelper.hxx>
+-#endif
+ #ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
+ #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
+ #endif
+@@ -138,9 +140,6 @@
+ #ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_
+ #include <com/sun/star/frame/FrameSearchFlag.hpp>
+ #endif
+-#ifndef _DBAUI_LINKEDDOCUMENTS_HXX_
+-#include "linkeddocuments.hxx"
+-#endif
+ #ifndef _COM_SUN_STAR_FRAME_XCOMPONENTLOADER_HPP_
+ #include <com/sun/star/frame/XComponentLoader.hpp>
+ #endif
+@@ -165,6 +164,17 @@
+ #ifndef _COM_SUN_STAR_IO_IOEXCEPTION_HPP_
+ #include <com/sun/star/io/IOException.hpp>
#endif
-+#ifndef TOOLS_DIAGNOSE_EX_H
-+#include <tools/diagnose_ex.h>
++#ifndef _COM_SUN_STAR_FRAME_XTERMINATELISTENER_HPP_
++#include <com/sun/star/frame/XTerminateListener.hpp>
+#endif
-
- #ifndef _COM_SUN_STAR_UCB_IOERRORCODE_HPP_
- #include <com/sun/star/ucb/IOErrorCode.hpp>
-@@ -1087,13 +1093,6 @@
-
-
- //-------------------------------------------------------------------------
-- short ODbTypeWizDialogSetup::Execute()
-- {
-- short nResult = ModalDialog::Execute();
-- return nResult;
-- }
--
-- //-------------------------------------------------------------------------
- sal_Bool ODbTypeWizDialogSetup::callSaveAsDialog()
- {
- sal_Bool bRet = sal_False;
-@@ -1179,36 +1178,67 @@
- }
-
- // -----------------------------------------------------------------------------
-+ namespace
-+ {
-+ // .............................................................................
-+ class AsyncLoader
-+ {
-+ private:
-+ Reference< XComponentLoader > m_xFrameLoader;
-+ ::rtl::OUString m_sURL;
-+ OAsyncronousLink m_aAsyncCaller;
-+
-+ public:
-+ AsyncLoader( const Reference< XComponentLoader >& _rxLoader, const ::rtl::OUString& _rURL )
-+ :m_xFrameLoader( _rxLoader )
-+ ,m_sURL( _rURL )
-+ ,m_aAsyncCaller( LINK( this, AsyncLoader, OnOpenDocument ) )
-+ {
-+ }
++#ifndef _COM_SUN_STAR_FRAME_XDESKTOP_HPP_
++#include <com/sun/star/frame/XDesktop.hpp>
++#endif
++/** === end UNO includes === **/
+
-+ void doLoadAsync()
-+ {
-+ m_aAsyncCaller.Call( NULL );
-+ }
++#ifndef _DBAUI_LINKEDDOCUMENTS_HXX_
++#include "linkeddocuments.hxx"
++#endif
+ #ifndef SVTOOLS_FILENOTATION_HXX_
+ #include <svtools/filenotation.hxx>
+ #endif
+@@ -1185,38 +1195,99 @@
+ namespace
+ {
+ // .............................................................................
+- class AsyncLoader
++ typedef ::cppu::WeakImplHelper1 < XTerminateListener
++ > AsyncLoader_Base;
++ class AsyncLoader : public AsyncLoader_Base
+ {
+ private:
+ Reference< XComponentLoader > m_xFrameLoader;
++ Reference< XDesktop > m_xDesktop;
+ ::rtl::OUString m_sURL;
+ OAsyncronousLink m_aAsyncCaller;
+
+ public:
+- AsyncLoader( const Reference< XComponentLoader >& _rxLoader, const ::rtl::OUString& _rURL )
+- :m_xFrameLoader( _rxLoader )
+- ,m_sURL( _rURL )
+- ,m_aAsyncCaller( LINK( this, AsyncLoader, OnOpenDocument ) )
++ AsyncLoader( const Reference< XMultiServiceFactory >& _rxORB, const ::rtl::OUString& _rURL );
++
++ void doLoadAsync();
++
++ // XTerminateListener
++ virtual void SAL_CALL queryTermination( const EventObject& Event ) throw (TerminationVetoException, RuntimeException);
++ virtual void SAL_CALL notifyTermination( const EventObject& Event ) throw (RuntimeException);
++ // XEventListener
++ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ private:
+ DECL_LINK( OnOpenDocument, void* );
+ };
+
+ // .............................................................................
-+ IMPL_LINK( AsyncLoader, OnOpenDocument, void*, /*_pEmptyArg*/ )
++ AsyncLoader::AsyncLoader( const Reference< XMultiServiceFactory >& _rxORB, const ::rtl::OUString& _rURL )
++ :m_sURL( _rURL )
++ ,m_aAsyncCaller( LINK( this, AsyncLoader, OnOpenDocument ) )
+ {
-+ m_xFrameLoader->loadComponentFromURL( m_sURL,
-+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ), FrameSearchFlag::ALL, Sequence<PropertyValue >() );
-+ delete this;
-+ return 0L;
++ try
++ {
++ m_xDesktop.set( _rxORB->createInstance( SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
++ m_xFrameLoader.set( m_xDesktop, UNO_QUERY_THROW );
++ }
++ catch( const Exception& )
+ {
++ DBG_UNHANDLED_EXCEPTION();
+ }
+ }
-+ }
+
-+ // -----------------------------------------------------------------------------
- sal_Bool ODbTypeWizDialogSetup::onFinish(sal_Int32 _nResult)
- {
- if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPage::eOpenExisting )
- {
-- if ( !OWizardMachine::onFinish( _nResult ) )
-+ // we're not going to re-use the XModel we have - since the document the user
-+ // wants us to load could be a non-database document. Instead, we asynchronously
-+ // open the selected document. Thus, the wizard's return value is RET_CANCEL,
-+ // which means to not continue loading the database document
-+ if ( !OWizardMachine::onFinish( RET_CANCEL ) )
- return sal_False;
-
-- Reference< XModel > xModel( m_pImpl->getCurrentModel() );
-- DBG_ASSERT( xModel.is(), "ODbTypeWizDialogSetup::onFinish: no model?" );
-- if ( xModel.is() )
-+ Reference< XComponentLoader > xFrameLoader;
++ // .............................................................................
++ void AsyncLoader::doLoadAsync()
++ {
++ OSL_ENSURE( !m_aAsyncCaller.IsRunning(), "AsyncLoader:doLoadAsync: already running!" );
+
+- void doLoadAsync()
++ acquire();
+ try
{
-- OGeneralPage::DocumentDescriptor aDocument( m_pGeneralPage->GetSelectedDocument() );
--
-- ::comphelper::SequenceAsHashMap aLoadArgs;
-- aLoadArgs.createItemIfMissing( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FileName" ) ),
-- ::rtl::OUString( aDocument.sURL ) );
-- aLoadArgs.createItemIfMissing( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "URL" ) ),
-- ::rtl::OUString( aDocument.sURL ) );
-- aLoadArgs.createItemIfMissing( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ) ),
-- ::rtl::OUString( aDocument.sFilter ) );
-- try
-- {
-- xModel->attachResource( aDocument.sURL, aLoadArgs.getAsConstPropertyValueList() );
-- }
-- catch( const Exception& e )
-- {
-- DBG_ERROR( "ODbTypeWizDialogSetup::onFinish: caught an exception while loading the document!" );
-- (void)e;
-- }
-+ xFrameLoader = Reference< XComponentLoader >( getORB()->createInstance( SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
+- m_aAsyncCaller.Call( NULL );
++ if ( m_xDesktop.is() )
++ m_xDesktop->addTerminateListener( this );
}
-+ catch( const Exception& )
++ catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); }
+
+- private:
+- DECL_LINK( OnOpenDocument, void* );
+- };
++ m_aAsyncCaller.Call( NULL );
++ }
+
+ // .............................................................................
+ IMPL_LINK( AsyncLoader, OnOpenDocument, void*, /*_pEmptyArg*/ )
+ {
+- m_xFrameLoader->loadComponentFromURL( m_sURL,
+- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ), FrameSearchFlag::ALL, Sequence<PropertyValue >() );
+- delete this;
++ try
+ {
-+ DBG_UNHANDLED_EXCEPTION();
++ if ( m_xFrameLoader.is() )
++ m_xFrameLoader->loadComponentFromURL( m_sURL,
++ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ), FrameSearchFlag::ALL, Sequence<PropertyValue >() );
+ }
++ catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); }
+
-+ AsyncLoader* pAsyncLoader = new AsyncLoader( xFrameLoader, m_pGeneralPage->GetSelectedDocument().sURL );
-+ pAsyncLoader->doLoadAsync();
++ try
++ {
++ if ( m_xDesktop.is() )
++ m_xDesktop->removeTerminateListener( this );
++ }
++ catch( const Exception& ) { DBG_UNHANDLED_EXCEPTION(); }
++
++ release();
+ return 0L;
+ }
++
++ // .............................................................................
++ void SAL_CALL AsyncLoader::queryTermination( const EventObject& /*Event*/ ) throw (TerminationVetoException, RuntimeException)
++ {
++ throw TerminationVetoException();
++ }
++
++ // .............................................................................
++ void SAL_CALL AsyncLoader::notifyTermination( const EventObject& /*Event*/ ) throw (RuntimeException)
++ {
++ }
++ // .............................................................................
++ void SAL_CALL AsyncLoader::disposing( const EventObject& /*Source*/ ) throw (RuntimeException)
++ {
++ }
+ }
+
+ // -----------------------------------------------------------------------------
+@@ -1234,15 +1305,14 @@
+ Reference< XComponentLoader > xFrameLoader;
+ try
+ {
+- xFrameLoader = Reference< XComponentLoader >( getORB()->createInstance( SERVICE_FRAME_DESKTOP ), UNO_QUERY_THROW );
++ AsyncLoader* pAsyncLoader = new AsyncLoader( getORB(), m_pGeneralPage->GetSelectedDocument().sURL );
++ ::rtl::Reference< AsyncLoader > xKeepAlive( pAsyncLoader );
++ pAsyncLoader->doLoadAsync();
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
+-
+- AsyncLoader* pAsyncLoader = new AsyncLoader( xFrameLoader, m_pGeneralPage->GetSelectedDocument().sURL );
+- pAsyncLoader->doLoadAsync();
return sal_True;
}
-Index: source/ui/inc/dbwizsetup.hxx
+Index: source/ui/inc/AsyncronousLink.hxx
===================================================================
-RCS file: /cvs/dba/dbaccess/source/ui/inc/dbwizsetup.hxx,v
-retrieving revision 1.8
-retrieving revision 1.8.106.1
-diff -u -r1.8 -r1.8.106.1
---- openoffice.org.orig/dbaccess/source/ui/inc/dbwizsetup.hxx 21 Dec 2005 13:36:52 -0000 1.8
-+++ openoffice.org/dbaccess/source/ui/inc/dbwizsetup.hxx 27 Jul 2006 07:18:54 -0000 1.8.106.1
-@@ -142,7 +142,6 @@
- virtual void setTitle(const ::rtl::OUString& _sTitle);
- virtual sal_Bool saveDatasource();
- virtual String getStateDisplayName( WizardState _nState );
-- virtual short Execute();
-
- /** returns <TRUE/> if the database should be opened, otherwise <FALSE/>.
- */
+RCS file: /cvs/dba/dbaccess/source/ui/inc/AsyncronousLink.hxx,v
+retrieving revision 1.3
+retrieving revision 1.3.236.1
+diff -u -r1.3 -r1.3.236.1
+--- openoffice.org.orig/dbaccess/source/ui/inc/AsyncronousLink.hxx 8 Sep 2005 15:14:42 -0000 1.3
++++ openoffice.org/dbaccess/source/ui/inc/AsyncronousLink.hxx 4 Dec 2006 15:04:49 -0000 1.3.236.1
+@@ -82,6 +82,8 @@
+ void Call(void* _pArgument = NULL);
+ void CancelCall();
+
++ bool IsRunning() const { return m_nEventId != 0; }
++
+ protected:
+ DECL_LINK(OnAsyncCall, void*);
+ };
- Previous message (by thread): rpms/gedit/devel gedit.spec,1.111,1.112
- Next message (by thread): rpms/apr/devel apr-1.2.8.tar.gz.asc, NONE, 1.1 .cvsignore, 1.8, 1.9 apr.spec, 1.61, 1.62 sources, 1.8, 1.9 upstream, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list