summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx11
-rw-r--r--dbaccess/source/ui/inc/sqlmessage.hxx12
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx7
3 files changed, 26 insertions, 4 deletions
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 9c3ecc89c51f..c46035c7bdcf 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -751,7 +751,16 @@ IMPL_LINK( OSQLMessageBox, ButtonClickHdl, Button *, /*pButton*/ )
//==================================================================
OSQLWarningBox::OSQLWarningBox( Window* _pParent, const OUString& _rMessage, WinBits _nStyle,
const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo )
- :OSQLMessageBox( _pParent, String( ModuleRes( STR_STAT_WARNING ) ), _rMessage, _nStyle, OSQLMessageBox::Warning, _pAdditionalErrorInfo )
+ :OSQLMessageBox( _pParent, String( ModuleRes( STR_EXCEPTION_WARNING ) ), _rMessage, _nStyle, OSQLMessageBox::Warning, _pAdditionalErrorInfo )
+{
+}
+
+//==================================================================
+// OSQLErrorBox
+//==================================================================
+OSQLErrorBox::OSQLErrorBox( Window* _pParent, const OUString& _rMessage, WinBits _nStyle,
+ const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo )
+ :OSQLMessageBox( _pParent, String( ModuleRes( STR_EXCEPTION_ERROR ) ), _rMessage, _nStyle, OSQLMessageBox::Error, _pAdditionalErrorInfo )
{
}
diff --git a/dbaccess/source/ui/inc/sqlmessage.hxx b/dbaccess/source/ui/inc/sqlmessage.hxx
index da36617be5d3..76d896f4e84f 100644
--- a/dbaccess/source/ui/inc/sqlmessage.hxx
+++ b/dbaccess/source/ui/inc/sqlmessage.hxx
@@ -119,6 +119,18 @@ public:
const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = NULL );
};
+//==================================================================
+// OSQLErrorBox
+//==================================================================
+class OSQLErrorBox : public OSQLMessageBox
+{
+public:
+ OSQLErrorBox( Window* _pParent,
+ const OUString& _rMessage,
+ WinBits _nStyle = WB_OK | WB_DEF_OK,
+ const ::dbtools::SQLExceptionInfo* _pAdditionalErrorInfo = NULL );
+};
+
//.........................................................................
} // namespace dbaui
//.........................................................................
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 8897a5de2911..342a3413b281 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -633,7 +633,7 @@ sal_Bool OSelectionBrowseBox::fillColumnRef(const ::rtl::OUString& _sColumnName,
{
String sErrorMsg(ModuleRes(RID_STR_FIELD_DOESNT_EXIST));
sErrorMsg.SearchAndReplaceAscii("$name$",_sColumnName);
- OSQLWarningBox( this, sErrorMsg ).Execute();
+ OSQLErrorBox( this, sErrorMsg ).Execute();
bError = sal_True;
}
else
@@ -739,7 +739,8 @@ sal_Bool OSelectionBrowseBox::saveField(String& _sFieldName ,OTableFieldDescRef&
// something different which we have to check
String sErrorMessage( ModuleRes( STR_QRY_COLUMN_NOT_FOUND ) );
sErrorMessage.SearchAndReplaceAscii("$name$",_sFieldName);
- OSQLWarningBox( this, sErrorMessage ).Execute();
+ OSQLErrorBox( this, sErrorMessage ).Execute();
+
return sal_True;
}
@@ -895,7 +896,7 @@ sal_Bool OSelectionBrowseBox::saveField(String& _sFieldName ,OTableFieldDescRef&
{ // the field could not be inserted
String sErrorMessage( ModuleRes( RID_STR_FIELD_DOESNT_EXIST ) );
sErrorMessage.SearchAndReplaceAscii("$name$",aSelEntry->GetField());
- OSQLWarningBox( this, sErrorMessage ).Execute();
+ OSQLErrorBox( this, sErrorMessage ).Execute();
bError = sal_True;
}
}