diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-01-23 14:32:15 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-02-06 16:30:59 +0000 |
commit | f16f69f719b7efa99a2b3a4d73dffc2777d5d425 (patch) | |
tree | 6bfb1cd0c5636f136706de6e7428541fdacfc770 /sfx2 | |
parent | 1f373260cf25ca2f36a929e1a27fde00641e5c09 (diff) |
lok: send status for file export dialogs
Change-Id: I21530abc89808beb4c794f912e9453d8552c3b01
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146006
Reviewed-by: Ashod Nakashian <ash@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146573
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/guisaveas.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index dc32d10c103b..cdda49e10b72 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -674,12 +674,19 @@ IMPL_LINK( ModelData_Impl, OptionsDialogClosedHdl, css::ui::dialogs::DialogClose { if (pEvt->DialogResult == RET_OK && m_xFilterProperties) { + if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() ) + SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "PENDING" ); + const uno::Sequence< beans::PropertyValue > aPropsFromDialog = m_xFilterProperties->getPropertyValues(); for ( const auto& rProp : aPropsFromDialog ) GetMediaDescr()[rProp.Name] = rProp.Value; m_pOwner->CallFinishGUIStoreModel(); } + else if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() ) + { + SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "ABORT" ); + } } sal_Int8 ModelData_Impl::CheckSaveAcceptable( sal_Int8 nCurStatus ) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index bcdc9f1be845..dcc559fc4f87 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -63,6 +63,7 @@ #include <comphelper/string.hxx> #include <cppuhelper/implbase.hxx> +#include <comphelper/lok.hxx> #include <comphelper/multicontainer2.hxx> #include <cppuhelper/exc_hlp.hxx> #include <comphelper/processfactory.hxx> @@ -132,6 +133,8 @@ #include <vcl/threadex.hxx> #include <unotools/mediadescriptor.hxx> +#include <LibreOfficeKit/LibreOfficeKitEnums.h> + // namespaces @@ -3208,6 +3211,9 @@ void SfxBaseModel::impl_store( const OUString& sURL SfxGetpApp()->NotifyEvent( SfxEventHint( bSaveTo ? SfxEventHintId::SaveToDocFailed : SfxEventHintId::SaveAsDocFailed, GlobalEventConfig::GetEventName( bSaveTo ? GlobalEventId::SAVETODOCFAILED : GlobalEventId::SAVEASDOCFAILED), m_pData->m_pObjectShell.get() ) ); + if ( comphelper::LibreOfficeKit::isActive() && SfxViewShell::Current() ) + SfxViewShell::Current()->libreOfficeKitViewCallback( LOK_CALLBACK_EXPORT_FILE, "ERROR" ); + std::stringstream aErrCode; aErrCode << nErrCode; throw task::ErrorCodeIOException( |