diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 12:28:29 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-10-01 12:28:29 +0000 |
commit | 40043e054856d13e4f080c99ac575d47dea77ce9 (patch) | |
tree | c4e476796dc1de4d8afeb00abf8c7e012e80d9ba | |
parent | 45a90a63346121278dc690aaf7051b287abf456d (diff) |
CWS-TOOLING: integrate CWS dba31b
-rw-r--r-- | forms/qa/integration/forms/XMLFormSettings.java | 8 | ||||
-rw-r--r-- | forms/qa/org/openoffice/xforms/Instance.java | 34 | ||||
-rw-r--r-- | forms/source/component/FormComponent.cxx | 8 | ||||
-rw-r--r-- | forms/source/inc/componenttools.hxx | 8 | ||||
-rw-r--r-- | forms/source/misc/componenttools.cxx | 12 |
5 files changed, 47 insertions, 23 deletions
diff --git a/forms/qa/integration/forms/XMLFormSettings.java b/forms/qa/integration/forms/XMLFormSettings.java index e84413e63..226a1e825 100644 --- a/forms/qa/integration/forms/XMLFormSettings.java +++ b/forms/qa/integration/forms/XMLFormSettings.java @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: XMLFormSettings.java,v $ - * $Revision: 1.2 $ + * $Revision: 1.2.24.1 $ * * This file is part of OpenOffice.org. * @@ -93,6 +93,12 @@ public class XMLFormSettings extends complexlib.ComplexTestCase XNode booleanAttrib = defaultInstance.createAttribute( stringElement, "booleanAttribute", "true" ); XNode dateAttrib = defaultInstance.createAttribute( stringElement, "dateAttribute" ); + // when it comes to saving and loading, only one child of the root element of the instance + // is handled (is this a bug? see xmloff/source/xforms/XFormsInstanceContext.cxx, method + // CreateChildContext). + // So, we remove the default node of the instance which it has all the time + defaultInstance.removeNode( "instanceData" ); + assure( "booleanAttrib's parent is wrong", UnoRuntime.areSame( stringElement, booleanAttrib.getParentNode() ) ); assure( "dateAttrib's parent is wrong", diff --git a/forms/qa/org/openoffice/xforms/Instance.java b/forms/qa/org/openoffice/xforms/Instance.java index 4d55d5c1d..8986be44b 100644 --- a/forms/qa/org/openoffice/xforms/Instance.java +++ b/forms/qa/org/openoffice/xforms/Instance.java @@ -8,6 +8,8 @@ package org.openoffice.xforms; import com.sun.star.xml.dom.DOMException; import com.sun.star.xml.dom.XDocument; import com.sun.star.xml.dom.XNode; +import com.sun.star.xml.dom.XNodeList; +import java.util.NoSuchElementException; /** * @@ -97,6 +99,38 @@ public class Instance return node; } + /** removes a child of the root-level node from the instance + * + * @param _elementName + * the name of the to-be-removed child + */ + public XNode removeNode( String _elementName ) throws DOMException + { + return removeNode( m_domInstance, _elementName ); + } + + /** removes a node from the instance + * + * @param _parentElement + * the node whose child is to be removed + * @param _elementName + * the name of the to-be-removed child + */ + public XNode removeNode( XNode _parentElement, String _elementName ) throws DOMException + { + XNodeList nodes = _parentElement.getChildNodes(); + for ( int i=0; i<nodes.getLength(); ++i ) + { + XNode node = nodes.item(i); + if ( node.getLocalName().equals( _elementName ) ) + { + _parentElement.removeChild( node ); + return node; + } + } + throw new NoSuchElementException(); + } + /** creates an attribute for the root node of the instance * * @param _attribName diff --git a/forms/source/component/FormComponent.cxx b/forms/source/component/FormComponent.cxx index a1b7b235b..d43292d4a 100644 --- a/forms/source/component/FormComponent.cxx +++ b/forms/source/component/FormComponent.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: FormComponent.cxx,v $ - * $Revision: 1.63 $ + * $Revision: 1.62.8.2 $ * * This file is part of OpenOffice.org. * @@ -2456,6 +2456,9 @@ void OBoundControlModel::connectExternalValueBinding( // remember this new binding m_xExternalBinding = _rxBinding; + // tell the derivee + onConnectedExternalValue(); + try { // add as value listener so we get notified when the value changes @@ -2486,9 +2489,6 @@ void OBoundControlModel::connectExternalValueBinding( DBG_UNHANDLED_EXCEPTION(); } - // tell the derivee - onConnectedExternalValue(); - // propagate our new value transferExternalValueToControl( _rInstanceLock ); diff --git a/forms/source/inc/componenttools.hxx b/forms/source/inc/componenttools.hxx index 6d9cebf62..67a22ca39 100644 --- a/forms/source/inc/componenttools.hxx +++ b/forms/source/inc/componenttools.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: componenttools.hxx,v $ - * $Revision: 1.5 $ + * $Revision: 1.5.42.1 $ * * This file is part of OpenOffice.org. * @@ -86,12 +86,6 @@ namespace frm const TypeSequence& _rTypes2, const TypeSequence& _rTypes3 ); - TypeBag( - const TypeSequence& _rTypes1, - const TypeSequence& _rTypes2, - const TypeSequence& _rTypes3, - const TypeSequence& _rTypes4 - ); void addTypes( const TypeSequence& _rTypes ); diff --git a/forms/source/misc/componenttools.cxx b/forms/source/misc/componenttools.cxx index e89c18aa4..13aeacb45 100644 --- a/forms/source/misc/componenttools.cxx +++ b/forms/source/misc/componenttools.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: componenttools.cxx,v $ - * $Revision: 1.6 $ + * $Revision: 1.6.42.1 $ * * This file is part of OpenOffice.org. * @@ -68,16 +68,6 @@ namespace frm } //-------------------------------------------------------------------- - TypeBag::TypeBag( const TypeSequence& _rTypes1, const TypeSequence& _rTypes2, const TypeSequence& _rTypes3, - const TypeSequence& _rTypes4 ) - { - addTypes( _rTypes1 ); - addTypes( _rTypes2 ); - addTypes( _rTypes3 ); - addTypes( _rTypes4 ); - } - - //-------------------------------------------------------------------- void TypeBag::addTypes( const TypeSequence& _rTypes ) { ::std::copy( |