summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg/sqlmessage.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2008-03-06 17:20:53 +0000
committerKurt Zenker <kz@openoffice.org>2008-03-06 17:20:53 +0000
commit7f1f315c08aa47c988db150a7fea70cd4be75c3f (patch)
tree86d9396027cf965acf6fc027807be9638643256c /dbaccess/source/ui/dlg/sqlmessage.cxx
parent95f67ba85fbd6f162a361ac8e93f9638592a49f8 (diff)
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
Diffstat (limited to 'dbaccess/source/ui/dlg/sqlmessage.cxx')
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx35
1 files changed, 18 insertions, 17 deletions
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 19cf1334b7be..b282c02f3852 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sqlmessage.cxx,v $
*
- * $Revision: 1.28 $
+ * $Revision: 1.29 $
*
- * last change: $Author: ihi $ $Date: 2007-11-21 15:58:33 $
+ * last change: $Author: kz $ $Date: 2008-03-06 18:20:53 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -514,6 +514,7 @@ namespace
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 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle )
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 @@ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage )
}
//------------------------------------------------------------------------------
-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 @@ OSQLMessageBox::OSQLMessageBox( Window* _pParent, const UniString& _rTitle, cons
m_pImpl.reset( new SQLMessageBox_Impl( SQLExceptionInfo( aError ) ) );
- Construct( _nStyle, _eImage );
+ Construct( _nStyle, _eType );
}
//--------------------------------------------------------------------------