summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg/sqlmessage.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2007-07-06 07:19:33 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2007-07-06 07:19:33 +0000
commitc7c16cb2afcca46dda5e6c21578a1994f05f0a67 (patch)
treef397b1ff437f613d29aa4120bc74c4f441809936 /dbaccess/source/ui/dlg/sqlmessage.cxx
parent94f0e9bd316fbeb0079e75e12c9cdc1a1b4f789f (diff)
INTEGRATION: CWS oj14 (1.20.4); FILE MERGED
2007/06/06 19:16:48 fs 1.20.4.7: slightly adjusted the conditions when we show two texts in the main dialog 2007/06/04 18:30:31 oj 1.20.4.6: RESYNC: (1.24-1.26); FILE MERGED 2006/11/07 09:25:07 oj 1.20.4.5: RESYNC: (1.21-1.24); FILE MERGED 2006/07/04 08:01:03 oj 1.20.4.4: RESYNC: (1.20-1.21); FILE MERGED 2006/04/25 13:03:02 oj 1.20.4.3: new include 2006/03/20 07:48:34 oj 1.20.4.2: use of module client helper 2006/01/03 07:49:11 oj 1.20.4.1: changed module client
Diffstat (limited to 'dbaccess/source/ui/dlg/sqlmessage.cxx')
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx21
1 files changed, 15 insertions, 6 deletions
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 5aae59260634..8bcd5bb7c951 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.26 $
+ * $Revision: 1.27 $
*
- * last change: $Author: kz $ $Date: 2007-05-10 10:26:15 $
+ * last change: $Author: rt $ $Date: 2007-07-06 08:19:33 $
*
* 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 @@ void OSQLMessageBox::impl_positionControls()
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;
}