rpms/openoffice.org/devel openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch, NONE, 1.1 openoffice.org.spec, 1.939, 1.940
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Nov 17 16:29:12 UTC 2006
Author: caolanm
Update of /cvs/dist/rpms/openoffice.org/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv16658
Modified Files:
openoffice.org.spec
Added Files:
openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch
Log Message:
add openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch
openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch:
dlg/dbwizsetup.cxx | 88 +++++++++++++++++++++++++++++++++++------------------
inc/dbwizsetup.hxx | 1
2 files changed, 59 insertions(+), 30 deletions(-)
--- NEW FILE openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch ---
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"
#endif
+#ifndef DBAUI_ASYNCRONOUSLINK_HXX
+#include "AsyncronousLink.hxx"
+#endif
#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>
#endif
+#ifndef TOOLS_DIAGNOSE_EX_H
+#include <tools/diagnose_ex.h>
+#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 ) )
+ {
+ }
+
+ void doLoadAsync()
+ {
+ m_aAsyncCaller.Call( NULL );
+ }
+
+ private:
+ DECL_LINK( OnOpenDocument, void* );
+ };
+
+ // .............................................................................
+ IMPL_LINK( AsyncLoader, OnOpenDocument, void*, /*_pEmptyArg*/ )
+ {
+ m_xFrameLoader->loadComponentFromURL( m_sURL,
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "_default" ) ), FrameSearchFlag::ALL, Sequence<PropertyValue >() );
+ delete this;
+ return 0L;
+ }
+ }
+
+ // -----------------------------------------------------------------------------
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;
+ 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 );
}
+ 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
===================================================================
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/>.
*/
Index: openoffice.org.spec
===================================================================
RCS file: /cvs/dist/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.939
retrieving revision 1.940
diff -u -r1.939 -r1.940
--- openoffice.org.spec 16 Nov 2006 14:41:03 -0000 1.939
+++ openoffice.org.spec 17 Nov 2006 16:29:10 -0000 1.940
@@ -129,6 +129,7 @@
Patch63: openoffice.org-2.0.4.ooo71562.svx.64bitcrash.patch
Patch64: openoffice.org-2.0.4.ooo71570.psprint.noonecopy.patch
Patch65: openoffice.org-2.0.3.rh127576.gtkunixprintdialog.localize
+Patch66: openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch
%define instdir %{_libdir}/openoffice.org2.1
@@ -994,6 +995,7 @@
%patch63 -p1 -b .ooo71562.svx.64bitcrash.patch
%patch64 -p1 -b .ooo71570.psprint.noonecopy.patch
cat %{PATCH65} >> svtools/source/dialogs/localize.sdf
+%patch66 -p1 -b .ooo71662.dbaccess.noasync.patch
tar xzf %{SOURCE1}
@@ -2519,6 +2521,7 @@
%changelog
* Thu Nov 15 2006 Caolan McNamara <caolanm at redhat.com> - 1:2.1.0-3.2
- Resolves: rhbz#215511 can't print brochure on landscape mode
+- add openoffice.org-2.1.0.ooo71662.dbaccess.noasync.patch
* Wed Nov 15 2006 Caolan McNamara <caolanm at redhat.com> - 1:2.1.0-3.1
- next version
More information about the fedora-cvs-commits
mailing list