Lines 1980-1985
Link Here
|
1980 |
|
1980 |
|
1981 |
//################################################################################################## |
1981 |
//################################################################################################## |
1982 |
|
1982 |
|
|
|
1983 |
// table |
1984 |
//__________________________________________________________________________________________________ |
1985 |
Reference< xml::input::XElement > GridControlElement::startChildElement( |
1986 |
sal_Int32 nUid, OUString const & rLocalName, |
1987 |
Reference< xml::input::XAttributes > const & xAttributes ) |
1988 |
throw (xml::sax::SAXException, RuntimeException) |
1989 |
{ |
1990 |
// event |
1991 |
if (_pImport->isEventElement( nUid, rLocalName )) |
1992 |
{ |
1993 |
return new EventElement( nUid, rLocalName, xAttributes, this, _pImport ); |
1994 |
} |
1995 |
else |
1996 |
{ |
1997 |
throw xml::sax::SAXException( |
1998 |
OUString( RTL_CONSTASCII_USTRINGPARAM("expected event element!") ), |
1999 |
Reference< XInterface >(), Any() ); |
2000 |
} |
2001 |
} |
2002 |
|
2003 |
//__________________________________________________________________________________________________ |
2004 |
void GridControlElement::endElement() |
2005 |
throw (xml::sax::SAXException, RuntimeException) |
2006 |
{ |
2007 |
ControlImportContext ctx( |
2008 |
_pImport, getControlId( _xAttributes ), |
2009 |
OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.grid.UnoControlGridModel") ) ); |
2010 |
|
2011 |
Reference< xml::input::XElement > xStyle( getStyle( _xAttributes ) ); |
2012 |
if (xStyle.is()) |
2013 |
{ |
2014 |
StyleElement * pStyle = static_cast< StyleElement * >( xStyle.get () ); |
2015 |
Reference< beans::XPropertySet > xControlModel( ctx.getControlModel() ); |
2016 |
pStyle->importBackgroundColorStyle( xControlModel ); |
2017 |
pStyle->importBorderStyle( xControlModel ); |
2018 |
pStyle->importTextColorStyle( xControlModel ); |
2019 |
pStyle->importTextLineColorStyle( xControlModel ); |
2020 |
pStyle->importFontStyle( xControlModel ); |
2021 |
} |
2022 |
|
2023 |
ctx.importDefaults( _nBasePosX, _nBasePosY, _xAttributes ); |
2024 |
ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("Tabstop") ), |
2025 |
OUString( RTL_CONSTASCII_USTRINGPARAM("tabstop") ), |
2026 |
_xAttributes ); |
2027 |
ctx.importVerticalAlignProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("VerticalAlign") ), |
2028 |
OUString( RTL_CONSTASCII_USTRINGPARAM("valign") ), |
2029 |
_xAttributes ); |
2030 |
ctx.importSelectionTypeProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("SelectionModel") ), |
2031 |
OUString( RTL_CONSTASCII_USTRINGPARAM("selectiontype") ), |
2032 |
_xAttributes ); |
2033 |
ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ShowColumnHeader") ), |
2034 |
OUString( RTL_CONSTASCII_USTRINGPARAM("showcolumnheader") ), |
2035 |
_xAttributes ); |
2036 |
ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ShowRowHeader") ), |
2037 |
OUString( RTL_CONSTASCII_USTRINGPARAM("showrowheader") ), |
2038 |
_xAttributes ); |
2039 |
ctx.importHexLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("GridLineColor") ), |
2040 |
OUString( RTL_CONSTASCII_USTRINGPARAM("gridline-color") ), |
2041 |
_xAttributes ); |
2042 |
ctx.importBooleanProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("UseGridLines") ), |
2043 |
OUString( RTL_CONSTASCII_USTRINGPARAM("usegridlines") ), |
2044 |
_xAttributes ); |
2045 |
ctx.importHexLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBackgroundColor") ), |
2046 |
OUString( RTL_CONSTASCII_USTRINGPARAM("headerbackground-color") ), |
2047 |
_xAttributes ); |
2048 |
ctx.importHexLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderTextColor") ), |
2049 |
OUString( RTL_CONSTASCII_USTRINGPARAM("headertext-color") ), |
2050 |
_xAttributes ); |
2051 |
ctx.importHexLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ActiveSelectionBackgroundColor") ), |
2052 |
OUString( RTL_CONSTASCII_USTRINGPARAM("activeselectionbackground-color") ), |
2053 |
_xAttributes ); |
2054 |
ctx.importHexLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("ActiveSelectionTextColor") ), |
2055 |
OUString( RTL_CONSTASCII_USTRINGPARAM("activeselectiontext-color") ), |
2056 |
_xAttributes ); |
2057 |
ctx.importHexLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("InactiveSelectionBackgroundColor") ), |
2058 |
OUString( RTL_CONSTASCII_USTRINGPARAM("inactiveselectionbackground-color") ), |
2059 |
_xAttributes ); |
2060 |
ctx.importHexLongProperty( OUString( RTL_CONSTASCII_USTRINGPARAM("InactiveSelectionTextColor") ), |
2061 |
OUString( RTL_CONSTASCII_USTRINGPARAM("inactiveselectiontext-color") ), |
2062 |
_xAttributes ); |
2063 |
|
2064 |
ctx.importEvents( _events ); |
2065 |
// avoid ring-reference: |
2066 |
// vector< event elements > holding event elements holding this (via _pParent) |
2067 |
_events.clear(); |
2068 |
} |
2069 |
|
2070 |
//################################################################################################## |
2071 |
|
1983 |
// bulletinboard |
2072 |
// bulletinboard |
1984 |
//__________________________________________________________________________________________________ |
2073 |
//__________________________________________________________________________________________________ |
1985 |
Reference< xml::input::XElement > BulletinBoardElement::startChildElement( |
2074 |
Reference< xml::input::XElement > BulletinBoardElement::startChildElement( |
Lines 2097-2102
Link Here
|
2097 |
{ |
2186 |
{ |
2098 |
return new ProgressBarElement( rLocalName, xAttributes, this, _pImport ); |
2187 |
return new ProgressBarElement( rLocalName, xAttributes, this, _pImport ); |
2099 |
} |
2188 |
} |
|
|
2189 |
// table |
2190 |
else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("table") )) |
2191 |
{ |
2192 |
return new GridControlElement( rLocalName, xAttributes, this, _pImport ); |
2193 |
} |
2100 |
// bulletinboard |
2194 |
// bulletinboard |
2101 |
else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bulletinboard") )) |
2195 |
else if (rLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bulletinboard") )) |
2102 |
{ |
2196 |
{ |