LCOV - code coverage report
Current view: top level - xmlscript/source/xmldlg_imexp - imp_share.hxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 90 184 48.9 %
Date: 2014-04-11 Functions: 41 113 36.3 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10