LibreOffice Module svtools (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
svt::OGenericUnoDialog Class Referenceabstract

abstract base class for implementing UNO objects representing dialogs (com.sun.star.awt::XDialog) More...

#include <genericunodialog.hxx>

Inheritance diagram for svt::OGenericUnoDialog:
[legend]
Collaboration diagram for svt::OGenericUnoDialog:
[legend]

Public Member Functions

virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &_rType) override
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () override=0
 
virtual OUString SAL_CALL getImplementationName () override=0
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override=0
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL setTitle (const OUString &aTitle) override
 
virtual sal_Int16 SAL_CALL execute () override
 
virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override
 
- Public Member Functions inherited from comphelper::OMutexAndBroadcastHelper
 OMutexAndBroadcastHelper ()
 
::osl::Mutex & GetMutex ()
 
::cppu::OBroadcastHelperGetBroadcastHelper ()
 
const ::cppu::OBroadcastHelperGetBroadcastHelper () const
 
- Public Member Functions inherited from comphelper::OPropertyContainer
virtual ~OPropertyContainer ()
 

Protected Member Functions

 OGenericUnoDialog (const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
 
virtual ~OGenericUnoDialog () override
 
virtual std::unique_ptr< weld::DialogControllercreateDialog (const css::uno::Reference< css::awt::XWindow > &rParent)=0
 create the concrete dialog instance. More...
 
void destroyDialog ()
 called to destroy the dialog used. deletes m_pDialog and resets it to NULL More...
 
virtual void executedDialog (sal_Int16)
 called after the dialog has been executed More...
 
virtual void implInitialize (const css::uno::Any &_rValue)
 smaller form of <method>initialize</method>. More...
 
- Protected Member Functions inherited from comphelper::OPropertyContainer
 OPropertyContainer (::cppu::OBroadcastHelper &_rBHelper)
 
virtual sal_Bool SAL_CALL convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL setFastPropertyValue_NoBroadcast (sal_Int32 nHandle, const css::uno::Any &rValue) override
 
virtual void SAL_CALL getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const override
 
virtual css::uno::Any SAL_CALL getFastPropertyValue (sal_Int32 nHandle) override final
 
virtual void getFastPropertyValue (std::unique_lock< std::mutex > &rGuard, css::uno::Any &rValue, sal_Int32 nHandle) const =0
 
virtual void SAL_CALL setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue) override final
 
- Protected Member Functions inherited from comphelper::OPropertyContainerHelper
 OPropertyContainerHelper ()
 
 ~OPropertyContainerHelper ()
 
void registerProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void *_pPointerToMember, const css::uno::Type &_rMemberType)
 
void registerMayBeVoidProperty (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, css::uno::Any *_pPointerToMember, const css::uno::Type &_rExpectedType)
 
void registerPropertyNoMember (const OUString &_rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, const css::uno::Type &_rType, css::uno::Any const &_pInitialValue)
 
void revokeProperty (sal_Int32 _nHandle)
 
bool isRegisteredProperty (sal_Int32 _nHandle) const
 
bool isRegisteredProperty (const OUString &_rName) const
 
bool convertFastPropertyValue (css::uno::Any &rConvertedValue, css::uno::Any &rOldValue, sal_Int32 nHandle, const css::uno::Any &rValue)
 
void setFastPropertyValue (sal_Int32 nHandle, const css::uno::Any &rValue)
 
void getFastPropertyValue (css::uno::Any &rValue, sal_Int32 nHandle) const
 
void describeProperties (css::uno::Sequence< css::beans::Property > &_rProps) const
 
const css::beans::Property & getProperty (const OUString &_rName) const
 

Protected Attributes

std::unique_ptr< weld::DialogControllerm_xDialog
 
bool m_bExecuting: 1
 the dialog to execute More...
 
bool m_bTitleAmbiguous: 1
 we're currently executing the dialog More...
 
bool m_bInitialized: 1
 m_sTitle has not been set yet More...
 
OUString m_sTitle
 has "initialize" been called? More...
 
css::uno::Reference< css::awt::XWindow > m_xParent
 title of the dialog More...
 
css::uno::Reference< css::uno::XComponentContext > m_aContext
 parent window More...
 
- Protected Attributes inherited from comphelper::OMutexAndBroadcastHelper
::osl::Mutex m_aMutex
 
::cppu::OBroadcastHelper m_aBHelper
 

Private Member Functions

bool impl_ensureDialog_lck ()
 ensures that m_pDialog is not <NULL> More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from comphelper::OPropertyContainer
static css::uno::Sequence< css::uno::Type > getBaseTypes ()
 

Detailed Description

abstract base class for implementing UNO objects representing dialogs (com.sun.star.awt::XDialog)

Definition at line 56 of file genericunodialog.hxx.

Constructor & Destructor Documentation

◆ OGenericUnoDialog()

svt::OGenericUnoDialog::OGenericUnoDialog ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext)
protected

◆ ~OGenericUnoDialog()

svt::OGenericUnoDialog::~OGenericUnoDialog ( )
overrideprotectedvirtual

Member Function Documentation

◆ convertFastPropertyValue()

