Tag: cws_src680_kaddrbook
User: fs      
Date: 05/12/05 04:15:28

Modified:
 /dba/dbaccess/source/core/api/
  CRowSetColumn.cxx, CRowSetColumn.hxx, CRowSetDataColumn.cxx,
  CRowSetDataColumn.hxx, RowSet.cxx, datacolumn.cxx, datacolumn.hxx,
  preparedstatement.cxx, resultcolumn.cxx, resultcolumn.hxx, resultset.cxx
 /dba/dbaccess/source/ui/app/
  AppController.cxx

Log:
 #i58879# respect XDatabaseMetaData::getVersionColumns, and translate it into 
css.sdbcx.Column.IsRowVersion

File Changes:

Directory: /dba/dbaccess/source/core/api/
=========================================

File [changed]: CRowSetColumn.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/CRowSetColumn.cxx?r1=1.12&r2=1.12.56.1
Delta lines:  +5 -4
-------------------
--- CRowSetColumn.cxx   8 Sep 2005 09:55:36 -0000       1.12
+++ CRowSetColumn.cxx   5 Dec 2005 12:15:23 -0000       1.12.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: CRowSetColumn.cxx,v $
  *
- *  $Revision: 1.12 $
+ *  $Revision: 1.12.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 09:55:36 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:23 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -93,7 +93,7 @@
 
//------------------------------------------------------------------------------
 ::cppu::IPropertyArrayHelper* ORowSetColumn::createArrayHelper( ) const
 {
-       BEGIN_PROPERTY_HELPER(29)
+       BEGIN_PROPERTY_HELPER(30)
                DECL_PROP2(ALIGN,                                       
sal_Int32,                      BOUND,MAYBEVOID);
                DECL_PROP1(CATALOGNAME,                         
::rtl::OUString,        READONLY);
                DECL_PROP2(CONTROLDEFAULT,                      
::rtl::OUString,        BOUND,MAYBEVOID);
@@ -108,6 +108,7 @@
                DECL_PROP1_BOOL(ISDEFINITELYWRITABLE,                           
        READONLY);              
                DECL_PROP1(ISNULLABLE,                          sal_Int32,      
                READONLY);
                DECL_PROP1_BOOL(ISREADONLY,                                     
                        READONLY);
+               DECL_PROP1_BOOL(ISROWVERSION,                           
READONLY);
                DECL_PROP1_BOOL(ISSEARCHABLE,                                   
                READONLY);
                DECL_PROP1_BOOL(ISSIGNED,                                       
                        READONLY);
                DECL_PROP1_BOOL(ISWRITABLE,                                     
                        READONLY);

File [changed]: CRowSetColumn.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/CRowSetColumn.hxx?r1=1.7&r2=1.7.56.1
Delta lines:  +5 -4
-------------------
--- CRowSetColumn.hxx   8 Sep 2005 09:55:55 -0000       1.7
+++ CRowSetColumn.hxx   5 Dec 2005 12:15:23 -0000       1.7.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: CRowSetColumn.hxx,v $
  *
- *  $Revision: 1.7 $
+ *  $Revision: 1.7.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 09:55:55 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:23 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -61,10 +61,11 @@
                ORowSetColumn(  const ::com::sun::star::uno::Reference < 
::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
                                                const 
::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >& _xRow,
                                                sal_Int32 _nPos,
+                        const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMeta,
                                                const ::rtl::OUString& 
_rDescription,
                                                ORowSetCacheIterator& 
_rColumnValue,
                                                ORowSetMatrix::iterator& _rEnd)
-                 : 
ORowSetDataColumn(_xMetaData,_xRow,NULL,_nPos,_rDescription,_rColumnValue,_rEnd)
+                 : 
ORowSetDataColumn(_xMetaData,_xRow,NULL,_nPos,_rxDBMeta,_rDescription,_rColumnValue,_rEnd)
                {
                }
 

File [changed]: CRowSetDataColumn.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/CRowSetDataColumn.cxx?r1=1.29&r2=1.29.56.1
Delta lines:  +7 -5
-------------------
--- CRowSetDataColumn.cxx       8 Sep 2005 09:56:23 -0000       1.29
+++ CRowSetDataColumn.cxx       5 Dec 2005 12:15:23 -0000       1.29.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: CRowSetDataColumn.cxx,v $
  *
- *  $Revision: 1.29 $
+ *  $Revision: 1.29.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 09:56:23 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:23 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -74,10 +74,11 @@
                                                                          const 
Reference < XRow >& _xRow,
                                                                          const 
Reference < XRowUpdate >& _xRowUpdate,
                                                                          
sal_Int32 _nPos,
+                                      const Reference< XDatabaseMetaData >& 
_rxDBMeta,
                                                                          const 
::rtl::OUString& _rDescription,
                                                                          const 
ORowSetCacheIterator& _rColumnValue,
                                                                          
ORowSetMatrix::iterator& _rEnd)
-       : ODataColumn(_xMetaData,_xRow,_xRowUpdate,_nPos)
+       : ODataColumn(_xMetaData,_xRow,_xRowUpdate,_nPos,_rxDBMeta)
        ,m_aDescription(_rDescription)
        ,m_aColumnValue(_rColumnValue)
        ,m_rEnd(_rEnd)
