diff options
author | Ariel Constenla-Haile <arielch@apache.org> | 2013-02-24 18:23:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-19 15:46:54 +0100 |
commit | 87dfa6dd336d596112c0beb6b42f082178461678 (patch) | |
tree | b3bde0c7c200ac231a522e496213ad38e65337e5 /sfx2/source/doc/printhelper.cxx | |
parent | bf4ecd6138f07ca6207eeec306517eff4aff220e (diff) |
Resolves: #i121810# Adapt SfxPrintingHint to work with...
the "new" XDocumentEventBroadcaster
(cherry picked from commit 1bfae56dd9d633a80924bfeefc03368100d75a8f)
Conflicts:
sfx2/inc/sfx2/event.hxx
sfx2/source/view/viewprn.cxx
Change-Id: I6b3e1edc396b82d85fe059e6cdf7ad0009d5b94b
Diffstat (limited to 'sfx2/source/doc/printhelper.cxx')
-rw-r--r-- | sfx2/source/doc/printhelper.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sfx2/source/doc/printhelper.cxx b/sfx2/source/doc/printhelper.cxx index 1b00652fde04..c042c6e66356 100644 --- a/sfx2/source/doc/printhelper.cxx +++ b/sfx2/source/doc/printhelper.cxx @@ -54,6 +54,8 @@ #include <sfx2/objsh.hxx> #include <sfx2/event.hxx> +#define SFX_PRINTABLESTATE_CANCELJOB -2 + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -137,7 +139,7 @@ void SAL_CALL SfxPrintJob_Impl::cancelJob() throw (RuntimeException) { // FIXME: how to cancel PrintJob via API?! if( m_pData->m_pObjectShell.Is() ) - m_pData->m_pObjectShell->Broadcast( SfxPrintingHint( -2 ) ); + m_pData->m_pObjectShell->Broadcast( SfxPrintingHint( SFX_PRINTABLESTATE_CANCELJOB ) ); } SfxPrintHelper::SfxPrintHelper() @@ -792,7 +794,7 @@ void IMPL_PrintListener_DataContainer::Notify( SfxBroadcaster& rBC, const SfxHin SfxPrintingHint* pPrintHint = PTR_CAST( SfxPrintingHint, &rHint ); if ( &rBC != m_pObjectShell || !pPrintHint - || pPrintHint->GetWhich() == -2 ) // -2 : CancelPrintJob + || pPrintHint->GetWhich() == SFX_PRINTABLESTATE_CANCELJOB ) return; if ( pPrintHint->GetWhich() == com::sun::star::view::PrintableState_JOB_STARTED ) |