diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2001-03-01 10:52:05 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2001-03-01 10:52:05 +0000 |
commit | a270394a2f6ef6ef08d10b1badbac180bf50467e (patch) | |
tree | cf031376b0c0ff3bb9d31bbd4de32e41759e9223 /xmlscript | |
parent | a648581e3291d161618a06ccb074d9c81daeaedb (diff) |
applied dialog id
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/dtd/dialog.dtd | 5 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 6 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 30 | ||||
-rw-r--r-- | xmlscript/test/test.xml | 4 |
4 files changed, 28 insertions, 17 deletions
diff --git a/xmlscript/dtd/dialog.dtd b/xmlscript/dtd/dialog.dtd index d17a14aab244..56ecfe0d75ef 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.4 2001-03-01 11:22:45 dbo Exp $ + $Id: dialog.dtd,v 1.5 2001-03-01 11:52:05 dbo Exp $ The Contents of this file are made available subject to the terms of either of the following licenses @@ -91,7 +91,8 @@ <!ATTLIST dialog:dialogs xmlns:dialog CDATA #FIXED "http://openoffice.org/2000/dialog"> <!ELEMENT dialog:window (dialog:styles*, dialog:bulletinboard*)> -<!ATTLIST dialog:window dialog:left %numeric; #IMPLIED +<!ATTLIST dialog:window dialog:id CDATA #REQUIRED + dialog:left %numeric; #IMPLIED dialog:top %numeric; #IMPLIED dialog:width %numeric; #IMPLIED dialog:height %numeric; #IMPLIED diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index 5e4a025cd2ee..863bd84bbf43 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmldlg_export.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: dbo $ $Date: 2001-03-01 11:22:45 $ + * last change: $Author: dbo $ $Date: 2001-03-01 11:52:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1122,6 +1122,8 @@ static void exportDialogModel( OUString aWindowName( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":window") ); ElementDescriptor * pWindow = new ElementDescriptor( xProps, xPropState, aWindowName ); Reference< xml::sax::XAttributeList > xWindow( pWindow ); + pWindow->readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ), + OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ) ); pWindow->readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":title") ) ); pWindow->readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("PositionX") ), diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index 6a3a601291ba..f55faf446dcc 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.7 $ + * $Revision: 1.8 $ * - * last change: $Author: dbo $ $Date: 2001-03-01 11:22:45 $ + * last change: $Author: dbo $ $Date: 2001-03-01 11:52:05 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1509,7 +1509,23 @@ void WindowElement::endElement() OSL_ASSERT( xProps.is() ); OUString aValue( _xAttributes->getValueByUidName( - XMLNS_DIALOGS_UID, OUString( RTL_CONSTASCII_USTRINGPARAM("left") ) ) ); + XMLNS_DIALOGS_UID, OUString( RTL_CONSTASCII_USTRINGPARAM("id") ) ) ); + if (aValue.getLength()) + { + xProps->setPropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ), + makeAny( aValue ) ); + } + aValue = _xAttributes->getValueByUidName( + XMLNS_DIALOGS_UID, OUString( RTL_CONSTASCII_USTRINGPARAM("title") ) ); + if (aValue.getLength()) + { + xProps->setPropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), + makeAny( aValue ) ); + } + aValue = _xAttributes->getValueByUidName( + XMLNS_DIALOGS_UID, OUString( RTL_CONSTASCII_USTRINGPARAM("left") ) ); if (aValue.getLength()) { xProps->setPropertyValue( @@ -1540,14 +1556,6 @@ void WindowElement::endElement() OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ), makeAny( aValue.toInt32() ) ); } - aValue = _xAttributes->getValueByUidName( - XMLNS_DIALOGS_UID, OUString( RTL_CONSTASCII_USTRINGPARAM("title") ) ); - if (aValue.getLength()) - { - xProps->setPropertyValue( - OUString( RTL_CONSTASCII_USTRINGPARAM("Title") ), - makeAny( aValue ) ); - } } //################################################################################################## diff --git a/xmlscript/test/test.xml b/xmlscript/test/test.xml index 7a087447e92b..0d812819e590 100644 --- a/xmlscript/test/test.xml +++ b/xmlscript/test/test.xml @@ -4,7 +4,7 @@ <dialogs xmlns="http://openoffice.org/2000/dialog"> <window xmlns:dlg="http://openoffice.org/2000/dialog" - title="Test-Dialog" left="50" top="50" height="660" width="400"> + id="window1" title="Test-Dialog" left="50" top="50" height="660" width="400"> <dlg:styles> <dlg:style style-id="bla" background-color="0xffffff" dlg:text-color="255"/> @@ -71,7 +71,7 @@ </window> <window xmlns:dlg2="http://openoffice.org/2000/dialog" - title="Test-Dialog2" left="100" top="100" height="200" width="200"> + id="window2" title="Test-Dialog2" left="100" top="100" height="200" width="200"> <dlg2:bulletinboard> |