From 0bd31bbcc79906d8c46434d97814b796331bdd3f Mon Sep 17 00:00:00 2001 From: Kurt Zenker Date: Wed, 25 Jun 2008 13:29:54 +0000 Subject: INTEGRATION: CWS xformsdocmodify (1.9.24); FILE MERGED 2008/06/02 21:44:12 fs 1.9.24.1: #i90243# implement a ExternalData property which controls whether changes in the model data should mark the embedding document as modified --- forms/source/xforms/model.cxx | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'forms/source') diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 3dbd55080448..ea92f43a58a8 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: model.cxx,v $ - * $Revision: 1.9 $ + * $Revision: 1.10 $ * * This file is part of OpenOffice.org. * @@ -122,7 +122,8 @@ Model::Model() : mxBindings( mpBindings ), mxSubmissions( mpSubmissions ), mxInstances( mpInstances ), - mbInitialized( false ) + mbInitialized( false ), + mbExternalData( true ) { initializePropertySet(); @@ -221,6 +222,15 @@ void Model::setNamespaces( const XNameContainer_t& rNamespaces ) mxNamespaces = rNamespaces; } +bool Model::getExternalData() const +{ + return mbExternalData; +} + +void Model::setExternalData( bool _bData ) +{ + mbExternalData = _bData; +} #if OSL_DEBUG_LEVEL > 1 void Model::dbg_assertInvariant() const @@ -729,6 +739,7 @@ Model::XSet_t Model::getSubmissions() #define HANDLE_ForeignSchema 3 #define HANDLE_SchemaRef 4 #define HANDLE_Namespaces 5 +#define HANDLE_ExternalData 6 #define REGISTER_PROPERTY( property, type ) \ registerProperty( PROPERTY( property, type ), \ @@ -738,12 +749,17 @@ Model::XSet_t Model::getSubmissions() registerProperty( PROPERTY( property, type ), \ new APIPropertyAccessor< Model, type >( this, &Model::set##property, &Model::get##property ) ); +#define REGISTER_BOOL_PROPERTY( property ) \ + registerProperty( PROPERTY( property, sal_Bool ), \ + new BooleanPropertyAccessor< Model, bool >( this, &Model::set##property, &Model::get##property ) ); + void Model::initializePropertySet() { - REGISTER_PROPERTY_API( ID, OUString ); - REGISTER_PROPERTY ( ForeignSchema, XDocument_t ); - REGISTER_PROPERTY ( SchemaRef, OUString ); - REGISTER_PROPERTY ( Namespaces, XNameContainer_t ); + REGISTER_PROPERTY_API ( ID, OUString ); + REGISTER_PROPERTY ( ForeignSchema, XDocument_t ); + REGISTER_PROPERTY ( SchemaRef, OUString ); + REGISTER_PROPERTY ( Namespaces, XNameContainer_t ); + REGISTER_BOOL_PROPERTY( ExternalData ); } void Model::update() -- cgit v1.2.3