summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg/sqlmessage.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/dlg/sqlmessage.cxx')
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx35
1 files changed, 18 insertions, 17 deletions
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index eacc5908328d..60b533f90c19 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -22,6 +22,7 @@
#include <strings.hrc>
#include <com/sun/star/sdbc/SQLException.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
+#include <utility>
#include <vcl/stdtext.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -50,8 +51,8 @@ namespace
OUString m_defaultImageID;
public:
- explicit ImageProvider(const OUString& defaultImageID)
- : m_defaultImageID(defaultImageID)
+ explicit ImageProvider(OUString defaultImageID)
+ : m_defaultImageID(std::move(defaultImageID))
{
}
@@ -95,7 +96,7 @@ namespace
std::shared_ptr< ImageProvider > const & getImageProvider( SQLExceptionInfo::TYPE _eType ) const
{
std::shared_ptr< ImageProvider >* ppProvider( &m_pErrorImage );
- OUString sNormalImageID("dialog-error");
+ OUString sNormalImageID(u"dialog-error"_ustr);
switch ( _eType )
{
@@ -206,7 +207,7 @@ namespace
iter.next( aCurrentElement );
const SQLException* pCurrentError = aCurrentElement;
- OSL_ENSURE( pCurrentError, "lcl_buildExceptionChain: iterator failure!" );
+ assert(pCurrentError && "lcl_buildExceptionChain: iterator failure!");
// hasMoreElements should not have returned <TRUE/> in this case
ExceptionDisplayInfo aDisplayInfo( aCurrentElement.getType() );
@@ -275,9 +276,9 @@ protected:
}
OExceptionChainDialog::OExceptionChainDialog(weld::Window* pParent, ExceptionDisplayChain&& rExceptions)
- : GenericDialogController(pParent, "dbaccess/ui/sqlexception.ui", "SQLExceptionDialog")
- , m_xExceptionList(m_xBuilder->weld_tree_view("list"))
- , m_xExceptionText(m_xBuilder->weld_text_view("description"))
+ : GenericDialogController(pParent, u"dbaccess/ui/sqlexception.ui"_ustr, u"SQLExceptionDialog"_ustr)
+ , m_xExceptionList(m_xBuilder->weld_tree_view(u"list"_ustr))
+ , m_xExceptionText(m_xBuilder->weld_text_view(u"description"_ustr))
, m_aExceptions(std::move(rExceptions))
{
int nListWidth = m_xExceptionText->get_approximate_digit_width() * 28;
@@ -289,7 +290,8 @@ OExceptionChainDialog::OExceptionChainDialog(weld::Window* pParent, ExceptionDis
m_sStatusLabel = DBA_RES( STR_EXCEPTION_STATUS );
m_sErrorCodeLabel = DBA_RES( STR_EXCEPTION_ERRORCODE );
- m_xExceptionList->connect_changed(LINK(this, OExceptionChainDialog, OnExceptionSelected));
+ m_xExceptionList->connect_selection_changed(
+ LINK(this, OExceptionChainDialog, OnExceptionSelected));
bool bHave22018 = false;
size_t elementPos = 0;
@@ -481,7 +483,7 @@ void OSQLMessageBox::impl_createStandardButtons( MessBoxStyle _nStyle )
else
aTmp = m_sHelpURL;
- m_xDialog->set_help_id(OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8));
+ m_xDialog->set_help_id(aTmp);
}
void OSQLMessageBox::impl_addDetailsButton()
@@ -506,7 +508,7 @@ void OSQLMessageBox::impl_addDetailsButton()
if ( bMoreDetailsAvailable )
{
m_xDialog->add_button(GetStandardText(StandardButtonType::More), RET_MORE);
- m_xMoreButton.reset(m_xDialog->weld_widget_for_response(RET_MORE));
+ m_xMoreButton = m_xDialog->weld_button_for_response(RET_MORE);
m_xMoreButton->connect_clicked(LINK(this, OSQLMessageBox, ButtonClickHdl));
}
}
@@ -545,7 +547,7 @@ void OSQLMessageBox::Construct(weld::Window* pParent, MessBoxStyle _nStyle, Mess
break;
}
- m_xDialog.reset(Application::CreateMessageDialog(pParent, eMessageType, VclButtonsType::NONE, ""));
+ m_xDialog.reset(Application::CreateMessageDialog(pParent, eMessageType, VclButtonsType::NONE, u""_ustr));
m_xDialog->set_title(utl::ConfigManager::getProductName() + " Base");
impl_fillMessages();
@@ -555,20 +557,19 @@ void OSQLMessageBox::Construct(weld::Window* pParent, MessBoxStyle _nStyle, Mess
impl_addDetailsButton();
}
-OSQLMessageBox::OSQLMessageBox(weld::Window* pParent, const SQLExceptionInfo& rException, MessBoxStyle nStyle, const OUString& rHelpURL)
+OSQLMessageBox::OSQLMessageBox(weld::Window* pParent, const SQLExceptionInfo& rException, MessBoxStyle nStyle, OUString sHelpURL)
: m_pImpl(new SQLMessageBox_Impl(rException))
- , m_sHelpURL(rHelpURL)
+ , m_sHelpURL(std::move(sHelpURL))
{
Construct(pParent, nStyle, AUTO);
}
OSQLMessageBox::OSQLMessageBox(weld::Window* pParent, const OUString& rTitle, const OUString& rMessage, MessBoxStyle nStyle, MessageType eType, const ::dbtools::SQLExceptionInfo* pAdditionalErrorInfo )
{
- SQLContext aError;
- aError.Message = rTitle;
- aError.Details = rMessage;
+ css::uno::Any next;
if (pAdditionalErrorInfo)
- aError.NextException = pAdditionalErrorInfo->get();
+ next = pAdditionalErrorInfo->get();
+ SQLContext aError(rTitle, {}, {}, 0, next, rMessage);
m_pImpl.reset(new SQLMessageBox_Impl(SQLExceptionInfo(aError)));