summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/misc/datasourceconnector.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/misc/datasourceconnector.cxx')
-rw-r--r--dbaccess/source/ui/misc/datasourceconnector.cxx19
1 files changed, 8 insertions, 11 deletions
diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx
index 49053e569000..a170d02963f9 100644
--- a/dbaccess/source/ui/misc/datasourceconnector.cxx
+++ b/dbaccess/source/ui/misc/datasourceconnector.cxx
@@ -30,10 +30,12 @@
#include <connectivity/dbexception.hxx>
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <UITools.hxx>
+#include <utility>
+#include <vcl/mnemonic.hxx>
#include <vcl/outdev.hxx>
#include <vcl/stdtext.hxx>
#include <vcl/weld.hxx>
-#include <tools/diagnose_ex.h>
+#include <comphelper/diagnose_ex.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <strings.hrc>
#include <strings.hxx>
@@ -59,10 +61,10 @@ namespace dbaui
}
ODatasourceConnector::ODatasourceConnector( const Reference< XComponentContext >& _rxContext, weld::Window* _pMessageParent,
- const OUString& _rContextInformation )
+ OUString _sContextInformation )
:m_pErrorMessageParent(_pMessageParent)
,m_xContext(_rxContext)
- ,m_sContextInformation( _rContextInformation )
+ ,m_sContextInformation(std::move( _sContextInformation ))
{
}
@@ -155,11 +157,9 @@ namespace dbaui
{
OUString sMessage( DBA_RES( STR_WARNINGS_DURING_CONNECT ) );
sMessage = sMessage.replaceFirst( "$buttontext$", GetStandardText( StandardButtonType::More ) );
- sMessage = OutputDevice::GetNonMnemonicString( sMessage );
+ sMessage = removeMnemonicFromString( sMessage );
- SQLWarning aContext;
- aContext.Message = sMessage;
- aContext.NextException = aWarnings;
+ SQLWarning aContext(sMessage, {}, {}, 0, aWarnings);
aInfo = aContext;
}
xConnectionWarnings->clearWarnings();
@@ -174,10 +174,7 @@ namespace dbaui
{
if ( !m_sContextInformation.isEmpty() )
{
- SQLException aError;
- aError.Message = m_sContextInformation;
- aError.NextException = aInfo.get();
-
+ SQLException aError(m_sContextInformation, {}, {}, 0, aInfo.get());
aInfo = aError;
}
}