Tag: cws_dev300_odbmacros3 User: fs Date: 2008-07-29 08:25:24+0000 Modified: dba/dbaccess/source/core/dataaccess/databasecontext.cxx dba/dbaccess/source/core/dataaccess/databasecontext.hxx
Log: #i76128# moved the InitState handling from ModelImpl to the DatabaseDocument, as it really only affects the latter File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: databasecontext.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasecontext.cxx?r1=1.43.4.2&r2=1.43.4.3 Delta lines: +4 -12 -------------------- --- databasecontext.cxx 2008-07-23 11:43:07+0000 1.43.4.2 +++ databasecontext.cxx 2008-07-29 08:25:21+0000 1.43.4.3 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: databasecontext.cxx,v $ - * $Revision: 1.43.4.2 $ + * $Revision: 1.43.4.3 $ * * This file is part of OpenOffice.org. * @@ -190,19 +190,11 @@ } //-------------------------------------------------------------------------- -Reference< XInterface > ODatabaseContext::impl_createNewDataSource( bool _bInitialize ) +Reference< XInterface > ODatabaseContext::impl_createNewDataSource() { ::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( m_aContext.getLegacyServiceFactory(), *this ) ); Reference< XDataSource > xDataSource( pImpl->getOrCreateDataSource() ); - // We delegate the initialization to the ODatabaseModelImpl, which can create and initialize the DatabaseDocument instance - // itself. This instance is then immediately closed, since it's not needed anymore. - if ( _bInitialize ) - { - ::utl::CloseableComponent aEnsureClose( pImpl->createNewModel_deliverOwnership( true ) ); - (void)aEnsureClose; - } - return xDataSource.get(); } @@ -211,7 +203,7 @@ { // for convenience of the API user, we ensure the document is fully initialized (effectively: XLoadable::initNew // has been called at the DatabaseDocument). - return impl_createNewDataSource( true ); + return impl_createNewDataSource(); } //-------------------------------------------------------------------------- @@ -225,7 +217,7 @@ xDataSource = getObject( sURL ); if ( !xDataSource.is() ) - xDataSource = impl_createNewDataSource( aArgs.getOrDefault( "InitializeDocument", true )); + xDataSource = impl_createNewDataSource(); return xDataSource; } File [changed]: databasecontext.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/databasecontext.hxx?r1=1.17.2.1&r2=1.17.2.2 Delta lines: +2 -2 ------------------- --- databasecontext.hxx 2008-07-23 11:43:07+0000 1.17.2.1 +++ databasecontext.hxx 2008-07-29 08:25:21+0000 1.17.2.2 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: databasecontext.hxx,v $ - * $Revision: 1.17.2.1 $ + * $Revision: 1.17.2.2 $ * * This file is part of OpenOffice.org. * @@ -141,7 +141,7 @@ /** creates a new data source */ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > - impl_createNewDataSource( bool _bInitialize ); + impl_createNewDataSource(); protected: ::osl::Mutex m_aMutex; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
