diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2001-02-28 17:22:08 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2001-02-28 17:22:08 +0000 |
commit | 0dc97fcedbd8b836f3db6beeec0a2d4514e11cac (patch) | |
tree | 6eac05be33f984734206994546345456cbd67ec0 | |
parent | 04ad018a97dd27fa6e10c13c6145823f5791123e (diff) |
further impl and bugfixing
-rw-r--r-- | xmlscript/dtd/dialog.dtd | 10 | ||||
-rw-r--r-- | xmlscript/inc/xmlscript/xmldlg_imexp.hxx | 6 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/imp_share.hxx | 6 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx | 32 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_export.cxx | 46 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 27 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_import.cxx | 17 | ||||
-rw-r--r-- | xmlscript/test/imexp.cxx | 32 | ||||
-rw-r--r-- | xmlscript/test/test.xml | 18 |
9 files changed, 72 insertions, 122 deletions
diff --git a/xmlscript/dtd/dialog.dtd b/xmlscript/dtd/dialog.dtd index 57d9cfbf2b7a..4f01ebf13c88 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.2 2001-02-27 16:17:31 dbo Exp $ + $Id: dialog.dtd,v 1.3 2001-02-28 18:22:06 dbo Exp $ The Contents of this file are made available subject to the terms of either of the following licenses @@ -62,12 +62,14 @@ <!ENTITY % pos "dialog:left %numeric; #REQUIRED dialog:top %numeric; #REQUIRED"> <!ENTITY % size "dialog:width %numeric; #REQUIRED dialog:height %numeric; #REQUIRED"> -<!ENTITY % default-attributes "dialog:id CDATA #REQUIRED - dialog:style-id CDATA #IMPLIED +<!ENTITY % default-attributes "dialog:style-id CDATA #IMPLIED + dialog:id CDATA #REQUIRED + dialog:class-id CDATA #IMPLIED + dialog:tab-index %numeric; #IMPLIED + dialog:disabled %boolean; #IMPLIED %pos; %size; dialog:printable %boolean; #IMPLIED - dialog:disabled %boolean; #IMPLIED "> <!ENTITY % control "(dialog:bulletinboard|dialog:button|dialog:checkbox|dialog:menulist|dialog:radiogroup|dialog:titledbox|dialog:textfield|dialog:text|dialog:currencyfield|dialog:filecontrol|dialog:img|dialog:datefield|dialog:numericfield|dialog:patternfield)"> diff --git a/xmlscript/inc/xmlscript/xmldlg_imexp.hxx b/xmlscript/inc/xmlscript/xmldlg_imexp.hxx index 328b4c3e8a1b..fe5638d7a3e7 100644 --- a/xmlscript/inc/xmlscript/xmldlg_imexp.hxx +++ b/xmlscript/inc/xmlscript/xmldlg_imexp.hxx @@ -2,9 +2,9 @@ * * $RCSfile: xmldlg_imexp.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dbo $ $Date: 2001-02-27 12:45:16 $ + * last change: $Author: dbo $ $Date: 2001-02-28 18:22:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,7 +77,7 @@ namespace xmlscript #define XMLNS_DIALOGS_URI "http://openoffice.org/2000/dialog" #define XMLNS_DIALOGS_UID 1 -#define XMLNS_DIALOGS_PREFIX "dlg" +#define XMLNS_DIALOGS_PREFIX "dialog" //================================================================================================== diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index 9f091601d98f..56b2dd91b436 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -2,9 +2,9 @@ * * $RCSfile: imp_share.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dbo $ $Date: 2001-02-27 12:45:16 $ + * last change: $Author: dbo $ $Date: 2001-02-28 18:22:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -332,7 +332,7 @@ public: vector< Reference< xml::sax2::XExtendedAttributes > > const * getEvents() throw () { return &_events; } - inline ControlElement( + ControlElement( OUString const & rLocalName, Reference< xml::sax2::XExtendedAttributes > const & xAttributes, ElementBase * pParent, DialogImport * pImport ) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx index 06357e25a71e..a943148858a3 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.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dbo $ $Date: 2001-02-21 20:49:26 $ + * last change: $Author: dbo $ $Date: 2001-02-28 18:22:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -333,33 +333,7 @@ void ElementDescriptor::readGroupBoxModel( StyleBag * all_styles ) } // collect elements - // defaults \ tabstop - sal_Bool bEnabled; - if (_xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Enabled") ) ) >>= bEnabled) - { - if (! bEnabled) - { - addAttr( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":disabled") ), - OUString( RTL_CONSTASCII_USTRINGPARAM("true") ) ); - } - } - else - { - OSL_ENSURE( 0, "unexpected property type for \"Enabled\": not bool!" ); - } - - readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Printable") ), - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":printable") ) ); -// readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ), -// OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tabstop") ) ); - readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("PositionX") ), - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":left") ) ); - readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("PositionY") ), - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":top") ) ); - readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ), - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":width") ) ); - readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ), - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":height") ) ); + readDefaults(); OUString aTitle; if (readProp( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ) ) >>= aTitle) diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx index ab14e8c6af6c..6ecf61b72614 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.6 $ + * $Revision: 1.7 $ * - * last change: $Author: dbo $ $Date: 2001-02-27 12:45:16 $ + * last change: $Author: dbo $ $Date: 2001-02-28 18:22:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -685,6 +685,14 @@ void ElementDescriptor::readAlignAttr( OUString const & rPropName, OUString cons //__________________________________________________________________________________________________ void ElementDescriptor::readDefaults() { + Any a( _xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ) ); + addAttr( OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), + * reinterpret_cast< const OUString * >( a.getValue() ) ); + readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ClassId") ), + OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":class-id") ) ); + readLongAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("TabIndex") ), + OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":tab-index") ) ); + sal_Bool bEnabled; if (_xProps->getPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("Enabled") ) ) >>= bEnabled) { @@ -931,9 +939,7 @@ static void exportDialogModel( sal_Int32 nPos; for ( nPos = 0; nPos < aElements.getLength(); ++nPos ) { - OUString const & rName = pElements[ nPos ]; - - Any aControlModel( xDialogModel->getByName( rName ) ); + Any aControlModel( xDialogModel->getByName( pElements[ nPos ] ) ); Reference< beans::XPropertySet > xProps; OSL_VERIFY( aControlModel >>= xProps ); if (! xProps.is()) @@ -970,8 +976,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":radio") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readRadioButtonModel( &all_styles ); pRadioGroup->addSubElem( xElem ); } @@ -985,8 +989,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":button") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readButtonModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlCheckBoxModel") )) @@ -995,8 +997,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":checkbox") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readCheckBoxModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlComboBoxModel") )) @@ -1005,8 +1005,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":combobox") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readComboBoxModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlListBoxModel") )) @@ -1015,8 +1013,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":menulist") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readListBoxModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlGroupBoxModel") )) @@ -1025,8 +1021,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":titledbox") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readGroupBoxModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlFixedTextModel") )) @@ -1035,8 +1029,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":text") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readFixedTextModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlEditModel") )) @@ -1045,8 +1037,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":textfield") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readEditModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlImageControlModel") )) @@ -1055,8 +1045,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":img") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readImageControlModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlFileControlModel") )) @@ -1065,8 +1053,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":filecontrol") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readFileControlModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlCurrencyFieldModel") )) @@ -1075,8 +1061,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":currencyfield") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readCurrencyFieldModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlDateFieldModel") )) @@ -1085,8 +1069,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":datefield") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readDateFieldModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlNumericFieldModel") )) @@ -1095,8 +1077,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":numericfield") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readNumericFieldModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlTimeFieldModel") )) @@ -1105,8 +1085,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":timefield") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readTimeFieldModel( &all_styles ); } else if (aControlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("com.sun.star.awt.UnoControlPatternFieldModel") )) @@ -1115,8 +1093,6 @@ static void exportDialogModel( xProps, xPropState, OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":patternfield") ) ); xElem = static_cast< xml::sax::XAttributeList * >( pElem ); - pElem->addAttr( - OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":id") ), rName ); pElem->readPatternFieldModel( &all_styles ); } // diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index fc727062c388..3ad83d357676 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.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dbo $ $Date: 2001-02-27 12:45:16 $ + * last change: $Author: dbo $ $Date: 2001-02-28 18:22:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -760,28 +760,7 @@ void TitledBoxElement::endElement() pStyle->importFontStyle( xControlModel ); } - xControlModel->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("PositionX") ), - makeAny( _nBasePosX ) ); - xControlModel->setPropertyValue( OUString( RTL_CONSTASCII_USTRINGPARAM("PositionY") ), - makeAny( _nBasePosY ) ); - if (!ctx.importLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Width") ), - OUString( RTL_CONSTASCII_USTRINGPARAM("width") ), - _xAttributes ) || - !ctx.importLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Height") ), - OUString( RTL_CONSTASCII_USTRINGPARAM("height") ), - _xAttributes )) - { - throw xml::sax::SAXException( - OUString( RTL_CONSTASCII_USTRINGPARAM("missing titlebox size attribute(s)!") ), - Reference< XInterface >(), Any() ); - } - - ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Enabled") ), - OUString( RTL_CONSTASCII_USTRINGPARAM("default") ), - _xAttributes ); - ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Printable") ), - OUString( RTL_CONSTASCII_USTRINGPARAM("printable") ), - _xAttributes ); + ctx.importDefaults( 0, 0, _xAttributes ); // inherited from BulletinBoardElement if (_label.getLength()) { diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx index 34d28a5e1e19..108b3455e6be 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx @@ -2,9 +2,9 @@ * * $RCSfile: xmldlg_import.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: dbo $ $Date: 2001-02-27 12:45:16 $ + * last change: $Author: dbo $ $Date: 2001-02-28 18:22:07 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,7 +61,6 @@ #include "imp_share.hxx" #include <osl/diagnose.h> -#include <osl/mutex.hxx> #include <rtl/ustrbuf.hxx> @@ -82,7 +81,6 @@ #include <com/sun/star/script/ScriptEventDescriptor.hpp> -using namespace ::osl; namespace xmlscript { @@ -818,6 +816,17 @@ void ControlImportContext::importDefaults( sal_Int32 nBaseX, sal_Int32 nBaseY, Reference< xml::sax2::XExtendedAttributes > const & xAttributes ) { + _xControlModel->setPropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ), + makeAny( _aId ) ); + + importStringProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ClassId") ), + OUString( RTL_CONSTASCII_USTRINGPARAM("class-id") ), + xAttributes ); + importLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("TabIndex") ), + OUString( RTL_CONSTASCII_USTRINGPARAM("tab-index") ), + xAttributes ); + sal_Bool bDisable; if (getBoolAttr( &bDisable, OUString( RTL_CONSTASCII_USTRINGPARAM("disabled") ), xAttributes ) && bDisable) diff --git a/xmlscript/test/imexp.cxx b/xmlscript/test/imexp.cxx index c83d1c75f756..9792d53a1578 100644 --- a/xmlscript/test/imexp.cxx +++ b/xmlscript/test/imexp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: imexp.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: dbo $ $Date: 2001-02-27 12:45:17 $ + * last change: $Author: dbo $ $Date: 2001-02-28 18:22:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -194,6 +194,18 @@ Reference< lang::XMultiServiceFactory > createApplicationServiceManager() xReg->registerImplementation( OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ), aDllName, Reference< registry::XSimpleRegistry > () ); +#ifdef SAL_W32 + aDllName = OUString::createFromAscii( "int" ); + aDllName += OUString::valueOf( (sal_Int32)SUPD ); + aDllName += OUString::createFromAscii( "mi.dll" ); +#else + aDllName = OUString::createFromAscii( "libint" ); + aDllName += OUString::valueOf( (sal_Int32)SUPD ); + aDllName += OUString::createFromAscii( ".so" ); +#endif + xReg->registerImplementation( + OUString::createFromAscii( "com.sun.star.loader.SharedLibrary" ), + aDllName, Reference< registry::XSimpleRegistry > () ); } @@ -283,15 +295,6 @@ void MyApp::Main() OString aParam1( OUStringToOString( OUString( GetCommandLineParam( 0 ) ), RTL_TEXTENCODING_ASCII_US ) ); Sequence< Reference< container::XNameContainer > > models( importFile( aParam1.getStr() ) ); - if (GetCommandLineParamCount() == 2) - { - // write and read again dialogs - OString aParam2( OUStringToOString( OUString( GetCommandLineParam( 1 ) ), RTL_TEXTENCODING_ASCII_US ) ); - exportToFile( aParam2.getStr(), models ); - // re-import - models = importFile( aParam2.getStr() ); - } - Reference< container::XNameContainer > const * pModels = models.getConstArray(); for ( sal_Int32 nPos = 0; nPos < models.getLength(); ++nPos ) { @@ -302,6 +305,13 @@ void MyApp::Main() Reference< awt::XDialog > xD( xDlg, UNO_QUERY ); xD->execute(); } + + if (GetCommandLineParamCount() == 2) + { + // write modified dialogs + OString aParam2( OUStringToOString( OUString( GetCommandLineParam( 1 ) ), RTL_TEXTENCODING_ASCII_US ) ); + exportToFile( aParam2.getStr(), models ); + } } catch (uno::Exception & rExc) { diff --git a/xmlscript/test/test.xml b/xmlscript/test/test.xml index 22824398205e..9834965bde50 100644 --- a/xmlscript/test/test.xml +++ b/xmlscript/test/test.xml @@ -4,11 +4,10 @@ <dialogs xmlns="http://openoffice.org/2000/dialog"> <window xmlns:dlg="http://openoffice.org/2000/dialog" - label="Test-Dialog" height="800" width="800"> + label="Test-Dialog" height="700" width="700"> <dlg:styles> <dlg:style style-id="bla" background-color="0xffffff" dlg:text-color="255"/> - <dlg:style style-id="bla2" background-color="0xff00ff" dlg:text-color="255193873"/> <dlg:style style-id="bla3" background-color="0" dlg:text-color="0xffffff" font-name="Arial" font-height="24"/> <dlg:style style-id="no_border" border="none"/> </dlg:styles> @@ -48,23 +47,24 @@ </menupopup> </combobox> <radiogroup> - <radio id="radio1" value="radio1" left="50" top="250" width="100" height="20"/> + <radio id="radio1" value="default radio" left="50" top="250" width="100" height="20"/> <radio id="radio2" value="checked" left="50" top="270" width="100" height="20" checked="true"/> <radio id="radio3" value="unchecked" left="50" top="290" width="100" height="20" checked="false"/> + <radio id="radio4" value="dont know" left="50" top="310" width="100" height="20" tristate="true"/> </radiogroup> <titledbox id="groupbox1" left="250" top="250" width="120" height="100"> <title value="grouped"/> - <radio id="radio4" value="default radio" left="5" top="15" width="100" height="20"/> - <radio id="radio5" value="dontknow" left="5" top="35" width="100" height="20" tristate="true"/> - <radio id="radio6" value="tristate_checked" left="5" top="55" width="100" height="20" tristate="true" checked="true"/> - <radio id="radio7" value="checked" left="5" top="75" width="100" height="20" checked="true"/> + <radio id="radio5" value="default radio" left="5" top="15" width="100" height="20"/> + <radio id="radio6" value="dont know" left="5" top="35" width="100" height="20" tristate="true"/> + <radio id="radio7" value="tristate checked" left="5" top="55" width="100" height="20" tristate="true" checked="true"/> + <radio id="radio8" value="checked" left="5" top="75" 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"/> - <textfield id="field1" left="250" top="520" width="50" height="40" value="edit text here..." readonly="true" vscroll="true" multiline="true" align="right" style-id="no_border"/> + <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="600" width="80" height="50" src="../../test/w3c.jpg"/> <filecontrol id="file1" left="150" top="600" width="100" height="100" value="f:\script\xmlscript\test\w3c.jpg"/> - <currencyfield id="currency1" left="250" top="600" width="100" height="20" value="5.6075" value-min="0.5" value-max="10.0" value-step="0.1" spin="true" thousands-separator="true" currency-symbol="$"/> +<!-- <currencyfield id="currency1" left="250" top="600" width="100" height="20" value="5.6075" value-min="0.5" value-max="10.0" value-step="0.1" spin="true" thousands-separator="true" currency-symbol="$"/> --> <numericfield id="numeric1" left="400" top="100" width="100" height="20" value="5.6075" value-min="0.5" value-max="10.0" value-step="0.1" thousands-separator="true"/> </dlg:bulletinboard> |