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 : :
37 : : #include "resultsetbase.hxx"
38 : :
39 : : using namespace chelp;
40 : : using namespace com::sun::star;
41 : :
42 : 12 : ResultSetBase::ResultSetBase( 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 [ + - ][ + - ]: 12 : m_pIsFinalListeners( 0 )
[ + - ][ + - ]
[ + - ][ + - ]
58 : : {
59 : 12 : }
60 : :
61 [ + - ][ + - ]: 12 : ResultSetBase::~ResultSetBase()
[ + - ]
62 : : {
63 [ - + ][ # # ]: 12 : delete m_pIsFinalListeners;
64 [ - + ][ # # ]: 12 : delete m_pRowCountListeners;
65 [ - + ][ # # ]: 12 : delete m_pDisposeEventListeners;
66 [ - + ]: 12 : }
67 : :
68 : :
69 : : // XInterface
70 : :
71 : : void SAL_CALL
72 : 96 : ResultSetBase::acquire(
73 : : void )
74 : : throw()
75 : : {
76 : 96 : OWeakObject::acquire();
77 : 96 : }
78 : :
79 : :
80 : : void SAL_CALL
81 : 96 : ResultSetBase::release(
82 : : void )
83 : : throw()
84 : : {
85 : 96 : OWeakObject::release();
86 : 96 : }
87 : :
88 : :
89 : :
90 : : uno::Any SAL_CALL
91 : 24 : ResultSetBase::queryInterface(
92 : : const uno::Type& rType )
93 : : throw( uno::RuntimeException )
94 : : {
95 : : uno::Any aRet = cppu::queryInterface( rType,
96 : : (static_cast< lang::XComponent* >(this)),
97 : : (static_cast< sdbc::XRow* >(this)),
98 : : (static_cast< sdbc::XResultSet* >(this)),
99 : : (static_cast< sdbc::XResultSetMetaDataSupplier* >(this)),
100 : : (static_cast< beans::XPropertySet* >(this)),
101 [ + - ]: 24 : (static_cast< ucb::XContentAccess* >(this)) );
102 [ + - ][ # # ]: 24 : return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
103 : : }
104 : :
105 : :
106 : :
107 : : // XComponent
108 : :
109 : :
110 : : void SAL_CALL
111 : 0 : ResultSetBase::addEventListener(
112 : : const uno::Reference< lang::XEventListener >& Listener )
113 : : throw( uno::RuntimeException )
114 : : {
115 [ # # ]: 0 : osl::MutexGuard aGuard( m_aMutex );
116 : :
117 [ # # ]: 0 : if ( ! m_pDisposeEventListeners )
118 : : m_pDisposeEventListeners =
119 [ # # ]: 0 : new cppu::OInterfaceContainerHelper( m_aMutex );
120 : :
121 [ # # ][ # # ]: 0 : m_pDisposeEventListeners->addInterface( Listener );
122 : 0 : }
123 : :
124 : :
125 : : void SAL_CALL
126 : 0 : ResultSetBase::removeEventListener(
127 : : const uno::Reference< lang::XEventListener >& Listener )
128 : : throw( uno::RuntimeException )
129 : : {
130 [ # # ]: 0 : osl::MutexGuard aGuard( m_aMutex );
131 : :
132 [ # # ]: 0 : if ( m_pDisposeEventListeners )
133 [ # # ][ # # ]: 0 : m_pDisposeEventListeners->removeInterface( Listener );
134 : 0 : }
135 : :
136 : :
137 : :
138 : : void SAL_CALL
139 : 0 : ResultSetBase::dispose()
140 : : throw( uno::RuntimeException )
141 : : {
142 [ # # ]: 0 : osl::MutexGuard aGuard( m_aMutex );
143 : :
144 [ # # ]: 0 : lang::EventObject aEvt;
145 [ # # ]: 0 : aEvt.Source = static_cast< lang::XComponent * >( this );
146 : :
147 [ # # ][ # # ]: 0 : if ( m_pDisposeEventListeners && m_pDisposeEventListeners->getLength() )
[ # # ][ # # ]
148 : : {
149 [ # # ]: 0 : m_pDisposeEventListeners->disposeAndClear( aEvt );
150 : : }
151 [ # # ][ # # ]: 0 : if( m_pRowCountListeners && m_pRowCountListeners->getLength() )
[ # # ][ # # ]
152 : : {
153 [ # # ]: 0 : m_pRowCountListeners->disposeAndClear( aEvt );
154 : : }
155 [ # # ][ # # ]: 0 : if( m_pIsFinalListeners && m_pIsFinalListeners->getLength() )
[ # # ][ # # ]
156 : : {
157 [ # # ]: 0 : m_pIsFinalListeners->disposeAndClear( aEvt );
158 [ # # ][ # # ]: 0 : }
159 : 0 : }
160 : :
161 : :
162 : :
163 : : // XResultSet
164 : :
165 : : sal_Bool SAL_CALL
166 : 12 : ResultSetBase::next(
167 : : void )
168 : : throw( sdbc::SQLException,
169 : : uno::RuntimeException )
170 : : {
171 : : sal_Bool test;
172 : 12 : m_nRow++;
173 [ - + ]: 12 : if( sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
174 : 0 : test = true;
175 : : else
176 : 12 : test = false;
177 : 12 : 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 sal::static_int_cast<sal_uInt32>( m_nRow ) >= 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( sal::static_int_cast<sal_uInt32>( m_nRow ) == 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 || sal::static_int_cast<sal_uInt32>( m_nRow ) >= 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 && sal::static_int_cast<sal_uInt32>( m_nRow ) < 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 && sal::static_int_cast<sal_uInt32>( m_nRow ) < 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( sal::static_int_cast<sal_uInt32>( m_nRow ) > 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 && sal::static_int_cast<sal_uInt32>( m_nRow ) < 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 && sal::static_int_cast<sal_uInt32>( m_nRow ) < 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 : : throw( uno::RuntimeException )
409 : : {
410 [ # # ][ # # ]: 0 : if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
[ # # ]
411 : : {
412 [ # # ]: 0 : rtl::OUString url = queryContentIdentifierString();
413 [ # # ][ # # ]: 0 : if( ! m_aIdents[m_nRow].is() && !url.isEmpty() )
[ # # ]
414 : 0 : m_aIdents[m_nRow] = uno::Reference< ucb::XContentIdentifier >(
415 [ # # ][ # # ]: 0 : new ::ucbhelper::ContentIdentifier( m_xMSF,url ) );
[ # # # # ]
416 : 0 : return m_aIdents[m_nRow];
417 : : }
418 : :
419 : 0 : return uno::Reference< ucb::XContentIdentifier >();
420 : : }
421 : :
422 : :
423 : : uno::Reference< ucb::XContent > SAL_CALL
424 : 0 : ResultSetBase::queryContent(
425 : : void )
426 : : throw( uno::RuntimeException )
427 : : {
428 [ # # ][ # # ]: 0 : if( 0 <= m_nRow && sal::static_int_cast<sal_uInt32>( m_nRow ) < m_aItems.size() )
[ # # ]
429 [ # # ]: 0 : return m_xProvider->queryContent( queryContentIdentifier() );
430 : : else
431 : 0 : return uno::Reference< ucb::XContent >();
432 : : }
433 : :
434 : :
435 : :
436 [ # # ][ # # ]: 0 : class XPropertySetInfoImpl
437 : : : public cppu::OWeakObject,
438 : : public beans::XPropertySetInfo
439 : : {
440 : : public:
441 : :
442 : 0 : XPropertySetInfoImpl( const uno::Sequence< beans::Property >& aSeq )
443 [ # # ]: 0 : : m_aSeq( aSeq )
444 : : {
445 : 0 : }
446 : :
447 : 0 : void SAL_CALL acquire( void )
448 : : throw()
449 : : {
450 : 0 : OWeakObject::acquire();
451 : 0 : }
452 : :
453 : :
454 : 0 : void SAL_CALL release( void )
455 : : throw()
456 : : {
457 : 0 : OWeakObject::release();
458 : 0 : }
459 : :
460 : 0 : uno::Any SAL_CALL queryInterface( const uno::Type& rType )
461 : : throw( uno::RuntimeException )
462 : : {
463 : : uno::Any aRet = cppu::queryInterface( rType,
464 [ # # ]: 0 : (static_cast< beans::XPropertySetInfo* >(this)) );
465 [ # # ][ # # ]: 0 : return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
466 : : }
467 : :
468 : 0 : uno::Sequence< beans::Property > SAL_CALL getProperties()
469 : : throw( uno::RuntimeException )
470 : : {
471 : 0 : return m_aSeq;
472 : : }
473 : :
474 : 0 : beans::Property SAL_CALL getPropertyByName( const ::rtl::OUString& aName )
475 : : throw( beans::UnknownPropertyException,
476 : : uno::RuntimeException)
477 : : {
478 [ # # ]: 0 : for( int i = 0; i < m_aSeq.getLength(); ++i )
479 [ # # ]: 0 : if( aName == m_aSeq[i].Name )
480 : 0 : return m_aSeq[i];
481 [ # # ]: 0 : throw beans::UnknownPropertyException();
482 : : }
483 : :
484 : 0 : sal_Bool SAL_CALL hasPropertyByName( const ::rtl::OUString& Name )
485 : : throw( uno::RuntimeException )
486 : : {
487 [ # # ]: 0 : for( int i = 0; i < m_aSeq.getLength(); ++i )
488 [ # # ]: 0 : if( Name == m_aSeq[i].Name )
489 : 0 : return true;
490 : 0 : return false;
491 : : }
492 : :
493 : : private:
494 : :
495 : : uno::Sequence< beans::Property > m_aSeq;
496 : : };
497 : :
498 : :
499 : :
500 : : // XPropertySet
501 : : uno::Reference< beans::XPropertySetInfo > SAL_CALL
502 : 0 : ResultSetBase::getPropertySetInfo()
503 : : throw( uno::RuntimeException)
504 : : {
505 [ # # ]: 0 : uno::Sequence< beans::Property > seq(2);
506 [ # # ]: 0 : seq[0].Name = rtl::OUString( "RowCount" );
507 [ # # ]: 0 : seq[0].Handle = -1;
508 [ # # ][ # # ]: 0 : seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) );
509 [ # # ]: 0 : seq[0].Attributes = beans::PropertyAttribute::READONLY;
510 : :
511 [ # # ]: 0 : seq[1].Name = rtl::OUString( "IsRowCountFinal" );
512 [ # # ]: 0 : seq[1].Handle = -1;
513 [ # # ][ # # ]: 0 : seq[1].Type = getCppuType( static_cast< sal_Bool* >(0) );
514 [ # # ]: 0 : seq[1].Attributes = beans::PropertyAttribute::READONLY;
515 : :
516 : : //t
517 [ # # ][ # # ]: 0 : return uno::Reference< beans::XPropertySetInfo > ( new XPropertySetInfoImpl( seq ) );
[ # # ][ # # ]
518 : : }
519 : :
520 : :
521 : :
522 : 0 : void SAL_CALL ResultSetBase::setPropertyValue(
523 : : const rtl::OUString& aPropertyName, const uno::Any& aValue )
524 : : throw( beans::UnknownPropertyException,
525 : : beans::PropertyVetoException,
526 : : lang::IllegalArgumentException,
527 : : lang::WrappedTargetException,
528 : : uno::RuntimeException)
529 : : {
530 : : (void)aValue;
531 : :
532 [ # # # # ]: 0 : if( aPropertyName == rtl::OUString( "IsRowCountFinal" ) ||
[ # # ][ # # ]
[ # # ]
533 [ # # ][ # # ]: 0 : aPropertyName == rtl::OUString( "RowCount" ) )
534 : 0 : return;
535 : :
536 [ # # ]: 0 : throw beans::UnknownPropertyException();
537 : : }
538 : :
539 : :
540 : 0 : uno::Any SAL_CALL ResultSetBase::getPropertyValue(
541 : : const rtl::OUString& PropertyName )
542 : : throw( beans::UnknownPropertyException,
543 : : lang::WrappedTargetException,
544 : : uno::RuntimeException)
545 : : {
546 [ # # ]: 0 : if( PropertyName == rtl::OUString( "IsRowCountFinal" ) )
547 : : {
548 : 0 : uno::Any aAny;
549 [ # # ]: 0 : aAny <<= m_bRowCountFinal;
550 : 0 : return aAny;
551 : : }
552 [ # # ]: 0 : else if ( PropertyName == rtl::OUString( "RowCount" ) )
553 : : {
554 : 0 : uno::Any aAny;
555 : 0 : sal_Int32 count = m_aItems.size();
556 [ # # ]: 0 : aAny <<= count;
557 : 0 : return aAny;
558 : : }
559 : : else
560 [ # # ]: 0 : throw beans::UnknownPropertyException();
561 : : }
562 : :
563 : :
564 : 0 : void SAL_CALL ResultSetBase::addPropertyChangeListener(
565 : : const rtl::OUString& aPropertyName,
566 : : const uno::Reference< beans::XPropertyChangeListener >& xListener )
567 : : throw( beans::UnknownPropertyException,
568 : : lang::WrappedTargetException,
569 : : uno::RuntimeException)
570 : : {
571 [ # # ]: 0 : if( aPropertyName == rtl::OUString( "IsRowCountFinal" ) )
572 : : {
573 [ # # ]: 0 : osl::MutexGuard aGuard( m_aMutex );
574 [ # # ]: 0 : if ( ! m_pIsFinalListeners )
575 : : m_pIsFinalListeners =
576 [ # # ]: 0 : new cppu::OInterfaceContainerHelper( m_aMutex );
577 : :
578 [ # # ][ # # ]: 0 : m_pIsFinalListeners->addInterface( xListener );
579 : : }
580 [ # # ]: 0 : else if ( aPropertyName == rtl::OUString( "RowCount" ) )
581 : : {
582 [ # # ]: 0 : osl::MutexGuard aGuard( m_aMutex );
583 [ # # ]: 0 : if ( ! m_pRowCountListeners )
584 : : m_pRowCountListeners =
585 [ # # ]: 0 : new cppu::OInterfaceContainerHelper( m_aMutex );
586 [ # # ][ # # ]: 0 : m_pRowCountListeners->addInterface( xListener );
587 : : }
588 : : else
589 [ # # ]: 0 : throw beans::UnknownPropertyException();
590 : 0 : }
591 : :
592 : :
593 : 0 : void SAL_CALL ResultSetBase::removePropertyChangeListener(
594 : : const rtl::OUString& aPropertyName,
595 : : const uno::Reference< beans::XPropertyChangeListener >& aListener )
596 : : throw( beans::UnknownPropertyException,
597 : : lang::WrappedTargetException,
598 : : uno::RuntimeException)
599 : : {
600 [ # # ][ # # ]: 0 : if( aPropertyName == rtl::OUString( "IsRowCountFinal" ) &&
[ # # ][ # # ]
[ # # ]
601 : : m_pIsFinalListeners )
602 : : {
603 [ # # ]: 0 : osl::MutexGuard aGuard( m_aMutex );
604 [ # # ][ # # ]: 0 : m_pIsFinalListeners->removeInterface( aListener );
605 : : }
606 [ # # ][ # # ]: 0 : else if ( aPropertyName == rtl::OUString( "RowCount" ) &&
[ # # ][ # # ]
[ # # ]
607 : : m_pRowCountListeners )
608 : : {
609 [ # # ]: 0 : osl::MutexGuard aGuard( m_aMutex );
610 [ # # ][ # # ]: 0 : m_pRowCountListeners->removeInterface( aListener );
611 : : }
612 : : else
613 [ # # ]: 0 : throw beans::UnknownPropertyException();
614 : 0 : }
615 : :
616 : :
617 : 0 : void SAL_CALL ResultSetBase::addVetoableChangeListener(
618 : : const rtl::OUString& PropertyName,
619 : : const uno::Reference< beans::XVetoableChangeListener >& aListener )
620 : : throw( beans::UnknownPropertyException,
621 : : lang::WrappedTargetException,
622 : : uno::RuntimeException)
623 : : {
624 : : (void)PropertyName;
625 : : (void)aListener;
626 : 0 : }
627 : :
628 : :
629 : 0 : void SAL_CALL ResultSetBase::removeVetoableChangeListener(
630 : : const rtl::OUString& PropertyName,
631 : : const uno::Reference< beans::XVetoableChangeListener >& aListener )
632 : : throw( beans::UnknownPropertyException,
633 : : lang::WrappedTargetException,
634 : : uno::RuntimeException)
635 : : {
636 : : (void)PropertyName;
637 : : (void)aListener;
638 : 0 : }
639 : :
640 : :
641 : :
642 : : // XResultSetMetaDataSupplier
643 : : uno::Reference< sdbc::XResultSetMetaData > SAL_CALL
644 : 0 : ResultSetBase::getMetaData(
645 : : void )
646 : : throw( sdbc::SQLException,
647 : : uno::RuntimeException )
648 : : {
649 : : ::ucbhelper::ResultSetMetaData* p =
650 : : new ::ucbhelper::ResultSetMetaData(
651 [ # # ]: 0 : m_xMSF, m_sProperty );
652 [ # # ]: 0 : return uno::Reference< sdbc::XResultSetMetaData >( p );
653 : : }
654 : :
655 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|