24#include <com/sun/star/uno/Reference.hxx>
25#include <com/sun/star/beans/XPropertySet.hpp>
26#include <com/sun/star/form/binding/XValueBinding.hpp>
27#include <com/sun/star/form/binding/XBindableValue.hpp>
28#include <com/sun/star/form/binding/XListEntrySource.hpp>
29#include <com/sun/star/form/binding/XListEntrySink.hpp>
30#include <com/sun/star/form/submission/XSubmission.hpp>
31#include <com/sun/star/form/submission/XSubmissionSupplier.hpp>
32#include <com/sun/star/container/XNameAccess.hpp>
33#include <rtl/ustring.hxx>
40using com::sun::star::uno::Exception;
41using com::sun::star::uno::UNO_QUERY;
42using com::sun::star::uno::UNO_QUERY_THROW;
43using com::sun::star::uno::UNO_SET_THROW;
46using com::sun::star::beans::XPropertySetInfo;
47using com::sun::star::beans::PropertyValue;
48using com::sun::star::frame::XModel;
49using com::sun::star::container::XNameAccess;
50using com::sun::star::form::binding::XValueBinding;
51using com::sun::star::form::binding::XBindableValue;
52using com::sun::star::form::binding::XListEntrySource;
53using com::sun::star::form::binding::XListEntrySink;
54using com::sun::star::form::submission::XSubmission;
55using com::sun::star::form::submission::XSubmissionSupplier;
58 SvXMLImport& rImport )
73 if( xBindable.is() && xBinding.is() )
77 xBindable->setValueBinding( xBinding );
97 if( xListEntrySink.is() && xListEntrySource.is() )
101 xListEntrySink->setListEntrySource( xListEntrySource );
119 if( xSubmissionSupp.is() && xSubmission.is() )
123 xSubmissionSupp->setSubmission( xSubmission );
135 OSL_PRECOND( _rXForms.is(),
"applyXFormsSettings: invalid XForms container!" );
136 if ( !_rXForms.is() )
140 if ( !xModelSettings.is() )
142 OSL_FAIL(
"applyXFormsSettings: wrong type for the XFormModels settings!" );
149 for (
auto const & modelName : aSettingsForModels )
153 OSL_VERIFY( xModelSettings->getByName( modelName ) >>= aModelSettings );
156 if ( !_rXForms->hasByName( modelName ) )
158 OSL_FAIL(
"applyXFormsSettings: have settings for a non-existent XForms model!" );
166 for (
auto const & setting : std::as_const(aModelSettings) )
168 if ( !xModelPSI->hasPropertyByName( setting.Name ) )
170 OSL_FAIL(
"applyXFormsSettings: non-existent model property!" );
174 xModelProps->setPropertyValue( setting.Name, setting.Value );
This class deliberately does not support XWeak, to improve performance when loading large documents.
import the xforms:model element
const css::uno::Any & get(const OUString &_rValueName) const
#define DBG_UNHANDLED_EXCEPTION(...)
class SAL_NO_VTABLE XPropertySet
Reference< XModel > xModel