@@ -94,7 +95,7 @@
 
//------------------------------------------------------------------------------
 ::cppu::IPropertyArrayHelper* ORowSetDataColumn::createArrayHelper( ) const
 {
-       BEGIN_PROPERTY_HELPER(30)
+       BEGIN_PROPERTY_HELPER(31)
                DECL_PROP2(ALIGN,                                       
sal_Int32,                      BOUND,MAYBEVOID);
                DECL_PROP1(CATALOGNAME,                         
::rtl::OUString,        READONLY);
                DECL_PROP2(CONTROLDEFAULT,                      
::rtl::OUString,        BOUND,MAYBEVOID);
@@ -110,6 +111,7 @@
                DECL_PROP1_BOOL(ISDEFINITELYWRITABLE,                           
        READONLY);              
                DECL_PROP1(ISNULLABLE,                          sal_Int32,      
                READONLY);
                DECL_PROP1_BOOL(ISREADONLY,                                     
                        READONLY);
+               DECL_PROP1_BOOL(ISROWVERSION,                           
READONLY);
                DECL_PROP1_BOOL(ISSEARCHABLE,                                   
                READONLY);
                DECL_PROP1_BOOL(ISSIGNED,                                       
                        READONLY);
                DECL_PROP1_BOOL(ISWRITABLE,                                     
                        READONLY);

File [changed]: CRowSetDataColumn.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/CRowSetDataColumn.hxx?r1=1.13&r2=1.13.56.1
Delta lines:  +4 -3
-------------------
--- CRowSetDataColumn.hxx       8 Sep 2005 09:56:45 -0000       1.13
+++ CRowSetDataColumn.hxx       5 Dec 2005 12:15:23 -0000       1.13.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: CRowSetDataColumn.hxx,v $
  *
- *  $Revision: 1.13 $
+ *  $Revision: 1.13.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 09:56:45 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:23 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -73,6 +73,7 @@
                                                  const 
::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >& _xRow,
                                                  const 
::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate >& 
_xRowUpdate,
                                                  sal_Int32 _nPos,
+                          const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMeta,
                                                  const ::rtl::OUString& 
_rDescription,
                                                  const ORowSetCacheIterator& 
_rColumnValue,
                                                  ORowSetMatrix::iterator& 
_rEnd);

File [changed]: RowSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSet.cxx?r1=1.137&r2=1.137.46.1
Delta lines:  +6 -3
-------------------
--- RowSet.cxx  23 Sep 2005 14:36:38 -0000      1.137
+++ RowSet.cxx  5 Dec 2005 12:15:23 -0000       1.137.46.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: RowSet.cxx,v $
  *
- *  $Revision: 1.137 $
+ *  $Revision: 1.137.46.1 $
  *
- *  last change: $Author: hr $ $Date: 2005/09/23 14:36:38 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:23 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -1747,6 +1747,7 @@
                                                                                
                                                                                
                this,
                                                                                
                                                                                
                this,
                                                                                
                                                                                
                i+1,
+                                                                               
         m_xActiveConnection->getMetaData(),
                                                                                
                                                                                
                aDescription,
                                                                                
                                                                                
                m_aCurrentRow,
                                                                                
                                                                                
                m_pCache->getEnd());
@@ -1833,6 +1834,7 @@
                                                                                
                                                                                
        this,
                                                                                
                                                                                
        this,
                                                                                
                                                                                
        i,
+                                                                               
     m_xActiveConnection->getMetaData(),
                                                                                
                                                                                
        aDescription,
                                                                                
                                                                                
        m_aCurrentRow,
                                                                                
                                                                                
        m_pCache->getEnd());
