User: kz Date: 2008-03-06 18:20:56+0000 Modified: dba/dbaccess/source/ui/dlg/sqlmessage.cxx
Log: INTEGRATION: CWS odbmacros2 (1.28.2); FILE MERGED 2008/01/23 14:40:49 fs 1.28.2.2: #i49133# respect our help URL 2007/12/06 13:34:15 fs 1.28.2.1: during #i49133#: support a HelpURL property File Changes: Directory: /dba/dbaccess/source/ui/dlg/ ======================================= File [changed]: sqlmessage.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/dlg/sqlmessage.cxx?r1=1.28&r2=1.29 Delta lines: +16 -15 --------------------- --- sqlmessage.cxx 2007-11-21 15:58:33+0000 1.28 +++ sqlmessage.cxx 2008-03-06 18:20:53+0000 1.29 @@ -514,6 +514,7 @@ case BUTTON_OK: nButtonID = BUTTONID_OK; break; case BUTTON_CANCEL: nButtonID = BUTTONID_CANCEL; break; case BUTTON_RETRY: nButtonID = BUTTONID_RETRY; break; + case BUTTON_HELP: nButtonID = BUTTONID_HELP; break; default: OSL_ENSURE( false, "lcl_addButton: invalid button id!" ); break; @@ -673,6 +674,16 @@ AddButton( BUTTON_OK, BUTTONID_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON ); } + if ( m_sHelpURL.getLength() ) + { + lcl_addButton( *this, BUTTON_HELP, false ); + + SmartId aHelpId( m_sHelpURL ); + if ( m_sHelpURL.indexOfAsciiL( "HID:", 4 ) == 0 ) + aHelpId = SmartId( m_sHelpURL.copy( 4 ).toInt32() ); + + SetSmartHelpId( aHelpId ); + } } //------------------------------------------------------------------------------ @@ -720,29 +731,19 @@ } //------------------------------------------------------------------------------ -OSQLMessageBox::OSQLMessageBox(Window* _pParent, const SQLException& _rError, WinBits _nStyle, MessageType _eImage) - :ButtonDialog(_pParent,WB_HORZ | WB_STDDIALOG) - ,m_aInfoImage(this) - ,m_aTitle(this,WB_WORDBREAK | WB_LEFT) - ,m_aMessage(this,WB_WORDBREAK | WB_LEFT) - ,m_pImpl( new SQLMessageBox_Impl( SQLExceptionInfo( _rError ) ) ) -{ - Construct( _nStyle, _eImage ); -} - -//------------------------------------------------------------------------------ -OSQLMessageBox::OSQLMessageBox(Window* _pParent, const SQLExceptionInfo& _rException, WinBits _nStyle, MessageType _eImage) +OSQLMessageBox::OSQLMessageBox(Window* _pParent, const SQLExceptionInfo& _rException, WinBits _nStyle, const ::rtl::OUString& _rHelpURL ) :ButtonDialog( _pParent, WB_HORZ | WB_STDDIALOG ) ,m_aInfoImage( this ) ,m_aTitle( this, WB_WORDBREAK | WB_LEFT ) ,m_aMessage( this, WB_WORDBREAK | WB_LEFT ) + ,m_sHelpURL( _rHelpURL ) ,m_pImpl( new SQLMessageBox_Impl( _rException ) ) { - Construct( _nStyle, _eImage ); + Construct( _nStyle, AUTO ); } //------------------------------------------------------------------------------ -OSQLMessageBox::OSQLMessageBox( Window* _pParent, const UniString& _rTitle, const UniString& _rMessage, WinBits _nStyle, MessageType _eImage, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo ) +OSQLMessageBox::OSQLMessageBox( Window* _pParent, const UniString& _rTitle, const UniString& _rMessage, WinBits _nStyle, MessageType _eType, const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo ) :ButtonDialog( _pParent, WB_HORZ | WB_STDDIALOG ) ,m_aInfoImage( this ) ,m_aTitle( this, WB_WORDBREAK | WB_LEFT ) @@ -756,7 +757,7 @@ m_pImpl.reset( new SQLMessageBox_Impl( SQLExceptionInfo( aError ) ) ); - Construct( _nStyle, _eImage ); + Construct( _nStyle, _eType ); } //-------------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
