Tag: cws_src680_odbmacros2 User: fs Date: 2007-12-13 11:22:09+0000 Modified: dba/dbaccess/source/ui/browser/brwctrlr.cxx dba/dbaccess/source/ui/browser/exsrcbrw.cxx dba/dbaccess/source/ui/browser/genericcontroller.cxx dba/dbaccess/source/ui/browser/unodatbr.cxx
Log: #i49133# some refactoring, mostly related to the m_xCurrentFrame->m_aCurrentFrame change File Changes: Directory: /dba/dbaccess/source/ui/browser/ =========================================== File [changed]: brwctrlr.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/brwctrlr.cxx?r1=1.102&r2=1.102.2.1 Delta lines: +45 -82 --------------------- --- brwctrlr.cxx 2007-11-21 15:50:24+0000 1.102 +++ brwctrlr.cxx 2007-12-13 11:22:06+0000 1.102.2.1 @@ -4,9 +4,9 @@ * * $RCSfile: brwctrlr.cxx,v $ * - * $Revision: 1.102 $ + * $Revision: 1.102.2.1 $ * - * last change: $Author: ihi $ $Date: 2007/11/21 15:50:24 $ + * last change: $Author: fs $ $Date: 2007/12/13 11:22:06 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -279,7 +279,6 @@ friend class SbaXDataBrowserController; ::cppu::OInterfaceContainerHelper m_aActivateListeners; SbaXDataBrowserController* m_pOwner; - sal_Bool m_bActive; public: FormControllerImpl(SbaXDataBrowserController* pOwner); @@ -316,7 +315,6 @@ SbaXDataBrowserController::FormControllerImpl::FormControllerImpl(SbaXDataBrowserController* _pOwner) :m_aActivateListeners(_pOwner->getMutex()) ,m_pOwner(_pOwner) - ,m_bActive(sal_False) { DBG_CTOR(FormControllerImpl,NULL); @@ -412,34 +410,8 @@ } //------------------------------------------------------------------ -void SAL_CALL SbaXDataBrowserController::FormControllerImpl::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException ) +void SAL_CALL SbaXDataBrowserController::FormControllerImpl::frameAction(const ::com::sun::star::frame::FrameActionEvent& /*aEvent*/) throw( RuntimeException ) { - OSL_ENSURE(aEvent.Source == m_pOwner->m_xCurrentFrame, "SbaXDataBrowserController::FormControllerImpl::frameAction : where did this come frome ?"); - - ::com::sun::star::lang::EventObject aEvt(*m_pOwner); - ::cppu::OInterfaceIteratorHelper aIter(m_aActivateListeners); - switch (aEvent.Action) - { - case ::com::sun::star::frame::FrameAction_FRAME_ACTIVATED: - // as the frame sends more ACTIVATED than DEACTIVATING events we check this with our own flag, so the listeners - // will be notified only when the first activation occurs -// if (!m_bActive) - // TODO : when de DEACTIVATED-event is implemented (MBA) reinsert this line -// { -// while (aIter.hasMoreElements()) -// ((::com::sun::star::form::XFormControllerListener*)aIter.next())->formActivated(aEvt); -// } -// m_bActive = sal_True; - break; - - case ::com::sun::star::frame::FrameAction_FRAME_DEACTIVATING: -// while (aIter.hasMoreElements()) -// ((::com::sun::star::form::XFormControllerListener*)aIter.next())->formDeactivated(aEvt); -// m_bActive = sal_False; - break; - default: - break; - } } //------------------------------------------------------------------ @@ -559,22 +531,31 @@ DBG_DTOR(SbaXDataBrowserController,NULL); } + // ----------------------------------------------------------------------- -void SAL_CALL SbaXDataBrowserController::attachFrame(const Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( RuntimeException ) +void SbaXDataBrowserController::startFrameListening( const Reference< XFrame >& _rxFrame ) { - Reference< ::com::sun::star::frame::XFrameActionListener > xAggListener; - if (m_xFormControllerImpl.is()) - m_xFormControllerImpl->queryAggregation(::getCppuType((const Reference< ::com::sun::star::frame::XFrameActionListener>*)0)) >>= xAggListener; + OGenericUnoController::startFrameListening( _rxFrame ); + + Reference< XFrameActionListener > xAggListener; + if ( m_xFormControllerImpl.is() ) + m_xFormControllerImpl->queryAggregation( XFrameActionListener::static_type() ) >>= xAggListener; + + if ( _rxFrame.is() && xAggListener.is() ) + _rxFrame->addFrameActionListener( xAggListener ); +} - // log off my aggregated object - if (m_xCurrentFrame.is() && xAggListener.is()) - m_xCurrentFrame->removeFrameActionListener(xAggListener); +// ----------------------------------------------------------------------- +void SbaXDataBrowserController::stopFrameListening( const Reference< XFrame >& _rxFrame ) +{ + OGenericUnoController::stopFrameListening( _rxFrame ); - OGenericUnoController::attachFrame(xFrame); + Reference< XFrameActionListener > xAggListener; + if ( m_xFormControllerImpl.is() ) + m_xFormControllerImpl->queryAggregation( XFrameActionListener::static_type() ) >>= xAggListener; - // and log on to the new frame - if (m_xCurrentFrame.is() && xAggListener.is()) - m_xCurrentFrame->addFrameActionListener(xAggListener); + if ( _rxFrame.is() && xAggListener.is() ) + _rxFrame->removeFrameActionListener( xAggListener ); } // ----------------------------------------------------------------------------- @@ -944,24 +925,12 @@ void SbaXDataBrowserController::disposing(const EventObject& Source) throw( RuntimeException ) { // if it's a component other than our aggregate, forward it to the aggregate - if (m_xFormControllerImpl != Source.Source) + if ( m_xFormControllerImpl != Source.Source ) { Reference< XEventListener > xAggListener; - m_xFormControllerImpl->queryAggregation(::getCppuType(&xAggListener)) >>= xAggListener; - if (xAggListener.is()) - xAggListener->disposing(Source); - } - - // if it's our frame, remove the aggregate as listener - if (Source.Source == m_xCurrentFrame) - { - // our aggregated object doesn't handle its frame action listening itself, so we have to log it off - Reference< XFrameActionListener > xAggListener; - if (m_xFormControllerImpl.is()) - { - m_xFormControllerImpl->queryAggregation(::getCppuType(&xAggListener)) >>= xAggListener; - m_xCurrentFrame->removeFrameActionListener(xAggListener); - } + m_xFormControllerImpl->queryAggregation( ::getCppuType( &xAggListener ) ) >>= xAggListener; + if ( xAggListener.is( )) + xAggListener->disposing( Source ); } // is it the grid control ? @@ -1156,15 +1125,6 @@ // ----------------------------------------------------------------------- void SbaXDataBrowserController::disposing() { - // our aggregated object doesn't handle its frame action listening itself, so we have to log it off - Reference< XFrameActionListener > xAggListener; - if (m_xFormControllerImpl.is()) - { - m_xFormControllerImpl->queryAggregation(::getCppuType(&xAggListener)) >>= xAggListener; - if(m_xCurrentFrame.is()) // may be null if the component dba couldn't be loaded - m_xCurrentFrame->removeFrameActionListener(xAggListener); - } - // and dispose the aggregate if (m_xFormControllerImpl.is()) { @@ -1264,12 +1224,15 @@ //------------------------------------------------------------------------------ void SbaXDataBrowserController::frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( RuntimeException ) { - if ((::com::sun::star::frame::XFrame*)aEvent.Frame.get() == (::com::sun::star::frame::XFrame*)m_xCurrentFrame.get()) - switch (aEvent.Action) + ::osl::MutexGuard aGuard( m_aMutex ); + + OGenericUnoController::frameAction( aEvent ); + + if ( aEvent.Source == getFrame() ) + switch ( aEvent.Action ) { - case ::com::sun::star::frame::FrameAction_FRAME_ACTIVATED: - case ::com::sun::star::frame::FrameAction_FRAME_UI_ACTIVATED: - m_bFrameUiActive = sal_True; + case FrameAction_FRAME_ACTIVATED: + case FrameAction_FRAME_UI_ACTIVATED: // ensure that the active cell (if any) has the focus m_aAsyncGetCellFocus.Call(); // start the clipboard timer @@ -1279,9 +1242,8 @@ OnInvalidateClipboard( NULL ); } break; - case ::com::sun::star::frame::FrameAction_FRAME_DEACTIVATING: - case ::com::sun::star::frame::FrameAction_FRAME_UI_DEACTIVATING: - m_bFrameUiActive = sal_False; + case FrameAction_FRAME_DEACTIVATING: + case FrameAction_FRAME_UI_DEACTIVATING: // stop the clipboard invalidator if (getBrowserView() && getBrowserView()->getVclControl() && m_aInvalidateClipboard.IsActive()) { @@ -1467,10 +1429,10 @@ sal_Bool bIsReadOnly = rEdit.IsReadOnly(); switch (nId) { - case ID_BROWSER_CUT: aReturn.bEnabled = m_bFrameUiActive && bHasLen && !bIsReadOnly; break; - case SID_COPY : aReturn.bEnabled = m_bFrameUiActive && bHasLen; break; + case ID_BROWSER_CUT: aReturn.bEnabled = m_aCurrentFrame.isActive() && bHasLen && !bIsReadOnly; break; + case SID_COPY : aReturn.bEnabled = m_aCurrentFrame.isActive() && bHasLen; break; case ID_BROWSER_PASTE: - aReturn.bEnabled = m_bFrameUiActive && !bIsReadOnly; + aReturn.bEnabled = m_aCurrentFrame.isActive() && !bIsReadOnly; if(aReturn.bEnabled) { aReturn.bEnabled = aReturn.bEnabled && IsFormatSupported( m_aSystemClipboard.GetDataFlavorExVector(), FORMAT_STRING ); @@ -2961,9 +2923,10 @@ // for task frames, we have our own cut/copy/paste functionality // 22.05.2002 - 99030 - [EMAIL PROTECTED] - if ( m_xCurrentFrame.is() && _xLayoutManager.is() ) + Reference< XFrame > xFrame( getFrame() ); + if ( xFrame.is() && _xLayoutManager.is() ) { - if ( m_xCurrentFrame->isTop() ) + if ( xFrame->isTop() ) { _xLayoutManager->lock(); _xLayoutManager->createElement( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/copyobjectbar")) ); File [changed]: exsrcbrw.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/exsrcbrw.cxx?r1=1.30&r2=1.30.198.1 Delta lines: +4 -4 ------------------- --- exsrcbrw.cxx 2006-09-17 06:58:15+0000 1.30 +++ exsrcbrw.cxx 2007-12-13 11:22:06+0000 1.30.198.1 @@ -4,9 +4,9 @@ * * $RCSfile: exsrcbrw.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.30.198.1 $ * - * last change: $Author: obo $ $Date: 2006/09/17 06:58:15 $ + * last change: $Author: fs $ $Date: 2007/12/13 11:22:06 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -336,7 +336,7 @@ if (m_xUrlTransformer.is()) m_xUrlTransformer->assemble(aNewUrl); - Reference< ::com::sun::star::frame::XDispatchProvider > xFrameDispatcher(m_xCurrentFrame, UNO_QUERY); + Reference< XDispatchProvider > xFrameDispatcher( getFrame(), UNO_QUERY ); if (xFrameDispatcher.is()) xReturn = xFrameDispatcher->queryDispatch(aNewUrl, aTargetFrameName, FrameSearchFlag::PARENT); File [changed]: genericcontroller.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/genericcontroller.cxx?r1=1.81&r2=1.81.56.1 Delta lines: +93 -77 --------------------- --- genericcontroller.cxx 2007-09-26 14:48:32+0000 1.81 +++ genericcontroller.cxx 2007-12-13 11:22:06+0000 1.81.56.1 @@ -4,9 +4,9 @@ * * $RCSfile: genericcontroller.cxx,v $ * - * $Revision: 1.81 $ + * $Revision: 1.81.56.1 $ * - * last change: $Author: hr $ $Date: 2007/09/26 14:48:32 $ + * last change: $Author: fs $ $Date: 2007/12/13 11:22:06 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -132,6 +132,7 @@ #include <algorithm> #include <hash_map> +using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::frame; @@ -171,10 +172,10 @@ ,m_aAsyncInvalidateAll(LINK(this, OGenericUnoController, OnAsyncInvalidateAll)) ,m_aAsyncCloseTask(LINK(this, OGenericUnoController, OnAsyncCloseTask)) ,m_xServiceFactory(_rM) + ,m_aCurrentFrame( *this ) ,m_pView(NULL) ,m_bPreview(sal_False) ,m_bReadOnly(sal_False) - ,m_bFrameUiActive(sal_False) ,m_bCurrentlyModified(sal_False) { DBG_CTOR(OGenericUnoController,NULL); @@ -358,27 +359,25 @@ } // ------------------------------------------------------------------------- -sal_Bool OGenericUnoController::startFrameListening( ) +void OGenericUnoController::startFrameListening( const Reference< XFrame >& _rxFrame ) { - if ( m_xCurrentFrame.is() ) - m_xCurrentFrame->addFrameActionListener( static_cast< XFrameActionListener* >( this ) ); - return m_xCurrentFrame.is(); + if ( _rxFrame.is() ) + _rxFrame->addFrameActionListener( this ); } // ------------------------------------------------------------------------- -void OGenericUnoController::stopFrameListening( ) +void OGenericUnoController::stopFrameListening( const Reference< XFrame >& _rxFrame ) { - if ( m_xCurrentFrame.is() ) - m_xCurrentFrame->removeFrameActionListener( static_cast< XFrameActionListener* >( this ) ); + if ( _rxFrame.is() ) + _rxFrame->removeFrameActionListener( this ); } // ------------------------------------------------------------------------- void OGenericUnoController::disposing(const EventObject& Source) throw( RuntimeException ) { // our frame ? - Reference< XFrame > xSourceFrame(Source.Source, UNO_QUERY); - if ( xSourceFrame == m_xCurrentFrame ) - stopFrameListening( ); + if ( Source.Source == getFrame() ) + stopFrameListening( getFrame() ); } //------------------------------------------------------------------------ void OGenericUnoController::modified(const EventObject& aEvent) throw( RuntimeException ) @@ -396,21 +395,22 @@ InvalidateFeature(ID_BROWSER_UNDO); } // ----------------------------------------------------------------------- -void OGenericUnoController::attachFrame(const Reference< XFrame > & xFrame) throw( RuntimeException ) +void OGenericUnoController::attachFrame( const Reference< XFrame >& _rxFrame ) throw( RuntimeException ) { vos::OGuard aSolarGuard( Application::GetSolarMutex() ); ::osl::MutexGuard aGuard(m_aMutex); - stopFrameListening( ); - m_xCurrentFrame = xFrame; + stopFrameListening( m_aCurrentFrame.getFrame() ); + Reference< XFrame > xFrame = m_aCurrentFrame.attachFrame( _rxFrame ); + startFrameListening( xFrame ); - if ( startFrameListening( ) ) - m_bFrameUiActive = m_xCurrentFrame->isActive(); - loadMenu(xFrame); - if ( m_xCurrentFrame.is() ) + loadMenu( xFrame ); + + if ( xFrame.is() ) updateTitle(); + if ( getView() ) - getView()->attachFrame(xFrame); + getView()->attachFrame( xFrame ); } // ----------------------------------------------------------------------------- void OGenericUnoController::updateTitle() @@ -816,6 +816,12 @@ } // ----------------------------------------------------------------------- +void SAL_CALL OGenericUnoController::dispose() throw(RuntimeException) +{ + OGenericUnoController_COMPBASE::dispose(); +} + +// ----------------------------------------------------------------------- void OGenericUnoController::disposing() { { @@ -840,10 +846,11 @@ // check out from all the objects we are listening // the frame - stopFrameListening( ); + stopFrameListening( m_aCurrentFrame.getFrame() ); + m_aCurrentFrame.attachFrame( NULL ); + m_xMasterDispatcher = NULL; m_xSlaveDispatcher = NULL; - m_xCurrentFrame = NULL; m_xServiceFactory = NULL; } @@ -862,9 +869,9 @@ //------------------------------------------------------------------------------ void OGenericUnoController::frameAction(const FrameActionEvent& aEvent) throw( RuntimeException ) { - if ((XFrame*)aEvent.Frame.get() == (XFrame*)m_xCurrentFrame.get()) - m_bFrameUiActive = ( FrameAction_FRAME_UI_ACTIVATED == aEvent.Action ) - || ( FrameAction_FRAME_ACTIVATED == aEvent.Action ); + ::osl::MutexGuard aGuard( m_aMutex ); + if ( aEvent.Frame == m_aCurrentFrame.getFrame() ) + m_aCurrentFrame.frameAction( aEvent.Action ); } //------------------------------------------------------------------------------ @@ -1061,30 +1068,13 @@ // ----------------------------------------------------------------------------- IMPL_LINK(OGenericUnoController, OnAsyncCloseTask, void*, EMPTYARG) { - if(!OGenericUnoController_COMPBASE::rBHelper.bInDispose) + if ( !OGenericUnoController_COMPBASE::rBHelper.bInDispose ) { try { -/*AS // #104032# OJ - URL aURL; - aURL.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:CloseDoc")); - if (m_xUrlTransformer.is()) - m_xUrlTransformer->parseStrict(aURL); - Reference< XDispatchProvider > xDispProv(m_xCurrentFrame, UNO_QUERY); - Reference< XDispatch > xCloseDispatch; - if (xDispProv.is()) - xCloseDispatch = xDispProv->queryDispatch(aURL, m_xCurrentFrame->getName(), FrameSearchFlag::SELF); - OSL_ENSURE(xCloseDispatch.is(), "SbaTableQueryBrowser::OnAsyncCloseTask: could not get a dispatcher!"); - if ( xCloseDispatch.is() && xCloseDispatch != *this ) - { - xCloseDispatch->dispatch(aURL, Sequence< PropertyValue >()); - } - else*/ - { - Reference< ::com::sun::star::util::XCloseable > xCloseable(m_xCurrentFrame,UNO_QUERY); - if(xCloseable.is()) - xCloseable->close(sal_False); // false - holds the owner ship for this frame inside this object! - } + Reference< util::XCloseable > xCloseable( m_aCurrentFrame.getFrame(), UNO_QUERY ); + if ( xCloseable.is() ) + xCloseable->close( sal_False ); // false - holds the owner ship for this frame inside this object! } catch(const Exception&) {} } @@ -1099,11 +1089,27 @@ 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( m_aMutex ); + return m_aCurrentFrame.getFrame(); +} + // ----------------------------------------------------------------------------- sal_Bool SAL_CALL OGenericUnoController::attachModel(const Reference< XModel > & /*xModel*/) throw( RuntimeException ) { + OSL_ENSURE( false, "OGenericUnoController::attachModel: not supported!" ); return sal_False; } + // ----------------------------------------------------------------------------- void OGenericUnoController::executeUnChecked(sal_uInt16 _nCommandId, const Sequence< PropertyValue >& aArgs) { @@ -1262,32 +1268,26 @@ URL aURL; aURL.Complete = suURL; - if (m_xUrlTransformer.is()) - m_xUrlTransformer->parseStrict(aURL); - - openHelpAgent(aURL); + openHelpAgent( aURL ); } void OGenericUnoController::openHelpAgent(sal_Int32 _nHelpId) - { - URL aURL = createHelpAgentURL(lcl_getModuleHelpModuleName( getFrame() ),_nHelpId); - if (m_xUrlTransformer.is()) - m_xUrlTransformer->parseStrict(aURL); - - openHelpAgent(aURL); +{ + openHelpAgent( createHelpAgentURL( lcl_getModuleHelpModuleName( getFrame() ), _nHelpId ) ); } -void OGenericUnoController::openHelpAgent(URL aURL) +void OGenericUnoController::openHelpAgent( const URL& _rURL ) { try { - // URL aURL = createHelpAgentURL(lcl_getModuleHelpModuleName( getFrame() ),_nHelpId); - // if (m_xUrlTransformer.is()) - // m_xUrlTransformer->parseStrict(aURL); + URL aURL( _rURL ); - Reference< XDispatchProvider > xDispProv(m_xCurrentFrame, UNO_QUERY); + if ( m_xUrlTransformer.is() ) + m_xUrlTransformer->parseStrict(aURL); + + Reference< XDispatchProvider > xDispProv( m_aCurrentFrame.getFrame(), UNO_QUERY ); Reference< XDispatch > xHelpDispatch; - if (xDispProv.is()) + if ( xDispProv.is() ) xHelpDispatch = xDispProv->queryDispatch(aURL, ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("_helpagent")), FrameSearchFlag::PARENT | FrameSearchFlag::SELF); OSL_ENSURE(xHelpDispatch.is(), "SbaTableQueryBrowser::openHelpAgent: could not get a dispatcher!"); if (xHelpDispatch.is()) @@ -1304,14 +1304,16 @@ Reference< ::com::sun::star::awt::XWindow> OGenericUnoController::getTopMostContainerWindow() const { Reference< ::com::sun::star::awt::XWindow> xWindow; + // get the top most window - if ( m_xCurrentFrame.is() ) + Reference< XFrame > xFrame( m_aCurrentFrame.getFrame() ); + if ( xFrame.is() ) { - xWindow = m_xCurrentFrame->getContainerWindow(); - Reference<XFrame> xFrame = m_xCurrentFrame; + xWindow = xFrame->getContainerWindow(); + while ( xFrame.is() && !xFrame->isTop() ) { - xFrame.set(xFrame->getCreator(),UNO_QUERY); + xFrame.set( xFrame->getCreator(), UNO_QUERY ); } if ( xFrame.is() ) xWindow = xFrame->getContainerWindow(); @@ -1319,19 +1321,19 @@ return xWindow; } // ----------------------------------------------------------------------------- -void OGenericUnoController::setTitle(const ::rtl::OUString& _sName) +void OGenericUnoController::setTitle( const ::rtl::OUString& _sName ) { try { - Reference<XPropertySet> xProp(m_xCurrentFrame,UNO_QUERY); - if ( xProp.is() && xProp->getPropertySetInfo()->hasPropertyByName(PROPERTY_TITLE) ) + Reference< XPropertySet > xFrameProps( getFrame(), UNO_QUERY ); + if ( xFrameProps.is() && xFrameProps->getPropertySetInfo()->hasPropertyByName( PROPERTY_TITLE ) ) { - xProp->setPropertyValue(PROPERTY_TITLE,makeAny(_sName)); + xFrameProps->setPropertyValue( PROPERTY_TITLE, makeAny( _sName ) ); } } - catch(Exception) + catch( const Exception& ) { - OSL_ENSURE(0,"Exception catched while setting the title!"); + DBG_UNHANDLED_EXCEPTION(); } } // ----------------------------------------------------------------------------- @@ -1346,6 +1348,20 @@ { return GetState( _nCommandId ).bEnabled; } + +// ----------------------------------------------------------------------------- +sal_Bool OGenericUnoController::isDataSourceReadOnly() const +{ + return sal_False; +} + +// ----------------------------------------------------------------------------- +Reference< XModel > OGenericUnoController::getAssociatedModel() const +{ + // default to our very own model + return const_cast< OGenericUnoController* >( this )->getModel(); +} + // ----------------------------------------------------------------------------- sal_Bool OGenericUnoController::isCommandChecked(sal_uInt16 _nCommandId) const { File [changed]: unodatbr.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.192&r2=1.192.2.1 Delta lines: +8 -7 ------------------- --- unodatbr.cxx 2007-11-21 15:50:54+0000 1.192 +++ unodatbr.cxx 2007-12-13 11:22:06+0000 1.192.2.1 @@ -4,9 +4,9 @@ * * $RCSfile: unodatbr.cxx,v $ * - * $Revision: 1.192 $ + * $Revision: 1.192.2.1 $ * - * last change: $Author: ihi $ $Date: 2007/11/21 15:50:54 $ + * last change: $Author: fs $ $Date: 2007/12/13 11:22:06 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1259,7 +1259,7 @@ // ------------------------------------------------------------------------- void SbaTableQueryBrowser::connectExternalDispatches() { - Reference< XDispatchProvider > xProvider(m_xCurrentFrame, UNO_QUERY); + Reference< XDispatchProvider > xProvider( getFrame(), UNO_QUERY ); DBG_ASSERT(xProvider.is(), "SbaTableQueryBrowser::connectExternalDispatches: no DispatchProvider !"); if (xProvider.is()) { @@ -1508,9 +1508,10 @@ SbaXDataBrowserController::attachFrame(_xFrame); - if(m_xCurrentFrame.is()) + Reference< XFrame > xCurrentFrame( getFrame() ); + if ( xCurrentFrame.is() ) { - m_xCurrentFrameParent = m_xCurrentFrame->findFrame(::rtl::OUString::createFromAscii("_parent"),FrameSearchFlag::PARENT); + m_xCurrentFrameParent = xCurrentFrame->findFrame(::rtl::OUString::createFromAscii("_parent"),FrameSearchFlag::PARENT); if(m_xCurrentFrameParent.is()) m_xCurrentFrameParent->addFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this); } @@ -1519,7 +1520,7 @@ try { Reference< XLayoutManager > xLayouter; - Reference< XPropertySet > xFrameProps( m_xCurrentFrame, UNO_QUERY ); + Reference< XPropertySet > xFrameProps( xCurrentFrame, UNO_QUERY ); if ( xFrameProps.is() ) xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ) >>= xLayouter; --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