@@ -2572,6 +2574,7 @@
                ORowSetColumn* pColumn = new ORowSetColumn(     
rParent.getMetaData(),
                                                                                
                                        this,
                                                                                
                                        i,
+                                                            
rParent.m_xActiveConnection->getMetaData(),
                                                                                
                                        aDescription,
                                                                                
                                        m_aCurrentRow,
                                                                                
                                        m_pCache->getEnd());

File [changed]: datacolumn.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/datacolumn.cxx?r1=1.6&r2=1.6.56.1
Delta lines:  +6 -5
-------------------
--- datacolumn.cxx      8 Sep 2005 10:05:27 -0000       1.6
+++ datacolumn.cxx      5 Dec 2005 12:15:24 -0000       1.6.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: datacolumn.cxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 10:05:27 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:24 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -77,8 +77,9 @@
                                                 const Reference < 
XResultSetMetaData >& _xMetaData,
                                                 const Reference < XRow >& 
_xRow,
                                                 const Reference < XRowUpdate 
>& _xRowUpdate,
-                                                sal_Int32 _nPos)
-                                        :OResultColumn(_xMetaData, _nPos)
+                                                sal_Int32 _nPos,
+                         const Reference< XDatabaseMetaData >& _rxDBMeta)
+                                        :OResultColumn(_xMetaData, _nPos, 
_rxDBMeta)
                                         ,m_xRow(_xRow)
                                         ,m_xRowUpdate(_xRowUpdate)
 {

File [changed]: datacolumn.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/datacolumn.hxx?r1=1.6&r2=1.6.56.1
Delta lines:  +5 -4
-------------------
--- datacolumn.hxx      8 Sep 2005 10:05:47 -0000       1.6
+++ datacolumn.hxx      5 Dec 2005 12:15:24 -0000       1.6.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: datacolumn.hxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 10:05:47 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:24 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -72,7 +72,8 @@
                ODataColumn      (const ::com::sun::star::uno::Reference < 
::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
                                          const 
::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRow >& _xRow,
                                          const 
::com::sun::star::uno::Reference < ::com::sun::star::sdbc::XRowUpdate >& 
_xRowUpdate,
-                                         sal_Int32 _nPos);
+                                         sal_Int32 _nPos,
+                      const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMeta);
 
        // com::sun::star::lang::XTypeProvider
                virtual ::com::sun::star::uno::Sequence< 
::com::sun::star::uno::Type > SAL_CALL getTypes() throw 
(::com::sun::star::uno::RuntimeException);

File [changed]: preparedstatement.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/preparedstatement.cxx?r1=1.11&r2=1.11.56.1
Delta lines:  +9 -4
-------------------
--- preparedstatement.cxx       8 Sep 2005 10:07:06 -0000       1.11
+++ preparedstatement.cxx       5 Dec 2005 12:15:24 -0000       1.11.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: preparedstatement.cxx,v $
  *
- *  $Revision: 1.11 $
+ *  $Revision: 1.11.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 10:07:06 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:24 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -211,11 +211,16 @@
                        // do we have columns
                        if ( xMetaData.is() )
                        {
+                Reference< XDatabaseMetaData > xDBMeta;
+                Reference< XConnection > xConn( getConnection() );
+                if ( xConn.is() )
+                    xDBMeta = xConn->getMetaData();
+
                                for (sal_Int32 i = 0, nCount = 
xMetaData->getColumnCount(); i < nCount; ++i)
                                {
                                        // retrieve the name of the column
                                        rtl::OUString aName = 
xMetaData->getColumnName(i + 1);
-                                       OResultColumn* pColumn = new 
OResultColumn(xMetaData, i + 1);
+                                       OResultColumn* pColumn = new 
OResultColumn(xMetaData, i + 1, xDBMeta);
                                        m_pColumns->append(aName, pColumn);
                                }
                        }

File [changed]: resultcolumn.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/resultcolumn.cxx?r1=1.6&r2=1.6.56.1
Delta lines:  +68 -5
--------------------
--- resultcolumn.cxx    8 Sep 2005 10:09:27 -0000       1.6
+++ resultcolumn.cxx    5 Dec 2005 12:15:24 -0000       1.6.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: resultcolumn.cxx,v $
  *
- *  $Revision: 1.6 $
+ *  $Revision: 1.6.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 10:09:27 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:24 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -62,6 +62,12 @@
 #ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #endif
+#ifndef _CPPUHELPER_EXC_HLP_HXX_
+#include <cppuhelper/exc_hlp.hxx>
+#endif
+#ifndef _OSL_THREAD_H_
+#include <osl/thread.h>
+#endif
 
 using namespace ::com::sun::star::sdbc;
 using namespace ::com::sun::star::beans;
