Kaydet (Commit) d931b994 authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

show errors as errors, not warning

Change-Id: I32e514fbfbd323b688b25b9e2165d0c76e3c4db5
üst f1bde8cb
......@@ -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 )
{
}
......
......@@ -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
//.........................................................................
......
......@@ -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;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment