libreoffice/forms/source/xforms/submission.cxx

615 lines
19 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
re-base on ALv2 code. Includes: Patch contributed by Christian Lippka impress212: #i113063# patch: dubios self assign in svx/source/dialog/framelink.cxx http://svn.apache.org/viewvc?view=revision&revision=1167619 Patches contributed by Mathias Bauer gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 cws mba34issues01: #i117712#: fix several resource errors introduced by IAccessible2 implementation http://svn.apache.org/viewvc?view=revision&revision=1172343 cws mba34issues01: #i117719#: use correct resource ID http://svn.apache.org/viewvc?view=revision&revision=1172351 Patch contributed by Andre Fischer Do not add targets for junit tests when junit is disabled. http://svn.apache.org/viewvc?view=revision&revision=1241508 Patches contributed by Armin Le-Grand #118804# corrected GraphicExporter behaviour on shortcut when pixel graphic is requested http://svn.apache.org/viewvc?view=revision&revision=1240195 fix for #118525#: Using primitives for chart sub-geometry visualisation http://svn.apache.org/viewvc?view=revision&revision=1226879 #118485# - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 #118524: apply patch, followup fixes to 118485 http://svn.apache.org/viewvc?view=revision&revision=1186077 13f79535-47bb-0310-9956-ffa450edef68 Patch contributed by Regina Henschel linecap: Reintegrating finished LineCap feature http://svn.apache.org/viewvc?view=revision&revision=1232507 Patch contributed by Wang Lei (leiw) #i118760# split the first table cell vertically, then undo&redo, the Presentation app will crash http://svn.apache.org/viewvc?view=revision&revision=1301361 cleanup globlmn hacks, undo dependent fixmes.
2012-11-21 22:06:52 +00:00
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
#include "submission.hxx"
#include "model.hxx"
#include "binding.hxx"
#include "mip.hxx"
#include "evaluationcontext.hxx"
#include "unohelper.hxx"
#include "submission/submission_put.hxx"
#include "submission/submission_post.hxx"
#include "submission/submission_get.hxx"
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <com/sun/star/lang/NoSupportException.hpp>
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/xforms/XModel.hpp>
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/xml/dom/XNodeList.hpp>
#include <com/sun/star/xml/dom/XDocument.hpp>
#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
#include <com/sun/star/xml/dom/XDocumentFragment.hpp>
#include <com/sun/star/xml/dom/NodeType.hpp>
#include <com/sun/star/task/XInteractionHandler.hpp>
#include <com/sun/star/task/XInteractionRequest.hpp>
#include <com/sun/star/task/XInteractionContinuation.hpp>
#include <com/sun/star/xforms/InvalidDataOnSubmitException.hpp>
#include <com/sun/star/frame/XFrame.hpp>
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/propertysetinfo.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/processfactory.hxx>
#include <memory>
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
using com::sun::star::beans::UnknownPropertyException;
using com::sun::star::beans::PropertyVetoException;
using com::sun::star::lang::IllegalArgumentException;
using com::sun::star::util::VetoException;
using com::sun::star::form::submission::XSubmissionVetoListener;
using com::sun::star::lang::WrappedTargetException;
using com::sun::star::lang::NoSupportException;
using com::sun::star::task::XInteractionHandler;
using com::sun::star::task::XInteractionRequest;
using com::sun::star::task::XInteractionContinuation;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
using com::sun::star::xforms::XModel;
using com::sun::star::xforms::InvalidDataOnSubmitException;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
using com::sun::star::xml::xpath::XXPathObject;
using com::sun::star::frame::XFrame;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
using xforms::Submission;
using xforms::Model;
using xforms::MIP;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::xml::dom;
Submission::Submission() :
msID(),
msBind(),
maRef(),
msAction(),
msMethod(),
msVersion(),
mbIndent(),
msMediaType(),
msEncoding(),
mbOmitXmlDeclaration(),
mbStandalone(),
msCDataSectionElement(),
msReplace( "none" ),
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
msSeparator(),
msIncludeNamespacePrefixes()
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
initializePropertySet();
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
Submission::~Submission() throw()
{
}
void Submission::setModel( const Reference<XModel>& xModel )
{
mxModel = xModel;
}
void Submission::setID( const OUString& sID )
{
msID = sID;
}
void Submission::setBind( const OUString& sBind )
{
msBind = sBind;
}
OUString Submission::getRef() const
{
return maRef.getExpression();
}
void Submission::setRef( const OUString& sRef )
{
maRef.setExpression( sRef );
}
void Submission::setAction( const OUString& sAction )
{
msAction = sAction;
}
void Submission::setMethod( const OUString& sMethod )
{
msMethod = sMethod;
}
void Submission::setVersion( const OUString& sVersion )
{
msVersion = sVersion;
}
void Submission::setIndent( bool bIndent )
{
mbIndent = bIndent;
}
void Submission::setMediaType( const OUString& sMediaType )
{
msMediaType = sMediaType;
}
void Submission::setEncoding( const OUString& sEncoding )
{
msEncoding = sEncoding;
}
void Submission::setOmitXmlDeclaration( bool bOmitXmlDeclaration )
{
mbOmitXmlDeclaration = bOmitXmlDeclaration;
}
void Submission::setStandalone( bool bStandalone )
{
mbStandalone = bStandalone;
}
void Submission::setCDataSectionElement( const OUString& sCDataSectionElement )
{
msCDataSectionElement = sCDataSectionElement;
}
void Submission::setReplace( const OUString& sReplace )
{
msReplace = sReplace;
}
void Submission::setSeparator( const OUString& sSeparator )
{
msSeparator = sSeparator;
}
void Submission::setIncludeNamespacePrefixes( const Sequence< OUString >& rIncludeNamespacePrefixes )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
msIncludeNamespacePrefixes = rIncludeNamespacePrefixes;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
liveCheck();
// construct XXPathObject for submission doc; use bind in preference of ref
EvaluationContext aEvalContext;
ComputedExpression aExpression;
if( !msBind.isEmpty() )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
Binding* pBinding = Binding::getBinding( mxModel->getBinding(msBind) );
if( pBinding != nullptr )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
aExpression.setExpression( pBinding->getBindingExpression() );
aEvalContext = pBinding->getEvaluationContext();
}
// TODO: else: illegal binding name -> raise error
}
else if( !maRef.getExpression().isEmpty() )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
aExpression.setExpression( maRef.getExpression() );
aEvalContext = Model::getModel( mxModel )->getEvaluationContext();
}
else
{
aExpression.setExpression( "/" );
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
aEvalContext = Model::getModel( mxModel )->getEvaluationContext();
}
aExpression.evaluate( aEvalContext );
Reference<XXPathObject> xResult = aExpression.getXPath();
OSL_ENSURE( xResult.is(), "no result?" );
// early out if we have not obtained any result
if( ! xResult.is() )
return false;
// Reference< XNodeList > aList = xResult->getNodeList();
OUString aMethod = getMethod();
// strip whitespace-only text node for get submission
Reference< XDocumentFragment > aFragment = createSubmissionDocument(
xResult, aMethod.equalsIgnoreAsciiCase("get"));
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
// submit result; set encoding, etc.
std::unique_ptr<CSubmission> xSubmission;
if (aMethod.equalsIgnoreAsciiCase("PUT"))
xSubmission.reset(new CSubmissionPut( getAction(), aFragment));
else if (aMethod.equalsIgnoreAsciiCase("post"))
xSubmission.reset(new CSubmissionPost( getAction(), aFragment));
else if (aMethod.equalsIgnoreAsciiCase("get"))
xSubmission.reset(new CSubmissionGet( getAction(), aFragment));
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
else
{
OSL_FAIL("Unsupported xforms submission method");
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
return false;
}
xSubmission->setEncoding(getEncoding());
CSubmission::SubmissionResult aResult = xSubmission->submit( xHandler );
if (aResult == CSubmission::SUCCESS)
{
Reference< XDocument > aInstanceDoc = getInstanceDocument(xResult);
aResult = xSubmission->replace(getReplace(), aInstanceDoc, Reference< XFrame >());
}
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
return ( aResult == CSubmission::SUCCESS );
}
Sequence<sal_Int8> Submission::getUnoTunnelID()
{
static cppu::OImplementationId aImplementationId;
return aImplementationId.getImplementationId();
}
Submission* Submission::getSubmission(
const Reference<XPropertySet>& xPropertySet )
{
Reference<XUnoTunnel> xTunnel( xPropertySet, UNO_QUERY );
return xTunnel.is()
? reinterpret_cast<Submission*>(
xTunnel->getSomething( getUnoTunnelID() ) )
: nullptr;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
void Submission::liveCheck()
{
bool bValid = mxModel.is();
if( ! bValid )
throw RuntimeException();
}
Model* Submission::getModelImpl() const
{
Model* pModel = nullptr;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
if( mxModel.is() )
pModel = Model::getModel( mxModel );
return pModel;
}
// Property-Set implementation
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
#define HANDLE_ID 0
#define HANDLE_Bind 1
#define HANDLE_Ref 2
#define HANDLE_Action 3
#define HANDLE_Method 4
#define HANDLE_Version 5
#define HANDLE_Indent 6
#define HANDLE_MediaType 7
#define HANDLE_Encoding 8
#define HANDLE_OmitXmlDeclaration 9
#define HANDLE_Standalone 10
#define HANDLE_CDataSectionElement 11
#define HANDLE_Replace 12
#define HANDLE_Separator 13
#define HANDLE_IncludeNamespacePrefixes 14
#define HANDLE_Model 15
#define REGISTER_PROPERTY( property, type ) \
registerProperty( PROPERTY( property, type ), \
new DirectPropertyAccessor< Submission, type >( this, &Submission::set##property, &Submission::get##property ) );
#define REGISTER_PROPERTY_BOOL( property ) \
registerProperty( PROPERTY( property, bool ), \
new BooleanPropertyAccessor< Submission >( this, &Submission::set##property, &Submission::get##property ) );
void Submission::initializePropertySet()
{
REGISTER_PROPERTY ( ID, OUString );
REGISTER_PROPERTY ( Bind, OUString );
REGISTER_PROPERTY ( Ref, OUString );
REGISTER_PROPERTY ( Action, OUString );
REGISTER_PROPERTY ( Method, OUString );
REGISTER_PROPERTY ( Version, OUString );
REGISTER_PROPERTY_BOOL( Indent );
REGISTER_PROPERTY ( MediaType, OUString );
REGISTER_PROPERTY ( Encoding, OUString );
REGISTER_PROPERTY_BOOL( OmitXmlDeclaration );
REGISTER_PROPERTY_BOOL( Standalone );
REGISTER_PROPERTY ( CDataSectionElement, OUString );
REGISTER_PROPERTY ( Replace, OUString );
REGISTER_PROPERTY ( Separator, OUString );
REGISTER_PROPERTY ( IncludeNamespacePrefixes, Sequence< OUString > );
REGISTER_PROPERTY ( Model, Reference<XModel> );
initializePropertyValueCache( HANDLE_Indent );
initializePropertyValueCache( HANDLE_OmitXmlDeclaration );
initializePropertyValueCache( HANDLE_Standalone );
}
sal_Bool SAL_CALL Submission::convertFastPropertyValue(
Any& rConvertedValue, Any& rOldValue, sal_Int32 nHandle, const Any& rValue )
{
if ( nHandle == HANDLE_IncludeNamespacePrefixes )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
// for convenience reasons (????), we accept a string which contains
// a comma-separated list of namespace prefixes
OUString sTokenList;
if ( rValue >>= sTokenList )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
std::vector< OUString > aPrefixes;
sal_Int32 p = 0;
while ( p >= 0 )
aPrefixes.push_back( sTokenList.getToken( 0, ',', p ) );
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
Sequence< OUString > aConvertedPrefixes( &aPrefixes[0], aPrefixes.size() );
return PropertySetBase::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, makeAny( aConvertedPrefixes ) );
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
}
return PropertySetBase::convertFastPropertyValue( rConvertedValue, rOldValue, nHandle, rValue );
}
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
OUString SAL_CALL Submission::getName()
{
return getID();
}
void SAL_CALL Submission::setName( const OUString& sID )
{
setID( sID );
}
sal_Int64 SAL_CALL Submission::getSomething(
const Sequence<sal_Int8>& aId )
{
return ( aId == getUnoTunnelID() ) ? reinterpret_cast<sal_Int64>(this) : 0;
}
static OUString lcl_message( const OUString& rID, const OUString& rText )
{
OUString aMessage = "XForms submission '" + rID + "' failed" + rText + ".";
return aMessage;
}
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
void SAL_CALL Submission::submitWithInteraction(
const Reference<XInteractionHandler>& _rxHandler )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
// as long as this class is not really threadsafe, we need to copy
// the members we're interested in
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
Reference< XModel > xModel( mxModel );
OUString sID( msID );
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
if ( !xModel.is() || msID.isEmpty() )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
throw RuntimeException(
"This is not a valid submission object.",
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
*this
);
Model* pModel = Model::getModel( xModel );
OSL_ENSURE( pModel != nullptr, "illegal model?" );
// #i36765# #i47248# warning on submission of illegal data
// check for validity (and query user if invalid)
bool bValid = pModel->isValid();
if( ! bValid )
{
InvalidDataOnSubmitException aInvalidDataException(
lcl_message(sID, " due to invalid data" ), *this );
if( _rxHandler.is() )
{
// laboriously create interaction request
comphelper::OInteractionRequest* pRequest
= new comphelper::OInteractionRequest(
makeAny( aInvalidDataException ) );
Reference<XInteractionRequest> xRequest = pRequest;
comphelper::OInteractionApprove* pContinue
= new comphelper::OInteractionApprove();
Reference<XInteractionContinuation> xContinue = pContinue;
pRequest->addContinuation( xContinue );
comphelper::OInteractionDisapprove* pCancel
= new comphelper::OInteractionDisapprove();
Reference<XInteractionContinuation> xCancel = pCancel;
pRequest->addContinuation( xCancel );
// ask the handler...
_rxHandler->handle( xRequest );
OSL_ENSURE( pContinue->wasSelected() || pCancel->wasSelected(),
"handler didn't select" );
// and continue, if user chose 'continue'
if( pContinue->wasSelected() )
bValid = true;
}
// abort if invalid (and user didn't tell us to continue)
if( ! bValid )
throw aInvalidDataException;
}
// attempt submission
bool bResult = false;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
try
{
bResult = doSubmit( _rxHandler );
}
catch( const VetoException& )
{
OSL_FAIL( "Model::submit: Hmm. How can a single submission have a veto right?" );
// allowed to leave
throw;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
catch( const Exception& e )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
// exception caught: re-throw as wrapped target exception
throw WrappedTargetException(
lcl_message( sID, " due to exception being thrown" ),
*this, makeAny( e ) );
}
if( bResult )
{
mxModel->rebuild();
}
else
{
// other failure: throw wrapped target exception, too.
throw WrappedTargetException(
lcl_message( sID, OUString() ), *this, Any() );
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
}
void SAL_CALL Submission::submit( )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
submitWithInteraction( nullptr );
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
void SAL_CALL Submission::addSubmissionVetoListener( const Reference< XSubmissionVetoListener >& /*listener*/ )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
// TODO
throw NoSupportException();
}
void SAL_CALL Submission::removeSubmissionVetoListener( const Reference< XSubmissionVetoListener >& /*listener*/ )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
// TODO
throw NoSupportException();
}
static bool isIgnorable(const Reference< XNode >& aNode)
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
// ignore whitespace-only textnodes
if (aNode->getNodeType() == NodeType_TEXT_NODE)
{
OUString aTrimmedValue = aNode->getNodeValue().trim();
if (aTrimmedValue.isEmpty()) return true;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
return false;
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
// recursively copy relevant nodes from A to B
static void cloneNodes(Model& aModel, const Reference< XNode >& dstParent, const Reference< XNode >& source, bool bRemoveWSNodes)
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
if (!source.is()) return;
Reference< XNode > cur = source;
Reference< XDocument > dstDoc = dstParent->getOwnerDocument();
Reference< XNode > imported;
if (cur.is())
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
// is this node relevant?
MIP mip = aModel.queryMIP(cur);
if(mip.isRelevant() && !(bRemoveWSNodes && isIgnorable(cur)))
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
imported = dstDoc->importNode(cur, false);
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
imported = dstParent->appendChild(imported);
// append source children to new imported parent
for( cur = cur->getFirstChild(); cur.is(); cur = cur->getNextSibling() )
cloneNodes(aModel, imported, cur, bRemoveWSNodes);
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
}
}
Reference< XDocument > Submission::getInstanceDocument(const Reference< XXPathObject >& aObj)
{
using namespace css::xml::xpath;
// result
Reference< XDocument > aDocument;
if (aObj->getObjectType() == XPathObjectType_XPATH_NODESET)
{
Reference< XNodeList > aList = aObj->getNodeList();
if (aList->getLength() > 0)
aDocument = aList->item(0)->getOwnerDocument();
}
return aDocument;
}
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
Reference< XDocumentFragment > Submission::createSubmissionDocument(const Reference< XXPathObject >& aObj, bool bRemoveWSNodes)
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
using namespace css::xml::xpath;
Reference< XDocumentBuilder > aDocBuilder = DocumentBuilder::create(comphelper::getProcessComponentContext());
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
Reference< XDocument > aDocument = aDocBuilder->newDocument();
Reference< XDocumentFragment > aFragment = aDocument->createDocumentFragment();
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
if (aObj->getObjectType() == XPathObjectType_XPATH_NODESET)
{
Reference< XNodeList > aList = aObj->getNodeList();
Reference< XNode > aListItem;
for (sal_Int32 i=0; i < aList->getLength(); i++)
{
aListItem = aList->item(i);
if (aListItem->getNodeType()==NodeType_DOCUMENT_NODE)
aListItem.set( (Reference< XDocument >(aListItem, UNO_QUERY))->getDocumentElement(), UNO_QUERY);
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
// copy relevant nodes from instance into fragment
cloneNodes(*getModelImpl(), aFragment, aListItem, bRemoveWSNodes);
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
}
}
return aFragment;
}
// some forwarding: XPropertySet is implemented in our base class,
// but also available as base of XSubmission
Reference< css::beans::XPropertySetInfo > SAL_CALL Submission::getPropertySetInfo( )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
return PropertySetBase::getPropertySetInfo();
}
void SAL_CALL Submission::setPropertyValue( const OUString& aPropertyName, const Any& aValue )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
PropertySetBase::setPropertyValue( aPropertyName, aValue );
}
Any SAL_CALL Submission::getPropertyValue( const OUString& PropertyName )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
return PropertySetBase::getPropertyValue( PropertyName );
}
void SAL_CALL Submission::addPropertyChangeListener( const OUString& aPropertyName, const Reference< css::beans::XPropertyChangeListener >& xListener )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
PropertySetBase::addPropertyChangeListener( aPropertyName, xListener );
}
void SAL_CALL Submission::removePropertyChangeListener( const OUString& aPropertyName, const Reference< css::beans::XPropertyChangeListener >& aListener )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
PropertySetBase::removePropertyChangeListener( aPropertyName, aListener );
}
void SAL_CALL Submission::addVetoableChangeListener( const OUString& PropertyName, const Reference< css::beans::XVetoableChangeListener >& aListener )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
PropertySetBase::addVetoableChangeListener( PropertyName, aListener );
}
void SAL_CALL Submission::removeVetoableChangeListener( const OUString& PropertyName, const Reference< css::beans::XVetoableChangeListener >& aListener )
INTEGRATION: CWS eforms2 (1.1.2); FILE ADDED 2004/11/05 17:50:11 fs 1.1.2.15: #i36765# allow submission with InteractionHandler 2004/10/01 19:01:24 dvo 1.1.2.14: #i34793# throw WrappedTargetException/RuntimeException for submission errors Issue number: Submitted by: Reviewed by: 2004/09/14 09:53:18 dvo 1.1.2.13: #i33880# ensure that submission always knows its model Issue number: Submitted by: Reviewed by: 2004/08/11 18:07:00 dvo 1.1.2.12: #i31958# default "none" for replace Issue number: Submitted by: Reviewed by: 2004/08/06 14:00:50 fs 1.1.2.11: #i31958# keep our PropertySetInfo alive 2004/07/12 14:11:55 fs 1.1.2.10: #114856# introduced and used XSubmission 2004/06/04 13:37:15 dvo 1.1.2.9: #114856# solve compilation problems uncovered with gcc Issue number: Submitted by: Reviewed by: 2004/04/26 11:42:27 dvo 1.1.2.8: #114856# observe bidn and ref attributes on submission Issue number: Submitted by: Reviewed by: 2004/04/23 14:04:47 lo 1.1.2.7: #i26721# put/get/post support 2004/04/23 11:30:09 lo 1.1.2.6: #i26721# put/get/post support for submission 2004/04/23 09:46:16 lo 1.1.2.5: #i26721# put/get/post support for submission 2004/04/22 09:13:36 dvo 1.1.2.4: #114856# improve dynamic binding capability Issue number: Submitted by: Reviewed by: 2004/04/07 13:29:50 dvo 1.1.2.3: #114856# continue implementation Issue number: Submitted by: Reviewed by: 2004/04/06 11:18:15 lo 1.1.2.2: #114856# submission cont. 2004/04/01 11:25:06 dvo 1.1.2.1: #114856# add submission Issue number: Submitted by: Reviewed by:
2004-11-16 09:56:45 +00:00
{
PropertySetBase::removeVetoableChangeListener( PropertyName, aListener );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */