From c3db5332558d35adc8374836fd17025220e73180 Mon Sep 17 00:00:00 2001 From: Noel Power Date: Tue, 6 Sep 2011 17:32:53 +0100 Subject: make sure we can detect if vba code was imported --- oox/inc/oox/ole/vbaproject.hxx | 2 +- oox/source/ole/vbaproject.cxx | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/inc/oox/ole/vbaproject.hxx b/oox/inc/oox/ole/vbaproject.hxx index 91f399daa835..ca6c8adc92c7 100644 --- a/oox/inc/oox/ole/vbaproject.hxx +++ b/oox/inc/oox/ole/vbaproject.hxx @@ -131,7 +131,7 @@ public: const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr = true ); - void importVbaProject( + bool importVbaProject( StorageBase& rVbaPrjStrg ); /** Registers a macro atatcher object. For details, see description of the diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx index 1173783a36a0..3685c2db6186 100644 --- a/oox/source/ole/vbaproject.cxx +++ b/oox/source/ole/vbaproject.cxx @@ -169,7 +169,7 @@ VbaProject::~VbaProject() } -void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg ) +bool VbaProject::importVbaProject( StorageBase& rVbaPrjStrg ) { // create GraphicHelper Reference< ::com::sun::star::frame::XFrame > xFrame; @@ -184,6 +184,8 @@ void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg ) // to do that when importing VBA projects GraphicHelper grfHlp( mxContext, xFrame, noStorage ); importVbaProject( rVbaPrjStrg, grfHlp ); + // return true if something has been imported + return hasModules() || hasDialogs(); } void VbaProject::importVbaProject( StorageBase& rVbaPrjStrg, const GraphicHelper& rGraphicHelper, bool bDefaultColorBgr ) -- cgit