1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir #include "common.hxx" 29*cdf0e10cSrcweir #include "misc.hxx" 30*cdf0e10cSrcweir #include <xmlscript/xmldlg_imexp.hxx> 31*cdf0e10cSrcweir #include <xmlscript/xmllib_imexp.hxx> 32*cdf0e10cSrcweir #include <xmlscript/xmlmod_imexp.hxx> 33*cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 34*cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/lang/XMultiComponentFactory.hpp> 37*cdf0e10cSrcweir #include <com/sun/star/container/XNameContainer.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 39*cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormatsSupplier.hpp> 40*cdf0e10cSrcweir #include <com/sun/star/awt/XControlModel.hpp> 41*cdf0e10cSrcweir #include <com/sun/star/awt/FontDescriptor.hpp> 42*cdf0e10cSrcweir #include <com/sun/star/awt/FontEmphasisMark.hpp> 43*cdf0e10cSrcweir #include <com/sun/star/awt/FontRelief.hpp> 44*cdf0e10cSrcweir #include <com/sun/star/xml/input/XRoot.hpp> 45*cdf0e10cSrcweir #include <vector> 46*cdf0e10cSrcweir 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir namespace css = ::com::sun::star; 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir namespace xmlscript 51*cdf0e10cSrcweir { 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir // 54*cdf0e10cSrcweir inline sal_Int32 toInt32( ::rtl::OUString const & rStr ) SAL_THROW( () ) 55*cdf0e10cSrcweir { 56*cdf0e10cSrcweir sal_Int32 nVal; 57*cdf0e10cSrcweir if (rStr.getLength() > 2 && rStr[ 0 ] == '0' && rStr[ 1 ] == 'x') 58*cdf0e10cSrcweir nVal = rStr.copy( 2 ).toInt32( 16 ); 59*cdf0e10cSrcweir else 60*cdf0e10cSrcweir nVal = rStr.toInt32(); 61*cdf0e10cSrcweir return nVal; 62*cdf0e10cSrcweir } 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir inline bool getBoolAttr( 65*cdf0e10cSrcweir sal_Bool * pRet, ::rtl::OUString const & rAttrName, 66*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 67*cdf0e10cSrcweir sal_Int32 nUid ) 68*cdf0e10cSrcweir { 69*cdf0e10cSrcweir ::rtl::OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) ); 70*cdf0e10cSrcweir if (aValue.getLength()) 71*cdf0e10cSrcweir { 72*cdf0e10cSrcweir if (aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("true") )) 73*cdf0e10cSrcweir { 74*cdf0e10cSrcweir *pRet = sal_True; 75*cdf0e10cSrcweir return true; 76*cdf0e10cSrcweir } 77*cdf0e10cSrcweir else if (aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("false") )) 78*cdf0e10cSrcweir { 79*cdf0e10cSrcweir *pRet = sal_False; 80*cdf0e10cSrcweir return true; 81*cdf0e10cSrcweir } 82*cdf0e10cSrcweir else 83*cdf0e10cSrcweir { 84*cdf0e10cSrcweir throw css::xml::sax::SAXException( 85*cdf0e10cSrcweir rAttrName + OUSTR(": no boolean value (true|false)!"), 86*cdf0e10cSrcweir css::uno::Reference<css::uno::XInterface>(), css::uno::Any() ); 87*cdf0e10cSrcweir } 88*cdf0e10cSrcweir } 89*cdf0e10cSrcweir return false; 90*cdf0e10cSrcweir } 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir inline bool getStringAttr( 93*cdf0e10cSrcweir ::rtl::OUString * pRet, ::rtl::OUString const & rAttrName, 94*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 95*cdf0e10cSrcweir sal_Int32 nUid ) 96*cdf0e10cSrcweir { 97*cdf0e10cSrcweir *pRet = xAttributes->getValueByUidName( nUid, rAttrName ); 98*cdf0e10cSrcweir return (pRet->getLength() > 0); 99*cdf0e10cSrcweir } 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir inline bool getLongAttr( 102*cdf0e10cSrcweir sal_Int32 * pRet, ::rtl::OUString const & rAttrName, 103*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 104*cdf0e10cSrcweir sal_Int32 nUid ) 105*cdf0e10cSrcweir { 106*cdf0e10cSrcweir ::rtl::OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) ); 107*cdf0e10cSrcweir if (aValue.getLength()) 108*cdf0e10cSrcweir { 109*cdf0e10cSrcweir *pRet = toInt32( aValue ); 110*cdf0e10cSrcweir return true; 111*cdf0e10cSrcweir } 112*cdf0e10cSrcweir return false; 113*cdf0e10cSrcweir } 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir class ImportContext; 116*cdf0e10cSrcweir 117*cdf0e10cSrcweir //============================================================================== 118*cdf0e10cSrcweir struct DialogImport 119*cdf0e10cSrcweir : public ::cppu::WeakImplHelper1< css::xml::input::XRoot > 120*cdf0e10cSrcweir { 121*cdf0e10cSrcweir friend class ImportContext; 122*cdf0e10cSrcweir 123*cdf0e10cSrcweir css::uno::Reference< css::uno::XComponentContext > _xContext; 124*cdf0e10cSrcweir css::uno::Reference< css::util::XNumberFormatsSupplier > _xSupplier; 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir ::std::vector< ::rtl::OUString > _styleNames; 127*cdf0e10cSrcweir ::std::vector< css::uno::Reference< css::xml::input::XElement > > _styles; 128*cdf0e10cSrcweir 129*cdf0e10cSrcweir css::uno::Reference< css::container::XNameContainer > _xDialogModel; 130*cdf0e10cSrcweir css::uno::Reference< css::lang::XMultiServiceFactory > _xDialogModelFactory; 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir sal_Int32 XMLNS_DIALOGS_UID, XMLNS_SCRIPT_UID; 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir public: 135*cdf0e10cSrcweir inline bool isEventElement( 136*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName ) 137*cdf0e10cSrcweir { 138*cdf0e10cSrcweir return ((XMLNS_SCRIPT_UID == nUid && 139*cdf0e10cSrcweir (rLocalName.equalsAsciiL( 140*cdf0e10cSrcweir RTL_CONSTASCII_STRINGPARAM("event") ) || 141*cdf0e10cSrcweir rLocalName.equalsAsciiL( 142*cdf0e10cSrcweir RTL_CONSTASCII_STRINGPARAM("listener-event") ))) || 143*cdf0e10cSrcweir (XMLNS_DIALOGS_UID == nUid && 144*cdf0e10cSrcweir rLocalName.equalsAsciiL( 145*cdf0e10cSrcweir RTL_CONSTASCII_STRINGPARAM("event") ))); 146*cdf0e10cSrcweir } 147*cdf0e10cSrcweir 148*cdf0e10cSrcweir void addStyle( 149*cdf0e10cSrcweir ::rtl::OUString const & rStyleId, 150*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XElement > const & xStyle ) 151*cdf0e10cSrcweir SAL_THROW( () ); 152*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XElement > getStyle( 153*cdf0e10cSrcweir ::rtl::OUString const & rStyleId ) const 154*cdf0e10cSrcweir SAL_THROW( () ); 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir inline css::uno::Reference< css::uno::XComponentContext > 157*cdf0e10cSrcweir const & getComponentContext() SAL_THROW( () ) { return _xContext; } 158*cdf0e10cSrcweir css::uno::Reference< css::util::XNumberFormatsSupplier > 159*cdf0e10cSrcweir const & getNumberFormatsSupplier(); 160*cdf0e10cSrcweir 161*cdf0e10cSrcweir inline DialogImport( 162*cdf0e10cSrcweir css::uno::Reference<css::uno::XComponentContext> const & xContext, 163*cdf0e10cSrcweir css::uno::Reference<css::container::XNameContainer> 164*cdf0e10cSrcweir const & xDialogModel ) 165*cdf0e10cSrcweir SAL_THROW( () ) 166*cdf0e10cSrcweir : _xContext( xContext ) 167*cdf0e10cSrcweir , _xDialogModel( xDialogModel ) 168*cdf0e10cSrcweir , _xDialogModelFactory( xDialogModel, css::uno::UNO_QUERY_THROW ) 169*cdf0e10cSrcweir { OSL_ASSERT( _xDialogModel.is() && _xDialogModelFactory.is() && 170*cdf0e10cSrcweir _xContext.is() ); } 171*cdf0e10cSrcweir virtual ~DialogImport() 172*cdf0e10cSrcweir SAL_THROW( () ); 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir // XRoot 175*cdf0e10cSrcweir virtual void SAL_CALL startDocument( 176*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XNamespaceMapping > 177*cdf0e10cSrcweir const & xNamespaceMapping ) 178*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 179*cdf0e10cSrcweir virtual void SAL_CALL endDocument() 180*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 181*cdf0e10cSrcweir virtual void SAL_CALL processingInstruction( 182*cdf0e10cSrcweir ::rtl::OUString const & rTarget, ::rtl::OUString const & rData ) 183*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 184*cdf0e10cSrcweir virtual void SAL_CALL setDocumentLocator( 185*cdf0e10cSrcweir css::uno::Reference< css::xml::sax::XLocator > const & xLocator ) 186*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 187*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 188*cdf0e10cSrcweir SAL_CALL startRootElement( 189*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 190*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 191*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 192*cdf0e10cSrcweir }; 193*cdf0e10cSrcweir 194*cdf0e10cSrcweir //============================================================================== 195*cdf0e10cSrcweir class ElementBase 196*cdf0e10cSrcweir : public ::cppu::WeakImplHelper1< css::xml::input::XElement > 197*cdf0e10cSrcweir { 198*cdf0e10cSrcweir protected: 199*cdf0e10cSrcweir DialogImport * _pImport; 200*cdf0e10cSrcweir ElementBase * _pParent; 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir sal_Int32 _nUid; 203*cdf0e10cSrcweir ::rtl::OUString _aLocalName; 204*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > _xAttributes; 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir public: 207*cdf0e10cSrcweir ElementBase( 208*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 209*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 210*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 211*cdf0e10cSrcweir SAL_THROW( () ); 212*cdf0e10cSrcweir virtual ~ElementBase() 213*cdf0e10cSrcweir SAL_THROW( () ); 214*cdf0e10cSrcweir 215*cdf0e10cSrcweir // XElement 216*cdf0e10cSrcweir virtual css::uno::Reference<css::xml::input::XElement> SAL_CALL getParent() 217*cdf0e10cSrcweir throw (css::uno::RuntimeException); 218*cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getLocalName() 219*cdf0e10cSrcweir throw (css::uno::RuntimeException); 220*cdf0e10cSrcweir virtual sal_Int32 SAL_CALL getUid() 221*cdf0e10cSrcweir throw (css::uno::RuntimeException); 222*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XAttributes > 223*cdf0e10cSrcweir SAL_CALL getAttributes() throw (css::uno::RuntimeException); 224*cdf0e10cSrcweir virtual void SAL_CALL ignorableWhitespace( 225*cdf0e10cSrcweir ::rtl::OUString const & rWhitespaces ) 226*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 227*cdf0e10cSrcweir virtual void SAL_CALL characters( ::rtl::OUString const & rChars ) 228*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 229*cdf0e10cSrcweir virtual void SAL_CALL processingInstruction( 230*cdf0e10cSrcweir ::rtl::OUString const & Target, ::rtl::OUString const & Data ) 231*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 232*cdf0e10cSrcweir virtual void SAL_CALL endElement() 233*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 234*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 235*cdf0e10cSrcweir SAL_CALL startChildElement( 236*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 237*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 238*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 239*cdf0e10cSrcweir }; 240*cdf0e10cSrcweir 241*cdf0e10cSrcweir //============================================================================== 242*cdf0e10cSrcweir class StylesElement 243*cdf0e10cSrcweir : public ElementBase 244*cdf0e10cSrcweir { 245*cdf0e10cSrcweir public: 246*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 247*cdf0e10cSrcweir SAL_CALL startChildElement( 248*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 249*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 250*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 251*cdf0e10cSrcweir 252*cdf0e10cSrcweir inline StylesElement( 253*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 254*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 255*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 256*cdf0e10cSrcweir SAL_THROW( () ) 257*cdf0e10cSrcweir : ElementBase( pImport->XMLNS_DIALOGS_UID, 258*cdf0e10cSrcweir rLocalName, xAttributes, pParent, pImport ) 259*cdf0e10cSrcweir {} 260*cdf0e10cSrcweir }; 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir //============================================================================== 263*cdf0e10cSrcweir class StyleElement 264*cdf0e10cSrcweir : public ElementBase 265*cdf0e10cSrcweir { 266*cdf0e10cSrcweir sal_Int32 _backgroundColor; 267*cdf0e10cSrcweir sal_Int32 _textColor; 268*cdf0e10cSrcweir sal_Int32 _textLineColor; 269*cdf0e10cSrcweir sal_Int16 _border; 270*cdf0e10cSrcweir sal_Int32 _borderColor; 271*cdf0e10cSrcweir css::awt::FontDescriptor _descr; 272*cdf0e10cSrcweir sal_Int16 _fontRelief; 273*cdf0e10cSrcweir sal_Int16 _fontEmphasisMark; 274*cdf0e10cSrcweir sal_Int32 _fillColor; 275*cdf0e10cSrcweir sal_Int16 _visualEffect; 276*cdf0e10cSrcweir 277*cdf0e10cSrcweir // current highest mask: 0x40 278*cdf0e10cSrcweir short _inited, _hasValue; 279*cdf0e10cSrcweir 280*cdf0e10cSrcweir void setFontProperties( 281*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > const & xProps ); 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir public: 284*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 285*cdf0e10cSrcweir SAL_CALL startChildElement( 286*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 287*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 288*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 289*cdf0e10cSrcweir virtual void SAL_CALL endElement() 290*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 291*cdf0e10cSrcweir 292*cdf0e10cSrcweir bool importTextColorStyle( 293*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > const & xProps ); 294*cdf0e10cSrcweir bool importTextLineColorStyle( 295*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > const & xProps ); 296*cdf0e10cSrcweir bool importFillColorStyle( 297*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > const & xProps ); 298*cdf0e10cSrcweir bool importBackgroundColorStyle( 299*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > const & xProps ); 300*cdf0e10cSrcweir bool importFontStyle( 301*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > const & xProps ); 302*cdf0e10cSrcweir bool importBorderStyle( 303*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > const & xProps ); 304*cdf0e10cSrcweir bool importVisualEffectStyle( 305*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > const & xProps ); 306*cdf0e10cSrcweir 307*cdf0e10cSrcweir inline StyleElement( 308*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 309*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 310*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 311*cdf0e10cSrcweir SAL_THROW( () ) 312*cdf0e10cSrcweir : ElementBase( pImport->XMLNS_DIALOGS_UID, 313*cdf0e10cSrcweir rLocalName, xAttributes, pParent, pImport ) 314*cdf0e10cSrcweir , _fontRelief( css::awt::FontRelief::NONE ) 315*cdf0e10cSrcweir , _fontEmphasisMark( css::awt::FontEmphasisMark::NONE ) 316*cdf0e10cSrcweir , _inited( 0 ) 317*cdf0e10cSrcweir , _hasValue( 0 ) 318*cdf0e10cSrcweir {} 319*cdf0e10cSrcweir }; 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir //============================================================================== 322*cdf0e10cSrcweir class MenuPopupElement 323*cdf0e10cSrcweir : public ElementBase 324*cdf0e10cSrcweir { 325*cdf0e10cSrcweir ::std::vector< ::rtl::OUString > _itemValues; 326*cdf0e10cSrcweir ::std::vector< sal_Int16 > _itemSelected; 327*cdf0e10cSrcweir public: 328*cdf0e10cSrcweir css::uno::Sequence< ::rtl::OUString > getItemValues(); 329*cdf0e10cSrcweir css::uno::Sequence< sal_Int16 > getSelectedItems(); 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 332*cdf0e10cSrcweir SAL_CALL startChildElement( 333*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 334*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 335*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir inline MenuPopupElement( 338*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 339*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 340*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 341*cdf0e10cSrcweir SAL_THROW( () ) 342*cdf0e10cSrcweir : ElementBase( pImport->XMLNS_DIALOGS_UID, 343*cdf0e10cSrcweir rLocalName, xAttributes, pParent, pImport ) 344*cdf0e10cSrcweir {} 345*cdf0e10cSrcweir }; 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir //============================================================================== 348*cdf0e10cSrcweir class ControlElement 349*cdf0e10cSrcweir : public ElementBase 350*cdf0e10cSrcweir { 351*cdf0e10cSrcweir friend class EventElement; 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir protected: 354*cdf0e10cSrcweir sal_Int32 _nBasePosX, _nBasePosY; 355*cdf0e10cSrcweir 356*cdf0e10cSrcweir ::std::vector< css::uno::Reference< css::xml::input::XElement > > _events; 357*cdf0e10cSrcweir 358*cdf0e10cSrcweir ::rtl::OUString getControlId( 359*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 360*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XElement > getStyle( 361*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 362*cdf0e10cSrcweir public: 363*cdf0e10cSrcweir ::std::vector<css::uno::Reference< css::xml::input::XElement> > *getEvents() 364*cdf0e10cSrcweir SAL_THROW( () ) { return &_events; } 365*cdf0e10cSrcweir 366*cdf0e10cSrcweir ControlElement( 367*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 368*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 369*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 370*cdf0e10cSrcweir SAL_THROW( () ); 371*cdf0e10cSrcweir }; 372*cdf0e10cSrcweir 373*cdf0e10cSrcweir //============================================================================== 374*cdf0e10cSrcweir class ImportContext 375*cdf0e10cSrcweir { 376*cdf0e10cSrcweir protected: 377*cdf0e10cSrcweir DialogImport * _pImport; 378*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > _xControlModel; 379*cdf0e10cSrcweir ::rtl::OUString _aId; 380*cdf0e10cSrcweir 381*cdf0e10cSrcweir public: 382*cdf0e10cSrcweir inline ImportContext( 383*cdf0e10cSrcweir DialogImport * pImport, 384*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > const & xControlModel_, 385*cdf0e10cSrcweir ::rtl::OUString const & id ) 386*cdf0e10cSrcweir : _pImport( pImport ), 387*cdf0e10cSrcweir _xControlModel( xControlModel_ ), 388*cdf0e10cSrcweir _aId( id ) 389*cdf0e10cSrcweir { OSL_ASSERT( _xControlModel.is() ); } 390*cdf0e10cSrcweir 391*cdf0e10cSrcweir inline css::uno::Reference< css::beans::XPropertySet > getControlModel() 392*cdf0e10cSrcweir { return _xControlModel; } 393*cdf0e10cSrcweir 394*cdf0e10cSrcweir void importDefaults( 395*cdf0e10cSrcweir sal_Int32 nBaseX, sal_Int32 nBaseY, 396*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 397*cdf0e10cSrcweir bool supportPrintable = true ); 398*cdf0e10cSrcweir void importEvents( 399*cdf0e10cSrcweir ::std::vector< css::uno::Reference< css::xml::input::XElement > > 400*cdf0e10cSrcweir const & rEvents ); 401*cdf0e10cSrcweir 402*cdf0e10cSrcweir bool importStringProperty( 403*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 404*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 405*cdf0e10cSrcweir bool importDoubleProperty( 406*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 407*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 408*cdf0e10cSrcweir bool importBooleanProperty( 409*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 410*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 411*cdf0e10cSrcweir bool importShortProperty( 412*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 413*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 414*cdf0e10cSrcweir bool importLongProperty( 415*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 416*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 417*cdf0e10cSrcweir bool importLongProperty( 418*cdf0e10cSrcweir sal_Int32 nOffset, 419*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 420*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 421*cdf0e10cSrcweir bool importHexLongProperty( 422*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 423*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 424*cdf0e10cSrcweir bool importAlignProperty( 425*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 426*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 427*cdf0e10cSrcweir bool importVerticalAlignProperty( 428*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 429*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 430*cdf0e10cSrcweir bool importImageAlignProperty( 431*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 432*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 433*cdf0e10cSrcweir bool importImagePositionProperty( 434*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 435*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 436*cdf0e10cSrcweir bool importDateFormatProperty( 437*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 438*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 439*cdf0e10cSrcweir bool importTimeFormatProperty( 440*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 441*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 442*cdf0e10cSrcweir bool importOrientationProperty( 443*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 444*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 445*cdf0e10cSrcweir bool importButtonTypeProperty( 446*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 447*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 448*cdf0e10cSrcweir bool importLineEndFormatProperty( 449*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 450*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 451*cdf0e10cSrcweir bool importSelectionTypeProperty( 452*cdf0e10cSrcweir ::rtl::OUString const & rPropName, ::rtl::OUString const & rAttrName, 453*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ); 454*cdf0e10cSrcweir }; 455*cdf0e10cSrcweir 456*cdf0e10cSrcweir //============================================================================== 457*cdf0e10cSrcweir class ControlImportContext : public ImportContext 458*cdf0e10cSrcweir { 459*cdf0e10cSrcweir public: 460*cdf0e10cSrcweir inline ControlImportContext( 461*cdf0e10cSrcweir DialogImport * pImport, 462*cdf0e10cSrcweir ::rtl::OUString const & rId, ::rtl::OUString const & rControlName ) 463*cdf0e10cSrcweir : ImportContext( 464*cdf0e10cSrcweir pImport, 465*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet >( 466*cdf0e10cSrcweir pImport->_xDialogModelFactory->createInstance( rControlName ), 467*cdf0e10cSrcweir css::uno::UNO_QUERY_THROW ), rId ) 468*cdf0e10cSrcweir {} 469*cdf0e10cSrcweir inline ~ControlImportContext() 470*cdf0e10cSrcweir { 471*cdf0e10cSrcweir _pImport->_xDialogModel->insertByName( 472*cdf0e10cSrcweir _aId, css::uno::makeAny( 473*cdf0e10cSrcweir css::uno::Reference<css::awt::XControlModel>::query( 474*cdf0e10cSrcweir _xControlModel ) ) ); 475*cdf0e10cSrcweir } 476*cdf0e10cSrcweir }; 477*cdf0e10cSrcweir 478*cdf0e10cSrcweir //============================================================================== 479*cdf0e10cSrcweir class WindowElement 480*cdf0e10cSrcweir : public ControlElement 481*cdf0e10cSrcweir { 482*cdf0e10cSrcweir public: 483*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 484*cdf0e10cSrcweir SAL_CALL startChildElement( 485*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 486*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 487*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 488*cdf0e10cSrcweir virtual void SAL_CALL endElement() 489*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 490*cdf0e10cSrcweir 491*cdf0e10cSrcweir inline WindowElement( 492*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 493*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 494*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 495*cdf0e10cSrcweir SAL_THROW( () ) 496*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 497*cdf0e10cSrcweir {} 498*cdf0e10cSrcweir }; 499*cdf0e10cSrcweir 500*cdf0e10cSrcweir //============================================================================== 501*cdf0e10cSrcweir class EventElement 502*cdf0e10cSrcweir : public ElementBase 503*cdf0e10cSrcweir { 504*cdf0e10cSrcweir public: 505*cdf0e10cSrcweir virtual void SAL_CALL endElement() 506*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 507*cdf0e10cSrcweir 508*cdf0e10cSrcweir inline EventElement( 509*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 510*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 511*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 512*cdf0e10cSrcweir SAL_THROW( () ) 513*cdf0e10cSrcweir : ElementBase( nUid, rLocalName, xAttributes, pParent, pImport ) 514*cdf0e10cSrcweir {} 515*cdf0e10cSrcweir }; 516*cdf0e10cSrcweir 517*cdf0e10cSrcweir //============================================================================== 518*cdf0e10cSrcweir class BulletinBoardElement 519*cdf0e10cSrcweir : public ControlElement 520*cdf0e10cSrcweir { 521*cdf0e10cSrcweir public: 522*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 523*cdf0e10cSrcweir SAL_CALL startChildElement( 524*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 525*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 526*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 527*cdf0e10cSrcweir 528*cdf0e10cSrcweir BulletinBoardElement( 529*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 530*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 531*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 532*cdf0e10cSrcweir SAL_THROW( () ); 533*cdf0e10cSrcweir }; 534*cdf0e10cSrcweir 535*cdf0e10cSrcweir //============================================================================== 536*cdf0e10cSrcweir class ButtonElement 537*cdf0e10cSrcweir : public ControlElement 538*cdf0e10cSrcweir { 539*cdf0e10cSrcweir public: 540*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 541*cdf0e10cSrcweir SAL_CALL startChildElement( 542*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 543*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 544*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 545*cdf0e10cSrcweir virtual void SAL_CALL endElement() 546*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 547*cdf0e10cSrcweir 548*cdf0e10cSrcweir inline ButtonElement( 549*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 550*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 551*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 552*cdf0e10cSrcweir SAL_THROW( () ) 553*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 554*cdf0e10cSrcweir {} 555*cdf0e10cSrcweir }; 556*cdf0e10cSrcweir 557*cdf0e10cSrcweir //============================================================================== 558*cdf0e10cSrcweir class CheckBoxElement 559*cdf0e10cSrcweir : public ControlElement 560*cdf0e10cSrcweir { 561*cdf0e10cSrcweir public: 562*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 563*cdf0e10cSrcweir SAL_CALL startChildElement( 564*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 565*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 566*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 567*cdf0e10cSrcweir virtual void SAL_CALL endElement() 568*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 569*cdf0e10cSrcweir 570*cdf0e10cSrcweir inline CheckBoxElement( 571*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 572*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 573*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 574*cdf0e10cSrcweir SAL_THROW( () ) 575*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 576*cdf0e10cSrcweir {} 577*cdf0e10cSrcweir }; 578*cdf0e10cSrcweir 579*cdf0e10cSrcweir //============================================================================== 580*cdf0e10cSrcweir class ComboBoxElement 581*cdf0e10cSrcweir : public ControlElement 582*cdf0e10cSrcweir { 583*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XElement > _popup; 584*cdf0e10cSrcweir public: 585*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 586*cdf0e10cSrcweir SAL_CALL startChildElement( 587*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 588*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 589*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 590*cdf0e10cSrcweir virtual void SAL_CALL endElement() 591*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 592*cdf0e10cSrcweir 593*cdf0e10cSrcweir inline ComboBoxElement( 594*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 595*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 596*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 597*cdf0e10cSrcweir SAL_THROW( () ) 598*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 599*cdf0e10cSrcweir {} 600*cdf0e10cSrcweir }; 601*cdf0e10cSrcweir 602*cdf0e10cSrcweir //============================================================================== 603*cdf0e10cSrcweir class MenuListElement 604*cdf0e10cSrcweir : public ControlElement 605*cdf0e10cSrcweir { 606*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XElement > _popup; 607*cdf0e10cSrcweir public: 608*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 609*cdf0e10cSrcweir SAL_CALL startChildElement( 610*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 611*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 612*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 613*cdf0e10cSrcweir virtual void SAL_CALL endElement() 614*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 615*cdf0e10cSrcweir 616*cdf0e10cSrcweir inline MenuListElement( 617*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 618*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 619*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 620*cdf0e10cSrcweir SAL_THROW( () ) 621*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 622*cdf0e10cSrcweir {} 623*cdf0e10cSrcweir }; 624*cdf0e10cSrcweir 625*cdf0e10cSrcweir //============================================================================== 626*cdf0e10cSrcweir class RadioElement 627*cdf0e10cSrcweir : public ControlElement 628*cdf0e10cSrcweir { 629*cdf0e10cSrcweir public: 630*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 631*cdf0e10cSrcweir SAL_CALL startChildElement( 632*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 633*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 634*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 635*cdf0e10cSrcweir 636*cdf0e10cSrcweir inline RadioElement( 637*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 638*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 639*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 640*cdf0e10cSrcweir SAL_THROW( () ) 641*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 642*cdf0e10cSrcweir {} 643*cdf0e10cSrcweir }; 644*cdf0e10cSrcweir 645*cdf0e10cSrcweir //============================================================================== 646*cdf0e10cSrcweir class RadioGroupElement 647*cdf0e10cSrcweir : public ControlElement 648*cdf0e10cSrcweir { 649*cdf0e10cSrcweir ::std::vector< css::uno::Reference< css::xml::input::XElement > > _radios; 650*cdf0e10cSrcweir public: 651*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 652*cdf0e10cSrcweir SAL_CALL startChildElement( 653*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 654*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 655*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 656*cdf0e10cSrcweir void SAL_CALL endElement() 657*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 658*cdf0e10cSrcweir 659*cdf0e10cSrcweir inline RadioGroupElement( 660*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 661*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 662*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 663*cdf0e10cSrcweir SAL_THROW( () ) 664*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 665*cdf0e10cSrcweir {} 666*cdf0e10cSrcweir }; 667*cdf0e10cSrcweir 668*cdf0e10cSrcweir //============================================================================== 669*cdf0e10cSrcweir class TitledBoxElement 670*cdf0e10cSrcweir : public BulletinBoardElement 671*cdf0e10cSrcweir { 672*cdf0e10cSrcweir ::rtl::OUString _label; 673*cdf0e10cSrcweir ::std::vector< css::uno::Reference< css::xml::input::XElement > > _radios; 674*cdf0e10cSrcweir public: 675*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 676*cdf0e10cSrcweir SAL_CALL startChildElement( 677*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 678*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 679*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 680*cdf0e10cSrcweir virtual void SAL_CALL endElement() 681*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 682*cdf0e10cSrcweir 683*cdf0e10cSrcweir inline TitledBoxElement( 684*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 685*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 686*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 687*cdf0e10cSrcweir SAL_THROW( () ) 688*cdf0e10cSrcweir : BulletinBoardElement( rLocalName, xAttributes, pParent, pImport ) 689*cdf0e10cSrcweir {} 690*cdf0e10cSrcweir }; 691*cdf0e10cSrcweir 692*cdf0e10cSrcweir //============================================================================== 693*cdf0e10cSrcweir class TextElement 694*cdf0e10cSrcweir : public ControlElement 695*cdf0e10cSrcweir { 696*cdf0e10cSrcweir public: 697*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 698*cdf0e10cSrcweir SAL_CALL startChildElement( 699*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 700*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 701*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 702*cdf0e10cSrcweir virtual void SAL_CALL endElement() 703*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 704*cdf0e10cSrcweir 705*cdf0e10cSrcweir inline TextElement( 706*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 707*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 708*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 709*cdf0e10cSrcweir SAL_THROW( () ) 710*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 711*cdf0e10cSrcweir {} 712*cdf0e10cSrcweir }; 713*cdf0e10cSrcweir //============================================================================== 714*cdf0e10cSrcweir class FixedHyperLinkElement 715*cdf0e10cSrcweir : public ControlElement 716*cdf0e10cSrcweir { 717*cdf0e10cSrcweir public: 718*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 719*cdf0e10cSrcweir SAL_CALL startChildElement( 720*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 721*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 722*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 723*cdf0e10cSrcweir virtual void SAL_CALL endElement() 724*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 725*cdf0e10cSrcweir 726*cdf0e10cSrcweir inline FixedHyperLinkElement( 727*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 728*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 729*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 730*cdf0e10cSrcweir SAL_THROW( () ) 731*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 732*cdf0e10cSrcweir {} 733*cdf0e10cSrcweir }; 734*cdf0e10cSrcweir //============================================================================== 735*cdf0e10cSrcweir class TextFieldElement 736*cdf0e10cSrcweir : public ControlElement 737*cdf0e10cSrcweir { 738*cdf0e10cSrcweir public: 739*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 740*cdf0e10cSrcweir SAL_CALL startChildElement( 741*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 742*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 743*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 744*cdf0e10cSrcweir virtual void SAL_CALL endElement() 745*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 746*cdf0e10cSrcweir 747*cdf0e10cSrcweir inline TextFieldElement( 748*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 749*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 750*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 751*cdf0e10cSrcweir SAL_THROW( () ) 752*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 753*cdf0e10cSrcweir {} 754*cdf0e10cSrcweir }; 755*cdf0e10cSrcweir 756*cdf0e10cSrcweir //============================================================================== 757*cdf0e10cSrcweir class ImageControlElement 758*cdf0e10cSrcweir : public ControlElement 759*cdf0e10cSrcweir { 760*cdf0e10cSrcweir public: 761*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 762*cdf0e10cSrcweir SAL_CALL startChildElement( 763*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 764*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 765*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 766*cdf0e10cSrcweir virtual void SAL_CALL endElement() 767*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 768*cdf0e10cSrcweir 769*cdf0e10cSrcweir inline ImageControlElement( 770*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 771*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 772*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 773*cdf0e10cSrcweir SAL_THROW( () ) 774*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 775*cdf0e10cSrcweir {} 776*cdf0e10cSrcweir }; 777*cdf0e10cSrcweir 778*cdf0e10cSrcweir //============================================================================== 779*cdf0e10cSrcweir class FileControlElement 780*cdf0e10cSrcweir : public ControlElement 781*cdf0e10cSrcweir { 782*cdf0e10cSrcweir public: 783*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 784*cdf0e10cSrcweir SAL_CALL startChildElement( 785*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 786*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 787*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 788*cdf0e10cSrcweir virtual void SAL_CALL endElement() 789*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 790*cdf0e10cSrcweir 791*cdf0e10cSrcweir inline FileControlElement( 792*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 793*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 794*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 795*cdf0e10cSrcweir SAL_THROW( () ) 796*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 797*cdf0e10cSrcweir {} 798*cdf0e10cSrcweir }; 799*cdf0e10cSrcweir 800*cdf0e10cSrcweir //============================================================================== 801*cdf0e10cSrcweir class TreeControlElement 802*cdf0e10cSrcweir : public ControlElement 803*cdf0e10cSrcweir { 804*cdf0e10cSrcweir public: 805*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 806*cdf0e10cSrcweir SAL_CALL startChildElement( 807*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 808*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 809*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 810*cdf0e10cSrcweir virtual void SAL_CALL endElement() 811*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 812*cdf0e10cSrcweir 813*cdf0e10cSrcweir inline TreeControlElement( 814*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 815*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 816*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 817*cdf0e10cSrcweir SAL_THROW( () ) 818*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 819*cdf0e10cSrcweir {} 820*cdf0e10cSrcweir }; 821*cdf0e10cSrcweir 822*cdf0e10cSrcweir //============================================================================== 823*cdf0e10cSrcweir class CurrencyFieldElement 824*cdf0e10cSrcweir : public ControlElement 825*cdf0e10cSrcweir { 826*cdf0e10cSrcweir public: 827*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 828*cdf0e10cSrcweir SAL_CALL startChildElement( 829*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 830*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 831*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 832*cdf0e10cSrcweir virtual void SAL_CALL endElement() 833*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 834*cdf0e10cSrcweir 835*cdf0e10cSrcweir inline CurrencyFieldElement( 836*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 837*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 838*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 839*cdf0e10cSrcweir SAL_THROW( () ) 840*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 841*cdf0e10cSrcweir {} 842*cdf0e10cSrcweir }; 843*cdf0e10cSrcweir 844*cdf0e10cSrcweir //============================================================================== 845*cdf0e10cSrcweir class DateFieldElement 846*cdf0e10cSrcweir : public ControlElement 847*cdf0e10cSrcweir { 848*cdf0e10cSrcweir public: 849*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 850*cdf0e10cSrcweir SAL_CALL startChildElement( 851*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 852*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 853*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 854*cdf0e10cSrcweir virtual void SAL_CALL endElement() 855*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 856*cdf0e10cSrcweir 857*cdf0e10cSrcweir inline DateFieldElement( 858*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 859*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 860*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 861*cdf0e10cSrcweir SAL_THROW( () ) 862*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 863*cdf0e10cSrcweir {} 864*cdf0e10cSrcweir }; 865*cdf0e10cSrcweir 866*cdf0e10cSrcweir //============================================================================== 867*cdf0e10cSrcweir class NumericFieldElement 868*cdf0e10cSrcweir : public ControlElement 869*cdf0e10cSrcweir { 870*cdf0e10cSrcweir public: 871*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 872*cdf0e10cSrcweir SAL_CALL startChildElement( 873*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 874*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 875*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 876*cdf0e10cSrcweir virtual void SAL_CALL endElement() 877*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 878*cdf0e10cSrcweir 879*cdf0e10cSrcweir inline NumericFieldElement( 880*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 881*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 882*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 883*cdf0e10cSrcweir SAL_THROW( () ) 884*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 885*cdf0e10cSrcweir {} 886*cdf0e10cSrcweir }; 887*cdf0e10cSrcweir 888*cdf0e10cSrcweir //============================================================================== 889*cdf0e10cSrcweir class TimeFieldElement 890*cdf0e10cSrcweir : public ControlElement 891*cdf0e10cSrcweir { 892*cdf0e10cSrcweir public: 893*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 894*cdf0e10cSrcweir SAL_CALL startChildElement( 895*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 896*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 897*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 898*cdf0e10cSrcweir virtual void SAL_CALL endElement() 899*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 900*cdf0e10cSrcweir 901*cdf0e10cSrcweir inline TimeFieldElement( 902*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 903*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 904*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 905*cdf0e10cSrcweir SAL_THROW( () ) 906*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 907*cdf0e10cSrcweir {} 908*cdf0e10cSrcweir }; 909*cdf0e10cSrcweir 910*cdf0e10cSrcweir //============================================================================== 911*cdf0e10cSrcweir class PatternFieldElement 912*cdf0e10cSrcweir : public ControlElement 913*cdf0e10cSrcweir { 914*cdf0e10cSrcweir public: 915*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 916*cdf0e10cSrcweir SAL_CALL startChildElement( 917*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 918*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 919*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 920*cdf0e10cSrcweir virtual void SAL_CALL endElement() 921*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 922*cdf0e10cSrcweir 923*cdf0e10cSrcweir inline PatternFieldElement( 924*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 925*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 926*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 927*cdf0e10cSrcweir SAL_THROW( () ) 928*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 929*cdf0e10cSrcweir {} 930*cdf0e10cSrcweir }; 931*cdf0e10cSrcweir 932*cdf0e10cSrcweir //============================================================================== 933*cdf0e10cSrcweir class FormattedFieldElement 934*cdf0e10cSrcweir : public ControlElement 935*cdf0e10cSrcweir { 936*cdf0e10cSrcweir public: 937*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 938*cdf0e10cSrcweir SAL_CALL startChildElement( 939*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 940*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 941*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 942*cdf0e10cSrcweir virtual void SAL_CALL endElement() 943*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 944*cdf0e10cSrcweir 945*cdf0e10cSrcweir inline FormattedFieldElement( 946*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 947*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 948*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 949*cdf0e10cSrcweir SAL_THROW( () ) 950*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 951*cdf0e10cSrcweir {} 952*cdf0e10cSrcweir }; 953*cdf0e10cSrcweir 954*cdf0e10cSrcweir //============================================================================== 955*cdf0e10cSrcweir class FixedLineElement 956*cdf0e10cSrcweir : public ControlElement 957*cdf0e10cSrcweir { 958*cdf0e10cSrcweir public: 959*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 960*cdf0e10cSrcweir SAL_CALL startChildElement( 961*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 962*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 963*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 964*cdf0e10cSrcweir virtual void SAL_CALL endElement() 965*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 966*cdf0e10cSrcweir 967*cdf0e10cSrcweir inline FixedLineElement( 968*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 969*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 970*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 971*cdf0e10cSrcweir SAL_THROW( () ) 972*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 973*cdf0e10cSrcweir {} 974*cdf0e10cSrcweir }; 975*cdf0e10cSrcweir 976*cdf0e10cSrcweir //============================================================================== 977*cdf0e10cSrcweir class ScrollBarElement 978*cdf0e10cSrcweir : public ControlElement 979*cdf0e10cSrcweir { 980*cdf0e10cSrcweir public: 981*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 982*cdf0e10cSrcweir SAL_CALL startChildElement( 983*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 984*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 985*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 986*cdf0e10cSrcweir virtual void SAL_CALL endElement() 987*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 988*cdf0e10cSrcweir 989*cdf0e10cSrcweir inline ScrollBarElement( 990*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 991*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 992*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 993*cdf0e10cSrcweir SAL_THROW( () ) 994*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 995*cdf0e10cSrcweir {} 996*cdf0e10cSrcweir }; 997*cdf0e10cSrcweir 998*cdf0e10cSrcweir //============================================================================== 999*cdf0e10cSrcweir class ProgressBarElement 1000*cdf0e10cSrcweir : public ControlElement 1001*cdf0e10cSrcweir { 1002*cdf0e10cSrcweir public: 1003*cdf0e10cSrcweir virtual css::uno::Reference< css::xml::input::XElement > 1004*cdf0e10cSrcweir SAL_CALL startChildElement( 1005*cdf0e10cSrcweir sal_Int32 nUid, ::rtl::OUString const & rLocalName, 1006*cdf0e10cSrcweir css::uno::Reference<css::xml::input::XAttributes> const & xAttributes ) 1007*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 1008*cdf0e10cSrcweir virtual void SAL_CALL endElement() 1009*cdf0e10cSrcweir throw (css::xml::sax::SAXException, css::uno::RuntimeException); 1010*cdf0e10cSrcweir 1011*cdf0e10cSrcweir inline ProgressBarElement( 1012*cdf0e10cSrcweir ::rtl::OUString const & rLocalName, 1013*cdf0e10cSrcweir css::uno::Reference< css::xml::input::XAttributes > const & xAttributes, 1014*cdf0e10cSrcweir ElementBase * pParent, DialogImport * pImport ) 1015*cdf0e10cSrcweir SAL_THROW( () ) 1016*cdf0e10cSrcweir : ControlElement( rLocalName, xAttributes, pParent, pImport ) 1017*cdf0e10cSrcweir {} 1018*cdf0e10cSrcweir }; 1019*cdf0e10cSrcweir 1020*cdf0e10cSrcweir } 1021