LibreOffice Module dbaccess (master) 1
|
#include <dbsubcomponentcontroller.hxx>
Public Member Functions | |
bool | isReadOnly () const |
bool | isEditable () const |
void | setEditable (bool _bEditable) |
bool | isConnected () const |
css::uno::Reference< css::sdbc::XDatabaseMetaData > | getMetaData () const |
OUString | getDataSourceName () const |
const css::uno::Reference< css::beans::XPropertySet > & | getDataSource () const |
bool | haveDataSource () const |
css::uno::Reference< css::frame::XModel > | getDatabaseDocument () const |
const ::dbtools::DatabaseMetaData & | getSdbMetaData () const |
provides access to the SDB-level database meta data of the current connection More... | |
void | appendError (const OUString &_rErrorMessage) |
appends an error in the current environment. More... | |
void | clearError () |
clears the error state. More... | |
bool | hasError () const |
const ::dbtools::SQLExceptionInfo & | getError () const |
returns the current error More... | |
void | displayError () |
displays the current error, or does nothing if there is no current error More... | |
void | connectionLostMessage () const |
shows an info box with the string conntection lost. More... | |
const css::uno::Reference< css::sdbc::XConnection > & | getConnection () const |
gives access to the currently used connection More... | |
css::uno::Reference< css::util::XNumberFormatter > const & | getNumberFormatter () const |
returns the number formatter More... | |
virtual sal_Bool SAL_CALL | suspend (sal_Bool bSuspend) override |
virtual sal_Bool SAL_CALL | attachModel (const css::uno::Reference< css::frame::XModel > &xModel) override |
virtual css::uno::Reference< css::document::XEmbeddedScripts > SAL_CALL | getScriptContainer () override |
virtual sal_Bool SAL_CALL | isModified () override |
virtual void SAL_CALL | setModified (sal_Bool bModified) override |
virtual void SAL_CALL | addModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override |
virtual void SAL_CALL | removeModifyListener (const css::uno::Reference< css::util::XModifyListener > &aListener) override |
virtual OUString SAL_CALL | getTitle () override |
Protected Member Functions | |
virtual void | impl_initialize () override |
virtual void | Execute (sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override |
virtual css::uno::Reference< css::frame::XModel > | getPrivateModel () const override |
bool | impl_isModified () const |
virtual void | impl_onModifyChanged () |
DBSubComponentController (const css::uno::Reference< css::uno::XComponentContext > &_rxORB) | |
virtual | ~DBSubComponentController () override |
void | disconnect () |
virtual void | reconnect (bool _bUI) |
bool | ensureConnected () |
virtual void | losingConnection () |
called when our connection is being disposed More... | |
virtual void SAL_CALL | disposing (const css::lang::EventObject &Source) override |
virtual void SAL_CALL | disposing () override |
virtual css::uno::Any SAL_CALL | queryInterface (const css::uno::Type &_rType) override |
virtual css::uno::Sequence< css::uno::Type > SAL_CALL | getTypes () override |
sal_Int32 | getCurrentStartNumber () const |
Private Member Functions | |
void | initializeConnection (const css::uno::Reference< css::sdbc::XConnection > &_rxForeignConn) |
forces usage of a connection which we do not own More... | |
Private Attributes | |
::std::unique_ptr< DBSubComponentController_Impl > | m_pImpl |
Definition at line 65 of file dbsubcomponentcontroller.hxx.
|
protected |
Definition at line 169 of file dbsubcomponentcontroller.cxx.
References getMutex(), and m_pImpl.
|
overrideprotectedvirtual |
Definition at line 175 of file dbsubcomponentcontroller.cxx.
|
overridevirtual |
Definition at line 558 of file dbsubcomponentcontroller.cxx.
References getMutex(), and m_pImpl.
void dbaui::DBSubComponentController::appendError | ( | const OUString & | _rErrorMessage | ) |
appends an error in the current environment.
Definition at line 370 of file dbsubcomponentcontroller.cxx.
References getStandardSQLState(), m_pImpl, and dbtools::SQLExceptionInfo::SQLException.
|
overridevirtual |
Definition at line 405 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
void dbaui::DBSubComponentController::clearError | ( | ) |
clears the error state.
Definition at line 376 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
void dbaui::DBSubComponentController::connectionLostMessage | ( | ) | const |
shows an info box with the string conntection lost.
Definition at line 444 of file dbsubcomponentcontroller.cxx.
References Application::CreateMessageDialog(), DBA_RES, vcl::Window::GetFrameWeld(), getView(), and VCLUnoHelper::GetWindow().
Referenced by impl_initialize().
|
protected |
Definition at line 320 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
Referenced by disposing(), and initializeConnection().
void dbaui::DBSubComponentController::displayError | ( | ) |
displays the current error, or does nothing if there is no current error
Definition at line 391 of file dbsubcomponentcontroller.cxx.
References m_pImpl, and showError().
|
overrideprotectedvirtual |
Definition at line 336 of file dbsubcomponentcontroller.cxx.
References disconnect(), and m_pImpl.
|
overrideprotectedvirtual |
References queryInterface().
|
inlineprotected |
Definition at line 175 of file dbsubcomponentcontroller.hxx.
|
overrideprotectedvirtual |
Definition at line 424 of file dbsubcomponentcontroller.cxx.
References ID_BROWSER_CLOSE.
const Reference< XConnection > & dbaui::DBSubComponentController::getConnection | ( | ) | const |
gives access to the currently used connection
Definition at line 458 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
|
protected |
Definition at line 544 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
Reference< XModel > dbaui::DBSubComponentController::getDatabaseDocument | ( | ) | const |
Definition at line 513 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
Referenced by getPrivateModel(), getScriptContainer(), and initializeConnection().
const Reference< XPropertySet > & dbaui::DBSubComponentController::getDataSource | ( | ) | const |
Definition at line 503 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
OUString dbaui::DBSubComponentController::getDataSourceName | ( | ) | const |
Definition at line 436 of file dbsubcomponentcontroller.cxx.
References m_pImpl, PROPERTY_NAME(), and sName.
const ::dbtools::SQLExceptionInfo & dbaui::DBSubComponentController::getError | ( | ) | const |
returns the current error
Definition at line 386 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
Reference< XDatabaseMetaData > dbaui::DBSubComponentController::getMetaData | ( | ) | const |
Definition at line 488 of file dbsubcomponentcontroller.cxx.
References DBG_UNHANDLED_EXCEPTION, Exception, isConnected(), and m_pImpl.
Reference< XNumberFormatter > const & dbaui::DBSubComponentController::getNumberFormatter | ( | ) | const |
returns the number formatter
Definition at line 518 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
|
overrideprotectedvirtual |
Definition at line 523 of file dbsubcomponentcontroller.cxx.
References getDatabaseDocument().
Referenced by getTitle().
|
overridevirtual |
Definition at line 549 of file dbsubcomponentcontroller.cxx.
References getDatabaseDocument(), getMutex(), and m_pImpl.
const ::dbtools::DatabaseMetaData & dbaui::DBSubComponentController::getSdbMetaData | ( | ) | const |
provides access to the SDB-level database meta data of the current connection
Definition at line 478 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
|
overridevirtual |
Definition at line 528 of file dbsubcomponentcontroller.cxx.
References getMutex(), and getPrivateModel().
Definition at line 220 of file dbsubcomponentcontroller.cxx.
References aTypes, begin, end, cppu::UnoType< typename T >::get(), m_pImpl, and type.
bool dbaui::DBSubComponentController::hasError | ( | ) | const |
Definition at line 381 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
bool dbaui::DBSubComponentController::haveDataSource | ( | ) | const |
Definition at line 508 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
|
overrideprotectedvirtual |
Definition at line 179 of file dbsubcomponentcontroller.cxx.
References connectionLostMessage(), dbaui::OGenericUnoController::impl_initialize(), initializeConnection(), isConnected(), PROPERTY_ACTIVE_CONNECTION(), and reconnect().
|
protected |
Definition at line 591 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
Referenced by isModified().
|
protectedvirtual |
Definition at line 596 of file dbsubcomponentcontroller.cxx.
References ID_BROWSER_SAVEASDOC, and ID_BROWSER_SAVEDOC.
Referenced by setModified().
|
private |
forces usage of a connection which we do not own
To be used from within XInitialization::initialize, resp. impl_initialize, only.
Definition at line 234 of file dbsubcomponentcontroller.cxx.
References DBG_ASSERT, DBG_UNHANDLED_EXCEPTION, disconnect(), Exception, getDatabaseDocument(), isConnected(), m_pImpl, utl::SharedUNOComponent< css::sdbc::XConnection >::NoTakeOwnership, PROPERTY_NAME(), and SAL_WARN_IF.
Referenced by impl_initialize().
bool dbaui::DBSubComponentController::isConnected | ( | ) | const |
Definition at line 483 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
Referenced by getMetaData(), impl_initialize(), initializeConnection(), and suspend().
bool dbaui::DBSubComponentController::isEditable | ( | ) | const |
Definition at line 468 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
|
overridevirtual |
Definition at line 570 of file dbsubcomponentcontroller.cxx.
References getMutex(), and impl_isModified().
bool dbaui::DBSubComponentController::isReadOnly | ( | ) | const |
Definition at line 463 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
|
protectedvirtual |
called when our connection is being disposed
The default implementation does a reconnect
Definition at line 329 of file dbsubcomponentcontroller.cxx.
References reconnect().
|
overrideprotectedvirtual |
Definition at line 208 of file dbsubcomponentcontroller.cxx.
|
protectedvirtual |
Definition at line 291 of file dbsubcomponentcontroller.cxx.
References Application::CreateMessageDialog(), DBA_RES, m_pImpl, RET_YES, and utl::SharedUNOComponent< css::sdbc::XConnection >::TakeOwnership.
Referenced by impl_initialize(), losingConnection(), and suspend().
|
overridevirtual |
Definition at line 564 of file dbsubcomponentcontroller.cxx.
References getMutex(), and m_pImpl.
void dbaui::DBSubComponentController::setEditable | ( | bool | _bEditable | ) |
Definition at line 473 of file dbsubcomponentcontroller.cxx.
References m_pImpl.
|
overridevirtual |
Definition at line 576 of file dbsubcomponentcontroller.cxx.
References aEvent, getMutex(), impl_onModifyChanged(), and m_pImpl.
Definition at line 396 of file dbsubcomponentcontroller.cxx.
References isConnected(), m_pImpl, and reconnect().
|
private |
Definition at line 68 of file dbsubcomponentcontroller.hxx.
Referenced by addModifyListener(), appendError(), attachModel(), clearError(), disconnect(), displayError(), disposing(), getConnection(), getCurrentStartNumber(), getDatabaseDocument(), getDataSource(), getDataSourceName(), getError(), getMetaData(), getNumberFormatter(), getScriptContainer(), getSdbMetaData(), getTypes(), hasError(), haveDataSource(), impl_isModified(), initializeConnection(), isConnected(), isEditable(), isReadOnly(), queryInterface(), reconnect(), removeModifyListener(), setEditable(), setModified(), and suspend().