summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-06-25 13:29:54 +0000
committerKurt Zenker <kz@openoffice.org>2008-06-25 13:29:54 +0000
commit0bd31bbcc79906d8c46434d97814b796331bdd3f (patch)
treee6701d30b1dc81d8165244d2631d1827bba27a9b /forms
parentf41177a1b3356004b3b539fc761569fb13cb9879 (diff)
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
Diffstat (limited to 'forms')
-rw-r--r--forms/source/xforms/model.cxx28
1 files changed, 22 insertions, 6 deletions
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()