Kaydet (Commit) d6fce54c authored tarafından Lionel Elie Mamane's avatar Lionel Elie Mamane

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

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/53121Reviewed-by: 's avatarLionel Elie Mamane <lionel@mamane.lu>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 7aa36233
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment