summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2007-07-03 11:57:47 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2007-07-03 11:57:47 +0000
commita9fae234137c210e99703764c96c80c89c7bac13 (patch)
treef0ac6d318f178a472518f23778e962ca287aed63 /xmlscript
parentdfab4f33a3286d26d2a73919851c8c7c4c44c8be (diff)
INTEGRATION: CWS tkr01 (1.37.12); FILE MERGED
2007/06/26 11:09:12 tkr 1.37.12.2: RESYNC: (1.37-1.38); FILE MERGED 2007/06/26 10:03:11 tkr 1.37.12.1: #i78846# Enable TreeControl support
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx75
1 files changed, 73 insertions, 2 deletions
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index 63be089b22f8..559cc8d90119 100644
--- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
+++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: xmldlg_impmodels.cxx,v $
*
- * $Revision: 1.38 $
+ * $Revision: 1.39 $
*
- * last change: $Author: kz $ $Date: 2007-06-20 10:33:13 $
+ * last change: $Author: rt $ $Date: 2007-07-03 12:57:47 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -899,6 +899,72 @@ void FileControlElement::endElement()
// vector< event elements > holding event elements holding this (via _pParent)
_events.clear();
}
+//##################################################################################################
+
+// treecontrol
+//__________________________________________________________________________________________________
+Reference< xml::input::XElement > TreeControlElement::startChildElement(
+ sal_Int32 nUid, OUString const & rLocalName,
+ Reference< xml::input::XAttributes > const & xAttributes )
+ throw (xml::sax::SAXException, RuntimeException)
+{
+ // event
+ if (_pImport->isEventElement( nUid, rLocalName ))
+ {
+ return new EventElement( nUid, rLocalName, xAttributes, this, _pImport );
+ }
+ else
+ {
+ throw xml::sax::SAXException(
+ OUString( RTL_CONSTASCII_USTRINGPARAM("expected event element!") ),
+ Reference< XInterface >(), Any() );
+ }
+}
+//__________________________________________________________________________________________________
+void TreeControlElement::endElement()
+ throw (xml::sax::SAXException, RuntimeException)
+{
+ ControlImportContext ctx(
+ _pImport, getControlId( _xAttributes ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.tree.TreeControlModel") ) );
+
+ Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) );
+ if (xStyle.is())
+ {
+ StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () );
+ Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() );
+ pStyle->importBackgroundColorStyle( xControlModel );
+ pStyle->importBorderStyle( xControlModel );
+ }
+
+ ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
+ ctx.importSelectionTypeProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectionType") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("selectiontype") ),
+ _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("RootDisplayed") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("rootdisplayed") ),
+ _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ShowsHandles") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("showshandles") ),
+ _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ShowsRootHandles") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("showsroothandles") ),
+ _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Editable") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("editable") ),
+ _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("RowHeight") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("readonly") ),
+ _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("InvokesStopNodeEditing") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("invokesstopnodeediting") ),
+ _xAttributes );
+
+ ctx.importEvents( _events );
+ // avoid ring-reference:
+ // vector< event elements > holding event elements holding this (via _pParent)
+ _events.clear();
+}
//##################################################################################################
@@ -1911,6 +1977,11 @@ Reference< xml::input::XElement > BulletinBoardElement::startChildElement(
{
return new FileControlElement( rLocalName, xAttributes, this, _pImport );
}
+ // treecontrol
+ else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("treecontrol") ))
+ {
+ return new TreeControlElement( rLocalName, xAttributes, this, _pImport );
+ }
// currencyfield
else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("currencyfield") ))
{