2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-19 19:45:04 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2001-05-17 08:58:55 +00:00
|
|
|
|
|
|
|
#include <com/sun/star/ucb/Command.hpp>
|
|
|
|
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
|
|
|
|
#include <com/sun/star/ucb/XCommandProcessor.hpp>
|
2008-03-25 14:23:39 +00:00
|
|
|
|
|
|
|
#include "resultsetforroot.hxx"
|
|
|
|
#include "databases.hxx"
|
2001-05-17 08:58:55 +00:00
|
|
|
|
|
|
|
using namespace chelp;
|
|
|
|
using namespace com::sun::star;
|
|
|
|
using namespace com::sun::star::ucb;
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-11-01 15:01:34 +02:00
|
|
|
ResultSetForRoot::ResultSetForRoot( const uno::Reference< uno::XComponentContext >& rxContext,
|
2001-05-17 08:58:55 +00:00
|
|
|
const uno::Reference< XContentProvider >& xProvider,
|
|
|
|
sal_Int32 nOpenMode,
|
|
|
|
const uno::Sequence< beans::Property >& seq,
|
|
|
|
const uno::Sequence< NumberedSortingInfo >& seqSort,
|
2001-06-06 13:48:47 +00:00
|
|
|
URLParameter& aURLParameter,
|
|
|
|
Databases* pDatabases )
|
2012-11-01 15:01:34 +02:00
|
|
|
: ResultSetBase( rxContext, xProvider,nOpenMode,seq,seqSort ),
|
2001-06-06 13:48:47 +00:00
|
|
|
m_aURLParameter( aURLParameter ),
|
|
|
|
m_pDatabases( pDatabases )
|
2001-05-17 08:58:55 +00:00
|
|
|
{
|
2001-06-06 13:48:47 +00:00
|
|
|
m_aPath = m_pDatabases->getModuleList( m_aURLParameter.get_language() );
|
2001-05-17 08:58:55 +00:00
|
|
|
m_aItems.resize( m_aPath.size() );
|
|
|
|
m_aIdents.resize( m_aPath.size() );
|
|
|
|
|
|
|
|
Command aCommand;
|
2013-11-15 11:05:19 +02:00
|
|
|
aCommand.Name = "getPropertyValues";
|
2001-05-17 08:58:55 +00:00
|
|
|
aCommand.Argument <<= m_sProperty;
|
|
|
|
|
|
|
|
for( sal_uInt32 i = 0; i < m_aPath.size(); ++i )
|
|
|
|
{
|
|
|
|
m_aPath[i] =
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString( "vnd.sun.star.help://" ) +
|
2012-06-01 16:17:42 +02:00
|
|
|
m_aPath[i] +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString( "?Language=" ) +
|
2012-06-01 16:17:42 +02:00
|
|
|
m_aURLParameter.get_language() +
|
2013-04-07 12:06:47 +02:00
|
|
|
OUString( "&System=" ) +
|
2001-05-17 08:58:55 +00:00
|
|
|
m_aURLParameter.get_system();
|
|
|
|
|
|
|
|
m_nRow = sal_Int32( i );
|
|
|
|
|
|
|
|
uno::Reference< XContent > content = queryContent();
|
|
|
|
if( content.is() )
|
|
|
|
{
|
|
|
|
uno::Reference< XCommandProcessor > cmd( content,uno::UNO_QUERY );
|
2006-10-12 10:28:09 +00:00
|
|
|
cmd->execute( aCommand,0,uno::Reference< XCommandEnvironment >( 0 ) ) >>= m_aItems[i]; //TODO: check return value of operator >>=
|
2001-05-17 08:58:55 +00:00
|
|
|
}
|
2006-06-19 23:40:22 +00:00
|
|
|
m_nRow = 0xffffffff;
|
2001-05-17 08:58:55 +00:00
|
|
|
}
|
|
|
|
}
|
2010-10-12 15:53:47 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|