summaryrefslogtreecommitdiff
path: root/dbaccess/source
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2018-04-18 18:54:05 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2018-04-18 21:14:31 +0200
commitd6fce54c82868b82bd6fa190db6047d69bbb3ecf (patch)
tree7030272f4191b43e26ff3166257236583f9291aa /dbaccess/source
parent7aa36233b464f4513ace1df69e5603ab02eecfda (diff)
tdf#117053 create database wizard: set a property when it is supported
not only when we let the *user* set it in the "Advanced Settings" dialog. There are two notions: 1) Does the driver/datasource support a property 2) Do we show the user any UI in "Advanced Settings" to change that property. Notion 2 is called a _Feature_, notion 1 a _property_. Database creation was saving properties only in case 2; the right test is obviously case 1. Change-Id: Ie740c9eb6768ae5f412a49119201e9211a9cd07d Reviewed-on: https://gerrit.libreoffice.org/53121 Reviewed-by: Lionel Elie Mamane <lionel@mamane.lu> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'dbaccess/source')
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 3f89b70a3845..49cdf5756619 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -690,18 +690,19 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
// us)
// first determine which of all the items are relevant for the data source (depends on the connection url)
- OUString eType = getDatasourceType(_rSource);
- std::vector< sal_Int32> aDetailIds;
- ODriversSettings::getSupportedIndirectSettings(eType, getORB(), aDetailIds);
+ const OUString eType = getDatasourceType(_rSource);
+ const ::connectivity::DriversConfig aDriverConfig(getORB());
+ const ::comphelper::NamedValueCollection& aProperties = aDriverConfig.getProperties(eType);
// collect the translated property values for the relevant items
PropertyValueSet aRelevantSettings;
MapInt2String::const_iterator aTranslation;
- for (auto const& detailId : aDetailIds)
+ for (ItemID detailId = DSID_FIRST_ITEM_ID ; detailId <= DSID_LAST_ITEM_ID; ++detailId)
{
const SfxPoolItem* pCurrent = _rSource.GetItem(static_cast<sal_uInt16>(detailId));
aTranslation = m_aIndirectPropTranslator.find(detailId);
- if ( pCurrent && (m_aIndirectPropTranslator.end() != aTranslation) )
+ if ( pCurrent && (m_aIndirectPropTranslator.end() != aTranslation) &&
+ aProperties.has(aTranslation->second) )
{
if ( aTranslation->second == INFO_CHARSET )
{
@@ -773,8 +774,6 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
::comphelper::removeElementAt(_rInfo, removeIndex);
}
- ::connectivity::DriversConfig aDriverConfig(getORB());
- const ::comphelper::NamedValueCollection& aProperties = aDriverConfig.getProperties(eType);
Sequence< Any> aTypeSettings;
aTypeSettings = aProperties.getOrDefault("TypeInfoSettings",aTypeSettings);
// here we have a special entry for types from oracle