summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2022-10-07 11:20:20 -0400
committerJustin Luth <jluth@mail.com>2022-10-08 12:07:35 +0200
commit21c0b368a3e7150fc5d18af5d568d5683a7a6a3a (patch)
tree6b8a162a28554ba0f9691208a2645a37c3599ca3 /sw/source
parent50a4b5ed34b28f85f1df3be5f67266758b93c698 (diff)
tdf#148806 doc vba: AutoOpen runs before Document_Open
The same is true for AutoClose and AutoNew. I tested in Word 2003, and DOCX with Word 2010. Change-Id: I7243573be0fee529494f1ab6031d89ec57805695 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141093 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/ui/vba/vbaeventshelper.cxx12
-rw-r--r--sw/source/uibase/app/docsh2.cxx6
2 files changed, 9 insertions, 9 deletions
diff --git a/sw/source/ui/vba/vbaeventshelper.cxx b/sw/source/ui/vba/vbaeventshelper.cxx
index 6e9e510973af..ccdb10548ca2 100644
--- a/sw/source/ui/vba/vbaeventshelper.cxx
+++ b/sw/source/ui/vba/vbaeventshelper.cxx
@@ -48,14 +48,14 @@ bool SwVbaEventsHelper::implPrepareEvent( EventQueue& rEventQueue,
{
switch( rInfo.mnEventId )
{
- case DOCUMENT_NEW:
- rEventQueue.emplace_back(AUTO_NEW );
+ case AUTO_NEW:
+ rEventQueue.emplace_back(DOCUMENT_NEW);
break;
- case DOCUMENT_OPEN:
- rEventQueue.emplace_back(AUTO_OPEN );
+ case AUTO_OPEN:
+ rEventQueue.emplace_back(DOCUMENT_OPEN);
break;
- case DOCUMENT_CLOSE:
- rEventQueue.emplace_back(AUTO_CLOSE );
+ case AUTO_CLOSE:
+ rEventQueue.emplace_back(DOCUMENT_CLOSE);
break;
}
return true;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 8813828b5969..d9e1486e0e3a 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -221,10 +221,10 @@ static void lcl_processCompatibleSfxHint( const uno::Reference< script::vba::XVB
switch( pSfxEventHint->GetEventId() )
{
case SfxEventHintId::CreateDoc:
- xVbaEvents->processVbaEvent( DOCUMENT_NEW, aArgs );
+ xVbaEvents->processVbaEvent(AUTO_NEW, aArgs);
break;
case SfxEventHintId::OpenDoc:
- xVbaEvents->processVbaEvent( DOCUMENT_OPEN, aArgs );
+ xVbaEvents->processVbaEvent(AUTO_OPEN, aArgs);
break;
default: break;
}
@@ -385,7 +385,7 @@ bool SwDocShell::PrepareClose( bool bUI )
{
using namespace com::sun::star::script::vba::VBAEventId;
uno::Sequence< uno::Any > aNoArgs;
- xVbaEvents->processVbaEvent( DOCUMENT_CLOSE, aNoArgs );
+ xVbaEvents->processVbaEvent(AUTO_CLOSE, aNoArgs);
}
}
return bRet;