User: vg      
Date: 05/03/10 07:16:37

Modified:
 /dba/connectivity/inc/connectivity/sdbcx/
  VCollection.hxx

Log:
 INTEGRATION: CWS dba24 (1.20.32); FILE MERGED
 2005/02/09 08:07:33 oj 1.20.32.1: #i26950# remove the need for XNamed

File Changes:

Directory: /dba/connectivity/inc/connectivity/sdbcx/
====================================================

File [changed]: VCollection.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/inc/connectivity/sdbcx/VCollection.hxx?r1=1.20&r2=1.21
Delta lines:  +16 -15
---------------------
--- VCollection.hxx     22 Oct 2004 08:40:54 -0000      1.20
+++ VCollection.hxx     10 Mar 2005 15:16:34 -0000      1.21
@@ -71,9 +71,6 @@
 #ifndef _COM_SUN_STAR_CONTAINER_XINDEXACCESS_HPP_
 #include <com/sun/star/container/XIndexAccess.hpp>
 #endif
-#ifndef _COM_SUN_STAR_CONTAINER_XNAMED_HPP_
-#include <com/sun/star/container/XNamed.hpp>
-#endif
 #ifndef _COM_SUN_STAR_CONTAINER_XENUMERATIONACCESS_HPP_
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #endif
@@ -128,8 +125,6 @@
        {
 
                // the class OCollection is base class for collections :-)
-               // all elements <strong> must </strong> support the XNamed 
interface 
-
         typedef ::cppu::ImplHelper10< ::com::sun::star::container::XNameAccess,
                                          
::com::sun::star::container::XIndexAccess,
                                          
::com::sun::star::container::XEnumerationAccess,
@@ -141,7 +136,7 @@
                                          ::com::sun::star::sdbcx::XDrop,
                                          ::com::sun::star::lang::XServiceInfo> 
OCollectionBase;
 
-        typedef ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNamed > Object_BASE;
+        typedef ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > ObjectType;
 
                class SAL_NO_VTABLE IObjectCollection
                {
@@ -153,7 +148,7 @@
                        virtual void swap() = 0;
                        virtual void clear() = 0;
                        virtual void reFill(const TStringVector &_rVector) = 0;
-                       virtual void insert(const ::rtl::OUString& _sName,const 
Object_BASE& _xObject) = 0;
+                       virtual void insert(const ::rtl::OUString& _sName,const 
ObjectType& _xObject) = 0;
                        virtual bool rename(const ::rtl::OUString 
_sOldName,const ::rtl::OUString _sNewName) = 0;
                        virtual sal_Int32 size() = 0;
                        virtual ::com::sun::star::uno::Sequence< 
::rtl::OUString > getElementNames() = 0;
@@ -162,9 +157,9 @@
                        virtual void disposeElements() = 0;
                        virtual sal_Int32 findColumn( const ::rtl::OUString& 
columnName ) = 0;
                        virtual ::rtl::OUString findColumnAtIndex(  sal_Int32 
_nIndex) = 0;
-                       virtual ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNamed > getObject(sal_Int32 _nIndex) = 0;
-                       virtual ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNamed > getObject(const ::rtl::OUString& 
columnName) = 0;
-                       virtual void setObject(sal_Int32 _nIndex,const 
::com::sun::star::uno::Reference< ::com::sun::star::container::XNamed >& 
_xObject) = 0;
+                       virtual ObjectType getObject(sal_Int32 _nIndex) = 0;
+                       virtual ObjectType getObject(const ::rtl::OUString& 
columnName) = 0;
+                       virtual void setObject(sal_Int32 _nIndex,const 
ObjectType& _xObject) = 0;
                        virtual sal_Bool isCaseSensitive() const = 0;
                };
                //************************************************************
@@ -187,19 +182,25 @@
             virtual void impl_refresh() 
throw(::com::sun::star::uno::RuntimeException) = 0;
                        
                        // will be called when a object was requested by one of 
the accessing methods like getByIndex
-            virtual ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNamed > createObject(const ::rtl::OUString& 
_rName) = 0;
+            virtual ObjectType createObject(const ::rtl::OUString& _rName) = 0;
 
                        // will be called when a new object should be generated 
by a call of createDataDescriptor
                        // the returned object is empty will be filled outside 
and added to the collection
             virtual ::com::sun::star::uno::Reference< 
::com::sun::star::beans::XPropertySet > createEmptyObject();
 
                        // return an object which is the copy of the argument
-                       virtual ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNamed > cloneObject(const 
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& 
_xDescriptor);
+                       virtual ObjectType cloneObject(const 
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& 
_xDescriptor);
 
                        virtual void appendObject( const 
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& 
descriptor );
                        // called when XDrop was called
                        virtual void dropObject(sal_Int32 _nPos,const 
::rtl::OUString _sElementName);
 
+            /** returns the name for the object. The default implementation 
ask for the property NAME. If this doesn't satisfy, it has to be overloaded.
+                @param  _xObject    The object where the name should be 
extracted.
+                @return The name of the object.
+            */
+            virtual ::rtl::OUString getNameForObject(const ObjectType& 
_xObject);
+
                        OCollection(::cppu::OWeakObject& _rParent,
                                                sal_Bool _bCase, 
                                                ::osl::Mutex& _rMutex,
@@ -214,7 +215,7 @@
 
                        /**  insert a new element into the collection
                        */
-                       void insertElement(const ::rtl::OUString& 
_sElementName,const Object_BASE& _xElement);
+                       void insertElement(const ::rtl::OUString& 
_sElementName,const ObjectType& _xElement);
 
                        /** return the name of element at index _nIndex
                        */
@@ -227,9 +228,9 @@
                        /** return the object, if not existent it creates it.
                                @param  _nIndex
                                        The index of the object to create.      
-                               @return 
::com::sun::star::uno::Reference<::com::sun::star::container::XNamed >
+                               @return ObjectType
                        */
-                       ::com::sun::star::uno::Reference< 
::com::sun::star::container::XNamed > getObject(sal_Int32 _nIndex);
+                       ObjectType getObject(sal_Int32 _nIndex);
 
                public:
                        virtual ~OCollection();




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to