Files
libreoffice/include/toolkit/controls/unocontrols.hxx

1609 lines
85 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This file incorporates work covered by the following license notice:
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright
* ownership. The ASF licenses this file to you under the Apache
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
*/
2000-09-18 16:07:07 +00:00
#ifndef INCLUDED_TOOLKIT_CONTROLS_UNOCONTROLS_HXX
#define INCLUDED_TOOLKIT_CONTROLS_UNOCONTROLS_HXX
2000-09-18 16:07:07 +00:00
#include <toolkit/dllapi.h>
2000-09-18 16:07:07 +00:00
#include <com/sun/star/awt/XTextComponent.hpp>
#include <com/sun/star/awt/XTextListener.hpp>
#include <com/sun/star/awt/XLayoutConstrains.hpp>
#include <com/sun/star/awt/XTextLayoutConstrains.hpp>
#include <com/sun/star/awt/XButton.hpp>
#include <com/sun/star/awt/XToggleButton.hpp>
2000-09-18 16:07:07 +00:00
#include <com/sun/star/awt/XRadioButton.hpp>
#include <com/sun/star/awt/XItemListener.hpp>
#include <com/sun/star/awt/XCheckBox.hpp>
#include <com/sun/star/awt/XFixedHyperlink.hpp>
2000-09-18 16:07:07 +00:00
#include <com/sun/star/awt/XFixedText.hpp>
#include <com/sun/star/awt/XListBox.hpp>
#include <com/sun/star/awt/XComboBox.hpp>
#include <com/sun/star/awt/XDateField.hpp>
2002-09-05 06:37:05 +00:00
#include <com/sun/star/awt/XSpinField.hpp>
2000-09-18 16:07:07 +00:00
#include <com/sun/star/awt/XTimeField.hpp>
#include <com/sun/star/awt/XNumericField.hpp>
#include <com/sun/star/awt/XCurrencyField.hpp>
#include <com/sun/star/awt/XPatternField.hpp>
2001-04-26 08:09:16 +00:00
#include <com/sun/star/awt/XProgressBar.hpp>
#include <com/sun/star/awt/XItemList.hpp>
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
#include <com/sun/star/graphic/XGraphicObject.hpp>
2000-09-18 16:07:07 +00:00
#include <toolkit/controls/unocontrolmodel.hxx>
#include <toolkit/controls/unocontrolbase.hxx>
#include <toolkit/helper/macros.hxx>
#include <toolkit/helper/servicenames.hxx>
#include <vcl/bitmapex.hxx>
#include <cppuhelper/implbase5.hxx>
#include <cppuhelper/implbase4.hxx>
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/implbase1.hxx>
#include <comphelper/uno3.hxx>
#include <list>
#include <memory>
#include <vector>
#include <boost/optional.hpp>
2001-01-24 14:00:58 +00:00
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
#define UNO_NAME_GRAPHOBJ_URLPREFIX "vnd.sun.star.GraphicObject:"
class ImageHelper
{
public:
// The routine will always attempt to return a valid XGraphic for the
// passed _rURL, additionally xOutGraphicObject will contain the
// associated XGraphicObject ( if url is valid for that ) and is set
// appropriately ( e.g. NULL if non GraphicObject scheme ) or a valid
// object if the rURL points to a valid object
static css::uno::Reference< css::graphic::XGraphic > getGraphicAndGraphicObjectFromURL_nothrow( css::uno::Reference< css::graphic::XGraphicObject >& xOutGraphicObject, const OUString& _rURL );
static css::uno::Reference< css::graphic::XGraphic > getGraphicFromURL_nothrow( const OUString& _rURL );
};
2000-09-18 16:07:07 +00:00
// class UnoControlEditModel
2000-09-18 16:07:07 +00:00
class UnoControlEditModel : public UnoControlModel
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlEditModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlEditModel( const UnoControlEditModel& rModel ) : UnoControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlEditModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
2001-01-24 14:00:58 +00:00
2000-09-18 16:07:07 +00:00
// XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoEditControl
typedef ::cppu::ImplHelper4 < css::awt::XTextComponent
, css::awt::XTextListener
, css::awt::XLayoutConstrains
, css::awt::XTextLayoutConstrains
> UnoEditControl_Base;
class TOOLKIT_DLLPUBLIC UnoEditControl :public UnoControlBase
,public UnoEditControl_Base
2000-09-18 16:07:07 +00:00
{
private:
TextListenerMultiplexer maTextListeners;
// Not all fields derived from UnoEditCOntrol have the property "Text"
// They only support XTextComponent, so keep the text
// here, maybe there is no Peer when calling setText()...
OUString maText;
sal_uInt16 mnMaxTextLen;
bool mbSetTextInPeer;
bool mbSetMaxTextLenInPeer;
bool mbHasTextProperty;
2000-09-18 16:07:07 +00:00
public:
UnoEditControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
TextListenerMultiplexer& GetTextListeners() { return maTextListeners; }
void ImplSetPeerProperty( const OUString& rPropName, const css::uno::Any& rVal ) override;
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException, std::exception) override { UnoControlBase::disposing( Source ); }
void SAL_CALL dispose( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// disambiguate XInterface
DECLARE_XINTERFACE()
// XAggregation
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// XTypeProvider
DECLARE_XTYPEPROVIDER()
// XTextListener
void SAL_CALL textChanged( const css::awt::TextEvent& rEvent ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// XTextComponent
void SAL_CALL addTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeTextListener( const css::uno::Reference< css::awt::XTextListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setText( const OUString& aText ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL insertText( const css::awt::Selection& Sel, const OUString& Text ) throw(css::uno::RuntimeException, std::exception) override;
OUString SAL_CALL getText( ) throw(css::uno::RuntimeException, std::exception) override;
OUString SAL_CALL getSelectedText( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setSelection( const css::awt::Selection& aSelection ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Selection SAL_CALL getSelection( ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isEditable( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setEditable( sal_Bool bEditable ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMaxTextLen( sal_Int16 nLen ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getMaxTextLen( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// XLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL getPreferredSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// XTextLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// XServiceInfo
OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& Model) throw ( css::uno::RuntimeException, std::exception ) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlFileControlModel
2000-09-18 16:07:07 +00:00
class UnoControlFileControlModel : public UnoControlModel
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlFileControlModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlFileControlModel( const UnoControlFileControlModel& rModel ) : UnoControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlFileControlModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoFileControl
2000-09-18 16:07:07 +00:00
class UnoFileControl : public UnoEditControl
{
public:
UnoFileControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
// class GraphicControlModel
class GraphicControlModel : public UnoControlModel
2000-09-18 16:07:07 +00:00
{
2001-04-04 15:06:33 +00:00
private:
bool mbAdjustingImagePosition;
bool mbAdjustingGraphic;
2001-04-04 15:06:33 +00:00
protected:
GraphicControlModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext )
:UnoControlModel( rxContext )
,mbAdjustingImagePosition( false )
,mbAdjustingGraphic( false )
{
}
GraphicControlModel( const GraphicControlModel& _rSource ) : UnoControlModel( _rSource ), mbAdjustingImagePosition( false ), mbAdjustingGraphic( false ) { }
2001-04-04 15:06:33 +00:00
// ::cppu::OPropertySetHelper
void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) throw (css::uno::Exception, std::exception) override;
// UnoControlModel
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
private:
GraphicControlModel& operator=( const GraphicControlModel& ) = delete;
};
// class UnoControlButtonModel
class UnoControlButtonModel : public GraphicControlModel
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
public:
UnoControlButtonModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlButtonModel( const UnoControlButtonModel& rModel ) : GraphicControlModel( rModel ) {}
UnoControlModel* Clone() const override { return new UnoControlButtonModel( *this ); }
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-05-11 06:34:54 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoButtonControl
typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
, css::awt::XButton
, css::awt::XToggleButton
, css::awt::XLayoutConstrains
, css::awt::XItemListener
> UnoButtonControl_Base;
class UnoButtonControl : public UnoButtonControl_Base
2000-09-18 16:07:07 +00:00
{
private:
ActionListenerMultiplexer maActionListeners;
ItemListenerMultiplexer maItemListeners;
OUString maActionCommand;
2000-09-18 16:07:07 +00:00
public:
UnoButtonControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL dispose( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XButton
void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setLabel( const OUString& Label ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setActionCommand( const OUString& Command ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XToggleButton
// css::awt::XItemEventBroadcaster
void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XEventListener
virtual void SAL_CALL disposing( const css::lang::EventObject& Source ) throw (css::uno::RuntimeException, std::exception) override;
// XItemListener
virtual void SAL_CALL itemStateChanged( const css::awt::ItemEvent& rEvent ) throw (css::uno::RuntimeException, std::exception) override;
// css::awt::XLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL getPreferredSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlImageControlModel
class UnoControlImageControlModel : public GraphicControlModel
2000-09-18 16:07:07 +00:00
{
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
private:
bool mbAdjustingImageScaleMode;
2001-04-11 14:10:57 +00:00
2000-09-18 16:07:07 +00:00
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlImageControlModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlImageControlModel( const UnoControlImageControlModel& rModel ) : GraphicControlModel( rModel ), mbAdjustingImageScaleMode( false ) { }
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlImageControlModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-05-11 06:34:54 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
CWS-TOOLING: integrate CWS dba31e 2008-11-19 12:36:23 +0100 msc r263980 : i96104 2008-11-19 12:31:19 +0100 msc r263979 : i96104 2008-11-19 12:21:55 +0100 msc r263977 : i96104 2008-11-19 12:18:53 +0100 msc r263976 : i96104 2008-11-18 09:09:45 +0100 oj r263746 : disable color entry when area is set 2008-11-18 08:37:52 +0100 oj r263741 : #remove sub report entry 2008-11-17 11:20:25 +0100 fs r263708 : #i10000# 2008-11-17 11:06:52 +0100 fs r263706 : minimal version now is 3.1 2008-11-12 22:25:59 +0100 fs r263621 : #i96150# 2008-11-12 22:20:02 +0100 fs r263620 : rebased to m34 2008-11-12 21:39:41 +0100 fs r263618 : MANUAL REBASE: rebase CWS dba31d to DEV300_m34 2008-11-12 13:54:58 +0100 fs r263597 : #i96134# MediaDescriptor.URL is to be preferred over MediaDescriptor.FileName. Nonetheless, ensure both are handled 2008-11-12 13:53:40 +0100 fs r263596 : #i96134# re-enabled the code for #i41897#, a better fix is to come 2008-11-12 12:48:21 +0100 fs r263585 : #i96134# disable saving URLs of file-base databases relatively 2008-11-11 16:11:11 +0100 msc r263566 : #i96104# 2008-11-05 09:09:47 +0100 oj r263342 : #i88727# color noe added 2008-11-05 08:41:43 +0100 oj r263341 : #i77916# zoom added 2008-11-04 21:24:15 +0100 fs r263339 : disposing: call disposeAndClear without own mutex locked - some of our listeners insist on locking the SolarMutex, which sometimes led to deadlocks on the complex test cases 2008-11-04 21:23:15 +0100 fs r263338 : remove SolarMutex locking - this happned in CWS dba31c (in the CVS version), which this CWS was created from, but seems to got lost during resync 2008-11-04 20:49:50 +0100 fs r263335 : docu formatting 2008-11-04 20:06:39 +0100 fs r263334 : #i95826# use m_aMutex, not a DocumentGuard (wrongly resolved merge conflicts) 2008-11-04 17:36:29 +0100 fs r263332 : #i92688# properly revoke as XEventListener from m_xActiveController when disposing 2008-11-04 14:49:34 +0100 fs r263324 : #i92322# enable Input Required if EmptyIsNULL does not exist at the control 2008-10-31 11:10:04 +0100 oj r262857 : merge from cvs to svn 2008-10-31 09:46:45 +0100 oj r262853 : merge from cvs to svn 2008-10-31 08:46:37 +0100 oj r262849 : merge from cvs to svn 2008-10-31 08:44:24 +0100 oj r262848 : merge from cvs to svn 2008-10-31 08:43:33 +0100 oj r262847 : merge from cvs to svn 2008-10-31 08:42:28 +0100 oj r262846 : merge from cvs to svn 2008-10-31 08:41:58 +0100 oj r262845 : merge from cvs to svn 2008-10-31 08:41:32 +0100 oj r262844 : merge from cvs to svn 2008-10-28 12:19:50 +0100 oj r262733 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:42 +0100 oj r262732 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:36 +0100 oj r262731 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:31 +0100 oj r262730 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:22 +0100 oj r262729 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:18 +0100 oj r262728 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:10 +0100 oj r262727 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:06 +0100 oj r262726 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:05 +0100 oj r262725 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:19:01 +0100 oj r262724 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:50 +0100 oj r262723 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:41 +0100 oj r262722 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:40 +0100 oj r262721 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:27 +0100 oj r262720 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:10 +0100 oj r262719 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:18:01 +0100 oj r262718 : #iXXXXX#: migrate CWS dba31e to SVN 2008-10-28 12:17:39 +0100 oj r262717 : #iXXXXX#: migrate CWS dba31e to SVN
2008-12-01 12:31:27 +00:00
// ::cppu::OPropertySetHelper
void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) throw (css::uno::Exception, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoImageControlControl
typedef ::cppu::AggImplInheritanceHelper1 < UnoControlBase
, css::awt::XLayoutConstrains
> UnoImageControlControl_Base;
class UnoImageControlControl : public UnoImageControlControl_Base
2000-09-18 16:07:07 +00:00
{
private:
ActionListenerMultiplexer maActionListeners;
public:
UnoImageControlControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
void SAL_CALL dispose( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XControl
sal_Bool SAL_CALL isTransparent( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL getPreferredSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlRadioButtonModel
class UnoControlRadioButtonModel : public GraphicControlModel
2000-09-18 16:07:07 +00:00
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlRadioButtonModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlRadioButtonModel( const UnoControlRadioButtonModel& rModel ) : GraphicControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlRadioButtonModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoRadioButtonControl
typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
, css::awt::XButton
, css::awt::XRadioButton
, css::awt::XItemListener
, css::awt::XLayoutConstrains
> UnoRadioButtonControl_Base;
class UnoRadioButtonControl : public UnoRadioButtonControl_Base
2000-09-18 16:07:07 +00:00
{
private:
2001-04-04 08:30:18 +00:00
ItemListenerMultiplexer maItemListeners;
ActionListenerMultiplexer maActionListeners;
OUString maActionCommand;
2000-09-18 16:07:07 +00:00
public:
UnoRadioButtonControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL dispose( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException, std::exception) override { UnoControlBase::disposing( Source ); }
2000-09-18 16:07:07 +00:00
// css::awt::XControl
sal_Bool SAL_CALL isTransparent( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XButton
void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setActionCommand( const OUString& Command ) throw(css::uno::RuntimeException, std::exception) override;
2001-04-04 08:30:18 +00:00
// css::awt::XRadioButton
void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL getState( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setState( sal_Bool b ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setLabel( const OUString& Label ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XItemListener
void SAL_CALL itemStateChanged( const css::awt::ItemEvent& rEvent ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL getPreferredSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlCheckBoxModel
class UnoControlCheckBoxModel : public GraphicControlModel
2000-09-18 16:07:07 +00:00
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlCheckBoxModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlCheckBoxModel( const UnoControlCheckBoxModel& rModel ) : GraphicControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlCheckBoxModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoCheckBoxControl
typedef ::cppu::AggImplInheritanceHelper4 < UnoControlBase
, css::awt::XButton
, css::awt::XCheckBox
, css::awt::XItemListener
, css::awt::XLayoutConstrains
> UnoCheckBoxControl_Base;
class UnoCheckBoxControl : public UnoCheckBoxControl_Base
2000-09-18 16:07:07 +00:00
{
private:
ItemListenerMultiplexer maItemListeners;
ActionListenerMultiplexer maActionListeners;
OUString maActionCommand;
2000-09-18 16:07:07 +00:00
public:
UnoCheckBoxControl();
virtual ~UnoCheckBoxControl() override {}
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL dispose( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException, std::exception) override { UnoControlBase::disposing( Source ); }
2000-09-18 16:07:07 +00:00
// css::awt::XControl
sal_Bool SAL_CALL isTransparent( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XButton
void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setActionCommand( const OUString& Command ) throw(css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw (css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getState( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setState( sal_Int16 n ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setLabel( const OUString& Label ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL enableTriState( sal_Bool b ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XItemListener
void SAL_CALL itemStateChanged( const css::awt::ItemEvent& rEvent ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL getPreferredSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
// class UnoControlFixedTextModel
class UnoControlFixedHyperlinkModel : public UnoControlModel
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
public:
UnoControlFixedHyperlinkModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlFixedHyperlinkModel( const UnoControlFixedHyperlinkModel& rModel ) : UnoControlModel( rModel ) {}
UnoControlModel* Clone() const override { return new UnoControlFixedHyperlinkModel( *this ); }
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XServiceInfo
DECLIMPL_SERVICEINFO_DERIVED( UnoControlFixedHyperlinkModel, UnoControlModel, "com.sun.star.awt.UnoControlFixedHyperlinkModel" )
};
// class UnoFixedHyperlinkControl
class UnoFixedHyperlinkControl : public UnoControlBase,
public css::awt::XFixedHyperlink,
public css::awt::XLayoutConstrains
{
private:
ActionListenerMultiplexer maActionListeners;
public:
UnoFixedHyperlinkControl();
OUString GetComponentServiceName() override;
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoControlBase::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL dispose( ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XControl
sal_Bool SAL_CALL isTransparent( ) throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XFixedHyperlink
void SAL_CALL setText( const OUString& Text ) throw(css::uno::RuntimeException, std::exception) override;
OUString SAL_CALL getText( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setURL( const OUString& URL ) throw(css::uno::RuntimeException, std::exception) override;
OUString SAL_CALL getURL( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setAlignment( sal_Int16 nAlign ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getAlignment( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL getPreferredSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XServiceInfo
DECLIMPL_SERVICEINFO_DERIVED( UnoFixedHyperlinkControl, UnoControlBase, "com.sun.star.awt.UnoControlFixedHyperlink" )
};
2000-09-18 16:07:07 +00:00
// class UnoControlFixedTextModel
2000-09-18 16:07:07 +00:00
class UnoControlFixedTextModel : public UnoControlModel
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlFixedTextModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlFixedTextModel( const UnoControlFixedTextModel& rModel ) : UnoControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlFixedTextModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoFixedTextControl
2000-09-18 16:07:07 +00:00
class UnoFixedTextControl : public UnoControlBase,
public css::awt::XFixedText,
public css::awt::XLayoutConstrains
2000-09-18 16:07:07 +00:00
{
public:
UnoFixedTextControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoControlBase::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
2000-09-18 16:07:07 +00:00
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XControl
sal_Bool SAL_CALL isTransparent( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XFixedText
void SAL_CALL setText( const OUString& Text ) throw(css::uno::RuntimeException, std::exception) override;
OUString SAL_CALL getText( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setAlignment( sal_Int16 nAlign ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getAlignment( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL getPreferredSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlGroupBoxModel
2000-09-18 16:07:07 +00:00
class UnoControlGroupBoxModel : public UnoControlModel
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlGroupBoxModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlGroupBoxModel( const UnoControlGroupBoxModel& rModel ) : UnoControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlGroupBoxModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoGroupBoxControl
2000-09-18 16:07:07 +00:00
class UnoGroupBoxControl : public UnoControlBase
{
public:
UnoGroupBoxControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
sal_Bool SAL_CALL isTransparent( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlListBoxModel
struct UnoControlListBoxModel_Data;
typedef ::cppu::AggImplInheritanceHelper1 < UnoControlModel
, css::awt::XItemList
> UnoControlListBoxModel_Base;
class TOOLKIT_DLLPUBLIC UnoControlListBoxModel : public UnoControlListBoxModel_Base
2000-09-18 16:07:07 +00:00
{
protected:
enum ConstructorMode
{
ConstructDefault,
ConstructWithoutProperties
};
2000-09-18 16:07:07 +00:00
public:
UnoControlListBoxModel(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
ConstructorMode const i_mode = ConstructDefault
);
UnoControlListBoxModel( const UnoControlListBoxModel& i_rSource );
virtual ~UnoControlListBoxModel() override;
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlListBoxModel( *this ); }
2001-01-24 14:00:58 +00:00
2002-05-16 04:47:45 +00:00
virtual void ImplNormalizePropertySequence(
const sal_Int32 _nCount, /// the number of entries in the arrays
sal_Int32* _pHandles, /// the handles of the properties to set
css::uno::Any* _pValues, /// the values of the properties to set
2002-05-16 04:47:45 +00:00
sal_Int32* _pValidHandles /// pointer to the valid handles, allowed to be adjusted
) const override;
2000-09-18 16:07:07 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XItemList
virtual ::sal_Int32 SAL_CALL getItemCount() throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL insertItem( ::sal_Int32 Position, const OUString& ItemText, const OUString& ItemImageURL ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL insertItemText( ::sal_Int32 Position, const OUString& ItemText ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL insertItemImage( ::sal_Int32 Position, const OUString& ItemImageURL ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeItem( ::sal_Int32 Position ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeAllItems( ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL setItemText( ::sal_Int32 Position, const OUString& ItemText ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL setItemImage( ::sal_Int32 Position, const OUString& ItemImageURL ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL setItemTextAndImage( ::sal_Int32 Position, const OUString& ItemText, const OUString& ItemImageURL ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL setItemData( ::sal_Int32 Position, const css::uno::Any& DataValue ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual OUString SAL_CALL getItemText( ::sal_Int32 Position ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual OUString SAL_CALL getItemImage( ::sal_Int32 Position ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual css::beans::Pair< OUString, OUString > SAL_CALL getItemTextAndImage( ::sal_Int32 Position ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual css::uno::Any SAL_CALL getItemData( ::sal_Int32 Position ) throw (css::lang::IndexOutOfBoundsException, css::uno::RuntimeException, std::exception) override;
virtual css::uno::Sequence< css::beans::Pair< OUString, OUString > > SAL_CALL getAllItems( ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL addItemListListener( const css::uno::Reference< css::awt::XItemListListener >& Listener ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL removeItemListListener( const css::uno::Reference< css::awt::XItemListListener >& Listener ) throw (css::uno::RuntimeException, std::exception) override;
// OPropertySetHelper
void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) throw (css::uno::Exception, std::exception) override;
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
private:
void impl_notifyItemListEvent_nolck(
const sal_Int32 i_nItemPosition,
const ::boost::optional< OUString >& i_rItemText,
const ::boost::optional< OUString >& i_rItemImageURL,
void ( SAL_CALL css::awt::XItemListListener::*NotificationMethod )( const css::awt::ItemListEvent& )
);
void impl_handleInsert(
const sal_Int32 i_nItemPosition,
const ::boost::optional< OUString >& i_rItemText,
const ::boost::optional< OUString >& i_rItemImageURL,
::osl::ClearableMutexGuard& i_rClearBeforeNotify
);
void impl_handleRemove(
const sal_Int32 i_nItemPosition,
::osl::ClearableMutexGuard& i_rClearBeforeNotify
);
void impl_handleModify(
const sal_Int32 i_nItemPosition,
const ::boost::optional< OUString >& i_rItemText,
const ::boost::optional< OUString >& i_rItemImageURL,
::osl::ClearableMutexGuard& i_rClearBeforeNotify
);
void impl_getStringItemList( ::std::vector< OUString >& o_rStringItems ) const;
void impl_setStringItemList_nolck( const ::std::vector< OUString >& i_rStringItems );
protected:
std::unique_ptr<UnoControlListBoxModel_Data> m_xData;
::comphelper::OInterfaceContainerHelper2 m_aItemListListeners;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoListBoxControl
typedef ::cppu::AggImplInheritanceHelper5 < UnoControlBase
, css::awt::XListBox
, css::awt::XItemListener
, css::awt::XLayoutConstrains
, css::awt::XTextLayoutConstrains
, css::awt::XItemListListener
> UnoListBoxControl_Base;
class TOOLKIT_DLLPUBLIC UnoListBoxControl : public UnoListBoxControl_Base
2000-09-18 16:07:07 +00:00
{
public:
UnoListBoxControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL dispose( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException, std::exception) override { UnoControlBase::disposing( Source ); }
// css::awt::XListBox
void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL addItem( const OUString& aItem, sal_Int16 nPos ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL addItems( const css::uno::Sequence< OUString >& aItems, sal_Int16 nPos ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getItemCount( ) throw(css::uno::RuntimeException, std::exception) override;
OUString SAL_CALL getItem( sal_Int16 nPos ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< OUString > SAL_CALL getItems( ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getSelectedItemPos( ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int16 > SAL_CALL getSelectedItemsPos( ) throw(css::uno::RuntimeException, std::exception) override;
OUString SAL_CALL getSelectedItem( ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< OUString > SAL_CALL getSelectedItems( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL selectItemPos( sal_Int16 nPos, sal_Bool bSelect ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL selectItemsPos( const css::uno::Sequence< sal_Int16 >& aPositions, sal_Bool bSelect ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL selectItem( const OUString& aItem, sal_Bool bSelect ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isMutipleMode( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMultipleMode( sal_Bool bMulti ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getDropDownLineCount( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL makeVisible( sal_Int16 nEntry ) throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XItemListener
void SAL_CALL itemStateChanged( const css::awt::ItemEvent& rEvent ) throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL getPreferredSize( ) throw(css::uno::RuntimeException, std::exception) override;
css::awt::Size SAL_CALL calcAdjustedSize( const css::awt::Size& aNewSize ) throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XTextLayoutConstrains
css::awt::Size SAL_CALL getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// XUnoControl
sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& Model) throw ( css::uno::RuntimeException, std::exception ) override;
// XItemListListener
virtual void SAL_CALL listItemInserted( const css::awt::ItemListEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL listItemRemoved( const css::awt::ItemListEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL listItemModified( const css::awt::ItemListEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL allItemsRemoved( const css::lang::EventObject& Event ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL itemListChanged( const css::lang::EventObject& Event ) throw (css::uno::RuntimeException, std::exception) override;
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
protected:
void ImplUpdateSelectedItemsProperty();
virtual void ImplSetPeerProperty( const OUString& rPropName, const css::uno::Any& rVal ) override;
virtual void updateFromModel() override;
private:
ActionListenerMultiplexer maActionListeners;
ItemListenerMultiplexer maItemListeners;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlComboBoxModel
class UnoControlComboBoxModel : public UnoControlListBoxModel
2000-09-18 16:07:07 +00:00
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlComboBoxModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlComboBoxModel( const UnoControlComboBoxModel& rModel ) : UnoControlListBoxModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlComboBoxModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
// OPropertySetHelper
void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) throw (css::uno::Exception, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoComboBoxControl
class UnoComboBoxControl : public UnoEditControl
, public css::awt::XComboBox
, public css::awt::XItemListener
, public css::awt::XItemListListener
2000-09-18 16:07:07 +00:00
{
private:
ActionListenerMultiplexer maActionListeners;
ItemListenerMultiplexer maItemListeners;
public:
UnoComboBoxControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException, std::exception) override { UnoEditControl::disposing( Source ); }
void SAL_CALL dispose( ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoEditControl::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
2000-09-18 16:07:07 +00:00
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XComboBox
void SAL_CALL addItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeItemListener( const css::uno::Reference< css::awt::XItemListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL addActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeActionListener( const css::uno::Reference< css::awt::XActionListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL addItem( const OUString& aItem, sal_Int16 nPos ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL addItems( const css::uno::Sequence< OUString >& aItems, sal_Int16 nPos ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeItems( sal_Int16 nPos, sal_Int16 nCount ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getItemCount( ) throw(css::uno::RuntimeException, std::exception) override;
OUString SAL_CALL getItem( sal_Int16 nPos ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< OUString > SAL_CALL getItems( ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getDropDownLineCount( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setDropDownLineCount( sal_Int16 nLines ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// XUnoControl
virtual sal_Bool SAL_CALL setModel(const css::uno::Reference< css::awt::XControlModel >& Model) throw ( css::uno::RuntimeException, std::exception ) override;
// XItemListListener
virtual void SAL_CALL listItemInserted( const css::awt::ItemListEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL listItemRemoved( const css::awt::ItemListEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL listItemModified( const css::awt::ItemListEvent& Event ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL allItemsRemoved( const css::lang::EventObject& Event ) throw (css::uno::RuntimeException, std::exception) override;
virtual void SAL_CALL itemListChanged( const css::lang::EventObject& Event ) throw (css::uno::RuntimeException, std::exception) override;
// XItemListener
virtual void SAL_CALL itemStateChanged( const css::awt::ItemEvent& rEvent ) throw (css::uno::RuntimeException, std::exception) override;
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName( ) throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override;
protected:
virtual void ImplSetPeerProperty( const OUString& rPropName, const css::uno::Any& rVal ) override;
virtual void updateFromModel() override;
2000-09-18 16:07:07 +00:00
};
2002-09-05 06:37:05 +00:00
// class UnoSpinFieldControl
2002-09-05 06:37:05 +00:00
class UnoSpinFieldControl : public UnoEditControl,
public css::awt::XSpinField
2002-09-05 06:37:05 +00:00
{
private:
SpinListenerMultiplexer maSpinListeners;
bool mbRepeat;
2002-09-05 06:37:05 +00:00
public:
UnoSpinFieldControl();
2002-09-05 06:37:05 +00:00
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoEditControl::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
2002-09-05 06:37:05 +00:00
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
2002-09-05 06:37:05 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
2002-09-05 06:37:05 +00:00
// css::awt::XSpinField
void SAL_CALL addSpinListener( const css::uno::Reference< css::awt::XSpinListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL removeSpinListener( const css::uno::Reference< css::awt::XSpinListener >& l ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL up() throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL down() throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL first() throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL last() throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL enableRepeat( sal_Bool bRepeat ) throw(css::uno::RuntimeException, std::exception) override;
2002-09-05 06:37:05 +00:00
// css::lang::XServiceInfo
2002-09-05 06:37:05 +00:00
// No service info, only base class for other fields.
};
2000-09-18 16:07:07 +00:00
// class UnoControlDateFieldModel
2001-01-24 14:00:58 +00:00
class UnoControlDateFieldModel : public UnoControlModel
2000-09-18 16:07:07 +00:00
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlDateFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlDateFieldModel( const UnoControlDateFieldModel& rModel ) : UnoControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlDateFieldModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoDateFieldControl
2002-09-05 06:37:05 +00:00
class UnoDateFieldControl : public UnoSpinFieldControl,
public css::awt::XDateField
2000-09-18 16:07:07 +00:00
{
private:
css::util::Date mnFirst;
css::util::Date mnLast;
TriState mbLongFormat;
2000-09-18 16:07:07 +00:00
public:
UnoDateFieldControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoSpinFieldControl::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
2000-09-18 16:07:07 +00:00
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XTextListener
void SAL_CALL textChanged( const css::awt::TextEvent& rEvent ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
//XDateField
void SAL_CALL setDate( const css::util::Date& Date ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Date SAL_CALL getDate( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMin( const css::util::Date& Date ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Date SAL_CALL getMin( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMax( const css::util::Date& Date ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Date SAL_CALL getMax( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setFirst( const css::util::Date& Date ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Date SAL_CALL getFirst( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setLast( const css::util::Date& Date ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Date SAL_CALL getLast( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setLongFormat( sal_Bool bLong ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isLongFormat( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setEmpty( ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isEmpty( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isStrictFormat( ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlTimeFieldModel
2001-01-24 14:00:58 +00:00
class UnoControlTimeFieldModel : public UnoControlModel
2000-09-18 16:07:07 +00:00
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlTimeFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlTimeFieldModel( const UnoControlTimeFieldModel& rModel ) : UnoControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlTimeFieldModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoTimeFieldControl
2002-09-05 06:37:05 +00:00
class UnoTimeFieldControl : public UnoSpinFieldControl,
public css::awt::XTimeField
2000-09-18 16:07:07 +00:00
{
private:
css::util::Time mnFirst;
css::util::Time mnLast;
2000-09-18 16:07:07 +00:00
public:
UnoTimeFieldControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoSpinFieldControl::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
2000-09-18 16:07:07 +00:00
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XTextListener
void SAL_CALL textChanged( const css::awt::TextEvent& rEvent ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
//XTimeField
void SAL_CALL setTime( const css::util::Time& Time ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Time SAL_CALL getTime( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMin( const css::util::Time& Time ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Time SAL_CALL getMin( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMax( const css::util::Time& Time ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Time SAL_CALL getMax( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setFirst( const css::util::Time& Time ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Time SAL_CALL getFirst( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setLast( const css::util::Time& Time ) throw(css::uno::RuntimeException, std::exception) override;
css::util::Time SAL_CALL getLast( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setEmpty( ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isEmpty( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isStrictFormat( ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlNumericFieldModel
2001-01-24 14:00:58 +00:00
class UnoControlNumericFieldModel : public UnoControlModel
2000-09-18 16:07:07 +00:00
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlNumericFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlNumericFieldModel( const UnoControlNumericFieldModel& rModel ) : UnoControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlNumericFieldModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoNumericFieldControl
2002-09-05 06:37:05 +00:00
class UnoNumericFieldControl : public UnoSpinFieldControl,
public css::awt::XNumericField
2000-09-18 16:07:07 +00:00
{
2001-08-10 08:52:16 +00:00
private:
double mnFirst;
double mnLast;
2000-09-18 16:07:07 +00:00
public:
UnoNumericFieldControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoSpinFieldControl::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
2000-09-18 16:07:07 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XTextListener
void SAL_CALL textChanged( const css::awt::TextEvent& rEvent ) throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XNumericField
void SAL_CALL setValue( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getValue( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMin( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getMin( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMax( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getMax( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setFirst( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getFirst( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setLast( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getLast( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setSpinSize( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getSpinSize( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getDecimalDigits( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isStrictFormat( ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlCurrencyFieldModel
2001-01-24 14:00:58 +00:00
class UnoControlCurrencyFieldModel : public UnoControlModel
2000-09-18 16:07:07 +00:00
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlCurrencyFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlCurrencyFieldModel( const UnoControlCurrencyFieldModel& rModel ) : UnoControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlCurrencyFieldModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoCurrencyFieldControl
2002-09-05 06:37:05 +00:00
class UnoCurrencyFieldControl : public UnoSpinFieldControl,
public css::awt::XCurrencyField
2000-09-18 16:07:07 +00:00
{
2001-08-10 08:52:16 +00:00
private:
double mnFirst;
double mnLast;
2000-09-18 16:07:07 +00:00
public:
UnoCurrencyFieldControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoSpinFieldControl::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
2000-09-18 16:07:07 +00:00
void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XTextListener
void SAL_CALL textChanged( const css::awt::TextEvent& rEvent ) throw(css::uno::RuntimeException, std::exception) override;
// css::awt::XCurrencyField
void SAL_CALL setValue( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getValue( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMin( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getMin( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setMax( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getMax( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setFirst( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getFirst( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setLast( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getLast( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setSpinSize( double Value ) throw(css::uno::RuntimeException, std::exception) override;
double SAL_CALL getSpinSize( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setDecimalDigits( sal_Int16 nDigits ) throw(css::uno::RuntimeException, std::exception) override;
sal_Int16 SAL_CALL getDecimalDigits( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isStrictFormat( ) throw(css::uno::RuntimeException, std::exception) override;
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoControlPatternFieldModel
2001-01-24 14:00:58 +00:00
class UnoControlPatternFieldModel : public UnoControlModel
2000-09-18 16:07:07 +00:00
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2000-09-18 16:07:07 +00:00
public:
UnoControlPatternFieldModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlPatternFieldModel( const UnoControlPatternFieldModel& rModel ) : UnoControlModel( rModel ) {}
2001-01-24 14:00:58 +00:00
UnoControlModel* Clone() const override { return new UnoControlPatternFieldModel( *this ); }
2001-01-24 14:00:58 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-01-24 14:00:58 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2000-09-18 16:07:07 +00:00
// class UnoPatternFieldControl
2002-09-05 06:37:05 +00:00
class UnoPatternFieldControl : public UnoSpinFieldControl,
public css::awt::XPatternField
2000-09-18 16:07:07 +00:00
{
protected:
void ImplSetPeerProperty( const OUString& rPropName, const css::uno::Any& rVal ) override;
2000-09-18 16:07:07 +00:00
public:
UnoPatternFieldControl();
OUString GetComponentServiceName() override;
2000-09-18 16:07:07 +00:00
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoSpinFieldControl::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
2000-09-18 16:07:07 +00:00
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::awt::XPatternField
void SAL_CALL setMasks( const OUString& EditMask, const OUString& LiteralMask ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL getMasks( OUString& EditMask, OUString& LiteralMask ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setString( const OUString& Str ) throw(css::uno::RuntimeException, std::exception) override;
OUString SAL_CALL getString( ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setStrictFormat( sal_Bool bStrict ) throw(css::uno::RuntimeException, std::exception) override;
sal_Bool SAL_CALL isStrictFormat( ) throw(css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2000-09-18 16:07:07 +00:00
};
2001-04-26 08:09:16 +00:00
// class UnoControlProgressBarModel
2001-04-26 08:09:16 +00:00
class UnoControlProgressBarModel : public UnoControlModel
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2001-04-26 08:09:16 +00:00
public:
UnoControlProgressBarModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlProgressBarModel( const UnoControlProgressBarModel& rModel ) : UnoControlModel( rModel ) {}
2001-04-26 08:09:16 +00:00
UnoControlModel* Clone() const override { return new UnoControlProgressBarModel( *this ); }
2001-04-26 08:09:16 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2001-04-26 08:09:16 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-05-11 06:34:54 +00:00
2001-04-26 08:09:16 +00:00
// XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2001-04-26 08:09:16 +00:00
};
2001-04-26 08:09:16 +00:00
// class UnoProgressBarControl
2001-04-26 08:09:16 +00:00
class UnoProgressBarControl : public UnoControlBase,
public css::awt::XProgressBar
2001-04-26 08:09:16 +00:00
{
public:
UnoProgressBarControl();
OUString GetComponentServiceName() override;
2001-04-26 08:09:16 +00:00
css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override { return UnoControlBase::queryInterface(rType); }
css::uno::Any SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL acquire() throw() override { OWeakAggObject::acquire(); }
void SAL_CALL release() throw() override { OWeakAggObject::release(); }
2001-04-26 08:09:16 +00:00
// css::lang::XTypeProvider
css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() throw(css::uno::RuntimeException, std::exception) override;
css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw(css::uno::RuntimeException, std::exception) override;
2001-04-26 08:09:16 +00:00
// css::awt::XProgressBar
void SAL_CALL setForegroundColor( sal_Int32 nColor ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setBackgroundColor( sal_Int32 nColor ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setValue( sal_Int32 nValue ) throw(css::uno::RuntimeException, std::exception) override;
void SAL_CALL setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(css::uno::RuntimeException, std::exception ) override;
sal_Int32 SAL_CALL getValue() throw(css::uno::RuntimeException, std::exception) override;
2001-04-26 08:09:16 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2001-04-26 08:09:16 +00:00
};
2000-09-18 16:07:07 +00:00
2001-05-04 08:04:05 +00:00
// class UnoControlFixedLineModel
2001-05-04 08:04:05 +00:00
class UnoControlFixedLineModel : public UnoControlModel
{
protected:
css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const override;
::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
2001-05-04 08:04:05 +00:00
public:
UnoControlFixedLineModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
UnoControlFixedLineModel( const UnoControlFixedLineModel& rModel ) : UnoControlModel( rModel ) {}
2001-05-04 08:04:05 +00:00
UnoControlModel* Clone() const override { return new UnoControlFixedLineModel( *this ); }
2001-05-04 08:04:05 +00:00
// css::beans::XMultiPropertySet
css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(css::uno::RuntimeException, std::exception) override;
2001-05-04 08:04:05 +00:00
// css::io::XPersistObject
OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException, std::exception) override;
2001-05-11 06:34:54 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2001-05-04 08:04:05 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2001-05-04 08:04:05 +00:00
};
2001-05-04 08:04:05 +00:00
// class UnoFixedLineControl
2001-05-04 08:04:05 +00:00
class UnoFixedLineControl : public UnoControlBase
{
public:
UnoFixedLineControl();
OUString GetComponentServiceName() override;
2001-05-04 08:04:05 +00:00
sal_Bool SAL_CALL isTransparent( ) throw(css::uno::RuntimeException, std::exception) override;
2001-05-04 08:04:05 +00:00
// css::lang::XServiceInfo
OUString SAL_CALL getImplementationName()
throw (css::uno::RuntimeException, std::exception) override;
2001-05-04 08:04:05 +00:00
css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames()
throw (css::uno::RuntimeException, std::exception) override;
2001-05-04 08:04:05 +00:00
};
#endif // INCLUDED_TOOLKIT_CONTROLS_UNOCONTROLS_HXX
2000-09-18 16:07:07 +00:00
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */