Kaydet (Commit) 05101334 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Add DocumentOpen and NewDocument to XApplicationOutgoing and emit such

Change-Id: Ia2a0ade0af45f1ba99b0cfa860bd1986edcf272e
üst 7fbfd070
......@@ -25,9 +25,11 @@ module ooo { module vba { module word {
interface XApplicationOutgoing : XInterfaceWithIID
{
void DocumentChange();
void Quit();
void DocumentChange();
void DocumentOpen([in] any Document);
void DocumentBeforeClose([in] any Document, [out] any Cancel);
void NewDocument([in] any Document);
};
}; }; };
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment