1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3*cdf0e10cSrcweir * 4*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 5*cdf0e10cSrcweir * 6*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 7*cdf0e10cSrcweir * 8*cdf0e10cSrcweir * This file is part of OpenOffice.org. 9*cdf0e10cSrcweir * 10*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 11*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 12*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 13*cdf0e10cSrcweir * 14*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 15*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 16*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 18*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 19*cdf0e10cSrcweir * 20*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 21*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 22*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 23*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 24*cdf0e10cSrcweir * 25*cdf0e10cSrcweir ************************************************************************/ 26*cdf0e10cSrcweir 27*cdf0e10cSrcweir #include "precompiled_ucb.hxx" 28*cdf0e10cSrcweir 29*cdf0e10cSrcweir #include "ucpext_datasupplier.hxx" 30*cdf0e10cSrcweir #include "ucpext_content.hxx" 31*cdf0e10cSrcweir #include "ucpext_provider.hxx" 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir /** === begin UNO includes === **/ 34*cdf0e10cSrcweir #include <com/sun/star/deployment/XPackageInformationProvider.hpp> 35*cdf0e10cSrcweir /** === end UNO includes === **/ 36*cdf0e10cSrcweir 37*cdf0e10cSrcweir #include <ucbhelper/contentidentifier.hxx> 38*cdf0e10cSrcweir #include <comphelper/componentcontext.hxx> 39*cdf0e10cSrcweir #include <ucbhelper/providerhelper.hxx> 40*cdf0e10cSrcweir #include <ucbhelper/content.hxx> 41*cdf0e10cSrcweir #include <ucbhelper/propertyvalueset.hxx> 42*cdf0e10cSrcweir #include <tools/diagnose_ex.h> 43*cdf0e10cSrcweir #include <rtl/ustrbuf.hxx> 44*cdf0e10cSrcweir 45*cdf0e10cSrcweir #include <vector> 46*cdf0e10cSrcweir #include <boost/shared_ptr.hpp> 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir //...................................................................................................................... 49*cdf0e10cSrcweir namespace ucb { namespace ucp { namespace ext 50*cdf0e10cSrcweir { 51*cdf0e10cSrcweir //...................................................................................................................... 52*cdf0e10cSrcweir 53*cdf0e10cSrcweir /** === begin UNO using === **/ 54*cdf0e10cSrcweir using ::com::sun::star::uno::Reference; 55*cdf0e10cSrcweir using ::com::sun::star::uno::XInterface; 56*cdf0e10cSrcweir using ::com::sun::star::uno::UNO_QUERY; 57*cdf0e10cSrcweir using ::com::sun::star::uno::UNO_QUERY_THROW; 58*cdf0e10cSrcweir using ::com::sun::star::uno::UNO_SET_THROW; 59*cdf0e10cSrcweir using ::com::sun::star::uno::Exception; 60*cdf0e10cSrcweir using ::com::sun::star::uno::RuntimeException; 61*cdf0e10cSrcweir using ::com::sun::star::uno::Any; 62*cdf0e10cSrcweir using ::com::sun::star::uno::makeAny; 63*cdf0e10cSrcweir using ::com::sun::star::uno::Sequence; 64*cdf0e10cSrcweir using ::com::sun::star::uno::Type; 65*cdf0e10cSrcweir using ::com::sun::star::ucb::XContent; 66*cdf0e10cSrcweir using ::com::sun::star::ucb::XContentIdentifier; 67*cdf0e10cSrcweir using ::com::sun::star::sdbc::XRow; 68*cdf0e10cSrcweir using ::com::sun::star::lang::XMultiServiceFactory; 69*cdf0e10cSrcweir using ::com::sun::star::ucb::IllegalIdentifierException; 70*cdf0e10cSrcweir using ::com::sun::star::ucb::ResultSetException; 71*cdf0e10cSrcweir using ::com::sun::star::deployment::XPackageInformationProvider; 72*cdf0e10cSrcweir using ::com::sun::star::beans::Property; 73*cdf0e10cSrcweir using ::com::sun::star::sdbc::XResultSet; 74*cdf0e10cSrcweir using ::com::sun::star::sdbc::XRow; 75*cdf0e10cSrcweir using ::com::sun::star::ucb::XCommandEnvironment; 76*cdf0e10cSrcweir /** === end UNO using === **/ 77*cdf0e10cSrcweir //================================================================================================================== 78*cdf0e10cSrcweir //= ResultListEntry 79*cdf0e10cSrcweir //================================================================================================================== 80*cdf0e10cSrcweir struct ResultListEntry 81*cdf0e10cSrcweir { 82*cdf0e10cSrcweir ::rtl::OUString sId; 83*cdf0e10cSrcweir Reference< XContentIdentifier > xId; 84*cdf0e10cSrcweir ::rtl::Reference< Content > pContent; 85*cdf0e10cSrcweir Reference< XRow > xRow; 86*cdf0e10cSrcweir }; 87*cdf0e10cSrcweir 88*cdf0e10cSrcweir typedef ::std::vector< ResultListEntry > ResultList; 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir //================================================================================================================== 91*cdf0e10cSrcweir //= DataSupplier_Impl 92*cdf0e10cSrcweir //================================================================================================================== 93*cdf0e10cSrcweir struct DataSupplier_Impl 94*cdf0e10cSrcweir { 95*cdf0e10cSrcweir ::osl::Mutex m_aMutex; 96*cdf0e10cSrcweir ResultList m_aResults; 97*cdf0e10cSrcweir ::rtl::Reference< Content > m_xContent; 98*cdf0e10cSrcweir Reference< XMultiServiceFactory > m_xSMgr; 99*cdf0e10cSrcweir sal_Int32 m_nOpenMode; 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir DataSupplier_Impl( const Reference< XMultiServiceFactory >& i_rORB, const ::rtl::Reference< Content >& i_rContent, 102*cdf0e10cSrcweir const sal_Int32 i_nOpenMode ) 103*cdf0e10cSrcweir :m_xContent( i_rContent ) 104*cdf0e10cSrcweir ,m_xSMgr( i_rORB ) 105*cdf0e10cSrcweir ,m_nOpenMode( i_nOpenMode ) 106*cdf0e10cSrcweir { 107*cdf0e10cSrcweir } 108*cdf0e10cSrcweir ~DataSupplier_Impl(); 109*cdf0e10cSrcweir }; 110*cdf0e10cSrcweir 111*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 112*cdf0e10cSrcweir DataSupplier_Impl::~DataSupplier_Impl() 113*cdf0e10cSrcweir { 114*cdf0e10cSrcweir } 115*cdf0e10cSrcweir 116*cdf0e10cSrcweir //================================================================================================================== 117*cdf0e10cSrcweir //= helper 118*cdf0e10cSrcweir //================================================================================================================== 119*cdf0e10cSrcweir namespace 120*cdf0e10cSrcweir { 121*cdf0e10cSrcweir ::rtl::OUString lcl_compose( const ::rtl::OUString& i_rBaseURL, const ::rtl::OUString& i_rRelativeURL ) 122*cdf0e10cSrcweir { 123*cdf0e10cSrcweir ENSURE_OR_RETURN( i_rBaseURL.getLength(), "illegal base URL", i_rRelativeURL ); 124*cdf0e10cSrcweir 125*cdf0e10cSrcweir ::rtl::OUStringBuffer aComposer( i_rBaseURL ); 126*cdf0e10cSrcweir if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' ) 127*cdf0e10cSrcweir aComposer.append( sal_Unicode( '/' ) ); 128*cdf0e10cSrcweir aComposer.append( i_rRelativeURL ); 129*cdf0e10cSrcweir return aComposer.makeStringAndClear(); 130*cdf0e10cSrcweir } 131*cdf0e10cSrcweir } 132*cdf0e10cSrcweir 133*cdf0e10cSrcweir 134*cdf0e10cSrcweir //================================================================================================================== 135*cdf0e10cSrcweir //= DataSupplier 136*cdf0e10cSrcweir //================================================================================================================== 137*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 138*cdf0e10cSrcweir DataSupplier::DataSupplier( const Reference< XMultiServiceFactory >& i_rORB, 139*cdf0e10cSrcweir const ::rtl::Reference< Content >& i_rContent, 140*cdf0e10cSrcweir const sal_Int32 i_nOpenMode ) 141*cdf0e10cSrcweir :m_pImpl( new DataSupplier_Impl( i_rORB, i_rContent, i_nOpenMode ) ) 142*cdf0e10cSrcweir { 143*cdf0e10cSrcweir } 144*cdf0e10cSrcweir 145*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 146*cdf0e10cSrcweir void DataSupplier::fetchData() 147*cdf0e10cSrcweir { 148*cdf0e10cSrcweir try 149*cdf0e10cSrcweir { 150*cdf0e10cSrcweir const ::comphelper::ComponentContext aContext( m_pImpl->m_xSMgr ); 151*cdf0e10cSrcweir const Reference< XPackageInformationProvider > xPackageInfo( 152*cdf0e10cSrcweir aContext.getSingleton( "com.sun.star.deployment.PackageInformationProvider" ), UNO_QUERY_THROW ); 153*cdf0e10cSrcweir 154*cdf0e10cSrcweir const ::rtl::OUString sContentIdentifier( m_pImpl->m_xContent->getIdentifier()->getContentIdentifier() ); 155*cdf0e10cSrcweir 156*cdf0e10cSrcweir switch ( m_pImpl->m_xContent->getExtensionContentType() ) 157*cdf0e10cSrcweir { 158*cdf0e10cSrcweir case E_ROOT: 159*cdf0e10cSrcweir { 160*cdf0e10cSrcweir Sequence< Sequence< ::rtl::OUString > > aExtensionInfo( xPackageInfo->getExtensionList() ); 161*cdf0e10cSrcweir for ( const Sequence< ::rtl::OUString >* pExtInfo = aExtensionInfo.getConstArray(); 162*cdf0e10cSrcweir pExtInfo != aExtensionInfo.getConstArray() + aExtensionInfo.getLength(); 163*cdf0e10cSrcweir ++pExtInfo 164*cdf0e10cSrcweir ) 165*cdf0e10cSrcweir { 166*cdf0e10cSrcweir ENSURE_OR_CONTINUE( pExtInfo->getLength() > 0, "illegal extension info" ); 167*cdf0e10cSrcweir 168*cdf0e10cSrcweir const ::rtl::OUString& rLocalId = (*pExtInfo)[0]; 169*cdf0e10cSrcweir ResultListEntry aEntry; 170*cdf0e10cSrcweir aEntry.sId = ContentProvider::getRootURL() + Content::encodeIdentifier( rLocalId ) + ::rtl::OUString( sal_Unicode( '/' ) ); 171*cdf0e10cSrcweir m_pImpl->m_aResults.push_back( aEntry ); 172*cdf0e10cSrcweir } 173*cdf0e10cSrcweir } 174*cdf0e10cSrcweir break; 175*cdf0e10cSrcweir case E_EXTENSION_ROOT: 176*cdf0e10cSrcweir case E_EXTENSION_CONTENT: 177*cdf0e10cSrcweir { 178*cdf0e10cSrcweir const ::rtl::OUString sPackageLocation( m_pImpl->m_xContent->getPhysicalURL() ); 179*cdf0e10cSrcweir ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment() ); 180*cdf0e10cSrcweir 181*cdf0e10cSrcweir // obtain the properties which our result set is set up for from the wrapped content 182*cdf0e10cSrcweir Sequence< ::rtl::OUString > aPropertyNames(1); 183*cdf0e10cSrcweir aPropertyNames[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Title" ) ); 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir const Reference< XResultSet > xFolderContent( aWrappedContent.createCursor( aPropertyNames ), UNO_SET_THROW ); 186*cdf0e10cSrcweir const Reference< XRow > xContentRow( xFolderContent, UNO_QUERY_THROW ); 187*cdf0e10cSrcweir while ( xFolderContent->next() ) 188*cdf0e10cSrcweir { 189*cdf0e10cSrcweir ResultListEntry aEntry; 190*cdf0e10cSrcweir aEntry.sId = lcl_compose( sContentIdentifier, xContentRow->getString( 1 ) ); 191*cdf0e10cSrcweir m_pImpl->m_aResults.push_back( aEntry ); 192*cdf0e10cSrcweir } 193*cdf0e10cSrcweir } 194*cdf0e10cSrcweir break; 195*cdf0e10cSrcweir default: 196*cdf0e10cSrcweir OSL_ENSURE( false, "DataSupplier::fetchData: unimplemented content type!" ); 197*cdf0e10cSrcweir break; 198*cdf0e10cSrcweir } 199*cdf0e10cSrcweir } 200*cdf0e10cSrcweir catch( const Exception& ) 201*cdf0e10cSrcweir { 202*cdf0e10cSrcweir DBG_UNHANDLED_EXCEPTION(); 203*cdf0e10cSrcweir } 204*cdf0e10cSrcweir } 205*cdf0e10cSrcweir 206*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 207*cdf0e10cSrcweir DataSupplier::~DataSupplier() 208*cdf0e10cSrcweir { 209*cdf0e10cSrcweir } 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 212*cdf0e10cSrcweir ::rtl::OUString DataSupplier::queryContentIdentifierString( sal_uInt32 i_nIndex ) 213*cdf0e10cSrcweir { 214*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); 215*cdf0e10cSrcweir 216*cdf0e10cSrcweir if ( i_nIndex < m_pImpl->m_aResults.size() ) 217*cdf0e10cSrcweir { 218*cdf0e10cSrcweir const ::rtl::OUString sId = m_pImpl->m_aResults[ i_nIndex ].sId; 219*cdf0e10cSrcweir if ( sId.getLength() ) 220*cdf0e10cSrcweir return sId; 221*cdf0e10cSrcweir } 222*cdf0e10cSrcweir 223*cdf0e10cSrcweir OSL_ENSURE( false, "DataSupplier::queryContentIdentifierString: illegal index, or illegal result entry id!" ); 224*cdf0e10cSrcweir return ::rtl::OUString(); 225*cdf0e10cSrcweir } 226*cdf0e10cSrcweir 227*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 228*cdf0e10cSrcweir Reference< XContentIdentifier > DataSupplier::queryContentIdentifier( sal_uInt32 i_nIndex ) 229*cdf0e10cSrcweir { 230*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); 231*cdf0e10cSrcweir 232*cdf0e10cSrcweir if ( i_nIndex < m_pImpl->m_aResults.size() ) 233*cdf0e10cSrcweir { 234*cdf0e10cSrcweir Reference< XContentIdentifier > xId( m_pImpl->m_aResults[ i_nIndex ].xId ); 235*cdf0e10cSrcweir if ( xId.is() ) 236*cdf0e10cSrcweir return xId; 237*cdf0e10cSrcweir } 238*cdf0e10cSrcweir 239*cdf0e10cSrcweir ::rtl::OUString sId = queryContentIdentifierString( i_nIndex ); 240*cdf0e10cSrcweir if ( sId.getLength() ) 241*cdf0e10cSrcweir { 242*cdf0e10cSrcweir Reference< XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( sId ); 243*cdf0e10cSrcweir m_pImpl->m_aResults[ i_nIndex ].xId = xId; 244*cdf0e10cSrcweir return xId; 245*cdf0e10cSrcweir } 246*cdf0e10cSrcweir 247*cdf0e10cSrcweir return Reference< XContentIdentifier >(); 248*cdf0e10cSrcweir } 249*cdf0e10cSrcweir 250*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 251*cdf0e10cSrcweir Reference< XContent > DataSupplier::queryContent( sal_uInt32 i_nIndex ) 252*cdf0e10cSrcweir { 253*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); 254*cdf0e10cSrcweir ENSURE_OR_RETURN( i_nIndex < m_pImpl->m_aResults.size(), "illegal index!", NULL ); 255*cdf0e10cSrcweir 256*cdf0e10cSrcweir 257*cdf0e10cSrcweir ::rtl::Reference< Content > pContent( m_pImpl->m_aResults[ i_nIndex ].pContent ); 258*cdf0e10cSrcweir if ( pContent.is() ) 259*cdf0e10cSrcweir return pContent.get(); 260*cdf0e10cSrcweir 261*cdf0e10cSrcweir Reference< XContentIdentifier > xId( queryContentIdentifier( i_nIndex ) ); 262*cdf0e10cSrcweir if ( xId.is() ) 263*cdf0e10cSrcweir { 264*cdf0e10cSrcweir try 265*cdf0e10cSrcweir { 266*cdf0e10cSrcweir Reference< XContent > xContent( m_pImpl->m_xContent->getProvider()->queryContent( xId ) ); 267*cdf0e10cSrcweir pContent.set( dynamic_cast< Content* >( xContent.get() ) ); 268*cdf0e10cSrcweir OSL_ENSURE( pContent.is() || !xContent.is(), "DataSupplier::queryContent: invalid content implementation!" ); 269*cdf0e10cSrcweir m_pImpl->m_aResults[ i_nIndex ].pContent = pContent; 270*cdf0e10cSrcweir return pContent.get(); 271*cdf0e10cSrcweir 272*cdf0e10cSrcweir } 273*cdf0e10cSrcweir catch ( const IllegalIdentifierException& ) 274*cdf0e10cSrcweir { 275*cdf0e10cSrcweir DBG_UNHANDLED_EXCEPTION(); 276*cdf0e10cSrcweir } 277*cdf0e10cSrcweir } 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir return Reference< XContent >(); 280*cdf0e10cSrcweir } 281*cdf0e10cSrcweir 282*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 283*cdf0e10cSrcweir sal_Bool DataSupplier::getResult( sal_uInt32 i_nIndex ) 284*cdf0e10cSrcweir { 285*cdf0e10cSrcweir ::osl::ClearableGuard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir if ( m_pImpl->m_aResults.size() > i_nIndex ) 288*cdf0e10cSrcweir // result already present. 289*cdf0e10cSrcweir return sal_True; 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir return sal_False; 292*cdf0e10cSrcweir } 293*cdf0e10cSrcweir 294*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 295*cdf0e10cSrcweir sal_uInt32 DataSupplier::totalCount() 296*cdf0e10cSrcweir { 297*cdf0e10cSrcweir ::osl::ClearableGuard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); 298*cdf0e10cSrcweir return m_pImpl->m_aResults.size(); 299*cdf0e10cSrcweir } 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 302*cdf0e10cSrcweir sal_uInt32 DataSupplier::currentCount() 303*cdf0e10cSrcweir { 304*cdf0e10cSrcweir return m_pImpl->m_aResults.size(); 305*cdf0e10cSrcweir } 306*cdf0e10cSrcweir 307*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 308*cdf0e10cSrcweir sal_Bool DataSupplier::isCountFinal() 309*cdf0e10cSrcweir { 310*cdf0e10cSrcweir return sal_True; 311*cdf0e10cSrcweir } 312*cdf0e10cSrcweir 313*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 314*cdf0e10cSrcweir Reference< XRow > DataSupplier::queryPropertyValues( sal_uInt32 i_nIndex ) 315*cdf0e10cSrcweir { 316*cdf0e10cSrcweir ::osl::MutexGuard aGuard( m_pImpl->m_aMutex ); 317*cdf0e10cSrcweir ENSURE_OR_RETURN( i_nIndex < m_pImpl->m_aResults.size(), "DataSupplier::queryPropertyValues: illegal index!", NULL ); 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir Reference< XRow > xRow = m_pImpl->m_aResults[ i_nIndex ].xRow; 320*cdf0e10cSrcweir if ( xRow.is() ) 321*cdf0e10cSrcweir return xRow; 322*cdf0e10cSrcweir 323*cdf0e10cSrcweir ENSURE_OR_RETURN( queryContent( i_nIndex ).is(), "could not retrieve the content", NULL ); 324*cdf0e10cSrcweir 325*cdf0e10cSrcweir switch ( m_pImpl->m_xContent->getExtensionContentType() ) 326*cdf0e10cSrcweir { 327*cdf0e10cSrcweir case E_ROOT: 328*cdf0e10cSrcweir { 329*cdf0e10cSrcweir const ::rtl::OUString& rId( m_pImpl->m_aResults[ i_nIndex ].sId ); 330*cdf0e10cSrcweir const ::rtl::OUString sRootURL( ContentProvider::getRootURL() ); 331*cdf0e10cSrcweir ::rtl::OUString sTitle = Content::decodeIdentifier( rId.copy( sRootURL.getLength() ) ); 332*cdf0e10cSrcweir if ( ( sTitle.getLength() > 0 ) && ( sTitle[ sTitle.getLength() - 1 ] == '/' ) ) 333*cdf0e10cSrcweir sTitle = sTitle.copy( 0, sTitle.getLength() - 1 ); 334*cdf0e10cSrcweir xRow = Content::getArtificialNodePropertyValues( m_pImpl->m_xSMgr, getResultSet()->getProperties(), sTitle ); 335*cdf0e10cSrcweir } 336*cdf0e10cSrcweir break; 337*cdf0e10cSrcweir 338*cdf0e10cSrcweir case E_EXTENSION_ROOT: 339*cdf0e10cSrcweir case E_EXTENSION_CONTENT: 340*cdf0e10cSrcweir { 341*cdf0e10cSrcweir xRow = m_pImpl->m_aResults[ i_nIndex ].pContent->getPropertyValues( 342*cdf0e10cSrcweir getResultSet()->getProperties(), getResultSet()->getEnvironment() ); 343*cdf0e10cSrcweir } 344*cdf0e10cSrcweir break; 345*cdf0e10cSrcweir default: 346*cdf0e10cSrcweir OSL_ENSURE( false, "DataSupplier::queryPropertyValues: unhandled case!" ); 347*cdf0e10cSrcweir break; 348*cdf0e10cSrcweir } 349*cdf0e10cSrcweir 350*cdf0e10cSrcweir m_pImpl->m_aResults[ i_nIndex ].xRow = xRow; 351*cdf0e10cSrcweir return xRow; 352*cdf0e10cSrcweir } 353*cdf0e10cSrcweir 354*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 355*cdf0e10cSrcweir void DataSupplier::releasePropertyValues( sal_uInt32 i_nIndex ) 356*cdf0e10cSrcweir { 357*cdf0e10cSrcweir ::osl::Guard< ::osl::Mutex > aGuard( m_pImpl->m_aMutex ); 358*cdf0e10cSrcweir 359*cdf0e10cSrcweir if ( i_nIndex < m_pImpl->m_aResults.size() ) 360*cdf0e10cSrcweir m_pImpl->m_aResults[ i_nIndex ].xRow.clear(); 361*cdf0e10cSrcweir } 362*cdf0e10cSrcweir 363*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 364*cdf0e10cSrcweir void DataSupplier::close() 365*cdf0e10cSrcweir { 366*cdf0e10cSrcweir } 367*cdf0e10cSrcweir 368*cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ 369*cdf0e10cSrcweir void DataSupplier::validate() throw( ResultSetException ) 370*cdf0e10cSrcweir { 371*cdf0e10cSrcweir } 372*cdf0e10cSrcweir 373*cdf0e10cSrcweir //...................................................................................................................... 374*cdf0e10cSrcweir } } } // namespace ucp::ext 375*cdf0e10cSrcweir //...................................................................................................................... 376