weld ODbAdminDialog
Change-Id: I691ce67b55fb16d06d7266ebe671ac31e30c05d5 Reviewed-on: https://gerrit.libreoffice.org/62297 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "dbtreemodel.hxx"
|
#include "dbtreemodel.hxx"
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
|
|
||||||
namespace dbaui
|
namespace dbaui
|
||||||
{
|
{
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
#include <connectivity/dbtools.hxx>
|
#include <connectivity/dbtools.hxx>
|
||||||
#include <UITools.hxx>
|
#include <UITools.hxx>
|
||||||
#include <core_resource.hxx>
|
#include <core_resource.hxx>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <strings.hrc>
|
#include <strings.hrc>
|
||||||
#include <com/sun/star/util/NumberFormatter.hpp>
|
#include <com/sun/star/util/NumberFormatter.hpp>
|
||||||
|
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <dbtreelistbox.hxx>
|
#include <dbtreelistbox.hxx>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <browserids.hxx>
|
#include <browserids.hxx>
|
||||||
#include <listviewitems.hxx>
|
#include <listviewitems.hxx>
|
||||||
#include <callbacks.hxx>
|
#include <callbacks.hxx>
|
||||||
|
@@ -24,7 +24,6 @@
|
|||||||
#include <sqlmessage.hxx>
|
#include <sqlmessage.hxx>
|
||||||
#include <dbu_dlg.hxx>
|
#include <dbu_dlg.hxx>
|
||||||
#include <strings.hrc>
|
#include <strings.hrc>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <svl/itemset.hxx>
|
#include <svl/itemset.hxx>
|
||||||
#include <svl/stritem.hxx>
|
#include <svl/stritem.hxx>
|
||||||
#include <svl/eitem.hxx>
|
#include <svl/eitem.hxx>
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
#include <dbu_dlg.hxx>
|
#include <dbu_dlg.hxx>
|
||||||
#include <strings.hrc>
|
#include <strings.hrc>
|
||||||
#include <strings.hxx>
|
#include <strings.hxx>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <svl/itemset.hxx>
|
#include <svl/itemset.hxx>
|
||||||
#include <svl/stritem.hxx>
|
#include <svl/stritem.hxx>
|
||||||
#include <svl/eitem.hxx>
|
#include <svl/eitem.hxx>
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
#include <tools/debug.hxx>
|
#include <tools/debug.hxx>
|
||||||
#include <tools/diagnose_ex.h>
|
#include <tools/diagnose_ex.h>
|
||||||
#include <core_resource.hxx>
|
#include <core_resource.hxx>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <dbu_dlg.hxx>
|
#include <dbu_dlg.hxx>
|
||||||
#include <strings.hrc>
|
#include <strings.hrc>
|
||||||
#include <sfx2/sfxsids.hrc>
|
#include <sfx2/sfxsids.hrc>
|
||||||
|
@@ -27,7 +27,6 @@
|
|||||||
#include "DbAdminImpl.hxx"
|
#include "DbAdminImpl.hxx"
|
||||||
#include "DriverSettings.hxx"
|
#include "DriverSettings.hxx"
|
||||||
#include "optionalboolitem.hxx"
|
#include "optionalboolitem.hxx"
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <dbu_dlg.hxx>
|
#include <dbu_dlg.hxx>
|
||||||
|
|
||||||
#include <svl/eitem.hxx>
|
#include <svl/eitem.hxx>
|
||||||
|
@@ -46,59 +46,47 @@ using namespace com::sun::star::beans;
|
|||||||
using namespace com::sun::star::container;
|
using namespace com::sun::star::container;
|
||||||
|
|
||||||
// ODbAdminDialog
|
// ODbAdminDialog
|
||||||
ODbAdminDialog::ODbAdminDialog(vcl::Window* _pParent
|
ODbAdminDialog::ODbAdminDialog(weld::Window* pParent,
|
||||||
, SfxItemSet const * _pItems
|
SfxItemSet const * _pItems,
|
||||||
, const Reference< XComponentContext >& _rxContext)
|
const Reference< XComponentContext >& _rxContext)
|
||||||
: SfxTabDialog(_pParent, "AdminDialog",
|
: SfxTabDialogController(pParent, "dbaccess/ui/admindialog.ui", "AdminDialog", _pItems)
|
||||||
"dbaccess/ui/admindialog.ui", _pItems)
|
|
||||||
, m_bUIEnabled(true)
|
, m_bUIEnabled(true)
|
||||||
|
, m_sMainPageID("advanced")
|
||||||
{
|
{
|
||||||
m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext,GetFrameWeld(), _pParent ? _pParent->GetFrameWeld() : nullptr, this));
|
m_pImpl.reset(new ODbDataSourceAdministrationHelper(_rxContext, m_xDialog.get(), pParent, this));
|
||||||
|
|
||||||
// add the initial tab page
|
// add the initial tab page
|
||||||
m_nMainPageID = AddTabPage("advanced", OConnectionTabPage::Create, nullptr);
|
AddTabPage(m_sMainPageID, OConnectionTabPage::Create, nullptr);
|
||||||
|
|
||||||
// remove the reset button - it's meaning is much too ambiguous in this dialog
|
// remove the reset button - it's meaning is much too ambiguous in this dialog
|
||||||
RemoveResetButton();
|
RemoveResetButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
ODbAdminDialog::~ODbAdminDialog()
|
ODbAdminDialog::~ODbAdminDialog()
|
||||||
{
|
|
||||||
disposeOnce();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ODbAdminDialog::dispose()
|
|
||||||
{
|
{
|
||||||
SetInputSet(nullptr);
|
SetInputSet(nullptr);
|
||||||
DELETEZ(m_pExampleSet);
|
|
||||||
SfxTabDialog::dispose();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
short ODbAdminDialog::Ok()
|
short ODbAdminDialog::Ok()
|
||||||
{
|
{
|
||||||
SfxTabDialog::Ok();
|
SfxTabDialogController::Ok();
|
||||||
m_bUIEnabled = false;
|
m_bUIEnabled = false;
|
||||||
return ( AR_LEAVE_MODIFIED == implApplyChanges() ) ? RET_OK : RET_CANCEL;
|
return ( AR_LEAVE_MODIFIED == implApplyChanges() ) ? RET_OK : RET_CANCEL;
|
||||||
// TODO : AR_ERROR is not handled correctly, we always close the dialog here
|
// TODO : AR_ERROR is not handled correctly, we always close the dialog here
|
||||||
}
|
}
|
||||||
|
|
||||||
void ODbAdminDialog::PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage)
|
void ODbAdminDialog::PageCreated(const OString& rId, SfxTabPage& _rPage)
|
||||||
{
|
{
|
||||||
// register ourself as modified listener
|
// register ourself as modified listener
|
||||||
static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory( getORB() );
|
static_cast<OGenericAdministrationPage&>(_rPage).SetServiceFactory( getORB() );
|
||||||
static_cast<OGenericAdministrationPage&>(_rPage).SetAdminDialog(this,this);
|
static_cast<OGenericAdministrationPage&>(_rPage).SetAdminDialog(this,this);
|
||||||
|
|
||||||
vcl::Window *pWin = GetViewWindow();
|
SfxTabDialogController::PageCreated(rId, _rPage);
|
||||||
if(pWin)
|
|
||||||
pWin->Invalidate();
|
|
||||||
|
|
||||||
SfxTabDialog::PageCreated(_nId, _rPage);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ODbAdminDialog::addDetailPage(sal_uInt16 _nPageId, const char* pTextId, CreateTabPage _pCreateFunc)
|
void ODbAdminDialog::addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc)
|
||||||
{
|
{
|
||||||
AddTabPage(_nPageId, DBA_RES(pTextId), _pCreateFunc);
|
AddTabPage(rPageId, DBA_RES(pTextId), pCreateFunc, nullptr);
|
||||||
m_aCurrentDetailPages.push(_nPageId);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName)
|
void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName)
|
||||||
@@ -115,35 +103,35 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName
|
|||||||
switch ( eType )
|
switch ( eType )
|
||||||
{
|
{
|
||||||
case ::dbaccess::DST_DBASE:
|
case ::dbaccess::DST_DBASE:
|
||||||
addDetailPage(PAGE_DBASE, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateDbase);
|
addDetailPage("dbase", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateDbase);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ::dbaccess::DST_ADO:
|
case ::dbaccess::DST_ADO:
|
||||||
addDetailPage(PAGE_ADO, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateAdo);
|
addDetailPage("ado", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateAdo);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ::dbaccess::DST_FLAT:
|
case ::dbaccess::DST_FLAT:
|
||||||
addDetailPage(PAGE_TEXT, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateText);
|
addDetailPage("text", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateText);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ::dbaccess::DST_ODBC:
|
case ::dbaccess::DST_ODBC:
|
||||||
addDetailPage(PAGE_ODBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateODBC);
|
addDetailPage("odbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateODBC);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ::dbaccess::DST_MYSQL_ODBC:
|
case ::dbaccess::DST_MYSQL_ODBC:
|
||||||
addDetailPage(PAGE_MYSQL_ODBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLODBC);
|
addDetailPage("mysqlodbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLODBC);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ::dbaccess::DST_MYSQL_JDBC:
|
case ::dbaccess::DST_MYSQL_JDBC:
|
||||||
addDetailPage(PAGE_MYSQL_JDBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLJDBC);
|
addDetailPage("mysqljdbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateMySQLJDBC);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ::dbaccess::DST_ORACLE_JDBC:
|
case ::dbaccess::DST_ORACLE_JDBC:
|
||||||
addDetailPage(PAGE_ORACLE_JDBC, STR_PAGETITLE_ADVANCED, ODriversSettings::CreateOracleJDBC);
|
addDetailPage("oraclejdbc", STR_PAGETITLE_ADVANCED, ODriversSettings::CreateOracleJDBC);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ::dbaccess::DST_LDAP:
|
case ::dbaccess::DST_LDAP:
|
||||||
addDetailPage(PAGE_LDAP,STR_PAGETITLE_ADVANCED,ODriversSettings::CreateLDAP);
|
addDetailPage("ldap",STR_PAGETITLE_ADVANCED,ODriversSettings::CreateLDAP);
|
||||||
break;
|
break;
|
||||||
case ::dbaccess::DST_USERDEFINE1: /// first user defined driver
|
case ::dbaccess::DST_USERDEFINE1: /// first user defined driver
|
||||||
case ::dbaccess::DST_USERDEFINE2:
|
case ::dbaccess::DST_USERDEFINE2:
|
||||||
@@ -157,8 +145,7 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName
|
|||||||
case ::dbaccess::DST_USERDEFINE10:
|
case ::dbaccess::DST_USERDEFINE10:
|
||||||
{
|
{
|
||||||
OUString aTitle(DBA_RES(STR_PAGETITLE_ADVANCED));
|
OUString aTitle(DBA_RES(STR_PAGETITLE_ADVANCED));
|
||||||
AddTabPage(PAGE_USERDRIVER, aTitle, ODriversSettings::CreateUser, 1);
|
AddTabPage("user" + OString(static_cast<int>(eType)), aTitle, ODriversSettings::CreateUser, nullptr);
|
||||||
m_aCurrentDetailPages.push(PAGE_USERDRIVER);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -176,7 +163,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou
|
|||||||
// reset the pages
|
// reset the pages
|
||||||
|
|
||||||
// prevent flicker
|
// prevent flicker
|
||||||
SetUpdateMode(false);
|
m_xDialog->freeze();
|
||||||
|
|
||||||
// remove all items which relate to indirect properties from the input set
|
// remove all items which relate to indirect properties from the input set
|
||||||
// (without this, the following may happen: select an arbitrary data source where some indirect properties
|
// (without this, the following may happen: select an arbitrary data source where some indirect properties
|
||||||
@@ -190,33 +177,33 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou
|
|||||||
m_pImpl->translateProperties(_rxDatasource, *GetInputSetImpl());
|
m_pImpl->translateProperties(_rxDatasource, *GetInputSetImpl());
|
||||||
|
|
||||||
// reset the example set
|
// reset the example set
|
||||||
delete m_pExampleSet;
|
m_xExampleSet.reset(new SfxItemSet(*GetInputSetImpl()));
|
||||||
m_pExampleSet = new SfxItemSet(*GetInputSetImpl());
|
|
||||||
|
|
||||||
// special case: MySQL Native does not have the generic "advanced" page
|
// special case: MySQL Native does not have the generic "advanced" page
|
||||||
|
|
||||||
const DbuTypeCollectionItem& rCollectionItem = dynamic_cast<const DbuTypeCollectionItem&>(*getOutputSet()->GetItem(DSID_TYPECOLLECTION));
|
const DbuTypeCollectionItem& rCollectionItem = dynamic_cast<const DbuTypeCollectionItem&>(*getOutputSet()->GetItem(DSID_TYPECOLLECTION));
|
||||||
::dbaccess::ODsnTypeCollection* pCollection = rCollectionItem.getCollection();
|
::dbaccess::ODsnTypeCollection* pCollection = rCollectionItem.getCollection();
|
||||||
if ( pCollection->determineType(getDatasourceType( *m_pExampleSet )) == ::dbaccess::DST_MYSQL_NATIVE )
|
if ( pCollection->determineType(getDatasourceType( *m_xExampleSet )) == ::dbaccess::DST_MYSQL_NATIVE )
|
||||||
{
|
{
|
||||||
AddTabPage( PAGE_MYSQL_NATIVE, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE );
|
OString sMySqlNative("mysqlnative");
|
||||||
|
AddTabPage(sMySqlNative, DBA_RES(STR_PAGETITLE_CONNECTION), ODriversSettings::CreateMySQLNATIVE, nullptr);
|
||||||
RemoveTabPage("advanced");
|
RemoveTabPage("advanced");
|
||||||
m_nMainPageID = PAGE_MYSQL_NATIVE;
|
m_sMainPageID = sMySqlNative;
|
||||||
}
|
}
|
||||||
|
|
||||||
ShowPage( m_nMainPageID );
|
SetCurPageId(m_sMainPageID);
|
||||||
SfxTabPage* pConnectionPage = GetTabPage( m_nMainPageID );
|
SfxTabPage* pConnectionPage = GetTabPage(m_sMainPageID);
|
||||||
if ( pConnectionPage )
|
if ( pConnectionPage )
|
||||||
pConnectionPage->Reset(GetInputSetImpl());
|
pConnectionPage->Reset(GetInputSetImpl());
|
||||||
// if this is NULL, the page has not been created yet, which means we're called before the
|
// if this is NULL, the page has not been created yet, which means we're called before the
|
||||||
// dialog was displayed (probably from inside the ctor)
|
// dialog was displayed (probably from inside the ctor)
|
||||||
|
|
||||||
SetUpdateMode(true);
|
m_xDialog->thaw();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ODbAdminDialog::setTitle(const OUString& _sTitle)
|
void ODbAdminDialog::setTitle(const OUString& rTitle)
|
||||||
{
|
{
|
||||||
SetText(_sTitle);
|
m_xDialog->set_title(rTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ODbAdminDialog::enableConfirmSettings( bool ) {}
|
void ODbAdminDialog::enableConfirmSettings( bool ) {}
|
||||||
@@ -233,15 +220,9 @@ ODbAdminDialog::ApplyResult ODbAdminDialog::implApplyChanges()
|
|||||||
return AR_KEEP;
|
return AR_KEEP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( !m_pImpl->saveChanges(*m_pExampleSet) )
|
if ( !m_pImpl->saveChanges(*m_xExampleSet) )
|
||||||
return AR_KEEP;
|
return AR_KEEP;
|
||||||
|
|
||||||
if ( m_bUIEnabled )
|
|
||||||
ShowPage(GetCurPageId());
|
|
||||||
// This does the usual ActivatePage, so the pages can save their current status.
|
|
||||||
// This way, next time they're asked what has changed since now and here, they really
|
|
||||||
// can compare with the status they have _now_ (not the one they had before this apply call).
|
|
||||||
|
|
||||||
return AR_LEAVE_MODIFIED;
|
return AR_LEAVE_MODIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -257,7 +238,7 @@ const SfxItemSet* ODbAdminDialog::getOutputSet() const
|
|||||||
|
|
||||||
SfxItemSet* ODbAdminDialog::getWriteOutputSet()
|
SfxItemSet* ODbAdminDialog::getWriteOutputSet()
|
||||||
{
|
{
|
||||||
return m_pExampleSet;
|
return m_xExampleSet.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair< Reference<XConnection>,bool> ODbAdminDialog::createConnection()
|
std::pair< Reference<XConnection>,bool> ODbAdminDialog::createConnection()
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include <textconnectionsettings.hxx>
|
#include <textconnectionsettings.hxx>
|
||||||
#include "TextConnectionHelper.hxx"
|
#include "TextConnectionHelper.hxx"
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <dsitems.hxx>
|
#include <dsitems.hxx>
|
||||||
#include <stringconstants.hxx>
|
#include <stringconstants.hxx>
|
||||||
|
|
||||||
|
@@ -44,26 +44,21 @@ namespace dbaui
|
|||||||
class ODbDataSourceAdministrationHelper;
|
class ODbDataSourceAdministrationHelper;
|
||||||
/** tab dialog for administrating the office wide registered data sources
|
/** tab dialog for administrating the office wide registered data sources
|
||||||
*/
|
*/
|
||||||
class ODbAdminDialog final : public SfxTabDialog , public IItemSetHelper, public IDatabaseSettingsDialog
|
class ODbAdminDialog final : public SfxTabDialogController, public IItemSetHelper, public IDatabaseSettingsDialog
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
std::stack< sal_Int32 > m_aCurrentDetailPages; // ids of all currently enabled (type-dependent) detail pages
|
|
||||||
|
|
||||||
std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
|
std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
|
||||||
|
|
||||||
bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/>
|
bool m_bUIEnabled : 1; /// <TRUE/> if the UI is enabled, false otherwise. Cannot be switched back to <TRUE/>, once it is <FALSE/>
|
||||||
sal_uInt16 m_nMainPageID;
|
OString m_sMainPageID;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed
|
/** ctor. The itemset given should have been created by <method>createItemSet</method> and should be destroyed
|
||||||
after the dialog has been destroyed
|
after the dialog has been destroyed
|
||||||
*/
|
*/
|
||||||
ODbAdminDialog(vcl::Window* pParent,
|
ODbAdminDialog(weld::Window* pParent, SfxItemSet const * _pItems,
|
||||||
SfxItemSet const * _pItems,
|
const css::uno::Reference< css::uno::XComponentContext >& _rxORB);
|
||||||
const css::uno::Reference< css::uno::XComponentContext >& _rxORB
|
|
||||||
);
|
|
||||||
virtual ~ODbAdminDialog() override;
|
virtual ~ODbAdminDialog() override;
|
||||||
virtual void dispose() override;
|
|
||||||
|
|
||||||
/** create and return an item set for use with the dialog.
|
/** create and return an item set for use with the dialog.
|
||||||
@param _pTypeCollection pointer to an <type>ODatasourceMap</type>. May be NULL, in this case
|
@param _pTypeCollection pointer to an <type>ODatasourceMap</type>. May be NULL, in this case
|
||||||
@@ -95,9 +90,9 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// adds a new detail page and remove all the old ones
|
// adds a new detail page and remove all the old ones
|
||||||
void addDetailPage(sal_uInt16 _nPageId, const char* pTextId, CreateTabPage pCreateFunc);
|
void addDetailPage(const OString& rPageId, const char* pTextId, CreateTabPage pCreateFunc);
|
||||||
|
|
||||||
virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) override;
|
virtual void PageCreated(const OString& rId, SfxTabPage& _rPage) override;
|
||||||
virtual short Ok() override;
|
virtual short Ok() override;
|
||||||
|
|
||||||
/// select a datasource with a given name, adjust the item set accordingly, and everything like that ..
|
/// select a datasource with a given name, adjust the item set accordingly, and everything like that ..
|
||||||
|
@@ -19,8 +19,6 @@
|
|||||||
#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_DLG_HRC
|
#ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_DLG_HRC
|
||||||
#define INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_DLG_HRC
|
#define INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_DLG_HRC
|
||||||
|
|
||||||
#include "dbu_pageids.hxx"
|
|
||||||
|
|
||||||
#define PAGE_X 281
|
#define PAGE_X 281
|
||||||
#define PAGE_Y 215
|
#define PAGE_Y 215
|
||||||
#define WIZARD_PAGE_X 225
|
#define WIZARD_PAGE_X 225
|
||||||
|
@@ -1,38 +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 INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_RESOURCE_HRC
|
|
||||||
#define INCLUDED_DBACCESS_SOURCE_UI_INC_DBU_RESOURCE_HRC
|
|
||||||
|
|
||||||
// tab pages
|
|
||||||
|
|
||||||
#define PAGE_DBASE 1001
|
|
||||||
#define PAGE_ODBC 1003
|
|
||||||
#define PAGE_TEXT 1004
|
|
||||||
#define PAGE_ADO 1007
|
|
||||||
#define PAGE_LDAP 1015
|
|
||||||
#define PAGE_MYSQL_ODBC 1017
|
|
||||||
#define PAGE_USERDRIVER 1019
|
|
||||||
#define PAGE_MYSQL_JDBC 1020
|
|
||||||
#define PAGE_MYSQL_NATIVE 1024
|
|
||||||
#define PAGE_ORACLE_JDBC 1027
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
@@ -37,7 +37,6 @@
|
|||||||
#include <TokenWriter.hxx>
|
#include <TokenWriter.hxx>
|
||||||
#include <UITools.hxx>
|
#include <UITools.hxx>
|
||||||
#include <dbaccess/dataview.hxx>
|
#include <dbaccess/dataview.hxx>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <unotools/ucbhelper.hxx>
|
#include <unotools/ucbhelper.hxx>
|
||||||
#include <tools/urlobj.hxx>
|
#include <tools/urlobj.hxx>
|
||||||
#include <tools/diagnose_ex.h>
|
#include <tools/diagnose_ex.h>
|
||||||
|
@@ -22,7 +22,6 @@
|
|||||||
#include <callbacks.hxx>
|
#include <callbacks.hxx>
|
||||||
#include <core_resource.hxx>
|
#include <core_resource.hxx>
|
||||||
#include <stringconstants.hxx>
|
#include <stringconstants.hxx>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <dlgsave.hxx>
|
#include <dlgsave.hxx>
|
||||||
#include <dbtreelistbox.hxx>
|
#include <dbtreelistbox.hxx>
|
||||||
#include <defaultobjectnamecheck.hxx>
|
#include <defaultobjectnamecheck.hxx>
|
||||||
|
@@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <imageprovider.hxx>
|
#include <imageprovider.hxx>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <stringconstants.hxx>
|
#include <stringconstants.hxx>
|
||||||
#include <bitmaps.hlst>
|
#include <bitmaps.hlst>
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
#include <strings.hrc>
|
#include <strings.hrc>
|
||||||
#include <query.hrc>
|
#include <query.hrc>
|
||||||
#include <dbu_reghelper.hxx>
|
#include <dbu_reghelper.hxx>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <stringconstants.hxx>
|
#include <stringconstants.hxx>
|
||||||
#include <defaultobjectnamecheck.hxx>
|
#include <defaultobjectnamecheck.hxx>
|
||||||
#include <dlgsave.hxx>
|
#include <dlgsave.hxx>
|
||||||
|
@@ -94,13 +94,13 @@ Reference<XPropertySetInfo> SAL_CALL ODataSourcePropertyDialog::getPropertySetI
|
|||||||
|
|
||||||
svt::OGenericUnoDialog::Dialog ODataSourcePropertyDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
|
svt::OGenericUnoDialog::Dialog ODataSourcePropertyDialog::createDialog(const css::uno::Reference<css::awt::XWindow>& rParent)
|
||||||
{
|
{
|
||||||
VclPtrInstance<ODbAdminDialog> pDialog(VCLUnoHelper::GetWindow(rParent), m_pDatasourceItems.get(), m_aContext);
|
std::unique_ptr<ODbAdminDialog> xDialog(new ODbAdminDialog(Application::GetFrameWeld(rParent), m_pDatasourceItems.get(), m_aContext));
|
||||||
|
|
||||||
// the initial selection
|
// the initial selection
|
||||||
if ( m_aInitialSelection.hasValue() )
|
if ( m_aInitialSelection.hasValue() )
|
||||||
pDialog->selectDataSource(m_aInitialSelection);
|
xDialog->selectDataSource(m_aInitialSelection);
|
||||||
|
|
||||||
return svt::OGenericUnoDialog::Dialog(pDialog);
|
return svt::OGenericUnoDialog::Dialog(std::move(xDialog));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace dbaui
|
} // namespace dbaui
|
||||||
|
@@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <dbu_reghelper.hxx>
|
#include <dbu_reghelper.hxx>
|
||||||
#include <dbu_pageids.hxx>
|
|
||||||
#include <strings.hrc>
|
#include <strings.hrc>
|
||||||
#include <strings.hxx>
|
#include <strings.hxx>
|
||||||
#include <stringconstants.hxx>
|
#include <stringconstants.hxx>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Generated with glade 3.20.0 -->
|
<!-- Generated with glade 3.22.1 -->
|
||||||
<interface domain="dba">
|
<interface domain="dba">
|
||||||
<requires lib="gtk+" version="3.18"/>
|
<requires lib="gtk+" version="3.18"/>
|
||||||
<object class="GtkDialog" id="AdminDialog">
|
<object class="GtkDialog" id="AdminDialog">
|
||||||
@@ -7,7 +7,13 @@
|
|||||||
<property name="border_width">6</property>
|
<property name="border_width">6</property>
|
||||||
<property name="title" translatable="yes" context="admindialog|AdminDialog">Database Properties</property>
|
<property name="title" translatable="yes" context="admindialog|AdminDialog">Database Properties</property>
|
||||||
<property name="resizable">False</property>
|
<property name="resizable">False</property>
|
||||||
|
<property name="modal">True</property>
|
||||||
|
<property name="default_width">0</property>
|
||||||
|
<property name="default_height">0</property>
|
||||||
<property name="type_hint">dialog</property>
|
<property name="type_hint">dialog</property>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
<child internal-child="vbox">
|
<child internal-child="vbox">
|
||||||
<object class="GtkBox" id="dialog-vbox1">
|
<object class="GtkBox" id="dialog-vbox1">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
@@ -17,6 +23,20 @@
|
|||||||
<object class="GtkButtonBox" id="dialog-action_area1">
|
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="layout_style">end</property>
|
<property name="layout_style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="reset">
|
||||||
|
<property name="label">gtk-revert-to-saved</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">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="ok">
|
<object class="GtkButton" id="ok">
|
||||||
<property name="label">gtk-ok</property>
|
<property name="label">gtk-ok</property>
|
||||||
@@ -30,7 +50,7 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">0</property>
|
<property name="position">1</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -44,7 +64,7 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">1</property>
|
<property name="position">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
@@ -58,7 +78,7 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="expand">False</property>
|
<property name="expand">False</property>
|
||||||
<property name="fill">True</property>
|
<property name="fill">True</property>
|
||||||
<property name="position">2</property>
|
<property name="position">3</property>
|
||||||
<property name="secondary">True</property>
|
<property name="secondary">True</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@@ -73,7 +93,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkNotebook" id="tabcontrol">
|
<object class="GtkNotebook" id="tabcontrol">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="hexpand">True</property>
|
<property name="hexpand">True</property>
|
||||||
<property name="vexpand">True</property>
|
<property name="vexpand">True</property>
|
||||||
<property name="scrollable">True</property>
|
<property name="scrollable">True</property>
|
||||||
@@ -85,6 +105,30 @@
|
|||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<placeholder/>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="tab">
|
<child type="tab">
|
||||||
@@ -108,6 +152,7 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
|
<action-widget response="0">reset</action-widget>
|
||||||
<action-widget response="-5">ok</action-widget>
|
<action-widget response="-5">ok</action-widget>
|
||||||
<action-widget response="-6">cancel</action-widget>
|
<action-widget response="-6">cancel</action-widget>
|
||||||
<action-widget response="-11">help</action-widget>
|
<action-widget response="-11">help</action-widget>
|
||||||
|
@@ -8,6 +8,8 @@
|
|||||||
<property name="title" translatable="yes" context="advancedsettingsdialog|AdvancedSettingsDialog">Advanced Settings</property>
|
<property name="title" translatable="yes" context="advancedsettingsdialog|AdvancedSettingsDialog">Advanced Settings</property>
|
||||||
<property name="resizable">False</property>
|
<property name="resizable">False</property>
|
||||||
<property name="modal">True</property>
|
<property name="modal">True</property>
|
||||||
|
<property name="default_width">0</property>
|
||||||
|
<property name="default_height">0</property>
|
||||||
<property name="type_hint">dialog</property>
|
<property name="type_hint">dialog</property>
|
||||||
<child>
|
<child>
|
||||||
<placeholder/>
|
<placeholder/>
|
||||||
|
Reference in New Issue
Block a user