From f16f69f719b7efa99a2b3a4d73dffc2777d5d425 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Mon, 23 Jan 2023 14:32:15 +0100 Subject: lok: send status for file export dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I21530abc89808beb4c794f912e9453d8552c3b01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146006 Reviewed-by: Ashod Nakashian Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146573 Tested-by: Jenkins Reviewed-by: Szymon Kłos --- sfx2/source/doc/guisaveas.cxx | 7 +++++++ sfx2/source/doc/sfxbasemodel.cxx | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'sfx2') 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 #include +#include #include #include #include @@ -132,6 +133,8 @@ #include #include +#include + // 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( -- cgit