2010-10-12 15:59:03 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-14 17:39:53 +01:00
|
|
|
/*
|
|
|
|
* 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 .
|
|
|
|
*/
|
2001-01-26 15:14:21 +00:00
|
|
|
|
2018-05-09 23:20:23 +00:00
|
|
|
#include <config_java.h>
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <core_resource.hxx>
|
2001-01-26 15:14:21 +00:00
|
|
|
#include "detailpages.hxx"
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <sqlmessage.hxx>
|
|
|
|
#include <dsmeta.hxx>
|
2007-11-01 14:12:32 +00:00
|
|
|
#include "advancedsettings.hxx"
|
|
|
|
#include "DbAdminImpl.hxx"
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <dsitems.hxx>
|
2007-11-01 14:12:32 +00:00
|
|
|
#include "dbfindex.hxx"
|
2008-10-01 12:28:29 +00:00
|
|
|
#include "dsnItem.hxx"
|
2007-11-01 14:12:32 +00:00
|
|
|
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <dbu_dlg.hxx>
|
|
|
|
#include <strings.hrc>
|
2007-11-01 14:12:32 +00:00
|
|
|
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/itemset.hxx>
|
|
|
|
#include <svl/stritem.hxx>
|
|
|
|
#include <svl/eitem.hxx>
|
|
|
|
#include <svl/intitem.hxx>
|
2004-01-07 14:45:18 +00:00
|
|
|
#include <vcl/mnemonic.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/cjkoptions.hxx>
|
2013-08-19 00:41:12 +03:00
|
|
|
#if HAVE_FEATURE_JAVA
|
2004-08-02 14:45:26 +00:00
|
|
|
#include <jvmaccess/virtualmachine.hxx>
|
2013-04-04 22:46:53 +02:00
|
|
|
#endif
|
2004-08-02 14:45:26 +00:00
|
|
|
#include <connectivity/CommonTools.hxx>
|
|
|
|
#include "DriverSettings.hxx"
|
2017-10-23 22:42:52 +02:00
|
|
|
#include <dbadmin.hxx>
|
2008-03-07 10:22:51 +00:00
|
|
|
|
2001-01-26 15:14:21 +00:00
|
|
|
namespace dbaui
|
|
|
|
{
|
|
|
|
|
|
|
|
using namespace ::com::sun::star::uno;
|
|
|
|
using namespace ::com::sun::star::sdbc;
|
|
|
|
using namespace ::com::sun::star::beans;
|
|
|
|
using namespace ::com::sun::star::lang;
|
|
|
|
using namespace ::com::sun::star::container;
|
|
|
|
using namespace ::dbtools;
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
OCommonBehaviourTabPage::OCommonBehaviourTabPage(weld::Container* pPage, weld::DialogController* pController,
|
2018-10-23 21:09:47 +01:00
|
|
|
const OUString& rUIXMLDescription, const OString& rId, const SfxItemSet& rCoreAttrs,
|
|
|
|
OCommonBehaviourTabPageFlags nControlFlags)
|
2019-09-24 14:10:48 +01:00
|
|
|
: OGenericAdministrationPage(pPage, pController, rUIXMLDescription, rId, rCoreAttrs)
|
2018-10-23 21:09:47 +01:00
|
|
|
, m_nControlFlags(nControlFlags)
|
|
|
|
{
|
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
|
|
|
|
{
|
|
|
|
m_xOptionsLabel = m_xBuilder->weld_label("optionslabel");
|
|
|
|
m_xOptionsLabel->show();
|
|
|
|
m_xOptions = m_xBuilder->weld_entry("options");
|
|
|
|
m_xOptions->show();
|
|
|
|
m_xOptions->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
|
|
|
|
{
|
|
|
|
m_xDataConvertLabel = m_xBuilder->weld_label("charsetheader");
|
|
|
|
m_xDataConvertLabel->show();
|
|
|
|
m_xCharsetLabel = m_xBuilder->weld_label("charsetlabel");
|
|
|
|
m_xCharsetLabel->show();
|
2018-10-24 13:36:58 +01:00
|
|
|
m_xCharset.reset(new CharSetListBox(m_xBuilder->weld_combo_box("charset")));
|
2018-10-23 21:09:47 +01:00
|
|
|
m_xCharset->show();
|
2018-10-24 12:27:12 +01:00
|
|
|
m_xCharset->connect_changed(LINK(this, OCommonBehaviourTabPage, CharsetSelectHdl));
|
2018-10-23 21:09:47 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
IMPL_LINK_NOARG(OCommonBehaviourTabPage, CharsetSelectHdl, weld::ComboBox&, void)
|
2018-10-23 21:09:47 +01:00
|
|
|
{
|
|
|
|
callModifiedHdl();
|
|
|
|
}
|
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::~OCommonBehaviourTabPage()
|
2018-10-23 21:09:47 +01:00
|
|
|
{
|
|
|
|
m_xCharset.reset();
|
|
|
|
}
|
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
void OCommonBehaviourTabPage::fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
|
2015-03-09 14:29:30 +02:00
|
|
|
{
|
2018-10-23 21:09:47 +01:00
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
|
|
|
|
{
|
|
|
|
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xOptionsLabel.get()));
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
|
|
|
|
{
|
|
|
|
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xCharsetLabel.get()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
void OCommonBehaviourTabPage::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
|
2018-10-23 21:09:47 +01:00
|
|
|
{
|
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
|
|
|
|
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::Entry>(m_xOptions.get()));
|
|
|
|
|
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
|
|
|
|
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::ComboBox>(m_xCharset->get_widget()));
|
|
|
|
}
|
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
void OCommonBehaviourTabPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
|
2018-10-23 21:09:47 +01:00
|
|
|
{
|
|
|
|
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
|
|
|
|
bool bValid, bReadonly;
|
|
|
|
getFlags(_rSet, bValid, bReadonly);
|
|
|
|
|
|
|
|
// collect the items
|
|
|
|
const SfxStringItem* pOptionsItem = _rSet.GetItem<SfxStringItem>(DSID_ADDITIONALOPTIONS);
|
|
|
|
const SfxStringItem* pCharsetItem = _rSet.GetItem<SfxStringItem>(DSID_CHARSET);
|
|
|
|
|
|
|
|
// forward the values to the controls
|
|
|
|
if (bValid)
|
|
|
|
{
|
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
|
|
|
|
{
|
|
|
|
m_xOptions->set_text(pOptionsItem->GetValue());
|
|
|
|
m_xOptions->save_value();
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
|
|
|
|
{
|
|
|
|
m_xCharset->SelectEntryByIanaName( pCharsetItem->GetValue() );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue);
|
|
|
|
}
|
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
bool OCommonBehaviourTabPage::FillItemSet(SfxItemSet* _rSet)
|
2018-10-23 21:09:47 +01:00
|
|
|
{
|
|
|
|
bool bChangedSomething = false;
|
|
|
|
|
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseOptions)
|
|
|
|
{
|
|
|
|
fillString(*_rSet,m_xOptions.get(),DSID_ADDITIONALOPTIONS,bChangedSomething);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (m_nControlFlags & OCommonBehaviourTabPageFlags::UseCharset)
|
|
|
|
{
|
|
|
|
if ( m_xCharset->StoreSelectedCharSet( *_rSet, DSID_CHARSET ) )
|
|
|
|
bChangedSomething = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return bChangedSomething;
|
2015-03-09 14:29:30 +02:00
|
|
|
}
|
|
|
|
|
2018-10-24 12:26:04 +01:00
|
|
|
// ODbaseDetailsPage
|
2019-09-24 14:10:48 +01:00
|
|
|
ODbaseDetailsPage::ODbaseDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& _rCoreAttrs)
|
|
|
|
: OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/dbasepage.ui", "DbasePage",
|
2018-10-24 12:26:04 +01:00
|
|
|
_rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
|
|
|
|
, m_xShowDeleted(m_xBuilder->weld_check_button("showDelRowsCheckbutton"))
|
|
|
|
, m_xFT_Message(m_xBuilder->weld_label("specMessageLabel"))
|
|
|
|
, m_xIndexes(m_xBuilder->weld_button("indiciesButton"))
|
|
|
|
{
|
|
|
|
m_xIndexes->connect_clicked(LINK(this, ODbaseDetailsPage, OnButtonClicked));
|
|
|
|
m_xShowDeleted->connect_clicked(LINK(this, ODbaseDetailsPage, OnButtonClicked));
|
|
|
|
}
|
|
|
|
|
|
|
|
ODbaseDetailsPage::~ODbaseDetailsPage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateDbase(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet)
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<ODbaseDetailsPage>(pPage, pController, *_rAttrSet);
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
|
2014-04-17 11:16:55 +02:00
|
|
|
void ODbaseDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
|
|
|
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
|
2014-04-17 11:16:55 +02:00
|
|
|
bool bValid, bReadonly;
|
2001-01-26 15:14:21 +00:00
|
|
|
getFlags(_rSet, bValid, bReadonly);
|
|
|
|
|
|
|
|
// get the DSN string (needed for the index dialog)
|
2015-10-19 07:18:39 +02:00
|
|
|
const SfxStringItem* pUrlItem = _rSet.GetItem<SfxStringItem>(DSID_CONNECTURL);
|
|
|
|
const DbuTypeCollectionItem* pTypesItem = _rSet.GetItem<DbuTypeCollectionItem>(DSID_TYPECOLLECTION);
|
2015-11-10 10:13:39 +01:00
|
|
|
::dbaccess::ODsnTypeCollection* pTypeCollection = pTypesItem ? pTypesItem->getCollection() : nullptr;
|
2013-02-20 04:33:49 +01:00
|
|
|
if (pTypeCollection && pUrlItem && pUrlItem->GetValue().getLength())
|
2001-01-26 15:14:21 +00:00
|
|
|
m_sDsn = pTypeCollection->cutPrefix(pUrlItem->GetValue());
|
|
|
|
|
|
|
|
// get the other relevant items
|
2015-10-19 07:18:39 +02:00
|
|
|
const SfxBoolItem* pDeletedItem = _rSet.GetItem<SfxBoolItem>(DSID_SHOWDELETEDROWS);
|
2001-01-26 15:14:21 +00:00
|
|
|
|
2004-08-02 14:45:26 +00:00
|
|
|
if ( bValid )
|
|
|
|
{
|
2018-10-23 21:09:47 +01:00
|
|
|
m_xShowDeleted->set_active(pDeletedItem->GetValue());
|
2019-03-15 11:19:51 +00:00
|
|
|
m_xFT_Message->set_visible(m_xShowDeleted->get_active());
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2001-01-26 15:14:21 +00:00
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 17:23:12 +02:00
|
|
|
bool ODbaseDetailsPage::FillItemSet( SfxItemSet* _rSet )
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet);
|
2001-01-26 15:14:21 +00:00
|
|
|
|
2018-10-23 21:09:47 +01:00
|
|
|
fillBool(*_rSet, m_xShowDeleted.get(), DSID_SHOWDELETEDROWS, false, bChangedSomething);
|
2001-01-26 15:14:21 +00:00
|
|
|
return bChangedSomething;
|
|
|
|
}
|
|
|
|
|
2018-10-23 21:09:47 +01:00
|
|
|
IMPL_LINK(ODbaseDetailsPage, OnButtonClicked, weld::Button&, rButton, void)
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
2018-10-23 21:09:47 +01:00
|
|
|
if (m_xIndexes.get() == &rButton)
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
2019-09-25 15:14:55 +01:00
|
|
|
ODbaseIndexDialog aIndexDialog(GetFrameWeld(), m_sDsn);
|
2018-10-12 11:04:02 +01:00
|
|
|
aIndexDialog.run();
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
else
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2019-03-15 11:19:51 +00:00
|
|
|
m_xFT_Message->set_visible(m_xShowDeleted->get_active());
|
2001-01-26 15:14:21 +00:00
|
|
|
// it was one of the checkboxes -> we count as modified from now on
|
|
|
|
callModifiedHdl();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-08-17 23:43:14 +02:00
|
|
|
// OAdoDetailsPage
|
2019-09-24 14:10:48 +01:00
|
|
|
OAdoDetailsPage::OAdoDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
|
|
|
|
: OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/autocharsetpage.ui", "AutoCharset",
|
2018-10-23 21:30:15 +01:00
|
|
|
rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset )
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2005-09-23 11:29:50 +00:00
|
|
|
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateAdo(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet)
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<OAdoDetailsPage>(pPage, pController, *rAttrSet);
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
|
2013-08-17 23:43:14 +02:00
|
|
|
// OOdbcDetailsPage
|
2019-09-24 14:10:48 +01:00
|
|
|
OOdbcDetailsPage::OOdbcDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
|
|
|
|
: OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/odbcpage.ui", "ODBC", rCoreAttrs,
|
2018-10-23 21:37:34 +01:00
|
|
|
OCommonBehaviourTabPageFlags::UseCharset | OCommonBehaviourTabPageFlags::UseOptions)
|
|
|
|
, m_xUseCatalog(m_xBuilder->weld_check_button("useCatalogCheckbutton"))
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
2018-10-23 21:37:34 +01:00
|
|
|
m_xUseCatalog->connect_toggled(LINK(this, OGenericAdministrationPage, OnControlModifiedButtonClick));
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
OOdbcDetailsPage::~OOdbcDetailsPage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateODBC(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet)
|
2015-03-09 14:29:30 +02:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<OOdbcDetailsPage>(pPage, pController, *pAttrSet);
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 17:23:12 +02:00
|
|
|
bool OOdbcDetailsPage::FillItemSet( SfxItemSet* _rSet )
|
2001-04-20 12:38:06 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet);
|
2018-10-23 21:37:34 +01:00
|
|
|
fillBool(*_rSet,m_xUseCatalog.get(),DSID_USECATALOG,false,bChangedSomething);
|
2001-04-20 12:38:06 +00:00
|
|
|
return bChangedSomething;
|
|
|
|
}
|
2014-04-17 11:16:55 +02:00
|
|
|
void OOdbcDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
|
2001-04-20 12:38:06 +00:00
|
|
|
{
|
|
|
|
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
|
2014-04-17 11:16:55 +02:00
|
|
|
bool bValid, bReadonly;
|
2001-04-20 12:38:06 +00:00
|
|
|
getFlags(_rSet, bValid, bReadonly);
|
|
|
|
|
2015-10-19 07:18:39 +02:00
|
|
|
const SfxBoolItem* pUseCatalogItem = _rSet.GetItem<SfxBoolItem>(DSID_USECATALOG);
|
2001-04-20 12:38:06 +00:00
|
|
|
|
2004-08-02 14:45:26 +00:00
|
|
|
if ( bValid )
|
2018-10-23 21:37:34 +01:00
|
|
|
m_xUseCatalog->set_active(pUseCatalogItem->GetValue());
|
2001-04-20 12:38:06 +00:00
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
|
2001-04-20 12:38:06 +00:00
|
|
|
}
|
2013-08-17 23:43:14 +02:00
|
|
|
// OOdbcDetailsPage
|
2019-09-24 14:10:48 +01:00
|
|
|
OUserDriverDetailsPage::OUserDriverDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
|
|
|
|
: OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/userdetailspage.ui", "UserDetailsPage",
|
2018-10-24 09:04:30 +01:00
|
|
|
rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset | OCommonBehaviourTabPageFlags::UseOptions)
|
|
|
|
, m_xFTHostname(m_xBuilder->weld_label("hostnameft"))
|
|
|
|
, m_xEDHostname(m_xBuilder->weld_entry("hostname"))
|
|
|
|
, m_xPortNumber(m_xBuilder->weld_label("portnumberft"))
|
|
|
|
, m_xNFPortNumber(m_xBuilder->weld_spin_button("portnumber"))
|
|
|
|
, m_xUseCatalog(m_xBuilder->weld_check_button("usecatalog"))
|
2003-03-19 16:57:12 +00:00
|
|
|
{
|
2018-10-24 09:04:30 +01:00
|
|
|
m_xUseCatalog->connect_toggled(LINK(this, OGenericAdministrationPage, OnControlModifiedButtonClick));
|
2003-03-19 16:57:12 +00:00
|
|
|
}
|
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
OUserDriverDetailsPage::~OUserDriverDetailsPage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateUser(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet)
|
2003-03-19 16:57:12 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<OUserDriverDetailsPage>(pPage, pController, *pAttrSet);
|
2003-03-19 16:57:12 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 17:23:12 +02:00
|
|
|
bool OUserDriverDetailsPage::FillItemSet( SfxItemSet* _rSet )
|
2003-03-19 16:57:12 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet);
|
2004-08-02 14:45:26 +00:00
|
|
|
|
2018-10-24 09:04:30 +01:00
|
|
|
fillInt32(*_rSet,m_xNFPortNumber.get(),DSID_CONN_PORTNUMBER,bChangedSomething);
|
|
|
|
fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
|
|
|
|
fillBool(*_rSet,m_xUseCatalog.get(),DSID_USECATALOG,false,bChangedSomething);
|
2004-08-02 14:45:26 +00:00
|
|
|
|
2003-03-19 16:57:12 +00:00
|
|
|
return bChangedSomething;
|
|
|
|
}
|
2018-09-07 14:33:33 +02:00
|
|
|
void OUserDriverDetailsPage::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::fillControls(_rControlList);
|
2018-10-24 09:04:30 +01:00
|
|
|
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::Entry>(m_xEDHostname.get()));
|
2019-08-01 17:34:14 +01:00
|
|
|
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::ToggleButton>(m_xUseCatalog.get()));
|
2018-10-24 09:04:30 +01:00
|
|
|
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::SpinButton>(m_xNFPortNumber.get()));
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2018-09-07 14:33:33 +02:00
|
|
|
void OUserDriverDetailsPage::fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::fillWindows(_rControlList);
|
2018-10-24 09:04:30 +01:00
|
|
|
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xFTHostname.get()));
|
|
|
|
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xPortNumber.get()));
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2014-04-17 11:16:55 +02:00
|
|
|
void OUserDriverDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
|
2003-03-19 16:57:12 +00:00
|
|
|
{
|
|
|
|
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
|
2014-04-17 11:16:55 +02:00
|
|
|
bool bValid, bReadonly;
|
2003-03-19 16:57:12 +00:00
|
|
|
getFlags(_rSet, bValid, bReadonly);
|
|
|
|
|
2015-10-19 07:18:39 +02:00
|
|
|
const SfxBoolItem* pUseCatalogItem = _rSet.GetItem<SfxBoolItem>(DSID_USECATALOG);
|
|
|
|
const SfxStringItem* pHostName = _rSet.GetItem<SfxStringItem>(DSID_CONN_HOSTNAME);
|
|
|
|
const SfxInt32Item* pPortNumber = _rSet.GetItem<SfxInt32Item>(DSID_CONN_PORTNUMBER);
|
2004-08-02 14:45:26 +00:00
|
|
|
|
|
|
|
if ( bValid )
|
|
|
|
{
|
2018-10-24 09:04:30 +01:00
|
|
|
m_xEDHostname->set_text(pHostName->GetValue());
|
|
|
|
m_xEDHostname->save_value();
|
2003-03-19 16:57:12 +00:00
|
|
|
|
2018-10-24 09:04:30 +01:00
|
|
|
m_xNFPortNumber->set_value(pPortNumber->GetValue());
|
|
|
|
m_xNFPortNumber->save_value();
|
2004-08-02 14:45:26 +00:00
|
|
|
|
2018-10-24 09:04:30 +01:00
|
|
|
m_xUseCatalog->set_active(pUseCatalogItem->GetValue());
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2003-03-19 16:57:12 +00:00
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2013-08-17 23:43:14 +02:00
|
|
|
// OMySQLODBCDetailsPage
|
2019-09-24 14:10:48 +01:00
|
|
|
OMySQLODBCDetailsPage::OMySQLODBCDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
|
|
|
|
: OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/autocharsetpage.ui", "AutoCharset",
|
2018-10-24 09:24:45 +01:00
|
|
|
rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset )
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
|
|
|
}
|
2003-03-19 16:57:12 +00:00
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateMySQLODBC(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet)
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<OMySQLODBCDetailsPage>(pPage, pController, *pAttrSet);
|
2003-03-19 16:57:12 +00:00
|
|
|
}
|
2004-08-02 14:45:26 +00:00
|
|
|
|
2013-08-17 23:43:14 +02:00
|
|
|
// OMySQLJDBCDetailsPage
|
2019-09-24 14:10:48 +01:00
|
|
|
OGeneralSpecialJDBCDetailsPage::OGeneralSpecialJDBCDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs ,sal_uInt16 _nPortId, bool bShowSocket)
|
|
|
|
: OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/generalspecialjdbcdetailspage.ui", "GeneralSpecialJDBCDetails",
|
2018-10-24 09:20:51 +01:00
|
|
|
rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
|
|
|
|
, m_nPortId(_nPortId)
|
|
|
|
, m_bUseClass(true)
|
|
|
|
, m_xEDHostname(m_xBuilder->weld_entry("hostNameEntry"))
|
|
|
|
, m_xNFPortNumber(m_xBuilder->weld_spin_button("portNumberSpinbutton"))
|
|
|
|
, m_xFTSocket(m_xBuilder->weld_label("socketLabel"))
|
|
|
|
, m_xEDSocket(m_xBuilder->weld_entry("socketEntry"))
|
|
|
|
, m_xFTDriverClass(m_xBuilder->weld_label("driverClassLabel"))
|
|
|
|
, m_xEDDriverClass(m_xBuilder->weld_entry("jdbcDriverClassEntry"))
|
|
|
|
, m_xTestJavaDriver(m_xBuilder->weld_button("testDriverClassButton"))
|
|
|
|
{
|
|
|
|
const SfxStringItem* pUrlItem = rCoreAttrs.GetItem<SfxStringItem>(DSID_CONNECTURL);
|
|
|
|
const DbuTypeCollectionItem* pTypesItem = rCoreAttrs.GetItem<DbuTypeCollectionItem>(DSID_TYPECOLLECTION);
|
2015-11-10 10:13:39 +01:00
|
|
|
::dbaccess::ODsnTypeCollection* pTypeCollection = pTypesItem ? pTypesItem->getCollection() : nullptr;
|
2013-02-20 04:33:49 +01:00
|
|
|
if (pTypeCollection && pUrlItem && pUrlItem->GetValue().getLength() )
|
2009-07-03 12:24:35 +00:00
|
|
|
{
|
|
|
|
m_sDefaultJdbcDriverName = pTypeCollection->getJavaDriverClass(pUrlItem->GetValue());
|
|
|
|
}
|
2013-02-20 04:33:49 +01:00
|
|
|
if ( m_sDefaultJdbcDriverName.getLength() )
|
2008-03-05 15:59:53 +00:00
|
|
|
{
|
2018-10-24 09:20:51 +01:00
|
|
|
m_xEDDriverClass->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
|
|
|
|
m_xTestJavaDriver->connect_clicked(LINK(this,OGeneralSpecialJDBCDetailsPage,OnTestJavaClickHdl));
|
2008-03-05 15:59:53 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_bUseClass = false;
|
2019-03-15 11:19:51 +00:00
|
|
|
m_xFTDriverClass->hide();
|
|
|
|
m_xEDDriverClass->hide();
|
|
|
|
m_xTestJavaDriver->hide();
|
2008-03-05 15:59:53 +00:00
|
|
|
}
|
|
|
|
|
2019-03-15 11:19:51 +00:00
|
|
|
m_xFTSocket->set_visible(bShowSocket && !m_bUseClass);
|
|
|
|
m_xEDSocket->set_visible(bShowSocket && !m_bUseClass);
|
2002-11-21 14:27:11 +00:00
|
|
|
|
2018-10-24 09:20:51 +01:00
|
|
|
m_xEDHostname->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
|
|
|
|
m_xNFPortNumber->connect_value_changed(LINK(this,OGenericAdministrationPage,OnControlSpinButtonModifyHdl));
|
|
|
|
m_xEDSocket->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
|
2002-11-21 14:27:11 +00:00
|
|
|
}
|
2004-08-02 14:45:26 +00:00
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
OGeneralSpecialJDBCDetailsPage::~OGeneralSpecialJDBCDetailsPage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2014-06-10 17:23:12 +02:00
|
|
|
bool OGeneralSpecialJDBCDetailsPage::FillItemSet( SfxItemSet* _rSet )
|
2002-11-21 14:27:11 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet);
|
2008-03-05 15:59:53 +00:00
|
|
|
if ( m_bUseClass )
|
2018-10-24 09:20:51 +01:00
|
|
|
fillString(*_rSet,m_xEDDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
|
|
|
|
fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
|
|
|
|
fillString(*_rSet,m_xEDSocket.get(),DSID_CONN_SOCKET,bChangedSomething);
|
|
|
|
fillInt32(*_rSet,m_xNFPortNumber.get(),m_nPortId,bChangedSomething );
|
2002-11-21 14:27:11 +00:00
|
|
|
|
|
|
|
return bChangedSomething;
|
|
|
|
}
|
2014-04-17 11:16:55 +02:00
|
|
|
void OGeneralSpecialJDBCDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
|
2002-11-21 14:27:11 +00:00
|
|
|
{
|
|
|
|
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
|
2014-04-17 11:16:55 +02:00
|
|
|
bool bValid, bReadonly;
|
2002-11-21 14:27:11 +00:00
|
|
|
getFlags(_rSet, bValid, bReadonly);
|
|
|
|
|
2015-10-19 07:18:39 +02:00
|
|
|
const SfxStringItem* pDrvItem = _rSet.GetItem<SfxStringItem>(DSID_JDBCDRIVERCLASS);
|
|
|
|
const SfxStringItem* pHostName = _rSet.GetItem<SfxStringItem>(DSID_CONN_HOSTNAME);
|
|
|
|
const SfxInt32Item* pPortNumber = _rSet.GetItem<SfxInt32Item>(m_nPortId);
|
|
|
|
const SfxStringItem* pSocket = _rSet.GetItem<SfxStringItem>(DSID_CONN_SOCKET);
|
2002-11-21 14:27:11 +00:00
|
|
|
|
|
|
|
if ( bValid )
|
|
|
|
{
|
2008-03-05 15:59:53 +00:00
|
|
|
if ( m_bUseClass )
|
|
|
|
{
|
2018-10-24 09:20:51 +01:00
|
|
|
m_xEDDriverClass->set_text(pDrvItem->GetValue());
|
|
|
|
m_xEDDriverClass->save_value();
|
2008-03-05 15:59:53 +00:00
|
|
|
}
|
2002-11-21 14:27:11 +00:00
|
|
|
|
2018-10-24 09:20:51 +01:00
|
|
|
m_xEDHostname->set_text(pHostName->GetValue());
|
|
|
|
m_xEDHostname->save_value();
|
2002-11-21 14:27:11 +00:00
|
|
|
|
2018-10-24 09:20:51 +01:00
|
|
|
m_xNFPortNumber->set_value(pPortNumber->GetValue());
|
|
|
|
m_xNFPortNumber->save_value();
|
2008-06-30 14:12:18 +00:00
|
|
|
|
2018-10-24 09:20:51 +01:00
|
|
|
m_xEDSocket->set_text(pSocket->GetValue());
|
|
|
|
m_xEDSocket->save_value();
|
2002-11-21 14:27:11 +00:00
|
|
|
}
|
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
|
2004-08-02 14:45:26 +00:00
|
|
|
|
2015-10-02 10:05:21 +02:00
|
|
|
// to get the correct value when saveValue was called by base class
|
2018-10-24 09:20:51 +01:00
|
|
|
if ( m_bUseClass && m_xEDDriverClass->get_text().trim().isEmpty() )
|
2002-11-21 14:27:11 +00:00
|
|
|
{
|
2018-10-24 09:20:51 +01:00
|
|
|
m_xEDDriverClass->set_text(m_sDefaultJdbcDriverName);
|
|
|
|
m_xEDDriverClass->save_value();
|
2002-11-21 14:27:11 +00:00
|
|
|
}
|
|
|
|
}
|
2018-10-24 09:20:51 +01:00
|
|
|
IMPL_LINK_NOARG(OGeneralSpecialJDBCDetailsPage, OnTestJavaClickHdl, weld::Button&, void)
|
2002-11-21 14:27:11 +00:00
|
|
|
{
|
2004-08-02 14:45:26 +00:00
|
|
|
OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF");
|
2008-03-05 15:59:53 +00:00
|
|
|
OSL_ENSURE(m_bUseClass,"Who called me?");
|
|
|
|
|
2014-04-17 11:16:55 +02:00
|
|
|
bool bSuccess = false;
|
2013-08-19 00:41:12 +03:00
|
|
|
#if HAVE_FEATURE_JAVA
|
2004-08-02 14:45:26 +00:00
|
|
|
try
|
2002-12-09 08:11:54 +00:00
|
|
|
{
|
2018-10-24 09:20:51 +01:00
|
|
|
if (!m_xEDDriverClass->get_text().trim().isEmpty())
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2013-01-04 09:12:44 +02:00
|
|
|
// TODO change jvmaccess
|
2013-01-16 15:16:05 +02:00
|
|
|
::rtl::Reference< jvmaccess::VirtualMachine > xJVM = ::connectivity::getJavaVM( m_pAdminDialog->getORB() );
|
2018-10-24 09:20:51 +01:00
|
|
|
m_xEDDriverClass->set_text(m_xEDDriverClass->get_text().trim()); // fdo#68341
|
|
|
|
bSuccess = ::connectivity::existsJavaClassByName(xJVM,m_xEDDriverClass->get_text());
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2002-12-09 08:11:54 +00:00
|
|
|
}
|
2004-08-02 14:45:26 +00:00
|
|
|
catch(Exception&)
|
2002-11-21 14:27:11 +00:00
|
|
|
{
|
|
|
|
}
|
2013-04-04 22:46:53 +02:00
|
|
|
#endif
|
2017-06-11 20:56:30 +01:00
|
|
|
const char* pMessage = bSuccess ? STR_JDBCDRIVER_SUCCESS : STR_JDBCDRIVER_NO_SUCCESS;
|
2018-03-20 17:17:10 +00:00
|
|
|
const MessageType mt = bSuccess ? MessageType::Info : MessageType::Error;
|
2019-09-25 15:14:55 +01:00
|
|
|
OSQLMessageBox aMsg(GetFrameWeld(), DBA_RES(pMessage), OUString(), MessBoxStyle::Ok | MessBoxStyle::DefaultOk, mt);
|
2018-03-20 17:17:10 +00:00
|
|
|
aMsg.run();
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2018-03-20 17:17:10 +00:00
|
|
|
|
2019-08-02 10:19:16 +01:00
|
|
|
void OGeneralSpecialJDBCDetailsPage::callModifiedHdl(weld::Widget* pControl)
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2018-10-24 09:20:51 +01:00
|
|
|
if (m_bUseClass && pControl == m_xEDDriverClass.get())
|
|
|
|
m_xTestJavaDriver->set_sensitive(!m_xEDDriverClass->get_text().trim().isEmpty());
|
2004-08-02 14:45:26 +00:00
|
|
|
|
|
|
|
// tell the listener we were modified
|
2015-10-15 08:13:49 +02:00
|
|
|
OGenericAdministrationPage::callModifiedHdl();
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2002-11-21 14:27:11 +00:00
|
|
|
|
2013-08-17 23:43:14 +02:00
|
|
|
// MySQLNativePage
|
2019-09-24 14:10:48 +01:00
|
|
|
MySQLNativePage::MySQLNativePage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
|
|
|
|
: OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/mysqlnativepage.ui", "MysqlNativePage", rCoreAttrs, OCommonBehaviourTabPageFlags::UseCharset)
|
2018-10-24 12:20:37 +01:00
|
|
|
, m_xMySQLSettingsContainer(m_xBuilder->weld_widget("MySQLSettingsContainer"))
|
2019-08-02 10:43:27 +01:00
|
|
|
, m_xMySQLSettings(new MySQLNativeSettings(m_xMySQLSettingsContainer.get(), LINK(this,OGenericAdministrationPage,OnControlModified)))
|
2018-10-24 12:20:37 +01:00
|
|
|
, m_xSeparator1(m_xBuilder->weld_label("connectionheader"))
|
|
|
|
, m_xSeparator2(m_xBuilder->weld_label("userheader"))
|
|
|
|
, m_xUserNameLabel(m_xBuilder->weld_label("usernamelabel"))
|
|
|
|
, m_xUserName(m_xBuilder->weld_entry("username"))
|
|
|
|
, m_xPasswordRequired(m_xBuilder->weld_check_button("passwordrequired"))
|
2014-08-03 13:44:00 +02:00
|
|
|
{
|
2018-10-24 12:20:37 +01:00
|
|
|
m_xUserName->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
|
2015-01-16 15:29:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
MySQLNativePage::~MySQLNativePage()
|
|
|
|
{
|
2019-09-20 20:29:36 +01:00
|
|
|
m_xMySQLSettings.reset();
|
2015-01-16 15:29:28 +02:00
|
|
|
}
|
|
|
|
|
2018-09-07 14:33:33 +02:00
|
|
|
void MySQLNativePage::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
|
2009-02-16 07:31:09 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::fillControls( _rControlList );
|
2019-08-02 10:43:27 +01:00
|
|
|
m_xMySQLSettings->fillControls( _rControlList );
|
2009-02-16 07:31:09 +00:00
|
|
|
|
2018-10-24 12:20:37 +01:00
|
|
|
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::Entry>(m_xUserName.get()));
|
2019-08-01 17:34:14 +01:00
|
|
|
_rControlList.emplace_back(new OSaveValueWidgetWrapper<weld::ToggleButton>(m_xPasswordRequired.get()));
|
2009-02-16 07:31:09 +00:00
|
|
|
}
|
2018-10-24 12:20:37 +01:00
|
|
|
|
2018-09-07 14:33:33 +02:00
|
|
|
void MySQLNativePage::fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
|
2009-02-16 07:31:09 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::fillWindows( _rControlList );
|
2019-08-02 10:43:27 +01:00
|
|
|
m_xMySQLSettings->fillWindows( _rControlList);
|
2009-02-16 07:31:09 +00:00
|
|
|
|
2018-10-24 12:20:37 +01:00
|
|
|
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xSeparator1.get()));
|
|
|
|
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xSeparator2.get()));
|
|
|
|
_rControlList.emplace_back(new ODisableWidgetWrapper<weld::Label>(m_xUserNameLabel.get()));
|
2009-02-16 07:31:09 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 17:23:12 +02:00
|
|
|
bool MySQLNativePage::FillItemSet( SfxItemSet* _rSet )
|
2009-02-16 07:31:09 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet( _rSet );
|
2009-02-16 07:31:09 +00:00
|
|
|
|
2019-08-02 10:43:27 +01:00
|
|
|
bChangedSomething |= m_xMySQLSettings->FillItemSet( _rSet );
|
2009-02-16 07:31:09 +00:00
|
|
|
|
2018-10-24 12:20:37 +01:00
|
|
|
if (m_xUserName->get_value_changed_from_saved())
|
2009-02-16 07:31:09 +00:00
|
|
|
{
|
2018-10-24 12:20:37 +01:00
|
|
|
_rSet->Put( SfxStringItem( DSID_USER, m_xUserName->get_text() ) );
|
2014-06-10 17:23:12 +02:00
|
|
|
_rSet->Put( SfxStringItem( DSID_PASSWORD, OUString()));
|
2014-03-26 15:34:49 +02:00
|
|
|
bChangedSomething = true;
|
2009-02-16 07:31:09 +00:00
|
|
|
}
|
2018-10-24 12:20:37 +01:00
|
|
|
fillBool(*_rSet,m_xPasswordRequired.get(),DSID_PASSWORDREQUIRED,false,bChangedSomething);
|
2009-02-16 07:31:09 +00:00
|
|
|
|
|
|
|
return bChangedSomething;
|
|
|
|
}
|
2014-04-17 11:16:55 +02:00
|
|
|
void MySQLNativePage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
|
2009-02-16 07:31:09 +00:00
|
|
|
{
|
|
|
|
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
|
2014-04-17 11:16:55 +02:00
|
|
|
bool bValid, bReadonly;
|
2009-02-16 07:31:09 +00:00
|
|
|
getFlags(_rSet, bValid, bReadonly);
|
|
|
|
|
2019-08-02 10:43:27 +01:00
|
|
|
m_xMySQLSettings->implInitControls( _rSet );
|
CWS-TOOLING: integrate CWS dba32g
2009-09-09 07:53:55 +0200 oj r275964 : replace strlen with rtl_str_getLength
2009-09-07 20:59:10 +0200 fs r275913 : disable the CopyTableWizard test until issue 104869 is fixed
2009-09-07 12:17:31 +0200 oj r275885 : #i104810# remove de as lang
2009-09-05 22:26:21 +0200 fs r275857 : protect StateChanged against re-entrance
2009-09-05 22:25:52 +0200 fs r275856 : don't attempt to classify the parent of a form as control
2009-09-05 22:25:29 +0200 fs r275855 : protect against re-entrance
2009-09-05 00:11:40 +0200 fs r275835 : #i10000#
2009-09-04 23:25:50 +0200 fs r275834 : #i10000#
2009-09-04 23:23:47 +0200 fs r275833 : #i10000#
2009-09-04 21:49:37 +0200 fs r275830 : #i10000# correct wrong conflict resolution
2009-09-04 20:59:51 +0200 fs r275829 : CWS-TOOLING: rebase CWS dba32g to trunk@275801 (milestone: DEV300:m57)
2009-09-04 11:08:32 +0200 oj r275791 : #i104780# new version 1.2.0
2009-09-03 22:29:21 +0200 fs r275775 : OSL_TRACE doesn't need \n anymore
2009-09-03 08:33:21 +0200 fs r275743 : CWS-TOOLING: rebase CWS dba32g to trunk@275331 (milestone: DEV300:m56)
2009-09-02 13:48:12 +0200 fs r275708 : removed useless include
2009-09-02 13:45:43 +0200 fs r275707 : more since tags, which are used across offapi/udkapi
2009-09-02 13:23:04 +0200 fs r275705 : should *not* have the dtor, copy ctor, and assignment operator compiler-generated, else we run into trouble as soon as the compiler creates different versions of our singleton member's static data in different libraries
2009-09-02 12:32:45 +0200 fs r275704 : AutoIncrementIsPrimaryKey is a driver setting, not a data source setting
2009-09-02 11:42:49 +0200 fs r275701 : URL meta data are meta data which are valid for all connections of this type, not per-data-source properties. Settings them as data source properties is a hack.
2009-09-02 08:43:34 +0200 fs r275696 : 3.x.x is not a valid 'since' tag
2009-09-01 16:05:24 +0200 fs r275665 : #i104686# don't treat controls bound to read-only columns as required
2009-09-01 13:10:22 +0200 fs r275657 : #i104574# use PageUp/Down to scroll through the complete page
2009-09-01 07:04:48 +0200 oj r275641 : #i104104# correct line ends
2009-08-31 15:52:34 +0200 fs r275612 : #i104410#
2009-08-31 12:29:05 +0200 fs r275596 : #i104364#
2009-08-31 12:28:56 +0200 fs r275595 : #i104364#
2009-08-31 11:43:09 +0200 fs r275593 : #i104649# JavaDriverClassPath is also a known JDBC-bridge setting
2009-08-31 11:41:37 +0200 fs r275592 : #i104649#
2009-08-28 21:48:27 +0200 fs r275552 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:48:17 +0200 fs r275551 : #i96862# do not show the 'Create a new database' option when a) no embedded/dBase driver is installed or b) the configuration requests to hide the option
2009-08-28 21:47:19 +0200 fs r275550 : during #i96862#: renamed the configuration data which controls availability of certain DBA-related UI
2009-08-28 21:46:41 +0200 fs r275549 : #i96862# renamed and extended the configuration data which controls availability of certain DBA-related UI
2009-08-28 15:10:19 +0200 fs r275535 : #i96862# if no embedded driver is installed, use dBase for creating new DBs. If no dBase driver is installed, too, do not offer the 'Create new database' option
2009-08-28 14:03:04 +0200 fs r275532 : #i104454# allow multiple fields to display the same column
2009-08-28 13:14:00 +0200 fs r275528 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:09:57 +0200 fs r275527 : properly chech the MySQL type buttons (else next/back in the wizard leads to state with two buttons checked)
2009-08-28 13:09:17 +0200 fs r275526 : #i104584# driver meta data do not belong into a data source's settings
2009-08-28 13:07:18 +0200 fs r275525 : BooleanComparisonMode is a property, or a feature - but not a driver meta data
2009-08-28 11:00:31 +0200 fs r275521 : #i104580#
2009-08-28 10:40:05 +0200 fs r275519 : #i104577# correct assertion: If the template node type is ANY, then any value type is allowed
2009-08-28 10:09:30 +0200 fs r275518 : #i104575# implement Named Pipe UI
2009-08-28 10:09:07 +0200 fs r275517 : pass the trigger-event to IWindowOperator::operateOn / work with VclWindowEvents, not VclSimpleEvents
2009-08-27 14:27:36 +0200 fs r275484 : ImplPosTabPage: respect mbEmptyViewMargin for WINDOWALIGN_LEFT
2009-08-27 13:43:56 +0200 fs r275480 : merging latest changes from CWS dba32f herein
2009-08-27 13:23:07 +0200 fs r275475 : #i103882#
2009-08-27 11:56:55 +0200 fs r275466 : #i104544# SetState: Do not call Update at the window which we just set text for. It should (sic\!) not be needed, but causes trouble
2009-08-27 11:55:34 +0200 fs r275465 : #i104544#
do not allow re-entrance for impl_ensureControl_nothrow
Actually, this is part of the fix only. I also removed the code which triggered this re-entrance (from
the grid control implementation), but to ensure it won't happen, again, I added some safety herein.
2009-08-27 10:14:11 +0200 fs r275459 : preparations for supporting a 'NamedPipe' parameter for the MySQL Connector/OOo
2009-08-27 10:13:21 +0200 fs r275458 : preparations for supporting a 'NamedPipe' setting for the MySQL Connector/OOo
2009-08-27 10:11:14 +0200 fs r275456 : outsourced the MySQLNative settings into a dedicated class, to not duplicate all the code in two tab page implementations
2009-08-26 14:18:13 +0200 fs r275422 : #i10000#
2009-08-26 13:26:36 +0200 fs r275419 : ignore output paths
2009-08-26 13:23:38 +0200 fs r275417 : support the LocalSocket property for the MySQL native driver
2009-08-26 13:17:05 +0200 fs r275416 : some re-factoring, to outsource the tab page for setting up the MySQLNative connection, into a dedicated class (needed later)
2009-08-26 13:15:15 +0200 fs r275415 : support a NoThousandSep property for NumericFormatters - I'm tired of correcting this at runtime, instead of controlling it in the resource
2009-08-26 11:45:08 +0200 fs r275410 : oops, 'flat' shouldn't have got lost
2009-08-26 09:38:57 +0200 fs r275398 : #i102631# when saving the document fails, ensure that the interaction handler really can handle/display the error
2009-08-26 09:37:05 +0200 fs r275397 : #i102631# don't let non-IO/RuntimeExceptions escape from DatabaseDocument::store*, wrap them into an IOException
2009-08-26 09:35:39 +0200 fs r275395 : let the default interaction handler implement XInteractionHandler2
2009-08-25 13:51:34 +0200 fs r275352 : #i102631# createTempFile: pass URL through FileHelper.getOOoCompatibleFileURL
2009-08-25 13:49:23 +0200 fs r275351 : #i102631# createTempFileURL: immediately delete the file implicitly created by createTempFile, we really only need the URL
2009-08-24 14:49:07 +0200 fs r275318 : #i10000#
2009-08-24 14:36:03 +0200 fs r275315 : properly terminate message with 0 character
2009-08-24 14:35:45 +0200 fs r275314 : trace method concepts in non-pro, if special flag is enabled
2009-08-24 14:24:17 +0200 fs r275312 : #i98973# filter some more events for grid control columns
2009-08-24 14:15:23 +0200 fs r275311 : #i98973# implement XComboBox for combo box cells
2009-08-24 13:39:24 +0200 fs r275308 : #i98973# do not display the 'actionPerformed' event for grid combo box columns
2009-08-24 12:52:03 +0200 fs r275303 : #i98973# implement XCheckBox and XButton for check box cells
2009-08-24 11:56:05 +0200 oj r275300 : #i104447# wrong default for orientation
2009-08-24 10:51:21 +0200 fs r275296 : in the script selector dialog, interpret a double click onto a function as OK
2009-08-24 10:50:56 +0200 fs r275295 : localize some to-be-displayed names, consolidate some code regarding form/control naming
2009-08-21 14:28:05 +0200 fs r275255 : #i98973# implement KeyListeners
2009-08-21 14:27:20 +0200 fs r275254 : #i98973# move the conversion VCL[Mouse|Key]Event->Awt[Mouse|Key]Event from vclxwindow.cxx to VCLUnoHelper
2009-08-21 14:08:50 +0200 fs r275248 : #i98973# implement Mouse- and MouseMotion-broadcasting
2009-08-21 13:31:08 +0200 fs r275244 : #i98973# implement text and change listeners at text cells
2009-08-21 12:47:38 +0200 fs r275234 : #i104399# some refactoring:
If the MySQL Connector/OOo is installed, it registers for the sdbc:mysqlc: protocol (now known as DST_MYSQL_NATIVE_DIRECT).
However, we do not want to display this in the UI, instead we display "MySQL" only, which collects DST_MYSQL_ODBC, DST_MYSQL_JDBC, and DST_MYSQL_NATIVE.
2009-08-21 12:45:18 +0200 fs r275232 : #i104399# also register for the sdbc:mysql:mysqlc protocol, decide at runtime (depending on the availability of sdbc:mysqlc:), whether it is really accepted. This prevents that the C/OOo extension needs to register *our* implementation name for the sdbc:mysql:mysqlc: protocol, which would be somewhat weird
2009-08-20 16:18:48 +0200 fs r275190 : merging the latest changes from CWS dba32f (which this CWS was created from)
2009-08-19 20:19:59 +0200 fs r275160 : add some spacing between the radios
2009-08-19 14:50:15 +0200 fs r275150 : #i98973# slightly refactoring the grid cell implementations, to prepare for proper events being fired. Implement focus events for the moment, more to come.
2009-08-19 10:53:38 +0200 fs r275142 : #i99936# initialize newly created models
2009-08-18 23:03:48 +0200 fs r275132 : merging latest changes from CWS dba32f
2009-08-18 15:14:08 +0200 fs r275110 : #i102819# SetColumnPos: SCROLL_CLIP is deadly here
2009-09-14 11:18:01 +00:00
|
|
|
|
2015-10-19 07:18:39 +02:00
|
|
|
const SfxStringItem* pUidItem = _rSet.GetItem<SfxStringItem>(DSID_USER);
|
|
|
|
const SfxBoolItem* pAllowEmptyPwd = _rSet.GetItem<SfxBoolItem>(DSID_PASSWORDREQUIRED);
|
2009-02-16 07:31:09 +00:00
|
|
|
|
|
|
|
if ( bValid )
|
|
|
|
{
|
2018-10-24 12:20:37 +01:00
|
|
|
m_xUserName->set_text(pUidItem->GetValue());
|
|
|
|
m_xUserName->save_value();
|
|
|
|
m_xPasswordRequired->set_active(pAllowEmptyPwd->GetValue());
|
2009-02-16 07:31:09 +00:00
|
|
|
}
|
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
|
2009-02-16 07:31:09 +00:00
|
|
|
}
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateMySQLJDBC( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet )
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<OGeneralSpecialJDBCDetailsPage>(pPage, pController, *_rAttrSet,DSID_MYSQL_PORTNUMBER);
|
2002-11-21 14:27:11 +00:00
|
|
|
}
|
2018-04-20 11:06:07 +01:00
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateMySQLNATIVE(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet)
|
2008-03-05 15:59:53 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<MySQLNativePage>(pPage, pController, *pAttrSet);
|
2008-03-05 15:59:53 +00:00
|
|
|
}
|
2004-08-02 14:45:26 +00:00
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateOracleJDBC(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet)
|
2002-11-21 14:27:11 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<OGeneralSpecialJDBCDetailsPage>(pPage, pController, *_rAttrSet,DSID_ORACLE_PORTNUMBER, false);
|
2002-11-21 14:27:11 +00:00
|
|
|
}
|
2001-01-26 15:14:21 +00:00
|
|
|
|
2013-08-17 23:43:14 +02:00
|
|
|
// OLDAPDetailsPage
|
2019-09-24 14:10:48 +01:00
|
|
|
OLDAPDetailsPage::OLDAPDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
|
|
|
|
: OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/ldappage.ui", "LDAP",
|
2018-10-23 21:25:19 +01:00
|
|
|
rCoreAttrs, OCommonBehaviourTabPageFlags::NONE)
|
|
|
|
, m_xETBaseDN(m_xBuilder->weld_entry("baseDNEntry"))
|
|
|
|
, m_xCBUseSSL(m_xBuilder->weld_check_button("useSSLCheckbutton"))
|
|
|
|
, m_xNFPortNumber(m_xBuilder->weld_spin_button("portNumberSpinbutton"))
|
|
|
|
, m_xNFRowCount(m_xBuilder->weld_spin_button("LDAPRowCountspinbutton"))
|
|
|
|
{
|
|
|
|
m_xETBaseDN->connect_changed(LINK(this,OGenericAdministrationPage,OnControlEntryModifyHdl));
|
|
|
|
m_xNFPortNumber->connect_value_changed(LINK(this,OGenericAdministrationPage,OnControlSpinButtonModifyHdl));
|
|
|
|
m_xNFRowCount->connect_value_changed(LINK(this,OGenericAdministrationPage,OnControlSpinButtonModifyHdl));
|
2014-08-06 22:02:43 +02:00
|
|
|
|
2004-03-17 09:51:53 +00:00
|
|
|
m_iNormalPort = 389;
|
|
|
|
m_iSSLPort = 636;
|
2018-10-23 21:25:19 +01:00
|
|
|
m_xCBUseSSL->connect_toggled(LINK(this, OLDAPDetailsPage, OnCheckBoxClick));
|
2001-05-23 13:16:42 +00:00
|
|
|
}
|
|
|
|
|
2015-03-09 14:29:30 +02:00
|
|
|
OLDAPDetailsPage::~OLDAPDetailsPage()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateLDAP(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet)
|
2001-05-23 13:16:42 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<OLDAPDetailsPage>(pPage, pController, *_rAttrSet);
|
2001-05-23 13:16:42 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 17:23:12 +02:00
|
|
|
bool OLDAPDetailsPage::FillItemSet( SfxItemSet* _rSet )
|
2001-05-23 13:16:42 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(_rSet);
|
2001-05-23 13:16:42 +00:00
|
|
|
|
2018-10-23 21:25:19 +01:00
|
|
|
fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN,bChangedSomething);
|
|
|
|
fillInt32(*_rSet,m_xNFPortNumber.get(),DSID_CONN_LDAP_PORTNUMBER,bChangedSomething);
|
|
|
|
fillInt32(*_rSet,m_xNFRowCount.get(),DSID_CONN_LDAP_ROWCOUNT,bChangedSomething);
|
|
|
|
fillBool(*_rSet,m_xCBUseSSL.get(),DSID_CONN_LDAP_USESSL,false,bChangedSomething);
|
2001-05-23 13:16:42 +00:00
|
|
|
return bChangedSomething;
|
|
|
|
}
|
2018-10-23 21:25:19 +01:00
|
|
|
|
|
|
|
IMPL_LINK(OLDAPDetailsPage, OnCheckBoxClick, weld::ToggleButton&, rCheckBox, void)
|
2004-03-17 09:51:53 +00:00
|
|
|
{
|
2018-10-23 21:25:19 +01:00
|
|
|
OnControlModifiedButtonClick(rCheckBox);
|
2004-03-17 09:51:53 +00:00
|
|
|
callModifiedHdl();
|
2018-10-23 21:25:19 +01:00
|
|
|
if (m_xCBUseSSL->get_active())
|
2004-03-17 09:51:53 +00:00
|
|
|
{
|
2018-10-23 21:25:19 +01:00
|
|
|
m_iNormalPort = m_xNFPortNumber->get_value();
|
|
|
|
m_xNFPortNumber->set_value(m_iSSLPort);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
m_iSSLPort = m_xNFPortNumber->get_value();
|
|
|
|
m_xNFPortNumber->set_value(m_iNormalPort);
|
2004-03-17 09:51:53 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-04-17 11:16:55 +02:00
|
|
|
void OLDAPDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
|
2001-05-23 13:16:42 +00:00
|
|
|
{
|
|
|
|
// check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
|
2014-04-17 11:16:55 +02:00
|
|
|
bool bValid, bReadonly;
|
2001-05-23 13:16:42 +00:00
|
|
|
getFlags(_rSet, bValid, bReadonly);
|
|
|
|
|
2015-10-19 07:18:39 +02:00
|
|
|
const SfxStringItem* pBaseDN = _rSet.GetItem<SfxStringItem>(DSID_CONN_LDAP_BASEDN);
|
|
|
|
const SfxBoolItem* pUseSSL = _rSet.GetItem<SfxBoolItem>(DSID_CONN_LDAP_USESSL);
|
|
|
|
const SfxInt32Item* pPortNumber = _rSet.GetItem<SfxInt32Item>(DSID_CONN_LDAP_PORTNUMBER);
|
|
|
|
const SfxInt32Item* pRowCount = _rSet.GetItem<SfxInt32Item>(DSID_CONN_LDAP_ROWCOUNT);
|
2001-05-23 13:16:42 +00:00
|
|
|
|
2004-08-02 14:45:26 +00:00
|
|
|
if ( bValid )
|
2001-05-29 12:11:52 +00:00
|
|
|
{
|
2018-10-23 21:25:19 +01:00
|
|
|
m_xETBaseDN->set_text(pBaseDN->GetValue());
|
|
|
|
m_xNFPortNumber->set_value(pPortNumber->GetValue());
|
|
|
|
m_xNFRowCount->set_value(pRowCount->GetValue());
|
|
|
|
m_xCBUseSSL->set_active(pUseSSL->GetValue());
|
2001-05-29 12:11:52 +00:00
|
|
|
}
|
2001-05-23 13:16:42 +00:00
|
|
|
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
|
2001-05-23 13:16:42 +00:00
|
|
|
}
|
|
|
|
|
2013-08-17 23:43:14 +02:00
|
|
|
// OTextDetailsPage
|
2019-09-24 14:10:48 +01:00
|
|
|
OTextDetailsPage::OTextDetailsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs)
|
|
|
|
: OCommonBehaviourTabPage(pPage, pController, "dbaccess/ui/emptypage.ui", "EmptyPage", rCoreAttrs, OCommonBehaviourTabPageFlags::NONE)
|
2018-12-06 09:34:38 +00:00
|
|
|
, m_xTextConnectionHelper(new OTextConnectionHelper(m_xContainer.get(), TC_EXTENSION | TC_HEADER | TC_SEPARATORS | TC_CHARSET))
|
2004-10-27 12:03:20 +00:00
|
|
|
{
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
OTextDetailsPage::~OTextDetailsPage()
|
2018-12-06 09:34:38 +00:00
|
|
|
{
|
|
|
|
m_xTextConnectionHelper.reset();
|
|
|
|
}
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateText(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* pAttrSet)
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<OTextDetailsPage>(pPage, pController, *pAttrSet);
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
2018-04-20 11:06:07 +01:00
|
|
|
|
2018-09-07 14:33:33 +02:00
|
|
|
void OTextDetailsPage::fillControls(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::fillControls(_rControlList);
|
2018-12-06 09:34:38 +00:00
|
|
|
m_xTextConnectionHelper->fillControls(_rControlList);
|
2004-10-27 12:03:20 +00:00
|
|
|
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2018-09-07 14:33:33 +02:00
|
|
|
void OTextDetailsPage::fillWindows(std::vector< std::unique_ptr<ISaveValueWrapper> >& _rControlList)
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::fillWindows(_rControlList);
|
2018-12-06 09:34:38 +00:00
|
|
|
m_xTextConnectionHelper->fillWindows(_rControlList);
|
2004-10-27 12:03:20 +00:00
|
|
|
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
2014-04-17 11:16:55 +02:00
|
|
|
void OTextDetailsPage::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue)
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
|
|
|
// first check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa)
|
2014-04-17 11:16:55 +02:00
|
|
|
bool bValid, bReadonly;
|
2001-01-26 15:14:21 +00:00
|
|
|
getFlags(_rSet, bValid, bReadonly);
|
|
|
|
|
2018-12-06 09:34:38 +00:00
|
|
|
m_xTextConnectionHelper->implInitControls(_rSet, bValid);
|
2018-10-24 12:27:12 +01:00
|
|
|
OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue);
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
|
2014-06-10 17:23:12 +02:00
|
|
|
bool OTextDetailsPage::FillItemSet( SfxItemSet* rSet )
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
2018-10-24 12:27:12 +01:00
|
|
|
bool bChangedSomething = OCommonBehaviourTabPage::FillItemSet(rSet);
|
2018-12-06 09:34:38 +00:00
|
|
|
bChangedSomething = m_xTextConnectionHelper->FillItemSet(*rSet, bChangedSomething);
|
2001-01-26 15:14:21 +00:00
|
|
|
return bChangedSomething;
|
|
|
|
}
|
|
|
|
|
2014-04-17 11:16:55 +02:00
|
|
|
bool OTextDetailsPage::prepareLeave()
|
2001-01-26 15:14:21 +00:00
|
|
|
{
|
2018-12-06 09:34:38 +00:00
|
|
|
return m_xTextConnectionHelper->prepareLeave();
|
2001-01-26 15:14:21 +00:00
|
|
|
}
|
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateGeneratedValuesPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet)
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<GeneratedValuesPage>(pPage, pController, *_rAttrSet);
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2007-11-01 14:12:32 +00:00
|
|
|
|
2019-09-24 14:10:48 +01:00
|
|
|
std::unique_ptr<SfxTabPage> ODriversSettings::CreateSpecialSettingsPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* _rAttrSet)
|
2004-08-02 14:45:26 +00:00
|
|
|
{
|
2014-06-11 14:34:46 +02:00
|
|
|
OUString eType = ODbDataSourceAdministrationHelper::getDatasourceType( *_rAttrSet );
|
2007-11-01 14:12:32 +00:00
|
|
|
DataSourceMetaData aMetaData( eType );
|
2019-09-24 14:10:48 +01:00
|
|
|
return std::make_unique<SpecialSettingsPage>(pPage, pController, *_rAttrSet, aMetaData);
|
2004-08-02 14:45:26 +00:00
|
|
|
}
|
2001-01-26 15:14:21 +00:00
|
|
|
} // namespace dbaui
|
2010-10-12 15:59:03 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|