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

New commits:
commit f16f69f719b7efa99a2b3a4d73dffc2777d5d425
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: Mon Feb 6 16:30:59 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>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146573
    Tested-by: Jenkins
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

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(

Reply via email to