summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/inc/oox/ole/vbaproject.hxx2
-rw-r--r--oox/source/ole/vbaproject.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
3 files changed, 5 insertions, 3 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 )
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index c708a2ce50ae..7ebd722cead1 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -208,7 +208,7 @@ bool BasicProjImportHelper::import( const uno::Reference< io::XInputStream >& rx
if ( vbaStg.get() )
{
oox::ole::VbaProject aVbaPrj( mxCtx, mrDocShell.GetModel(), CREATE_CONST_ASC( "Writer") );
- aVbaPrj.importVbaProject( *vbaStg );
+ bRet = aVbaPrj.importVbaProject( *vbaStg );
}
}
catch( const uno::Exception& )