diff options
Diffstat (limited to 'dbaccess/source/ui/browser')
-rw-r--r-- | dbaccess/source/ui/browser/AsyncronousLink.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 176 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwview.cxx | 34 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dataview.cxx | 22 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbexchange.cxx | 11 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbloader.cxx | 19 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbtreemodel.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbtreeview.cxx | 20 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dbtreeview.hxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dsEntriesNoExp.cxx | 21 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dsbrowserDnD.cxx | 17 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/exsrcbrw.cxx | 40 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/formadapter.cxx | 267 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 140 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 95 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbamultiplex.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 146 |
17 files changed, 202 insertions, 825 deletions
diff --git a/dbaccess/source/ui/browser/AsyncronousLink.cxx b/dbaccess/source/ui/browser/AsyncronousLink.cxx index a2c89691458f..68b554eda569 100644 --- a/dbaccess/source/ui/browser/AsyncronousLink.cxx +++ b/dbaccess/source/ui/browser/AsyncronousLink.cxx @@ -21,12 +21,9 @@ #include <vcl/svapp.hxx> #include <tools/debug.hxx> -//================================================================== -//= OAsyncronousLink -//================================================================== +// OAsyncronousLink using namespace dbaui; DBG_NAME(OAsyncronousLink) -//------------------------------------------------------------------ OAsyncronousLink::OAsyncronousLink( const Link& _rHandler ) :m_aHandler(_rHandler) ,m_aEventSafety() @@ -36,7 +33,6 @@ OAsyncronousLink::OAsyncronousLink( const Link& _rHandler ) DBG_CTOR(OAsyncronousLink,NULL); } -//------------------------------------------------------------------ OAsyncronousLink::~OAsyncronousLink() { { @@ -56,8 +52,6 @@ OAsyncronousLink::~OAsyncronousLink() DBG_DTOR(OAsyncronousLink,NULL); } - -//------------------------------------------------------------------ void OAsyncronousLink::Call( void* _pArgument ) { ::osl::MutexGuard aEventGuard( m_aEventSafety ); @@ -66,7 +60,6 @@ void OAsyncronousLink::Call( void* _pArgument ) m_nEventId = Application::PostUserEvent( LINK( this, OAsyncronousLink, OnAsyncCall ), _pArgument ); } -//------------------------------------------------------------------ void OAsyncronousLink::CancelCall() { ::osl::MutexGuard aEventGuard( m_aEventSafety ); @@ -75,7 +68,6 @@ void OAsyncronousLink::CancelCall() m_nEventId = 0; } -//------------------------------------------------------------------ IMPL_LINK(OAsyncronousLink, OnAsyncCall, void*, _pArg) { { diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 74112417c478..249d0d1ae14d 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -122,14 +122,10 @@ using namespace ::svt; #define DO_SAFE( action, message ) try { action; } catch(Exception&) { SAL_WARN("dbaccess.ui",message); } ; -//.................................................................. namespace dbaui { -//.................................................................. -//================================================================== // OParameterContinuation -//================================================================== class OParameterContinuation : public OInteraction< XInteractionSupplyParameters > { Sequence< PropertyValue > m_aValues; @@ -143,14 +139,11 @@ public: virtual void SAL_CALL setParameters( const Sequence< PropertyValue >& _rValues ) throw(RuntimeException); }; -//------------------------------------------------------------------ void SAL_CALL OParameterContinuation::setParameters( const Sequence< PropertyValue >& _rValues ) throw(RuntimeException) { m_aValues = _rValues; } - -//============================================================================== // a helper class implementing a runtime::XFormController, will be aggregated by SbaXDataBrowserController // (we can't derive from XFormController as it's base class is XTabController and the XTabController::getModel collides // with the XController::getModel implemented in our base class SbaXDataBrowserController) @@ -247,9 +240,7 @@ protected: ~FormControllerImpl(); }; - DBG_NAME(FormControllerImpl) -//------------------------------------------------------------------ SbaXDataBrowserController::FormControllerImpl::FormControllerImpl(SbaXDataBrowserController* _pOwner) :m_aActivateListeners(_pOwner->getMutex()) ,m_pOwner(_pOwner) @@ -259,221 +250,186 @@ SbaXDataBrowserController::FormControllerImpl::FormControllerImpl(SbaXDataBrowse OSL_ENSURE(m_pOwner, "SbaXDataBrowserController::FormControllerImpl::FormControllerImpl : invalid Owner !"); } -//------------------------------------------------------------------ SbaXDataBrowserController::FormControllerImpl::~FormControllerImpl() { DBG_DTOR(FormControllerImpl,NULL); } -//------------------------------------------------------------------ Reference< runtime::XFormOperations > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getFormOperations() throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::getFormOperations: not supported!" ); return NULL; } -//------------------------------------------------------------------ Reference< ::com::sun::star::awt::XControl > SbaXDataBrowserController::FormControllerImpl::getCurrentControl(void) throw( RuntimeException ) { return m_pOwner->getBrowserView() ? m_pOwner->getBrowserView()->getGridControl() : Reference< ::com::sun::star::awt::XControl > (); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addActivateListener(const Reference< ::com::sun::star::form::XFormControllerListener > & l) throw( RuntimeException ) { m_aActivateListeners.addInterface(l); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeActivateListener(const Reference< ::com::sun::star::form::XFormControllerListener > & l) throw( RuntimeException ) { m_aActivateListeners.removeInterface(l); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addChildController( const Reference< runtime::XFormController >& /*_ChildController*/ ) throw( RuntimeException, IllegalArgumentException ) { // not supported throw IllegalArgumentException( OUString(), *this, 1 ); } -//------------------------------------------------------------------ Reference< runtime::XFormControllerContext > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getContext() throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::getContext: no support!!" ); return NULL; } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContext( const Reference< runtime::XFormControllerContext >& /*_context*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::setContext: no support!!" ); } -//------------------------------------------------------------------ Reference< XInteractionHandler > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getInteractionHandler() throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!!" ); return NULL; } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setInteractionHandler( const Reference< XInteractionHandler >& /*_interactionHandler*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::setInteractionHandler: no support!!" ); } -//------------------------------------------------------------------ Reference< XInterface > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getParent( ) throw (RuntimeException) { // don't have any parent form controllers return NULL; } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setParent( const Reference< XInterface >& /*Parent*/ ) throw (NoSupportException, RuntimeException) { throw NoSupportException( OUString(), *this ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::dispose( ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::dispose: no, you do *not* want to do this!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addEventListener( const Reference< XEventListener >& /*xListener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addEventListener: no support!!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeEventListener( const Reference< XEventListener >& /*aListener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeEventListener: no support!!" ); } -//------------------------------------------------------------------ ::sal_Int32 SAL_CALL SbaXDataBrowserController::FormControllerImpl::getCount( ) throw (RuntimeException) { // no sub controllers, never return 0; } -//------------------------------------------------------------------ Any SAL_CALL SbaXDataBrowserController::FormControllerImpl::getByIndex( ::sal_Int32 /*Index*/ ) throw (IndexOutOfBoundsException, WrappedTargetException, RuntimeException) { // no sub controllers, never throw IndexOutOfBoundsException( OUString(), *this ); } -//------------------------------------------------------------------ Type SAL_CALL SbaXDataBrowserController::FormControllerImpl::getElementType( ) throw (RuntimeException) { return ::cppu::UnoType< runtime::XFormController >::get(); } -//------------------------------------------------------------------ ::sal_Bool SAL_CALL SbaXDataBrowserController::FormControllerImpl::hasElements( ) throw (RuntimeException) { // no sub controllers, never return false; } -//------------------------------------------------------------------ Reference< XEnumeration > SAL_CALL SbaXDataBrowserController::FormControllerImpl::createEnumeration( ) throw (RuntimeException) { return new ::comphelper::OEnumerationByIndex( this ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addModifyListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeModifyListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::addParameterListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException) { SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::FormControllerImpl::removeParameterListener: no support!" ); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setMode( const OUString& _rMode ) throw (NoSupportException, RuntimeException) { if ( !supportsMode( _rMode ) ) throw NoSupportException(); } -//------------------------------------------------------------------ OUString SAL_CALL SbaXDataBrowserController::FormControllerImpl::getMode( ) throw (RuntimeException) { return OUString( "DataMode" ); } -//------------------------------------------------------------------ Sequence< OUString > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getSupportedModes( ) throw (RuntimeException) { Sequence< OUString > aModes(1); @@ -481,31 +437,26 @@ Sequence< OUString > SAL_CALL SbaXDataBrowserController::FormControllerImpl::get return aModes; } -//------------------------------------------------------------------ ::sal_Bool SAL_CALL SbaXDataBrowserController::FormControllerImpl::supportsMode( const OUString& aMode ) throw (RuntimeException) { return aMode.compareToAscii( "DataMode" ) == 0; } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setModel(const Reference< ::com::sun::star::awt::XTabControllerModel > & /*Model*/) throw( RuntimeException ) { SAL_WARN("dbaccess.ui","SbaXDataBrowserController::FormControllerImpl::setModel : invalid call, can't change my model !"); } -//------------------------------------------------------------------ Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getModel(void) throw( RuntimeException ) { return Reference< XTabControllerModel >(m_pOwner->getRowSet(), UNO_QUERY); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContainer(const Reference< ::com::sun::star::awt::XControlContainer > & /*_Container*/) throw( RuntimeException ) { SAL_WARN("dbaccess.ui","SbaXDataBrowserController::FormControllerImpl::setContainer : invalid call, can't change my container !"); } -//------------------------------------------------------------------ Reference< ::com::sun::star::awt::XControlContainer > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getContainer(void) throw( RuntimeException ) { if (m_pOwner->getBrowserView()) @@ -513,7 +464,6 @@ Reference< ::com::sun::star::awt::XControlContainer > SAL_CALL SbaXDataBrowserC return Reference< ::com::sun::star::awt::XControlContainer > (); } -//------------------------------------------------------------------ Sequence< Reference< ::com::sun::star::awt::XControl > > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getControls(void) throw( RuntimeException ) { if (m_pOwner->getBrowserView()) @@ -524,48 +474,39 @@ Sequence< Reference< ::com::sun::star::awt::XControl > > SAL_CALL SbaXDataBrowse return Sequence< Reference< ::com::sun::star::awt::XControl > >(); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::autoTabOrder(void) throw( RuntimeException ) { SAL_WARN("dbaccess.ui","SbaXDataBrowserController::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) !"); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::activateTabOrder(void) throw( RuntimeException ) { SAL_WARN("dbaccess.ui","SbaXDataBrowserController::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) !"); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::activateFirst(void) throw( RuntimeException ) { if (m_pOwner->getBrowserView()) m_pOwner->getBrowserView()->getVclControl()->ActivateCell(); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::activateLast(void) throw( RuntimeException ) { if (m_pOwner->getBrowserView()) m_pOwner->getBrowserView()->getVclControl()->ActivateCell(); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::frameAction(const ::com::sun::star::frame::FrameActionEvent& /*aEvent*/) throw( RuntimeException ) { } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::disposing(const ::com::sun::star::lang::EventObject& /*Source*/) throw( RuntimeException ) { // nothing to do // we don't add ourself as listener to any broadcasters, so we are not resposible for removing us } -//================================================================== -//= SbaXDataBrowserController -//================================================================== -//------------------------------------------------------------------ +// SbaXDataBrowserController Sequence< Type > SAL_CALL SbaXDataBrowserController::getTypes( ) throw (RuntimeException) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::getTypes" ); @@ -575,7 +516,6 @@ Sequence< Type > SAL_CALL SbaXDataBrowserController::getTypes( ) throw (Runtime ); } -//------------------------------------------------------------------ Sequence< sal_Int8 > SAL_CALL SbaXDataBrowserController::getImplementationId( ) throw (RuntimeException) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::getImplementationId" ); @@ -592,7 +532,6 @@ Sequence< sal_Int8 > SAL_CALL SbaXDataBrowserController::getImplementationId( ) return pId->getImplementationId(); } -//------------------------------------------------------------------ Any SAL_CALL SbaXDataBrowserController::queryInterface(const Type& _rType) throw (RuntimeException) { // check for our additional interfaces @@ -607,7 +546,6 @@ Any SAL_CALL SbaXDataBrowserController::queryInterface(const Type& _rType) throw } DBG_NAME(SbaXDataBrowserController) -//------------------------------------------------------------------------------ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< ::com::sun::star::uno::XComponentContext >& _rM) :SbaXDataBrowserController_Base(_rM) ,m_nRowSetPrivileges(0) @@ -638,7 +576,6 @@ SbaXDataBrowserController::SbaXDataBrowserController(const Reference< ::com::sun m_aInvalidateClipboard.SetTimeout(300); } -//------------------------------------------------------------------------------ SbaXDataBrowserController::~SbaXDataBrowserController() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::~SbaXDataBrowserController" ); @@ -653,7 +590,6 @@ SbaXDataBrowserController::~SbaXDataBrowserController() DBG_DTOR(SbaXDataBrowserController,NULL); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::startFrameListening( const Reference< XFrame >& _rxFrame ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::startFrameListening" ); @@ -667,7 +603,6 @@ void SbaXDataBrowserController::startFrameListening( const Reference< XFrame >& _rxFrame->addFrameActionListener( xAggListener ); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::stopFrameListening( const Reference< XFrame >& _rxFrame ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::stopFrameListening" ); @@ -681,7 +616,6 @@ void SbaXDataBrowserController::stopFrameListening( const Reference< XFrame >& _ _rxFrame->removeFrameActionListener( xAggListener ); } -// ----------------------------------------------------------------------------- void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _rxLoadable ) { m_bLoadCanceled = sal_False; @@ -692,7 +626,6 @@ void SbaXDataBrowserController::onStartLoading( const Reference< XLoadable >& _r xWarnings->clearWarnings(); } -// ----------------------------------------------------------------------------- void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLExceptionInfo& _rError ) { ::connectivity::SQLError aError( getORB() ); @@ -704,7 +637,6 @@ void SbaXDataBrowserController::impl_checkForCannotSelectUnfiltered( const SQLEx } } -// ----------------------------------------------------------------------------- sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _rxLoadable ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::reloadForm" ); @@ -765,11 +697,9 @@ sal_Bool SbaXDataBrowserController::reloadForm( const Reference< XLoadable >& _r return _rxLoadable->isLoaded(); } -// ----------------------------------------------------------------------------- void SbaXDataBrowserController::initFormatter() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::initFormatter" ); - // --------------------------------------------------------------- // create a formatter working with the connections format supplier Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(::dbtools::getNumberFormats(::dbtools::getConnection(m_xRowSet), sal_True, getORB())); @@ -783,7 +713,7 @@ void SbaXDataBrowserController::initFormatter() else // clear the formatter m_xFormatter = NULL; } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::describeSupportedFeatures() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::describeSupportedFeatures" ); @@ -807,11 +737,10 @@ void SbaXDataBrowserController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:FormSlots/deleteRecord", SID_FM_DELETEROWS, CommandGroup::EDIT ); implDescribeSupportedFeature( ".uno:FormSlots/insertRecord", ID_BROWSER_INSERT_ROW, CommandGroup::INSERT ); } -//------------------------------------------------------------------------------ + sal_Bool SbaXDataBrowserController::Construct(Window* pParent) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::Construct" ); - // --------------------------------------------- // create/initialize the form and the grid model m_xRowSet = CreateForm(); if (!m_xRowSet.is()) @@ -830,7 +759,6 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) // set the formatter if available initFormatter(); - // --------------------------------------------------------------- // we want to have a grid with a "flat" border Reference< XPropertySet > xGridSet(m_xGridModel, UNO_QUERY); @@ -845,7 +773,6 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) xNameCont->insertByName(OUString(sText), makeAny(m_xGridModel)); } - // --------------- // create the view setView( * new UnoDataBrowserView( pParent, *this, getORB() ) ); if (!getBrowserView()) @@ -890,7 +817,6 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) OSL_ENSURE(pVclGrid, "SbaXDataBrowserController::Construct : have no VCL control !"); pVclGrid->SetMasterListener(this); - // -------------------------- // add listeners ... // ... to the form model @@ -920,31 +846,28 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) addModelListeners(getControlModel()); addControlListeners(getBrowserView()->getGridControl()); - // ------------- // load the form return LoadForm(); } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::LoadForm() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::LoadForm" ); reloadForm( m_xLoadable ); return sal_True; } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::AddColumnListener(const Reference< XPropertySet > & /*xCol*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::AddColumnListener" ); // we're not interested in any column properties ... } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::RemoveColumnListener(const Reference< XPropertySet > & /*xCol*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::RemoveColumnListener" ); } -//------------------------------------------------------------------------------ + Reference< XRowSet > SbaXDataBrowserController::CreateForm() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CreateForm" ); @@ -953,7 +876,6 @@ Reference< XRowSet > SbaXDataBrowserController::CreateForm() UNO_QUERY); } -//------------------------------------------------------------------------------ Reference< ::com::sun::star::form::XFormComponent > SbaXDataBrowserController::CreateGridModel() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CreateGridModel" ); @@ -962,7 +884,6 @@ Reference< ::com::sun::star::form::XFormComponent > SbaXDataBrowserController:: UNO_QUERY); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::addModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::addModelListeners" ); @@ -979,7 +900,6 @@ void SbaXDataBrowserController::addModelListeners(const Reference< ::com::sun::s xReset->addResetListener((::com::sun::star::form::XResetListener*)this); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::removeModelListeners(const Reference< XControlModel > & _xGridControlModel) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::removeModelListeners" ); @@ -1004,7 +924,6 @@ void SbaXDataBrowserController::removeModelListeners(const Reference< XControlMo xReset->removeResetListener( this ); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::addControlListeners(const Reference< ::com::sun::star::awt::XControl > & _xGridControl) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::addControlListeners" ); @@ -1024,7 +943,6 @@ void SbaXDataBrowserController::addControlListeners(const Reference< ::com::sun: xWindow->addFocusListener(this); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::removeControlListeners(const Reference< ::com::sun::star::awt::XControl > & _xGridControl) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::removeControlListeners" ); @@ -1041,7 +959,6 @@ void SbaXDataBrowserController::removeControlListeners(const Reference< ::com::s xWindow->removeFocusListener(this); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::focusGained(const FocusEvent& /*e*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::focusGained" ); @@ -1052,7 +969,6 @@ void SAL_CALL SbaXDataBrowserController::focusGained(const FocusEvent& /*e*/) th static_cast<XFormControllerListener*>(aIter.next())->formActivated(aEvt); } -//------------------------------------------------------------------ void SAL_CALL SbaXDataBrowserController::focusLost(const FocusEvent& e) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::focusLost" ); @@ -1087,21 +1003,18 @@ void SAL_CALL SbaXDataBrowserController::focusLost(const FocusEvent& e) throw( R SAL_WARN("dbaccess.ui", "SbaXDataBrowserController::focusLost : why is my control not commitable ?"); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposingGridControl(const ::com::sun::star::lang::EventObject& /*Source*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposingGridControl" ); removeControlListeners(getBrowserView()->getGridControl()); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposingGridModel(const ::com::sun::star::lang::EventObject& /*Source*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposingGridModel" ); removeModelListeners(getControlModel()); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposingFormModel(const ::com::sun::star::lang::EventObject& Source) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposingFormModel" ); @@ -1130,14 +1043,12 @@ void SbaXDataBrowserController::disposingFormModel(const ::com::sun::star::lang: xFormParameter->removeParameterListener((::com::sun::star::form::XDatabaseParameterListener*)this); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposingColumnModel(const ::com::sun::star::lang::EventObject& Source) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposingColumnModel" ); RemoveColumnListener(Reference< XPropertySet > (Source.Source, UNO_QUERY)); } -// ------------------------------------------------------------------------- void SbaXDataBrowserController::disposing(const EventObject& Source) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::disposing" ); @@ -1178,7 +1089,6 @@ void SbaXDataBrowserController::disposing(const EventObject& Source) throw( Runt SbaXDataBrowserController_Base::OGenericUnoController::disposing( Source ); } -// ----------------------------------------------------------------------- void SAL_CALL SbaXDataBrowserController::setIdentifier( const OUString& _Identifier ) throw (RuntimeException) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::setIdentifier" ); @@ -1186,7 +1096,6 @@ void SAL_CALL SbaXDataBrowserController::setIdentifier( const OUString& _Identif m_sModuleIdentifier = _Identifier; } -// ----------------------------------------------------------------------- OUString SAL_CALL SbaXDataBrowserController::getIdentifier( ) throw (RuntimeException) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::getIdentifier" ); @@ -1194,7 +1103,6 @@ OUString SAL_CALL SbaXDataBrowserController::getIdentifier( ) throw (RuntimeExc return m_sModuleIdentifier; } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) throw ( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::propertyChange" ); @@ -1222,7 +1130,6 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t InvalidateAll(); } - if (evt.PropertyName.equals(PROPERTY_FILTER)) { InvalidateFeature(ID_BROWSER_REMOVEFILTER); @@ -1247,14 +1154,12 @@ void SbaXDataBrowserController::propertyChange(const PropertyChangeEvent& evt) t } } -//------------------------------------------------------------------------ void SbaXDataBrowserController::modified(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::modified" ); setCurrentModified( sal_True ); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::elementInserted(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::elementInserted" ); @@ -1265,7 +1170,6 @@ void SbaXDataBrowserController::elementInserted(const ::com::sun::star::containe AddColumnListener(xNewColumn); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::elementRemoved(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::elementRemoved" ); @@ -1276,7 +1180,6 @@ void SbaXDataBrowserController::elementRemoved(const ::com::sun::star::container RemoveColumnListener(xOldColumn); } -// ----------------------------------------------------------------------- void SbaXDataBrowserController::elementReplaced(const ::com::sun::star::container::ContainerEvent& evt) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::elementReplaced" ); @@ -1291,7 +1194,6 @@ void SbaXDataBrowserController::elementReplaced(const ::com::sun::star::containe AddColumnListener(xNewColumn); } -// ----------------------------------------------------------------------- sal_Bool SbaXDataBrowserController::suspend(sal_Bool /*bSuspend*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::suspend" ); @@ -1303,7 +1205,7 @@ sal_Bool SbaXDataBrowserController::suspend(sal_Bool /*bSuspend*/) throw( Runtim sal_Bool bSuccess = SaveModified(); return bSuccess; } -// ----------------------------------------------------------------------- + void SbaXDataBrowserController::disposing() { // the base class @@ -1370,7 +1272,7 @@ void SbaXDataBrowserController::disposing() m_xParser.clear(); // don't dispose, just reset - it's owned by the RowSet } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::frameAction" ); @@ -1408,7 +1310,6 @@ void SbaXDataBrowserController::frameAction(const ::com::sun::star::frame::Frame } } -//------------------------------------------------------------------------------ IMPL_LINK( SbaXDataBrowserController, OnAsyncDisplayError, void*, /* _pNotInterestedIn */ ) { if ( m_aCurrentError.isValid() ) @@ -1419,7 +1320,6 @@ IMPL_LINK( SbaXDataBrowserController, OnAsyncDisplayError, void*, /* _pNotIntere return 0L; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::errorOccured(const ::com::sun::star::sdb::SQLErrorEvent& aEvent) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::errorOccurred" ); @@ -1441,7 +1341,6 @@ void SbaXDataBrowserController::errorOccured(const ::com::sun::star::sdb::SQLErr } } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::form::DatabaseParameterEvent& aEvent) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::approveParameter" ); @@ -1518,15 +1417,12 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for return sal_True; } - -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::approveReset(const ::com::sun::star::lang::EventObject& /*rEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::approveReset" ); return sal_True; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::resetted(const ::com::sun::star::lang::EventObject& rEvent) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::resetted" ); @@ -1535,7 +1431,6 @@ void SbaXDataBrowserController::resetted(const ::com::sun::star::lang::EventObje setCurrentModified( sal_False ); } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::confirmDelete(const ::com::sun::star::sdb::RowChangeEvent& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::confirmDelete" ); @@ -1544,7 +1439,7 @@ sal_Bool SbaXDataBrowserController::confirmDelete(const ::com::sun::star::sdb::R return sal_True; } -//------------------------------------------------------------------------------ + FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::GetState" ); @@ -1771,7 +1666,6 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const return aReturn; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::applyParserOrder(const OUString& _rOldOrder,const Reference< XSingleSelectQueryComposer >& _xParser) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::applyParserOrder" ); @@ -1813,7 +1707,6 @@ void SbaXDataBrowserController::applyParserOrder(const OUString& _rOldOrder,cons setCurrentColumnPosition(nPos); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, sal_Bool _bOldFilterApplied,const ::OUString& _sOldHaving,const Reference< XSingleSelectQueryComposer >& _xParser) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::applyParserFilter" ); @@ -1862,7 +1755,6 @@ void SbaXDataBrowserController::applyParserFilter(const OUString& _rOldFilter, s setCurrentColumnPosition(nPos); } -//------------------------------------------------------------------------------ Reference< XSingleSelectQueryComposer > SbaXDataBrowserController::createParser_nothrow() { Reference< XSingleSelectQueryComposer > xComposer; @@ -1906,7 +1798,7 @@ Reference< XSingleSelectQueryComposer > SbaXDataBrowserController::createParser_ } return xComposer; } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::ExecuteFilterSortCrit" ); @@ -1970,7 +1862,6 @@ void SbaXDataBrowserController::ExecuteFilterSortCrit(sal_Bool bFilter) ::comphelper::disposeComponent(xParser); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::ExecuteSearch() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::ExecuteSearch" ); @@ -2029,7 +1920,6 @@ void SbaXDataBrowserController::ExecuteSearch() xModelSet->setPropertyValue("CursorColor", Any()); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< PropertyValue >& _rArgs) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::Execute" ); @@ -2330,7 +2220,6 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property } } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SaveModified" ); @@ -2381,7 +2270,6 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) return bResult; } -//------------------------------------------------------------------------------ sal_Bool SbaXDataBrowserController::CommitCurrent() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CommitCurrent" ); @@ -2403,7 +2291,6 @@ sal_Bool SbaXDataBrowserController::CommitCurrent() return sal_True; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::setCurrentModified( sal_Bool _bSet ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::setCurrentModified" ); @@ -2412,14 +2299,12 @@ void SbaXDataBrowserController::setCurrentModified( sal_Bool _bSet ) InvalidateFeature( ID_BROWSER_UNDORECORD ); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::RowChanged() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::RowChanged" ); setCurrentModified( sal_False ); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::ColumnChanged() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::ColumnChanged" ); @@ -2433,14 +2318,12 @@ void SbaXDataBrowserController::ColumnChanged() setCurrentModified( sal_False ); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::SelectionChanged() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SelectionChanged" ); // not interested in } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::CellActivated() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CellActivated" ); @@ -2448,7 +2331,6 @@ void SbaXDataBrowserController::CellActivated() OnInvalidateClipboard( NULL ); } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::CellDeactivated() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::CellDeactivated" ); @@ -2456,14 +2338,12 @@ void SbaXDataBrowserController::CellDeactivated() OnInvalidateClipboard( NULL ); } -//------------------------------------------------------------------------------ IMPL_LINK_NOARG(SbaXDataBrowserController, OnClipboardChanged) { SolarMutexGuard aGuard; return OnInvalidateClipboard( NULL ); } -//------------------------------------------------------------------------------ IMPL_LINK(SbaXDataBrowserController, OnInvalidateClipboard, AutoTimer*, _pTimer) { InvalidateFeature(ID_BROWSER_CUT); @@ -2480,7 +2360,6 @@ IMPL_LINK(SbaXDataBrowserController, OnInvalidateClipboard, AutoTimer*, _pTimer) return 0L; } -// ------------------------------------------------------------------------- Reference< XPropertySet > SbaXDataBrowserController::getBoundField(sal_uInt16 nViewPos) const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::SaveData" ); @@ -2508,7 +2387,6 @@ Reference< XPropertySet > SbaXDataBrowserController::getBoundField(sal_uInt16 n return xEmptyReturn; } -//------------------------------------------------------------------------------ IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext*, pContext) { Reference< ::com::sun::star::container::XIndexAccess > xPeerContainer(getBrowserView()->getGridControl(), UNO_QUERY); @@ -2555,7 +2433,6 @@ IMPL_LINK(SbaXDataBrowserController, OnSearchContextRequest, FmSearchContext*, p return pContext->arrFields.size(); } -//------------------------------------------------------------------------------ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pInfo) { Reference< ::com::sun::star::sdbcx::XRowLocate > xCursor(getRowSet(), UNO_QUERY); @@ -2593,7 +2470,6 @@ IMPL_LINK(SbaXDataBrowserController, OnFoundData, FmFoundRecordInformation*, pIn return 0; } -//------------------------------------------------------------------------------ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformation*, pInfo) { Reference< ::com::sun::star::sdbcx::XRowLocate > xCursor(getRowSet(), UNO_QUERY); @@ -2626,7 +2502,6 @@ IMPL_LINK(SbaXDataBrowserController, OnCanceledNotFound, FmFoundRecordInformatio return 0L; } -//------------------------------------------------------------------------------ IMPL_LINK_NOARG(SbaXDataBrowserController, OnAsyncGetCellFocus) { SbaGridControl* pVclGrid = getBrowserView() ? getBrowserView()->getVclControl() : NULL; @@ -2643,7 +2518,6 @@ IMPL_LINK_NOARG(SbaXDataBrowserController, OnAsyncGetCellFocus) return 0L; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::criticalFail() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::criticalFail" ); @@ -2651,7 +2525,6 @@ void SbaXDataBrowserController::criticalFail() m_nRowSetPrivileges = 0; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::LoadFinished(sal_Bool /*bWasSynch*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::LoadFinished" ); @@ -2670,26 +2543,22 @@ void SbaXDataBrowserController::LoadFinished(sal_Bool /*bWasSynch*/) DBG_UNHANDLED_EXCEPTION(); } - // -------------------------------- // switch the control to alive mode getBrowserView()->getGridControl()->setDesignMode(sal_False); - // ------------------------------- initializeParser(); - // ------------------------------- InvalidateAll(); m_aAsyncGetCellFocus.Call(); } } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::initializeParser() const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::initializeParser" ); if ( !m_xParser.is() ) { - // ---------------------------------------------- // create a parser (needed for filtering/sorting) try { @@ -2708,7 +2577,7 @@ void SbaXDataBrowserController::initializeParser() const } } } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::loaded(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::loaded" ); @@ -2716,14 +2585,12 @@ void SbaXDataBrowserController::loaded(const EventObject& /*aEvent*/) throw( Run // we're loading within an separate thread and have a handling for it's "finished event" } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::unloading(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::unloading" ); // not interested in } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::unloaded(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::unloaded" ); @@ -2736,14 +2603,12 @@ void SbaXDataBrowserController::unloaded(const EventObject& /*aEvent*/) throw( R // bound-field-dependent slots .... } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::reloading(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::reloading" ); // not interested in } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::reloaded(const EventObject& /*aEvent*/) throw( RuntimeException ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::reloaded" ); @@ -2754,7 +2619,7 @@ void SbaXDataBrowserController::reloaded(const EventObject& /*aEvent*/) throw( R // the one we're interested in) we give them time to do what they want to before invalidating our // bound-field-dependent slots .... } -//------------------------------------------------------------------------------ + void SbaXDataBrowserController::enterFormAction() { if ( !m_nFormActionNestingLevel ) @@ -2764,7 +2629,6 @@ void SbaXDataBrowserController::enterFormAction() ++m_nFormActionNestingLevel; } -//------------------------------------------------------------------------------ void SbaXDataBrowserController::leaveFormAction() { OSL_ENSURE( m_nFormActionNestingLevel > 0, "SbaXDataBrowserController::leaveFormAction : invalid call !" ); @@ -2777,14 +2641,12 @@ void SbaXDataBrowserController::leaveFormAction() m_aAsyncDisplayError.Call(); } -// ------------------------------------------------------------------------- sal_Bool SbaXDataBrowserController::isLoaded() const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::isLoaded" ); return m_xLoadable.is() && m_xLoadable->isLoaded(); } -// ------------------------------------------------------------------------- sal_Bool SbaXDataBrowserController::isValidCursor() const { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::isValidCursor" ); @@ -2807,7 +2669,6 @@ sal_Bool SbaXDataBrowserController::isValidCursor() const return bIsValid; } -// ----------------------------------------------------------------------------- sal_Int16 SbaXDataBrowserController::getCurrentColumnPosition() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::getCurrentColumnPosition" ); @@ -2821,7 +2682,7 @@ sal_Int16 SbaXDataBrowserController::getCurrentColumnPosition() catch(Exception&) {} return nViewPos; } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::setCurrentColumnPosition( sal_Int16 _nPos ) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::setCurrentColumnPosition" ); @@ -2833,7 +2694,7 @@ void SbaXDataBrowserController::setCurrentColumnPosition( sal_Int16 _nPos ) } catch(Exception&) {} } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::BeforeDrop() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::BeforeDrop" ); @@ -2841,7 +2702,7 @@ void SbaXDataBrowserController::BeforeDrop() if (xFormError.is()) xFormError->removeSQLErrorListener((::com::sun::star::sdb::XSQLErrorListener*)this); } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::AfterDrop() { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::AfterDrop" ); @@ -2849,7 +2710,7 @@ void SbaXDataBrowserController::AfterDrop() if (xFormError.is()) xFormError->addSQLErrorListener((::com::sun::star::sdb::XSQLErrorListener*)this); } -// ----------------------------------------------------------------------------- + void SbaXDataBrowserController::addColumnListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::addColumnListeners" ); @@ -2865,14 +2726,13 @@ void SbaXDataBrowserController::addColumnListeners(const Reference< ::com::sun:: } } } -// ----------------------------------------------------------------------------- + sal_Bool SbaXDataBrowserController::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & /*xGrid*/) { SAL_INFO("dbaccess.ui", "SbaXDataBrowserController::InitializeGridModel" ); return sal_True; } -//.................................................................. + } // namespace dbaui -//.................................................................. /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index fa47c37ba7e5..488142c4f2ef 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "brwctrlr.hxx" #include "brwview.hxx" #include "sbagrid.hxx" @@ -32,7 +31,6 @@ #include "UITools.hxx" #include <osl/diagnose.h> - using namespace dbaui; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; @@ -41,7 +39,6 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; using namespace ::com::sun::star::lang; - namespace { sal_Bool isGrabVclControlFocusAllowed(const UnoDataBrowserView* _pView) @@ -64,12 +61,10 @@ namespace return bGrabFocus; } } -//================================================================== -//= UnoDataBrowserView -//================================================================== + +// UnoDataBrowserView DBG_NAME(UnoDataBrowserView) -// ------------------------------------------------------------------------- UnoDataBrowserView::UnoDataBrowserView( Window* pParent, IController& _rController, const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext) @@ -82,7 +77,7 @@ UnoDataBrowserView::UnoDataBrowserView( Window* pParent, DBG_CTOR(UnoDataBrowserView,NULL); } -// ------------------------------------------------------------------------- + void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XControlModel >& xModel) { try @@ -120,7 +115,7 @@ void UnoDataBrowserView::Construct(const Reference< ::com::sun::star::awt::XCont throw; } } -// ------------------------------------------------------------------------- + UnoDataBrowserView::~UnoDataBrowserView() { { @@ -145,7 +140,7 @@ UnoDataBrowserView::~UnoDataBrowserView() DBG_DTOR(UnoDataBrowserView,NULL); } -// ----------------------------------------------------------------------------- + IMPL_LINK( UnoDataBrowserView, SplitHdl, void*, /*NOINTERESTEDIN*/ ) { long nYPos = m_pSplitter->GetPosPixel().Y(); @@ -154,14 +149,14 @@ IMPL_LINK( UnoDataBrowserView, SplitHdl, void*, /*NOINTERESTEDIN*/ ) return 0L; } -// ------------------------------------------------------------------------- + void UnoDataBrowserView::setSplitter(Splitter* _pSplitter) { m_pSplitter = _pSplitter; m_pSplitter->SetSplitHdl( LINK( this, UnoDataBrowserView, SplitHdl ) ); LINK( this, UnoDataBrowserView, SplitHdl ).Call(m_pSplitter); } -// ------------------------------------------------------------------------- + void UnoDataBrowserView::setTreeView(DBTreeView* _pTreeView) { if (m_pTreeView != _pTreeView) @@ -174,7 +169,7 @@ void UnoDataBrowserView::setTreeView(DBTreeView* _pTreeView) m_pTreeView = _pTreeView; } } -// ------------------------------------------------------------------------- + void UnoDataBrowserView::showStatus( const OUString& _rStatus ) { if (_rStatus.isEmpty()) @@ -190,7 +185,6 @@ void UnoDataBrowserView::showStatus( const OUString& _rStatus ) } } -// ------------------------------------------------------------------------- void UnoDataBrowserView::hideStatus() { if (!m_pStatus || !m_pStatus->IsVisible()) @@ -201,7 +195,6 @@ void UnoDataBrowserView::hideStatus() Update(); } -// ------------------------------------------------------------------------- void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground) { Point aSplitPos; @@ -258,13 +251,11 @@ void UnoDataBrowserView::resizeDocumentView(Rectangle& _rPlayground) _rPlayground.SetSize( Size( 0, 0 ) ); } -//------------------------------------------------------------------ sal_uInt16 UnoDataBrowserView::View2ModelPos(sal_uInt16 nPos) const { return m_pVclControl ? m_pVclControl->GetModelColumnPos(m_pVclControl->GetColumnIdFromViewPos(nPos)) : -1; } -// ----------------------------------------------------------------------------- SbaGridControl* UnoDataBrowserView::getVclControl() const { if ( !m_pVclControl ) @@ -287,7 +278,7 @@ SbaGridControl* UnoDataBrowserView::getVclControl() const } return m_pVclControl; } -// ----------------------------------------------------------------------------- + void UnoDataBrowserView::GetFocus() { ODataView::GetFocus(); @@ -306,13 +297,13 @@ void UnoDataBrowserView::GetFocus() m_pTreeView->GrabFocus(); } } -// ----------------------------------------------------------------------------- + void UnoDataBrowserView::_disposing( const ::com::sun::star::lang::EventObject& /*_rSource*/ ) { stopComponentListening(Reference<XComponent>(VCLUnoHelper::GetInterface(m_pVclControl),UNO_QUERY)); m_pVclControl = NULL; } -// ------------------------------------------------------------------------- + long UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) { long nDone = 0L; @@ -340,7 +331,6 @@ long UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) } DBG_NAME(BrowserViewStatusDisplay) -// ----------------------------------------------------------------------------- BrowserViewStatusDisplay::BrowserViewStatusDisplay( UnoDataBrowserView* _pView, const OUString& _rStatus ) :m_pView(_pView) { @@ -350,7 +340,6 @@ BrowserViewStatusDisplay::BrowserViewStatusDisplay( UnoDataBrowserView* _pView, m_pView->showStatus(_rStatus); } -// ----------------------------------------------------------------------------- BrowserViewStatusDisplay::~BrowserViewStatusDisplay( ) { if (m_pView) @@ -358,6 +347,5 @@ BrowserViewStatusDisplay::~BrowserViewStatusDisplay( ) DBG_DTOR(BrowserViewStatusDisplay,NULL); } -// ----------------------------------------------------------------------------- /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dataview.cxx b/dbaccess/source/ui/browser/dataview.cxx index 90ee541463b0..45340ecb014e 100644 --- a/dbaccess/source/ui/browser/dataview.cxx +++ b/dbaccess/source/ui/browser/dataview.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include <dbaccess/dataview.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <comphelper/types.hxx> @@ -30,19 +29,15 @@ #include <svtools/imgdef.hxx> #include <tools/diagnose_ex.h> -//......................................................................... namespace dbaui { -//......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::util; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::frame; - //===================================================================== - //= ColorChanger - //===================================================================== + // ColorChanger class ColorChanger { protected: @@ -64,7 +59,6 @@ namespace dbaui }; DBG_NAME(ODataView) - // ------------------------------------------------------------------------- ODataView::ODataView( Window* pParent, IController& _rController, const Reference< XComponentContext >& _rxContext, @@ -80,12 +74,10 @@ namespace dbaui m_aSeparator.Show(); } - // ------------------------------------------------------------------------- void ODataView::Construct() { } - // ------------------------------------------------------------------------- ODataView::~ODataView() { DBG_DTOR(ODataView,NULL); @@ -93,15 +85,12 @@ namespace dbaui m_rController.release(); } - // ------------------------------------------------------------------------- void ODataView::resizeDocumentView( Rectangle& /*_rPlayground*/ ) { } - // ------------------------------------------------------------------------- void ODataView::Paint( const Rectangle& _rRect ) { - //................................................................. // draw the background { ColorChanger aColors( this, COL_TRANSPARENT, GetSettings().GetStyleSettings().GetFaceColor() ); @@ -112,7 +101,6 @@ namespace dbaui Window::Paint( _rRect ); } - // ------------------------------------------------------------------------- void ODataView::resizeAll( const Rectangle& _rPlayground ) { Rectangle aPlayground( _rPlayground ); @@ -126,13 +114,11 @@ namespace dbaui resizeDocumentView( aPlayground ); } - // ------------------------------------------------------------------------- void ODataView::Resize() { Window::Resize(); resizeAll( Rectangle( Point( 0, 0), GetSizePixel() ) ); } - // ----------------------------------------------------------------------------- long ODataView::PreNotify( NotifyEvent& _rNEvt ) { bool bHandled = false; @@ -155,7 +141,6 @@ namespace dbaui } return bHandled ? 1L : Window::PreNotify( _rNEvt ); } - // ----------------------------------------------------------------------------- void ODataView::StateChanged( StateChangedType nType ) { Window::StateChanged( nType ); @@ -187,7 +172,6 @@ namespace dbaui } } } - // ----------------------------------------------------------------------------- void ODataView::DataChanged( const DataChangedEvent& rDCEvt ) { Window::DataChanged( rDCEvt ); @@ -202,14 +186,12 @@ namespace dbaui m_rController.notifyHiContrastChanged(); } } - // ----------------------------------------------------------------------------- void ODataView::attachFrame(const Reference< XFrame >& _xFrame) { m_pAccel->init(m_xContext, _xFrame); } -//......................................................................... } + // namespace dbaui -//......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dbexchange.cxx b/dbaccess/source/ui/browser/dbexchange.cxx index 16f966ba3225..32c05ce9608f 100644 --- a/dbaccess/source/ui/browser/dbexchange.cxx +++ b/dbaccess/source/ui/browser/dbexchange.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbexchange.hxx" #include <sot/formats.hxx> #include <sot/storage.hxx> @@ -31,7 +30,6 @@ #include "UITools.hxx" #include <comphelper/processfactory.hxx> - namespace dbaui { using namespace ::com::sun::star::uno; @@ -59,7 +57,6 @@ namespace dbaui } } - // ----------------------------------------------------------------------------- ODataClipboard::ODataClipboard( const OUString& _rDatasource, const sal_Int32 _nCommandType, @@ -80,7 +77,6 @@ namespace dbaui osl_atomic_decrement( &m_refCount ); } - // ----------------------------------------------------------------------------- ODataClipboard::ODataClipboard( const OUString& _rDatasource, const sal_Int32 _nCommandType, @@ -95,7 +91,6 @@ namespace dbaui m_pRtf.set( new ORTFImportExport( getDescriptor(),_rxORB, _rxFormatter ) ); } - // ----------------------------------------------------------------------------- ODataClipboard::ODataClipboard( const Reference< XPropertySet >& i_rAliveForm, const Sequence< Any >& i_rSelectedRows, const sal_Bool i_bBookmarkSelection, @@ -139,7 +134,6 @@ namespace dbaui osl_atomic_decrement( &m_refCount ); } - // ----------------------------------------------------------------------------- sal_Bool ODataClipboard::WriteObject( SotStorageStreamRef& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const ::com::sun::star::datatransfer::DataFlavor& /*rFlavor*/ ) { if (nUserObjectId == SOT_FORMAT_RTF || nUserObjectId == SOT_FORMATSTR_ID_HTML ) @@ -154,7 +148,6 @@ namespace dbaui return sal_False; } - // ----------------------------------------------------------------------------- void ODataClipboard::AddSupportedFormats() { if ( m_pRtf.is() ) @@ -166,7 +159,6 @@ namespace dbaui ODataAccessObjectTransferable::AddSupportedFormats(); } - // ----------------------------------------------------------------------------- sal_Bool ODataClipboard::GetData( const DataFlavor& rFlavor ) { const sal_uLong nFormat = SotExchange::GetFormat(rFlavor); @@ -186,7 +178,6 @@ namespace dbaui return ODataAccessObjectTransferable::GetData( rFlavor ); } - // ----------------------------------------------------------------------------- void ODataClipboard::ObjectReleased() { if ( m_pHtml.is() ) @@ -216,7 +207,6 @@ namespace dbaui ODataAccessObjectTransferable::ObjectReleased( ); } - // ----------------------------------------------------------------------------- void SAL_CALL ODataClipboard::disposing( const ::com::sun::star::lang::EventObject& i_rSource ) throw (::com::sun::star::uno::RuntimeException) { ODataAccessDescriptor& rDescriptor( getDescriptor() ); @@ -250,5 +240,4 @@ namespace dbaui } } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dbloader.cxx b/dbaccess/source/ui/browser/dbloader.cxx index 23845e080f71..4983681d79fb 100644 --- a/dbaccess/source/ui/browser/dbloader.cxx +++ b/dbaccess/source/ui/browser/dbloader.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbu_reghelper.hxx" #include "dbustrings.hrc" #include "UITools.hxx" @@ -92,6 +91,7 @@ public: const Reference< XLoadEventListener > & _rListener) throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL cancel(void) throw(); }; + DBG_NAME(DBContentLoader) DBContentLoader::DBContentLoader(const Reference< XComponentContext >& _rxContext) @@ -100,31 +100,28 @@ DBContentLoader::DBContentLoader(const Reference< XComponentContext >& _rxContex DBG_CTOR(DBContentLoader,NULL); } -// ------------------------------------------------------------------------- DBContentLoader::~DBContentLoader() { DBG_DTOR(DBContentLoader,NULL); } -// ------------------------------------------------------------------------- -// ------------------------------------------------------------------------- + extern "C" void SAL_CALL createRegistryInfo_DBContentLoader() { static ::dbaui::OMultiInstanceAutoRegistration< DBContentLoader > aAutoRegistration; } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL DBContentLoader::Create( const Reference< XMultiServiceFactory > & rSMgr ) { return *(new DBContentLoader(comphelper::getComponentContext(rSMgr))); } -// ------------------------------------------------------------------------- + // XServiceInfo OUString SAL_CALL DBContentLoader::getImplementationName() throw( ) { return getImplementationName_Static(); } -// ------------------------------------------------------------------------- // XServiceInfo sal_Bool SAL_CALL DBContentLoader::supportsService(const OUString& ServiceName) throw( ) @@ -137,13 +134,13 @@ sal_Bool SAL_CALL DBContentLoader::supportsService(const OUString& ServiceName) return sal_True; return sal_False; } -// ------------------------------------------------------------------------- + // XServiceInfo Sequence< OUString > SAL_CALL DBContentLoader::getSupportedServiceNames(void) throw( ) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + // ORegistryServiceManager_Static Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static(void) throw( ) { @@ -152,7 +149,7 @@ Sequence< OUString > DBContentLoader::getSupportedServiceNames_Static(void) thro aSNS.getArray()[1] = OUString("com.sun.star.sdb.ContentLoader"); return aSNS; } -// ------------------------------------------------------------------------- + extern "C" void SAL_CALL writeDBLoaderInfo(void* pRegistryKey) { Reference< XRegistryKey> xKey(reinterpret_cast< XRegistryKey*>(pRegistryKey)); @@ -171,7 +168,6 @@ extern "C" void SAL_CALL writeDBLoaderInfo(void* pRegistryKey) xNewKey->setAsciiValue( OUString(".component:DB*") ); } -// ----------------------------------------------------------------------- void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OUString& rURL, const Sequence< PropertyValue >& rArgs, const Reference< XLoadEventListener > & rListener) throw(::com::sun::star::uno::RuntimeException) @@ -335,7 +331,6 @@ void SAL_CALL DBContentLoader::load(const Reference< XFrame > & rFrame, const OU rListener->loadCancelled( this ); } -// ----------------------------------------------------------------------- void DBContentLoader::cancel(void) throw() { } diff --git a/dbaccess/source/ui/browser/dbtreemodel.cxx b/dbaccess/source/ui/browser/dbtreemodel.cxx index 617af275375e..a321c068f62d 100644 --- a/dbaccess/source/ui/browser/dbtreemodel.cxx +++ b/dbaccess/source/ui/browser/dbtreemodel.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbtreemodel.hxx" #include "dbu_resource.hrc" #include <osl/diagnose.h> @@ -25,13 +24,11 @@ namespace dbaui { DBG_NAME(DBTreeListUserData) - //------------------------------------------------------------------------ DBTreeListUserData::DBTreeListUserData() :eType(SbaTableQueryBrowser::etQuery) { DBG_CTOR(DBTreeListUserData,NULL); } - //------------------------------------------------------------------------ DBTreeListUserData::~DBTreeListUserData() { DBG_DTOR(DBTreeListUserData,NULL); diff --git a/dbaccess/source/ui/browser/dbtreeview.cxx b/dbaccess/source/ui/browser/dbtreeview.cxx index 895fd3db50c9..0914360af0a8 100644 --- a/dbaccess/source/ui/browser/dbtreeview.cxx +++ b/dbaccess/source/ui/browser/dbtreeview.cxx @@ -17,25 +17,20 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbtreeview.hxx" #include <svtools/treelistbox.hxx> #include "dbtreelistbox.hxx" #include "dbtreemodel.hxx" #include "dbaccess_helpid.hrc" -// ......................................................................... namespace dbaui { -// ......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; DBG_NAME(DBTreeView) -//======================================================================== // class DBTreeView -//======================================================================== DBTreeView::DBTreeView( Window* pParent, WinBits nBits) : Window( pParent, nBits ) , m_pTreeListBox(NULL) @@ -50,8 +45,6 @@ DBTreeView::DBTreeView( Window* pParent, WinBits nBits) m_pTreeListBox->Show(); } -// ----------------------------------------------------------------------------- - DBTreeView::~DBTreeView() { DBG_DTOR(DBTreeView,NULL); @@ -67,24 +60,22 @@ DBTreeView::~DBTreeView() } } -// ----------------------------------------------------------------------------- void DBTreeView::SetPreExpandHandler(const Link& _rHdl) { m_pTreeListBox->SetPreExpandHandler(_rHdl); } -// ----------------------------------------------------------------------------- void DBTreeView::setCopyHandler(const Link& _rHdl) { m_pTreeListBox->setCopyHandler(_rHdl); } -// ----------------------------------------------------------------------------- + void DBTreeView::Resize() { Window::Resize(); m_pTreeListBox->SetPosSizePixel(Point(0,0),GetOutputSizePixel()); } -// ------------------------------------------------------------------------- + void DBTreeView::setModel(SvTreeList* _pTreeModel) { if (_pTreeModel) @@ -92,12 +83,11 @@ void DBTreeView::setModel(SvTreeList* _pTreeModel) m_pTreeListBox->SetModel(_pTreeModel); } -// ------------------------------------------------------------------------- void DBTreeView::setSelChangeHdl( const Link& _rHdl ) { m_pTreeListBox->SetSelChangeHdl( _rHdl ); } -// ----------------------------------------------------------------------------- + void DBTreeView::GetFocus() { Window::GetFocus(); @@ -105,10 +95,6 @@ void DBTreeView::GetFocus() m_pTreeListBox->GrabFocus(); } - -// ......................................................................... } // namespace dbaui -// ......................................................................... - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dbtreeview.hxx b/dbaccess/source/ui/browser/dbtreeview.hxx index 3232f6f16013..3e4649e178fd 100644 --- a/dbaccess/source/ui/browser/dbtreeview.hxx +++ b/dbaccess/source/ui/browser/dbtreeview.hxx @@ -26,9 +26,7 @@ class SvTreeList; namespace dbaui { class DBTreeListBox; - // ------------------ // - DBTreeView - - // ------------------ class DBTreeView : public Window { @@ -52,7 +50,6 @@ namespace dbaui void setCopyHandler(const Link& _rHdl); - void setModel(SvTreeList* _pTreeModel); void setSelChangeHdl(const Link& _rHdl); diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx index b7014655590e..6fe80d83f8c6 100644 --- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx +++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "unodatbr.hxx" #include "browserids.hxx" #include "listviewitems.hxx" @@ -33,11 +32,8 @@ using namespace ::com::sun::star::frame; using namespace ::dbtools; using namespace ::svx; -// ......................................................................... namespace dbaui { -// ......................................................................... -// ----------------------------------------------------------------------------- SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvTreeListEntry* _pEntry ) const { OSL_ENSURE(isContainer(_pEntry), "SbaTableQueryBrowser::getChildType: invalid entry!"); @@ -53,13 +49,11 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getChildType( SvTreeListEn return etUnknown; } -// ----------------------------------------------------------------------------- OUString SbaTableQueryBrowser::GetEntryText( SvTreeListEntry* _pEntry ) const { return m_pTreeView->getListBox().GetEntryText(_pEntry); } -// ----------------------------------------------------------------------------- SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( const SvTreeListEntry* _pEntry ) const { if (!_pEntry) @@ -105,7 +99,7 @@ SbaTableQueryBrowser::EntryType SbaTableQueryBrowser::getEntryType( const SvTree return etQueryContainer; } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, sal_Bool _bSelect) { SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL; @@ -119,7 +113,6 @@ void SbaTableQueryBrowser::select(SvTreeListEntry* _pEntry, sal_Bool _bSelect) } } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelect) { while (_pEntry) @@ -128,7 +121,7 @@ void SbaTableQueryBrowser::selectPath(SvTreeListEntry* _pEntry, sal_Bool _bSelec _pEntry = m_pTreeModel->GetParent(_pEntry); } } -//------------------------------------------------------------------------------ + sal_Bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const { SvLBoxItem* pTextItem = _pEntry ? _pEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING) : NULL; @@ -139,7 +132,7 @@ sal_Bool SbaTableQueryBrowser::isSelected(SvTreeListEntry* _pEntry) const } return sal_False; } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::SelectionChanged() { if ( !m_bShowMenu ) @@ -151,7 +144,7 @@ void SbaTableQueryBrowser::SelectionChanged() InvalidateFeature(ID_BROWSER_COPY); InvalidateFeature(ID_BROWSER_CUT); } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::describeSupportedFeatures() { SbaXDataBrowserController::describeSupportedFeatures(); @@ -176,7 +169,6 @@ void SbaTableQueryBrowser::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:DBRebuildData", ID_BROWSER_REFRESH_REBUILD, CommandGroup::DATA ); } -// ----------------------------------------------------------------------------- sal_Int32 SbaTableQueryBrowser::getDatabaseObjectType( EntryType _eType ) { switch ( _eType ) @@ -194,7 +186,6 @@ sal_Int32 SbaTableQueryBrowser::getDatabaseObjectType( EntryType _eType ) return DatabaseObject::TABLE; } -// ----------------------------------------------------------------------------- void SbaTableQueryBrowser::notifyHiContrastChanged() { if ( m_pTreeView ) @@ -251,9 +242,7 @@ void SbaTableQueryBrowser::notifyHiContrastChanged() } } } -// ----------------------------------------------------------------------------- -// ......................................................................... + } // namespace dbaui -// ......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index 9f3f2985aa81..e4d02c99bd6a 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "dbexchange.hxx" #include "dbtreelistbox.hxx" #include "dbtreemodel.hxx" @@ -41,10 +40,8 @@ #include "svtools/treelistentry.hxx" #include <functional> -// ......................................................................... namespace dbaui { -// ......................................................................... using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; @@ -63,7 +60,6 @@ namespace dbaui using namespace ::dbtools; using namespace ::svx; - // ----------------------------------------------------------------------------- TransferableHelper* SbaTableQueryBrowser::implCopyObject( SvTreeListEntry* _pApplyTo, sal_Int32 _nCommandType, sal_Bool _bAllowConnection ) { try @@ -95,7 +91,6 @@ namespace dbaui } return NULL; } - // ----------------------------------------------------------------------------- sal_Int8 SbaTableQueryBrowser::queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors ) { // check if we're a table or query container @@ -119,7 +114,6 @@ namespace dbaui return DND_ACTION_NONE; } - // ----------------------------------------------------------------------------- sal_Int8 SbaTableQueryBrowser::executeDrop( const ExecuteDropEvent& _rEvt ) { SvTreeListEntry* pHitEntry = m_pTreeView->getListBox().GetEntry( _rEvt.maPosPixel ); @@ -133,12 +127,10 @@ namespace dbaui // a TransferableDataHelper for accessing the dropped data TransferableDataHelper aDroppedData(_rEvt.maDropEvent.Transferable); - // reset the data of the previous async drop (if any) if ( m_nAsyncDrop ) Application::RemoveUserEvent(m_nAsyncDrop); - m_nAsyncDrop = 0; m_aAsyncDrop.aDroppedData.clear(); m_aAsyncDrop.nType = E_TABLE; @@ -148,7 +140,6 @@ namespace dbaui m_aAsyncDrop.pDroppedAt = NULL; m_aAsyncDrop.aUrl = OUString(); - // loop through the available formats and see what we can do ... // first we have to check if it is our own format, if not we have to copy the stream :-( if ( ODataAccessObjectTransferable::canExtractObjectDescriptor(aDroppedData.GetDataFlavorExVector()) ) @@ -179,7 +170,6 @@ namespace dbaui return DND_ACTION_NONE; } - // ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::requestDrag( sal_Int8 /*_nAction*/, const Point& _rPosPixel ) { // get the affected list entry @@ -202,7 +192,6 @@ namespace dbaui return NULL != pTransfer; } - // ----------------------------------------------------------------------------- IMPL_LINK(SbaTableQueryBrowser, OnCopyEntry, void*, /*NOTINTERESIN*/) { SvTreeListEntry* pSelected = m_pTreeView->getListBox().FirstSelected(); @@ -210,13 +199,11 @@ namespace dbaui copyEntry( pSelected ); return 0; } - // ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::isEntryCopyAllowed(SvTreeListEntry* _pEntry) const { EntryType eType = getEntryType(_pEntry); return ( eType == etTableOrView || eType == etQuery ); } - // ----------------------------------------------------------------------------- void SbaTableQueryBrowser::copyEntry(SvTreeListEntry* _pEntry) { TransferableHelper* pTransfer = NULL; @@ -227,7 +214,6 @@ namespace dbaui if (pTransfer) pTransfer->CopyToClipboard(getView()); } - // ----------------------------------------------------------------------------- IMPL_LINK( SbaTableQueryBrowser, OnAsyncDrop, void*, /*NOTINTERESTEDIN*/ ) { m_nAsyncDrop = 0; @@ -248,7 +234,6 @@ namespace dbaui return 0L; } - // ----------------------------------------------------------------------------- void SbaTableQueryBrowser::clearTreeModel() { if (m_pTreeModel) @@ -279,8 +264,6 @@ namespace dbaui } m_pCurrentlyDisplayed = NULL; } -// ......................................................................... } // namespace dbaui -// ......................................................................... /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index b45555b18fb7..42c6fccebeb8 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "exsrcbrw.hxx" #include <com/sun/star/form/FormComponentType.hpp> #include <com/sun/star/util/XURLTransformer.hpp> @@ -42,14 +41,12 @@ using namespace ::com::sun::star::form; using namespace ::com::sun::star::frame; using namespace dbaui; -//============================================================================== -//= SbaExternalSourceBrowser -//============================================================================== +// SbaExternalSourceBrowser extern "C" void SAL_CALL createRegistryInfo_OFormGridView() { static OMultiInstanceAutoRegistration< SbaExternalSourceBrowser > aAutoRegistration; } -//------------------------------------------------------------------------------ + Any SAL_CALL SbaExternalSourceBrowser::queryInterface(const Type& _rType) throw (RuntimeException) { Any aRet = SbaXDataBrowserController::queryInterface(_rType); @@ -60,8 +57,8 @@ Any SAL_CALL SbaExternalSourceBrowser::queryInterface(const Type& _rType) throw return aRet; } + DBG_NAME(SbaExternalSourceBrowser) -//------------------------------------------------------------------------------ SbaExternalSourceBrowser::SbaExternalSourceBrowser(const Reference< ::com::sun::star::uno::XComponentContext >& _rM) :SbaXDataBrowserController(_rM) ,m_aModifyListeners(getMutex()) @@ -72,54 +69,50 @@ SbaExternalSourceBrowser::SbaExternalSourceBrowser(const Reference< ::com::sun:: } -//------------------------------------------------------------------------------ SbaExternalSourceBrowser::~SbaExternalSourceBrowser() { DBG_DTOR(SbaExternalSourceBrowser,NULL); } -//------------------------------------------------------------------------- ::comphelper::StringSequence SAL_CALL SbaExternalSourceBrowser::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + OUString SbaExternalSourceBrowser::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.OFormGridView"); } -//------------------------------------------------------------------------- + ::comphelper::StringSequence SbaExternalSourceBrowser::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); aSupported.getArray()[0] = OUString("com.sun.star.sdb.FormGridView"); return aSupported; } -//------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL SbaExternalSourceBrowser::Create(const Reference<XMultiServiceFactory >& _rxFactory) { return *(new SbaExternalSourceBrowser( comphelper::getComponentContext(_rxFactory))); } -//------------------------------------------------------------------------- + OUString SAL_CALL SbaExternalSourceBrowser::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------------ + Reference< XRowSet > SbaExternalSourceBrowser::CreateForm() { m_pDataSourceImpl = new SbaXFormAdapter(); return m_pDataSourceImpl; } -//------------------------------------------------------------------------------ sal_Bool SbaExternalSourceBrowser::InitializeForm(const Reference< XPropertySet > & /*i_formProperties*/) { return sal_True; } -//------------------------------------------------------------------ sal_Bool SbaExternalSourceBrowser::LoadForm() { // as we don't have a main form (yet), we have nothing to do @@ -127,8 +120,6 @@ sal_Bool SbaExternalSourceBrowser::LoadForm() return sal_True; } - -//------------------------------------------------------------------ void SbaExternalSourceBrowser::modified(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException ) { SbaXDataBrowserController::modified(aEvent); @@ -140,7 +131,6 @@ void SbaExternalSourceBrowser::modified(const ::com::sun::star::lang::EventObjec ((::com::sun::star::util::XModifyListener*)aIt.next())->modified(aEvt); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::URL& aURL, const Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) throw(::com::sun::star::uno::RuntimeException) { const ::com::sun::star::beans::PropertyValue* pArguments = aArgs.getConstArray(); @@ -250,7 +240,6 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U SbaXDataBrowserController::dispatch(aURL, aArgs); } -//------------------------------------------------------------------ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrowser::queryDispatch(const ::com::sun::star::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) { Reference< ::com::sun::star::frame::XDispatch > xReturn; @@ -304,7 +293,6 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaExternalSourceBrows return xReturn; } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::disposing() { // say our modify listeners goodbye @@ -317,19 +305,16 @@ void SAL_CALL SbaExternalSourceBrowser::disposing() SbaXDataBrowserController::disposing(); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::addModifyListener(const Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( RuntimeException ) { m_aModifyListeners.addInterface(aListener); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::removeModifyListener(const Reference< ::com::sun::star::util::XModifyListener > & aListener) throw( RuntimeException ) { m_aModifyListeners.removeInterface(aListener); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::unloading(const ::com::sun::star::lang::EventObject& aEvent) throw( RuntimeException ) { if (m_pDataSourceImpl && (m_pDataSourceImpl->getAttachedForm() == aEvent.Source)) @@ -340,7 +325,6 @@ void SAL_CALL SbaExternalSourceBrowser::unloading(const ::com::sun::star::lang:: SbaXDataBrowserController::unloading(aEvent); } -//------------------------------------------------------------------ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster) { Any aOldPos; @@ -414,20 +398,17 @@ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster) } } -//------------------------------------------------------------------ void SbaExternalSourceBrowser::ClearView() { // set a new (empty) datasource Attach(Reference< XRowSet > ()); - // clear all cols in the grid Reference< ::com::sun::star::container::XIndexContainer > xColContainer(getControlModel(), UNO_QUERY); while (xColContainer->getCount() > 0) xColContainer->removeByIndex(0); } -//------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::disposing(const ::com::sun::star::lang::EventObject& Source) throw( RuntimeException ) { if (m_pDataSourceImpl && (m_pDataSourceImpl->getAttachedForm() == Source.Source)) @@ -438,7 +419,6 @@ void SAL_CALL SbaExternalSourceBrowser::disposing(const ::com::sun::star::lang:: SbaXDataBrowserController::disposing(Source); } -//------------------------------------------------------------------ void SbaExternalSourceBrowser::startListening() { if (m_pDataSourceImpl && m_pDataSourceImpl->getAttachedForm().is()) @@ -448,7 +428,6 @@ void SbaExternalSourceBrowser::startListening() } } -//------------------------------------------------------------------ void SbaExternalSourceBrowser::stopListening() { if (m_pDataSourceImpl && m_pDataSourceImpl->getAttachedForm().is()) @@ -458,7 +437,4 @@ void SbaExternalSourceBrowser::stopListening() } } -//================================================================== -//================================================================== - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index 913287396e10..cb8a74a4c8cd 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "formadapter.hxx" #include <tools/debug.hxx> #include <osl/diagnose.h> @@ -36,12 +35,9 @@ using namespace ::com::sun::star::sdbcx; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::container; -//================================================================== // SbaXFormAdapter -//================================================================== DBG_NAME(SbaXFormAdapter) -// ------------------------------------------------------------------------- SbaXFormAdapter::SbaXFormAdapter() :m_aLoadListeners(*this, m_aMutex) ,m_aRowSetListeners(*this, m_aMutex) @@ -61,14 +57,12 @@ SbaXFormAdapter::SbaXFormAdapter() } -// ------------------------------------------------------------------------- SbaXFormAdapter::~SbaXFormAdapter() { DBG_DTOR(SbaXFormAdapter,NULL); } -// ------------------------------------------------------------------------- Sequence< Type > SAL_CALL SbaXFormAdapter::getTypes( ) throw (RuntimeException) { return ::comphelper::concatSequences( @@ -78,7 +72,6 @@ Sequence< Type > SAL_CALL SbaXFormAdapter::getTypes( ) throw (RuntimeException) ); } -// ------------------------------------------------------------------------- Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getImplementationId( ) throw (RuntimeException) { static ::cppu::OImplementationId * pId = 0; @@ -94,7 +87,6 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getImplementationId( ) throw (Ru return pId->getImplementationId(); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::queryInterface(const Type& _rType) throw (RuntimeException) { Any aReturn = SbaXFormAdapter_BASE1::queryInterface( _rType ); @@ -108,7 +100,6 @@ Any SAL_CALL SbaXFormAdapter::queryInterface(const Type& _rType) throw (RuntimeE return aReturn; } -// ------------------------------------------------------------------------- void SbaXFormAdapter::StopListening() { // log off all our multiplexers @@ -141,7 +132,6 @@ void SbaXFormAdapter::StopListening() xComp->removeEventListener((::com::sun::star::lang::XEventListener*)(::com::sun::star::beans::XPropertyChangeListener*)this); } -// ------------------------------------------------------------------------- void SbaXFormAdapter::StartListening() { // log off all our multiplexers @@ -175,7 +165,6 @@ void SbaXFormAdapter::StartListening() xComp->addEventListener((::com::sun::star::lang::XEventListener*)(::com::sun::star::beans::XPropertyChangeListener*)this); } -// ------------------------------------------------------------------------- void SbaXFormAdapter::AttachForm(const Reference< ::com::sun::star::sdbc::XRowSet >& xNewMaster) { if (xNewMaster == m_xMainForm) @@ -220,7 +209,6 @@ void SbaXFormAdapter::AttachForm(const Reference< ::com::sun::star::sdbc::XRowSe } // ::com::sun::star::sdbc::XCloseable -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::close() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XCloseable > xIface(m_xMainForm, UNO_QUERY); @@ -229,7 +217,6 @@ void SAL_CALL SbaXFormAdapter::close() throw( ::com::sun::star::sdbc::SQLExcepti } // ::com::sun::star::sdbc::XResultSetMetaDataSupplier -// ------------------------------------------------------------------------- Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL SbaXFormAdapter::getMetaData() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetMetaDataSupplier > xIface(m_xMainForm, UNO_QUERY); @@ -239,7 +226,6 @@ Reference< ::com::sun::star::sdbc::XResultSetMetaData > SAL_CALL SbaXFormAdapter } // ::com::sun::star::sdbc::XColumnLocate -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL SbaXFormAdapter::findColumn(const OUString& columnName) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XColumnLocate > xIface(m_xMainForm, UNO_QUERY); @@ -249,7 +235,6 @@ sal_Int32 SAL_CALL SbaXFormAdapter::findColumn(const OUString& columnName) throw } // ::com::sun::star::sdbcx::XColumnsSupplier -// ------------------------------------------------------------------------- Reference< ::com::sun::star::container::XNameAccess > SAL_CALL SbaXFormAdapter::getColumns() throw( RuntimeException ) { Reference< ::com::sun::star::sdbcx::XColumnsSupplier > xIface(m_xMainForm, UNO_QUERY); @@ -259,7 +244,6 @@ Reference< ::com::sun::star::container::XNameAccess > SAL_CALL SbaXFormAdapter:: } // ::com::sun::star::sdbc::XRow -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::wasNull() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -267,7 +251,7 @@ sal_Bool SAL_CALL SbaXFormAdapter::wasNull() throw( ::com::sun::star::sdbc::SQLE return xIface->wasNull(); return sal_True; } -// ------------------------------------------------------------------------- + OUString SAL_CALL SbaXFormAdapter::getString(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -275,7 +259,7 @@ OUString SAL_CALL SbaXFormAdapter::getString(sal_Int32 columnIndex) throw( ::com return xIface->getString(columnIndex); return OUString(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::getBoolean(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -283,15 +267,16 @@ sal_Bool SAL_CALL SbaXFormAdapter::getBoolean(sal_Int32 columnIndex) throw( ::co return xIface->getBoolean(columnIndex); return sal_False; } -// ------------------------------------------------------------------------- + sal_Int8 SAL_CALL SbaXFormAdapter::getByte(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) + { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) return xIface->getByte(columnIndex); return 0; } -// ------------------------------------------------------------------------- + sal_Int16 SAL_CALL SbaXFormAdapter::getShort(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -299,7 +284,7 @@ sal_Int16 SAL_CALL SbaXFormAdapter::getShort(sal_Int32 columnIndex) throw( ::com return xIface->getShort(columnIndex); return 0; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL SbaXFormAdapter::getInt(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -307,7 +292,7 @@ sal_Int32 SAL_CALL SbaXFormAdapter::getInt(sal_Int32 columnIndex) throw( ::com:: return xIface->getInt(columnIndex); return 0; } -// ------------------------------------------------------------------------- + sal_Int64 SAL_CALL SbaXFormAdapter::getLong(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -315,7 +300,7 @@ sal_Int64 SAL_CALL SbaXFormAdapter::getLong(sal_Int32 columnIndex) throw( ::com: return xIface->getLong(columnIndex); return 0; } -// ------------------------------------------------------------------------- + float SAL_CALL SbaXFormAdapter::getFloat(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -323,7 +308,7 @@ float SAL_CALL SbaXFormAdapter::getFloat(sal_Int32 columnIndex) throw( ::com::su return xIface->getFloat(columnIndex); return 0.0; } -// ------------------------------------------------------------------------- + double SAL_CALL SbaXFormAdapter::getDouble(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -331,7 +316,7 @@ double SAL_CALL SbaXFormAdapter::getDouble(sal_Int32 columnIndex) throw( ::com:: return xIface->getDouble(columnIndex); return 0.0; } -// ------------------------------------------------------------------------- + Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -339,7 +324,7 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) t return xIface->getBytes(columnIndex); return Sequence <sal_Int8> (); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Date SAL_CALL SbaXFormAdapter::getDate(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -347,7 +332,7 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) t return xIface->getDate(columnIndex); return ::com::sun::star::util::Date(); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::Time SAL_CALL SbaXFormAdapter::getTime(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -355,7 +340,7 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) t return xIface->getTime(columnIndex); return ::com::sun::star::util::Time(); } -// ------------------------------------------------------------------------- + ::com::sun::star::util::DateTime SAL_CALL SbaXFormAdapter::getTimestamp(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -363,7 +348,7 @@ Sequence< sal_Int8 > SAL_CALL SbaXFormAdapter::getBytes(sal_Int32 columnIndex) t return xIface->getTimestamp(columnIndex); return ::com::sun::star::util::DateTime(); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL SbaXFormAdapter::getBinaryStream(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -371,7 +356,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL SbaXFormAdapter::getBin return xIface->getBinaryStream(columnIndex); return Reference< ::com::sun::star::io::XInputStream > (); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::io::XInputStream > SAL_CALL SbaXFormAdapter::getCharacterStream(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -379,7 +364,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL SbaXFormAdapter::getCha return xIface->getCharacterStream(columnIndex); return Reference< ::com::sun::star::io::XInputStream > (); } -// ------------------------------------------------------------------------- + Any SAL_CALL SbaXFormAdapter::getObject(sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& typeMap) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -387,7 +372,7 @@ Any SAL_CALL SbaXFormAdapter::getObject(sal_Int32 columnIndex, const Reference< return xIface->getObject(columnIndex, typeMap); return Any(); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::sdbc::XRef > SAL_CALL SbaXFormAdapter::getRef(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -395,7 +380,7 @@ Reference< ::com::sun::star::sdbc::XRef > SAL_CALL SbaXFormAdapter::getRef(sal_I return xIface->getRef(columnIndex); return Reference< ::com::sun::star::sdbc::XRef > (); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL SbaXFormAdapter::getBlob(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -403,7 +388,7 @@ Reference< ::com::sun::star::sdbc::XBlob > SAL_CALL SbaXFormAdapter::getBlob(sal return xIface->getBlob(columnIndex); return Reference< ::com::sun::star::sdbc::XBlob > (); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::sdbc::XClob > SAL_CALL SbaXFormAdapter::getClob(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -411,7 +396,7 @@ Reference< ::com::sun::star::sdbc::XClob > SAL_CALL SbaXFormAdapter::getClob(sal return xIface->getClob(columnIndex); return Reference< ::com::sun::star::sdbc::XClob > (); } -// ------------------------------------------------------------------------- + Reference< ::com::sun::star::sdbc::XArray > SAL_CALL SbaXFormAdapter::getArray(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRow > xIface(m_xMainForm, UNO_QUERY); @@ -421,7 +406,6 @@ Reference< ::com::sun::star::sdbc::XArray > SAL_CALL SbaXFormAdapter::getArray(s } // ::com::sun::star::sdbcx::XRowLocate -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getBookmark() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -429,7 +413,7 @@ Any SAL_CALL SbaXFormAdapter::getBookmark() throw( ::com::sun::star::sdbc::SQLEx return xIface->getBookmark(); return Any(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::moveToBookmark(const Any& bookmark) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -437,7 +421,7 @@ sal_Bool SAL_CALL SbaXFormAdapter::moveToBookmark(const Any& bookmark) throw( :: return xIface->moveToBookmark(bookmark); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::moveRelativeToBookmark(const Any& bookmark, sal_Int32 rows) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -445,7 +429,7 @@ sal_Bool SAL_CALL SbaXFormAdapter::moveRelativeToBookmark(const Any& bookmark, s return xIface->moveRelativeToBookmark(bookmark,rows); return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL SbaXFormAdapter::compareBookmarks(const Any& _first, const Any& _second) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -454,7 +438,6 @@ sal_Int32 SAL_CALL SbaXFormAdapter::compareBookmarks(const Any& _first, const An return 0; } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::hasOrderedBookmarks() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -463,7 +446,6 @@ sal_Bool SAL_CALL SbaXFormAdapter::hasOrderedBookmarks() throw( ::com::sun::star return sal_False; } -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL SbaXFormAdapter::hashBookmark(const Any& bookmark) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XRowLocate > xIface(m_xMainForm, UNO_QUERY); @@ -473,119 +455,118 @@ sal_Int32 SAL_CALL SbaXFormAdapter::hashBookmark(const Any& bookmark) throw( ::c } // ::com::sun::star::sdbc::XRowUpdate -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::updateNull(sal_Int32 columnIndex) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateNull(columnIndex); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateBoolean(sal_Int32 columnIndex, sal_Bool x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateBoolean(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateByte(sal_Int32 columnIndex, sal_Int8 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateByte(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateShort(sal_Int32 columnIndex, sal_Int16 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateShort(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateInt(sal_Int32 columnIndex, sal_Int32 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateInt(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateLong(sal_Int32 columnIndex, sal_Int64 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateLong(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateFloat(sal_Int32 columnIndex, float x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateFloat(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateDouble(sal_Int32 columnIndex, double x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateDouble(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateString(sal_Int32 columnIndex, const OUString& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateString(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateBytes(sal_Int32 columnIndex, const Sequence< sal_Int8 >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateBytes(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateDate(sal_Int32 columnIndex, const ::com::sun::star::util::Date& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateDate(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateTime(sal_Int32 columnIndex, const ::com::sun::star::util::Time& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateTime(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateTimestamp(sal_Int32 columnIndex, const ::com::sun::star::util::DateTime& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateTimestamp(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateBinaryStream(sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateBinaryStream(columnIndex, x, length); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateCharacterStream(sal_Int32 columnIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateCharacterStream(columnIndex, x, length); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateObject(sal_Int32 columnIndex, const Any& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateObject(columnIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateNumericObject(sal_Int32 columnIndex, const Any& x, sal_Int32 scale) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XRowUpdate > xIface(m_xMainForm, UNO_QUERY); @@ -594,124 +575,122 @@ void SAL_CALL SbaXFormAdapter::updateNumericObject(sal_Int32 columnIndex, const } // ::com::sun::star::sdbc::XResultSet -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::next() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->next(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isBeforeFirst() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->isBeforeFirst(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isAfterLast() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->isAfterLast(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isFirst() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->isFirst(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isLast() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->isLast(); return sal_False; } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::beforeFirst() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) m_xMainForm->beforeFirst(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::afterLast() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) m_xMainForm->afterLast(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::first() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->first(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::last() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->last(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Int32 SAL_CALL SbaXFormAdapter::getRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->getRow(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::absolute(sal_Int32 row) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->absolute(row); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::relative(sal_Int32 rows) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->relative(rows); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::previous() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->previous(); return sal_False; } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::refreshRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) m_xMainForm->refreshRow(); } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::rowUpdated() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->rowUpdated(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::rowInserted() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->rowInserted(); return sal_False; } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::rowDeleted() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) return m_xMainForm->rowDeleted(); return sal_False; } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL SbaXFormAdapter::getStatement() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) @@ -720,42 +699,41 @@ Reference< XInterface > SAL_CALL SbaXFormAdapter::getStatement() throw( ::com::s } // ::com::sun::star::sdbc::XResultSetUpdate -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::insertRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->insertRow(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::updateRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->updateRow(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::deleteRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->deleteRow(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::cancelRowUpdates() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->cancelRowUpdates(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::moveToInsertRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->moveToInsertRow(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::moveToCurrentRow() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XResultSetUpdate > xIface(m_xMainForm, UNO_QUERY); @@ -764,17 +742,15 @@ void SAL_CALL SbaXFormAdapter::moveToCurrentRow() throw( ::com::sun::star::sdbc: } // ::com::sun::star::sdbc::XRowSet -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::execute() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { if (m_xMainForm.is()) m_xMainForm->execute(); } -// ------------------------------------------------------------------------- + IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, sdbc, RowSetListener, m_aRowSetListeners, ::com::sun::star::sdbc::XRowSet, m_xMainForm) // ::com::sun::star::sdbcx::XDeleteRows -// ------------------------------------------------------------------------- Sequence<sal_Int32> SAL_CALL SbaXFormAdapter::deleteRows(const Sequence< Any >& rows) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbcx::XDeleteRows > xIface(m_xMainForm, UNO_QUERY); @@ -784,7 +760,6 @@ Sequence<sal_Int32> SAL_CALL SbaXFormAdapter::deleteRows(const Sequence< Any >& } // ::com::sun::star::sdbc::XWarningsSupplier -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getWarnings() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XWarningsSupplier > xIface(m_xMainForm, UNO_QUERY); @@ -792,7 +767,7 @@ Any SAL_CALL SbaXFormAdapter::getWarnings() throw( ::com::sun::star::sdbc::SQLEx return xIface->getWarnings(); return Any(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::clearWarnings() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XWarningsSupplier > xIface(m_xMainForm, UNO_QUERY); @@ -801,15 +776,12 @@ void SAL_CALL SbaXFormAdapter::clearWarnings() throw( ::com::sun::star::sdbc::SQ } // ::com::sun::star::sdb::XRowSetApproveBroadcaster -// ------------------------------------------------------------------------- IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, sdb, RowSetApproveListener, m_aRowSetApproveListeners, ::com::sun::star::sdb::XRowSetApproveBroadcaster, m_xMainForm) // com::sun::star::sdbc::XSQLErrorBroadcaster -// ------------------------------------------------------------------------- IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, sdb, SQLErrorListener, m_aErrorListeners, ::com::sun::star::sdb::XSQLErrorBroadcaster, m_xMainForm) // ::com::sun::star::sdb::XResultSetAccess -// ------------------------------------------------------------------------- Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL SbaXFormAdapter::createResultSet() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdb::XResultSetAccess > xIface(m_xMainForm, UNO_QUERY); @@ -819,28 +791,27 @@ Reference< ::com::sun::star::sdbc::XResultSet > SAL_CALL SbaXFormAdapter::create } // com::sun::star::form::XLoadable -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::load() throw( RuntimeException ) { Reference< ::com::sun::star::form::XLoadable > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->load(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::unload() throw( RuntimeException ) { Reference< ::com::sun::star::form::XLoadable > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->unload(); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::reload() throw( RuntimeException ) { Reference< ::com::sun::star::form::XLoadable > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->reload(); } -// ------------------------------------------------------------------------- + sal_Bool SAL_CALL SbaXFormAdapter::isLoaded() throw( RuntimeException ) { Reference< ::com::sun::star::form::XLoadable > xIface(m_xMainForm, UNO_QUERY); @@ -848,165 +819,164 @@ sal_Bool SAL_CALL SbaXFormAdapter::isLoaded() throw( RuntimeException ) return xIface->isLoaded(); return sal_False; } -// ------------------------------------------------------------------------- + IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, form, LoadListener, m_aLoadListeners, ::com::sun::star::form::XLoadable, m_xMainForm) // ::com::sun::star::sdbc::XParameters -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setNull(sal_Int32 parameterIndex, sal_Int32 sqlType) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setNull(parameterIndex, sqlType); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setObjectNull(sal_Int32 parameterIndex, sal_Int32 sqlType, const OUString& typeName) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setObjectNull(parameterIndex, sqlType, typeName); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setBoolean(sal_Int32 parameterIndex, sal_Bool x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setBoolean(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setByte(sal_Int32 parameterIndex, sal_Int8 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setByte(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setShort(sal_Int32 parameterIndex, sal_Int16 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setShort(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setInt(sal_Int32 parameterIndex, sal_Int32 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setInt(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setLong(sal_Int32 parameterIndex, sal_Int64 x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setLong(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setFloat(sal_Int32 parameterIndex, float x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setFloat(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setDouble(sal_Int32 parameterIndex, double x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setDouble(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setString(sal_Int32 parameterIndex, const OUString& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setString(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setBytes(sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setBytes(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setDate(sal_Int32 parameterIndex, const ::com::sun::star::util::Date& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setDate(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setTime(sal_Int32 parameterIndex, const ::com::sun::star::util::Time& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setTime(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setTimestamp(sal_Int32 parameterIndex, const ::com::sun::star::util::DateTime& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setTimestamp(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setBinaryStream(sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setBinaryStream(parameterIndex, x, length); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setCharacterStream(sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setCharacterStream(parameterIndex, x, length); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setObject(sal_Int32 parameterIndex, const Any& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setObject(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setObjectWithInfo(sal_Int32 parameterIndex, const Any& x, sal_Int32 targetSqlType, sal_Int32 scale) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setObjectWithInfo(parameterIndex, x, targetSqlType, scale); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setRef(sal_Int32 parameterIndex, const Reference< ::com::sun::star::sdbc::XRef >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setRef(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setBlob(sal_Int32 parameterIndex, const Reference< ::com::sun::star::sdbc::XBlob >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setBlob(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setClob(sal_Int32 parameterIndex, const Reference< ::com::sun::star::sdbc::XClob >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setClob(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::setArray(sal_Int32 parameterIndex, const Reference< ::com::sun::star::sdbc::XArray >& x) throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); if (xIface.is()) xIface->setArray(parameterIndex, x); } -// ------------------------------------------------------------------------- + void SAL_CALL SbaXFormAdapter::clearParameters() throw( ::com::sun::star::sdbc::SQLException, RuntimeException ) { Reference< ::com::sun::star::sdbc::XParameters > xIface(m_xMainForm, UNO_QUERY); @@ -1015,7 +985,6 @@ void SAL_CALL SbaXFormAdapter::clearParameters() throw( ::com::sun::star::sdbc:: } // ::com::sun::star::form::XDatabaseParameterBroadcaster -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::addParameterListener(const Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener) throw( RuntimeException ) { m_aParameterListeners.addInterface(aListener); @@ -1027,7 +996,6 @@ void SAL_CALL SbaXFormAdapter::addParameterListener(const Reference< ::com::sun: } } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeParameterListener(const Reference< ::com::sun::star::form::XDatabaseParameterListener >& aListener) throw( RuntimeException ) { if (m_aParameterListeners.getLength() == 1) @@ -1040,20 +1008,17 @@ void SAL_CALL SbaXFormAdapter::removeParameterListener(const Reference< ::com::s } // ::com::sun::star::container::XChild -// ------------------------------------------------------------------------- Reference< XInterface > SAL_CALL SbaXFormAdapter::getParent() throw( RuntimeException ) { return m_xParent; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setParent(const Reference< XInterface >& Parent) throw( ::com::sun::star::lang::NoSupportException, RuntimeException ) { m_xParent = Parent; } // ::com::sun::star::form::XSubmit -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::submit(const Reference< ::com::sun::star::awt::XControl >& aControl, const ::com::sun::star::awt::MouseEvent& aMouseEvt) throw( RuntimeException ) { Reference< ::com::sun::star::form::XSubmit > xSubmit(m_xMainForm, UNO_QUERY); @@ -1064,59 +1029,50 @@ void SAL_CALL SbaXFormAdapter::submit(const Reference< ::com::sun::star::awt::XC IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, form, SubmitListener, m_aSubmitListeners, ::com::sun::star::form::XSubmit, m_xMainForm) // ::com::sun::star::awt::XTabControllerModel -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::getGroupControl() throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupControl : not supported !"); return sal_False; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setGroupControl(sal_Bool /*GroupControl*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::setGroupControl : not supported !"); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setControlModels(const Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*Controls*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::setControlModels : not supported !"); } -// ------------------------------------------------------------------------- Sequence< Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL SbaXFormAdapter::getControlModels() throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getControlModels : not supported !"); return Sequence< Reference< ::com::sun::star::awt::XControlModel > >(); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setGroup(const Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/, const OUString& /*GroupName*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::setGroup : not supported !"); } -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL SbaXFormAdapter::getGroupCount() throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupCount : not supported !"); return 0; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::getGroup(sal_Int32 /*nGroup*/, Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/, OUString& /*Name*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroup : not supported !"); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::getGroupByName(const OUString& /*Name*/, Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/) throw( RuntimeException ) { OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupByName : not supported !"); } // ::com::sun::star::lang::XComponent -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::dispose() throw( RuntimeException ) { // log off all multiplexers @@ -1160,20 +1116,17 @@ void SAL_CALL SbaXFormAdapter::dispose() throw( RuntimeException ) m_aChildren.clear(); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::addEventListener(const Reference< ::com::sun::star::lang::XEventListener >& xListener) throw( RuntimeException ) { m_aDisposeListeners.addInterface(xListener); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeEventListener(const Reference< ::com::sun::star::lang::XEventListener >& aListener) throw( RuntimeException ) { m_aDisposeListeners.removeInterface(aListener); } // ::com::sun::star::beans::XFastPropertySet -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setFastPropertyValue(sal_Int32 nHandle, const Any& aValue) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XFastPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1206,7 +1159,6 @@ void SAL_CALL SbaXFormAdapter::setFastPropertyValue(sal_Int32 nHandle, const Any xSet->setFastPropertyValue(nHandle, aValue); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getFastPropertyValue(sal_Int32 nHandle) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XFastPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1219,20 +1171,17 @@ Any SAL_CALL SbaXFormAdapter::getFastPropertyValue(sal_Int32 nHandle) throw( ::c } // ::com::sun::star::container::XNamed -// ------------------------------------------------------------------------- OUString SAL_CALL SbaXFormAdapter::getName() throw( RuntimeException ) { return ::comphelper::getString(getPropertyValue(PROPERTY_NAME)); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setName(const OUString& aName) throw( RuntimeException ) { setPropertyValue(PROPERTY_NAME, makeAny(aName)); } // ::com::sun::star::io::XPersistObject -// ------------------------------------------------------------------------- OUString SAL_CALL SbaXFormAdapter::getServiceName() throw( RuntimeException ) { Reference< ::com::sun::star::io::XPersistObject > xPersist(m_xMainForm, UNO_QUERY); @@ -1241,7 +1190,6 @@ OUString SAL_CALL SbaXFormAdapter::getServiceName() throw( RuntimeException ) return OUString(); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::write(const Reference< ::com::sun::star::io::XObjectOutputStream >& _rxOutStream) throw( ::com::sun::star::io::IOException, RuntimeException ) { Reference< ::com::sun::star::io::XPersistObject > xPersist(m_xMainForm, UNO_QUERY); @@ -1249,7 +1197,6 @@ void SAL_CALL SbaXFormAdapter::write(const Reference< ::com::sun::star::io::XObj xPersist->write(_rxOutStream); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::read(const Reference< ::com::sun::star::io::XObjectInputStream >& _rxInStream) throw( ::com::sun::star::io::IOException, RuntimeException ) { Reference< ::com::sun::star::io::XPersistObject > xPersist(m_xMainForm, UNO_QUERY); @@ -1258,7 +1205,6 @@ void SAL_CALL SbaXFormAdapter::read(const Reference< ::com::sun::star::io::XObje } // ::com::sun::star::beans::XMultiPropertySet -// ------------------------------------------------------------------------- Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL SbaXFormAdapter::getPropertySetInfo() throw( RuntimeException ) { Reference< ::com::sun::star::beans::XMultiPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1284,7 +1230,6 @@ Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL SbaXFormAdapter: return xReturn; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setPropertyValues(const Sequence< OUString >& PropertyNames, const Sequence< Any >& Values) throw( ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XMultiPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1292,7 +1237,6 @@ void SAL_CALL SbaXFormAdapter::setPropertyValues(const Sequence< OUString >& Pro xSet->setPropertyValues(PropertyNames, Values); } -// ------------------------------------------------------------------------- Sequence< Any > SAL_CALL SbaXFormAdapter::getPropertyValues(const Sequence< OUString >& aPropertyNames) throw( RuntimeException ) { Reference< ::com::sun::star::beans::XMultiPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1315,7 +1259,6 @@ Sequence< Any > SAL_CALL SbaXFormAdapter::getPropertyValues(const Sequence< OUSt return aReturn; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::addPropertiesChangeListener(const Sequence< OUString>& /*aPropertyNames*/, const Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener) throw( RuntimeException ) { // we completely ignore the property names, _all_ changes of _all_ properties will be forwarded to _all_ listeners @@ -1329,7 +1272,6 @@ void SAL_CALL SbaXFormAdapter::addPropertiesChangeListener(const Sequence< OUStr } } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removePropertiesChangeListener(const Reference< ::com::sun::star::beans::XPropertiesChangeListener >& Listener) throw( RuntimeException ) { if (m_aPropertiesChangeListeners.getLength() == 1) @@ -1341,7 +1283,6 @@ void SAL_CALL SbaXFormAdapter::removePropertiesChangeListener(const Reference< : m_aPropertiesChangeListeners.removeInterface(Listener); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::firePropertiesChangeEvent(const Sequence< OUString >& aPropertyNames, const Reference< ::com::sun::star::beans::XPropertiesChangeListener >& xListener) throw( RuntimeException ) { Reference< ::com::sun::star::beans::XMultiPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1349,9 +1290,7 @@ void SAL_CALL SbaXFormAdapter::firePropertiesChangeEvent(const Sequence< OUStrin xSet->firePropertiesChangeEvent(aPropertyNames, xListener); } - // ::com::sun::star::beans::XPropertySet -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setPropertyValue(const OUString& aPropertyName, const Any& aValue) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1365,7 +1304,6 @@ void SAL_CALL SbaXFormAdapter::setPropertyValue(const OUString& aPropertyName, c xSet->setPropertyValue(aPropertyName, aValue); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getPropertyValue(const OUString& PropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertySet > xSet(m_xMainForm, UNO_QUERY); @@ -1383,7 +1321,6 @@ IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION(SbaXFormAdapter, PropertyChangeListen IMPLEMENT_PROPERTY_LISTENER_ADMINISTRATION(SbaXFormAdapter, VetoableChangeListener, m_aVetoablePropertyChangeListeners, ::com::sun::star::beans::XPropertySet, m_xMainForm); // ::com::sun::star::util::XCancellable -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::cancel() throw( RuntimeException ) { Reference< ::com::sun::star::util::XCancellable > xCancel(m_xMainForm, UNO_QUERY); @@ -1393,7 +1330,6 @@ void SAL_CALL SbaXFormAdapter::cancel() throw( RuntimeException ) } // ::com::sun::star::beans::XPropertyState -// ------------------------------------------------------------------------- ::com::sun::star::beans::PropertyState SAL_CALL SbaXFormAdapter::getPropertyState(const OUString& PropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertyState > xState(m_xMainForm, UNO_QUERY); @@ -1402,7 +1338,6 @@ void SAL_CALL SbaXFormAdapter::cancel() throw( RuntimeException ) return ::com::sun::star::beans::PropertyState_DEFAULT_VALUE; } -// ------------------------------------------------------------------------- Sequence< ::com::sun::star::beans::PropertyState> SAL_CALL SbaXFormAdapter::getPropertyStates(const Sequence< OUString >& aPropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertyState > xState(m_xMainForm, UNO_QUERY); @@ -1417,7 +1352,6 @@ Sequence< ::com::sun::star::beans::PropertyState> SAL_CALL SbaXFormAdapter::getP return aReturn; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setPropertyToDefault(const OUString& PropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertyState > xState(m_xMainForm, UNO_QUERY); @@ -1425,7 +1359,6 @@ void SAL_CALL SbaXFormAdapter::setPropertyToDefault(const OUString& PropertyName xState->setPropertyToDefault(PropertyName); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getPropertyDefault(const OUString& aPropertyName) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { Reference< ::com::sun::star::beans::XPropertyState > xState(m_xMainForm, UNO_QUERY); @@ -1435,7 +1368,6 @@ Any SAL_CALL SbaXFormAdapter::getPropertyDefault(const OUString& aPropertyName) } // ::com::sun::star::form::XReset -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::reset() throw( RuntimeException ) { Reference< ::com::sun::star::form::XReset > xReset(m_xMainForm, UNO_QUERY); @@ -1446,7 +1378,6 @@ void SAL_CALL SbaXFormAdapter::reset() throw( RuntimeException ) IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, form, ResetListener, m_aResetListeners, ::com::sun::star::form::XReset, m_xMainForm) // ::com::sun::star::container::XNameContainer -// ------------------------------------------------------------------------- void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OUString* pNewElName) throw( ::com::sun::star::lang::IllegalArgumentException ) { // extract the form component @@ -1506,7 +1437,6 @@ void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OU ((::com::sun::star::container::XContainerListener*)aIt.next())->elementInserted(aEvt); } -// ------------------------------------------------------------------------- sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName) { ::std::vector< OUString>::iterator aIter = ::std::find_if( m_aChildNames.begin(), @@ -1519,13 +1449,11 @@ sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName) return -1; } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::insertByName(const OUString& aName, const Any& aElement) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { implInsert(aElement, m_aChildren.size(), &aName); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeByName(const OUString& Name) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { sal_Int32 nPos = implGetPos(Name); @@ -1537,7 +1465,6 @@ void SAL_CALL SbaXFormAdapter::removeByName(const OUString& Name) throw( ::com:: } // ::com::sun::star::container::XNameReplace -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::replaceByName(const OUString& aName, const Any& aElement) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { sal_Int32 nPos = implGetPos(aName); @@ -1549,7 +1476,6 @@ void SAL_CALL SbaXFormAdapter::replaceByName(const OUString& aName, const Any& a } // ::com::sun::star::container::XNameAccess -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getByName(const OUString& aName) throw( ::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { sal_Int32 nPos = implGetPos(aName); @@ -1560,36 +1486,30 @@ Any SAL_CALL SbaXFormAdapter::getByName(const OUString& aName) throw( ::com::sun return makeAny(m_aChildren[nPos]); } -// ------------------------------------------------------------------------- Sequence< OUString > SAL_CALL SbaXFormAdapter::getElementNames() throw( RuntimeException ) { OUString *pChildNames = m_aChildNames.empty() ? 0 : &m_aChildNames[0]; return Sequence< OUString >(pChildNames, m_aChildNames.size()); } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::hasByName(const OUString& aName) throw( RuntimeException ) { return (-1 != implGetPos(aName)); } // ::com::sun::star::container::XElementAccess -// ------------------------------------------------------------------------- Type SAL_CALL SbaXFormAdapter::getElementType() throw(RuntimeException) { return ::getCppuType( static_cast< Reference< ::com::sun::star::form::XFormComponent >* >(NULL)); } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::hasElements() throw(RuntimeException) { return m_aChildren.size() > 0; } - // ::com::sun::star::container::XIndexContainer -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::insertByIndex(sal_Int32 _rIndex, const Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { if ( ( _rIndex < 0 ) || ( (size_t)_rIndex >= m_aChildren.size() ) ) @@ -1597,7 +1517,6 @@ void SAL_CALL SbaXFormAdapter::insertByIndex(sal_Int32 _rIndex, const Any& Eleme implInsert(Element, _rIndex); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeByIndex(sal_Int32 _rIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { if ( ( _rIndex < 0 ) || ( (size_t)_rIndex >= m_aChildren.size() ) ) @@ -1627,7 +1546,6 @@ void SAL_CALL SbaXFormAdapter::removeByIndex(sal_Int32 _rIndex) throw( ::com::su } // ::com::sun::star::container::XIndexReplace -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::replaceByIndex(sal_Int32 _rIndex, const Any& Element) throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { if ( ( _rIndex < 0 ) || ( (size_t)_rIndex >= m_aChildren.size() ) ) @@ -1690,13 +1608,11 @@ void SAL_CALL SbaXFormAdapter::replaceByIndex(sal_Int32 _rIndex, const Any& Elem } // ::com::sun::star::container::XIndexAccess -// ------------------------------------------------------------------------- sal_Int32 SAL_CALL SbaXFormAdapter::getCount() throw( RuntimeException ) { return m_aChildren.size(); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaXFormAdapter::getByIndex(sal_Int32 _rIndex) throw( ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, RuntimeException ) { if ( ( _rIndex < 0 ) || ( (size_t)_rIndex >= m_aChildren.size() ) ) @@ -1707,27 +1623,23 @@ Any SAL_CALL SbaXFormAdapter::getByIndex(sal_Int32 _rIndex) throw( ::com::sun::s } // ::com::sun::star::container::XContainer -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::addContainerListener(const Reference< ::com::sun::star::container::XContainerListener >& xListener) throw( RuntimeException ) { m_aContainerListeners.addInterface(xListener); } -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::removeContainerListener(const Reference< ::com::sun::star::container::XContainerListener >& xListener) throw( RuntimeException ) { m_aContainerListeners.removeInterface(xListener); } // ::com::sun::star::container::XEnumerationAccess -// ------------------------------------------------------------------------- Reference< ::com::sun::star::container::XEnumeration > SAL_CALL SbaXFormAdapter::createEnumeration() throw( RuntimeException ) { return new ::comphelper::OEnumerationByName(this); } // ::com::sun::star::beans::XPropertyChangeListener -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::propertyChange(const ::com::sun::star::beans::PropertyChangeEvent& evt) throw( RuntimeException ) { if (evt.PropertyName.equals(PROPERTY_NAME)) @@ -1746,7 +1658,6 @@ void SAL_CALL SbaXFormAdapter::propertyChange(const ::com::sun::star::beans::Pro } // ::com::sun::star::lang::XEventListener -// ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::disposing(const ::com::sun::star::lang::EventObject& Source) throw( RuntimeException ) { // was it our main form ? @@ -1759,7 +1670,5 @@ void SAL_CALL SbaXFormAdapter::disposing(const ::com::sun::star::lang::EventObje if(aIter != m_aChildren.end()) removeByIndex(aIter - m_aChildren.begin()); } -// ----------------------------------------------------------------------------- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index 2b2a9f77dbb0..8a604022f7aa 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -73,17 +73,13 @@ using namespace ::com::sun::star::awt; using namespace ::dbtools; using namespace ::comphelper; -// ------------------------------------------------------------------------- #define ALL_FEATURES -1 #define FIRST_USER_DEFINED_FEATURE ( ::std::numeric_limits< sal_uInt16 >::max() - 1000 ) #define LAST_USER_DEFINED_FEATURE ( ::std::numeric_limits< sal_uInt16 >::max() ) -// ------------------------------------------------------------------------- typedef ::boost::unordered_map< sal_Int16, sal_Int16 > CommandHashMap; typedef ::std::list< DispatchInformation > DispatchInfoList; - -// ------------------------------------------------------------------------- const OUString& getConfirmDeletionURL() { static const OUString sConfirmDeletionURL( ".uno:FormSlots/ConfirmDeletion" ); @@ -93,9 +89,7 @@ const OUString& getConfirmDeletionURL() namespace dbaui { -//========================================================================== -//= UserDefinedFeatures -//========================================================================== +// UserDefinedFeatures class UserDefinedFeatures { public: @@ -108,13 +102,11 @@ private: ::com::sun::star::uno::WeakReference< XController > m_aController; }; -//-------------------------------------------------------------------------- UserDefinedFeatures::UserDefinedFeatures( const Reference< XController >& _rxController ) :m_aController( _rxController ) { } -//-------------------------------------------------------------------------- FeatureState UserDefinedFeatures::getState( const URL& /*_rFeatureURL*/ ) { // for now, enable all the time @@ -125,7 +117,6 @@ FeatureState UserDefinedFeatures::getState( const URL& /*_rFeatureURL*/ ) return aState; } -//-------------------------------------------------------------------------- void UserDefinedFeatures::execute( const URL& _rFeatureURL, const Sequence< PropertyValue>& _rArgs ) { try @@ -153,9 +144,7 @@ void UserDefinedFeatures::execute( const URL& _rFeatureURL, const Sequence< Prop } } -//========================================================================== -//= OGenericUnoController_Data -//========================================================================== +// OGenericUnoController_Data struct OGenericUnoController_Data { ::sfx2::UserInputInterception m_aUserInputInterception; @@ -168,11 +157,8 @@ struct OGenericUnoController_Data } }; -//========================================================================== -//= OGenericUnoController -//========================================================================== +// OGenericUnoController DBG_NAME(OGenericUnoController) -// ------------------------------------------------------------------------- OGenericUnoController::OGenericUnoController(const Reference< XComponentContext >& _rM) :OGenericUnoController_Base( getMutex() ) ,m_pView(NULL) @@ -235,14 +221,12 @@ OGenericUnoController::OGenericUnoController() #endif -// ----------------------------------------------------------------------------- OGenericUnoController::~OGenericUnoController() { DBG_DTOR(OGenericUnoController,NULL); } -// ----------------------------------------------------------------------------- sal_Bool OGenericUnoController::Construct(Window* /*pParent*/) { OSL_ENSURE( getView(), "the view is NULL!" ); @@ -271,18 +255,18 @@ sal_Bool OGenericUnoController::Construct(Window* /*pParent*/) return sal_True; } -//------------------------------------------------------------------------------ + IMPL_LINK_NOARG(OGenericUnoController, OnAsyncInvalidateAll) { if ( !OGenericUnoController_Base::rBHelper.bInDispose && !OGenericUnoController_Base::rBHelper.bDisposed ) InvalidateFeature_Impl(); return 0L; } -// ----------------------------------------------------------------------------- + void OGenericUnoController::impl_initialize() { } -// ------------------------------------------------------------------------- + void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArguments ) throw(Exception, RuntimeException) { SolarMutexGuard aSolarGuard; @@ -341,40 +325,35 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen } } -//------------------------------------------------------------------------------ void SAL_CALL OGenericUnoController::acquire( ) throw () { OGenericUnoController_Base::acquire(); } -//------------------------------------------------------------------------------ void SAL_CALL OGenericUnoController::release( ) throw () { OGenericUnoController_Base::release(); } -// ------------------------------------------------------------------------- void OGenericUnoController::startFrameListening( const Reference< XFrame >& _rxFrame ) { if ( _rxFrame.is() ) _rxFrame->addFrameActionListener( this ); } -// ------------------------------------------------------------------------- void OGenericUnoController::stopFrameListening( const Reference< XFrame >& _rxFrame ) { if ( _rxFrame.is() ) _rxFrame->removeFrameActionListener( this ); } -// ------------------------------------------------------------------------- void OGenericUnoController::disposing(const EventObject& Source) throw( RuntimeException ) { // our frame ? if ( Source.Source == getFrame() ) stopFrameListening( getFrame() ); } -//------------------------------------------------------------------------ + void OGenericUnoController::modified(const EventObject& aEvent) throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); @@ -389,19 +368,17 @@ void OGenericUnoController::modified(const EventObject& aEvent) throw( RuntimeEx InvalidateFeature(ID_BROWSER_SAVEDOC); InvalidateFeature(ID_BROWSER_UNDO); } -// ----------------------------------------------------------------------- + Reference< XWindow > SAL_CALL OGenericUnoController::getComponentWindow() throw (RuntimeException) { return VCLUnoHelper::GetInterface( getView() ); } -// ----------------------------------------------------------------------- OUString SAL_CALL OGenericUnoController::getViewControllerName() throw (::com::sun::star::uno::RuntimeException) { return OUString( "Default" ); } -// ----------------------------------------------------------------------- Sequence< PropertyValue > SAL_CALL OGenericUnoController::getCreationArguments() throw (RuntimeException) { // currently we do not support any creation args, so anything passed to XModel2::createViewController would be @@ -409,7 +386,6 @@ Sequence< PropertyValue > SAL_CALL OGenericUnoController::getCreationArguments() return Sequence< PropertyValue >(); } -// ----------------------------------------------------------------------- void OGenericUnoController::attachFrame( const Reference< XFrame >& _rxFrame ) throw( RuntimeException ) { SolarMutexGuard aSolarGuard; @@ -425,7 +401,6 @@ void OGenericUnoController::attachFrame( const Reference< XFrame >& _rxFrame ) t getView()->attachFrame( xFrame ); } -// ----------------------------------------------------------------------------- struct CommandCollector : public ::std::unary_function< SupportedFeatures::value_type, void> { sal_uInt16 m_nFeature; @@ -443,12 +418,10 @@ struct CommandCollector : public ::std::unary_function< SupportedFeatures::value } }; -// ----------------------------------------------------------------------- namespace { typedef ::std::vector< Any > States; - // ................................................................... void lcl_notifyMultipleStates( XStatusListener& _rListener, FeatureStateEvent& _rEvent, const States& _rStates ) { for ( States::const_iterator state = _rStates.begin(); @@ -461,7 +434,6 @@ namespace } } - // ................................................................... void lcl_collectStates( const FeatureState& _rFeatureState, States& _out_rStates ) { // order matters, due to a bug in framework which resets the check state when any non-boolean event @@ -483,7 +455,6 @@ namespace } } -// ----------------------------------------------------------------------- void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature, const Reference< XStatusListener > & xListener, sal_Bool _bIgnoreCache) { sal_uInt16 nFeat = m_aSupportedFeatures[ _rFeature ].nFeatureId; @@ -549,7 +520,6 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature, } -//------------------------------------------------------------------------------ sal_Bool OGenericUnoController::isFeatureSupported( sal_Int32 _nId ) { SupportedFeatures::iterator aFeaturePos = ::std::find_if( @@ -561,13 +531,11 @@ sal_Bool OGenericUnoController::isFeatureSupported( sal_Int32 _nId ) return ( m_aSupportedFeatures.end() != aFeaturePos && !aFeaturePos->first.isEmpty()); } -// ----------------------------------------------------------------------- void OGenericUnoController::InvalidateFeature(const OUString& _rURLPath, const Reference< XStatusListener > & _xListener, sal_Bool _bForceBroadcast) { ImplInvalidateFeature( m_aSupportedFeatures[ _rURLPath ].nFeatureId, _xListener, _bForceBroadcast ); } -// ----------------------------------------------------------------------------- void OGenericUnoController::InvalidateFeature_Impl() { #ifdef DBG_UTIL @@ -624,7 +592,6 @@ void OGenericUnoController::InvalidateFeature_Impl() #endif } -// ----------------------------------------------------------------------- void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Reference< XStatusListener >& _xListener, sal_Bool _bForceBroadcast ) { #if OSL_DEBUG_LEVEL > 0 @@ -655,22 +622,18 @@ void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Referen m_aAsyncInvalidateAll.Call(); } -// ----------------------------------------------------------------------- void OGenericUnoController::InvalidateFeature(sal_uInt16 _nId, const Reference< XStatusListener > & _xListener, sal_Bool _bForceBroadcast) { ImplInvalidateFeature( _nId, _xListener, _bForceBroadcast ); } -// ----------------------------------------------------------------------- void OGenericUnoController::InvalidateAll() { ImplInvalidateFeature( ALL_FEATURES, NULL, sal_True ); } -// ----------------------------------------------------------------------------- void OGenericUnoController::InvalidateAll_Impl() { - // --------------------------------- // invalidate all supported features for ( SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.begin(); @@ -688,7 +651,6 @@ void OGenericUnoController::InvalidateAll_Impl() } } -// ----------------------------------------------------------------------- Reference< XDispatch > OGenericUnoController::queryDispatch(const URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) { Reference< XDispatch > xReturn; @@ -716,7 +678,6 @@ Reference< XDispatch > OGenericUnoController::queryDispatch(const URL& aURL, co return xReturn; } -// ----------------------------------------------------------------------- Sequence< Reference< XDispatch > > OGenericUnoController::queryDispatches(const Sequence< DispatchDescriptor >& aDescripts) throw( RuntimeException ) { Sequence< Reference< XDispatch > > aReturn; @@ -737,31 +698,26 @@ Sequence< Reference< XDispatch > > OGenericUnoController::queryDispatches(const return aReturn; } -// ----------------------------------------------------------------------- Reference< XDispatchProvider > OGenericUnoController::getSlaveDispatchProvider(void) throw( RuntimeException ) { return m_xSlaveDispatcher; } -// ----------------------------------------------------------------------- void OGenericUnoController::setSlaveDispatchProvider(const Reference< XDispatchProvider > & _xNewProvider) throw( RuntimeException ) { m_xSlaveDispatcher = _xNewProvider; } -// ----------------------------------------------------------------------- Reference< XDispatchProvider > OGenericUnoController::getMasterDispatchProvider(void) throw( RuntimeException ) { return m_xMasterDispatcher; } -// ----------------------------------------------------------------------- void OGenericUnoController::setMasterDispatchProvider(const Reference< XDispatchProvider > & _xNewProvider) throw( RuntimeException ) { m_xMasterDispatcher = _xNewProvider; } -// ----------------------------------------------------------------------- void OGenericUnoController::dispatch(const URL& _aURL, const Sequence< PropertyValue >& aArgs) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -782,7 +738,6 @@ void OGenericUnoController::dispatch(const URL& _aURL, const Sequence< PropertyV executeChecked(_aURL,aArgs); } -// ----------------------------------------------------------------------- void OGenericUnoController::addStatusListener(const Reference< XStatusListener > & aListener, const URL& _rURL) throw(RuntimeException) { // parse the ULR now and here, this saves later parsing in each notification round @@ -798,7 +753,6 @@ void OGenericUnoController::addStatusListener(const Reference< XStatusListener > // force the new state to be broadcast to the new listener } -// ----------------------------------------------------------------------- void OGenericUnoController::removeStatusListener(const Reference< XStatusListener > & aListener, const URL& _rURL) throw(RuntimeException) { DispatchIterator iterSearch = m_arrStatusListener.begin(); @@ -842,7 +796,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene ::std::bind2nd(FindFeatureListener(),aListener)) ,m_aFeaturesToInvalidate.end()); } -// ----------------------------------------------------------------------------- + void OGenericUnoController::releaseNumberForComponent() { try @@ -856,7 +810,7 @@ void OGenericUnoController::releaseNumberForComponent() // NII } } -// ----------------------------------------------------------------------- + void OGenericUnoController::disposing() { { @@ -892,21 +846,18 @@ void OGenericUnoController::disposing() m_aInitParameters.clear(); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::addEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) { // disambiguate OGenericUnoController_Base::WeakComponentImplHelperBase::addEventListener( xListener ); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::removeEventListener( const Reference< XEventListener >& xListener ) throw (RuntimeException) { // disambiguate OGenericUnoController_Base::WeakComponentImplHelperBase::removeEventListener( xListener ); } -//------------------------------------------------------------------------------ void OGenericUnoController::frameAction(const FrameActionEvent& aEvent) throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); @@ -914,7 +865,6 @@ void OGenericUnoController::frameAction(const FrameActionEvent& aEvent) throw( R m_aCurrentFrame.frameAction( aEvent.Action ); } -//------------------------------------------------------------------------------ void OGenericUnoController::implDescribeSupportedFeature( const sal_Char* _pAsciiCommandURL, sal_uInt16 _nFeatureId, sal_Int16 _nCommandGroup ) { @@ -935,7 +885,6 @@ void OGenericUnoController::implDescribeSupportedFeature( const sal_Char* _pAsci m_aSupportedFeatures[ aFeature.Command ] = aFeature; } -//------------------------------------------------------------------------------ void OGenericUnoController::describeSupportedFeatures() { // add all supported features @@ -946,7 +895,6 @@ void OGenericUnoController::describeSupportedFeatures() implDescribeSupportedFeature( ".uno:DSBEditDoc", ID_BROWSER_EDITDOC, CommandGroup::DOCUMENT ); } -//------------------------------------------------------------------------------ FeatureState OGenericUnoController::GetState( sal_uInt16 _nId ) const { FeatureState aReturn; @@ -966,7 +914,6 @@ FeatureState OGenericUnoController::GetState( sal_uInt16 _nId ) const return aReturn; } -//------------------------------------------------------------------------------ void OGenericUnoController::Execute( sal_uInt16 _nId, const Sequence< PropertyValue>& _rArgs ) { OSL_ENSURE( isUserDefinedFeature( _nId ), @@ -977,7 +924,6 @@ void OGenericUnoController::Execute( sal_uInt16 _nId, const Sequence< PropertyVa m_pData->m_aUserDefinedFeatures.execute( getURLForId( _nId ), _rArgs ); } -//------------------------------------------------------------------------------ URL OGenericUnoController::getURLForId(sal_Int32 _nId) const { URL aReturn; @@ -998,13 +944,11 @@ URL OGenericUnoController::getURLForId(sal_Int32 _nId) const return aReturn; } -//------------------------------------------------------------------------- bool OGenericUnoController::isUserDefinedFeature( const sal_uInt16 _nFeatureId ) const { return ( _nFeatureId >= FIRST_USER_DEFINED_FEATURE ) && ( _nFeatureId < LAST_USER_DEFINED_FEATURE ); } -//------------------------------------------------------------------------- bool OGenericUnoController::isUserDefinedFeature( const OUString& _rFeatureURL ) const { SupportedFeatures::const_iterator pos = m_aSupportedFeatures.find( _rFeatureURL ); @@ -1014,7 +958,6 @@ bool OGenericUnoController::isUserDefinedFeature( const OUString& _rFeatureURL ) return ( pos != m_aSupportedFeatures.end() ) ? isUserDefinedFeature( pos->second.nFeatureId ) : false; } -//------------------------------------------------------------------------- sal_Bool SAL_CALL OGenericUnoController::supportsService(const OUString& ServiceName) throw(RuntimeException) { Sequence< OUString > aSupported(getSupportedServiceNames()); @@ -1027,7 +970,6 @@ sal_Bool SAL_CALL OGenericUnoController::supportsService(const OUString& Service return pArray != pArrayEnd; } -// ----------------------------------------------------------------------------- void OGenericUnoController::startConnectionListening(const Reference< XConnection >& _rxConnection) { // we have to remove ourself before dispoing the connection @@ -1036,7 +978,6 @@ void OGenericUnoController::startConnectionListening(const Reference< XConnectio xComponent->addEventListener(static_cast<XFrameActionListener*>(this)); } -// ----------------------------------------------------------------------------- void OGenericUnoController::stopConnectionListening(const Reference< XConnection >& _rxConnection) { // we have to remove ourself before dispoing the connection @@ -1044,7 +985,7 @@ void OGenericUnoController::stopConnectionListening(const Reference< XConnection if (xComponent.is()) xComponent->removeEventListener(static_cast<XFrameActionListener*>(this)); } -// ----------------------------------------------------------------------------- + Reference< XConnection > OGenericUnoController::connect( const Reference< XDataSource>& _xDataSource, ::dbtools::SQLExceptionInfo* _pErrorInfo ) { @@ -1056,7 +997,7 @@ Reference< XConnection > OGenericUnoController::connect( const Reference< XDataS return xConnection; } -// ----------------------------------------------------------------------------- + Reference< XConnection > OGenericUnoController::connect( const OUString& _rDataSourceName, const OUString& _rContextInformation, ::dbtools::SQLExceptionInfo* _pErrorInfo ) { @@ -1069,12 +1010,11 @@ Reference< XConnection > OGenericUnoController::connect( const OUString& _rDataS return xConnection; } -// ----------------------------------------------------------------------------- void OGenericUnoController::showError(const SQLExceptionInfo& _rInfo) { ::dbaui::showError(_rInfo,getView(),getORB()); } -// ----------------------------------------------------------------------------- + Reference< XLayoutManager > OGenericUnoController::getLayoutManager(const Reference< XFrame >& _xFrame) const { Reference< XPropertySet > xPropSet( _xFrame, UNO_QUERY ); @@ -1091,7 +1031,7 @@ Reference< XLayoutManager > OGenericUnoController::getLayoutManager(const Refere } return xLayoutManager; } -// ----------------------------------------------------------------------------- + void OGenericUnoController::loadMenu(const Reference< XFrame >& _xFrame) { Reference< XLayoutManager > xLayoutManager = getLayoutManager(_xFrame); @@ -1107,18 +1047,16 @@ void OGenericUnoController::loadMenu(const Reference< XFrame >& _xFrame) onLoadedMenu( xLayoutManager ); } -// ----------------------------------------------------------------------------- void OGenericUnoController::onLoadedMenu(const Reference< XLayoutManager >& /*_xLayoutManager*/) { // not interested in } -// ----------------------------------------------------------------------------- void OGenericUnoController::closeTask() { m_aAsyncCloseTask.Call(); } -// ----------------------------------------------------------------------------- + IMPL_LINK_NOARG(OGenericUnoController, OnAsyncCloseTask) { if ( !OGenericUnoController_Base::rBHelper.bInDispose ) @@ -1135,42 +1073,38 @@ IMPL_LINK_NOARG(OGenericUnoController, OnAsyncCloseTask) } return 0L; } -// ----------------------------------------------------------------------------- + Any SAL_CALL OGenericUnoController::getViewData(void) throw( RuntimeException ) { return Any(); } -// ----------------------------------------------------------------------------- + void SAL_CALL OGenericUnoController::restoreViewData(const Any& /*Data*/) throw( RuntimeException ) { } -// ----------------------------------------------------------------------------- Reference< XModel > SAL_CALL OGenericUnoController::getModel(void) throw( RuntimeException ) { return Reference< XModel >(); } -// ----------------------------------------------------------------------------- Reference< XFrame > SAL_CALL OGenericUnoController::getFrame(void) throw( RuntimeException ) { ::osl::MutexGuard aGuard( getMutex() ); return m_aCurrentFrame.getFrame(); } -// ----------------------------------------------------------------------------- sal_Bool SAL_CALL OGenericUnoController::attachModel(const Reference< XModel > & /*xModel*/) throw( RuntimeException ) { SAL_WARN("dbaccess.ui", "OGenericUnoController::attachModel: not supported!" ); return sal_False; } -// ----------------------------------------------------------------------------- void OGenericUnoController::executeUnChecked(sal_uInt16 _nCommandId, const Sequence< PropertyValue >& aArgs) { Execute(_nCommandId, aArgs); } -// ----------------------------------------------------------------------------- + void OGenericUnoController::executeUnChecked(const util::URL& _rCommand, const Sequence< PropertyValue >& aArgs) { OSL_PRECOND( !m_aSupportedFeatures.empty(), "OGenericUnoController::executeUnChecked: shouldn't this be filled at construction time?" ); @@ -1181,7 +1115,7 @@ void OGenericUnoController::executeUnChecked(const util::URL& _rCommand, const S if (aIter != m_aSupportedFeatures.end()) Execute( aIter->second.nFeatureId, aArgs ); } -// ----------------------------------------------------------------------------- + void OGenericUnoController::executeChecked(const util::URL& _rCommand, const Sequence< PropertyValue >& aArgs) { OSL_PRECOND( !m_aSupportedFeatures.empty(), "OGenericUnoController::executeChecked: shouldn't this be filled at construction time?" ); @@ -1196,8 +1130,7 @@ void OGenericUnoController::executeChecked(const util::URL& _rCommand, const Seq Execute( nFeatureId, aArgs ); } } -// ----------------------------------------------------------------------------- -//------------------------------------------------------------------------------ + namespace { OUString lcl_getModuleHelpModuleName( const Reference< XFrame >& _rxFrame ) @@ -1308,8 +1241,6 @@ namespace } } -// ----------------------------------------------------------------------------- - void OGenericUnoController::openHelpAgent(OUString const& _suHelpStringURL ) { OUString suURL(_suHelpStringURL); @@ -1353,7 +1284,7 @@ void OGenericUnoController::openHelpAgent( const URL& _rURL ) DBG_UNHANDLED_EXCEPTION(); } } -// ----------------------------------------------------------------------------- + Reference< awt::XWindow> OGenericUnoController::getTopMostContainerWindow() const { Reference< ::com::sun::star::awt::XWindow> xWindow; @@ -1373,7 +1304,7 @@ Reference< awt::XWindow> OGenericUnoController::getTopMostContainerWindow() cons } return xWindow; } -// ----------------------------------------------------------------------------- + Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw() { SolarMutexGuard aSolarGuard; @@ -1394,7 +1325,6 @@ Reference< XTitle > OGenericUnoController::impl_getTitleHelper_throw() return m_xTitleHelper; } -//============================================================================= // XTitle OUString SAL_CALL OGenericUnoController::getTitle() throw (RuntimeException) @@ -1405,7 +1335,6 @@ OUString SAL_CALL OGenericUnoController::getTitle() return getPrivateTitle() + impl_getTitleHelper_throw()->getTitle (); } -//============================================================================= // XTitle void SAL_CALL OGenericUnoController::setTitle(const OUString& sTitle) throw (RuntimeException) @@ -1416,7 +1345,6 @@ void SAL_CALL OGenericUnoController::setTitle(const OUString& sTitle) impl_getTitleHelper_throw()->setTitle (sTitle); } -//============================================================================= // XTitleChangeBroadcaster void SAL_CALL OGenericUnoController::addTitleChangeListener(const Reference< XTitleChangeListener >& xListener) throw (RuntimeException) @@ -1426,7 +1354,6 @@ void SAL_CALL OGenericUnoController::addTitleChangeListener(const Reference< XTi xBroadcaster->addTitleChangeListener (xListener); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::removeTitleChangeListener(const Reference< XTitleChangeListener >& xListener) throw (RuntimeException) { @@ -1435,49 +1362,40 @@ void SAL_CALL OGenericUnoController::removeTitleChangeListener(const Reference< xBroadcaster->removeTitleChangeListener (xListener); } -// ============================================================================= // XUserInputInterception -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::addKeyHandler( const Reference< XKeyHandler >& _rxHandler ) throw (RuntimeException) { if ( _rxHandler.is() ) m_pData->m_aUserInputInterception.addKeyHandler( _rxHandler ); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::removeKeyHandler( const Reference< XKeyHandler >& _rxHandler ) throw (RuntimeException) { m_pData->m_aUserInputInterception.removeKeyHandler( _rxHandler ); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::addMouseClickHandler( const Reference< XMouseClickHandler >& _rxHandler ) throw (RuntimeException) { if ( _rxHandler.is() ) m_pData->m_aUserInputInterception.addMouseClickHandler( _rxHandler ); } -// ----------------------------------------------------------------------------- void SAL_CALL OGenericUnoController::removeMouseClickHandler( const Reference< XMouseClickHandler >& _rxHandler ) throw (RuntimeException) { m_pData->m_aUserInputInterception.removeMouseClickHandler( _rxHandler ); } -// ============================================================================= -// ----------------------------------------------------------------------------- void OGenericUnoController::executeChecked(sal_uInt16 _nCommandId, const Sequence< PropertyValue >& aArgs) { if ( isCommandEnabled(_nCommandId) ) Execute(_nCommandId, aArgs); } -// ----------------------------------------------------------------------------- sal_Bool OGenericUnoController::isCommandEnabled(sal_uInt16 _nCommandId) const { return GetState( _nCommandId ).bEnabled; } -// ----------------------------------------------------------------------------- sal_uInt16 OGenericUnoController::registerCommandURL( const OUString& _rCompleteCommandURL ) { if ( _rCompleteCommandURL.isEmpty() ) @@ -1506,37 +1424,32 @@ sal_uInt16 OGenericUnoController::registerCommandURL( const OUString& _rComplete return nFeatureId; } -// ----------------------------------------------------------------------------- void OGenericUnoController::notifyHiContrastChanged() { } -// ----------------------------------------------------------------------------- sal_Bool OGenericUnoController::isDataSourceReadOnly() const { return sal_False; } -// ----------------------------------------------------------------------------- Reference< XController > OGenericUnoController::getXController() throw( RuntimeException ) { return this; } -// ----------------------------------------------------------------------------- bool OGenericUnoController::interceptUserInput( const NotifyEvent& _rEvent ) { return m_pData->m_aUserInputInterception.handleNotifyEvent( _rEvent ); } -// ----------------------------------------------------------------------------- sal_Bool OGenericUnoController::isCommandChecked(sal_uInt16 _nCommandId) const { FeatureState aState = GetState( _nCommandId ); return aState.bChecked && (sal_Bool)*aState.bChecked; } -// ----------------------------------------------------------------------------- + sal_Bool OGenericUnoController::isCommandEnabled( const OUString& _rCompleteCommandURL ) const { OSL_ENSURE( !_rCompleteCommandURL.isEmpty(), "OGenericUnoController::isCommandEnabled: Empty command url!" ); @@ -1549,7 +1462,6 @@ sal_Bool OGenericUnoController::isCommandEnabled( const OUString& _rCompleteComm return bIsEnabled; } -// ----------------------------------------------------------------------------- Sequence< ::sal_Int16 > SAL_CALL OGenericUnoController::getSupportedCommandGroups() throw (RuntimeException) { CommandHashMap aCmdHashMap; @@ -1580,7 +1492,6 @@ namespace }; } -// ----------------------------------------------------------------------------- Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableDispatchInformation( ::sal_Int16 CommandGroup ) throw (RuntimeException) { DispatchInfoList aInformationList; @@ -1606,25 +1517,24 @@ Sequence< DispatchInformation > SAL_CALL OGenericUnoController::getConfigurableD return aInformation; } -// ----------------------------------------------------------------------------- + void OGenericUnoController::fillSupportedFeatures() { #ifdef DBG_UTIL m_bDescribingSupportedFeatures = true; #endif describeSupportedFeatures(); -// ----------------------------------------------------------------------------- #ifdef DBG_UTIL m_bDescribingSupportedFeatures = false; #endif } - void SAL_CALL OGenericUnoController::dispose() throw(::com::sun::star::uno::RuntimeException) { SolarMutexGuard aSolarGuard; OGenericUnoController_Base::dispose(); } + } // namespace dbaui /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index f4b59c71b9ed..f7ef34c06c8f 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "sbagrid.hrc" #include <svx/svxids.hrc> @@ -105,37 +104,29 @@ extern "C" void SAL_CALL createRegistryInfo_SbaXGridControl() { static OMultiInstanceAutoRegistration< SbaXGridControl > aAutoRegistration; } -//------------------------------------------------------------------------- + ::comphelper::StringSequence SAL_CALL SbaXGridControl::getSupportedServiceNames() throw() { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL SbaXGridControl::Create(const Reference<XMultiServiceFactory >& _rxFactory) { return *(new SbaXGridControl( comphelper::getComponentContext(_rxFactory) )); } -//------------------------------------------------------------------ - -//------------------------------------------------------------------ -//======================================================================================= // SbaXGridControl -//======================================================================================= -//------------------------------------------------------------------------------ OUString SAL_CALL SbaXGridControl::getImplementationName() throw() { return getImplementationName_Static(); } -//------------------------------------------------------------------------------ OUString SbaXGridControl::getImplementationName_Static() throw( RuntimeException ) { return OUString("com.sun.star.comp.dbu.SbaXGridControl"); } -//------------------------------------------------------------------------------ Sequence< OUString> SbaXGridControl::getSupportedServiceNames_Static(void) throw( RuntimeException ) { Sequence< OUString> aSupported(3); @@ -144,21 +135,19 @@ Sequence< OUString> SbaXGridControl::getSupportedServiceNames_Static(void) throw aSupported[2] = OUString("com.sun.star.awt.UnoControl"); return aSupported; } + DBG_NAME(SbaXGridControl ); -//--------------------------------------------------------------------------------------- SbaXGridControl::SbaXGridControl(const Reference< XComponentContext >& _rM) : FmXGridControl(_rM) { DBG_CTOR(SbaXGridControl ,NULL); } -//--------------------------------------------------------------------------------------- SbaXGridControl::~SbaXGridControl() { DBG_DTOR(SbaXGridControl ,NULL); } -//--------------------------------------------------------------------------------------- FmXGridPeer* SbaXGridControl::imp_CreatePeer(Window* pParent) { FmXGridPeer* pReturn = new SbaXGridPeer(m_xContext); @@ -183,14 +172,12 @@ FmXGridPeer* SbaXGridControl::imp_CreatePeer(Window* pParent) return pReturn; } -//------------------------------------------------------------------------------ Any SAL_CALL SbaXGridControl::queryInterface(const Type& _rType) throw (RuntimeException) { Any aRet = FmXGridControl::queryInterface(_rType); return aRet.hasValue() ? aRet : ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this); } -//------------------------------------------------------------------------------ Sequence< Type > SAL_CALL SbaXGridControl::getTypes( ) throw (RuntimeException) { Sequence< Type > aTypes = FmXGridControl::getTypes(); @@ -202,7 +189,6 @@ Sequence< Type > SAL_CALL SbaXGridControl::getTypes( ) throw (RuntimeException) return aTypes; } -//------------------------------------------------------------------------------ Sequence< sal_Int8 > SAL_CALL SbaXGridControl::getImplementationId( ) throw (RuntimeException) { static ::cppu::OImplementationId * pId = 0; @@ -218,7 +204,6 @@ Sequence< sal_Int8 > SAL_CALL SbaXGridControl::getImplementationId( ) throw (Ru return pId->getImplementationId(); } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt::XToolkit > & rToolkit, const Reference< ::com::sun::star::awt::XWindowPeer > & rParentPeer) throw( RuntimeException ) { FmXGridControl::createPeer(rToolkit, rParentPeer); @@ -238,14 +223,13 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< ::com::sun::star::awt } } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridControl::dispatch(const ::com::sun::star::util::URL& aURL, const Sequence< PropertyValue >& aArgs) throw( RuntimeException ) { Reference< ::com::sun::star::frame::XDispatch > xDisp(getPeer(), UNO_QUERY); if (xDisp.is()) xDisp->dispatch(aURL, aArgs); } -//--------------------------------------------------------------------------------------- + void SAL_CALL SbaXGridControl::addStatusListener( const Reference< XStatusListener > & _rxListener, const URL& _rURL ) throw( RuntimeException ) { ::osl::MutexGuard aGuard( GetMutex() ); @@ -274,7 +258,6 @@ void SAL_CALL SbaXGridControl::addStatusListener( const Reference< XStatusListen } } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridControl::removeStatusListener(const Reference< ::com::sun::star::frame::XStatusListener > & _rxListener, const ::com::sun::star::util::URL& _rURL) throw( RuntimeException ) { ::osl::MutexGuard aGuard( GetMutex() ); @@ -294,7 +277,6 @@ void SAL_CALL SbaXGridControl::removeStatusListener(const Reference< ::com::sun: pMultiplexer->removeInterface( _rxListener ); } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridControl::dispose(void) throw( RuntimeException ) { SolarMutexGuard aGuard; @@ -318,11 +300,8 @@ void SAL_CALL SbaXGridControl::dispose(void) throw( RuntimeException ) FmXGridControl::dispose(); } -//======================================================================================= // SbaXGridPeer -//======================================================================================= DBG_NAME(SbaXGridPeer ) -//--------------------------------------------------------------------------------------- SbaXGridPeer::SbaXGridPeer(const Reference< XComponentContext >& _rM) : FmXGridPeer(_rM) ,m_aStatusListeners(m_aMutex) @@ -330,13 +309,11 @@ SbaXGridPeer::SbaXGridPeer(const Reference< XComponentContext >& _rM) DBG_CTOR(SbaXGridPeer ,NULL); } -//--------------------------------------------------------------------------------------- SbaXGridPeer::~SbaXGridPeer() { DBG_DTOR(SbaXGridPeer ,NULL); } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridPeer::dispose(void) throw( RuntimeException ) { EventObject aEvt(*this); @@ -346,7 +323,6 @@ void SAL_CALL SbaXGridPeer::dispose(void) throw( RuntimeException ) FmXGridPeer::dispose(); } -//--------------------------------------------------------------------------------------- void SbaXGridPeer::NotifyStatusChanged(const ::com::sun::star::util::URL& _rUrl, const Reference< ::com::sun::star::frame::XStatusListener > & xControl) { SbaGridControl* pGrid = (SbaGridControl*) GetWindow(); @@ -379,7 +355,6 @@ void SbaXGridPeer::NotifyStatusChanged(const ::com::sun::star::util::URL& _rUrl, } } -//------------------------------------------------------------------------------ Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeException) { Any aRet = ::cppu::queryInterface(_rType,(::com::sun::star::frame::XDispatch*)this); @@ -388,7 +363,6 @@ Any SAL_CALL SbaXGridPeer::queryInterface(const Type& _rType) throw (RuntimeExce return FmXGridPeer::queryInterface(_rType); } -//--------------------------------------------------------------------------------------- Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDispatch(const ::com::sun::star::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( RuntimeException ) { if ( ( aURL.Complete == ".uno:GridSlots/BrowserAttribs" ) || ( aURL.Complete == ".uno:GridSlots/RowHeight" ) @@ -401,7 +375,6 @@ Reference< ::com::sun::star::frame::XDispatch > SAL_CALL SbaXGridPeer::queryDis return FmXGridPeer::queryDispatch(aURL, aTargetFrameName, nSearchFlags); } -//--------------------------------------------------------------------------------------- IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ ) { SbaGridControl* pGrid = static_cast< SbaGridControl* >( GetWindow() ); @@ -425,7 +398,6 @@ IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ ) return 0; } -//--------------------------------------------------------------------------------------- SbaXGridPeer::DispatchType SbaXGridPeer::classifyDispatchURL( const URL& _rURL ) { DispatchType eURLType = dtUnknown; @@ -440,7 +412,6 @@ SbaXGridPeer::DispatchType SbaXGridPeer::classifyDispatchURL( const URL& _rURL ) return eURLType; } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyValue >& aArgs) throw( RuntimeException ) { SbaGridControl* pGrid = (SbaGridControl*)GetWindow(); @@ -539,7 +510,6 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa } } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridPeer::addStatusListener(const Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( RuntimeException ) { ::cppu::OInterfaceContainerHelper* pCont = m_aStatusListeners.getContainer(aURL); @@ -550,7 +520,6 @@ void SAL_CALL SbaXGridPeer::addStatusListener(const Reference< ::com::sun::star: NotifyStatusChanged(aURL, xControl); } -//--------------------------------------------------------------------------------------- void SAL_CALL SbaXGridPeer::removeStatusListener(const Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( RuntimeException ) { ::cppu::OInterfaceContainerHelper* pCont = m_aStatusListeners.getContainer(aURL); @@ -579,7 +548,6 @@ Sequence< Type > SAL_CALL SbaXGridPeer::getTypes() throw (RuntimeException) } // return implementation specific data -//------------------------------------------------------------------ sal_Int64 SAL_CALL SbaXGridPeer::getSomething( const Sequence< sal_Int8 > & rId ) throw(::com::sun::star::uno::RuntimeException) { if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) ) @@ -588,7 +556,6 @@ sal_Int64 SAL_CALL SbaXGridPeer::getSomething( const Sequence< sal_Int8 > & rId return FmXGridPeer::getSomething(rId); } -//--------------------------------------------------------------------------------------- SbaXGridPeer* SbaXGridPeer::getImplementation(const Reference< XInterface >& _rxIFace) { Reference< XUnoTunnel > xTunnel( @@ -598,24 +565,19 @@ SbaXGridPeer* SbaXGridPeer::getImplementation(const Reference< XInterface >& _rx return NULL; } -//--------------------------------------------------------------------------------------- FmGridControl* SbaXGridPeer::imp_CreateControl(Window* pParent, WinBits nStyle) { return new SbaGridControl( m_xContext, pParent, this, nStyle); } -//================================================================== // SbaGridHeader -//================================================================== -//--------------------------------------------------------------------------------------- SbaGridHeader::SbaGridHeader(BrowseBox* pParent, WinBits nWinBits) :FmGridHeader(pParent, nWinBits) ,DragSourceHelper(this) { } -//--------------------------------------------------------------------------------------- void SbaGridHeader::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) { SolarMutexGuard aGuard; @@ -624,7 +586,6 @@ void SbaGridHeader::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) ImplStartColumnDrag( _nAction, _rPosPixel ); } -//--------------------------------------------------------------------------------------- void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt ) { if (_rMEvt.IsLeft()) @@ -638,7 +599,6 @@ void SbaGridHeader::MouseButtonDown( const MouseEvent& _rMEvt ) FmGridHeader::MouseButtonDown(_rMEvt); } -//--------------------------------------------------------------------------------------- sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMousePos) { sal_uInt16 nId = GetItemId(_rMousePos); @@ -672,7 +632,6 @@ sal_Bool SbaGridHeader::ImplStartColumnDrag(sal_Int8 _nAction, const Point& _rMo return sal_False; } -//--------------------------------------------------------------------------------------- void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMenu) { FmGridHeader::PreExecuteColumnContextMenu(nColId, rMenu); @@ -730,7 +689,6 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM } } -//--------------------------------------------------------------------------------------- void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMenu& rMenu, sal_uInt16 nExecutionResult) { switch (nExecutionResult) @@ -762,11 +720,8 @@ void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupM } } -//================================================================== // SbaGridControl -//================================================================== DBG_NAME(SbaGridControl ); -//--------------------------------------------------------------------------------------- SbaGridControl::SbaGridControl(Reference< XComponentContext > _rM, Window* pParent, FmXGridPeer* _pPeer, WinBits nBits) :FmGridControl(_rM,pParent, _pPeer, nBits) @@ -778,7 +733,6 @@ SbaGridControl::SbaGridControl(Reference< XComponentContext > _rM, DBG_CTOR(SbaGridControl ,NULL); } -//--------------------------------------------------------------------------------------- SbaGridControl::~SbaGridControl() { DBG_DTOR(SbaGridControl ,NULL); @@ -786,13 +740,11 @@ SbaGridControl::~SbaGridControl() Application::RemoveUserEvent(m_nAsyncDropEvent); } -//--------------------------------------------------------------------------------------- BrowserHeader* SbaGridControl::imp_CreateHeaderBar(BrowseBox* pParent) { return new SbaGridHeader(pParent); } -//--------------------------------------------------------------------------------------- CellController* SbaGridControl::GetController(long nRow, sal_uInt16 nCol) { if ( m_bActivatingForDrop ) @@ -801,7 +753,6 @@ CellController* SbaGridControl::GetController(long nRow, sal_uInt16 nCol) return FmGridControl::GetController(nRow, nCol); } -//--------------------------------------------------------------------------------------- void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) { FmGridControl::PreExecuteRowContextMenu(nRow, rMenu); @@ -828,7 +779,6 @@ void SbaGridControl::PreExecuteRowContextMenu(sal_uInt16 nRow, PopupMenu& rMenu) } } -//------------------------------------------------------------------------------ SvNumberFormatter* SbaGridControl::GetDatasourceFormatter() { Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = ::dbtools::getNumberFormats(::dbtools::getConnection(Reference< XRowSet > (getDataSource(),UNO_QUERY)), sal_True, getContext()); @@ -841,7 +791,6 @@ SvNumberFormatter* SbaGridControl::GetDatasourceFormatter() return pFormatter; } -//------------------------------------------------------------------------------ void SbaGridControl::SetColWidth(sal_uInt16 nColId) { // get the (UNO) column model @@ -876,7 +825,6 @@ void SbaGridControl::SetColWidth(sal_uInt16 nColId) } } -//------------------------------------------------------------------------------ void SbaGridControl::SetRowHeight() { Reference< XPropertySet > xCols(GetPeer()->getColumns(), UNO_QUERY); @@ -917,7 +865,6 @@ void SbaGridControl::SetRowHeight() } } -//------------------------------------------------------------------------------ void SbaGridControl::SetColAttrs(sal_uInt16 nColId) { SvNumberFormatter* pFormatter = GetDatasourceFormatter(); @@ -937,8 +884,6 @@ void SbaGridControl::SetColAttrs(sal_uInt16 nColId) ::dbaui::callColumnFormatDialog(xAffectedCol,xField,pFormatter,this);//(Window::GetSettings().GetLanguage()); } - -//------------------------------------------------------------------------------ void SbaGridControl::SetBrowserAttrs() { Reference< XPropertySet > xGridModel(GetPeer()->getColumns(), UNO_QUERY); @@ -957,7 +902,6 @@ void SbaGridControl::SetBrowserAttrs() } } -//--------------------------------------------------------------------------------------- void SbaGridControl::PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& rMenu, sal_uInt16 nExecutionResult) { switch (nExecutionResult) @@ -978,7 +922,6 @@ void SbaGridControl::PostExecuteRowContextMenu(sal_uInt16 nRow, const PopupMenu& } } -//--------------------------------------------------------------------------------------- void SbaGridControl::Select() { // Some selection has changed ... @@ -988,13 +931,11 @@ void SbaGridControl::Select() m_pMasterListener->SelectionChanged(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::CursorMoved() { FmGridControl::CursorMoved(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellFocus /*= sal_True*/ ) { FmGridControl::ActivateCell(nRow, nCol, bSetCellFocus); @@ -1002,7 +943,6 @@ void SbaGridControl::ActivateCell(long nRow, sal_uInt16 nCol, sal_Bool bSetCellF m_pMasterListener->CellActivated(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::DeactivateCell(sal_Bool bUpdate /*= sal_True*/) { FmGridControl::DeactivateCell(bUpdate); @@ -1010,35 +950,30 @@ void SbaGridControl::DeactivateCell(sal_Bool bUpdate /*= sal_True*/) m_pMasterListener->CellDeactivated(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::onRowChange() { if ( m_pMasterListener ) m_pMasterListener->RowChanged(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::onColumnChange() { if ( m_pMasterListener ) m_pMasterListener->ColumnChanged(); } -//--------------------------------------------------------------------------------------- void SbaGridControl::BeforeDrop() { if (m_pMasterListener) m_pMasterListener->BeforeDrop(); } -//--------------------------------------------------------------------------------------- + void SbaGridControl::AfterDrop() { if (m_pMasterListener) m_pMasterListener->AfterDrop(); } - -//------------------------------------------------------------------------------ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos) { Reference< XPropertySet > xEmptyReturn; @@ -1063,7 +998,6 @@ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos) return xEmptyReturn; } -//--------------------------------------------------------------------------------------- sal_Bool SbaGridControl::IsReadOnlyDB() const { // assume yes if anything fails @@ -1090,7 +1024,6 @@ sal_Bool SbaGridControl::IsReadOnlyDB() const return bDBIsReadOnly; } -//--------------------------------------------------------------------------------------- void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt) { long nRow = GetRowAtYPosPixel(rMEvt.GetPosPixel().Y()); @@ -1106,7 +1039,6 @@ void SbaGridControl::MouseButtonDown( const BrowserMouseEvent& rMEvt) FmGridControl::MouseButtonDown(rMEvt); } -//--------------------------------------------------------------------------------------- void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) { SolarMutexGuard aGuard; @@ -1200,13 +1132,11 @@ void SbaGridControl::StartDrag( sal_Int8 _nAction, const Point& _rPosPixel ) FmGridControl::StartDrag(_nAction, _rPosPixel); } -//------------------------------------------------------------------------------ void SbaGridControl::Command(const CommandEvent& rEvt) { FmGridControl::Command(rEvt); } -// ----------------------------------------------------------------------- void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos) { Reference< XPropertySet > xDataSource(getDataSource(), UNO_QUERY); @@ -1243,20 +1173,17 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos) pDataTransfer->StartDrag(this, DND_ACTION_COPY | DND_ACTION_LINK); } -// ----------------------------------------------------------------------- void SbaGridControl::CopySelectedRowsToClipboard() { OSL_ENSURE( GetSelectRowCount() > 0, "SbaGridControl::CopySelectedRowsToClipboard: invalid call!" ); implTransferSelectedRows( (sal_Int16)FirstSelectedRow(), true ); } -// ----------------------------------------------------------------------- void SbaGridControl::DoRowDrag( sal_Int16 nRowPos ) { implTransferSelectedRows( nRowPos, false ); } -// ----------------------------------------------------------------------- void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfClipboardFalseIfDrag ) { Reference< XPropertySet > xForm( getDataSource(), UNO_QUERY ); @@ -1295,7 +1222,6 @@ void SbaGridControl::implTransferSelectedRows( sal_Int16 nRowPos, bool _bTrueIfC } } -// ----------------------------------------------------------------------- void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) { // the only thing to do here is dragging the pure cell text @@ -1321,6 +1247,7 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) } } + /// unary_function Functor object for class ZZ returntype is void struct SbaGridControlPrec : ::std::unary_function<DataFlavorExVector::value_type,bool> { @@ -1342,7 +1269,6 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) return false; } }; -//------------------------------------------------------------------------------ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) { sal_Int8 nAction = DND_ACTION_NONE; @@ -1438,7 +1364,6 @@ sal_Int8 SbaGridControl::AcceptDrop( const BrowserAcceptDropEvent& rEvt ) return (DND_ACTION_NONE != nAction) ? nAction : FmGridControl::AcceptDrop(rEvt); } -//------------------------------------------------------------------------------ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) { // we need some properties of our data source @@ -1508,7 +1433,6 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) return DND_ACTION_NONE; } -//------------------------------------------------------------------------------ Reference< XPropertySet > SbaGridControl::getDataSource() const { Reference< XPropertySet > xReturn; @@ -1520,7 +1444,7 @@ Reference< XPropertySet > SbaGridControl::getDataSource() const return xReturn; } -// ----------------------------------------------------------------------------- + IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/) { m_nAsyncDropEvent = 0; @@ -1567,7 +1491,7 @@ IMPL_LINK(SbaGridControl, AsynchDropEvent, void*, /*EMPTY_ARG*/) return 0L; } -// ------------------------------------------------------------------------- + OUString SbaGridControl::GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxObjType eObjType,sal_Int32 _nPosition) const { OUString sRet; @@ -1580,11 +1504,10 @@ OUString SbaGridControl::GetAccessibleObjectDescription( ::svt::AccessibleBrowse sRet = FmGridControl::GetAccessibleObjectDescription( eObjType,_nPosition); return sRet; } -// ----------------------------------------------------------------------------- + void SbaGridControl::DeleteSelectedRows() { FmGridControl::DeleteSelectedRows(); } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/ui/browser/sbamultiplex.cxx b/dbaccess/source/ui/browser/sbamultiplex.cxx index 00ff65d0d007..1f4e91ed60fd 100644 --- a/dbaccess/source/ui/browser/sbamultiplex.cxx +++ b/dbaccess/source/ui/browser/sbamultiplex.cxx @@ -17,13 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "sbamultiplex.hxx" using namespace dbaui; -//================================================================== // the listener multiplexers -//================================================================== // XStatusListener IMPLEMENT_LISTENER_MULTIPLEXER_CORE(SbaXStatusMultiplexer, ::com::sun::star::frame::XStatusListener) diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 57634c90e89e..84e0d7b59794 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "browserids.hxx" #include "dbaccess_helpid.hrc" #include "dbexchange.hxx" @@ -153,23 +152,18 @@ using namespace ::dbtools; using namespace ::comphelper; using namespace ::svx; -// ......................................................................... namespace dbaui { -// ......................................................................... namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer; -//================================================================== -//= SbaTableQueryBrowser -//================================================================== -// ------------------------------------------------------------------------- +// SbaTableQueryBrowser extern "C" void SAL_CALL createRegistryInfo_OBrowser() { static OMultiInstanceAutoRegistration< SbaTableQueryBrowser > aAutoRegistration; } -// ------------------------------------------------------------------------- + void SafeAddPropertyListener(const Reference< XPropertySet > & xSet, const OUString& rPropName, XPropertyChangeListener* pListener) { Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo(); @@ -177,36 +171,35 @@ void SafeAddPropertyListener(const Reference< XPropertySet > & xSet, const OUStr xSet->addPropertyChangeListener(rPropName, pListener); } -// ------------------------------------------------------------------------- void SafeRemovePropertyListener(const Reference< XPropertySet > & xSet, const OUString& rPropName, XPropertyChangeListener* pListener) { Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo(); if (xInfo->hasPropertyByName(rPropName)) xSet->removePropertyChangeListener(rPropName, pListener); } -//------------------------------------------------------------------------- + OUString SAL_CALL SbaTableQueryBrowser::getImplementationName() throw(RuntimeException) { return getImplementationName_Static(); } -//------------------------------------------------------------------------- + ::comphelper::StringSequence SAL_CALL SbaTableQueryBrowser::getSupportedServiceNames() throw(RuntimeException) { return getSupportedServiceNames_Static(); } -// ------------------------------------------------------------------------- + OUString SbaTableQueryBrowser::getImplementationName_Static() throw(RuntimeException) { return OUString("org.openoffice.comp.dbu.ODatasourceBrowser"); } -//------------------------------------------------------------------------- + ::comphelper::StringSequence SbaTableQueryBrowser::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); aSupported.getArray()[0] = OUString("com.sun.star.sdb.DataSourceBrowser"); return aSupported; } -//------------------------------------------------------------------------- + Reference< XInterface > SAL_CALL SbaTableQueryBrowser::Create(const Reference<XMultiServiceFactory >& _rxFactory) { SolarMutexGuard aGuard; @@ -214,7 +207,6 @@ Reference< XInterface > SAL_CALL SbaTableQueryBrowser::Create(const Reference<XM } DBG_NAME(SbaTableQueryBrowser); -//------------------------------------------------------------------------------ SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XComponentContext >& _rM) :SbaXDataBrowserController(_rM) ,m_aSelectionListeners( getMutex() ) @@ -234,7 +226,6 @@ SbaTableQueryBrowser::SbaTableQueryBrowser(const Reference< XComponentContext >& DBG_CTOR(SbaTableQueryBrowser,NULL); } -//------------------------------------------------------------------------------ SbaTableQueryBrowser::~SbaTableQueryBrowser() { DBG_DTOR(SbaTableQueryBrowser,NULL); @@ -247,7 +238,6 @@ SbaTableQueryBrowser::~SbaTableQueryBrowser() } } -//------------------------------------------------------------------------------ Any SAL_CALL SbaTableQueryBrowser::queryInterface(const Type& _rType) throw (RuntimeException) { if ( _rType.equals( XScriptInvocationContext::static_type() ) ) @@ -264,7 +254,6 @@ Any SAL_CALL SbaTableQueryBrowser::queryInterface(const Type& _rType) throw (Run return aReturn; } -//------------------------------------------------------------------------------ Sequence< Type > SAL_CALL SbaTableQueryBrowser::getTypes( ) throw (RuntimeException) { Sequence< Type > aTypes( ::comphelper::concatSequences( @@ -287,7 +276,6 @@ Sequence< Type > SAL_CALL SbaTableQueryBrowser::getTypes( ) throw (RuntimeExcep return aTypes; } -//------------------------------------------------------------------------------ Sequence< sal_Int8 > SAL_CALL SbaTableQueryBrowser::getImplementationId( ) throw (RuntimeException) { static ::cppu::OImplementationId * pId = 0; @@ -303,7 +291,6 @@ Sequence< sal_Int8 > SAL_CALL SbaTableQueryBrowser::getImplementationId( ) thro return pId->getImplementationId(); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::disposing() { SolarMutexGuard aGuard; @@ -349,7 +336,6 @@ void SAL_CALL SbaTableQueryBrowser::disposing() SbaXDataBrowserController::disposing(); } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) { if ( !SbaXDataBrowserController::Construct( pParent ) ) @@ -412,10 +398,9 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) return sal_True; } -// --------------------------------------------------------------------------------------------------------------------- + namespace { - // ----------------------------------------------------------------------------------------------------------------- struct SelectValueByName : public ::std::unary_function< OUString, Any > { const Any& operator()( OUString const& i_name ) const @@ -432,7 +417,6 @@ namespace }; } -// --------------------------------------------------------------------------------------------------------------------- void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() { try @@ -457,7 +441,6 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() const Reference< XColumnsSupplier > xSuppColumns( xComposer, UNO_QUERY_THROW ); const Reference< XNameAccess > xColumnNames( xSuppColumns->getColumns(), UNO_QUERY_THROW ); - // ............................................................................................................. // check if the order columns apply to tables which really exist in the statement const Reference< XIndexAccess > xOrderColumns( xComposer->getOrderColumns(), UNO_SET_THROW ); const sal_Int32 nOrderColumns( xOrderColumns->getCount() ); @@ -504,7 +487,6 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() xComposer->setOrder( sEmptyOrder ); } - // ............................................................................................................. // check if the columns participating in the filter refer to existing tables // TODO: there's no API at all for this. The method which comes nearest to what we need is // "getStructuredFilter", but it returns pure column names only. That is, for a statement like @@ -541,7 +523,6 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() // ... // } // enum SQLFilterOperand { Column, Literal, ... } - // // ... or something like this .... } catch( const Exception& ) @@ -550,7 +531,6 @@ void SbaTableQueryBrowser::impl_sanitizeRowSetClauses_nothrow() } } -// --------------------------------------------------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & i_formProperties ) { if(!m_pCurrentlyDisplayed) @@ -603,7 +583,6 @@ sal_Bool SbaTableQueryBrowser::InitializeForm( const Reference< XPropertySet > & return sal_True; } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::initializePreviewMode() { if ( getBrowserView() && getBrowserView()->getVclControl() ) @@ -621,7 +600,6 @@ void SbaTableQueryBrowser::initializePreviewMode() } } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun::star::form::XFormComponent > & xGrid) { try @@ -686,7 +664,6 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: xFormMultiSet->setPropertyValues(aProperties, aValues); } - // get the formats supplier of the database we're working with Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier = getNumberFormatter()->getNumberFormatsSupplier(); @@ -858,7 +835,7 @@ sal_Bool SbaTableQueryBrowser::InitializeGridModel(const Reference< ::com::sun:: return sal_True; } -// ----------------------------------------------------------------------------- + Reference<XPropertySet> getColumnHelper(SvTreeListEntry* _pCurrentlyDisplayed,const Reference<XPropertySet>& _rxSource) { Reference<XPropertySet> xRet; @@ -875,7 +852,6 @@ Reference<XPropertySet> getColumnHelper(SvTreeListEntry* _pCurrentlyDisplayed,co return xRet; } -// ----------------------------------------------------------------------- void SbaTableQueryBrowser::transferChangedControlProperty(const OUString& _rProperty, const Any& _rNewValue) { if(m_pCurrentlyDisplayed) @@ -888,7 +864,6 @@ void SbaTableQueryBrowser::transferChangedControlProperty(const OUString& _rProp } } -// ----------------------------------------------------------------------- void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw(::com::sun::star::uno::RuntimeException) { SbaXDataBrowserController::propertyChange(evt); @@ -996,7 +971,6 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) throw( } } -// ----------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeException ) { SolarMutexGuard aSolarGuard; @@ -1020,7 +994,6 @@ sal_Bool SbaTableQueryBrowser::suspend(sal_Bool bSuspend) throw( RuntimeExceptio return bRet; } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEvent ) throw(RuntimeException) { // search the external dispatcher causing this call @@ -1074,7 +1047,6 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv OSL_ENSURE(aLoop != m_aExternalFeatures.end(), "SbaTableQueryBrowser::statusChanged: don't know who sent this!"); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::checkDocumentDataSource() { SvTreeListEntry* pDataSourceEntry = NULL; @@ -1111,7 +1083,6 @@ void SbaTableQueryBrowser::checkDocumentDataSource() implCheckExternalSlot(ID_BROWSER_DOCUMENT_DATASOURCE); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescriptor& _rDescriptor, OUString& _rDataSource, OUString& _rCommand, sal_Int32& _rCommandType, sal_Bool& _rEscapeProcessing) { _rDataSource = _rDescriptor.getDataSource(); @@ -1126,7 +1097,6 @@ void SbaTableQueryBrowser::extractDescriptorProps(const ::svx::ODataAccessDescri _rEscapeProcessing = ::cppu::any2bool(_rDescriptor[daEscapeProcessing]); } -// ------------------------------------------------------------------------- namespace { bool getDataSourceDisplayName_isURL( const OUString& _rDS, OUString& _rDisplayName, OUString& _rUniqueId ) @@ -1143,7 +1113,6 @@ namespace return false; } - // ..................................................................... struct FilterByEntryDataId : public IEntryFilter { OUString sId; @@ -1161,7 +1130,6 @@ namespace } } -// ------------------------------------------------------------------------- OUString SbaTableQueryBrowser::getDataSourceAcessor( SvTreeListEntry* _pDataSourceEntry ) const { OSL_ENSURE( _pDataSourceEntry, "SbaTableQueryBrowser::getDataSourceAcessor: invalid entry!" ); @@ -1172,7 +1140,6 @@ OUString SbaTableQueryBrowser::getDataSourceAcessor( SvTreeListEntry* _pDataSour return pData->sAccessor.Len() ? OUString(pData->sAccessor) : GetEntryText( _pDataSourceEntry ); } -// ------------------------------------------------------------------------- SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSource, const OUString& _rCommand, sal_Int32 _nCommandType, SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry, sal_Bool _bExpandAncestors, const SharedConnection& _rxConnection ) @@ -1299,7 +1266,6 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const OUString& _rDataSour return pObject; } -// ------------------------------------------------------------------------- SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDescriptor& _rDescriptor, SvTreeListEntry** _ppDataSourceEntry, SvTreeListEntry** _ppContainerEntry, sal_Bool _bExpandAncestors) @@ -1314,7 +1280,6 @@ SvTreeListEntry* SbaTableQueryBrowser::getObjectEntry(const ::svx::ODataAccessDe return getObjectEntry( sDataSource, sCommand, nCommandType, _ppDataSourceEntry, _ppContainerEntry, _bExpandAncestors, SharedConnection() ); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::connectExternalDispatches() { Reference< XDispatchProvider > xProvider( getFrame(), UNO_QUERY ); @@ -1380,7 +1345,6 @@ void SbaTableQueryBrowser::connectExternalDispatches() } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::implCheckExternalSlot( sal_uInt16 _nId ) { if ( !m_xMainToolbar.is() ) @@ -1402,7 +1366,6 @@ void SbaTableQueryBrowser::implCheckExternalSlot( sal_uInt16 _nId ) InvalidateFeature( _nId ); } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::disposing( const com::sun::star::lang::EventObject& _rSource ) throw(RuntimeException) { // our frame ? @@ -1462,7 +1425,6 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const com::sun::star::lang::Event } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::implRemoveStatusListeners() { // clear all old dispatches @@ -1486,7 +1448,6 @@ void SbaTableQueryBrowser::implRemoveStatusListeners() m_aExternalFeatures.clear(); } -// ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw (IllegalArgumentException, RuntimeException) { SolarMutexGuard aGuard; @@ -1515,7 +1476,6 @@ sal_Bool SAL_CALL SbaTableQueryBrowser::select( const Any& _rSelection ) throw ( return implSelect(aDescriptor,sal_True); } -// ------------------------------------------------------------------------- Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException) { Any aReturn; @@ -1542,19 +1502,16 @@ Any SAL_CALL SbaTableQueryBrowser::getSelection( ) throw (RuntimeException) return aReturn; } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::addSelectionChangeListener( const Reference< XSelectionChangeListener >& _rxListener ) throw (RuntimeException) { m_aSelectionListeners.addInterface(_rxListener); } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::removeSelectionChangeListener( const Reference< XSelectionChangeListener >& _rxListener ) throw (RuntimeException) { m_aSelectionListeners.removeInterface(_rxListener); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame::XFrame > & _xFrame) throw( RuntimeException ) { implRemoveStatusListeners(); @@ -1598,7 +1555,6 @@ void SbaTableQueryBrowser::attachFrame(const Reference< ::com::sun::star::frame: connectExternalDispatches(); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::addModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) { SbaXDataBrowserController::addModelListeners(_xGridControlModel); @@ -1615,7 +1571,6 @@ void SbaTableQueryBrowser::addModelListeners(const Reference< ::com::sun::star:: } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::removeModelListeners(const Reference< ::com::sun::star::awt::XControlModel > & _xGridControlModel) { SbaXDataBrowserController::removeModelListeners(_xGridControlModel); @@ -1630,7 +1585,7 @@ void SbaTableQueryBrowser::removeModelListeners(const Reference< ::com::sun::sta xSourceSet->removePropertyChangeListener(PROPERTY_TEXTRELIEF, static_cast<XPropertyChangeListener*>(this)); } } -// ------------------------------------------------------------------------- + void SbaTableQueryBrowser::RowChanged() { if(getBrowserView()) @@ -1642,7 +1597,6 @@ void SbaTableQueryBrowser::RowChanged() SbaXDataBrowserController::RowChanged(); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::ColumnChanged() { if(getBrowserView()) @@ -1653,7 +1607,7 @@ void SbaTableQueryBrowser::ColumnChanged() } SbaXDataBrowserController::ColumnChanged(); } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::AddColumnListener(const Reference< XPropertySet > & xCol) { SbaXDataBrowserController::AddColumnListener(xCol); @@ -1663,7 +1617,6 @@ void SbaTableQueryBrowser::AddColumnListener(const Reference< XPropertySet > & x SafeAddPropertyListener(xCol, PROPERTY_FORMATKEY, static_cast<XPropertyChangeListener*>(this)); } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::RemoveColumnListener(const Reference< XPropertySet > & xCol) { SbaXDataBrowserController::RemoveColumnListener(xCol); @@ -1673,14 +1626,12 @@ void SbaTableQueryBrowser::RemoveColumnListener(const Reference< XPropertySet > SafeRemovePropertyListener(xCol, PROPERTY_FORMATKEY, static_cast<XPropertyChangeListener*>(this)); } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::criticalFail() { SbaXDataBrowserController::criticalFail(); unloadAndCleanup( sal_False ); } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch) { SbaXDataBrowserController::LoadFinished(_bWasSynch); @@ -1701,7 +1652,6 @@ void SbaTableQueryBrowser::LoadFinished(sal_Bool _bWasSynch) m_aSelectionListeners.notifyEach( &XSelectionChangeListener::selectionChanged, aEvent ); } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const { sal_Bool bEnabled = sal_False; @@ -1711,7 +1661,6 @@ sal_Bool SbaTableQueryBrowser::getExternalSlotState( sal_uInt16 _nId ) const return bEnabled; } -//------------------------------------------------------------------------------ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const { FeatureState aReturn; @@ -1906,7 +1855,6 @@ FeatureState SbaTableQueryBrowser::GetState(sal_uInt16 nId) const } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue >& aArgs) { switch (nId) @@ -2095,7 +2043,6 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::implAddDatasource( const OUString& _rDataSourceName, const SharedConnection& _rxConnection ) { Image a, b, c; @@ -2103,7 +2050,6 @@ void SbaTableQueryBrowser::implAddDatasource( const OUString& _rDataSourceName, implAddDatasource( _rDataSourceName, a, d, b, e, c, _rxConnection ); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::implAddDatasource(const OUString& _rDbName, Image& _rDbImage, OUString& _rQueryName, Image& _rQueryImage, OUString& _rTableName, Image& _rTableImage, const SharedConnection& _rxConnection) @@ -2158,7 +2104,7 @@ void SbaTableQueryBrowser::implAddDatasource(const OUString& _rDbName, Image& _r } } -// ------------------------------------------------------------------------- + void SbaTableQueryBrowser::initializeTreeModel() { if (m_xDatabaseContext.is()) @@ -2174,7 +2120,7 @@ void SbaTableQueryBrowser::initializeTreeModel() implAddDatasource( *pIter, aDBImage, sQueriesName, aQueriesImage, sTablesName, aTablesImage, SharedConnection() ); } } -// ------------------------------------------------------------------------- + void SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xNameAccess, SvTreeListEntry* _pParent, EntryType _eEntryType) @@ -2210,7 +2156,6 @@ void SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xNameAcce } } -//------------------------------------------------------------------------------ SvTreeListEntry* SbaTableQueryBrowser::implAppendEntry( SvTreeListEntry* _pParent, const OUString& _rName, void* _pUserData, EntryType _eEntryType ) { SAL_WNODEPRECATED_DECLARATIONS_PUSH @@ -2228,7 +2173,6 @@ SvTreeListEntry* SbaTableQueryBrowser::implAppendEntry( SvTreeListEntry* _pParen return pNewEntry; } -//------------------------------------------------------------------------------ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent) { if (_pParent->HasChildren()) @@ -2337,7 +2281,6 @@ IMPL_LINK(SbaTableQueryBrowser, OnExpandEntry, SvTreeListEntry*, _pParent) return 1L; } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry ) { OSL_ENSURE(_pEntry, "SbaTableQueryBrowser::ensureEntryObject: invalid argument!"); @@ -2421,7 +2364,7 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvTreeListEntry* _pEntry ) return bSuccess; } -//------------------------------------------------------------------------------ + sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _rDescriptor,sal_Bool _bSelectDirect) { // extract the props @@ -2435,7 +2378,6 @@ sal_Bool SbaTableQueryBrowser::implSelect(const ::svx::ODataAccessDescriptor& _r return implSelect( sDataSource, sCommand, nCommandType, bEscapeProcessing, SharedConnection(), _bSelectDirect ); } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName, const OUString& _rCommand, const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection) { @@ -2520,7 +2462,6 @@ sal_Bool SbaTableQueryBrowser::implLoadAnything(const OUString& _rDataSourceName return sal_False; } -//------------------------------------------------------------------------------ sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, const OUString& _rCommand, const sal_Int32 _nCommandType, const sal_Bool _bEscapeProcessing, const SharedConnection& _rxConnection @@ -2565,12 +2506,11 @@ sal_Bool SbaTableQueryBrowser::implSelect(const OUString& _rDataSourceName, cons return sal_False; } -//------------------------------------------------------------------------------ IMPL_LINK(SbaTableQueryBrowser, OnSelectionChange, void*, /*NOINTERESTEDIN*/) { return implSelect( m_pTreeView->getListBox().FirstSelected() ) ? 1L : 0L; } -//------------------------------------------------------------------------------ + SvTreeListEntry* SbaTableQueryBrowser::implGetConnectionEntry(SvTreeListEntry* _pEntry) const { SvTreeListEntry* pCurrentEntry = _pEntry; @@ -2582,7 +2522,7 @@ SvTreeListEntry* SbaTableQueryBrowser::implGetConnectionEntry(SvTreeListEntry* _ } return pCurrentEntry; } -//------------------------------------------------------------------------------ + bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) { if ( !_pEntry ) @@ -2710,7 +2650,6 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) sStatus = sStatus.replaceFirst("$name$", aName); BrowserViewStatusDisplay aShowStatus(static_cast<UnoDataBrowserView*>(getView()), sStatus); - sal_Bool bEscapeProcessing = sal_True; if(xNameAccess.is() && xNameAccess->hasByName(sSimpleName)) { @@ -2800,7 +2739,6 @@ bool SbaTableQueryBrowser::implSelect( SvTreeListEntry* _pEntry ) return bSuccess; } -// ----------------------------------------------------------------------------- SvTreeListEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNameAccess>& _rxNameAccess) { DBTreeListBox& rListBox = m_pTreeView->getListBox(); @@ -2824,7 +2762,6 @@ SvTreeListEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNa return pContainer; } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEvent ) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -2861,7 +2798,7 @@ void SAL_CALL SbaTableQueryBrowser::elementInserted( const ContainerEvent& _rEve else SbaXDataBrowserController::elementInserted(_rEvent); } -// ------------------------------------------------------------------------- + sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const OUString& _sName,SvTreeListEntry* _pContainer) { return m_pCurrentlyDisplayed @@ -2869,7 +2806,7 @@ sal_Bool SbaTableQueryBrowser::isCurrentlyDisplayedChanged(const OUString& _sNam && m_pTreeView->getListBox().GetParent(m_pCurrentlyDisplayed) == _pContainer && m_pTreeView->getListBox().GetEntryText(m_pCurrentlyDisplayed) == _sName; } -// ------------------------------------------------------------------------- + void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEvent ) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -2922,7 +2859,6 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven SbaXDataBrowserController::elementRemoved(_rEvent); } -// ------------------------------------------------------------------------- void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEvent ) throw(RuntimeException) { SolarMutexGuard aSolarGuard; @@ -2994,7 +2930,6 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve SbaXDataBrowserController::elementReplaced(_rEvent); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::impl_releaseConnection( SharedConnection& _rxConnection ) { // remove as event listener @@ -3022,7 +2957,6 @@ void SbaTableQueryBrowser::impl_releaseConnection( SharedConnection& _rxConnecti // will implicitly dispose if we have the ownership, since xConnection is a SharedConnection } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::disposeConnection( SvTreeListEntry* _pDSEntry ) { OSL_ENSURE( _pDSEntry, "SbaTableQueryBrowser::disposeConnection: invalid entry (NULL)!" ); @@ -3036,7 +2970,6 @@ void SbaTableQueryBrowser::disposeConnection( SvTreeListEntry* _pDSEntry ) } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry,sal_Bool _bDisposeConnection) { OSL_ENSURE(_pDSEntry, "SbaTableQueryBrowser::closeConnection: invalid entry (NULL)!"); @@ -3072,7 +3005,6 @@ void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry,sal_Bool _ disposeConnection( _pDSEntry ); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection ) { if (!m_pCurrentlyDisplayed) @@ -3132,7 +3064,6 @@ void SbaTableQueryBrowser::unloadAndCleanup( sal_Bool _bDisposeConnection ) } } -// ------------------------------------------------------------------------- namespace { Reference< XInterface > lcl_getDataSource( const Reference< XDatabaseContext >& _rxDatabaseContext, @@ -3159,7 +3090,6 @@ namespace } } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::impl_initialize() { SolarMutexGuard aGuard; @@ -3333,13 +3263,11 @@ void SbaTableQueryBrowser::impl_initialize() InvalidateAll(); } -// ------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::haveExplorer() const { return m_pTreeView && m_pTreeView->IsVisible(); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::hideExplorer() { if (!haveExplorer()) @@ -3354,7 +3282,6 @@ void SbaTableQueryBrowser::hideExplorer() InvalidateFeature(ID_BROWSER_EXPLORER); } -// ------------------------------------------------------------------------- void SbaTableQueryBrowser::showExplorer() { if (haveExplorer()) @@ -3370,7 +3297,6 @@ void SbaTableQueryBrowser::showExplorer() InvalidateFeature(ID_BROWSER_EXPLORER); } -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::ensureConnection(SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection) { SvTreeListEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent(_pAnyEntry); @@ -3382,7 +3308,6 @@ sal_Bool SbaTableQueryBrowser::ensureConnection(SvTreeListEntry* _pAnyEntry, Sha return ensureConnection( pDSEntry, pDSData, _rConnection ); } -// ----------------------------------------------------------------------------- SAL_WNODEPRECATED_DECLARATIONS_PUSH ::std::auto_ptr< ImageProvider > SbaTableQueryBrowser::getImageProviderFor( SvTreeListEntry* _pAnyEntry ) { @@ -3392,9 +3317,9 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH pImageProvider.reset( new ImageProvider( xConnection ) ); return pImageProvider; } + SAL_WNODEPRECATED_DECLARATIONS_POP -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyEntry, SharedConnection& _rConnection ) { SvTreeListEntry* pDSEntry = m_pTreeView->getListBox().GetRootLevelParent( _pAnyEntry ); @@ -3408,14 +3333,13 @@ sal_Bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyE } #if OSL_DEBUG_LEVEL > 0 -// ----------------------------------------------------------------------------- bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvTreeListEntry* _pEntry ) const { return m_pTreeModel->GetRootLevelParent( _pEntry ) == _pEntry; } + #endif -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection ) { OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" ); @@ -3452,7 +3376,6 @@ sal_Bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, voi return _rConnection.is(); } -// ----------------------------------------------------------------------------- IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortData ) { const SvTreeListEntry* pLHS = static_cast<const SvTreeListEntry*>(_pSortData->pLeft); @@ -3517,7 +3440,6 @@ IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortDa return nCompareResult; } -// ----------------------------------------------------------------------------- void SbaTableQueryBrowser::implAdministrate( SvTreeListEntry* _pApplyTo ) { OSL_PRECOND( _pApplyTo, "SbaTableQueryBrowser::implAdministrate: illegal entry!" ); @@ -3568,7 +3490,6 @@ void SbaTableQueryBrowser::implAdministrate( SvTreeListEntry* _pApplyTo ) } } -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::requestQuickHelp( const SvTreeListEntry* _pEntry, OUString& _rText ) const { const DBTreeListUserData* pData = static_cast< const DBTreeListUserData* >( _pEntry->GetUserData() ); @@ -3580,7 +3501,6 @@ sal_Bool SbaTableQueryBrowser::requestQuickHelp( const SvTreeListEntry* _pEntry, return sal_False; } -// ----------------------------------------------------------------------------- PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const { OSL_PRECOND( &m_pTreeView->getListBox() == &_rControl, @@ -3591,19 +3511,16 @@ PopupMenu* SbaTableQueryBrowser::getContextMenu( Control& _rControl ) const return new PopupMenu( ModuleRes( MENU_BROWSER_DEFAULTCONTEXT ) ); } -// ----------------------------------------------------------------------------- IController& SbaTableQueryBrowser::getCommandController() { return *this; } -// ----------------------------------------------------------------------------- ::cppu::OInterfaceContainerHelper* SbaTableQueryBrowser::getContextMenuInterceptors() { return &m_aContextMenuInterceptors; } -// ----------------------------------------------------------------------------- Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const { OSL_PRECOND( &m_pTreeView->getListBox() == &_rControl, @@ -3644,7 +3561,6 @@ Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const return makeAny( aSelectedObject ); } -// ----------------------------------------------------------------------------- sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_Bool& _bEscapeProcessing ) { _rCommand = OUString(); @@ -3692,7 +3608,7 @@ sal_Bool SbaTableQueryBrowser::implGetQuerySignature( OUString& _rCommand, sal_B return sal_False; } -//------------------------------------------------------------------------------ + void SbaTableQueryBrowser::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException ) { if (aEvent.Frame == m_xCurrentFrameParent) @@ -3706,7 +3622,7 @@ void SbaTableQueryBrowser::frameAction(const ::com::sun::star::frame::FrameActio SbaXDataBrowserController::frameAction(aEvent); } -// ----------------------------------------------------------------------------- + void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _xColContainer) { // first we have to clear the grid @@ -3721,7 +3637,7 @@ void SbaTableQueryBrowser::clearGridColumns(const Reference< XNameContainer >& _ ::comphelper::disposeComponent(xColumn); } } -// ----------------------------------------------------------------------------- + void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame) { if ( m_bShowMenu ) @@ -3742,7 +3658,7 @@ void SbaTableQueryBrowser::loadMenu(const Reference< XFrame >& _xFrame) onLoadedMenu( xLayoutManager ); } } -// ----------------------------------------------------------------------------- + OUString SbaTableQueryBrowser::getPrivateTitle() const { OUString sTitle; @@ -3766,7 +3682,7 @@ OUString SbaTableQueryBrowser::getPrivateTitle() const return sTitle; } -// ----------------------------------------------------------------------------- + sal_Bool SbaTableQueryBrowser::preReloadForm() { sal_Bool bIni = sal_False; @@ -3794,14 +3710,12 @@ sal_Bool SbaTableQueryBrowser::preReloadForm() return bIni; } -// ----------------------------------------------------------------------------- void SbaTableQueryBrowser::postReloadForm() { InitializeGridModel(getFormComponent()); LoadFinished(sal_True); } -//------------------------------------------------------------------------------ Reference< XEmbeddedScripts > SAL_CALL SbaTableQueryBrowser::getScriptContainer() throw (RuntimeException) { // update our database document @@ -3827,28 +3741,24 @@ Reference< XEmbeddedScripts > SAL_CALL SbaTableQueryBrowser::getScriptContainer( return xScripts; } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::registerContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException) { if ( _Interceptor.is() ) m_aContextMenuInterceptors.addInterface( _Interceptor ); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::releaseContextMenuInterceptor( const Reference< XContextMenuInterceptor >& _Interceptor ) throw (RuntimeException) { if ( _Interceptor.is() ) m_aContextMenuInterceptors.removeInterface( _Interceptor ); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::registeredDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException) { SolarMutexGuard aGuard; implAddDatasource( _Event.Name, SharedConnection() ); } -//------------------------------------------------------------------------------ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSourceName ) { // get the top-level representing the removed data source @@ -3898,7 +3808,6 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSo m_pTreeModel->Remove( pDataSourceEntry ); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -3909,7 +3818,6 @@ void SAL_CALL SbaTableQueryBrowser::revokedDatabaseLocation( const DatabaseRegis checkDocumentDataSource(); } -//------------------------------------------------------------------------------ void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegistrationEvent& _Event ) throw (RuntimeException) { SolarMutexGuard aGuard; @@ -3920,10 +3828,6 @@ void SAL_CALL SbaTableQueryBrowser::changedDatabaseLocation( const DatabaseRegis implAddDatasource( _Event.Name, SharedConnection() ); } - -// ......................................................................... } // namespace dbaui -// ......................................................................... - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |