summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-03-13 15:41:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-03-13 16:24:15 +0000
commitdca7bd06ca12d58e853a95ed1fc066f9da7d9e05 (patch)
tree813eccfb5a6b98f79bdb99578d734b3b07f2e87a
parent07579ec100b9c03f547ed7c3706659bc7d43ce36 (diff)
convert relation dialog to .ui format
Change-Id: I5c3fce06cbcd9ce46e85f66fb06369155d514efe
-rw-r--r--dbaccess/AllLangResTarget_dbu.mk1
-rw-r--r--dbaccess/UIConfig_dbaccess.mk1
-rw-r--r--dbaccess/inc/dbaccess_helpid.hrc16
-rw-r--r--dbaccess/source/ui/dlg/RelationDlg.cxx94
-rw-r--r--dbaccess/source/ui/dlg/RelationDlg.src169
-rw-r--r--dbaccess/source/ui/inc/RelationDlg.hxx28
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc6
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.cxx7
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.hrc49
-rw-r--r--dbaccess/source/ui/querydesign/querydlg.src1
-rw-r--r--dbaccess/uiconfig/ui/relationdialog.ui487
11 files changed, 550 insertions, 309 deletions
diff --git a/dbaccess/AllLangResTarget_dbu.mk b/dbaccess/AllLangResTarget_dbu.mk
index 3103def364bf..5e7448e2d9f6 100644
--- a/dbaccess/AllLangResTarget_dbu.mk
+++ b/dbaccess/AllLangResTarget_dbu.mk
@@ -46,7 +46,6 @@ $(eval $(call gb_SrsTarget_add_files,dbaccess/dbu,\
dbaccess/source/ui/dlg/directsql.src \
dbaccess/source/ui/dlg/indexdialog.src \
dbaccess/source/ui/dlg/paramdialog.src \
- dbaccess/source/ui/dlg/RelationDlg.src \
dbaccess/source/ui/dlg/sqlmessage.src \
dbaccess/source/ui/dlg/textconnectionsettings.src \
dbaccess/source/ui/dlg/UserAdmin.src \
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index e55e23110274..a90e1616ecc4 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -24,6 +24,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/joindialog \
dbaccess/uiconfig/ui/queryfilterdialog \
dbaccess/uiconfig/ui/querypropertiesdialog \
+ dbaccess/uiconfig/ui/relationdialog \
dbaccess/uiconfig/ui/rowheightdialog \
dbaccess/uiconfig/ui/savedialog \
dbaccess/uiconfig/ui/specialsettingspage \
diff --git a/dbaccess/inc/dbaccess_helpid.hrc b/dbaccess/inc/dbaccess_helpid.hrc
index 70058f41e778..5da3fac99318 100644
--- a/dbaccess/inc/dbaccess_helpid.hrc
+++ b/dbaccess/inc/dbaccess_helpid.hrc
@@ -211,22 +211,6 @@
#define HID_QUERY_EDIT_JOINCONNECTION "DBACCESS_HID_QUERY_EDIT_JOINCONNECTION"
-#define HID_DLG_QRY_WINDOW_CONTROL "DBACCESS_HID_DLG_QRY_WINDOW_CONTROL"
-#define HID_DLG_QRY_LEFT_TABLE "DBACCESS_HID_DLG_QRY_LEFT_TABLE"
-#define HID_DLG_QRY_RIGHT_TABLE "DBACCESS_HID_DLG_QRY_RIGHT_TABLE"
-
-#define HID_DLG_REL_CASC_DEL "DBACCESS_HID_DLG_REL_CASC_DEL"
-#define HID_DLG_REL_NO_CASC_DEL "DBACCESS_HID_DLG_REL_NO_CASC_DEL"
-#define HID_DLG_REL_CASC_DEL_NULL "DBACCESS_HID_DLG_REL_CASC_DEL_NULL"
-#define HID_DLG_REL_CASC_DEL_DEFAULT "DBACCESS_HID_DLG_REL_CASC_DEL_DEFAULT"
-
-#define HID_DLG_REL_CASC_UPD "DBACCESS_HID_DLG_REL_CASC_UPD"
-#define HID_DLG_REL_NO_CASC_UPD "DBACCESS_HID_DLG_REL_NO_CASC_UPD"
-#define HID_DLG_REL_CASC_UPD_NULL "DBACCESS_HID_DLG_REL_CASC_UPD_NULL"
-#define HID_DLG_REL_CASC_UPD_DEFAULT "DBACCESS_HID_DLG_REL_CASC_UPD_DEFAULT"
-#define HID_BROWSER_SAVE_RECORD "DBACCESS_HID_BROWSER_SAVE_RECORD"
-#define HID_BROWSER_UNDO_RECORD "DBACCESS_HID_BROWSER_UNDO_RECORD"
-
#define HID_DOCUMENT_CREATE_REPWIZ "DBACCESS_HID_DOCUMENT_CREATE_REPWIZ"
#define HID_TAB_AUTOINCREMENTVALUE "DBACCESS_HID_TAB_AUTOINCREMENTVALUE"
diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx
index e3666667403f..a3baa4a101e1 100644
--- a/dbaccess/source/ui/dlg/RelationDlg.cxx
+++ b/dbaccess/source/ui/dlg/RelationDlg.cxx
@@ -51,27 +51,21 @@ using namespace ::dbtools;
ORelationDialog::ORelationDialog( OJoinTableView* pParent,
const TTableConnectionData::value_type& pConnectionData,
sal_Bool bAllowTableSelect )
- :ModalDialog( pParent, ModuleRes(DLG_REL_PROPERTIES) )
- ,m_pTableMap(pParent->GetTabWinMap())
-
- ,aFL_CascUpd( this, ModuleRes(FL_CASC_UPD) )
- ,aRB_NoCascUpd( this, ModuleRes(RB_NO_CASC_UPD) )
- ,aRB_CascUpd( this, ModuleRes(RB_CASC_UPD) )
- ,aRB_CascUpdNull( this, ModuleRes(RB_CASC_UPD_NULL) )
- ,aRB_CascUpdDefault( this, ModuleRes(RB_CASC_UPD_DEFAULT) )
- ,aFL_CascDel( this, ModuleRes(FL_CASC_DEL) )
- ,aRB_NoCascDel( this, ModuleRes(RB_NO_CASC_DEL) )
- ,aRB_CascDel( this, ModuleRes(RB_CASC_DEL) )
- ,aRB_CascDelNull( this, ModuleRes(RB_CASC_DEL_NULL) )
- ,aRB_CascDelDefault( this, ModuleRes(RB_CASC_DEL_DEFAULT) )
-
- ,aPB_OK( this, ModuleRes( PB_OK ) )
- ,aPB_CANCEL( this, ModuleRes( PB_CANCEL ) )
- ,aPB_HELP( this, ModuleRes( PB_HELP ) )
-
- ,m_pOrigConnData( pConnectionData )
- ,m_bTriedOneUpdate(sal_False)
+ : ModalDialog(pParent, "RelationDialog",
+ "dbaccess/ui/relationdialog.ui")
+ , m_pTableMap(pParent->GetTabWinMap())
+ , m_pOrigConnData(pConnectionData)
+ , m_bTriedOneUpdate(false)
{
+ get(m_pRB_NoCascUpd, "addaction");
+ get(m_pRB_CascUpd, "addcascade");
+ get(m_pRB_CascUpdNull, "addnull");
+ get(m_pRB_CascUpdDefault, "adddefault");
+ get(m_pRB_NoCascDel, "delaction");
+ get(m_pRB_CascDel, "delcascade");
+ get(m_pRB_CascDelNull, "delnull");
+ get(m_pRB_CascDelDefault, "deldefault");
+ get(m_pPB_OK, "ok");
m_xConnection = pParent->getDesignView()->getController().getConnection();
@@ -80,21 +74,19 @@ ORelationDialog::ORelationDialog( OJoinTableView* pParent,
m_pConnData->CopyFrom( *pConnectionData );
Init(m_pConnData);
- m_pTableControl.reset( new OTableListBoxControl(this, m_pTableMap, this) );
+ m_xTableControl.reset( new OTableListBoxControl(this, m_pTableMap, this) );
- aPB_OK.SetClickHdl( LINK(this, ORelationDialog, OKClickHdl) );
+ m_pPB_OK->SetClickHdl( LINK(this, ORelationDialog, OKClickHdl) );
- m_pTableControl->Init( m_pConnData );
+ m_xTableControl->Init( m_pConnData );
if ( bAllowTableSelect )
- m_pTableControl->fillListBoxes();
+ m_xTableControl->fillListBoxes();
else
- m_pTableControl->fillAndDisable(pConnectionData);
+ m_xTableControl->fillAndDisable(pConnectionData);
- m_pTableControl->lateInit();
+ m_xTableControl->lateInit();
- m_pTableControl->NotifyCellChange();
-
- FreeResource();
+ m_xTableControl->NotifyCellChange();
}
void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionData)
@@ -105,18 +97,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD
{
case KeyRule::NO_ACTION:
case KeyRule::RESTRICT:
- aRB_NoCascUpd.Check( true );
+ m_pRB_NoCascUpd->Check( true );
break;
case KeyRule::CASCADE:
- aRB_CascUpd.Check( true );
+ m_pRB_CascUpd->Check( true );
break;
case KeyRule::SET_NULL:
- aRB_CascUpdNull.Check( true );
+ m_pRB_CascUpdNull->Check( true );
break;
case KeyRule::SET_DEFAULT:
- aRB_CascUpdDefault.Check( true );
+ m_pRB_CascUpdDefault->Check( true );
break;
}
@@ -125,18 +117,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD
{
case KeyRule::NO_ACTION:
case KeyRule::RESTRICT:
- aRB_NoCascDel.Check( true );
+ m_pRB_NoCascDel->Check( true );
break;
case KeyRule::CASCADE:
- aRB_CascDel.Check( true );
+ m_pRB_CascDel->Check( true );
break;
case KeyRule::SET_NULL:
- aRB_CascDelNull.Check( true );
+ m_pRB_CascDelNull->Check( true );
break;
case KeyRule::SET_DEFAULT:
- aRB_CascDelDefault.Check( true );
+ m_pRB_CascDelDefault->Check( true );
break;
}
}
@@ -151,13 +143,13 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ )
sal_uInt16 nAttrib = 0;
// Delete Rules
- if( aRB_NoCascDel.IsChecked() )
+ if( m_pRB_NoCascDel->IsChecked() )
nAttrib |= KeyRule::NO_ACTION;
- if( aRB_CascDel.IsChecked() )
+ if( m_pRB_CascDel->IsChecked() )
nAttrib |= KeyRule::CASCADE;
- if( aRB_CascDelNull.IsChecked() )
+ if( m_pRB_CascDelNull->IsChecked() )
nAttrib |= KeyRule::SET_NULL;
- if( aRB_CascDelDefault.IsChecked() )
+ if( m_pRB_CascDelDefault->IsChecked() )
nAttrib |= KeyRule::SET_DEFAULT;
ORelationTableConnectionData* pConnData = static_cast<ORelationTableConnectionData*>(m_pConnData.get());
@@ -165,22 +157,22 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ )
// Update Rules
nAttrib = 0;
- if( aRB_NoCascUpd.IsChecked() )
+ if( m_pRB_NoCascUpd->IsChecked() )
nAttrib |= KeyRule::NO_ACTION;
- if( aRB_CascUpd.IsChecked() )
+ if( m_pRB_CascUpd->IsChecked() )
nAttrib |= KeyRule::CASCADE;
- if( aRB_CascUpdNull.IsChecked() )
+ if( m_pRB_CascUpdNull->IsChecked() )
nAttrib |= KeyRule::SET_NULL;
- if( aRB_CascUpdDefault.IsChecked() )
+ if( m_pRB_CascUpdDefault->IsChecked() )
nAttrib |= KeyRule::SET_DEFAULT;
pConnData->SetUpdateRules( nAttrib );
- m_pTableControl->SaveModified();
+ m_xTableControl->SaveModified();
//// wenn die ComboBoxen fuer die Tabellenauswahl enabled sind (Constructor mit bAllowTableSelect==sal_True), dann muss ich in die
//// Connection auch die Tabellennamen stecken
- //m_pConnData->SetSourceWinName(m_pTableControl->getSourceWinName());
- //m_pConnData->SetDestWinName(m_pTableControl->getDestWinName());
+ //m_pConnData->SetSourceWinName(m_xTableControl->getSourceWinName());
+ //m_pConnData->SetDestWinName(m_xTableControl->getDestWinName());
// try to create the relation
try
@@ -210,8 +202,8 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, /*pButton*/ )
// try again
Init(m_pConnData);
- m_pTableControl->Init( m_pConnData );
- m_pTableControl->lateInit();
+ m_xTableControl->Init( m_pConnData );
+ m_xTableControl->lateInit();
return 0;
}
@@ -232,7 +224,7 @@ TTableConnectionData::value_type ORelationDialog::getConnectionData() const
void ORelationDialog::setValid(sal_Bool _bValid)
{
- aPB_OK.Enable(_bValid);
+ m_pPB_OK->Enable(_bValid);
}
void ORelationDialog::notifyConnectionChange()
diff --git a/dbaccess/source/ui/dlg/RelationDlg.src b/dbaccess/source/ui/dlg/RelationDlg.src
deleted file mode 100644
index 5da32dd683d5..000000000000
--- a/dbaccess/source/ui/dlg/RelationDlg.src
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "RelationDlg.hrc"
-#include "dbu_dlg.hrc"
-#include "dbaccess_helpid.hrc"
-
-ModalDialog DLG_REL_PROPERTIES
-{
- HelpID = "dbaccess:ModalDialog:DLG_REL_PROPERTIES";
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( 186 , 205 ) ;
- Text [ en-US ] = "Relations" ;
- Moveable = TRUE ;
- Closeable = TRUE ;
-
- Window WND_CONTROL
- {
- Pos = MAP_APPFONT( 0, 0 );
- Size = MAP_APPFONT( 186, 113 );
- DialogControl = TRUE;
- HelpId = HID_DLG_QRY_WINDOW_CONTROL ;
-
- FixedLine FL_INVOLVED_TABLES
- {
- Pos = MAP_APPFONT ( 6 , 3 ) ;
- Size = MAP_APPFONT ( 174 , 8 ) ;
- Text [ en-US ] = "Tables involved";
- };
-
- ListBox LB_LEFT_TABLE
- {
- Border = TRUE;
- Pos = MAP_APPFONT( 12, 14 );
- Size = MAP_APPFONT( 78, 60 );
- HelpId = HID_DLG_QRY_LEFT_TABLE ;
- DropDown = TRUE;
- TabStop = TRUE;
- };
-
- ListBox LB_RIGHT_TABLE
- {
- Border = TRUE;
- Pos = MAP_APPFONT( 96, 14 );
- Size = MAP_APPFONT( 78, 60 );
- HelpId = HID_DLG_QRY_RIGHT_TABLE ;
- DropDown = TRUE;
- TabStop = TRUE;
- };
-
- FixedLine FL_INVOLVED_FIELDS
- {
- Pos = MAP_APPFONT ( 6 , 29 ) ;
- Size = MAP_APPFONT ( 174 , 8 ) ;
- Text [ en-US ] = "Fields involved";
- };
- };
-
- FixedLine FL_CASC_UPD
- {
- Pos = MAP_APPFONT ( 6 , 114 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Text [ en-US ] = "Update options" ;
- };
- RadioButton RB_NO_CASC_UPD
- {
- Pos = MAP_APPFONT ( 12 , 125 ) ;
- Size = MAP_APPFONT ( 72 , 10 ) ;
- TabStop = TRUE ;
- HelpId = HID_DLG_REL_NO_CASC_UPD;
- Text [ en-US ] = "~No action" ;
- };
- RadioButton RB_CASC_UPD
- {
- Pos = MAP_APPFONT ( 12 , 139 ) ;
- Size = MAP_APPFONT ( 72 , 10 ) ;
- HelpId = HID_DLG_REL_CASC_UPD ;
- Text [ en-US ] = "~Update cascade" ;
- };
- RadioButton RB_CASC_UPD_NULL
- {
- Pos = MAP_APPFONT ( 12 , 153 ) ;
- Size = MAP_APPFONT ( 72 , 10 ) ;
- HelpId = HID_DLG_REL_CASC_UPD_NULL ;
- Text [ en-US ] = "~Set null" ;
- };
- RadioButton RB_CASC_UPD_DEFAULT
- {
- Pos = MAP_APPFONT ( 12 , 167 ) ;
- Size = MAP_APPFONT ( 72 , 10 ) ;
- HelpId = HID_DLG_REL_CASC_UPD_DEFAULT ;
- Text [ en-US ] = "Set ~default" ;
- };
- FixedLine FL_CASC_DEL
- {
- Pos = MAP_APPFONT ( 96 , 114 ) ;
- Size = MAP_APPFONT ( 84 , 8 ) ;
- Text [ en-US ] = "Delete options" ;
- };
- RadioButton RB_NO_CASC_DEL
- {
- Pos = MAP_APPFONT ( 102 , 125 ) ;
- Size = MAP_APPFONT ( 72 , 10 ) ;
- TabStop = TRUE ;
- HelpId = HID_DLG_REL_NO_CASC_DEL ;
- Text [ en-US ] = "~No action" ;
- };
- RadioButton RB_CASC_DEL
- {
- Pos = MAP_APPFONT ( 102 , 139 ) ;
- Size = MAP_APPFONT ( 72 , 10 ) ;
- HelpId = HID_DLG_REL_CASC_DEL ;
- Text [ en-US ] = "Delete ~cascade" ;
- };
- RadioButton RB_CASC_DEL_NULL
- {
- Pos = MAP_APPFONT ( 102 , 153 ) ;
- Size = MAP_APPFONT ( 72 , 10 ) ;
- HelpId = HID_DLG_REL_CASC_DEL_NULL ;
- Text [ en-US ] = "~Set null" ;
- };
- RadioButton RB_CASC_DEL_DEFAULT
- {
- Pos = MAP_APPFONT ( 102 , 167 ) ;
- Size = MAP_APPFONT ( 72 , 10 ) ;
- HelpId = HID_DLG_REL_CASC_DEL_DEFAULT ;
- Text [ en-US ] = "Set ~default" ;
- };
-
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( 6 , 184 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( 59 , 184 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( 115 , 184 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- TabStop = TRUE ;
- };
-
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/inc/RelationDlg.hxx b/dbaccess/source/ui/inc/RelationDlg.hxx
index 0c7decdb679d..ad84eccd0933 100644
--- a/dbaccess/source/ui/inc/RelationDlg.hxx
+++ b/dbaccess/source/ui/inc/RelationDlg.hxx
@@ -19,9 +19,9 @@
#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONDLG_HXX
#define INCLUDED_DBACCESS_SOURCE_UI_INC_RELATIONDLG_HXX
-#include <vcl/dialog.hxx>
-
+#include <boost/scoped_ptr.hpp>
#include <vcl/button.hxx>
+#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
#include <vcl/msgbox.hxx>
#include "JoinTableView.hxx"
@@ -36,23 +36,19 @@ namespace dbaui
,public IRelationControlInterface
{
OModuleClient m_aModuleClient;
- ::std::auto_ptr<OTableListBoxControl> m_pTableControl;
+ boost::scoped_ptr<OTableListBoxControl> m_xTableControl;
OJoinTableView::OTableWindowMap* m_pTableMap;
- FixedLine aFL_CascUpd;
- RadioButton aRB_NoCascUpd,
- aRB_CascUpd,
- aRB_CascUpdNull,
- aRB_CascUpdDefault;
- FixedLine aFL_CascDel;
- RadioButton aRB_NoCascDel,
- aRB_CascDel,
- aRB_CascDelNull,
- aRB_CascDelDefault;
+ RadioButton* m_pRB_NoCascUpd;
+ RadioButton* m_pRB_CascUpd;
+ RadioButton* m_pRB_CascUpdNull;
+ RadioButton* m_pRB_CascUpdDefault;
+ RadioButton* m_pRB_NoCascDel;
+ RadioButton* m_pRB_CascDel;
+ RadioButton* m_pRB_CascDelNull;
+ RadioButton* m_pRB_CascDelDefault;
- OKButton aPB_OK;
- CancelButton aPB_CANCEL;
- HelpButton aPB_HELP;
+ OKButton* m_pPB_OK;
TTableConnectionData::value_type m_pConnData;
TTableConnectionData::value_type m_pOrigConnData;
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 06362b0ef0f9..a496afe87821 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -82,7 +82,7 @@
#define DLG_JOIN_TABADD RID_DIALOG_START + 14
// FREE
#define WIZ_RTFCOPYTABLE RID_DIALOG_START + 16
-#define DLG_REL_PROPERTIES RID_DIALOG_START + 17
+ // FREE
// FREE
#define DLG_INDEXDESIGN RID_DIALOG_START + 19
// FREE
@@ -280,10 +280,6 @@
// various
#define PB_FORMAT RID_MISC_START + 0
-#define LB_LEFT_TABLE RID_MISC_START + 2
-#define LB_RIGHT_TABLE RID_MISC_START + 3
-#define FL_INVOLVED_TABLES RID_MISC_START + 5
-#define FL_INVOLVED_FIELDS RID_MISC_START + 6
#endif // _DBU_RESOURCE_HRC_
diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx
index 909fe27469f2..c6e90f2cff45 100644
--- a/dbaccess/source/ui/querydesign/querydlg.cxx
+++ b/dbaccess/source/ui/querydesign/querydlg.cxx
@@ -19,7 +19,6 @@
#include "querydlg.hxx"
#include "dbu_qry.hrc"
-#include "querydlg.hrc"
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include "QTableConnectionData.hxx"
@@ -31,6 +30,12 @@
#include <vcl/msgbox.hxx>
#include <vcl/settings.hxx>
+#define ID_INNER_JOIN 1
+#define ID_LEFT_JOIN 2
+#define ID_RIGHT_JOIN 3
+#define ID_FULL_JOIN 4
+#define ID_CROSS_JOIN 5
+
using namespace dbaui;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
diff --git a/dbaccess/source/ui/querydesign/querydlg.hrc b/dbaccess/source/ui/querydesign/querydlg.hrc
deleted file mode 100644
index a30989fb4b85..000000000000
--- a/dbaccess/source/ui/querydesign/querydlg.hrc
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef DBAUI_QUERYDLG_HRC
-#define DBAUI_QUERYDLG_HRC
-
-#include "RelationControl.hrc"
-
-#define FL_JOIN 1
-#define FT_LISTBOXTITLE 2
-
-#define LB_JOINTYPE 1
-
-
-#define CB_NATURAL 1
-
-#define PB_OK 1
-#define PB_CANCEL 2
-#define PB_HELP 3
-#define ML_HELPTEXT 4
-
-#define WND_JOIN_CONTROL 1
-#define WND_CONTROL 2
-
-#define ID_INNER_JOIN 1
-#define ID_LEFT_JOIN 2
-#define ID_RIGHT_JOIN 3
-#define ID_FULL_JOIN 4
-#define ID_CROSS_JOIN 5
-
-#endif // DBAUI_QUERYDLG_HRC
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/ui/querydesign/querydlg.src b/dbaccess/source/ui/querydesign/querydlg.src
index 43d11892aa8e..81a5ee8ac911 100644
--- a/dbaccess/source/ui/querydesign/querydlg.src
+++ b/dbaccess/source/ui/querydesign/querydlg.src
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include "dbu_qry.hrc"
-#include "querydlg.hrc"
#include "dbaccess_helpid.hrc"
String STR_JOIN_TYPE_HINT
diff --git a/dbaccess/uiconfig/ui/relationdialog.ui b/dbaccess/uiconfig/ui/relationdialog.ui
new file mode 100644
index 000000000000..511bdb9a078d
--- /dev/null
+++ b/dbaccess/uiconfig/ui/relationdialog.ui
@@ -0,0 +1,487 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires LibreOffice 1.0 -->
+ <object class="GtkDialog" id="RelationDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Relations</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <property name="image_position">top</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="column_spacing">12</property>
+ <property name="column_homogeneous">True</property>
+ <child>
+ <object class="GtkComboBoxText" id="table1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkComboBoxText" id="table2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Tables involved</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="dbulo-ORelationControl" id="relations">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <child internal-child="selection">
+ <object class="GtkTreeSelection" id="Relation Control-selection1"/>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Fields involved</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="addaction">
+ <property name="label" translatable="yes">_No action</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">addcascade</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="addcascade">
+ <property name="label" translatable="yes">_Update cascade</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">addnull</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="addnull">
+ <property name="label" translatable="yes">_Set null</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">adddefault</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="adddefault">
+ <property name="label" translatable="yes">Set _default</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">addaction</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Update options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkFrame" id="frame4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkRadioButton" id="delaction">
+ <property name="label" translatable="yes">_No action</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="delcascade">
+ <property name="label" translatable="yes">Delete _cascade</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="delnull">
+ <property name="label" translatable="yes">_Set null</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="deldefault">
+ <property name="label" translatable="yes">Set _default</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Delete options</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1">
+ <widgets>
+ <widget name="table1"/>
+ <widget name="label4"/>
+ </widgets>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup2">
+ <widgets>
+ <widget name="table2"/>
+ </widgets>
+ </object>
+ <object class="GtkListStore" id="liststore1">
+ <columns>
+ <!-- column-name gchararray1 -->
+ <column type="gchararray"/>
+ <!-- column-name gint1 -->
+ <column type="gint"/>
+ </columns>
+ <data>
+ <row>
+ <col id="0" translatable="yes">Inner join</col>
+ <col id="1">1</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Left join</col>
+ <col id="1">2</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Right join</col>
+ <col id="1">3</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Full (outer) join</col>
+ <col id="1">4</col>
+ </row>
+ <row>
+ <col id="0" translatable="yes">Cross join</col>
+ <col id="1">5</col>
+ </row>
+ </data>
+ </object>
+</interface>