Tag: cws_src680_dba23b User: fs Date: 2007-07-08 20:33:29+0000 Modified: dba/dbaccess/source/ui/dlg/sqlmessage.cxx
Log: copying the change from CWS oj14 (already integrated) herein 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.26&r2=1.26.12.1 Delta lines: +16 -7 -------------------- --- sqlmessage.cxx 2007-05-10 10:26:15+0000 1.26 +++ sqlmessage.cxx 2007-07-08 20:33:26+0000 1.26.12.1 @@ -4,9 +4,9 @@ * * $RCSfile: sqlmessage.cxx,v $ * - * $Revision: 1.26 $ + * $Revision: 1.26.12.1 $ * - * last change: $Author: kz $ $Date: 2007/05/10 10:26:15 $ + * last change: $Author: fs $ $Date: 2007/07/08 20:33:26 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -39,9 +39,6 @@ #ifndef _DBAUI_SQLMESSAGE_HXX_ #include "sqlmessage.hxx" #endif -#ifndef _DBAUI_MODULE_DBU_HXX_ -#include "moduledbu.hxx" -#endif #ifndef _DBU_DLG_HRC_ #include "dbu_dlg.hrc" #endif @@ -81,6 +78,9 @@ #ifndef DBAUI_TOOLS_HXX #include "UITools.hxx" #endif +#ifndef _DBAUI_MODULE_DBU_HXX_ +#include "moduledbu.hxx" +#endif #define BUTTONID_MORE BUTTONID_RETRY + 1 @@ -512,8 +512,17 @@ sPrimary = rFirstInfo.sMessage; if ( pSecondInfo ) { + // we show two elements in the main dialog if and only if one of + // - the first element in the chain is an SQLContext, and the second + // element denotes its sub entry + // - the first and the second element are both independent (i.e. the second + // is no sub entry), and none of them is a context. bool bFirstElementIsContext = ( rFirstInfo.eType == SQLExceptionInfo::SQL_CONTEXT ); - if ( !bFirstElementIsContext || ( pSecondInfo->bSubEntry ) ) + bool bSecondElementIsContext = ( pSecondInfo->eType == SQLExceptionInfo::SQL_CONTEXT ); + + if ( bFirstElementIsContext && pSecondInfo->bSubEntry ) + sSecondary = pSecondInfo->sMessage; + if ( !bFirstElementIsContext && !bSecondElementIsContext ) sSecondary = pSecondInfo->sMessage; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
