User: obo Date: 2006/07/10 08:33:45 Modified: dba/dbaccess/source/ui/inc/sqlmessage.hxx
Log: INTEGRATION: CWS qiq (1.4.124); FILE MERGED 2006/05/19 10:53:46 fs 1.4.124.3: #i51143# 2006/05/11 10:39:27 fs 1.4.124.2: #51143# some refactoring - should now display the More button only when (halfway) needed; should now also allow for message boxes displaying one text only 2006/05/10 11:00:22 fs 1.4.124.1: +MessageType::AUTO File Changes: Directory: /dba/dbaccess/source/ui/inc/ ======================================= File [changed]: sqlmessage.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/inc/sqlmessage.hxx?r1=1.4&r2=1.5 Delta lines: +21 -28 --------------------- --- sqlmessage.hxx 8 Sep 2005 16:03:36 -0000 1.4 +++ sqlmessage.hxx 10 Jul 2006 15:33:43 -0000 1.5 @@ -45,10 +45,13 @@ #ifndef _SV_BTNDLG_HXX #include <vcl/btndlg.hxx> #endif -#ifndef _COM_SUN_STAR_UNO_ANY_HXX_ -#include <com/sun/star/uno/Any.hxx> + +#ifndef _DBHELPER_DBEXCEPTION_HXX_ +#include <connectivity/dbexception.hxx> #endif +#include <memory> + // some forwards namespace com { namespace sun { namespace star { namespace sdb { @@ -58,10 +61,6 @@ class SQLException; } } } } -namespace dbtools -{ - class SQLExceptionInfo; -} //......................................................................... namespace dbaui @@ -71,14 +70,14 @@ //================================================================== // OSQLMessageBox //================================================================== +struct SQLMessageBox_Impl; class OSQLMessageBox : public ButtonDialog { FixedImage m_aInfoImage; FixedText m_aTitle; FixedText m_aMessage; - ::com::sun::star::uno::Any m_aNextChainElement; - PushButton* m_pInfoButton; + ::std::auto_ptr< SQLMessageBox_Impl > m_pImpl; public: enum MessageType @@ -86,21 +85,12 @@ Info, Error, Warning, - Query + Query, + + AUTO }; public: - /** display a SQLException - <p/> - @param _rTitle main message - @param _rError detailed message, may contain an exception chain to be displayed on an user request - */ - OSQLMessageBox(Window* _pParent, - const UniString& _rTitle, - const ::com::sun::star::sdbc::SQLException& _rError, - WinBits _nStyle = WB_OK | WB_DEF_OK, - MessageType _eImage = Info); - /** display an SQLException with auto-recognizing a main and a detailed message <p/> The first two messages from the exception chain are used as main and detailed message (recognizing the @@ -111,7 +101,7 @@ OSQLMessageBox(Window* _pParent, const ::com::sun::star::sdbc::SQLException& _rError, WinBits _nStyle = WB_OK | WB_DEF_OK, - MessageType _eImage = Info); + MessageType _eImage = Error); /** display an SQLException with auto-recognizing a main and a detailed message <p/> @@ -123,12 +113,13 @@ OSQLMessageBox(Window* _pParent, const dbtools::SQLExceptionInfo& _rException, WinBits _nStyle = WB_OK | WB_DEF_OK, - MessageType _eImage = Info); + MessageType _eImage = AUTO); /** display a database related error message <p/> @param rTitle the title to display @param rMessage the detailed message to display + @param eImage determines the image to use. AUTO is disallowed in this constructor version */ OSQLMessageBox(Window* pParent, const UniString& rTitle, @@ -139,13 +130,15 @@ ~OSQLMessageBox(); private: - void Construct(const dbtools::SQLExceptionInfo& _rException, WinBits nStyle, MessageType eImage); - void Construct(const UniString& rTitle, - const UniString& rMessage, - WinBits nStyle, - MessageType eImage); + void Construct( WinBits nStyle, MessageType eImage ); DECL_LINK(ButtonClickHdl, Button* ); + +private: + void impl_positionControls(); + void impl_initImage( MessageType _eImage ); + void impl_createStandardButtons( WinBits _nStyle ); + void impl_addDetailsButton(); }; //......................................................................... --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
