Files
libreoffice/xmlscript/source/xmldlg_imexp/imp_share.hxx

856 lines
33 KiB
C++
Raw Normal View History

2001-02-16 13:14:51 +00:00
/*************************************************************************
*
* $RCSfile: imp_share.hxx,v $
*
2001-08-07 09:55:47 +00:00
* $Revision: 1.12 $
2001-02-16 13:14:51 +00:00
*
2001-08-07 09:55:47 +00:00
* last change: $Author: dbo $ $Date: 2001-08-07 10:55:46 $
2001-02-16 13:14:51 +00:00
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
*
* Copyright: 2000 by Sun Microsystems, Inc.
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
#include <vector>
#include <xmlscript/xmldlg_imexp.hxx>
#include <xmlscript/xmllib_imexp.hxx>
#include <xmlscript/xmlmod_imexp.hxx>
2001-02-16 13:14:51 +00:00
#include <cppuhelper/implbase1.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/xml/sax2/XExtendedAttributes.hpp>
#include <com/sun/star/xml/XImportContext.hpp>
#include <com/sun/star/xml/XImporter.hpp>
using namespace ::rtl;
using namespace ::std;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
namespace xmlscript
{
//
2001-03-14 15:39:59 +00:00
inline sal_Int32 toInt32( OUString const & rStr ) SAL_THROW( () )
2001-02-16 13:14:51 +00:00
{
sal_Int32 nVal;
if (rStr.getLength() > 2 && rStr[ 0 ] == '0' && rStr[ 1 ] == 'x')
{
2001-04-04 13:35:09 +00:00
nVal = rStr.copy( 2 ).toInt32( 16 );
2001-02-16 13:14:51 +00:00
}
else
{
nVal = rStr.toInt32();
}
return nVal;
}
inline bool getBoolAttr(
sal_Bool * pRet, OUString const & rAttrName,
2001-08-07 09:55:47 +00:00
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
sal_Int32 nUid = XMLNS_DIALOGS_UID )
2001-02-16 13:14:51 +00:00
{
2001-08-07 09:55:47 +00:00
OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) );
2001-02-16 13:14:51 +00:00
if (aValue.getLength())
{
if (aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("true") ))
{
*pRet = sal_True;
return true;
}
else if (aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("false") ))
{
*pRet = sal_False;
return true;
}
else
{
throw xml::sax::SAXException(
rAttrName + OUString( RTL_CONSTASCII_USTRINGPARAM(": no boolean value (true|false)!") ),
Reference< XInterface >(), Any() );
}
}
return false;
}
inline bool getStringAttr(
OUString * pRet, OUString const & rAttrName,
2001-08-07 09:55:47 +00:00
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
sal_Int32 nUid = XMLNS_DIALOGS_UID )
2001-02-16 13:14:51 +00:00
{
2001-08-07 09:55:47 +00:00
*pRet = xAttributes->getValueByUidName( nUid, rAttrName );
2001-02-16 13:14:51 +00:00
return (pRet->getLength() > 0);
}
inline bool getLongAttr(
sal_Int32 * pRet, OUString const & rAttrName,
2001-08-07 09:55:47 +00:00
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
sal_Int32 nUid = XMLNS_DIALOGS_UID )
2001-02-16 13:14:51 +00:00
{
2001-08-07 09:55:47 +00:00
OUString aValue( xAttributes->getValueByUidName( nUid, rAttrName ) );
2001-02-16 13:14:51 +00:00
if (aValue.getLength())
{
*pRet = toInt32( aValue );
return true;
}
return false;
}
2001-03-14 15:39:59 +00:00
2001-04-04 13:35:09 +00:00
class ImportContext;
2001-02-16 13:14:51 +00:00
//==================================================================================================
struct DialogImport
: public ::cppu::WeakImplHelper1< xml::XImporter >
{
2001-04-04 13:35:09 +00:00
friend class ImportContext;
2001-03-14 15:39:59 +00:00
2001-02-16 13:14:51 +00:00
vector< OUString > _styleNames;
vector< Reference< xml::XImportContext > > _styles;
Reference< container::XNameContainer > _xDialogModel;
Reference< lang::XMultiServiceFactory > _xDialogModelFactory;
2001-03-14 15:39:59 +00:00
public:
2001-02-16 13:14:51 +00:00
void addStyle(
OUString const & rStyleId,
Reference< xml::XImportContext > const & xStyle )
2001-03-14 15:39:59 +00:00
SAL_THROW( () );
2001-02-16 13:14:51 +00:00
Reference< xml::XImportContext > getStyle(
OUString const & rStyleId ) const
2001-03-14 15:39:59 +00:00
SAL_THROW( () );
inline DialogImport( Reference< container::XNameContainer > const & xDialogModel )
SAL_THROW( () )
: _xDialogModel( xDialogModel )
, _xDialogModelFactory( xDialogModel, UNO_QUERY )
{ OSL_ASSERT( _xDialogModel.is() && _xDialogModelFactory.is() ); }
2001-02-27 11:45:17 +00:00
virtual ~DialogImport()
2001-03-14 15:39:59 +00:00
SAL_THROW( () );
2001-02-16 13:14:51 +00:00
// XImporter
virtual void SAL_CALL startDocument()
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endDocument()
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL processingInstruction(
OUString const & rTarget, OUString const & rData )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL setDocumentLocator(
Reference< xml::sax::XLocator > const & xLocator )
throw (xml::sax::SAXException, RuntimeException);
virtual Reference< xml::XImportContext > SAL_CALL createRootContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
};
//==================================================================================================
class ElementBase
: public ::cppu::WeakImplHelper1< xml::XImportContext >
{
2001-03-14 15:39:59 +00:00
protected:
DialogImport * _pImport;
ElementBase * _pParent;
2001-08-07 09:55:47 +00:00
sal_Int32 _nUid;
2001-02-16 13:14:51 +00:00
OUString _aLocalName;
Reference< xml::sax2::XExtendedAttributes > _xAttributes;
2001-03-14 15:39:59 +00:00
public:
2001-02-16 13:14:51 +00:00
ElementBase(
2001-08-07 09:55:47 +00:00
sal_Int32 nUid, OUString const & rLocalName,
2001-02-16 13:14:51 +00:00
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () );
2001-02-16 13:14:51 +00:00
virtual ~ElementBase()
2001-03-14 15:39:59 +00:00
SAL_THROW( () );
2001-02-16 13:14:51 +00:00
// XImportContext
virtual Reference< xml::XImportContext > SAL_CALL getParent()
throw (RuntimeException);
virtual OUString SAL_CALL getLocalName()
throw (RuntimeException);
virtual sal_Int32 SAL_CALL getUid()
throw (RuntimeException);
virtual Reference< xml::sax2::XExtendedAttributes > SAL_CALL getAttributes()
throw (RuntimeException);
virtual void SAL_CALL ignorableWhitespace(
OUString const & rWhitespaces )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL characters( OUString const & rChars )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
};
//==================================================================================================
class StylesElement
: public ElementBase
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline StylesElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-08-07 09:55:47 +00:00
: ElementBase( XMLNS_DIALOGS_UID, rLocalName, xAttributes, pParent, pImport )
2001-02-16 13:14:51 +00:00
{}
};
//==================================================================================================
class StyleElement
: public ElementBase
{
sal_Int32 _backgroundColor;
sal_Int32 _textColor;
sal_Int16 _border;
awt::FontDescriptor _descr;
sal_Int32 _fillColor;
2001-02-16 13:14:51 +00:00
short _inited, _hasValue;
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
bool importTextColorStyle(
Reference< beans::XPropertySet > const & xProps );
bool importFillColorStyle(
Reference< beans::XPropertySet > const & xProps );
2001-02-16 13:14:51 +00:00
bool importBackgroundColorStyle(
Reference< beans::XPropertySet > const & xProps );
bool importFontStyle(
Reference< beans::XPropertySet > const & xProps );
bool importBorderStyle(
Reference< beans::XPropertySet > const & xProps );
2001-02-21 19:49:30 +00:00
inline StyleElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-08-07 09:55:47 +00:00
: ElementBase( XMLNS_DIALOGS_UID, rLocalName, xAttributes, pParent, pImport )
2001-02-16 13:14:51 +00:00
, _inited( 0 )
, _hasValue( 0 )
{}
};
//==================================================================================================
class MenuPopupElement
: public ElementBase
{
vector< OUString > _itemValues;
vector< sal_Int16 > _itemSelected;
public:
Sequence< OUString > getItemValues();
Sequence< sal_Int16 > getSelectedItems();
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline MenuPopupElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-08-07 09:55:47 +00:00
: ElementBase( XMLNS_DIALOGS_UID, rLocalName, xAttributes, pParent, pImport )
2001-02-16 13:14:51 +00:00
{}
};
//==================================================================================================
class ControlElement
: public ElementBase
{
2001-02-20 15:51:32 +00:00
friend class EventElement;
2001-02-16 13:14:51 +00:00
protected:
sal_Int32 _nBasePosX, _nBasePosY;
2001-08-07 09:55:47 +00:00
vector< Reference< xml::XImportContext > > _events;
2001-02-20 15:51:32 +00:00
2001-02-20 13:05:25 +00:00
OUString getControlId(
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
Reference< xml::XImportContext > getStyle(
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
2001-02-16 13:14:51 +00:00
public:
2001-08-07 09:55:47 +00:00
vector< Reference< xml::XImportContext > > const * getEvents() SAL_THROW( () )
2001-02-20 15:51:32 +00:00
{ return &_events; }
2001-02-16 13:14:51 +00:00
2001-02-28 17:22:08 +00:00
ControlElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () );
2001-02-16 13:14:51 +00:00
};
//==================================================================================================
2001-04-04 13:35:09 +00:00
class ImportContext
2001-02-16 13:14:51 +00:00
{
2001-04-04 13:35:09 +00:00
protected:
2001-02-16 13:14:51 +00:00
Reference< beans::XPropertySet > _xControlModel;
public:
2001-04-04 13:35:09 +00:00
inline ImportContext( Reference< beans::XPropertySet > const & xControlModel_ )
: _xControlModel( xControlModel_ )
2001-02-16 13:14:51 +00:00
{ OSL_ASSERT( _xControlModel.is() ); }
inline Reference< beans::XPropertySet > getControlModel()
{ return _xControlModel; }
2001-02-20 15:51:32 +00:00
void importEvents(
2001-08-07 09:55:47 +00:00
vector< Reference< xml::XImportContext > > const & rEvents );
2001-02-16 13:14:51 +00:00
bool importStringProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
2001-02-21 19:49:30 +00:00
bool importDoubleProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
2001-02-16 13:14:51 +00:00
bool importBooleanProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
bool importShortProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
bool importLongProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
2001-02-20 13:05:25 +00:00
bool importLongProperty(
sal_Int32 nOffset,
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
bool importAlignProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
2001-02-21 19:49:30 +00:00
bool importDateFormatProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
bool importTimeFormatProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
bool importOrientationProperty(
OUString const & rPropName, OUString const & rAttrName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
2001-02-16 13:14:51 +00:00
};
2001-04-04 13:35:09 +00:00
//==================================================================================================
class ControlImportContext : public ImportContext
{
DialogImport * _pImport;
OUString _aId;
public:
inline ControlImportContext( DialogImport * pImport,
OUString const & rId, OUString const & rControlName )
: ImportContext( Reference< beans::XPropertySet >(
pImport->_xDialogModelFactory->createInstance( rControlName ), UNO_QUERY ) )
, _pImport( pImport )
, _aId( rId )
{}
inline ~ControlImportContext()
{ _pImport->_xDialogModel->insertByName( _aId, makeAny( Reference< awt::XControlModel >::query( _xControlModel ) ) ); }
void importDefaults(
sal_Int32 nBaseX, sal_Int32 nBaseY,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes );
};
2001-02-16 13:14:51 +00:00
//==================================================================================================
class WindowElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline WindowElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-16 13:14:51 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
2001-02-20 15:51:32 +00:00
class EventElement
: public ElementBase
{
public:
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline EventElement(
2001-08-07 09:55:47 +00:00
sal_Int32 nUid, OUString const & rLocalName,
2001-02-20 15:51:32 +00:00
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-08-07 09:55:47 +00:00
: ElementBase( nUid, rLocalName, xAttributes, pParent, pImport )
2001-02-20 15:51:32 +00:00
{}
};
//==================================================================================================
2001-02-16 13:14:51 +00:00
class BulletinBoardElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline BulletinBoardElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () );
2001-02-16 13:14:51 +00:00
};
//==================================================================================================
class ButtonElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline ButtonElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-16 13:14:51 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class CheckBoxElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline CheckBoxElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-16 13:14:51 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class ComboBoxElement
: public ControlElement
{
Reference< xml::XImportContext > _popup;
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline ComboBoxElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-16 13:14:51 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class MenuListElement
: public ControlElement
{
Reference< xml::XImportContext > _popup;
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline MenuListElement(
2001-02-16 13:14:51 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-16 13:14:51 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
2001-02-20 13:05:25 +00:00
//==================================================================================================
2001-02-20 15:51:32 +00:00
class RadioElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline RadioElement(
2001-02-20 15:51:32 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-20 15:51:32 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
2001-02-20 13:05:25 +00:00
class RadioGroupElement
: public ControlElement
{
2001-02-20 15:51:32 +00:00
vector< Reference< xml::XImportContext > > _radios;
2001-02-20 13:05:25 +00:00
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
2001-02-20 15:51:32 +00:00
void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-20 13:05:25 +00:00
2001-02-21 19:49:30 +00:00
inline RadioGroupElement(
2001-02-20 13:05:25 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-20 13:05:25 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class TitledBoxElement
: public BulletinBoardElement
{
OUString _label;
2001-02-20 15:51:32 +00:00
vector< Reference< xml::XImportContext > > _radios;
2001-02-20 13:05:25 +00:00
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline TitledBoxElement(
2001-02-20 13:05:25 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-20 13:05:25 +00:00
: BulletinBoardElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
2001-02-20 15:51:32 +00:00
class TextElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline TextElement(
2001-02-20 15:51:32 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-20 15:51:32 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
2001-02-20 13:05:25 +00:00
class TextFieldElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
2001-02-21 19:49:30 +00:00
inline TextFieldElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-21 19:49:30 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class ImageControlElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline ImageControlElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-21 19:49:30 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class FileControlElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline FileControlElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-21 19:49:30 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class CurrencyFieldElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline CurrencyFieldElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-21 19:49:30 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class DateFieldElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline DateFieldElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-21 19:49:30 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class NumericFieldElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline NumericFieldElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-21 19:49:30 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class TimeFieldElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline TimeFieldElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-21 19:49:30 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class PatternFieldElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline PatternFieldElement(
2001-02-20 13:05:25 +00:00
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
2001-03-14 15:39:59 +00:00
SAL_THROW( () )
2001-02-20 13:05:25 +00:00
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class FixedLineElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline FixedLineElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW( () )
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class ScrollBarElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline ScrollBarElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW( () )
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
//==================================================================================================
class ProgressBarElement
: public ControlElement
{
public:
virtual Reference< xml::XImportContext > SAL_CALL createChildContext(
sal_Int32 nUid, OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes )
throw (xml::sax::SAXException, RuntimeException);
virtual void SAL_CALL endElement()
throw (xml::sax::SAXException, RuntimeException);
inline ProgressBarElement(
OUString const & rLocalName,
Reference< xml::sax2::XExtendedAttributes > const & xAttributes,
ElementBase * pParent, DialogImport * pImport )
SAL_THROW( () )
: ControlElement( rLocalName, xAttributes, pParent, pImport )
{}
};
2001-02-16 13:14:51 +00:00
};