summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/relationdesign
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-20 17:17:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-22 00:27:49 +0100
commita084d003a927440fb56b11a0b7175360a1af41ab (patch)
tree830911bfed2ad1f34730156d506bc9fd5c7c392c /dbaccess/source/ui/relationdesign
parent519293447189f75e842065f7ff211d395d0da4b6 (diff)
weld OSQLMessageBox
Change-Id: Idbdb07bc342a91695d15ea1a87d1863798ca34b0 Reviewed-on: https://gerrit.libreoffice.org/51676 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'dbaccess/source/ui/relationdesign')
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx7
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx20
2 files changed, 14 insertions, 13 deletions
diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx
index 316080ebca42..e5a401e427f8 100644
--- a/dbaccess/source/ui/relationdesign/RelationController.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationController.cxx
@@ -162,7 +162,8 @@ void ORelationController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue
if(!::dbaui::checkDataSourceAvailable(::comphelper::getString(getDataSource()->getPropertyValue(PROPERTY_NAME)), getORB()))
{
OUString aMessage(DBA_RES(STR_DATASOURCE_DELETED));
- ScopedVclPtrInstance<OSQLWarningBox>(getView(), aMessage)->Execute();
+ OSQLWarningBox aWarning(getFrameWeld(), aMessage);
+ aWarning.run();
}
else
{
@@ -207,8 +208,8 @@ void ORelationController::impl_initialize()
{
OUString sTitle(DBA_RES(STR_RELATIONDESIGN));
sTitle = sTitle.copy(3);
- ScopedVclPtrInstance< OSQLMessageBox > aDlg(nullptr,sTitle,DBA_RES(STR_RELATIONDESIGN_NOT_AVAILABLE));
- aDlg->Execute();
+ OSQLMessageBox aDlg(getFrameWeld(), sTitle, DBA_RES(STR_RELATIONDESIGN_NOT_AVAILABLE));
+ aDlg.run();
}
disconnect();
throw SQLException();
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 006b8033e44a..7c9827489458 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -323,8 +323,8 @@ void ORelationTableView::AddTabWin(const OUString& _rComposedName, const OUStrin
void ORelationTableView::RemoveTabWin( OTableWindow* pTabWin )
{
- ScopedVclPtrInstance< OSQLWarningBox > aDlg( this, DBA_RES( STR_QUERY_REL_DELETE_WINDOW ), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes );
- if ( m_bInRemove || aDlg->Execute() == RET_YES )
+ OSQLWarningBox aDlg(GetFrameWeld(), DBA_RES(STR_QUERY_REL_DELETE_WINDOW), MessBoxStyle::YesNo | MessBoxStyle::DefaultYes);
+ if (m_bInRemove || aDlg.run() == RET_YES)
{
m_pView->getController().ClearUndoManager();
OJoinTableView::RemoveTabWin( pTabWin );
@@ -341,14 +341,14 @@ void ORelationTableView::lookForUiActivities()
{
OUString sTitle(DBA_RES(STR_RELATIONDESIGN));
sTitle = sTitle.copy(3);
- ScopedVclPtrInstance< OSQLMessageBox > aDlg(this,DBA_RES(STR_QUERY_REL_EDIT_RELATION),OUString(),MessBoxStyle::NONE);
- aDlg->SetText(sTitle);
- aDlg->RemoveButton(aDlg->GetButtonId(0));
- aDlg->AddButton( DBA_RES(STR_QUERY_REL_EDIT), RET_OK, ButtonDialogFlags::Default | ButtonDialogFlags::Focus);
- aDlg->AddButton( DBA_RES(STR_QUERY_REL_CREATE), RET_YES);
- aDlg->AddButton( StandardButtonType::Cancel,RET_CANCEL);
- sal_uInt16 nRet = aDlg->Execute();
- if( nRet == RET_CANCEL)
+ OSQLMessageBox aDlg(GetFrameWeld(), DBA_RES(STR_QUERY_REL_EDIT_RELATION), OUString(), MessBoxStyle::NONE);
+ aDlg.set_title(sTitle);
+ aDlg.add_button(DBA_RES(STR_QUERY_REL_EDIT), RET_OK);
+ aDlg.set_default_response(RET_OK);
+ aDlg.add_button(DBA_RES(STR_QUERY_REL_CREATE), RET_YES);
+ aDlg.add_button(Button::GetStandardText(StandardButtonType::Cancel), RET_CANCEL);
+ sal_uInt16 nRet = aDlg.run();
+ if (nRet == RET_CANCEL)
{
m_pCurrentlyTabConnData.reset();
}