private:
css::uno::Reference< css::uno::XComponentContext >
m_xContext; /// service factory
css::uno::Reference< css::sdb::XDatabaseContext >
m_xDatabaseContext; /// database context we're working in
css::uno::Reference< css::beans::XPropertySet > m_xDatasource;
css::uno::Reference< css::frame::XModel > m_xModel;
css::uno::Any m_aDataSourceOrName;
MapInt2String m_aDirectPropTranslator; /// translating property id's into names (direct properties of a data source)
MapInt2String m_aIndirectPropTranslator; /// translating property id's into names (indirect properties of a data source)
weld::Window* m_pParent;
IItemSetHelper* m_pItemSetHelper; public:
/** translate the current dialog SfxItems into driver relevant PropertyValues @seesuccessfullyConnected
*/ bool getCurrentSettings(css::uno::Sequence< css::beans::PropertyValue >& _rDriverParams);
/** to be called if the settings got from getCurrentSettings have been used for successfully connecting @seegetCurrentSettings
*/ void successfullyConnected();
/// clear the password in the current data source's item set void clearPassword();
/** creates a new connection. The caller is responsible to dispose it !!!!
*/
std::pair< css::uno::Reference< css::sdbc::XConnection >,bool> createConnection();
/** return the corresponding driver for the selected URL
*/
css::uno::Reference< css::sdbc::XDriver > getDriver();
css::uno::Reference< css::sdbc::XDriver > getDriver(const OUString& _sURL);
/** returns the data source the dialog is currently working with
*/
css::uno::Reference< css::beans::XPropertySet > const & getCurrentDataSource(); // returns the Url of a database document static OUString getDocumentUrl(SfxItemSet const & _rDest);
/** extracts the connection type from the given set<p/> TheconnectiontypeisdeterminedbythevalueoftheDSNitem,analyzedbytheTypeCollectionitem.
*/ static OUString getDatasourceType( const SfxItemSet& _rSet );
/** translates properties of a UNO data source into SfxItems @param_rxSource Thedatasource @param_rDest Theitemsettofill.
*/ void translateProperties( const css::uno::Reference< css::beans::XPropertySet >& _rxSource,
SfxItemSet& _rDest);
/** translate SfxItems into properties of a UNO data source @param_rSource Theitemsettoreadfrom. @param_rxDest Thedatasourcetofill.
*/ void translateProperties( const SfxItemSet& _rSource, const css::uno::Reference< css::beans::XPropertySet >& _rxDest);
bool saveChanges(const SfxItemSet& _rSource); private: /** fill a data source info array with the settings from a given item set
*/ void fillDatasourceInfo(const SfxItemSet& _rSource, css::uno::Sequence< css::beans::PropertyValue >& _rInfo);
/// translate the given value into an SfxPoolItem, put this into the given set under the given id void implTranslateProperty(SfxItemSet& _rSet, sal_Int32 _nId, const css::uno::Any& _rValue);
/// translate the given SfxPoolItem into an <type scope="com.sun.star.Any">uno</type> static css::uno::Any implTranslateProperty(const SfxPoolItem* _pItem);
/// translate the given SfxPoolItem into an <type scope="com.sun.star.Any">uno</type>, set it (under the given name) on the given property set staticvoid implTranslateProperty(const css::uno::Reference< css::beans::XPropertySet >& _rxSet, const OUString& _rName, const SfxPoolItem* _pItem);
/** check if the data source described by the given set needs authentication<p/> Thereturnvaluedependsonthedatasourcetypeonly.
*/ staticbool hasAuthentication(const SfxItemSet& _rSet);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.