LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dbaui::OTableController Class Referencefinal

#include <TableController.hxx>

Inheritance diagram for dbaui::OTableController:
[legend]
Collaboration diagram for dbaui::OTableController:
[legend]

Public Member Functions

 OTableController (const css::uno::Reference< css::uno::XComponentContext > &_rM)
 
const css::uno::Reference< css::beans::XPropertySet > & getTable () const
 
bool isAddAllowed () const
 
bool isDropAllowed () const
 
bool isAlterAllowed () const
 
bool isAutoIncrementPrimaryKey () const
 
bool isAutoIncrementValueEnabled () const
 
const OUString & getAutoIncrementValue () const
 
virtual void impl_onModifyChanged () override
 
std::vector< std::shared_ptr< OTableRow > > & getRows ()
 
sal_Int32 getFirstEmptyRowPosition ()
 returns the position of the first empty row More...
 
const OTypeInfoMapgetTypeInfo () const
 
TOTypeInfoSP const & getTypeInfo (sal_Int32 _nPos) const
 
TOTypeInfoSP getTypeInfoByType (sal_Int32 _nDataType) const
 
const TOTypeInfoSPgetTypeInfoFallBack () const
 
virtual bool Construct (vcl::Window *pParent) override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual sal_Bool SAL_CALL suspend (sal_Bool bSuspend) override
 
virtual void SAL_CALL disposing () override
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
- Public Member Functions inherited from dbaui::OSingleDocumentController
SfxUndoManagerGetUndoManager () const
 need for undo's and redo's More...
 
void ClearUndoManager ()
 complete clears the Undo/Redo stacks More...
 
void addUndoActionAndInvalidate (std::unique_ptr< SfxUndoAction > pAction)
 addUndoActionAndInvalidate adds an undo action to the undoManager, additionally invalidates the UNDO and REDO slot More...
 
virtual FeatureState GetState (sal_uInt16 nId) const override
 
