LibreOffice Module forms (master) 1
model.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20
21#include "model.hxx"
22
23#include "model_helper.hxx"
24#include "unohelper.hxx"
25#include "binding.hxx"
26#include "submission.hxx"
27#include "mip.hxx"
28#include "evaluationcontext.hxx"
29#include "xmlhelper.hxx"
31#include "NameContainer.hxx"
32
33#include <rtl/ustring.hxx>
34#include <rtl/ustrbuf.hxx>
35#include <tools/debug.hxx>
36
40
41#include <algorithm>
42
43// UNO classes
44#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
45#include <com/sun/star/xml/dom/XDocument.hpp>
46#include <com/sun/star/xml/dom/XCharacterData.hpp>
47#include <com/sun/star/xml/dom/NodeType.hpp>
48#include <com/sun/star/xml/dom/XDocumentBuilder.hpp>
49#include <com/sun/star/uno/Sequence.hxx>
50#include <com/sun/star/beans/PropertyValue.hpp>
51#include <com/sun/star/ucb/SimpleFileAccess.hpp>
52#include <com/sun/star/io/XInputStream.hpp>
53
54
56using com::sun::star::beans::PropertyValue;
57using com::sun::star::ucb::SimpleFileAccess;
58using com::sun::star::io::XInputStream;
59
60using namespace com::sun::star::uno;
61using namespace com::sun::star::xml::dom;
62using namespace xforms;
63
64
65#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
66#define DBG_INVARIANT_TYPE(TYPE) class DBG_##TYPE { const TYPE* mpT; void check() { mpT->dbg_assertInvariant(); } public: DBG_##TYPE(const TYPE* pT) : mpT(pT) { check(); } ~DBG_##TYPE() { check(); } } _DBG_##TYPE(this);
67
68#define DBG_INVARIANT() DBG_INVARIANT_TYPE(Model)
69#else
70#define DBG_INVARIANT()
71#endif
72
73
74// The Model
75
76
77void Model::ensureAtLeastOneInstance()
78{
79 if( ! mxInstances->hasItems() )
80 {
81 // create a default instance
82 newInstance( OUString(), OUString(), true );
83 }
84}
85
86
89 mxInstances( new InstanceCollection ),
90 mxNamespaces( new NameContainer<OUString>() ),
91 mbInitialized( false ),
92 mbExternalData( true )
93{
95
96 // initialize bindings collections
97 // (not in initializer list to avoid use of incomplete 'this')
98 mxBindings = new BindingCollection( this );
100
101 // invariant only holds after construction
103}
104
106{
107}
108
110{
111 // the default context is the top-level element node. A default
112 // node (instanceData' is inserted when there is no default node
114 Reference<XNode> xElement = xInstance->getDocumentElement();
115
116 // no element found? Then insert default element 'instanceData'
117 if( ! xElement.is() )
118 {
119 xElement.set( xInstance->createElement( "instanceData" ), UNO_QUERY_THROW );
120 xInstance->appendChild( xElement );
121 }
122
123 OSL_ENSURE( xElement.is() &&
124 xElement->getNodeType() == NodeType_ELEMENT_NODE,
125 "no element in evaluation context" );
126
127 return EvaluationContext( xElement, this, mxNamespaces );
128}
129
130
131void Model::setForeignSchema( const css::uno::Reference<css::xml::dom::XDocument>& rDocument )
132{
133 mxForeignSchema = rDocument;
134}
135
136
137void Model::setSchemaRef( const OUString& rSchemaRef )
138{
139 msSchemaRef = rSchemaRef;
140}
141
142
143void Model::setNamespaces( const css::uno::Reference<css::container::XNameContainer>& rNamespaces )
144{
145 if( rNamespaces.is() )
146 mxNamespaces = rNamespaces;
147}
148
149
150void Model::setExternalData( bool _bData )
151{
152 mbExternalData = _bData;
153}
154
155#if OSL_DEBUG_LEVEL > 0 && !defined NDEBUG
157{
158 assert(mxInstances && "no instances found");
159 assert(mxBindings && "no bindings element");
160 assert(mxSubmissions && "no submissions element");
161}
162#endif
163
164
165// MIP management
166void Model::addMIP( void* pTag, const XNode_t& xNode, const MIP& rMIP )
167{
168 OSL_ENSURE( pTag != nullptr, "empty tag?" );
169 OSL_ENSURE( xNode.is(), "no node" );
170
171 MIPs_t::value_type aValue( xNode, ::std::pair<void*,MIP>( pTag, rMIP ) );
172 maMIPs.insert( aValue );
173}
174
175void Model::removeMIPs( void const * pTag )
176{
177 OSL_ENSURE( pTag != nullptr, "empty tag?" );
178
179 for( MIPs_t::iterator aIter = maMIPs.begin();
180 aIter != maMIPs.end(); )
181 {
182 if( aIter->second.first == pTag )
183 {
184 aIter = maMIPs.erase( aIter );
185 }
186 else
187 ++aIter;
188 }
189}
190
191MIP Model::queryMIP( const XNode_t& xNode ) const
192{
193 // travel up inheritance chain and inherit MIPs
194 MIP aRet;
195 for( XNode_t xCurrent = xNode;
196 xCurrent.is();
197 xCurrent = xCurrent->getParentNode() )
198 {
199 // iterate over all MIPs for this node, and join MIPs
200 MIP aMIP;
201 MIPs_t::const_iterator aEnd = maMIPs.upper_bound( xCurrent );
202 MIPs_t::const_iterator aIter = maMIPs.lower_bound( xCurrent );
203 for( ; aIter != aEnd; ++aIter )
204 aMIP.join( aIter->second.second );
205
206 // inherit from current node (or set if we are at the start node)
207 if( xCurrent == xNode )
208 aRet = aMIP;
209 else
210 aRet.inherit( aMIP );
211 }
212
213 return aRet;
214}
215
216
218{
219 OSL_ENSURE( mxBindings, "bindings?" );
220
221 // iterate over all bindings and call update
222 sal_Int32 nCount = mxBindings->countItems();
223 for( sal_Int32 i = 0; i < nCount; i++ )
224 {
225 Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) );
226 OSL_ENSURE( pBind != nullptr, "binding?" );
227 pBind->update();
228 }
229}
230
231
232void Model::deferNotifications( bool bDefer )
233{
234 // iterate over all bindings and defer notifications
235 sal_Int32 nCount = mxBindings->countItems();
236 for( sal_Int32 i = 0; i < nCount; i++ )
237 {
238 Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) );
239 OSL_ENSURE( pBind != nullptr, "binding?" );
240 pBind->deferNotifications( bDefer );
241 }
242}
243
244
245bool Model::setSimpleContent( const XNode_t& xConstNode,
246 const OUString& sValue )
247{
248 OSL_ENSURE( xConstNode.is(), "need node to set data" );
249
250 bool bRet = false;
251 if( xConstNode.is() )
252 {
253 // non-const node reference so we can assign children (if necessary)
254 XNode_t xNode( xConstNode );
255
256 switch( xNode->getNodeType() )
257 {
258 case NodeType_ELEMENT_NODE:
259 {
260 // find first text node child
261 Reference<XNode> xChild;
262 for( xChild = xNode->getFirstChild();
263 xChild.is() && xChild->getNodeType() != NodeType_TEXT_NODE;
264 xChild = xChild->getNextSibling() )
265 ; // empty loop; only find first text node child
266
267 // create text node, if none is found
268 if( ! xChild.is() )
269 {
270 xChild.set(
271 xNode->getOwnerDocument()->createTextNode( OUString() ),
272 UNO_QUERY_THROW );
273 xNode->appendChild( xChild );
274 }
275 xNode = xChild;
276
277 OSL_ENSURE( xNode.is() &&
278 xNode->getNodeType() == NodeType_TEXT_NODE,
279 "text node creation failed?" );
280 [[fallthrough]]; // continue as with text node:
281 }
282
283 case NodeType_TEXT_NODE:
284 case NodeType_ATTRIBUTE_NODE:
285 {
286 // set the node value (defer notifications)
287 if( xNode->getNodeValue() != sValue )
288 {
289 deferNotifications( true );
290 xNode->setNodeValue( sValue );
291 deferNotifications( false );
292 }
293 bRet = true;
294 }
295 break;
296
297 default:
298 {
299 OSL_FAIL( "bound to unknown node type?" );
300 }
301 break;
302
303 }
304 }
305 return bRet;
306}
307
308void Model::loadInstance( sal_Int32 nInstance )
309{
310 Sequence<PropertyValue> aSequence = mxInstances->getItem( nInstance );
311
312 // find URL from instance
313 OUString sURL;
314 bool bOnce = false;
315 getInstanceData( aSequence, nullptr, nullptr, &sURL, &bOnce );
316
317 // if we have a URL, load the document and set it into the instance
318 if( sURL.isEmpty() )
319 return;
320
321 try
322 {
324 SimpleFileAccess::create( ::comphelper::getProcessComponentContext() )->openFileRead( sURL );
325 if( xInput.is() )
326 {
327 Reference<XDocument> xInstance =
328 getDocumentBuilder()->parse( xInput );
329 if( xInstance.is() )
330 {
331 OUString sEmpty;
332 setInstanceData( aSequence, nullptr, &xInstance,
333 bOnce ? &sEmpty : &sURL, nullptr);
334 mxInstances->setItem( nInstance, aSequence );
335 }
336 }
337 }
338 catch( const Exception& )
339 {
340 // couldn't load the instance -> ignore!
341 }
342}
343
345{
346 // iterate over instance array to get PropertyValue-Sequence
347 const sal_Int32 nInstances = mxInstances->countItems();
348 for( sal_Int32 nInstance = 0; nInstance < nInstances; nInstance++ )
349 {
350 loadInstance( nInstance );
351 }
352}
353
354
355bool Model::isValid() const
356{
357 bool bValid = true;
358 sal_Int32 nCount = mxBindings->countItems();
359 for( sal_Int32 i = 0; bValid && i < nCount; i++ )
360 {
361 Binding* pBind = comphelper::getFromUnoTunnel<Binding>( mxBindings->Collection<XPropertySet_t>::getItem( i ) );
362 OSL_ENSURE( pBind != nullptr, "binding?" );
363 bValid = pBind->isValid();
364 }
365 return bValid;
366}
367
368
369// implement xforms::XModel
370
371
372OUString Model::getID()
373{
375 return msID;
376}
377
378void Model::setID( const OUString& sID )
379{
381 msID = sID;
382}
383
385{
386 DBG_ASSERT( ! mbInitialized, "model already initialized" );
387
388 // load instances
390
391 // let's pretend we're initialized and rebind all bindings
392 mbInitialized = true;
393 rebind();
394}
395
397{
398 if( ! mbInitialized )
399 initialize();
400 else
401 rebind();
402}
403
405{
406 rebind();
407}
408
410{
411 // do nothing. We don't validate anyways!
412}
413
415{
416 rebind();
417}
418
419
421 const OUString& sID,
422 const css::uno::Reference<css::task::XInteractionHandler>& _rxHandler )
423{
425
426 if( mxSubmissions->hasItem( sID ) )
427 {
428 Submission* pSubmission =
429 dynamic_cast<Submission*>( mxSubmissions->getItem( sID ).get() );
430 assert(pSubmission && "no submission?");
431 OSL_ENSURE( pSubmission->getModelImpl() == this,
432 "wrong model" );
433
434 // submit. All exceptions are allowed to leave.
435 pSubmission->submitWithInteraction( _rxHandler );
436 }
437}
438
439void Model::submit( const OUString& sID )
440{
441 submitWithInteraction( sID, nullptr );
442}
443
444css::uno::Reference<css::xforms::XDataTypeRepository> SAL_CALL Model::getDataTypeRepository( )
445{
446 if ( !mxDataTypes.is() )
448
449 return mxDataTypes;
450}
451
452
453// instance management
454
455
456css::uno::Reference<css::container::XSet> Model::getInstances()
457{
458 return mxInstances;
459}
460
461css::uno::Reference<css::xml::dom::XDocument> Model::getInstanceDocument( const OUString& rName )
462{
464 Reference<XDocument> aInstance;
465 sal_Int32 nInstance = lcl_findInstance( mxInstances.get(), rName );
466 if( nInstance != -1 )
467 getInstanceData( mxInstances->getItem( nInstance ),
468 nullptr, &aInstance, nullptr, nullptr );
469 return aInstance;
470}
471
472css::uno::Reference<css::xml::dom::XDocument> SAL_CALL Model::getDefaultInstance()
473{
475 DBG_ASSERT( mxInstances->countItems() > 0, "no instance?" );
476 Reference<XDocument> aInstance;
477 getInstanceData( mxInstances->getItem( 0 ), nullptr, &aInstance, nullptr, nullptr );
478 return aInstance;
479}
480
481
482// bindings management
483
484
485css::uno::Reference<css::beans::XPropertySet> SAL_CALL Model::createBinding()
486{
488 return new Binding();
489}
490
491css::uno::Reference<css::beans::XPropertySet> Model::cloneBinding( const css::uno::Reference<css::beans::XPropertySet>& xBinding )
492{
494 XPropertySet_t xNewBinding = createBinding();
495 copy( xBinding, xNewBinding );
496 return xNewBinding;
497}
498
499css::uno::Reference<css::beans::XPropertySet> Model::getBinding( const OUString& sId )
500{
502 return mxBindings->hasItem( sId ) ? mxBindings->getItem( sId ) : nullptr;
503}
504
505css::uno::Reference<css::container::XSet> Model::getBindings()
506{
508 return mxBindings;
509}
510
511
512// submission management
513
514
515css::uno::Reference<css::xforms::XSubmission> Model::createSubmission()
516{
518 return new Submission();
519}
520
521css::uno::Reference<css::xforms::XSubmission> Model::cloneSubmission(const css::uno::Reference<css::beans::XPropertySet>& xSubmission)
522{
524 css::uno::Reference<css::xforms::XSubmission> xNewSubmission = createSubmission();
525 XPropertySet_t xAsPropertySet( xNewSubmission );
526 copy( xSubmission, xAsPropertySet );
527 return xNewSubmission;
528}
529
530css::uno::Reference<css::xforms::XSubmission> Model::getSubmission( const OUString& sId )
531{
533 css::uno::Reference<css::xforms::XSubmission> xSubmission;
534 if ( mxSubmissions->hasItem( sId ) )
535 xSubmission.set(mxSubmissions->getItem( sId ), css::uno::UNO_QUERY);
536 return xSubmission;
537}
538
539css::uno::Reference<css::container::XSet> Model::getSubmissions()
540{
542 return mxSubmissions;
543}
544
545
546// implement XPropertySet & friends
547
548
549#define HANDLE_ID 0
550#define HANDLE_ForeignSchema 3
551#define HANDLE_SchemaRef 4
552#define HANDLE_Namespaces 5
553#define HANDLE_ExternalData 6
554
556{
557 registerProperty( css::beans::Property("ID", HANDLE_ID, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::BOUND ),
559 registerProperty( css::beans::Property("ForeignSchema", HANDLE_ForeignSchema, cppu::UnoType<css::uno::Reference<css::xml::dom::XDocument>>::get(), css::beans::PropertyAttribute::BOUND ),
560 new DirectPropertyAccessor< Model, css::uno::Reference<css::xml::dom::XDocument> >( this, &Model::setForeignSchema, &Model::getForeignSchema) );
561
562 registerProperty( css::beans::Property("SchemaRef", HANDLE_SchemaRef, cppu::UnoType<OUString>::get(), css::beans::PropertyAttribute::BOUND ),
564
565 registerProperty( css::beans::Property("Namespaces", HANDLE_Namespaces, cppu::UnoType<css::uno::Reference<css::container::XNameContainer>>::get(), css::beans::PropertyAttribute::BOUND ),
566 new DirectPropertyAccessor< Model, css::uno::Reference<css::container::XNameContainer> >( this, &Model::setNamespaces, &Model::getNamespaces) );
567
568 registerProperty( css::beans::Property("ExternalData", HANDLE_ExternalData, cppu::UnoType<sal_Bool>::get(), css::beans::PropertyAttribute::BOUND ),
570}
571
573{
574 rebuild();
575}
576
577
579{
580 return css::uno::Sequence<sal_Int8>();
581}
582
584{
585 return "com.sun.star.form.Model";
586}
587
588sal_Bool Model::supportsService(OUString const & ServiceName)
589{
591}
592
593css::uno::Sequence<OUString> Model::getSupportedServiceNames()
594{
595 return {"com.sun.star.xforms.Model"};
596}
597
598extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
600 css::uno::Sequence<css::uno::Any> const &)
601{
602 return cppu::acquire(new xforms::Model());
603}
604
605
606/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
bool mbInitialized
helper class for implementing property accessors via UNO methods
helper class for implementing non-UNO accessors to a boolean property
helper class for implementing property accessors via non-UNO methods
void update()
update this binding (e.g. called by model for refresh )
Definition: binding.cxx:174
void deferNotifications(bool)
prevent change notifications being sent to controls
Definition: binding.cxx:188
bool isValid() const
is this binding valid? (are constraint, type and required MIPs ok?)
Definition: binding.cxx:206
define the context for the evaluation of an XPath expression
represents the XForms *m*odel *i*tem *p*roperties (MIPs) for a given XNode in the instance data at a ...
Definition: mip.hxx:31
void inherit(const MIP &)
inherit from upper-level MIPs
Definition: mip.cxx:36
void join(const MIP &)
join with same-level MIPs
Definition: mip.cxx:70
void setNamespaces(const css::uno::Reference< css::container::XNameContainer > &)
Definition: model.cxx:143
bool mbInitialized
map nodes to their MIPs
Definition: model.hxx:99
void deferNotifications(bool)
call defer notifications on all bindings
Definition: model.cxx:232
css::uno::Reference< css::xforms::XDataTypeRepository > mxDataTypes
the instance(s)
Definition: model.hxx:90
xforms::EvaluationContext getEvaluationContext()
Definition: model.cxx:109
virtual void SAL_CALL rebuild() override
Definition: model.cxx:396
bool getExternalData() const
Definition: model.hxx:128
rtl::Reference< BindingCollection > mxBindings
the model ID
Definition: model.hxx:86
void setForeignSchema(const css::uno::Reference< css::xml::dom::XDocument > &)
Definition: model.cxx:131
virtual void SAL_CALL update() override
Definition: model.cxx:572
virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getInstanceDocument(const OUString &) override
Definition: model.cxx:461
bool isValid() const
is model currently valid (for submission)?
Definition: model.cxx:355
bool setSimpleContent(const XNode_t &, const OUString &)
set a data value in the instance (also defers notifications)
Definition: model.cxx:245
virtual void SAL_CALL recalculate() override
Definition: model.cxx:404
virtual void SAL_CALL submitWithInteraction(const OUString &id, const css::uno::Reference< css::task::XInteractionHandler > &_rxHandler) override
Definition: model.cxx:420
rtl::Reference< InstanceCollection > mxInstances
the submissions
Definition: model.hxx:88
virtual css::uno::Reference< css::xforms::XSubmission > SAL_CALL cloneSubmission(const css::uno::Reference< css::beans::XPropertySet > &) override
Definition: model.cxx:521
MIPs_t maMIPs
namespaces for entire model
Definition: model.hxx:97
css::uno::Reference< css::beans::XPropertySet > XPropertySet_t
Definition: model.hxx:78
virtual void SAL_CALL initialize() override
Definition: model.cxx:384
css::uno::Reference< css::container::XNameContainer > getNamespaces() const
Definition: model.hxx:124
rtl::Reference< SubmissionCollection > mxSubmissions
the bindings
Definition: model.hxx:87
virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL newInstance(const OUString &sName, const OUString &sURL, sal_Bool bURLOnce) override
Definition: model_ui.cxx:389
virtual css::uno::Reference< css::container::XSet > SAL_CALL getBindings() override
Definition: model.cxx:505
void dbg_assertInvariant() const
Definition: model.cxx:156
OUString msID
Definition: model.hxx:85
virtual css::uno::Reference< css::xforms::XDataTypeRepository > SAL_CALL getDataTypeRepository() override
Definition: model.cxx:444
sal_Bool SAL_CALL supportsService(OUString const &ServiceName) override
Definition: model.cxx:588
void removeMIPs(void const *pTag)
Definition: model.cxx:175
void loadInstances()
Definition: model.cxx:344
void setExternalData(bool _bData)
Definition: model.cxx:150
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL createBinding() override
Definition: model.cxx:485
void rebind()
re-bind all bindings
Definition: model.cxx:217
virtual css::uno::Reference< css::xml::dom::XDocument > SAL_CALL getDefaultInstance() override
Definition: model.cxx:472
virtual css::uno::Reference< css::container::XSet > SAL_CALL getSubmissions() override
Definition: model.cxx:539
void loadInstance(sal_Int32 nInstance)
load instance data
Definition: model.cxx:308
css::uno::Reference< css::xml::dom::XDocument > getForeignSchema() const
Definition: model.hxx:116
virtual void SAL_CALL refresh() override
Definition: model.cxx:414
virtual css::uno::Reference< css::xforms::XSubmission > SAL_CALL getSubmission(const OUString &) override
Definition: model.cxx:530
OUString getSchemaRef() const
Definition: model.hxx:120
css::uno::Reference< css::xml::dom::XDocument > mxForeignSchema
the XSD data-types used
Definition: model.hxx:91
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: model.cxx:593
OUString SAL_CALL getImplementationName() override
Definition: model.cxx:583
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
Definition: model.cxx:578
virtual void SAL_CALL revalidate() override
Definition: model.cxx:409
virtual css::uno::Reference< css::container::XSet > SAL_CALL getInstances() override
Definition: model.cxx:456
virtual OUString SAL_CALL getID() override
Definition: model.cxx:372
void ensureAtLeastOneInstance()
Definition: model.cxx:77
virtual ~Model() noexcept override
Definition: model.cxx:105
Model()
create a new model with an empty, default instance
Definition: model.cxx:88
bool mbExternalData
has model been initialized ?
Definition: model.hxx:100
void addMIP(void *pTag, const XNode_t &, const MIP &)
Definition: model.cxx:166
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL cloneBinding(const css::uno::Reference< css::beans::XPropertySet > &) override
Definition: model.cxx:491
OUString msSchemaRef
the XSD-schema part we cannot
Definition: model.hxx:93
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getBinding(const OUString &) override
Definition: model.cxx:499
css::uno::Reference< css::container::XNameContainer > mxNamespaces
xforms:model/@schema attribute
Definition: model.hxx:95
virtual void SAL_CALL setID(const OUString &sID) override
Definition: model.cxx:378
void initializePropertySet()
is the data of this model to be considered an integral part of the document?
Definition: model.cxx:555
virtual void SAL_CALL submit(const OUString &sID) override
Definition: model.cxx:439
css::uno::Reference< css::xml::dom::XNode > XNode_t
Definition: model.hxx:77
virtual css::uno::Reference< css::xforms::XSubmission > SAL_CALL createSubmission() override
Definition: model.cxx:515
void setSchemaRef(const OUString &)
Definition: model.cxx:137
MIP queryMIP(const XNode_t &xNode) const
query which MIPs apply to the given node
Definition: model.cxx:191
xforms::Model * getModelImpl() const
get the model implementation
Definition: submission.hxx:100
virtual void SAL_CALL submitWithInteraction(const css::uno::Reference< css::task::XInteractionHandler > &aHandler) override
Definition: submission.cxx:412
int nCount
#define DBG_ASSERT(sCon, aError)
#define DBG_INVARIANT()
Definition: model.cxx:68
#define HANDLE_Namespaces
Definition: model.cxx:552
#define HANDLE_ExternalData
Definition: model.cxx:553
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_form_Model_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: model.cxx:599
#define HANDLE_SchemaRef
Definition: model.cxx:551
#define HANDLE_ForeignSchema
Definition: model.cxx:550
#define HANDLE_ID
Definition: model.cxx:549
@ Exception
class SAL_NO_VTABLE XPropertySet
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
int i
const OUString sEmpty
void copy(const css::uno::Reference< css::beans::XPropertySet > &, css::uno::Reference< css::beans::XPropertySet > const &)
copy the properties from one PropertySet into the next
void getInstanceData(const css::uno::Sequence< css::beans::PropertyValue > &, OUString *pID, css::uno::Reference< css::xml::dom::XDocument > *, OUString *pURL, bool *pURLOnce)
sal_Int32 lcl_findInstance(const InstanceCollection *, std::u16string_view)
Definition: model_ui.cxx:423
void setInstanceData(css::uno::Sequence< css::beans::PropertyValue > &, const OUString *pID, const css::uno::Reference< css::xml::dom::XDocument > *, const OUString *pURL, const bool *pURLOnce)
unsigned char sal_Bool
OUString sId
Reference< XDocumentBuilder > getDocumentBuilder()
Definition: xmlhelper.cxx:127