30#include <com/sun/star/uno/Sequence.hxx>
36 using namespace ::
utl;
42 return "org.openoffice.Office.DataAccess/ConnectionPool";
48 return "EnablePooling";
54 return "DriverSettings";
78 OConfigurationTreeRoot aConnectionPoolRoot = OConfigurationTreeRoot::createWithComponentContext(
84 aEnabled >>= bEnabled;
91 for (
auto const& elem : aEnumDrivers)
100 const OUString* pDriverKeys = aDriverKeys.getConstArray();
101 const OUString* pDriverKeysEnd = pDriverKeys + aDriverKeys.getLength();
102 for (;pDriverKeys != pDriverKeysEnd; ++pDriverKeys)
105 OConfigurationNode aThisDriverSettings = aDriverSettings.openNode(*pDriverKeys);
106 OUString sThisDriverName;
112 for ( aLookup = aSettings.
begin();
113 aLookup != aSettings.
end();
116 if (sThisDriverName == aLookup->sName)
119 if (aLookup == aSettings.
end())
124 aLookup = aSettings.
end();
140 OConfigurationTreeRoot aConnectionPoolRoot = OConfigurationTreeRoot::createWithComponentContext(
143 if (!aConnectionPoolRoot.isValid())
147 bool bNeedCommit =
false;
153 bool bEnabled = pEnabled->
GetValue();
163 if (!aDriverSettings.isValid())
166 OUString sThisDriverName;
167 OConfigurationNode aThisDriverSettings;
170 for (
auto const& newSetting : rNewSettings)
173 sThisDriverName = newSetting.sName;
176 if (aDriverSettings.hasByName(newSetting.sName))
177 aThisDriverSettings = aDriverSettings.openNode(newSetting.sName);
179 aThisDriverSettings = aDriverSettings.createNode(newSetting.sName);
189 aConnectionPoolRoot.commit();
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
static void GetOptions(SfxItemSet &_rFillItems)
static void SetOptions(const SfxItemSet &_rSourceItems)
const DriverPoolingSettings & getSettings() const
const_iterator begin() const
const_iterator end() const
void push_back(const DriverPooling &_rElement)
DriverSettings::iterator iterator
simple class for accessing SDBC drivers registered within the office
#define SID_SB_DRIVER_TIMEOUTS
#define SID_SB_POOLING_ENABLED
static OUString getTimeoutNodeName()
static OUString getEnableNodeName()
static OUString getDriverSettingsNodeName()
static OUString getConnectionPoolNodeName()
static OUString getEnablePoolingNodeName()
static OUString getDriverNameNodeName()