LCOV - code coverage report
Current view: top level - ucb/source/ucp/ftp - ftpresultsetbase.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 205 0.0 %
Date: 2012-08-25 Functions: 0 48 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 322 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #include <ucbhelper/contentidentifier.hxx>
      30                 :            : #include <com/sun/star/ucb/OpenMode.hpp>
      31                 :            : #include <com/sun/star/uno/Reference.h>
      32                 :            : #include <com/sun/star/beans/PropertyAttribute.hpp>
      33                 :            : #include <com/sun/star/ucb/ListActionType.hpp>
      34                 :            : #include <com/sun/star/ucb/XSourceInitialization.hpp>
      35                 :            : #include <ucbhelper/resultsetmetadata.hxx>
      36                 :            : #include "ftpresultsetbase.hxx"
      37                 :            : 
      38                 :            : using namespace ftp;
      39                 :            : using namespace com::sun::star;
      40                 :            : 
      41                 :          0 : ResultSetBase::ResultSetBase(
      42                 :            :     const uno::Reference< lang::XMultiServiceFactory >&  xMSF,
      43                 :            :     const uno::Reference< ucb::XContentProvider >&  xProvider,
      44                 :            :     sal_Int32 nOpenMode,
      45                 :            :     const uno::Sequence< beans::Property >& seq,
      46                 :            :     const uno::Sequence< ucb::NumberedSortingInfo >& seqSort )
      47                 :            :     : m_xMSF( xMSF ),
      48                 :            :       m_xProvider( xProvider ),
      49                 :            :       m_nRow( -1 ),
      50                 :            :       m_nWasNull( true ),
      51                 :            :       m_nOpenMode( nOpenMode ),
      52                 :            :       m_bRowCountFinal( true ),
      53                 :            :       m_sProperty( seq ),
      54                 :            :       m_sSortingInfo( seqSort ),
      55                 :            :       m_pDisposeEventListeners( 0 ),
      56                 :            :       m_pRowCountListeners( 0 ),
      57 [ #  # ][ #  # ]:          0 :       m_pIsFinalListeners( 0 )
         [ #  # ][ #  # ]
         [ #  # ][ #  # ]
      58                 :            : {
      59                 :          0 : }
      60                 :            : 
      61 [ #  # ][ #  # ]:          0 : ResultSetBase::~ResultSetBase()
                 [ #  # ]
      62                 :            : {
      63 [ #  # ][ #  # ]:          0 :     delete m_pIsFinalListeners;
      64 [ #  # ][ #  # ]:          0 :     delete m_pRowCountListeners;
      65 [ #  # ][ #  # ]:          0 :     delete m_pDisposeEventListeners;
      66         [ #  # ]:          0 : }
      67                 :            : 
      68                 :            : 
      69                 :            : // XInterface
      70                 :            : 
      71                 :            : void SAL_CALL
      72                 :          0 : ResultSetBase::acquire(
      73                 :            :     void )
      74                 :            :     throw()
      75                 :            : {
      76                 :          0 :     OWeakObject::acquire();
      77                 :          0 : }
      78                 :            : 
      79                 :            : 
      80                 :            : void SAL_CALL
      81                 :          0 : ResultSetBase::release(
      82                 :            :     void )
      83                 :            :     throw()
      84                 :            : {
      85                 :          0 :     OWeakObject::release();
      86                 :          0 : }
      87                 :            : 
      88                 :            : 
      89                 :            : 
      90                 :            : uno::Any SAL_CALL
      91                 :          0 : ResultSetBase::queryInterface(
      92                 :            :     const uno::Type& rType )
      93                 :            :     throw( uno::RuntimeException )
      94                 :            : {
      95                 :            :     uno::Any aRet = cppu::queryInterface(
      96                 :            :         rType,
      97                 :            :         (static_cast< lang::XComponent* >(this)),
      98                 :            :         (static_cast< sdbc::XRow* >(this)),
      99                 :            :         (static_cast< sdbc::XResultSet* >(this)),
     100                 :            :         (static_cast< sdbc::XResultSetMetaDataSupplier* >(this)),
     101                 :            :         (static_cast< beans::XPropertySet* >(this)),
     102         [ #  # ]:          0 :         (static_cast< ucb::XContentAccess* >(this)) );
     103 [ #  # ][ #  # ]:          0 :     return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
     104                 :            : }
     105                 :            : 
     106                 :            : 
     107                 :            : 
     108                 :            : // XComponent
     109                 :            : 
     110                 :            : 
     111                 :            : void SAL_CALL
     112                 :          0 : ResultSetBase::addEventListener(
     113                 :            :     const uno::Reference< lang::XEventListener >& Listener )
     114                 :            :     throw( uno::RuntimeException )
     115                 :            : {
     116         [ #  # ]:          0 :     osl::MutexGuard aGuard( m_aMutex );
     117                 :            : 
     118         [ #  # ]:          0 :     if ( ! m_pDisposeEventListeners )
     119                 :            :         m_pDisposeEventListeners =
     120         [ #  # ]:          0 :             new cppu::OInterfaceContainerHelper( m_aMutex );
     121                 :            : 
     122 [ #  # ][ #  # ]:          0 :     m_pDisposeEventListeners->addInterface( Listener );
     123                 :          0 : }
     124                 :            : 
     125                 :            : 
     126                 :            : void SAL_CALL
     127                 :          0 : ResultSetBase::removeEventListener(
     128                 :            :     const uno::Reference< lang::XEventListener >& Listener )
     129                 :            :     throw( uno::RuntimeException )
     130                 :            : {
     131         [ #  # ]:          0 :     osl::MutexGuard aGuard( m_aMutex );
     132                 :            : 
     133         [ #  # ]:          0 :     if ( m_pDisposeEventListeners )
     134 [ #  # ][ #  # ]:          0 :         m_pDisposeEventListeners->removeInterface( Listener );
     135                 :          0 : }
     136                 :            : 
     137                 :            : 
     138                 :            : 
     139                 :            : void SAL_CALL
     140                 :          0 : ResultSetBase::dispose()
     141                 :            :     throw( uno::RuntimeException )
     142                 :            : {
     143         [ #  # ]:          0 :     osl::MutexGuard aGuard( m_aMutex );
     144                 :            : 
     145         [ #  # ]:          0 :     lang::EventObject aEvt;
     146         [ #  # ]:          0 :     aEvt.Source = static_cast< lang::XComponent * >( this );
     147                 :            : 
     148 [ #  # ][ #  # ]:          0 :     if ( m_pDisposeEventListeners && m_pDisposeEventListeners->getLength() )
         [ #  # ][ #  # ]
     149                 :            :     {
     150         [ #  # ]:          0 :         m_pDisposeEventListeners->disposeAndClear( aEvt );
     151                 :            :     }
     152 [ #  # ][ #  # ]:          0 :     if( m_pRowCountListeners && m_pRowCountListeners->getLength() )
         [ #  # ][ #  # ]
     153                 :            :     {
     154         [ #  # ]:          0 :         m_pRowCountListeners->disposeAndClear( aEvt );
     155                 :            :     }
     156 [ #  # ][ #  # ]:          0 :     if( m_pIsFinalListeners && m_pIsFinalListeners->getLength() )
         [ #  # ][ #  # ]
     157                 :            :     {
     158         [ #  # ]:          0 :         m_pIsFinalListeners->disposeAndClear( aEvt );
     159 [ #  # ][ #  # ]:          0 :     }
     160                 :          0 : }
     161                 :            : 
     162                 :            : 
     163                 :            : 
     164                 :            : //  XResultSet
     165                 :            : 
     166                 :            : sal_Bool SAL_CALL
     167                 :          0 : ResultSetBase::next(
     168                 :            :     void )
     169                 :            :     throw( sdbc::SQLException,
     170                 :            :            uno::RuntimeException )
     171                 :            : {
     172                 :            :     sal_Bool test;
     173         [ #  # ]:          0 :     if( ++m_nRow < sal::static_int_cast<sal_Int32>(m_aItems.size()) )
     174                 :          0 :         test = true;
     175                 :            :     else
     176                 :          0 :         test = false;
     177                 :          0 :     return test;
     178                 :            : }
     179                 :            : 
     180                 :            : 
     181                 :            : sal_Bool SAL_CALL
     182                 :          0 : ResultSetBase::isBeforeFirst(
     183                 :            :     void )
     184                 :            :     throw( sdbc::SQLException,
     185                 :            :            uno::RuntimeException )
     186                 :            : {
     187                 :          0 :     return m_nRow == -1;
     188                 :            : }
     189                 :            : 
     190                 :            : 
     191                 :            : sal_Bool SAL_CALL
     192                 :          0 : ResultSetBase::isAfterLast(
     193                 :            :     void )
     194                 :            :     throw( sdbc::SQLException,
     195                 :            :            uno::RuntimeException )
     196                 :            : {
     197                 :          0 :     return m_nRow >= sal::static_int_cast<sal_Int32>(m_aItems.size());   // Cannot happen, if m_aFolder.isOpen()
     198                 :            : }
     199                 :            : 
     200                 :            : 
     201                 :            : sal_Bool SAL_CALL
     202                 :          0 : ResultSetBase::isFirst(
     203                 :            :     void )
     204                 :            :     throw( sdbc::SQLException,
     205                 :            :            uno::RuntimeException )
     206                 :            : {
     207                 :          0 :     return m_nRow == 0;
     208                 :            : }
     209                 :            : 
     210                 :            : 
     211                 :            : sal_Bool SAL_CALL
     212                 :          0 : ResultSetBase::isLast(
     213                 :            :     void  )
     214                 :            :     throw( sdbc::SQLException,
     215                 :            :            uno::RuntimeException)
     216                 :            : {
     217         [ #  # ]:          0 :     if( m_nRow ==  sal::static_int_cast<sal_Int32>(m_aItems.size()) - 1 )
     218                 :          0 :         return true;
     219                 :            :     else
     220                 :          0 :         return false;
     221                 :            : }
     222                 :            : 
     223                 :            : 
     224                 :            : void SAL_CALL
     225                 :          0 : ResultSetBase::beforeFirst(
     226                 :            :     void  )
     227                 :            :     throw( sdbc::SQLException,
     228                 :            :            uno::RuntimeException)
     229                 :            : {
     230                 :          0 :     m_nRow = -1;
     231                 :          0 : }
     232                 :            : 
     233                 :            : 
     234                 :            : void SAL_CALL
     235                 :          0 : ResultSetBase::afterLast(
     236                 :            :     void  )
     237                 :            :     throw( sdbc::SQLException,
     238                 :            :            uno::RuntimeException )
     239                 :            : {
     240                 :          0 :     m_nRow = m_aItems.size();
     241                 :          0 : }
     242                 :            : 
     243                 :            : 
     244                 :            : sal_Bool SAL_CALL
     245                 :          0 : ResultSetBase::first(
     246                 :            :     void  )
     247                 :            :     throw( sdbc::SQLException,
     248                 :            :            uno::RuntimeException)
     249                 :            : {
     250                 :          0 :     m_nRow = -1;
     251                 :          0 :     return next();
     252                 :            : }
     253                 :            : 
     254                 :            : 
     255                 :            : sal_Bool SAL_CALL
     256                 :          0 : ResultSetBase::last(
     257                 :            :     void  )
     258                 :            :     throw( sdbc::SQLException,
     259                 :            :            uno::RuntimeException )
     260                 :            : {
     261                 :          0 :     m_nRow = m_aItems.size() - 1;
     262                 :          0 :     return true;
     263                 :            : }
     264                 :            : 
     265                 :            : 
     266                 :            : sal_Int32 SAL_CALL
     267                 :          0 : ResultSetBase::getRow(
     268                 :            :     void )
     269                 :            :     throw( sdbc::SQLException,
     270                 :            :            uno::RuntimeException)
     271                 :            : {
     272                 :            :     // Test, whether behind last row
     273 [ #  # ][ #  # ]:          0 :     if( -1 == m_nRow || m_nRow >= sal::static_int_cast<sal_Int32>(m_aItems.size()) )
                 [ #  # ]
     274                 :          0 :         return 0;
     275                 :            :     else
     276                 :          0 :         return m_nRow+1;
     277                 :            : }
     278                 :            : 
     279                 :            : 
     280                 :          0 : sal_Bool SAL_CALL ResultSetBase::absolute( sal_Int32 row )
     281                 :            :     throw( sdbc::SQLException, uno::RuntimeException)
     282                 :            : {
     283         [ #  # ]:          0 :     if( row >= 0 )
     284                 :          0 :         m_nRow = row - 1;
     285                 :            :     else
     286                 :            :     {
     287                 :          0 :         last();
     288                 :          0 :         m_nRow += ( row + 1 );
     289         [ #  # ]:          0 :         if( m_nRow < -1 )
     290                 :          0 :             m_nRow = -1;
     291                 :            :     }
     292                 :            : 
     293 [ #  # ][ #  # ]:          0 :     return 0<= m_nRow && m_nRow < sal::static_int_cast<sal_Int32>(m_aItems.size());
     294                 :            : }
     295                 :            : 
     296                 :            : 
     297                 :            : 
     298                 :            : 
     299                 :            : sal_Bool SAL_CALL
     300                 :          0 : ResultSetBase::relative(
     301                 :            :     sal_Int32 row )
     302                 :            :     throw( sdbc::SQLException,
     303                 :            :            uno::RuntimeException)
     304                 :            : {
     305 [ #  # ][ #  # ]:          0 :     if( isAfterLast() || isBeforeFirst() )
                 [ #  # ]
     306         [ #  # ]:          0 :         throw sdbc::SQLException();
     307                 :            : 
     308         [ #  # ]:          0 :     if( row > 0 )
     309         [ #  # ]:          0 :         while( row-- )
     310                 :          0 :             next();
     311         [ #  # ]:          0 :     else if( row < 0 )
     312 [ #  # ][ #  # ]:          0 :         while( row++ && m_nRow > - 1 )
                 [ #  # ]
     313                 :          0 :             previous();
     314                 :            : 
     315 [ #  # ][ #  # ]:          0 :     return 0 <= m_nRow && m_nRow < sal::static_int_cast<sal_Int32>(m_aItems.size());
     316                 :            : }
     317                 :            : 
     318                 :            : 
     319                 :            : 
     320                 :            : sal_Bool SAL_CALL
     321                 :          0 : ResultSetBase::previous(
     322                 :            :     void )
     323                 :            :     throw( sdbc::SQLException,
     324                 :            :            uno::RuntimeException)
     325                 :            : {
     326         [ #  # ]:          0 :     if( m_nRow > sal::static_int_cast<sal_Int32>(m_aItems.size()) )
     327                 :          0 :         m_nRow = m_aItems.size();  // Correct Handling of afterLast
     328         [ #  # ]:          0 :     if( 0 <= m_nRow ) -- m_nRow;
     329                 :            : 
     330 [ #  # ][ #  # ]:          0 :     return 0 <= m_nRow && m_nRow < sal::static_int_cast<sal_Int32>(m_aItems.size());
     331                 :            : }
     332                 :            : 
     333                 :            : 
     334                 :            : void SAL_CALL
     335                 :          0 : ResultSetBase::refreshRow(
     336                 :            :     void )
     337                 :            :     throw( sdbc::SQLException,
     338                 :            :            uno::RuntimeException)
     339                 :            : {
     340                 :          0 : }
     341                 :            : 
     342                 :            : 
     343                 :            : sal_Bool SAL_CALL
     344                 :          0 : ResultSetBase::rowUpdated(
     345                 :            :     void )
     346                 :            :     throw( sdbc::SQLException,
     347                 :            :            uno::RuntimeException )
     348                 :            : {
     349                 :          0 :     return false;
     350                 :            : }
     351                 :            : 
     352                 :            : sal_Bool SAL_CALL
     353                 :          0 : ResultSetBase::rowInserted(
     354                 :            :     void  )
     355                 :            :     throw( sdbc::SQLException,
     356                 :            :            uno::RuntimeException )
     357                 :            : {
     358                 :          0 :     return false;
     359                 :            : }
     360                 :            : 
     361                 :            : sal_Bool SAL_CALL
     362                 :          0 : ResultSetBase::rowDeleted(
     363                 :            :     void  )
     364                 :            :     throw( sdbc::SQLException,
     365                 :            :            uno::RuntimeException )
     366                 :            : {
     367                 :          0 :     return false;
     368                 :            : }
     369                 :            : 
     370                 :            : 
     371                 :            : uno::Reference< uno::XInterface > SAL_CALL
     372                 :          0 : ResultSetBase::getStatement(
     373                 :            :     void  )
     374                 :            :     throw( sdbc::SQLException,
     375                 :            :            uno::RuntimeException )
     376                 :            : {
     377                 :          0 :     uno::Reference< uno::XInterface > test( 0 );
     378                 :          0 :     return test;
     379                 :            : }
     380                 :            : 
     381                 :            : 
     382                 :            : // XCloseable
     383                 :            : 
     384                 :            : void SAL_CALL
     385                 :          0 : ResultSetBase::close(
     386                 :            :     void )
     387                 :            :     throw( sdbc::SQLException,
     388                 :            :            uno::RuntimeException)
     389                 :            : {
     390                 :          0 : }
     391                 :            : 
     392                 :            : 
     393                 :            : rtl::OUString SAL_CALL
     394                 :          0 : ResultSetBase::queryContentIdentifierString(
     395                 :            :     void )
     396                 :            :     throw( uno::RuntimeException )
     397                 :            : {
     398 [ #  # ][ #  # ]:          0 :     if( 0 <= m_nRow && m_nRow < sal::static_int_cast<sal_Int32>(m_aItems.size()) )
                 [ #  # ]
     399                 :          0 :         return m_aPath[m_nRow];
     400                 :            :     else
     401                 :          0 :         return rtl::OUString();
     402                 :            : }
     403                 :            : 
     404                 :            : 
     405                 :            : uno::Reference< ucb::XContentIdentifier > SAL_CALL
     406                 :          0 : ResultSetBase::queryContentIdentifier(
     407                 :            :     void
     408                 :            : )
     409                 :            :     throw(
     410                 :            :         uno::RuntimeException
     411                 :            :     )
     412                 :            : {
     413 [ #  # ][ #  # ]:          0 :     if( 0 <= m_nRow && m_nRow < sal::static_int_cast<sal_Int32>(m_aItems.size()) )
                 [ #  # ]
     414                 :            :     {
     415         [ #  # ]:          0 :         if(!m_aIdents[m_nRow].is()) {
     416         [ #  # ]:          0 :             rtl::OUString url = queryContentIdentifierString();
     417         [ #  # ]:          0 :             if(!url.isEmpty() )
     418                 :          0 :                 m_aIdents[m_nRow] =
     419                 :            :                     uno::Reference< ucb::XContentIdentifier >(
     420 [ #  # ][ #  # ]:          0 :                         new ::ucbhelper::ContentIdentifier(m_xMSF,url) );
           [ #  #  #  # ]
     421                 :            :         }
     422                 :          0 :         return m_aIdents[m_nRow];
     423                 :            :     }
     424                 :            : 
     425                 :          0 :     return uno::Reference<ucb::XContentIdentifier>();
     426                 :            : }
     427                 :            : 
     428                 :            : 
     429                 :            : uno::Reference< ucb::XContent > SAL_CALL
     430                 :          0 : ResultSetBase::queryContent(
     431                 :            :     void )
     432                 :            :     throw( uno::RuntimeException )
     433                 :            : {
     434 [ #  # ][ #  # ]:          0 :     if( 0 <= m_nRow && m_nRow < sal::static_int_cast<sal_Int32>(m_aItems.size()) )
                 [ #  # ]
     435         [ #  # ]:          0 :         return m_xProvider->queryContent(queryContentIdentifier());
     436                 :            :     else
     437                 :          0 :         return uno::Reference< ucb::XContent >();
     438                 :            : }
     439                 :            : 
     440                 :            : 
     441                 :            : 
     442 [ #  # ][ #  # ]:          0 : class XPropertySetInfoImpl
     443                 :            :     : public cppu::OWeakObject,
     444                 :            :       public beans::XPropertySetInfo
     445                 :            : {
     446                 :            : public:
     447                 :            : 
     448                 :          0 :     XPropertySetInfoImpl( const uno::Sequence< beans::Property >& aSeq )
     449         [ #  # ]:          0 :         : m_aSeq( aSeq )
     450                 :            :     {
     451                 :          0 :     }
     452                 :            : 
     453                 :          0 :     void SAL_CALL acquire( void )
     454                 :            :         throw()
     455                 :            :     {
     456                 :          0 :         OWeakObject::acquire();
     457                 :          0 :     }
     458                 :            : 
     459                 :            : 
     460                 :          0 :     void SAL_CALL release( void )
     461                 :            :         throw()
     462                 :            :     {
     463                 :          0 :         OWeakObject::release();
     464                 :          0 :     }
     465                 :            : 
     466                 :          0 :     uno::Any SAL_CALL queryInterface( const uno::Type& rType )
     467                 :            :         throw( uno::RuntimeException )
     468                 :            :     {
     469                 :            :         uno::Any aRet = cppu::queryInterface(
     470                 :            :             rType,
     471         [ #  # ]:          0 :             (static_cast< beans::XPropertySetInfo* >(this)) );
     472 [ #  # ][ #  # ]:          0 :         return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
     473                 :            :     }
     474                 :            : 
     475                 :          0 :     uno::Sequence< beans::Property > SAL_CALL getProperties()
     476                 :            :         throw( uno::RuntimeException )
     477                 :            :     {
     478                 :          0 :         return m_aSeq;
     479                 :            :     }
     480                 :            : 
     481                 :          0 :     beans::Property SAL_CALL getPropertyByName( const ::rtl::OUString& aName )
     482                 :            :         throw( beans::UnknownPropertyException,
     483                 :            :                uno::RuntimeException)
     484                 :            :     {
     485         [ #  # ]:          0 :         for( int i = 0; i < m_aSeq.getLength(); ++i )
     486         [ #  # ]:          0 :             if( aName == m_aSeq[i].Name )
     487                 :          0 :                 return m_aSeq[i];
     488         [ #  # ]:          0 :         throw beans::UnknownPropertyException();
     489                 :            :     }
     490                 :            : 
     491                 :          0 :     sal_Bool SAL_CALL hasPropertyByName( const ::rtl::OUString& Name )
     492                 :            :         throw( uno::RuntimeException )
     493                 :            :     {
     494         [ #  # ]:          0 :         for( int i = 0; i < m_aSeq.getLength(); ++i )
     495         [ #  # ]:          0 :             if( Name == m_aSeq[i].Name )
     496                 :          0 :                 return true;
     497                 :          0 :         return false;
     498                 :            :     }
     499                 :            : 
     500                 :            : private:
     501                 :            : 
     502                 :            :     uno::Sequence< beans::Property > m_aSeq;
     503                 :            : };
     504                 :            : 
     505                 :            : 
     506                 :            : 
     507                 :            : // XPropertySet
     508                 :            : uno::Reference< beans::XPropertySetInfo > SAL_CALL
     509                 :          0 : ResultSetBase::getPropertySetInfo()
     510                 :            :     throw( uno::RuntimeException)
     511                 :            : {
     512         [ #  # ]:          0 :     uno::Sequence< beans::Property > seq(2);
     513         [ #  # ]:          0 :     seq[0].Name = rtl::OUString("RowCount");
     514         [ #  # ]:          0 :     seq[0].Handle = -1;
     515 [ #  # ][ #  # ]:          0 :     seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) );
     516         [ #  # ]:          0 :     seq[0].Attributes = beans::PropertyAttribute::READONLY;
     517                 :            : 
     518         [ #  # ]:          0 :     seq[1].Name = rtl::OUString("IsRowCountFinal");
     519         [ #  # ]:          0 :     seq[1].Handle = -1;
     520 [ #  # ][ #  # ]:          0 :     seq[1].Type = getCppuType( static_cast< sal_Bool* >(0) );
     521         [ #  # ]:          0 :     seq[1].Attributes = beans::PropertyAttribute::READONLY;
     522                 :            : 
     523                 :            :     //t
     524                 :            :     return uno::Reference< beans::XPropertySetInfo > (
     525 [ #  # ][ #  # ]:          0 :         new XPropertySetInfoImpl( seq ) );
         [ #  # ][ #  # ]
     526                 :            : }
     527                 :            : 
     528                 :            : 
     529                 :            : 
     530                 :          0 : void SAL_CALL ResultSetBase::setPropertyValue(
     531                 :            :     const rtl::OUString& aPropertyName, const uno::Any& /*aValue*/ )
     532                 :            :     throw( beans::UnknownPropertyException,
     533                 :            :            beans::PropertyVetoException,
     534                 :            :            lang::IllegalArgumentException,
     535                 :            :            lang::WrappedTargetException,
     536                 :            :            uno::RuntimeException)
     537                 :            : {
     538   [ #  #  #  # ]:          0 :     if( aPropertyName == rtl::OUString("IsRowCountFinal") ||
         [ #  # ][ #  # ]
                 [ #  # ]
     539 [ #  # ][ #  # ]:          0 :         aPropertyName == rtl::OUString("RowCount") )
     540                 :          0 :         return;
     541                 :            : 
     542         [ #  # ]:          0 :     throw beans::UnknownPropertyException();
     543                 :            : }
     544                 :            : 
     545                 :            : 
     546                 :          0 : uno::Any SAL_CALL ResultSetBase::getPropertyValue(
     547                 :            :     const rtl::OUString& PropertyName )
     548                 :            :     throw( beans::UnknownPropertyException,
     549                 :            :            lang::WrappedTargetException,
     550                 :            :            uno::RuntimeException)
     551                 :            : {
     552         [ #  # ]:          0 :     if( PropertyName == rtl::OUString("IsRowCountFinal") )
     553                 :            :     {
     554                 :          0 :         uno::Any aAny;
     555         [ #  # ]:          0 :         aAny <<= m_bRowCountFinal;
     556                 :          0 :         return aAny;
     557                 :            :     }
     558         [ #  # ]:          0 :     else if ( PropertyName == rtl::OUString("RowCount") )
     559                 :            :     {
     560                 :          0 :         uno::Any aAny;
     561                 :          0 :         sal_Int32 count = m_aItems.size();
     562         [ #  # ]:          0 :         aAny <<= count;
     563                 :          0 :         return aAny;
     564                 :            :     }
     565                 :            :     else
     566         [ #  # ]:          0 :         throw beans::UnknownPropertyException();
     567                 :            : }
     568                 :            : 
     569                 :            : 
     570                 :          0 : void SAL_CALL ResultSetBase::addPropertyChangeListener(
     571                 :            :     const rtl::OUString& aPropertyName,
     572                 :            :     const uno::Reference< beans::XPropertyChangeListener >& xListener )
     573                 :            :     throw( beans::UnknownPropertyException,
     574                 :            :            lang::WrappedTargetException,
     575                 :            :            uno::RuntimeException)
     576                 :            : {
     577         [ #  # ]:          0 :     if( aPropertyName == rtl::OUString("IsRowCountFinal") )
     578                 :            :     {
     579         [ #  # ]:          0 :         osl::MutexGuard aGuard( m_aMutex );
     580         [ #  # ]:          0 :         if ( ! m_pIsFinalListeners )
     581                 :            :             m_pIsFinalListeners =
     582         [ #  # ]:          0 :                 new cppu::OInterfaceContainerHelper( m_aMutex );
     583                 :            : 
     584 [ #  # ][ #  # ]:          0 :         m_pIsFinalListeners->addInterface( xListener );
     585                 :            :     }
     586         [ #  # ]:          0 :     else if ( aPropertyName == rtl::OUString("RowCount") )
     587                 :            :     {
     588         [ #  # ]:          0 :         osl::MutexGuard aGuard( m_aMutex );
     589         [ #  # ]:          0 :         if ( ! m_pRowCountListeners )
     590                 :            :             m_pRowCountListeners =
     591         [ #  # ]:          0 :                 new cppu::OInterfaceContainerHelper( m_aMutex );
     592 [ #  # ][ #  # ]:          0 :         m_pRowCountListeners->addInterface( xListener );
     593                 :            :     }
     594                 :            :     else
     595         [ #  # ]:          0 :         throw beans::UnknownPropertyException();
     596                 :          0 : }
     597                 :            : 
     598                 :            : 
     599                 :          0 : void SAL_CALL ResultSetBase::removePropertyChangeListener(
     600                 :            :     const rtl::OUString& aPropertyName,
     601                 :            :     const uno::Reference< beans::XPropertyChangeListener >& aListener )
     602                 :            :     throw( beans::UnknownPropertyException,
     603                 :            :            lang::WrappedTargetException,
     604                 :            :            uno::RuntimeException)
     605                 :            : {
     606 [ #  # ][ #  # ]:          0 :     if( aPropertyName == rtl::OUString("IsRowCountFinal") &&
         [ #  # ][ #  # ]
                 [ #  # ]
     607                 :            :         m_pIsFinalListeners )
     608                 :            :     {
     609         [ #  # ]:          0 :         osl::MutexGuard aGuard( m_aMutex );
     610 [ #  # ][ #  # ]:          0 :         m_pIsFinalListeners->removeInterface( aListener );
     611                 :            :     }
     612 [ #  # ][ #  # ]:          0 :     else if ( aPropertyName == rtl::OUString("RowCount") &&
         [ #  # ][ #  # ]
                 [ #  # ]
     613                 :            :               m_pRowCountListeners )
     614                 :            :     {
     615         [ #  # ]:          0 :         osl::MutexGuard aGuard( m_aMutex );
     616 [ #  # ][ #  # ]:          0 :         m_pRowCountListeners->removeInterface( aListener );
     617                 :            :     }
     618                 :            :     else
     619         [ #  # ]:          0 :         throw beans::UnknownPropertyException();
     620                 :          0 : }
     621                 :            : 
     622                 :            : 
     623                 :          0 : void SAL_CALL ResultSetBase::addVetoableChangeListener(
     624                 :            :     const rtl::OUString& /*PropertyName*/,
     625                 :            :     const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
     626                 :            :     throw( beans::UnknownPropertyException,
     627                 :            :            lang::WrappedTargetException,
     628                 :            :            uno::RuntimeException)
     629                 :            : {
     630                 :          0 : }
     631                 :            : 
     632                 :            : 
     633                 :          0 : void SAL_CALL ResultSetBase::removeVetoableChangeListener(
     634                 :            :     const rtl::OUString& /*PropertyName*/,
     635                 :            :     const uno::Reference< beans::XVetoableChangeListener >& /*aListener*/ )
     636                 :            :     throw( beans::UnknownPropertyException,
     637                 :            :            lang::WrappedTargetException,
     638                 :            :            uno::RuntimeException)
     639                 :            : {
     640                 :          0 : }
     641                 :            : 
     642                 :            : 
     643                 :            : 
     644                 :            : // XResultSetMetaDataSupplier
     645                 :            : uno::Reference< sdbc::XResultSetMetaData > SAL_CALL
     646                 :          0 : ResultSetBase::getMetaData(
     647                 :            :     void )
     648                 :            :     throw( sdbc::SQLException,
     649                 :            :            uno::RuntimeException )
     650                 :            : {
     651                 :            :     ::ucbhelper::ResultSetMetaData* p =
     652                 :            :           new ::ucbhelper::ResultSetMetaData(
     653         [ #  # ]:          0 :               m_xMSF, m_sProperty );
     654         [ #  # ]:          0 :     return uno::Reference< sdbc::XResultSetMetaData >( p );
     655                 :            : }
     656                 :            : 
     657                 :            : 
     658                 :            : 
     659                 :            : 
     660                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10