LCOV - code coverage report
Current view: top level - libreoffice/xmlhelp/source/cxxhelp/provider - resultsetforroot.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 23 0.0 %
Date: 2012-12-27 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include <com/sun/star/ucb/Command.hpp>
      21             : #include <com/sun/star/ucb/XCommandEnvironment.hpp>
      22             : #include <com/sun/star/ucb/XCommandProcessor.hpp>
      23             : 
      24             : #include "resultsetforroot.hxx"
      25             : #include "databases.hxx"
      26             : 
      27             : using namespace chelp;
      28             : using namespace com::sun::star;
      29             : using namespace com::sun::star::ucb;
      30             : 
      31             : 
      32             : 
      33           0 : ResultSetForRoot::ResultSetForRoot( const uno::Reference< uno::XComponentContext >&  rxContext,
      34             :                                     const uno::Reference< XContentProvider >&  xProvider,
      35             :                                     sal_Int32 nOpenMode,
      36             :                                     const uno::Sequence< beans::Property >& seq,
      37             :                                     const uno::Sequence< NumberedSortingInfo >& seqSort,
      38             :                                     URLParameter& aURLParameter,
      39             :                                     Databases* pDatabases )
      40             :     : ResultSetBase( rxContext, xProvider,nOpenMode,seq,seqSort ),
      41             :       m_aURLParameter( aURLParameter ),
      42           0 :       m_pDatabases( pDatabases )
      43             : {
      44           0 :     m_aPath = m_pDatabases->getModuleList( m_aURLParameter.get_language() );
      45           0 :     m_aItems.resize( m_aPath.size() );
      46           0 :     m_aIdents.resize( m_aPath.size() );
      47             : 
      48           0 :     Command aCommand;
      49           0 :     aCommand.Name = rtl::OUString( "getPropertyValues" );
      50           0 :     aCommand.Argument <<= m_sProperty;
      51             : 
      52           0 :     for( sal_uInt32 i = 0; i < m_aPath.size(); ++i )
      53             :     {
      54           0 :         m_aPath[i] =
      55             :             rtl::OUString( "vnd.sun.star.help://" ) +
      56           0 :             m_aPath[i]                              +
      57           0 :             rtl::OUString( "?Language=" )           +
      58           0 :             m_aURLParameter.get_language()          +
      59           0 :             rtl::OUString( "&System=" )             +
      60           0 :             m_aURLParameter.get_system();
      61             : 
      62           0 :         m_nRow = sal_Int32( i );
      63             : 
      64           0 :         uno::Reference< XContent > content = queryContent();
      65           0 :         if( content.is() )
      66             :         {
      67           0 :             uno::Reference< XCommandProcessor > cmd( content,uno::UNO_QUERY );
      68           0 :             cmd->execute( aCommand,0,uno::Reference< XCommandEnvironment >( 0 ) ) >>= m_aItems[i]; //TODO: check return value of operator >>=
      69             :         }
      70           0 :         m_nRow = 0xffffffff;
      71           0 :     }
      72           0 : }
      73             : 
      74             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10