LibreOffice Module extensions (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
pcr::SQLCommandDesigner Class Referencefinal

encapsulates the code for calling and managing a query design frame, used for interactively designing the Command property of a ->RowSet More...

#include <sqlcommanddesign.hxx>

Inheritance diagram for pcr::SQLCommandDesigner:
[legend]
Collaboration diagram for pcr::SQLCommandDesigner:
[legend]

Public Member Functions

 SQLCommandDesigner (const css::uno::Reference< css::uno::XComponentContext > &_rxContext, const ::rtl::Reference< ISQLCommandAdapter > &_rxPropertyAdapter, ::dbtools::SharedConnection _aConnection, const Link< SQLCommandDesigner &, void > &_rCloseLink)
 creates the instance, and immediately opens the SQL command design frame More...
 
bool isActive () const
 determines whether the SQL Command designer is currently active, i.e. More...
 
const ::rtl::Reference< ISQLCommandAdapter > & getPropertyAdapter () const
 returns the property adapter used by the instance More...
 
void raise () const
 raises the designer window to top @precond the designer is active (->isActive) @precond the instance is not disposed More...
 
bool suspend () const
 suspends the designer @precond the designer is active (->isActive) @precond the instance is not disposed More...
 
void dispose ()
 disposes the instance so that it becomes non-functional More...
 

Private Member Functions

virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &evt) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual ~SQLCommandDesigner () override
 
void impl_doOpenDesignerFrame_nothrow ()
 opens a new frame for interactively designing an SQL command @precond the designer is not currently active (see ->isActive) @precond ->m_xConnection is not <NULL> More...
 
void impl_raise_nothrow () const
 impl-version of ->raise More...
 
bool impl_isDisposed () const
 determines whether we are already disposed More...
 
void impl_checkDisposed_throw () const
 checks whether we are already disposed More...
 
css::uno::Reference< css::frame::XFrame > impl_createEmptyParentlessTask_nothrow () const
 create an empty top-level frame, which does not belong to the desktop's frame list @precond ->m_xORB is not <NULL> More...
 
void impl_closeDesigner_nothrow ()
 closes the component denoted by m_xDesigner @precond our designer component is actually active (->isActive) @precond we're not disposed already More...
 
bool impl_trySuspendDesigner_nothrow () const
 suspends our designer component @precond the designer component is actually active (->isActive) More...
 
 SQLCommandDesigner (const SQLCommandDesigner &)=delete
 
SQLCommandDesigneroperator= (const SQLCommandDesigner &)=delete
 

Private Attributes

css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::lang::XMultiComponentFactory > m_xORB
 
::dbtools::SharedConnection m_xConnection
 
css::uno::Reference< css::frame::XController > m_xDesigner
 
::rtl::Reference< ISQLCommandAdapterm_xObjectAdapter
 
Link< SQLCommandDesigner &, void > m_aCloseLink
 

Detailed Description

encapsulates the code for calling and managing a query design frame, used for interactively designing the Command property of a ->RowSet

Definition at line 47 of file sqlcommanddesign.hxx.

Constructor & Destructor Documentation

◆ SQLCommandDesigner() [1/2]

pcr::SQLCommandDesigner::SQLCommandDesigner ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
const ::rtl::Reference< ISQLCommandAdapter > &  _rxPropertyAdapter,
::dbtools::SharedConnection  _aConnection,
const Link< SQLCommandDesigner &, void > &  _rCloseLink 
)

creates the instance, and immediately opens the SQL command design frame

Parameters
_rxContextour component context. Must not be <NULL>, and must provide a non-<NULL> XMultiComponentFactory
_rxPropertyAdapteran adapter to the object's SQL command related properties
_rConnectionthe current connection of ->_rxRowSet. Must not be <NULL>.
_rCloseLinklink to call when the component has been closed
Exceptions
css::lang::NullPointerExceptionif any of the arguments (except ->_rCloseLink) is <NULL>, or if the component context does not provide a valid component factory.

◆ ~SQLCommandDesigner()

pcr::SQLCommandDesigner::~SQLCommandDesigner ( )
overrideprivatevirtual

Definition at line 109 of file sqlcommanddesign.cxx.

◆ SQLCommandDesigner() [2/2]

pcr::SQLCommandDesigner::SQLCommandDesigner ( const SQLCommandDesigner )
privatedelete

Member Function Documentation

◆ dispose()

void pcr::SQLCommandDesigner::dispose ( void  )

◆ disposing()

void SAL_CALL pcr::SQLCommandDesigner::disposing ( const css::lang::EventObject &  Source)
overrideprivatevirtual

Definition at line 145 of file sqlcommanddesign.cxx.

References m_aCloseLink, m_xDesigner, and Source.

◆ getPropertyAdapter()

const ::rtl::Reference< ISQLCommandAdapter > & pcr::SQLCommandDesigner::getPropertyAdapter ( ) const
inline

returns the property adapter used by the instance

