diff options
author | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2010-09-13 17:47:04 +0200 |
---|---|---|
committer | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2010-09-13 17:47:04 +0200 |
commit | 7e801dd20924783ebe7f40920169179ea3b1a709 (patch) | |
tree | 7e41c810d8d2eb5d854aeae931a0282a395f4f52 /vbahelper | |
parent | 583cd12ea421871fe521af2f3d9951963ae6a366 (diff) |
mib19: #163557# cleanup VBA XDocuments implementation, trigger Workbook_Open event when creating a new Excel workbook via Workbooks.Add
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/inc/vbahelper/vbadocumentsbase.hxx | 8 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbadocumentsbase.cxx | 9 |
2 files changed, 7 insertions, 10 deletions
diff --git a/vbahelper/inc/vbahelper/vbadocumentsbase.hxx b/vbahelper/inc/vbahelper/vbadocumentsbase.hxx index 36bc0a4963ee..8e4554b74b3d 100644 --- a/vbahelper/inc/vbahelper/vbadocumentsbase.hxx +++ b/vbahelper/inc/vbahelper/vbadocumentsbase.hxx @@ -57,10 +57,10 @@ public: // VbaDocumentsBase_BASE virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) = 0; - // XDocumentsBase - virtual css::uno::Any SAL_CALL Add() throw (css::uno::RuntimeException); - virtual void SAL_CALL Close( ) throw (css::uno::RuntimeException); - virtual css::uno::Any SAL_CALL Open( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException); +protected: + css::uno::Any createDocument() throw (css::uno::RuntimeException); + void closeDocuments() throw (css::uno::RuntimeException); + css::uno::Any openDocument( const ::rtl::OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException); }; #endif /* SC_VBA_WORKBOOKS_HXX */ diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index e01809d5fbc3..f2b70ab231c7 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -213,8 +213,7 @@ VbaDocumentsBase::VbaDocumentsBase( const uno::Reference< XHelperInterface >& xP { } -uno::Any SAL_CALL -VbaDocumentsBase::Add() throw (uno::RuntimeException) +uno::Any VbaDocumentsBase::createDocument() throw (uno::RuntimeException) { uno::Reference< lang::XMultiComponentFactory > xSMgr( mxContext->getServiceManager(), uno::UNO_QUERY_THROW ); @@ -244,8 +243,7 @@ VbaDocumentsBase::Add() throw (uno::RuntimeException) return uno::makeAny( xComponent ); } -void -VbaDocumentsBase::Close() throw (uno::RuntimeException) +void VbaDocumentsBase::closeDocuments() throw (uno::RuntimeException) { // #FIXME this *MUST* be wrong documents::close surely closes ALL documents // in the collection, use of getCurrentDocument here is totally wrong @@ -259,8 +257,7 @@ VbaDocumentsBase::Close() throw (uno::RuntimeException) } // #TODO# #FIXME# can any of the unused params below be used? -uno::Any -VbaDocumentsBase::Open( const rtl::OUString& rFileName, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) +uno::Any VbaDocumentsBase::openDocument( const rtl::OUString& rFileName, const uno::Any& ReadOnly, const uno::Sequence< beans::PropertyValue >& rProps ) throw (uno::RuntimeException) { // we need to detect if this is a URL, if not then assume its a file path rtl::OUString aURL; |