diff options
author | Tor Lillqvist <tml@collabora.com> | 2018-04-16 17:02:25 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2018-05-31 14:16:40 +0300 |
commit | 05101334e6d15eb77782dfc36c2065561f7e57e6 (patch) | |
tree | 2907002a4e9c0d5c023cb6965e45488178cfb2ca /sw | |
parent | 7fbfd070f97b048534725e1d89840031631c52d2 (diff) |
Add DocumentOpen and NewDocument to XApplicationOutgoing and emit such
Change-Id: Ia2a0ade0af45f1ba99b0cfa860bd1986edcf272e
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index 40d5976c64d2..2042640d66c9 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -269,6 +269,30 @@ void SwDocShell::Notify( SfxBroadcaster&, const SfxHint& rHint ) default: break; } + + switch( pSfxEventHint->GetEventId() ) + { + case SfxEventHintId::CreateDoc: + { + uno::Any aDocument; + aDocument <<= mxAutomationDocumentObject; + uno::Sequence< uno::Any > aArgs(1); + aArgs[0] = aDocument; + SW_MOD()->CallAutomationApplicationEventSinks( "NewDocument", aArgs ); + } + break; + case SfxEventHintId::OpenDoc: + { + uno::Any aDocument; + aDocument <<= mxAutomationDocumentObject; + uno::Sequence< uno::Any > aArgs(1); + aArgs[0] = aDocument; + SW_MOD()->CallAutomationApplicationEventSinks( "DocumentOpen", aArgs ); + } + break; + default: + break; + } } sal_uInt16 nAction = 0; |