diff options
author | Henry Castro <hcastro@collabora.com> | 2020-12-25 17:30:42 -0400 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2021-04-05 14:31:48 +0200 |
commit | dea03310cc257514ceaabc732461e9e976ba60ed (patch) | |
tree | de694a3431ba16e9584b9c0ed99cce2e6630ecbc /desktop | |
parent | af4d3a492b135a1ef3c612c6c2f6ac50713bd5bf (diff) |
lok: add lo_sendDialogEvent to post dialog events
When the "Macro Security Warning" is shown in client side,
the model/view/controller are not created yet. It is necessary
to create a function to posts a dialog event.
Change-Id: I2bfc9edecc708dc79da575ea515e3144e78c10e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108293
Tested-by: Jenkins
Reviewed-by: Henry Castro <hcastro@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108678
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113599
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/init.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index a302b5d46f76..6c4be59af5d6 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -2087,6 +2087,10 @@ static void lo_runLoop(LibreOfficeKit* pThis, LibreOfficeKitWakeCallback pWakeCallback, void* pData); +static void lo_sendDialogEvent(LibreOfficeKit* pThis, + unsigned long long int nLOKWindowId, + const char* pArguments); + LibLibreOffice_Impl::LibLibreOffice_Impl() : m_pOfficeClass( gOfficeClass.lock() ) , maThread(nullptr) @@ -2111,6 +2115,7 @@ LibLibreOffice_Impl::LibLibreOffice_Impl() m_pOfficeClass->runMacro = lo_runMacro; m_pOfficeClass->signDocument = lo_signDocument; m_pOfficeClass->runLoop = lo_runLoop; + m_pOfficeClass->sendDialogEvent = lo_sendDialogEvent; gOfficeClass = m_pOfficeClass; } @@ -3710,7 +3715,7 @@ public: } // anonymous namespace -static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned long long int nWindowId, const char* pArguments) +static void lcl_sendDialogEvent(unsigned long long int nWindowId, const char* pArguments) { SolarMutexGuard aGuard; @@ -3793,6 +3798,17 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned long pWindow->Resize(); } + +static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned long long int nWindowId, const char* pArguments) +{ + lcl_sendDialogEvent(nWindowId, pArguments); +} + +static void lo_sendDialogEvent(LibreOfficeKit* /*pThis*/, unsigned long long int nWindowId, const char* pArguments) +{ + lcl_sendDialogEvent(nWindowId, pArguments); +} + static void doc_postUnoCommand(LibreOfficeKitDocument* pThis, const char* pCommand, const char* pArguments, bool bNotifyWhenFinished) { comphelper::ProfileZone aZone("doc_postUnoCommand"); |