diff options
Diffstat (limited to 'sfx2/source/view/viewprn.cxx')
-rw-r--r-- | sfx2/source/view/viewprn.cxx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sfx2/source/view/viewprn.cxx b/sfx2/source/view/viewprn.cxx index faf392c90f32..227099e7d783 100644 --- a/sfx2/source/view/viewprn.cxx +++ b/sfx2/source/view/viewprn.cxx @@ -29,7 +29,6 @@ #include "precompiled_sfx2.hxx" #include <com/sun/star/document/XDocumentProperties.hpp> -#include <com/sun/star/script/vba/XCoreEventProcessor.hpp> #include <com/sun/star/view/PrintableState.hpp> #include "com/sun/star/view/XRenderable.hpp" @@ -699,21 +698,12 @@ void SfxViewShell::ExecPrint_Impl( SfxRequest &rReq ) { SfxObjectShell* pDoc = GetObjectShell(); - // ask VBA emulation at document model whether to print the document - try + // derived class may decide to abort this + if( !pDoc->QuerySlotExecutable( nId ) ) { - uno::Reference< script::vba::XCoreEventProcessor > xEventProcessor( pDoc->GetModel(), uno::UNO_QUERY_THROW ); - xEventProcessor->processCoreVbaEvent( nId ); - } - catch( util::VetoException& ) - { - // VBA event handler indicates to cancel printing the document rReq.SetReturnValue( SfxBoolItem( 0, FALSE ) ); return; } - catch( uno::Exception& ) - { - } bool bDetectHidden = ( !bSilent && pDoc ); if ( bDetectHidden && pDoc->QueryHiddenInformation( WhenPrinting, NULL ) != RET_YES ) |