Tag: cws_src680_odbmacros2 User: fs Date: 2008-02-06 08:35:54+0000 Modified: dba/dbaccess/source/ui/browser/unodatbr.cxx
Log: copying the fix for #i85879# into this CWS: 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.192.2.7&r2=1.192.2.8 Delta lines: +21 -33 --------------------- --- unodatbr.cxx 2008-02-04 22:35:43+0000 1.192.2.7 +++ unodatbr.cxx 2008-02-06 08:35:51+0000 1.192.2.8 @@ -4,9 +4,9 @@ * * $RCSfile: unodatbr.cxx,v $ * - * $Revision: 1.192.2.7 $ + * $Revision: 1.192.2.8 $ * - * last change: $Author: fs $ $Date: 2008/02/04 22:35:43 $ + * last change: $Author: fs $ $Date: 2008/02/06 08:35:51 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1322,42 +1322,30 @@ if ( xCurrentFrame.is() ) { m_xCurrentFrameParent = 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( xCurrentFrame, UNO_QUERY ); - if ( xFrameProps.is() ) - xFrameProps->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "LayoutManager" ) ) ) >>= xLayouter; + Reference< XPropertySet > xFrameProps( m_aCurrentFrame.getFrame(), 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 @@ -3464,7 +3452,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]
