sfx2/source/doc/guisaveas.cxx    |    7 +++++++
 sfx2/source/doc/sfxbasemodel.cxx |    6 ++++++
 2 files changed, 13 insertions(+)

New commits:
commit a92f9760e1e7b8b92687ba705c42791f50df6794
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Mon Jan 23 14:32:15 2023 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Thu Jan 26 13:07:26 2023 +0000

    lok: send status for file export dialogs
    
    Change-Id: I21530abc89808beb4c794f912e9453d8552c3b01
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146006
    Reviewed-by: Ashod Nakashian <a...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 7a831f07a857..ab9ccd6494a0 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -675,12 +675,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 44cd4216bece..6554ed1f317e 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -62,6 +62,7 @@
 #include <comphelper/enumhelper.hxx>
 
 #include <cppuhelper/implbase.hxx>
+#include <comphelper/lok.hxx>
 #include <comphelper/multicontainer2.hxx>
 #include <cppuhelper/exc_hlp.hxx>
 #include <comphelper/processfactory.hxx>
@@ -130,6 +131,8 @@
 #include <vcl/threadex.hxx>
 #include <unotools/mediadescriptor.hxx>
 
+#include <LibreOfficeKit/LibreOfficeKitEnums.h>
+
 //  namespaces
 
 
@@ -3195,6 +3198,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(

Reply via email to