summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/inc/datasourcemap.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/inc/datasourcemap.hxx')
-rw-r--r--dbaccess/source/ui/inc/datasourcemap.hxx98
1 files changed, 49 insertions, 49 deletions
diff --git a/dbaccess/source/ui/inc/datasourcemap.hxx b/dbaccess/source/ui/inc/datasourcemap.hxx
index 836f001bf580..4b19d28b36a1 100644
--- a/dbaccess/source/ui/inc/datasourcemap.hxx
+++ b/dbaccess/source/ui/inc/datasourcemap.hxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,7 +51,7 @@ namespace dbaui
{
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
xDatasource;
- SfxItemSet* pModifications;
+ SfxItemSet* pModifications;
DatasourceInfo() :pModifications (NULL) { }
DatasourceInfo(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxDS,
@@ -60,16 +60,16 @@ namespace dbaui
};
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >
- m_xORB; /// service factory
+ m_xORB; /// service factory
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >
- m_xDatabaseContext; /// database context we're working in
+ m_xDatabaseContext; /// database context we're working in
DECLARE_STL_USTRINGACCESS_MAP(DatasourceInfo, DatasourceInfos);
- DatasourceInfos m_aDatasources; /// known infos about data sources
+ DatasourceInfos m_aDatasources; /// known infos about data sources
// deleted data sources, not necessarily with distinct names, that's why accessed via unique ids
DECLARE_STL_MAP(sal_Int32, DatasourceInfo, ::std::less< sal_Int32 >, MapInt2Info);
- MapInt2Info m_aDeletedDatasources;
+ MapInt2Info m_aDeletedDatasources;
public:
/// iterating through all data sources
@@ -89,63 +89,63 @@ namespace dbaui
getContext() { return m_xDatabaseContext; }
/// first element for iterating through the datasources
- Iterator begin();
+ Iterator begin();
/// last element for iterating through the datasources
- Iterator end();
+ Iterator end();
/// first element for iterating through the deleted datasources
- Iterator beginDeleted();
+ Iterator beginDeleted();
/// last element for iterating through the deleted datasources
- Iterator endDeleted();
+ Iterator endDeleted();
/// check if the object contains a valid datasource enumeration
- sal_Bool isValid() const { return m_xDatabaseContext.is(); }
+ sal_Bool isValid() const { return m_xDatabaseContext.is(); }
/// check if a datasource with the given name exists
- sal_Bool exists(const ::rtl::OUString& _rName) const;
+ sal_Bool exists(const ::rtl::OUString& _rName) const;
/// return the number of datasources available
- sal_Int32 size() const { return m_aDatasources.size(); }
+ sal_Int32 size() const { return m_aDatasources.size(); }
/// clear the map (non-deleted <em>and</em> deleted items)
- void clear();
+ void clear();
/// clear the map (deleted items only)
- void clearDeleted();
+ void clearDeleted();
/// clear the modification items for a datasource
- void clearModifiedFlag(const ::rtl::OUString& _rName);
+ void clearModifiedFlag(const ::rtl::OUString& _rName);
/** tell the map that a data source is scheduled to be deleted.
- @return id for accessing the deleted data source later. -1 if no free id existed or an error occured
+ @return id for accessing the deleted data source later. -1 if no free id existed or an error occured
*/
- sal_Int32 markDeleted(const ::rtl::OUString& _rName);
+ sal_Int32 markDeleted(const ::rtl::OUString& _rName);
/** restores a datasource which has previously been marked as deleted.<p/>
- @param _nAccessId the access id as got from <method>markDeleted</method>
- @param _rName contains, upon return, the name of the datasource the access key refers to
- @return sal_True if the datasource was successfully restored, sal_False if it could not be restored
+ @param _nAccessId the access id as got from <method>markDeleted</method>
+ @param _rName contains, upon return, the name of the datasource the access key refers to
+ @return sal_True if the datasource was successfully restored, sal_False if it could not be restored
because of a naming conflict (e.g. because another data source now has the name of the
to-be-restored one).
- @see renamed
- @see markDeleted
+ @see renamed
+ @see markDeleted
*/
- sal_Bool restoreDeleted(sal_Int32 _nAccessId, ::rtl::OUString& _rName);
+ sal_Bool restoreDeleted(sal_Int32 _nAccessId, ::rtl::OUString& _rName);
/// remove an element from the map
- void deleted(const ::rtl::OUString& _rName);
+ void deleted(const ::rtl::OUString& _rName);
// (should be an erase(const Iterator&), but this is way to general ...
/// update the infos for a data source with a given item set
- void update(const ::rtl::OUString& _rName, SfxItemSet& _rSet);
+ void update(const ::rtl::OUString& _rName, SfxItemSet& _rSet);
/** Tells the map that an entry has been renamed in a sense that it should be accessible under
a new name. This does not necesssarily mean that the data source has been renamed within
it's database context
*/
- void renamed(const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName);
+ void renamed(const ::rtl::OUString& _rOldName, const ::rtl::OUString& _rNewName);
/** adjust the registration name if necessary<p/>
The real name of the data source (as indicated in the SfxItemSet for this ds) may be another
one than the name the ds is registered for. This method corrects this, the ds will become registered
under it's real name.
- @param _rName the name the ds is registered for
- @return the real name of the data source
+ @param _rName the name the ds is registered for
+ @return the real name of the data source
*/
::rtl::OUString adjustRealName(const ::rtl::OUString& _rName);
@@ -154,7 +154,7 @@ namespace dbaui
This method allows us lazy access to the data sources: They're retrieved from the context
only if they're accessed by somebody.
*/
- void ensureObject(const ::rtl::OUString& _rName);
+ void ensureObject(const ::rtl::OUString& _rName);
};
//-------------------------------------------------------------------------
@@ -166,27 +166,27 @@ namespace dbaui
friend class ODatasourceMap::Iterator;
private:
- ODatasourceMap* m_pOwner;
- const ODatasourceMap::DatasourceInfo& m_rInfoImpl;
- ::rtl::OUString m_sName;
- sal_Int32 m_nAccessKey;
+ ODatasourceMap* m_pOwner;
+ const ODatasourceMap::DatasourceInfo& m_rInfoImpl;
+ ::rtl::OUString m_sName;
+ sal_Int32 m_nAccessKey;
public:
ODatasourceInfo(const ODatasourceInfo& _rSource)
:m_pOwner(_rSource.m_pOwner), m_sName(_rSource.m_sName), m_rInfoImpl(_rSource.m_rInfoImpl), m_nAccessKey(_rSource.m_nAccessKey) { }
/// check if the datasource settings are modified
- sal_Bool isModified() const;
+ sal_Bool isModified() const;
/// get the name the datasource is registered under
- ::rtl::OUString getName() const { return m_sName; }
+ ::rtl::OUString getName() const { return m_sName; }
/// get the original name of a datasource (may habe been renamed)
- ::rtl::OUString getOriginalName() const;
+ ::rtl::OUString getOriginalName() const;
/// get the real name of the datasource, which is the name which is in the item set
- ::rtl::OUString getRealName() const;
+ ::rtl::OUString getRealName() const;
/// check if the datasource should is about to be renamed (which means the original name does not equal the real name
- sal_Bool isRenamed() const { return !getRealName().equals(getOriginalName()); }
+ sal_Bool isRenamed() const { return !getRealName().equals(getOriginalName()); }
/// get the key used to acces the object in the data source map
- sal_Int32 getAccessKey() const { return m_nAccessKey; }
+ sal_Int32 getAccessKey() const { return m_nAccessKey; }
/// return the datasource the object represents
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
@@ -216,10 +216,10 @@ namespace dbaui
{
friend class ODatasourceMap;
protected:
- ODatasourceMap* m_pOwner;
- ODatasourceMap::ConstDatasourceInfosIterator m_aPos;
- ODatasourceMap::ConstMapInt2InfoIterator m_aPosDeleted;
- sal_Bool m_bLoopingDeleted;
+ ODatasourceMap* m_pOwner;
+ ODatasourceMap::ConstDatasourceInfosIterator m_aPos;
+ ODatasourceMap::ConstMapInt2InfoIterator m_aPosDeleted;
+ sal_Bool m_bLoopingDeleted;
public:
Iterator(const Iterator& _rSource);
@@ -228,14 +228,14 @@ namespace dbaui
ODatasourceInfo operator*() const;
/// prefix increment
- const Iterator& operator++();
+ const Iterator& operator++();
/// postfix increment
- const Iterator operator++(int) { Iterator hold(*this); ++*this; return hold; }
+ const Iterator operator++(int) { Iterator hold(*this); ++*this; return hold; }
/// prefix decrement
- const Iterator& operator--();
+ const Iterator& operator--();
/// postfix decrement
- const Iterator operator--(int) { Iterator hold(*this); --*this; return hold; }
+ const Iterator operator--(int) { Iterator hold(*this); --*this; return hold; }
// compare two iterators
@@ -258,7 +258,7 @@ namespace dbaui
};
//.........................................................................
-} // namespace dbaui
+} // namespace dbaui
//.........................................................................
#endif // DBAUI_DATASOURCEMAP_HXX