User: vg Date: 05/03/10 08:49:41 Modified: /dba/dbaccess/source/ui/dlg/ dbwizsetup.cxx
Log: INTEGRATION: CWS dba24 (1.8.4); FILE MERGED 2005/03/08 10:20:03 oj 1.8.4.6: RESYNC: (1.9-1.10); FILE MERGED 2005/02/28 08:12:17 oj 1.8.4.5: #i43626# remove authentication page for calc 2005/02/23 07:41:49 oj 1.8.4.4: #i42461# reinvent the opening of database documents 2005/02/21 13:12:02 oj 1.8.4.3: RESYNC: (1.8-1.9); FILE MERGED 2005/02/18 12:42:24 oj 1.8.4.2: #i42460# changes for the separation of datasource and database document(model) 2005/02/07 13:05:59 oj 1.8.4.1: #i42200# some little changes how to start a wizard File Changes: Directory: /dba/dbaccess/source/ui/dlg/ ======================================= File [changed]: dbwizsetup.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/dbwizsetup.cxx?r1=1.10&r2=1.11 Delta lines: +7 -39 -------------------- --- dbwizsetup.cxx 21 Feb 2005 12:43:39 -0000 1.10 +++ dbwizsetup.cxx 10 Mar 2005 16:49:38 -0000 1.11 @@ -152,6 +152,9 @@ #ifndef _COM_SUN_STAR_CONTAINER_XNAMEACCESS_HPP_ #include <com/sun/star/container/XNameAccess.hpp> #endif +#ifndef _COM_SUN_STAR_SDB_XDOCUMENTDATASOURCE_HPP_ +#include <com/sun/star/sdb/XDocumentDataSource.hpp> +#endif #ifndef _COM_SUN_STAR_FRAME_FRAMESEARCHFLAG_HPP_ #include <com/sun/star/frame/FrameSearchFlag.hpp> #endif @@ -218,6 +221,7 @@ using namespace com::sun::star::container; using namespace com::sun::star::frame; using namespace com::sun::star::ucb; +using namespace ::com::sun::star::sdb; using namespace ::comphelper; using namespace ::cppu; @@ -345,9 +349,6 @@ else declarePath( TEXT_PATH, PAGE_DBSETUPWIZARD_INTRO, PAGE_DBSETUPWIZARD_TEXT, PAGE_DBSETUPWIZARD_FINAL, WZS_INVALID_STATE); - if ( m_pCollection->hasAuthentication(DST_CALC)) - declarePath( SPREADSHEET_PATH, PAGE_DBSETUPWIZARD_INTRO, PAGE_DBSETUPWIZARD_SPREADSHEET, PAGE_DBSETUPWIZARD_AUTHENTIFICATION, PAGE_DBSETUPWIZARD_FINAL, WZS_INVALID_STATE); - else declarePath( SPREADSHEET_PATH, PAGE_DBSETUPWIZARD_INTRO, PAGE_DBSETUPWIZARD_SPREADSHEET, PAGE_DBSETUPWIZARD_FINAL, WZS_INVALID_STATE); if ( m_pCollection->hasAuthentication(DST_ODBC)) @@ -945,8 +946,8 @@ m_pImpl->saveChanges(*m_pOutSet); Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource(); SFX_ITEMSET_GET(*m_pOutSet, pDocUrl, SfxStringItem, DSID_DOCUMENT_URL, sal_True); - Reference<XStorable> xStore(xDatasource,UNO_QUERY); - Reference<XComponent> xComponent(xDatasource,UNO_QUERY); + Reference<XStorable> xStore(getDataSourceOrModel(xDatasource),UNO_QUERY); + Reference<XComponent> xComponent(xStore,UNO_QUERY); ::rtl::OUString sPath = m_pImpl->getDocumentUrl(*m_pOutSet); if ( xStore.is() ) { @@ -1076,21 +1077,6 @@ //------------------------------------------------------------------------- - void ODbTypeWizDialogSetup::OpenDatabaseDocument(const ::rtl::OUString& _sPath) - { - // get the desktop object - sal_Int32 nFrameSearchFlag = FrameSearchFlag::ALL | FrameSearchFlag::GLOBAL ; - Reference< XComponentLoader > xFrameLoader(getORB()->createInstance(SERVICE_FRAME_DESKTOP),UNO_QUERY); - if ( xFrameLoader.is() ) - { - xFrameLoader->loadComponentFromURL( - _sPath, - ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_default")), - nFrameSearchFlag, - Sequence<PropertyValue >() ); - } - } - short ODbTypeWizDialogSetup::Execute() { @@ -1199,24 +1185,6 @@ return sal_False; } } - - - //------------------------------------------------------------------ - sal_Bool ODbTypeWizDialogSetup::StartTableWizard() - { - try - { - ::rtl::OUString sPath = m_pImpl->getDocumentUrl(*m_pOutSet); - ::std::auto_ptr<OLinkedDocumentsAccess> oLinkedDocument(new OLinkedDocumentsAccess(this, getORB(), NULL, NULL)); - oLinkedDocument->newTableWithPilot(sPath, NULL); - } - catch(const Exception&) - { - OSL_ENSURE(sal_False, "ODbTypeWizDialogSetup::newTable: caught an exception while loading the object!"); - } - return sal_True; - } - //......................................................................... } // namespace dbaui --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