sal_Bool svt::OGenericUnoDialog::convertFastPropertyValue ( css::uno::Any &  rConvertedValue,
css::uno::Any &  rOldValue,
sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overridevirtual

Reimplemented from comphelper::OPropertyContainer.

Definition at line 117 of file genericunodialog.cxx.

References m_xParent, nHandle, and UNODIALOG_PROPERTY_ID_PARENT.

◆ createDialog()

virtual std::unique_ptr< weld::DialogController > svt::OGenericUnoDialog::createDialog ( const css::uno::Reference< css::awt::XWindow > &  rParent)
protectedpure virtual

create the concrete dialog instance.

Note that m_aMutex is not locked when this method get called, but the application-wide solar mutex is (to guard the not thread-safe ctor of the dialog).

Parameters
pParentthe parent window for the new dialog

Referenced by impl_ensureDialog_lck().

◆ destroyDialog()

void svt::OGenericUnoDialog::destroyDialog ( )
protected

called to destroy the dialog used. deletes m_pDialog and resets it to NULL

Definition at line 254 of file genericunodialog.cxx.

References m_xDialog.

Referenced by ~OGenericUnoDialog().

◆ execute()

sal_Int16 SAL_CALL svt::OGenericUnoDialog::execute ( )
overridevirtual

◆ executedDialog()

virtual void svt::OGenericUnoDialog::executedDialog ( sal_Int16  )
inlineprotectedvirtual

called after the dialog has been executed

Parameters
_nExecutionResultthe execution result as returned by Dialog::Execute

Definition at line 116 of file genericunodialog.hxx.

Referenced by execute().

◆ getImplementationId()

virtual css::uno::Sequence< sal_Int8 > SAL_CALL svt::OGenericUnoDialog::getImplementationId ( )
overridepure virtual

◆ getImplementationName()

virtual OUString SAL_CALL svt::OGenericUnoDialog::getImplementationName ( )
overridepure virtual

References supportsService().

◆ getSupportedServiceNames()

virtual css::uno::Sequence< OUString > SAL_CALL svt::OGenericUnoDialog::getSupportedServiceNames ( )
overridepure virtual

◆ getTypes()

Sequence< Type > SAL_CALL svt::OGenericUnoDialog::getTypes ( )
overridevirtual

◆ impl_ensureDialog_lck()

bool svt::OGenericUnoDialog::impl_ensureDialog_lck ( )
private

ensures that m_pDialog is not <NULL>

This method does nothing if m_pDialog is already non-<NULL>. Else, it calls createDialog and does all necessary initializations of the new dialog instance.

@precond m_aMutex is locked

Returns
<TRUE> if and only if m_pDialog is non-<NULL> upon returning from the method. Note that the only case where m_pDialog is <NULL> is when createDialog returned <NULL>, which is will fire an assertion in non-product builds.

Definition at line 158 of file genericunodialog.cxx.

References createDialog(), m_bTitleAmbiguous, m_sTitle, m_xDialog, and m_xParent.

Referenced by execute().

◆ implInitialize()

void svt::OGenericUnoDialog::implInitialize ( const css::uno::Any &  _rValue)
protectedvirtual

smaller form of <method>initialize</method>.

The <method>initialize</method> method is called with a sequence of com.sun.star.uno::Any's, which is split up into the single elements, which are passed to implInitialize. The default implementation tries to extract a com.sun.star.beans::PropertyValue from the value a pass it to the com.sun.star.beans::XPropertySet interface of the object.

Definition at line 221 of file genericunodialog.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and setPropertyValue().

Referenced by initialize().

◆ initialize()

void SAL_CALL svt::OGenericUnoDialog::initialize ( const css::uno::Sequence< css::uno::Any > &  aArguments)
overridevirtual

◆ queryInterface()

Any SAL_CALL svt::OGenericUnoDialog::queryInterface ( const css::uno::Type &  _rType)
overridevirtual

Definition at line 71 of file genericunodialog.cxx.

References Any, and XPropertySet.

◆ setFastPropertyValue_NoBroadcast()

void svt::OGenericUnoDialog::setFastPropertyValue_NoBroadcast ( sal_Int32  nHandle,
const css::uno::Any &  rValue 
)
overridevirtual

◆ setTitle()

void SAL_CALL svt::OGenericUnoDialog::setTitle ( const OUString &  aTitle)
overridevirtual

◆ supportsService()

sal_Bool SAL_CALL svt::OGenericUnoDialog::supportsService ( const OUString &  ServiceName)
overridevirtual

Definition at line 94 of file genericunodialog.cxx.

References ServiceName, and cppu::supportsService().

Member Data Documentation

◆ m_aContext

css::uno::Reference<css::uno::XComponentContext> svt::OGenericUnoDialog::m_aContext
protected

parent window

Definition at line 72 of file genericunodialog.hxx.

◆ m_bExecuting

bool svt::OGenericUnoDialog::m_bExecuting
protected

the dialog to execute

Definition at line 63 of file genericunodialog.hxx.

Referenced by execute().

◆ m_bInitialized

bool svt::OGenericUnoDialog::m_bInitialized
protected

m_sTitle has not been set yet

Definition at line 65 of file genericunodialog.hxx.

Referenced by initialize().

◆ m_bTitleAmbiguous

bool svt::OGenericUnoDialog::m_bTitleAmbiguous
protected

we're currently executing the dialog

Definition at line 64 of file genericunodialog.hxx.

Referenced by impl_ensureDialog_lck(), and setFastPropertyValue_NoBroadcast().

◆ m_sTitle

OUString svt::OGenericUnoDialog::m_sTitle
protected

has "initialize" been called?

Definition at line 68 of file genericunodialog.hxx.

Referenced by impl_ensureDialog_lck(), OGenericUnoDialog(), and setFastPropertyValue_NoBroadcast().

◆ m_xDialog

std::unique_ptr<weld::DialogController> svt::OGenericUnoDialog::m_xDialog
protected

◆ m_xParent

css::uno::Reference<css::awt::XWindow> svt::OGenericUnoDialog::m_xParent
protected

title of the dialog

Definition at line 69 of file genericunodialog.hxx.

Referenced by convertFastPropertyValue(), impl_ensureDialog_lck(), and OGenericUnoDialog().


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