diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-30 16:00:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-31 10:43:23 +0100 |
commit | 8de61c9fb6a4c3be54b51c575fcffcec2067e090 (patch) | |
tree | a5e71351f79b88a47ae9400d141a13bcfe906bd9 /dbaccess | |
parent | catch by const reference (diff) | |
download | core-8de61c9fb6a4c3be54b51c575fcffcec2067e090.tar.gz core-8de61c9fb6a4c3be54b51c575fcffcec2067e090.zip |
grabbag of unused code
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index d2ca1ccedc5a..b43aa535bb98 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -2840,143 +2840,6 @@ sal_Bool SbaXDataBrowserController::isValidCursor() const return bIsValid; } -//================================================================== -// LoadFormHelper -//================================================================== - -class LoadFormHelper :public ::cppu::WeakImplHelper2< ::com::sun::star::form::XLoadListener, - XRowSetListener> -{ - enum STATE { STARTED, LOADED, POSITIONED, DISPOSED }; - STATE m_eState; - - Reference< XRowSet > m_xForm; - - ::osl::Mutex m_aAccessSafety; - -public: - LoadFormHelper(const Reference< XRowSet > & _rxForm); - - // ::com::sun::star::form::XLoadListener - virtual void SAL_CALL loaded(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException ); - virtual void SAL_CALL unloaded(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException ); - virtual void SAL_CALL unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException ); - virtual void SAL_CALL reloading(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException ); - virtual void SAL_CALL reloaded(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException ); - - // XRowSetListener - virtual void SAL_CALL cursorMoved(const ::com::sun::star::lang::EventObject& event) throw( RuntimeException ); - virtual void SAL_CALL rowChanged(const ::com::sun::star::lang::EventObject& event) throw( RuntimeException ); - virtual void SAL_CALL rowSetChanged(const ::com::sun::star::lang::EventObject& event) throw( RuntimeException ); - - // ::com::sun::star::lang::XEventListener - virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( RuntimeException ); - - void cancel(); - -protected: - ~LoadFormHelper(); - - void implDispose(); -}; - -DBG_NAME(LoadFormHelper) -//------------------------------------------------------------------------------ -LoadFormHelper::LoadFormHelper(const Reference< XRowSet > & _rxForm) - :m_eState(STARTED) - ,m_xForm(_rxForm) -{ - DBG_CTOR(LoadFormHelper,NULL); - - Reference< ::com::sun::star::form::XLoadable > (m_xForm, UNO_QUERY)->addLoadListener(this); - m_xForm->addRowSetListener(this); -} - -//------------------------------------------------------------------------------ -LoadFormHelper::~LoadFormHelper() -{ - ::osl::MutexGuard aGuard(m_aAccessSafety); - implDispose(); - - DBG_DTOR(LoadFormHelper,NULL); -} - -//------------------------------------------------------------------------------ -void LoadFormHelper::implDispose() -{ - if (DISPOSED != m_eState) - { - - Reference< ::com::sun::star::form::XLoadable > (m_xForm, UNO_QUERY)->removeLoadListener(this); - m_xForm->removeRowSetListener(this); - m_xForm = NULL; - m_eState = DISPOSED; - } -} - -//------------------------------------------------------------------------------ -void SAL_CALL LoadFormHelper::loaded(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException ) -{ - ::osl::MutexGuard aGuard(m_aAccessSafety); - OSL_ENSURE(m_eState == STARTED || m_eState == DISPOSED, "LoadFormHelper::loaded : wrong call !"); - if (m_eState == STARTED) - m_eState = LOADED; -} - -//------------------------------------------------------------------------------ -void SAL_CALL LoadFormHelper::unloaded(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException ) -{ - ::osl::MutexGuard aGuard(m_aAccessSafety); - OSL_FAIL("LoadFormHelper::unloaded : shouldn't be called !"); - implDispose(); -} - -//------------------------------------------------------------------------------ -void SAL_CALL LoadFormHelper::unloading(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException ) -{ -} - -//------------------------------------------------------------------------------ -void SAL_CALL LoadFormHelper::reloading(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException ) -{ -} - -//------------------------------------------------------------------------------ -void SAL_CALL LoadFormHelper::reloaded(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException ) -{ -} - -//------------------------------------------------------------------------------ -void SAL_CALL LoadFormHelper::cursorMoved(const ::com::sun::star::lang::EventObject& /*event*/) throw( RuntimeException ) -{ - ::osl::MutexGuard aGuard(m_aAccessSafety); - if (m_eState == LOADED) - m_eState = POSITIONED; -} - -//------------------------------------------------------------------------------ -void SAL_CALL LoadFormHelper::rowChanged(const ::com::sun::star::lang::EventObject& /*event*/) throw( RuntimeException ) -{ -} - -//------------------------------------------------------------------------------ -void SAL_CALL LoadFormHelper::rowSetChanged(const ::com::sun::star::lang::EventObject& /*event*/) throw( RuntimeException ) -{ -} - -//------------------------------------------------------------------------------ -void SAL_CALL LoadFormHelper::disposing(const ::com::sun::star::lang::EventObject& /*Source*/) throw( RuntimeException ) -{ - ::osl::MutexGuard aGuard(m_aAccessSafety); - implDispose(); -} - -//------------------------------------------------------------------------------ -void LoadFormHelper::cancel() -{ - implDispose(); -} - // ----------------------------------------------------------------------------- sal_Int16 SbaXDataBrowserController::getCurrentColumnPosition() { |