summaryrefslogtreecommitdiff
path: root/xmlscript
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-01-29 14:12:57 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-01-29 14:12:57 +0000
commit8805afcfdc1e083f9daa0e8ebe012fcd7e9774c4 (patch)
treefc1499af9d2c05c6bc7908658f920151057c8047 /xmlscript
parented41ac991ec69d0f01cace08021744bbf0135acb (diff)
INTEGRATION: CWS fwk80_SRC680 (1.42.4); FILE MERGED
2008/01/11 09:36:48 tkr 1.42.4.1: #i83756# provide xml im- and export for FixedHyperlink
Diffstat (limited to 'xmlscript')
-rw-r--r--xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx80
1 files changed, 78 insertions, 2 deletions
diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx
index 13a831a9d365..67696252a555 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.42 $
+ * $Revision: 1.43 $
*
- * last change: $Author: ihi $ $Date: 2007-11-29 14:16:50 $
+ * last change: $Author: rt $ $Date: 2008-01-29 15:12:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -1087,6 +1087,78 @@ void TextElement::endElement()
}
//##################################################################################################
+// FixedHyperLink
+//__________________________________________________________________________________________________
+Reference< xml::input::XElement > FixedHyperLinkElement::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 FixedHyperLinkElement::endElement()
+ throw (xml::sax::SAXException, RuntimeException)
+{
+ ControlImportContext ctx(
+ _pImport, getControlId( _xAttributes ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.UnoControlFixedHyperlinkModel") ) );
+
+ 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->importTextColorStyle( xControlModel );
+ pStyle->importTextLineColorStyle( xControlModel );
+ pStyle->importBorderStyle( xControlModel );
+ pStyle->importFontStyle( xControlModel );
+ }
+
+ ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes );
+ ctx.importStringProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Label") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("value") ),
+ _xAttributes );
+ ctx.importStringProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("URL") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("url") ),
+ _xAttributes );
+ ctx.importStringProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Description") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("description") ),
+ _xAttributes );
+
+ ctx.importAlignProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Align") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("align") ),
+ _xAttributes );
+ ctx.importVerticalAlignProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("VerticalAlign") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("valign") ),
+ _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("MultiLine") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("multiline") ),
+ _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("tabstop") ),
+ _xAttributes );
+ ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("NoLabel") ),
+ OUString( RTL_CONSTASCII_USTRINGPARAM("nolabel") ),
+ _xAttributes );
+ ctx.importEvents( _events );
+ // avoid ring-reference:
+ // vector< event elements > holding event elements holding this (via _pParent)
+ _events.clear();
+}
+
+//##################################################################################################
// edit
//__________________________________________________________________________________________________
@@ -1965,6 +2037,10 @@ Reference< xml::input::XElement > BulletinBoardElement::startChildElement(
{
return new TextElement( rLocalName, xAttributes, this, _pImport );
}
+ else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("linklabel") ))
+ {
+ return new FixedHyperLinkElement( rLocalName, xAttributes, this, _pImport );
+ }
// textfield
else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("textfield") ))
{