Definition at line 86 of file sqlcommanddesign.hxx.

References m_xObjectAdapter.

◆ impl_checkDisposed_throw()

void pcr::SQLCommandDesigner::impl_checkDisposed_throw ( ) const
private

checks whether we are already disposed

Exceptions
css::lang::DisposedExceptionif we in fact are disposed

Definition at line 169 of file sqlcommanddesign.cxx.

References impl_isDisposed().

Referenced by raise(), and suspend().

◆ impl_closeDesigner_nothrow()

void pcr::SQLCommandDesigner::impl_closeDesigner_nothrow ( )
private

closes the component denoted by m_xDesigner @precond our designer component is actually active (->isActive) @precond we're not disposed already

Definition at line 295 of file sqlcommanddesign.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, isActive(), m_xDesigner, m_xORB, PROPERTY_ACTIVECOMMAND, and xDispatch.

Referenced by dispose().

◆ impl_createEmptyParentlessTask_nothrow()

Reference< XFrame > pcr::SQLCommandDesigner::impl_createEmptyParentlessTask_nothrow ( ) const
private

create an empty top-level frame, which does not belong to the desktop's frame list @precond ->m_xORB is not <NULL>

Definition at line 273 of file sqlcommanddesign.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, m_xContext, m_xORB, and xFrame.

Referenced by impl_doOpenDesignerFrame_nothrow().

◆ impl_doOpenDesignerFrame_nothrow()

void pcr::SQLCommandDesigner::impl_doOpenDesignerFrame_nothrow ( )
private

◆ impl_isDisposed()

bool pcr::SQLCommandDesigner::impl_isDisposed ( ) const
inlineprivate

determines whether we are already disposed

Definition at line 131 of file sqlcommanddesign.hxx.

References m_xContext.

Referenced by dispose(), and impl_checkDisposed_throw().

◆ impl_raise_nothrow()

void pcr::SQLCommandDesigner::impl_raise_nothrow ( ) const
private

impl-version of ->raise

Definition at line 190 of file sqlcommanddesign.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, isActive(), m_xDesigner, and xFrame.

Referenced by raise().

◆ impl_trySuspendDesigner_nothrow()

bool pcr::SQLCommandDesigner::impl_trySuspendDesigner_nothrow ( ) const
private

suspends our designer component @precond the designer component is actually active (->isActive)

Returns
<TRUE> if the suspension was successful, <FALSE> if it was vetoed

Definition at line 337 of file sqlcommanddesign.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, isActive(), and m_xDesigner.

Referenced by suspend().

◆ isActive()

bool pcr::SQLCommandDesigner::isActive ( ) const
inline

determines whether the SQL Command designer is currently active, i.e.

if there currently exists a frame which allows the user entering the SQL command

Definition at line 82 of file sqlcommanddesign.hxx.

References m_xDesigner.

Referenced by dispose(), impl_closeDesigner_nothrow(), impl_doOpenDesignerFrame_nothrow(), impl_raise_nothrow(), and impl_trySuspendDesigner_nothrow().

◆ operator=()

SQLCommandDesigner & pcr::SQLCommandDesigner::operator= ( const SQLCommandDesigner )
privatedelete

◆ propertyChange()

void SAL_CALL pcr::SQLCommandDesigner::propertyChange ( const css::beans::PropertyChangeEvent &  evt)
overrideprivatevirtual

◆ raise()

void pcr::SQLCommandDesigner::raise ( ) const

raises the designer window to top @precond the designer is active (->isActive) @precond the instance is not disposed

Definition at line 176 of file sqlcommanddesign.cxx.

References impl_checkDisposed_throw(), and impl_raise_nothrow().

◆ suspend()

bool pcr::SQLCommandDesigner::suspend ( ) const

suspends the designer @precond the designer is active (->isActive) @precond the instance is not disposed

Definition at line 183 of file sqlcommanddesign.cxx.

References impl_checkDisposed_throw(), and impl_trySuspendDesigner_nothrow().

Member Data Documentation

◆ m_aCloseLink

Link<SQLCommandDesigner&,void> pcr::SQLCommandDesigner::m_aCloseLink
private

Definition at line 55 of file sqlcommanddesign.hxx.

Referenced by disposing().

◆ m_xConnection

::dbtools::SharedConnection pcr::SQLCommandDesigner::m_xConnection
private

Definition at line 52 of file sqlcommanddesign.hxx.

Referenced by dispose(), and impl_doOpenDesignerFrame_nothrow().

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > pcr::SQLCommandDesigner::m_xContext
private

◆ m_xDesigner

css::uno::Reference< css::frame::XController > pcr::SQLCommandDesigner::m_xDesigner
private

◆ m_xObjectAdapter

::rtl::Reference< ISQLCommandAdapter > pcr::SQLCommandDesigner::m_xObjectAdapter
private

◆ m_xORB

css::uno::Reference< css::lang::XMultiComponentFactory > pcr::SQLCommandDesigner::m_xORB
private

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