virtual void Execute (sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 
virtual css::uno::Reference< css::document::XUndoManager > SAL_CALL getUndoManager () override
 

Private Member Functions

void reSyncRows ()
 
void assignTable ()
 
void loadData ()
 
bool checkColumns (bool _bNew)
 
void appendColumns (css::uno::Reference< css::sdbcx::XColumnsSupplier > const &_rxColSup, bool _bNew, bool _bKeyColumns=false)
 
void appendPrimaryKey (css::uno::Reference< css::sdbcx::XKeysSupplier > const &_rxSup, bool _bNew)
 
void alterColumns ()
 
void dropPrimaryKey ()
 
css::uno::Reference< css::container::XNameAccess > getKeyColumns () const
 
OUString createUniqueName (const OUString &_rName)
 
void reload ()
 
virtual void describeSupportedFeatures () override
 
virtual FeatureState GetState (sal_uInt16 nId) const override
 
virtual void Execute (sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 
virtual void losingConnection () override
 
virtual OUString getPrivateTitle () const override
 
void doEditIndexes ()
 
bool doSaveDoc (bool _bSaveAs)
 
virtual ~OTableController () override
 
void startTableListening ()
 
void stopTableListening ()
 
virtual void impl_initialize () override
 

Private Attributes

std::vector< std::shared_ptr< OTableRow > > m_vRowList
 
OTypeInfoMap m_aTypeInfo
 
std::vector< OTypeInfoMap::iterator > m_aTypeInfoIndex
 
css::uno::Reference< css::beans::XPropertySetm_xTable
 
OUString m_sName
 
OUString m_sAutoIncrementValue
 
OUString m_sTypeNames
 
TOTypeInfoSP m_pTypeInfo
 
bool m_bAllowAutoIncrementValue
 
bool m_bNew: 1
 

Additional Inherited Members

- Protected Member Functions inherited from dbaui::OSingleDocumentController
 OSingleDocumentController (const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
 
virtual ~OSingleDocumentController () override
 
virtual void SAL_CALL disposing () override
 

Detailed Description

Definition at line 32 of file TableController.hxx.

Constructor & Destructor Documentation

◆ ~OTableController()

OTableController::~OTableController ( )
overrideprivatevirtual

Definition at line 123 of file TableController.cxx.

References m_aTypeInfo, and m_aTypeInfoIndex.

◆ OTableController()

OTableController::OTableController ( const css::uno::Reference< css::uno::XComponentContext > &  _rM)

Definition at line 112 of file TableController.cxx.

References m_pTypeInfo, m_sTypeNames, and dbaui::TYPE_OTHER.

Member Function Documentation

◆ alterColumns()

void OTableController::alterColumns ( )
private

◆ appendColumns()

void OTableController::appendColumns ( css::uno::Reference< css::sdbcx::XColumnsSupplier > const &  _rxColSup,
bool  _bNew,
bool  _bKeyColumns = false 
)
private

◆ appendPrimaryKey()

void OTableController::appendPrimaryKey ( css::uno::Reference< css::sdbcx::XKeysSupplier > const &  _rxSup,
bool  _bNew 
)
private

Definition at line 695 of file TableController.cxx.

References Any, appendColumns(), i, nCount, and PROPERTY_TYPE().

Referenced by alterColumns(), and doSaveDoc().

◆ assignTable()

void OTableController::assignTable ( )
private

◆ checkColumns()

bool OTableController::checkColumns ( bool  _bNew)
private

◆ Construct()

bool OTableController::Construct ( vcl::Window pParent)
overridevirtual

Definition at line 501 of file TableController.cxx.

◆ createUniqueName()

OUString OTableController::createUniqueName ( const OUString &  _rName)
private

Definition at line 1410 of file TableController.cxx.

References dbaui::OFieldDescription::GetName(), i, m_vRowList, and sName.

Referenced by checkColumns().

◆ describeSupportedFeatures()

void OTableController::describeSupportedFeatures ( )
overrideprivatevirtual

◆ disposing() [1/2]

virtual void SAL_CALL dbaui::OTableController::disposing ( )
overridevirtual

Reimplemented from dbaui::OSingleDocumentController.

◆ disposing() [2/2]

virtual void SAL_CALL dbaui::OTableController::disposing ( const css::lang::EventObject &  Source)
overridevirtual

◆ doEditIndexes()

void OTableController::doEditIndexes ( )
private

◆ doSaveDoc()

bool OTableController::doSaveDoc ( bool  _bSaveAs)
private

◆ dropPrimaryKey()

void OTableController::dropPrimaryKey ( )
private

Definition at line 1261 of file TableController.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, i, m_xTable, PROPERTY_TYPE(), and showError().

Referenced by alterColumns().

◆ Execute()

void OTableController::Execute ( sal_uInt16  nId,
const css::uno::Sequence< css::beans::PropertyValue > &  aArgs 
)
overrideprivatevirtual

◆ getAutoIncrementValue()

const OUString & dbaui::OTableController::getAutoIncrementValue ( ) const
inline

◆ getFirstEmptyRowPosition()

sal_Int32 OTableController::getFirstEmptyRowPosition ( )

returns the position of the first empty row

Definition at line 1466 of file TableController.cxx.

References isAddAllowed(), and m_vRowList.

◆ getImplementationName()

OUString SAL_CALL OTableController::getImplementationName ( )
overridevirtual

Definition at line 102 of file TableController.cxx.

◆ getKeyColumns()

Reference< XNameAccess > OTableController::getKeyColumns ( ) const
private

Definition at line 859 of file TableController.cxx.

References getPrimaryKeyColumns_throw(), and m_xTable.

Referenced by alterColumns(), and loadData().

◆ getPrivateTitle()

OUString OTableController::getPrivateTitle ( ) const
overrideprivatevirtual

◆ getRows()

std::vector< std::shared_ptr< OTableRow > > & dbaui::OTableController::getRows ( )
inline

Definition at line 95 of file TableController.hxx.

References m_vRowList.

Referenced by dbaui::OTableEditorCtrl::OTableEditorCtrl().

◆ GetState()

FeatureState OTableController::GetState ( sal_uInt16  nId) const
overrideprivatevirtual

◆ getSupportedServiceNames()

Sequence< OUString > OTableController::getSupportedServiceNames ( )
overridevirtual

Definition at line 107 of file TableController.cxx.

◆ getTable()

const css::uno::Reference< css::beans::XPropertySet > & dbaui::OTableController::getTable ( ) const
inline

◆ getTypeInfo() [1/2]

const OTypeInfoMap & dbaui::OTableController::getTypeInfo ( ) const
inline

◆ getTypeInfo() [2/2]

TOTypeInfoSP const & dbaui::OTableController::getTypeInfo ( sal_Int32  _nPos) const
inline

Definition at line 102 of file TableController.hxx.

References _nPos, and m_aTypeInfoIndex.

◆ getTypeInfoByType()

TOTypeInfoSP OTableController::getTypeInfoByType ( sal_Int32  _nDataType) const

Definition at line 631 of file TableController.cxx.

References m_aTypeInfo, and dbaui::queryTypeInfoByType().

◆ getTypeInfoFallBack()

const TOTypeInfoSP & dbaui::OTableController::getTypeInfoFallBack ( ) const
inline

Definition at line 105 of file TableController.hxx.

References m_pTypeInfo.

◆ impl_initialize()

void OTableController::impl_initialize ( )
overrideprivatevirtual

◆ impl_onModifyChanged()

void OTableController::impl_onModifyChanged ( )
overridevirtual

Definition at line 589 of file TableController.cxx.

◆ isAddAllowed()

bool OTableController::isAddAllowed ( ) const

◆ isAlterAllowed()

bool OTableController::isAlterAllowed ( ) const

Definition at line 1384 of file TableController.cxx.

References m_xTable.

Referenced by assignTable(), dbaui::OTableEditorCtrl::IsCutAllowed(), loadData(), and reSyncRows().

◆ isAutoIncrementPrimaryKey()

bool OTableController::isAutoIncrementPrimaryKey ( ) const

◆ isAutoIncrementValueEnabled()

bool dbaui::OTableController::isAutoIncrementValueEnabled ( ) const
inline

◆ isDropAllowed()

bool OTableController::isDropAllowed ( ) const

◆ loadData()

void OTableController::loadData ( )
private

◆ losingConnection()

void OTableController::losingConnection ( )
overrideprivatevirtual

Definition at line 608 of file TableController.cxx.

References assignTable(), m_bNew, m_xTable, and stopTableListening().

◆ reload()

void OTableController::reload ( )
private

◆ reSyncRows()

void OTableController::reSyncRows ( )
private

◆ startTableListening()

void OTableController::startTableListening ( )
private

Definition at line 130 of file TableController.cxx.

References m_xTable.

Referenced by assignTable().

◆ stopTableListening()

void OTableController::stopTableListening ( )
private

Definition at line 137 of file TableController.cxx.

References m_xTable.

Referenced by doSaveDoc(), and losingConnection().

◆ suspend()

sal_Bool SAL_CALL OTableController::suspend ( sal_Bool  bSuspend)
overridevirtual

Member Data Documentation

◆ m_aTypeInfo

OTypeInfoMap dbaui::OTableController::m_aTypeInfo
private

◆ m_aTypeInfoIndex

std::vector<OTypeInfoMap::iterator> dbaui::OTableController::m_aTypeInfoIndex
private

Definition at line 37 of file TableController.hxx.

Referenced by getTypeInfo(), impl_initialize(), and ~OTableController().

◆ m_bAllowAutoIncrementValue

bool dbaui::OTableController::m_bAllowAutoIncrementValue
private

Definition at line 46 of file TableController.hxx.

Referenced by impl_initialize(), and isAutoIncrementValueEnabled().

◆ m_bNew

bool dbaui::OTableController::m_bNew
private

◆ m_pTypeInfo

TOTypeInfoSP dbaui::OTableController::m_pTypeInfo
private

Definition at line 44 of file TableController.hxx.

Referenced by getTypeInfoFallBack(), loadData(), and OTableController().

◆ m_sAutoIncrementValue

OUString dbaui::OTableController::m_sAutoIncrementValue
private

Definition at line 42 of file TableController.hxx.

Referenced by getAutoIncrementValue(), and impl_initialize().

◆ m_sName

OUString dbaui::OTableController::m_sName
private

Definition at line 41 of file TableController.hxx.

Referenced by assignTable(), doSaveDoc(), getPrivateTitle(), impl_initialize(), and suspend().

◆ m_sTypeNames

OUString dbaui::OTableController::m_sTypeNames
private

Definition at line 43 of file TableController.hxx.

Referenced by impl_initialize(), and OTableController().

◆ m_vRowList

std::vector< std::shared_ptr<OTableRow> > dbaui::OTableController::m_vRowList
private

◆ m_xTable

css::uno::Reference< css::beans::XPropertySet > dbaui::OTableController::m_xTable
private

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