User: kz Date: 2008-03-05 16:53:34+0000 Modified: dba/dbaccess/source/ui/browser/unodatbr.cxx
Log: INTEGRATION: CWS dba30a (1.193.10); FILE MERGED 2008/02/05 21:38:27 fs 1.193.10.1: #i85879# cleanup the toolbar mess in the data source browser File Changes: Directory: /dba/dbaccess/source/ui/browser/ =========================================== File [changed]: unodatbr.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/browser/unodatbr.cxx?r1=1.194&r2=1.195 Delta lines: +19 -31 --------------------- --- unodatbr.cxx 2008-03-05 16:33:23+0000 1.194 +++ unodatbr.cxx 2008-03-05 16:53:32+0000 1.195 @@ -1510,45 +1510,33 @@ SbaXDataBrowserController::attachFrame(_xFrame); - if(m_xCurrentFrame.is()) + if ( m_xCurrentFrame.is() ) { m_xCurrentFrameParent = m_xCurrentFrame->findFrame(::rtl::OUString::createFromAscii("_parent"),FrameSearchFlag::PARENT); - if(m_xCurrentFrameParent.is()) + if ( m_xCurrentFrameParent.is() ) m_xCurrentFrameParent->addFrameActionListener((::com::sun::star::frame::XFrameActionListener*)this); - } // obtain our toolbox try { - Reference< XLayoutManager > xLayouter; - Reference< XPropertySet > xFrameProps( m_xCurrentFrame, UNO_QUERY ); - if ( xFrameProps.is() ) - xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ) >>= xLayouter; + Reference< XPropertySet > xFrameProps( m_xCurrentFrame, UNO_QUERY_THROW ); + Reference< XLayoutManager > xLayouter( + xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ), + UNO_QUERY ); if ( xLayouter.is() ) { - Reference< XUIElement > xUI; - try - { - xUI = xLayouter->getElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/toolbar" ) ) ); - if ( !xUI.is() ) - xUI = xLayouter->getElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/browserobjectbar" ) ) ); - } - catch( const Exception& ) - { // nii - if ( !xUI.is() ) - xUI = xLayouter->getElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/browserobjectbar" ) ) ); - } - if ( xUI.is() ) - { + Reference< XUIElement > xUI( + xLayouter->getElement( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/toolbar" ) ) ), + UNO_SET_THROW ); m_xMainToolbar = m_xMainToolbar.query( xUI->getRealInterface() ); OSL_ENSURE( m_xMainToolbar.is(), "SbaTableQueryBrowser::attachFrame: where's my toolbox?" ); } } - } catch( const Exception& ) { - OSL_ENSURE( sal_False, "SbaTableQueryBrowser::attachFrame: caught an exception!" ); + DBG_UNHANDLED_EXCEPTION(); + } } // get the dispatchers for the external slots @@ -3693,7 +3681,7 @@ if ( xLayoutManager.is() ) { xLayoutManager->lock(); - xLayoutManager->createElement( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/browserobjectbar" ))); + xLayoutManager->createElement( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:resource/toolbar/toolbar" ))); xLayoutManager->unlock(); xLayoutManager->doLayout(); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
