summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorDaniel Boelzle <dbo@openoffice.org>2002-03-06 13:01:22 +0000
committerDaniel Boelzle <dbo@openoffice.org>2002-03-06 13:01:22 +0000
commit110783b1a5c985b57840ea1e57b9a8d7ff937bc1 (patch)
treeb2014d866409ef118b327680d3dc3b6d95122e1a /xmlscript
parent1f0910c48ba06ae3df43204fca49c208d59ca63d (diff)
#97409##97672##97696# fixed missing properties/attributes
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/exp_share.hxx5
-rw-r--r--xmlscript/source/xmldlg_imexp/imp_share.hxx7
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx13
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_export.cxx32
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx16
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_import.cxx41
6 files changed, 102 insertions, 12 deletions
diff --git a/xmlscript/source/xmldlg_imexp/exp_share.hxx b/xmlscript/source/xmldlg_imexp/exp_share.hxx
index e405aa162458..c43400033a66 100644
--- a/xmlscript/source/xmldlg_imexp/exp_share.hxx
+++ b/xmlscript/source/xmldlg_imexp/exp_share.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: exp_share.hxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: dbo $ $Date: 2001-10-22 08:52:20 $
+ * last change: $Author: dbo $ $Date: 2002-03-06 14:01:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -145,6 +145,7 @@ public:
void readShortAttr( OUString const & rPropName, OUString const & rAttrName );
void readBoolAttr( OUString const & rPropName, OUString const & rAttrName );
void readAlignAttr( OUString const & rPropName, OUString const & rAttrName );
+ void readImageAlignAttr( OUString const & rPropName, OUString const & rAttrName );
void readDateFormatAttr( OUString const & rPropName, OUString const & rAttrName );
void readTimeFormatAttr( OUString const & rPropName, OUString const & rAttrName );
void readOrientationAttr( OUString const & rPropName, OUString const & rAttrName );
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx
index 6bb554ef9aac..b08292d12e62 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.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: dbo $ $Date: 2002-01-18 09:44:47 $
+ * last change: $Author: dbo $ $Date: 2002-03-06 14:01:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -401,6 +401,9 @@ public:
bool importAlignProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
+ bool importImageAlignProperty(
+ OUString const & rPropName, OUString const & rAttrName,
+ Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
bool importDateFormatProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_expmodels.cxx
index e185fea4b3a4..30f04f90e9d1 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.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: dbo $ $Date: 2001-12-14 12:08:03 $
+ * last change: $Author: dbo $ $Date: 2002-03-06 14:01:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -94,6 +94,10 @@ void ElementDescriptor::readButtonModel( StyleBag * all_styles )
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value") ) );
readButtonTypeAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("PushButtonType") ),
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":button-type") ) );
+ readStringAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageURL") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-src") ) );
+ readAlignAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageAlign") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":image-align") ) );
readEvents();
}
//__________________________________________________________________________________________________
@@ -527,6 +531,9 @@ void ElementDescriptor::readCurrencyFieldModel( StyleBag * all_styles )
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-step") ) );
readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Spin") ),
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spin") ) );
+ readBoolAttr(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("PrependCurrencySymbol") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":prepend-symbol") ) );
readEvents();
}
//__________________________________________________________________________________________________
@@ -567,6 +574,8 @@ void ElementDescriptor::readDateFieldModel( StyleBag * all_styles )
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":value-max") ) );
readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Spin") ),
OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":spin") ) );
+ readBoolAttr( OUString( RTL_CONSTASCII_USTRINGPARAM("Dropdown") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM(XMLNS_DIALOGS_PREFIX ":dropdown") ) );
readEvents();
}
//__________________________________________________________________________________________________
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_export.cxx
index 00a65054f041..736bf058e85c 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.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: dbo $ $Date: 2001-10-22 08:52:20 $
+ * last change: $Author: dbo $ $Date: 2002-03-06 14:01:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -676,6 +676,34 @@ void ElementDescriptor::readAlignAttr( OUString const & rPropName, OUString cons
}
}
//__________________________________________________________________________________________________
+void ElementDescriptor::readImageAlignAttr( OUString const & rPropName, OUString const & rAttrName )
+{
+ if (beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState( rPropName ))
+ {
+ Any a( _xProps->getPropertyValue( rPropName ) );
+ if (a.getValueTypeClass() == TypeClass_SHORT)
+ {
+ switch (*(sal_Int16 const *)a.getValue())
+ {
+ case 0:
+ addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("left") ) );
+ break;
+ case 1:
+ addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("top") ) );
+ break;
+ case 2:
+ addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("right") ) );
+ break;
+ case 3:
+ addAttribute( rAttrName, OUString( RTL_CONSTASCII_USTRINGPARAM("bottom") ) );
+ break;
+ default:
+ OSL_ENSURE( 0, "### illegal image alignment value!" );
+ }
+ }
+ }
+}
+//__________________________________________________________________________________________________
void ElementDescriptor::readButtonTypeAttr( OUString const & rPropName, OUString const & rAttrName )
{
if (beans::PropertyState_DEFAULT_VALUE != _xPropState->getPropertyState( rPropName ))
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index c37a9a5e0b41..366743ca07d7 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.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: dbo $ $Date: 2002-01-18 09:44:47 $
+ * last change: $Author: dbo $ $Date: 2002-03-06 14:01:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -682,6 +682,9 @@ void DateFieldElement::endElement()
ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Spin") ),
OUString( RTL_CONSTASCII_USTRINGPARAM("spin") ),
_xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Dropdown") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("dropdown") ),
+ _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -762,6 +765,9 @@ void CurrencyFieldElement::endElement()
ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Spin") ),
OUString( RTL_CONSTASCII_USTRINGPARAM("spin") ),
_xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("PrependCurrencySymbol") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("prepend-symbol") ),
+ _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
// vector< event elements > holding event elements holding this (via _pParent)
@@ -1602,6 +1608,12 @@ void ButtonElement::endElement()
ctx.importButtonTypeProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("PushButtonType") ),
OUString( RTL_CONSTASCII_USTRINGPARAM("button-type") ),
_xAttributes );
+ ctx.importStringProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageURL") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("image-src") ),
+ _xAttributes );
+ ctx.importImageAlignProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ImageAlign") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("image-align") ),
+ _xAttributes );
ctx.importEvents( _events );
// avoid ring-reference:
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_import.cxx
index 2763df3605f6..519e6b150766 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.21 $
+ * $Revision: 1.22 $
*
- * last change: $Author: dbo $ $Date: 2001-10-22 08:52:20 $
+ * last change: $Author: dbo $ $Date: 2002-03-06 14:01:22 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -726,6 +726,43 @@ bool ImportContext::importAlignProperty(
return false;
}
//__________________________________________________________________________________________________
+bool ImportContext::importImageAlignProperty(
+ OUString const & rPropName, OUString const & rAttrName,
+ Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
+{
+ OUString aAlign( xAttributes->getValueByUidName( XMLNS_DIALOGS_UID, rAttrName ) );
+ if (aAlign.getLength())
+ {
+ sal_Int16 nAlign;
+ if (aAlign.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("left") ))
+ {
+ nAlign = 0;
+ }
+ else if (aAlign.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("top") ))
+ {
+ nAlign = 1;
+ }
+ else if (aAlign.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("right") ))
+ {
+ nAlign = 2;
+ }
+ else if (aAlign.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bottom") ))
+ {
+ nAlign = 3;
+ }
+ else
+ {
+ throw xml::sax::SAXException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("invalid image align value!") ),
+ Reference< XInterface >(), Any() );
+ }
+
+ _xControlModel->setPropertyValue( rPropName, makeAny( nAlign ) );
+ return true;
+ }
+ return false;
+}
+//__________________________________________________________________________________________________
bool ImportContext::importButtonTypeProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )