[Libreoffice-commits] core.git: 2 commits - desktop/source

Jan Holesovsky kendy at collabora.com
Mon Feb 8 19:11:41 UTC 2016


 desktop/source/lib/init.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 809154904fe66441ada6985b153b4c1b20f3eb8f
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Feb 8 20:09:37 2016 +0100

    lok: Interaction handler for saveAs() too.
    
    Change-Id: I3f0365e05685c21987da194e24a1165c7a3f8b5c

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index ca9d3f3..5d5fe77 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -663,6 +663,13 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha
         aSaveMediaDescriptor["FilterName"] <<= aFilterName;
         aSaveMediaDescriptor[MediaDescriptor::PROP_FILTEROPTIONS()] <<= aFilterOptions;
 
+        // add interaction handler too
+        rtl::Reference<LOKInteractionHandler> const pInteraction(
+            new LOKInteractionHandler(::comphelper::getProcessComponentContext(), "saveas", gImpl, pDocument));
+        uno::Reference<task::XInteractionHandler2> const xInteraction(pInteraction.get());
+
+        aSaveMediaDescriptor[MediaDescriptor::PROP_INTERACTIONHANDLER()] <<= xInteraction;
+
         uno::Reference<frame::XStorable> xStorable(pDocument->mxComponent, uno::UNO_QUERY_THROW);
         xStorable->storeAsURL(aURL, aSaveMediaDescriptor.getAsConstPropertyValueList());
 
commit bcc940956c4689888297c7bbe8d3744becc2fe9e
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Mon Feb 8 20:08:31 2016 +0100

    lok: Take over the identity of the document when performing saveAs().
    
    This way we are getting the .uno:ModifiedStatus notification even when
    performing saveAs().
    
    Change-Id: I370bf483c50161fd4b7f2255ae85fdb76487a9a0

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index eaac992..ca9d3f3 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -664,7 +664,7 @@ static int doc_saveAs(LibreOfficeKitDocument* pThis, const char* sUrl, const cha
         aSaveMediaDescriptor[MediaDescriptor::PROP_FILTEROPTIONS()] <<= aFilterOptions;
 
         uno::Reference<frame::XStorable> xStorable(pDocument->mxComponent, uno::UNO_QUERY_THROW);
-        xStorable->storeToURL(aURL, aSaveMediaDescriptor.getAsConstPropertyValueList());
+        xStorable->storeAsURL(aURL, aSaveMediaDescriptor.getAsConstPropertyValueList());
 
         return true;
     }


More information about the Libreoffice-commits mailing list