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

Michael Stahl mstahl at redhat.com
Mon Jul 27 12:28:26 PDT 2015


 comphelper/source/misc/interaction.cxx         |    6 +++
 desktop/source/deployment/misc/dp_interact.cxx |   41 ++-----------------------
 include/comphelper/interaction.hxx             |    2 +
 3 files changed, 12 insertions(+), 37 deletions(-)

New commits:
commit 18110ca3bdc9542e28480d5719f33c429b325402
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Jul 27 20:43:53 2015 +0200

    comphelper, desktop: fix MSVC mergedlib link failure
    
    Duplicate symbols are easily avoided by removing duplicate code.
    
    Change-Id: I9b598a44156d6ff71b0691e69ab8163b15e2e26f

diff --git a/comphelper/source/misc/interaction.cxx b/comphelper/source/misc/interaction.cxx
index 9c96c3e..d16aed7 100644
--- a/comphelper/source/misc/interaction.cxx
+++ b/comphelper/source/misc/interaction.cxx
@@ -44,6 +44,12 @@ namespace comphelper
     {
     }
 
+    OInteractionRequest::OInteractionRequest(const Any& rRequestDescription,
+            Sequence<Reference<XInteractionContinuation>> const& rContinuations)
+        : m_aRequest(rRequestDescription)
+        , m_aContinuations(rContinuations)
+    {
+    }
 
     void OInteractionRequest::addContinuation(const Reference< XInteractionContinuation >& _rxContinuation)
     {
diff --git a/desktop/source/deployment/misc/dp_interact.cxx b/desktop/source/deployment/misc/dp_interact.cxx
index 8407c50..69f8558 100644
--- a/desktop/source/deployment/misc/dp_interact.cxx
+++ b/desktop/source/deployment/misc/dp_interact.cxx
@@ -19,6 +19,9 @@
 
 
 #include "dp_interact.h"
+
+#include <comphelper/interaction.hxx>
+
 #include <cppuhelper/exc_hlp.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <com/sun/star/task/XInteractionAbort.hpp>
@@ -88,42 +91,6 @@ void InteractionContinuationImpl::select() throw (RuntimeException, std::excepti
     *m_pselect = true;
 }
 
-
-class InteractionRequest :
-    public ::cppu::WeakImplHelper<task::XInteractionRequest>
-{
-    Any m_request;
-    Sequence< Reference<task::XInteractionContinuation> > m_conts;
-
-public:
-    inline InteractionRequest(
-        Any const & request,
-        Sequence< Reference<task::XInteractionContinuation> > const & conts )
-        : m_request( request ),
-          m_conts( conts )
-        {}
-
-    // XInteractionRequest
-    virtual Any SAL_CALL getRequest()
-        throw (RuntimeException, std::exception) SAL_OVERRIDE;
-    virtual Sequence< Reference<task::XInteractionContinuation> >
-    SAL_CALL getContinuations() throw (RuntimeException, std::exception) SAL_OVERRIDE;
-};
-
-// XInteractionRequest
-
-Any InteractionRequest::getRequest() throw (RuntimeException, std::exception)
-{
-    return m_request;
-}
-
-
-Sequence< Reference< task::XInteractionContinuation > >
-InteractionRequest::getContinuations() throw (RuntimeException, std::exception)
-{
-    return m_conts;
-}
-
 } // anon namespace
 
 
@@ -147,7 +114,7 @@ bool interactContinuation( Any const & request,
             conts[ 1 ] = new InteractionContinuationImpl(
                 cppu::UnoType<task::XInteractionAbort>::get(), &abort );
             xInteractionHandler->handle(
-                new InteractionRequest( request, conts ) );
+                new ::comphelper::OInteractionRequest( request, conts ) );
             if (cont || abort) {
                 if (pcont != 0)
                     *pcont = cont;
diff --git a/include/comphelper/interaction.hxx b/include/comphelper/interaction.hxx
index c845213..7135d99 100644
--- a/include/comphelper/interaction.hxx
+++ b/include/comphelper/interaction.hxx
@@ -140,6 +140,8 @@ namespace comphelper
 
     public:
         OInteractionRequest(const ::com::sun::star::uno::Any& _rRequestDescription);
+        OInteractionRequest(const ::com::sun::star::uno::Any& rRequestDescription,
+            css::uno::Sequence<css::uno::Reference<css::task::XInteractionContinuation>> const& rContinuations);
 
         /// add a new continuation
         void addContinuation(const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >& _rxContinuation);


More information about the Libreoffice-commits mailing list