LibreOffice Module forms (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
frm::OControl Class Referenceabstract

#include <FormComponent.hxx>

Inheritance diagram for frm::OControl:
[legend]
Collaboration diagram for frm::OControl:
[legend]

Public Member Functions

 OControl (const css::uno::Reference< css::uno::XComponentContext > &_rFactory, const OUString &_rAggregateService, const bool _bSetDelegator=true)
 constructs a control More...
 
- Public Member Functions inherited from cppu::OComponentHelper
 OComponentHelper (::osl::Mutex &rMutex)
 
virtual ~OComponentHelper () SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryAggregation (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE=0
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual void SAL_CALL dispose () SAL_OVERRIDE
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::OWeakAggObject
 OWeakAggObject ()
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
 
virtual void SAL_CALL setDelegator (const css::uno::Reference< css::uno::XInterface > &Delegator) SAL_OVERRIDE
 
virtual css::uno::Any SAL_CALL queryAggregation (const css::uno::Type &rType) SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::OWeakObject
 OWeakObject ()
 
 OWeakObject (const OWeakObject &)
 
OWeakObject &SAL_CALL operator= (const OWeakObject &)
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 
virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter () SAL_OVERRIDE
 
SAL_CALL operator css::uno::Reference< css::uno::XInterface > ()
 
- Public Member Functions inherited from cppu::ImplHelper3< class Ifc1, class Ifc2, class Ifc3 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 

Protected Member Functions

virtual ~OControl () override
 
void doSetDelegator ()
 sets the control as delegator at the aggregate More...
 
void doResetDelegator ()
 
virtual css::uno::Any SAL_CALL queryAggregation (const css::uno::Type &_rType) override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual void SAL_CALL disposing () override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &_rxListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &_rxListener) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual OUString SAL_CALL getImplementationName () override=0
 
virtual void SAL_CALL setContext (const css::uno::Reference< css::uno::XInterface > &Context) override
 
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getContext () override
 
virtual void SAL_CALL createPeer (const css::uno::Reference< css::awt::XToolkit > &Toolkit, const css::uno::Reference< css::awt::XWindowPeer > &Parent) override
 
virtual css::uno::Reference< css::awt::XWindowPeer > SAL_CALL getPeer () override
 
virtual sal_Bool SAL_CALL setModel (const css::uno::Reference< css::awt::XControlModel > &Model) override
 
virtual css::uno::Reference< css::awt::XControlModel > SAL_CALL getModel () override
 
virtual css::uno::Reference< css::awt::XView > SAL_CALL getView () override
 
virtual void SAL_CALL setDesignMode (sal_Bool bOn) override
 
virtual sal_Bool SAL_CALL isDesignMode () override
 
virtual sal_Bool SAL_CALL isTransparent () override
 
virtual css::uno::Sequence< css::uno::Type > _getTypes ()
 
css::uno::Sequence< OUString > getAggregateServiceNames () const
 
virtual void SAL_CALL disposing ()
 
- Protected Member Functions inherited from cppu::OWeakAggObject
virtual ~OWeakAggObject () SAL_OVERRIDE
 
- Protected Member Functions inherited from cppu::OWeakObject
virtual ~OWeakObject () COVERITY_NOEXCEPT_FALSE
 
void disposeWeakConnectionPoint ()
 
- Protected Member Functions inherited from cppu::ImplHelper3< class Ifc1, class Ifc2, class Ifc3 >
 ~ImplHelper3 () SAL_NOEXCEPT
 

Protected Attributes

::osl::Mutex m_aMutex
 
css::uno::Reference< css::awt::XControl > m_xControl
 
css::uno::Reference< css::uno::XAggregation > m_xAggregate
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
WindowStateGuard m_aWindowStateGuard
 
- Protected Attributes inherited from cppu::OWeakAggObject
css::uno::WeakReferenceHelper xDelegator
 
- Protected Attributes inherited from cppu::OWeakObject
oslInterlockedCount m_refCount
 

Private Member Functions

void impl_resetStateGuard_nothrow ()
 

Detailed Description

Definition at line 138 of file FormComponent.hxx.

Constructor & Destructor Documentation

◆ OControl()

frm::OControl::OControl ( const css::uno::Reference< css::uno::XComponentContext > &  _rFactory,
const OUString &  _rAggregateService,
const bool  _bSetDelegator = true 
)

constructs a control

Parameters
_rFactorythe service factory for this control
_rAggregateServicethe service name of the component to aggregate
_bSetDelegatorset this to <FALSE> if you don't want the constructor to set the delegator at the aggregate. In this case, you have to call doSetDelegator within your own constructor.

This is helpful, if your derived class wants to cache an interface of the aggregate. In this case, the aggregate needs to be queried for this interface before the <member scope="css::uno">XAggregation::setDelegator</member> call.

In such a case, pass <FALSE> to this parameter. Then, cache the aggregate's interface(s) as needed. Afterwards, call <member>doSetDelegator</member>.

In your destructor, you need to call <member>doResetDelegator</member> before resetting the cached interfaces. This will reset the aggregates delegator to <NULL>, which will ensure that the <member scope="css::uno">XInterface::release</member> calls on the cached interfaces are really applied to the aggregate, instead of the <type>OControl</type> itself.

Definition at line 118 of file FormComponent.cxx.

References doSetDelegator(), m_aMutex, cppu::OWeakObject::m_refCount, m_xAggregate, m_xContext, and m_xControl.

◆ ~OControl()

frm::OControl::~OControl ( )
overrideprotectedvirtual

Definition at line 135 of file FormComponent.cxx.

References doResetDelegator().

Member Function Documentation

◆ _getTypes()

Sequence< Type > frm::OControl::_getTypes ( )
protectedvirtual

◆ addEventListener()

virtual void SAL_CALL frm::OControl::addEventListener ( const css::uno::Reference< css::lang::XEventListener > &  _rxListener)
inlineoverrideprotectedvirtual

Reimplemented from cppu::OComponentHelper.

Definition at line 208 of file FormComponent.hxx.

◆ createPeer()

void SAL_CALL frm::OControl::createPeer ( const css::uno::Reference< css::awt::XToolkit > &  Toolkit,
const css::uno::Reference< css::awt::XWindowPeer > &  Parent 
)
overrideprotectedvirtual

Definition at line 273 of file FormComponent.cxx.

◆ dispose()

virtual void SAL_CALL frm::OControl::dispose ( void  )
inlineoverrideprotectedvirtual

◆ disposing() [1/2]

void frm::OControl::disposing ( )
overrideprotectedvirtual

◆ disposing() [2/2]

void SAL_CALL frm::OControl::disposing ( const css::lang::EventObject &  Source)
overrideprotectedvirtual

◆ doResetDelegator()

void frm::OControl::doResetDelegator ( )
protected

Definition at line 140 of file FormComponent.cxx.

References m_xAggregate.

Referenced by ~OControl(), and frm::OListBoxControl::~OListBoxControl().

◆ doSetDelegator()

void frm::OControl::doSetDelegator ( )
protected

sets the control as delegator at the aggregate

This has to be called from within your derived class' constructor, if and only if you passed <FALSE> to the <arg>_bSetDelegator</arg> parameter of the <type>OControl</type> constructor.

Definition at line 146 of file FormComponent.cxx.

References cppu::OWeakObject::m_refCount, and m_xAggregate.

Referenced by OControl(), and frm::OListBoxControl::OListBoxControl().

◆ getAggregateServiceNames()

Sequence< OUString > frm::OControl::getAggregateServiceNames ( ) const
protected

Definition at line 214 of file FormComponent.cxx.

Referenced by getSupportedServiceNames().

◆ getContext()

Reference< XInterface > SAL_CALL frm::OControl::getContext ( )
overrideprotectedvirtual

Definition at line 252 of file FormComponent.cxx.

References m_xControl.

◆ getImplementationId()

Sequence< sal_Int8 > SAL_CALL frm::OControl::getImplementationId ( )
overrideprotectedvirtual

Reimplemented from cppu::ImplHelper3< class Ifc1, class Ifc2, class Ifc3 >.

Definition at line 175 of file FormComponent.cxx.

◆ getImplementationName()

virtual OUString SAL_CALL frm::OControl::getImplementationName ( )
overrideprotectedpure virtual

◆ getModel()

Reference< XControlModel > SAL_CALL frm::OControl::getModel ( )
overrideprotectedvirtual

◆ getPeer()

Reference< XWindowPeer > SAL_CALL frm::OControl::getPeer ( )
overrideprotectedvirtual

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL frm::OControl::getSupportedServiceNames ( )
overrideprotectedvirtual

◆ getTypes()

Sequence< Type > SAL_CALL frm::OControl::getTypes ( )
overrideprotectedvirtual

◆ getView()

Reference< XView > SAL_CALL frm::OControl::getView ( )
overrideprotectedvirtual

Definition at line 302 of file FormComponent.cxx.

References m_xControl.

◆ impl_resetStateGuard_nothrow()

void frm::OControl::impl_resetStateGuard_nothrow ( )
private

◆ isDesignMode()

sal_Bool SAL_CALL frm::OControl::isDesignMode ( )
overrideprotectedvirtual

Definition at line 313 of file FormComponent.cxx.

References m_xControl.

◆ isTransparent()

sal_Bool SAL_CALL frm::OControl::isTransparent ( )
overrideprotectedvirtual

Definition at line 318 of file FormComponent.cxx.

References m_xControl.

◆ queryAggregation()

Any SAL_CALL frm::OControl::queryAggregation ( const css::uno::Type &  _rType)
overrideprotectedvirtual

◆ removeEventListener()

virtual void SAL_CALL frm::OControl::removeEventListener ( const css::uno::Reference< css::lang::XEventListener > &  _rxListener)
inlineoverrideprotectedvirtual

Reimplemented from cppu::OComponentHelper.

Definition at line 210 of file FormComponent.hxx.

◆ setContext()

void SAL_CALL frm::OControl::setContext ( const css::uno::Reference< css::uno::XInterface > &  Context)
overrideprotectedvirtual

Definition at line 246 of file FormComponent.cxx.

References m_xControl.

◆ setDesignMode()

void SAL_CALL frm::OControl::setDesignMode ( sal_Bool  bOn)
overrideprotectedvirtual

Reimplemented in frm::OButtonControl.

Definition at line 307 of file FormComponent.cxx.

References m_xControl.

◆ setModel()

sal_Bool SAL_CALL frm::OControl::setModel ( const css::uno::Reference< css::awt::XControlModel > &  Model)
overrideprotectedvirtual

Reimplemented in frm::OButtonControl, and frm::OBoundControl.

Definition at line 287 of file FormComponent.cxx.

References impl_resetStateGuard_nothrow(), m_xControl, and Model.

Referenced by frm::OBoundControl::setModel().

◆ supportsService()

sal_Bool SAL_CALL frm::OControl::supportsService ( const OUString &  ServiceName)
overrideprotectedvirtual

Definition at line 209 of file FormComponent.cxx.

Member Data Documentation

◆ m_aMutex

::osl::Mutex frm::OControl::m_aMutex
protected

◆ m_aWindowStateGuard

WindowStateGuard frm::OControl::m_aWindowStateGuard
protected

Definition at line 149 of file FormComponent.hxx.

Referenced by disposing(), and impl_resetStateGuard_nothrow().

◆ m_xAggregate

css::uno::Reference< css::uno::XAggregation> frm::OControl::m_xAggregate
protected

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > frm::OControl::m_xContext
protected

Definition at line 148 of file FormComponent.hxx.

Referenced by frm::OImageControlControl::mousePressed().

◆ m_xControl

css::uno::Reference< css::awt::XControl > frm::OControl::m_xControl
protected

The documentation for this class was generated from the following files: