summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Power <noel.power@novell.com>2011-09-06 17:32:53 +0100
committerNoel Power <noel.power@novell.com>2011-09-06 17:34:30 +0100
commitc3db5332558d35adc8374836fd17025220e73180 (patch)
tree3e2ee38881a3f9bc820847f14ce4e5e72c39a701 /oox
parentfa9ff01fe4731a5d91da60ec3f5c2cafa7b3f382 (diff)
make sure we can detect if vba code was imported
Diffstat (limited to 'oox')
-rw-r--r--oox/inc/oox/ole/vbaproject.hxx2
-rw-r--r--oox/source/ole/vbaproject.cxx4
2 files changed, 4 insertions, 2 deletions
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 )