Kaydet (Commit) 3d7b7e80 authored tarafından Vladimir Glazounov's avatar Vladimir Glazounov

INTEGRATION: CWS eforms4 (1.2.6); FILE MERGED

2005/03/16 10:32:44 lo 1.2.6.2: #i36288# replace after submission
2004/12/14 16:08:29 dvo 1.2.6.1: #i36765# use Interaction Handler for submission warning & submission itself
Issue number:
Submitted by:
Reviewed by:
üst 558ae926
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: submission.hxx,v $ * $RCSfile: submission.hxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: obo $ $Date: 2004-11-16 11:00:17 $ * last change: $Author: vg $ $Date: 2005-03-23 11:40:02 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -75,8 +75,11 @@ ...@@ -75,8 +75,11 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp> #include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/ucb/XProgressHandler.hpp> #include <com/sun/star/ucb/XProgressHandler.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx> #include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase3.hxx> #include <cppuhelper/implbase3.hxx>
...@@ -148,6 +151,7 @@ protected: ...@@ -148,6 +151,7 @@ protected:
INetURLObject m_aURLObj; INetURLObject m_aURLObj;
CSS::uno::Reference< CSS::xml::xpath::XXPathObject > m_aXPathObject; CSS::uno::Reference< CSS::xml::xpath::XXPathObject > m_aXPathObject;
CSS::uno::Reference< CSS::xml::dom::XDocumentFragment > m_aFragment; CSS::uno::Reference< CSS::xml::dom::XDocumentFragment > m_aFragment;
CSS::uno::Reference< CSS::io::XInputStream > m_aResultStream;
rtl::OUString m_aEncoding; rtl::OUString m_aEncoding;
public: public:
...@@ -170,7 +174,9 @@ public: ...@@ -170,7 +174,9 @@ public:
{ {
m_aEncoding = aEncoding; m_aEncoding = aEncoding;
} }
virtual SubmissionResult submit() = 0; virtual SubmissionResult submit(const CSS::uno::Reference< CSS::task::XInteractionHandler >& ) = 0;
virtual SubmissionResult replace(const rtl::OUString&, const CSS::uno::Reference< CSS::xml::dom::XDocument >&, const CSS::uno::Reference< CSS::frame::XFrame>&);
}; };
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: submission_get.cxx,v $ * $RCSfile: submission_get.cxx,v $
* *
* $Revision: 1.2 $ * $Revision: 1.3 $
* *
* last change: $Author: obo $ $Date: 2004-11-16 11:00:30 $ * last change: $Author: vg $ $Date: 2005-03-23 11:40:14 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -87,7 +87,7 @@ CSubmissionGet::CSubmissionGet(const rtl::OUString& aURL, const CSS::uno::Refere ...@@ -87,7 +87,7 @@ CSubmissionGet::CSubmissionGet(const rtl::OUString& aURL, const CSS::uno::Refere
{ {
} }
CSubmission::SubmissionResult CSubmissionGet::submit() CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference< CSS::task::XInteractionHandler >& aInteractionHandler)
{ {
// GET always uses apllicatin/x-www-formurlencoded // GET always uses apllicatin/x-www-formurlencoded
auto_ptr< CSerialization > apSerialization(new CSerializationURLEncoded()); auto_ptr< CSerialization > apSerialization(new CSerializationURLEncoded());
...@@ -98,8 +98,11 @@ CSubmission::SubmissionResult CSubmissionGet::submit() ...@@ -98,8 +98,11 @@ CSubmission::SubmissionResult CSubmissionGet::submit()
// create a commandEnvironment and use the default interaction handler // create a commandEnvironment and use the default interaction handler
CCommandEnvironmentHelper *pHelper = new CCommandEnvironmentHelper; CCommandEnvironmentHelper *pHelper = new CCommandEnvironmentHelper;
pHelper->m_aInteractionHandler = Reference< XInteractionHandler >(m_aFactory->createInstance( if( aInteractionHandler.is() )
OUString::createFromAscii("com.sun.star.task.InteractionHandler")), UNO_QUERY); pHelper->m_aInteractionHandler = aInteractionHandler;
else
pHelper->m_aInteractionHandler = Reference< XInteractionHandler >(m_aFactory->createInstance(
OUString::createFromAscii("com.sun.star.task.InteractionHandler")), UNO_QUERY);
OSL_ENSURE(pHelper->m_aInteractionHandler.is(), "failed to create IntreractionHandler"); OSL_ENSURE(pHelper->m_aInteractionHandler.is(), "failed to create IntreractionHandler");
CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper; CProgressHandlerHelper *pProgressHelper = new CProgressHandlerHelper;
pHelper->m_aProgressHandler = Reference< XProgressHandler >(pProgressHelper); pHelper->m_aProgressHandler = Reference< XProgressHandler >(pProgressHelper);
...@@ -139,8 +142,12 @@ CSubmission::SubmissionResult CSubmissionGet::submit() ...@@ -139,8 +142,12 @@ CSubmission::SubmissionResult CSubmissionGet::submit()
Reference< XOutputStream > aPipe(m_aFactory->createInstance( Reference< XOutputStream > aPipe(m_aFactory->createInstance(
OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY_THROW); OUString::createFromAscii("com.sun.star.io.Pipe")), UNO_QUERY_THROW);
aContent.openStream(aPipe); aContent.openStream(aPipe);
// what to do with the reply? // get reply
try {
m_aResultStream = aContent.openStream();
} catch (Exception& oe) {
OSL_ENSURE(sal_False, "Cannot open reply stream from content");
}
} catch (Exception& e) } catch (Exception& e)
{ {
// XXX // XXX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment