diff options
-rw-r--r-- | xmlscript/dtd/dialog.dtd | 6 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 6 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 10 | ||||
-rw-r--r-- | xmlscript/test/test.xml | 9 |
4 files changed, 22 insertions, 9 deletions
diff --git a/xmlscript/dtd/dialog.dtd b/xmlscript/dtd/dialog.dtd index 485382935f45..01aa6f0d1fcf 100644 --- a/xmlscript/dtd/dialog.dtd +++ b/xmlscript/dtd/dialog.dtd @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - $Id: dialog.dtd,v 1.16 2001-08-07 10:55:46 dbo Exp $ + $Id: dialog.dtd,v 1.17 2001-08-16 14:11:24 dbo Exp $ The Contents of this file are made available subject to the terms of either of the following licenses @@ -218,14 +218,14 @@ dlg:tabstop %boolean; #IMPLIED > -<!ELEMENT dlg:titledbox (dlg:title?, dlg:radio*, (%control;)*)> +<!ELEMENT dlg:titledbox (dlg:title?, dlg:radio*, (%control;)*, (%event;)*)> <!ATTLIST dlg:titledbox %default-attributes; > <!ELEMENT dlg:title EMPTY> <!ATTLIST dlg:title dlg:value CDATA #IMPLIED > -<!ELEMENT dlg:text EMPTY> +<!ELEMENT dlg:text ((%event;)*)> <!ATTLIST dlg:text %default-attributes; dlg:align (left|center|right|none) #IMPLIED dlg:multiline %boolean; #IMPLIED diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 24102557fd88..98499b771e83 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmldlg_expmodels.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: dbo $ $Date: 2001-08-07 10:55:46 $ + * last change: $Author: dbo $ $Date: 2001-08-16 14:11:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -345,6 +345,7 @@ void ElementDescriptor::readGroupBoxModel( StyleBag * all_styles ) aTitle ); addSubElement( title ); } + readEvents(); } //__________________________________________________________________________________________________ void ElementDescriptor::readFixedTextModel( StyleBag * all_styles ) @@ -374,6 +375,7 @@ void ElementDescriptor::readFixedTextModel( StyleBag * all_styles ) OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":multiline") ) ); readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ), OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":align") ) ); + readEvents(); } //__________________________________________________________________________________________________ void ElementDescriptor::readEditModel( StyleBag * all_styles ) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index e78898bb9d10..eecb1fac2314 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmldlg_impmodels.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: dbo $ $Date: 2001-08-07 10:55:46 $ + * last change: $Author: dbo $ $Date: 2001-08-16 14:11:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -852,6 +852,11 @@ Reference< xml::XImportContext > TitledBoxElement::createChildContext( _radios.push_back( xRet ); return xRet; } + // event + else if (isEventElement( nUid, rLocalName )) + { + return new EventElement( nUid, rLocalName, xAttributes, this, _pImport ); + } else { return BulletinBoardElement::createChildContext( nUid, rLocalName, xAttributes ); @@ -882,6 +887,7 @@ void TitledBoxElement::endElement() xControlModel->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ), makeAny( _label ) ); } + ctx.importEvents( _events ); } // create radios AFTER group box! diff --git a/xmlscript/test/test.xml b/xmlscript/test/test.xml index 6ac6d7dcc06b..847bc49445e3 100644 --- a/xmlscript/test/test.xml +++ b/xmlscript/test/test.xml @@ -66,16 +66,21 @@ </radiogroup> <titledbox id="groupbox1" left="250" top="250" width="120" height="100"> + <script:listener-event script:macro-name="ExecutingMacro" script:location="application" script:language="StarBasic" script:listener-type="com.sun.star.awt.XMouseListener" script:listener-method="mouseEntered"/> <title value="grouped"/> <radio id="radio5" value="default radio" left="5" top="15" width="100" height="20"/> <radio id="radio7" value="unchecked" left="5" top="35" width="100" height="20" checked="false"/> <radio id="radio8" value="checked" left="5" top="55" width="100" height="20" checked="true"/> </titledbox> - <text id="fixed1" left="50" top="520" width="180" height="20" value="fixed text is here..." multiline="true" align="center"/> + <text id="fixed1" left="50" top="520" width="180" height="20" value="fixed text is here..." multiline="true" align="center"> + <script:listener-event script:macro-name="ExecutingMacro" script:location="application" script:language="StarBasic" script:listener-type="com.sun.star.awt.XMouseListener" script:listener-method="mouseEntered"/> + </text> <textfield id="field1" left="250" top="520" width="50" height="40" value="edit no text here..." readonly="true" vscroll="true" multiline="true" align="right" style-id="no_border"/> <textfield id="field2" left="320" top="520" width="50" height="40" value="hidden text" hscroll="true" echochar="*" align="left"/> - <img id="image1" left="50" top="585" width="80" height="20" src="../../test/w3c.jpg"/> + <img id="image1" left="50" top="585" width="80" height="20" src="../../test/w3c.jpg"> + <script:listener-event script:macro-name="ExecutingMacro" script:location="application" script:language="StarBasic" script:listener-type="com.sun.star.awt.XMouseListener" script:listener-method="mouseEntered"/> + </img> <filecontrol id="file1" left="150" top="585" width="100" height="20" value="../../test/w3c.jpg"/> <datefield id="datefield1" left="20" top="610" width="100" height="20" date-format="short_DDMMYY" spin="true" value="20010301"/> |