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