@@ -77,13 +83,64 @@
 //--------------------------------------------------------------------------
 OResultColumn::OResultColumn(
                                                 const Reference < 
XResultSetMetaData >& _xMetaData,
-                                                sal_Int32 _nPos)
+                                                sal_Int32 _nPos,
+                         const Reference< XDatabaseMetaData >& _rxDBMeta )
                                         :m_xMetaData(_xMetaData)
                                         ,m_nPos(_nPos)
+                     ,m_xDBMetaData(_rxDBMeta)
 {
        DBG_CTOR(OResultColumn,NULL);
 }
 // 
-----------------------------------------------------------------------------
+void OResultColumn::impl_determineIsRowVersion_nothrow()
+{
+    if ( m_aIsRowVersion.hasValue() )
+        return;
+    m_aIsRowVersion <<= (sal_Bool)(sal_False);
+
+    OSL_ENSURE( m_xDBMetaData.is(), 
"OResultColumn::impl_determineIsRowVersion_nothrow: no DBMetaData!" );
+    if ( !m_xDBMetaData.is() )
+        return;
+    
+    try
+    {
+        ::rtl::OUString sCatalog, sSchema, sTable, sColumnName;
+        getPropertyValue( PROPERTY_CATALOGNAME ) >>= sCatalog;
+        getPropertyValue( PROPERTY_SCHEMANAME ) >>= sSchema;
+        getPropertyValue( PROPERTY_TABLENAME ) >>= sTable;
+        getPropertyValue( PROPERTY_NAME ) >>= sColumnName;
+
+        Reference< XResultSet > xVersionColumns = 
m_xDBMetaData->getVersionColumns(
+            makeAny( sCatalog ), sSchema, sTable );
+        if ( xVersionColumns.is() ) // allowed to be NULL
+        {
+            Reference< XRow > xResultRow( xVersionColumns, UNO_QUERY_THROW );
+            while ( xVersionColumns->next() )
+            {
+                if ( xResultRow->getString( 2 ) == sColumnName )
+                {
+                    m_aIsRowVersion <<= (sal_Bool)(sal_True);
+                    break;
+                }
+            }
+        }
+    }
+    catch( const Exception& e )
+    {
+    #if OSL_DEBUG_LEVEL > 0
+       Any caught( ::cppu::getCaughtException() );
+       ::rtl::OString sMessage( "impl_determineIsRowVersion_nothrow: caught an 
exception!" );
+       sMessage += "\ntype: ";
+       sMessage += ::rtl::OString( caught.getValueTypeName().getStr(), 
caught.getValueTypeName().getLength(), osl_getThreadTextEncoding() );
+       sMessage += "\nmessage: ";
+       sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), 
osl_getThreadTextEncoding() );
+       OSL_ENSURE( false, sMessage );
+    #else
+       e; // make compiler happy
+    #endif
+    }
+}
+// 
-----------------------------------------------------------------------------
 OResultColumn::~OResultColumn()
 {
        DBG_DTOR(OResultColumn,NULL);
@@ -135,7 +192,7 @@
 
//------------------------------------------------------------------------------
 ::cppu::IPropertyArrayHelper* OResultColumn::createArrayHelper( ) const
 {
-       BEGIN_PROPERTY_HELPER(20)
+       BEGIN_PROPERTY_HELPER(21)
                DECL_PROP1(CATALOGNAME,                         
::rtl::OUString,        READONLY);
                DECL_PROP1(DISPLAYSIZE,                         sal_Int32,      
                READONLY);
                DECL_PROP1_BOOL(ISAUTOINCREMENT,                                
                READONLY);
@@ -144,6 +201,7 @@
                DECL_PROP1_BOOL(ISDEFINITELYWRITABLE,                           
        READONLY);
                DECL_PROP1(ISNULLABLE,                          sal_Int32,      
                READONLY);
                DECL_PROP1_BOOL(ISREADONLY,                                     
                        READONLY);
+               DECL_PROP1_BOOL(ISROWVERSION,                           
READONLY);
                DECL_PROP1_BOOL(ISSEARCHABLE,                                   
                READONLY);
                DECL_PROP1_BOOL(ISSIGNED,                                       
                        READONLY);
                DECL_PROP1_BOOL(ISWRITABLE,                                     
                        READONLY);
@@ -173,6 +231,10 @@
        {
                switch (nHandle)
                {
+            case PROPERTY_ID_ISROWVERSION:
+                const_cast< OResultColumn* >( this 
)->impl_determineIsRowVersion_nothrow();
+                rValue = m_aIsRowVersion;
+                break;
                        case PROPERTY_ID_TABLENAME:
                                rValue <<= m_xMetaData->getTableName(m_nPos);
                                break;
@@ -265,6 +327,7 @@
                                // empty string'S
                                rValue <<= rtl::OUString();
                                break;
+            case PROPERTY_ID_ISROWVERSION:
                        case PROPERTY_ID_ISAUTOINCREMENT:
                        case PROPERTY_ID_ISWRITABLE:
                        case PROPERTY_ID_ISDEFINITELYWRITABLE:

File [changed]: resultcolumn.hxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/resultcolumn.hxx?r1=1.5&r2=1.5.56.1
Delta lines:  +13 -6
--------------------
--- resultcolumn.hxx    8 Sep 2005 10:09:45 -0000       1.5
+++ resultcolumn.hxx    5 Dec 2005 12:15:24 -0000       1.5.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: resultcolumn.hxx,v $
  *
- *  $Revision: 1.5 $
+ *  $Revision: 1.5.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 10:09:45 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:24 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -52,12 +52,16 @@
        {
        protected:
                ::com::sun::star::uno::Reference < 
::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData;
+        ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData >   m_xDBMetaData;
                sal_Int32                               m_nPos;
+        ::com::sun::star::uno::Any  m_aIsRowVersion;
 
                virtual ~OResultColumn();
        public:
-               OResultColumn(const ::com::sun::star::uno::Reference < 
::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
-                                         sal_Int32 _nPos);
+               OResultColumn(
+            const ::com::sun::star::uno::Reference < 
::com::sun::star::sdbc::XResultSetMetaData >& _xMetaData,
+                       sal_Int32 _nPos,
+            const ::com::sun::star::uno::Reference< 
::com::sun::star::sdbc::XDatabaseMetaData >& _rxDBMeta );
 
        // com::sun::star::lang::XTypeProvider
                virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 
getImplementationId() throw (::com::sun::star::uno::RuntimeException);
@@ -78,6 +82,9 @@
                                                                        
::com::sun::star::uno::Any& rValue,
                                                                        
sal_Int32 nHandle
                                                                                
 ) const;
+
+    private:
+        void    impl_determineIsRowVersion_nothrow();
        };
 }
 #endif // _DBACORE_RESULTCOLUMN_HXX_

File [changed]: resultset.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/resultset.cxx?r1=1.13&r2=1.13.56.1
Delta lines:  +47 -4
--------------------
--- resultset.cxx       8 Sep 2005 10:10:03 -0000       1.13
+++ resultset.cxx       5 Dec 2005 12:15:24 -0000       1.13.56.1
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: resultset.cxx,v $
  *
- *  $Revision: 1.13 $
+ *  $Revision: 1.13.56.1 $
  *
- *  last change: $Author: rt $ $Date: 2005/09/08 10:10:03 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:24 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -71,6 +71,12 @@
 #ifndef _DBHELPER_DBEXCEPTION_HXX_
 #include <connectivity/dbexception.hxx>
 #endif
+#ifndef _CPPUHELPER_EXC_HLP_HXX_
+#include <cppuhelper/exc_hlp.hxx>
+#endif
+#ifndef _OSL_THREAD_H_
+#include <osl/thread.h>
+#endif
 
 
 using namespace ::com::sun::star::sdbc;
@@ -357,6 +363,41 @@
        return Reference< XColumnLocate >(m_xAggregateAsResultSet, 
UNO_QUERY)->findColumn(columnName);
 }
 
+//------------------------------------------------------------------------------
+namespace
+{
+    static Reference< XDatabaseMetaData > 
lcl_getDBMetaDataFromStatement_nothrow( const Reference< XInterface >& 
_rxStatement )
+    {
+        Reference< XDatabaseMetaData > xDBMetaData;
+        try
+        {
+            Reference< XStatement > xStatement( _rxStatement, UNO_QUERY );
+            Reference< XPreparedStatement > xPreparedStatement( _rxStatement, 
UNO_QUERY );
+            Reference< XConnection > xConn;
+            if ( xStatement.is() )
+                xConn = xStatement->getConnection();
+            else if ( xPreparedStatement.is() )
+                xConn = xPreparedStatement->getConnection();
+            if ( xConn.is() )
+                xDBMetaData = xConn->getMetaData();
+        }
+        catch( const Exception& e )
+        {
+        #if OSL_DEBUG_LEVEL > 0
+               Any caught( ::cppu::getCaughtException() );
+               ::rtl::OString sMessage( 
"lcl_getDBMetaDataFromStatement_nothrow: caught an exception!" );
+               sMessage += "\ntype: ";
+               sMessage += ::rtl::OString( caught.getValueTypeName().getStr(), 
caught.getValueTypeName().getLength(), osl_getThreadTextEncoding() );
+               sMessage += "\nmessage: ";
+               sMessage += ::rtl::OString( e.Message.getStr(), 
e.Message.getLength(), osl_getThreadTextEncoding() );
+               OSL_ENSURE( false, sMessage );
+        #else
+               e; // make compiler happy
+        #endif
+        }
+        return xDBMetaData;
+    }
+}
 // ::com::sun::star::sdbcx::XColumnsSupplier
 
//------------------------------------------------------------------------------
 Reference< ::com::sun::star::container::XNameAccess > 
OResultSet::getColumns(void) throw( RuntimeException )
@@ -372,11 +413,13 @@
                // do we have columns
                try
                {
+            Reference< XDatabaseMetaData > xDBMetaData( 
lcl_getDBMetaDataFromStatement_nothrow( getStatement() ) );
+
                        for (sal_Int32 i = 0, nCount = 
xMetaData->getColumnCount(); i < nCount; ++i)
                        {
                                // retrieve the name of the column
                                rtl::OUString aName = 
xMetaData->getColumnName(i + 1);
-                               ODataColumn* pColumn = new 
ODataColumn(xMetaData, m_xAggregateAsRow, m_xAggregateAsRowUpdate, i + 1);
+                               ODataColumn* pColumn = new 
ODataColumn(xMetaData, m_xAggregateAsRow, m_xAggregateAsRowUpdate, i + 1, 
xDBMetaData);
                                m_pColumns->append(aName, pColumn);
                        }
                }

Directory: /dba/dbaccess/source/ui/app/
=======================================

File [changed]: AppController.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppController.cxx?r1=1.20.82.2&r2=1.20.82.3
Delta lines:  +5 -5
-------------------
--- AppController.cxx   29 Nov 2005 23:54:39 -0000      1.20.82.2
+++ AppController.cxx   5 Dec 2005 12:15:25 -0000       1.20.82.3
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: AppController.cxx,v $
  *
- *  $Revision: 1.20.82.2 $
+ *  $Revision: 1.20.82.3 $
  *
- *  last change: $Author: kendy $ $Date: 2005/11/29 23:54:39 $
+ *  last change: $Author: fs $ $Date: 2005/12/05 12:15:25 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -777,7 +777,7 @@
                                if ( aReturn.bEnabled = m_xDataSource.is() )
                                {
                                        DATASOURCE_TYPE eType = 
m_aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
-                                       aReturn.bEnabled = DST_EMBEDDED != 
eType && DST_MOZILLA != eType && DST_EVOLUTION != eType && DST_KAB != eType && 
DST_OUTLOOK != eType && DST_OUTLOOKEXP != eType;
+                                       aReturn.bEnabled = DST_EMBEDDED != 
eType && DST_MOZILLA != eType && DST_EVOLUTION != eType && DST_OUTLOOK != eType 
&& DST_OUTLOOKEXP != eType;
                                }
                                break;
                        case SID_DB_APP_DSCONNECTION_TYPE:
@@ -791,7 +791,7 @@
                                if ( aReturn.bEnabled = m_xDataSource.is() )
                                {
                                        DATASOURCE_TYPE eType = 
m_aTypeCollection.getType(::comphelper::getString(m_xDataSource->getPropertyValue(PROPERTY_URL)));
-                                       aReturn.bEnabled = DST_EMBEDDED != 
eType && DST_LDAP != eType && DST_CALC != eType && DST_MOZILLA != eType && 
DST_THUNDERBIRD != eType && DST_EVOLUTION != eType && DST_KAB != eType && 
DST_OUTLOOK != eType && DST_OUTLOOKEXP != eType;
+                                       aReturn.bEnabled = DST_EMBEDDED != 
eType && DST_LDAP != eType && DST_CALC != eType && DST_MOZILLA != eType && 
DST_THUNDERBIRD != eType && DST_EVOLUTION != eType && DST_OUTLOOK != eType && 
DST_OUTLOOKEXP != eType;
                                }
                                break;
                        case SID_DB_APP_CONVERTTOVIEW:




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

Reply via email to