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 : :
30 : : /**************************************************************************
31 : : TODO
32 : : **************************************************************************
33 : :
34 : : *************************************************************************/
35 : : #include <com/sun/star/beans/PropertyAttribute.hpp>
36 : : #include <com/sun/star/beans/XPropertyAccess.hpp>
37 : : #include <com/sun/star/sdbc/XRow.hpp>
38 : : #include <com/sun/star/ucb/OpenCommandArgument2.hpp>
39 : : #include <com/sun/star/ucb/OpenMode.hpp>
40 : : #include <com/sun/star/ucb/XCommandInfo.hpp>
41 : : #include <com/sun/star/io/XActiveDataSink.hpp>
42 : : #include <com/sun/star/io/XOutputStream.hpp>
43 : : #include <com/sun/star/lang/IllegalAccessException.hpp>
44 : : #include <com/sun/star/ucb/UnsupportedDataSinkException.hpp>
45 : : #include <com/sun/star/io/XActiveDataStreamer.hpp>
46 : : #include <com/sun/star/ucb/XPersistentPropertySet.hpp>
47 : : #include <osl/diagnose.h>
48 : : #include <ucbhelper/contentidentifier.hxx>
49 : : #include <ucbhelper/propertyvalueset.hxx>
50 : : #include <ucbhelper/cancelcommandexecution.hxx>
51 : : #include "content.hxx"
52 : : #include "provider.hxx"
53 : : #include "resultset.hxx"
54 : : #include "databases.hxx"
55 : : #include "resultsetfactory.hxx"
56 : : #include "resultsetbase.hxx"
57 : : #include "resultsetforroot.hxx"
58 : : #include "resultsetforquery.hxx"
59 : :
60 : : using namespace com::sun::star;
61 : : using namespace chelp;
62 : :
63 : : //=========================================================================
64 : : //=========================================================================
65 : : //
66 : : // Content Implementation.
67 : : //
68 : : //=========================================================================
69 : : //=========================================================================
70 : :
71 : 593 : Content::Content( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
72 : : ::ucbhelper::ContentProviderImplHelper* pProvider,
73 : : const uno::Reference< ucb::XContentIdentifier >&
74 : : Identifier,
75 : : Databases* pDatabases )
76 : : : ContentImplHelper( rxSMgr, pProvider, Identifier ),
77 [ + - ]: 593 : m_aURLParameter( Identifier->getContentIdentifier(),pDatabases ),
78 [ + - ][ + - ]: 1186 : m_pDatabases( pDatabases ) // not owner
[ + + ]
79 : : {
80 : 590 : }
81 : :
82 : : //=========================================================================
83 : : // virtual
84 : 590 : Content::~Content()
85 : : {
86 [ - + ]: 1180 : }
87 : :
88 : : //=========================================================================
89 : : //
90 : : // XInterface methods.
91 : : //
92 : : //=========================================================================
93 : :
94 : : // virtual
95 : 6888 : void SAL_CALL Content::acquire()
96 : : throw( )
97 : : {
98 : 6888 : ContentImplHelper::acquire();
99 : 6888 : }
100 : :
101 : : //=========================================================================
102 : : // virtual
103 : 6888 : void SAL_CALL Content::release()
104 : : throw( )
105 : : {
106 : 6888 : ContentImplHelper::release();
107 : 6888 : }
108 : :
109 : : //=========================================================================
110 : : // virtual
111 : 1180 : uno::Any SAL_CALL Content::queryInterface( const uno::Type & rType )
112 : : throw ( uno::RuntimeException )
113 : : {
114 : 1180 : uno::Any aRet;
115 [ + - ][ - + ]: 1180 : return aRet.hasValue() ? aRet : ContentImplHelper::queryInterface( rType );
116 : : }
117 : :
118 : : //=========================================================================
119 : : //
120 : : // XTypeProvider methods.
121 : : //
122 : : //=========================================================================
123 : :
124 [ # # ][ # # ]: 0 : XTYPEPROVIDER_COMMON_IMPL( Content );
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ]
125 : :
126 : : //=========================================================================
127 : : // virtual
128 : 0 : uno::Sequence< uno::Type > SAL_CALL Content::getTypes()
129 : : throw( uno::RuntimeException )
130 : : {
131 : : static cppu::OTypeCollection* pCollection = NULL;
132 : :
133 [ # # ]: 0 : if ( !pCollection )
134 : : {
135 [ # # ][ # # ]: 0 : osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
136 [ # # ]: 0 : if ( !pCollection )
137 : : {
138 : : static cppu::OTypeCollection aCollection(
139 [ # # ]: 0 : CPPU_TYPE_REF( lang::XTypeProvider ),
140 [ # # ]: 0 : CPPU_TYPE_REF( lang::XServiceInfo ),
141 [ # # ]: 0 : CPPU_TYPE_REF( lang::XComponent ),
142 [ # # ]: 0 : CPPU_TYPE_REF( ucb::XContent ),
143 [ # # ]: 0 : CPPU_TYPE_REF( ucb::XCommandProcessor ),
144 [ # # ]: 0 : CPPU_TYPE_REF( beans::XPropertiesChangeNotifier ),
145 [ # # ]: 0 : CPPU_TYPE_REF( ucb::XCommandInfoChangeNotifier ),
146 [ # # ]: 0 : CPPU_TYPE_REF( beans::XPropertyContainer ),
147 [ # # ]: 0 : CPPU_TYPE_REF( beans::XPropertySetInfoChangeNotifier ),
148 [ # # ][ # # ]: 0 : CPPU_TYPE_REF( container::XChild ) );
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ]
149 : 0 : pCollection = &aCollection;
150 [ # # ]: 0 : }
151 : : }
152 : :
153 : 0 : return (*pCollection).getTypes();
154 : : }
155 : :
156 : : //=========================================================================
157 : : //
158 : : // XServiceInfo methods.
159 : : //
160 : : //=========================================================================
161 : :
162 : : // virtual
163 : 0 : rtl::OUString SAL_CALL Content::getImplementationName()
164 : : throw( uno::RuntimeException )
165 : : {
166 : 0 : return rtl::OUString( "CHelpContent" );
167 : : }
168 : :
169 : : //=========================================================================
170 : : // virtual
171 : 0 : uno::Sequence< rtl::OUString > SAL_CALL Content::getSupportedServiceNames()
172 : : throw( uno::RuntimeException )
173 : : {
174 : 0 : uno::Sequence< rtl::OUString > aSNS( 1 );
175 : : aSNS.getArray()[ 0 ]
176 [ # # ]: 0 : = rtl::OUString( MYUCP_CONTENT_SERVICE_NAME );
177 : 0 : return aSNS;
178 : : }
179 : :
180 : : //=========================================================================
181 : : //
182 : : // XContent methods.
183 : : //
184 : : //=========================================================================
185 : :
186 : : // virtual
187 : 0 : rtl::OUString SAL_CALL Content::getContentType()
188 : : throw( uno::RuntimeException )
189 : : {
190 : 0 : return rtl::OUString( MYUCP_CONTENT_TYPE );
191 : : }
192 : :
193 : : //=========================================================================
194 : : //
195 : : // XCommandProcessor methods.
196 : : //
197 : : //=========================================================================
198 : :
199 : : //virtual
200 : 0 : void SAL_CALL Content::abort( sal_Int32 /*CommandId*/ )
201 : : throw( uno::RuntimeException )
202 : : {
203 : 0 : }
204 : :
205 : :
206 : :
207 [ + - ][ + - ]: 24 : class ResultSetForRootFactory
[ - + ]
208 : : : public ResultSetFactory
209 : : {
210 : : private:
211 : :
212 : : uno::Reference< lang::XMultiServiceFactory > m_xSMgr;
213 : : uno::Reference< ucb::XContentProvider > m_xProvider;
214 : : sal_Int32 m_nOpenMode;
215 : : uno::Sequence< beans::Property > m_seq;
216 : : uno::Sequence< ucb::NumberedSortingInfo > m_seqSort;
217 : : URLParameter m_aURLParameter;
218 : : Databases* m_pDatabases;
219 : :
220 : :
221 : : public:
222 : :
223 : 12 : ResultSetForRootFactory(
224 : : const uno::Reference< lang::XMultiServiceFactory >& xSMgr,
225 : : const uno::Reference< ucb::XContentProvider >& xProvider,
226 : : sal_Int32 nOpenMode,
227 : : const uno::Sequence< beans::Property >& seq,
228 : : const uno::Sequence< ucb::NumberedSortingInfo >& seqSort,
229 : : URLParameter aURLParameter,
230 : : Databases* pDatabases )
231 : : : m_xSMgr( xSMgr ),
232 : : m_xProvider( xProvider ),
233 : : m_nOpenMode( nOpenMode ),
234 : : m_seq( seq ),
235 : : m_seqSort( seqSort ),
236 : : m_aURLParameter( aURLParameter ),
237 [ + - ][ + - ]: 12 : m_pDatabases( pDatabases )
238 : : {
239 : 12 : }
240 : :
241 : 12 : ResultSetBase* createResultSet()
242 : : {
243 : : return new ResultSetForRoot( m_xSMgr,
244 : : m_xProvider,
245 : : m_nOpenMode,
246 : : m_seq,
247 : : m_seqSort,
248 : : m_aURLParameter,
249 [ + - ]: 12 : m_pDatabases );
250 : : }
251 : : };
252 : :
253 : :
254 : :
255 [ # # ][ # # ]: 0 : class ResultSetForQueryFactory
[ # # ]
256 : : : public ResultSetFactory
257 : : {
258 : : private:
259 : :
260 : : uno::Reference< lang::XMultiServiceFactory > m_xSMgr;
261 : : uno::Reference< ucb::XContentProvider > m_xProvider;
262 : : sal_Int32 m_nOpenMode;
263 : : uno::Sequence< beans::Property > m_seq;
264 : : uno::Sequence< ucb::NumberedSortingInfo > m_seqSort;
265 : : URLParameter m_aURLParameter;
266 : : Databases* m_pDatabases;
267 : :
268 : :
269 : : public:
270 : :
271 : 0 : ResultSetForQueryFactory(
272 : : const uno::Reference< lang::XMultiServiceFactory >& xSMgr,
273 : : const uno::Reference< ucb::XContentProvider >& xProvider,
274 : : sal_Int32 nOpenMode,
275 : : const uno::Sequence< beans::Property >& seq,
276 : : const uno::Sequence< ucb::NumberedSortingInfo >& seqSort,
277 : : URLParameter aURLParameter,
278 : : Databases* pDatabases )
279 : : : m_xSMgr( xSMgr ),
280 : : m_xProvider( xProvider ),
281 : : m_nOpenMode( nOpenMode ),
282 : : m_seq( seq ),
283 : : m_seqSort( seqSort ),
284 : : m_aURLParameter( aURLParameter ),
285 [ # # ][ # # ]: 0 : m_pDatabases( pDatabases )
286 : : {
287 : 0 : }
288 : :
289 : 0 : ResultSetBase* createResultSet()
290 : : {
291 : : return new ResultSetForQuery( m_xSMgr,
292 : : m_xProvider,
293 : : m_nOpenMode,
294 : : m_seq,
295 : : m_seqSort,
296 : : m_aURLParameter,
297 [ # # ]: 0 : m_pDatabases );
298 : : }
299 : : };
300 : :
301 : :
302 : :
303 : : // virtual
304 : 974 : uno::Any SAL_CALL Content::execute(
305 : : const ucb::Command& aCommand,
306 : : sal_Int32 CommandId,
307 : : const uno::Reference< ucb::XCommandEnvironment >& Environment )
308 : : throw( uno::Exception,
309 : : ucb::CommandAbortedException,
310 : : uno::RuntimeException )
311 : : {
312 : 974 : uno::Any aRet;
313 : :
314 [ + + ]: 974 : if ( aCommand.Name == "getPropertyValues" )
315 : : {
316 [ + - ]: 576 : uno::Sequence< beans::Property > Properties;
317 [ + - ][ - + ]: 576 : if ( !( aCommand.Argument >>= Properties ) )
318 : : {
319 [ # # ][ # # ]: 0 : aRet <<= lang::IllegalArgumentException();
[ # # ]
320 [ # # ]: 0 : ucbhelper::cancelCommandExecution(aRet,Environment);
321 : : }
322 : :
323 [ + - ][ + - ]: 576 : aRet <<= getPropertyValues( Properties );
[ + - ]
324 : : }
325 [ - + ]: 398 : else if ( aCommand.Name == "setPropertyValues" )
326 : : {
327 [ # # ]: 0 : uno::Sequence<beans::PropertyValue> propertyValues;
328 : :
329 [ # # ][ # # ]: 0 : if( ! ( aCommand.Argument >>= propertyValues ) ) {
330 [ # # ][ # # ]: 0 : aRet <<= lang::IllegalArgumentException();
[ # # ]
331 [ # # ]: 0 : ucbhelper::cancelCommandExecution(aRet,Environment);
332 : : }
333 : :
334 [ # # ]: 0 : uno::Sequence< uno::Any > ret(propertyValues.getLength());
335 [ # # ]: 0 : uno::Sequence< beans::Property > props(getProperties(Environment));
336 : : // No properties can be set
337 [ # # ]: 0 : for(sal_Int32 i = 0; i < ret.getLength(); ++i) {
338 [ # # ][ # # ]: 0 : ret[i] <<= beans::UnknownPropertyException();
[ # # ][ # # ]
339 [ # # ]: 0 : for(sal_Int32 j = 0; j < props.getLength(); ++j)
340 [ # # ][ # # ]: 0 : if(props[j].Name == propertyValues[i].Name) {
[ # # ]
341 [ # # ][ # # ]: 0 : ret[i] <<= lang::IllegalAccessException();
[ # # ][ # # ]
342 : 0 : break;
343 : : }
344 : : }
345 : :
346 [ # # ][ # # ]: 0 : aRet <<= ret;
[ # # ][ # # ]
347 : : }
348 [ - + ]: 398 : else if ( aCommand.Name == "getPropertySetInfo" )
349 : : {
350 : : // Note: Implemented by base class.
351 [ # # ][ # # ]: 0 : aRet <<= getPropertySetInfo( Environment );
352 : : }
353 [ - + ]: 398 : else if ( aCommand.Name == "getCommandInfo" )
354 : : {
355 : : // Note: Implemented by base class.
356 [ # # ][ # # ]: 0 : aRet <<= getCommandInfo( Environment );
357 : : }
358 [ + - ]: 398 : else if ( aCommand.Name == "open" )
359 : : {
360 [ + - ]: 398 : ucb::OpenCommandArgument2 aOpenCommand;
361 [ + - ][ - + ]: 398 : if ( !( aCommand.Argument >>= aOpenCommand ) )
362 : : {
363 [ # # ][ # # ]: 0 : aRet <<= lang::IllegalArgumentException();
[ # # ]
364 [ # # ]: 0 : ucbhelper::cancelCommandExecution(aRet,Environment);
365 : : }
366 : :
367 : : uno::Reference< io::XActiveDataSink > xActiveDataSink(
368 [ + - ]: 398 : aOpenCommand.Sink, uno::UNO_QUERY);
369 : :
370 [ + + ]: 398 : if(xActiveDataSink.is())
371 : : m_aURLParameter.open(m_xSMgr,
372 : : aCommand,
373 : : CommandId,
374 : : Environment,
375 [ + - ]: 386 : xActiveDataSink);
376 : :
377 : : uno::Reference< io::XActiveDataStreamer > xActiveDataStreamer(
378 [ + - ]: 398 : aOpenCommand.Sink, uno::UNO_QUERY);
379 : :
380 [ - + ]: 398 : if(xActiveDataStreamer.is()) {
381 [ # # ][ # # ]: 0 : aRet <<= ucb::UnsupportedDataSinkException();
[ # # ]
382 [ # # ]: 0 : ucbhelper::cancelCommandExecution(aRet,Environment);
383 : : }
384 : :
385 : : uno::Reference< io::XOutputStream > xOutputStream(
386 [ + - ]: 398 : aOpenCommand.Sink, uno::UNO_QUERY);
387 : :
388 [ - + ]: 398 : if(xOutputStream.is() )
389 : : m_aURLParameter.open(m_xSMgr,
390 : : aCommand,
391 : : CommandId,
392 : : Environment,
393 [ # # ]: 0 : xOutputStream);
394 : :
395 [ + + ]: 398 : if( m_aURLParameter.isRoot() )
396 : : {
397 : : uno::Reference< ucb::XDynamicResultSet > xSet
398 : : = new DynamicResultSet(
399 : : m_xSMgr,
400 : : this,
401 : : aOpenCommand,
402 : : Environment,
403 : : new ResultSetForRootFactory(
404 : : m_xSMgr,
405 : 12 : m_xProvider.get(),
406 : : aOpenCommand.Mode,
407 : : aOpenCommand.Properties,
408 : : aOpenCommand.SortingInfo,
409 : : m_aURLParameter,
410 [ + - ][ + - ]: 24 : m_pDatabases));
[ + - ][ + - ]
[ + - ][ + - ]
[ + - ]
411 [ + - ]: 12 : aRet <<= xSet;
412 : : }
413 [ - + ]: 386 : else if( m_aURLParameter.isQuery() )
414 : : {
415 : : uno::Reference< ucb::XDynamicResultSet > xSet
416 : : = new DynamicResultSet(
417 : : m_xSMgr,
418 : : this,
419 : : aOpenCommand,
420 : : Environment,
421 : : new ResultSetForQueryFactory(
422 : : m_xSMgr,
423 : 0 : m_xProvider.get(),
424 : : aOpenCommand.Mode,
425 : : aOpenCommand.Properties,
426 : : aOpenCommand.SortingInfo,
427 : : m_aURLParameter,
428 [ # # ][ # # ]: 0 : m_pDatabases ) );
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ]
429 [ # # ]: 0 : aRet <<= xSet;
430 [ + - ]: 398 : }
431 : : }
432 : : else
433 : : {
434 : : //////////////////////////////////////////////////////////////////
435 : : // Unsupported command
436 : : //////////////////////////////////////////////////////////////////
437 [ # # ][ # # ]: 0 : aRet <<= ucb::UnsupportedCommandException();
[ # # ]
438 [ # # ]: 0 : ucbhelper::cancelCommandExecution(aRet,Environment);
439 : : }
440 : :
441 : 974 : return aRet;
442 : : }
443 : :
444 : :
445 : :
446 : :
447 : : //=========================================================================
448 : 576 : uno::Reference< sdbc::XRow > Content::getPropertyValues(
449 : : const uno::Sequence< beans::Property >& rProperties )
450 : : {
451 [ + - ]: 576 : osl::MutexGuard aGuard( m_aMutex );
452 : :
453 : : rtl::Reference< ::ucbhelper::PropertyValueSet > xRow =
454 [ + - ]: 576 : new ::ucbhelper::PropertyValueSet( m_xSMgr );
455 : :
456 [ + + ]: 1152 : for ( sal_Int32 n = 0; n < rProperties.getLength(); ++n )
457 : : {
458 : 576 : const beans::Property& rProp = rProperties[n];
459 : :
460 [ - + ]: 576 : if ( rProp.Name == "ContentType" )
461 : : xRow->appendString(
462 : : rProp,
463 : : rtl::OUString(
464 [ # # ]: 0 : "application/vnd.sun.star.help" ) );
465 [ - + ]: 576 : else if ( rProp.Name == "Title" )
466 [ # # ][ # # ]: 0 : xRow->appendString ( rProp,m_aURLParameter.get_title() );
467 [ - + ]: 576 : else if ( rProp.Name == "IsReadOnly" )
468 [ # # ]: 0 : xRow->appendBoolean( rProp,true );
469 [ + + ]: 576 : else if ( rProp.Name == "IsDocument" )
470 : : xRow->appendBoolean(
471 : : rProp,
472 [ - + ][ # # ]: 386 : m_aURLParameter.isFile() || m_aURLParameter.isRoot() );
[ + - ]
473 [ - + ]: 190 : else if ( rProp.Name == "IsFolder" )
474 : : xRow->appendBoolean(
475 : : rProp,
476 [ # # ][ # # ]: 0 : ! m_aURLParameter.isFile() || m_aURLParameter.isRoot() );
[ # # ]
477 [ - + ]: 190 : else if ( rProp.Name == "IsErrorDocument" )
478 [ # # ][ # # ]: 0 : xRow->appendBoolean( rProp, m_aURLParameter.isErrorDocument() );
479 [ - + ]: 190 : else if ( rProp.Name == "MediaType" )
480 [ # # ][ # # ]: 0 : if( m_aURLParameter.isPicture() )
481 : : xRow->appendString(
482 : : rProp,
483 [ # # ]: 0 : rtl::OUString( "image/gif" ) );
484 [ # # ][ # # ]: 0 : else if( m_aURLParameter.isActive() )
485 : : xRow->appendString(
486 : : rProp,
487 [ # # ]: 0 : rtl::OUString( "text/plain" ) );
488 [ # # ]: 0 : else if( m_aURLParameter.isFile() )
489 : : xRow->appendString(
490 [ # # ]: 0 : rProp,rtl::OUString( "text/html" ) );
491 [ # # ]: 0 : else if( m_aURLParameter.isRoot() )
492 : : xRow->appendString(
493 : : rProp,
494 [ # # ]: 0 : rtl::OUString( "text/css" ) );
495 : : else
496 [ # # ]: 0 : xRow->appendVoid( rProp );
497 [ - + ]: 190 : else if( m_aURLParameter.isModule() )
498 [ # # ]: 0 : if ( rProp.Name == "KeywordList" )
499 : : {
500 : : KeywordInfo *inf =
501 : : m_pDatabases->getKeyword( m_aURLParameter.get_module(),
502 [ # # ][ # # ]: 0 : m_aURLParameter.get_language() );
503 : :
504 : 0 : uno::Any aAny;
505 [ # # ]: 0 : if( inf )
506 [ # # ]: 0 : aAny <<= inf->getKeywordList();
507 [ # # ]: 0 : xRow->appendObject( rProp,aAny );
508 : : }
509 [ # # ]: 0 : else if ( rProp.Name == "KeywordRef" )
510 : : {
511 : : KeywordInfo *inf =
512 : : m_pDatabases->getKeyword( m_aURLParameter.get_module(),
513 [ # # ][ # # ]: 0 : m_aURLParameter.get_language() );
514 : :
515 : 0 : uno::Any aAny;
516 [ # # ]: 0 : if( inf )
517 [ # # ]: 0 : aAny <<= inf->getIdList();
518 [ # # ]: 0 : xRow->appendObject( rProp,aAny );
519 : : }
520 [ # # ]: 0 : else if ( rProp.Name == "KeywordAnchorForRef" )
521 : : {
522 : : KeywordInfo *inf =
523 : : m_pDatabases->getKeyword( m_aURLParameter.get_module(),
524 [ # # ][ # # ]: 0 : m_aURLParameter.get_language() );
525 : :
526 : 0 : uno::Any aAny;
527 [ # # ]: 0 : if( inf )
528 [ # # ]: 0 : aAny <<= inf->getAnchorList();
529 [ # # ]: 0 : xRow->appendObject( rProp,aAny );
530 : : }
531 [ # # ]: 0 : else if ( rProp.Name == "KeywordTitleForRef" )
532 : : {
533 : : KeywordInfo *inf =
534 : : m_pDatabases->getKeyword( m_aURLParameter.get_module(),
535 [ # # ][ # # ]: 0 : m_aURLParameter.get_language() );
536 : :
537 : 0 : uno::Any aAny;
538 [ # # ]: 0 : if( inf )
539 [ # # ]: 0 : aAny <<= inf->getTitleList();
540 [ # # ]: 0 : xRow->appendObject( rProp,aAny );
541 : : }
542 [ # # ]: 0 : else if ( rProp.Name == "SearchScopes" )
543 : : {
544 [ # # ]: 0 : uno::Sequence< rtl::OUString > seq( 2 );
545 [ # # ]: 0 : seq[0] = rtl::OUString( "Heading" );
546 [ # # ]: 0 : seq[1] = rtl::OUString( "FullText" );
547 : 0 : uno::Any aAny;
548 [ # # ]: 0 : aAny <<= seq;
549 [ # # ][ # # ]: 0 : xRow->appendObject( rProp,aAny );
550 : : }
551 [ # # ]: 0 : else if ( rProp.Name == "Order" )
552 : : {
553 : : StaticModuleInformation *inf =
554 : : m_pDatabases->getStaticInformationForModule(
555 : : m_aURLParameter.get_module(),
556 [ # # ][ # # ]: 0 : m_aURLParameter.get_language() );
557 : :
558 : 0 : uno::Any aAny;
559 [ # # ]: 0 : if( inf )
560 [ # # ]: 0 : aAny <<= sal_Int32( inf->get_order() );
561 [ # # ]: 0 : xRow->appendObject( rProp,aAny );
562 : : }
563 : : else
564 [ # # ]: 0 : xRow->appendVoid( rProp );
565 [ + - + - ]: 380 : else if( "AnchorName" == rProp.Name &&
[ + - ]
566 : 190 : m_aURLParameter.isFile() )
567 [ + - ][ + - ]: 190 : xRow->appendString( rProp,m_aURLParameter.get_tag() );
568 : : else
569 [ # # ]: 0 : xRow->appendVoid( rProp );
570 : : }
571 : :
572 [ + - ][ + - ]: 576 : return uno::Reference< sdbc::XRow >( xRow.get() );
[ + - ]
573 : : }
574 : :
575 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|