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 "ucpext_resultset.hxx"
21 : #include "ucpext_content.hxx"
22 : #include "ucpext_datasupplier.hxx"
23 :
24 : #include <ucbhelper/resultset.hxx>
25 : #include <comphelper/processfactory.hxx>
26 :
27 :
28 : namespace ucb { namespace ucp { namespace ext
29 : {
30 :
31 :
32 : using ::com::sun::star::uno::Reference;
33 : using ::com::sun::star::uno::XInterface;
34 : using ::com::sun::star::uno::UNO_QUERY;
35 : using ::com::sun::star::uno::UNO_QUERY_THROW;
36 : using ::com::sun::star::uno::UNO_SET_THROW;
37 : using ::com::sun::star::uno::Exception;
38 : using ::com::sun::star::uno::RuntimeException;
39 : using ::com::sun::star::uno::Any;
40 : using ::com::sun::star::uno::makeAny;
41 : using ::com::sun::star::uno::Sequence;
42 : using ::com::sun::star::uno::Type;
43 : using ::com::sun::star::uno::XComponentContext;
44 : using ::com::sun::star::lang::XMultiServiceFactory;
45 : using ::com::sun::star::ucb::XContentIdentifier;
46 : using ::com::sun::star::ucb::OpenCommandArgument2;
47 : using ::com::sun::star::ucb::XCommandEnvironment;
48 :
49 :
50 : //= ResultSet
51 :
52 :
53 0 : ResultSet::ResultSet( const Reference< XComponentContext >& rxContext, const ::rtl::Reference< Content >& i_rContent,
54 : const OpenCommandArgument2& i_rCommand, const Reference< XCommandEnvironment >& i_rEnv )
55 : :ResultSetImplHelper( rxContext, i_rCommand )
56 : ,m_xEnvironment( i_rEnv )
57 0 : ,m_xContent( i_rContent )
58 : {
59 0 : }
60 :
61 :
62 0 : void ResultSet::initStatic()
63 : {
64 : ::rtl::Reference< DataSupplier > pDataSupplier( new DataSupplier(
65 : m_xContext,
66 : m_xContent,
67 : m_aCommand.Mode
68 0 : ) );
69 0 : m_xResultSet1 = new ::ucbhelper::ResultSet(
70 : m_xContext,
71 : m_aCommand.Properties,
72 0 : pDataSupplier.get(),
73 : m_xEnvironment
74 0 : );
75 0 : pDataSupplier->fetchData();
76 0 : }
77 :
78 :
79 0 : void ResultSet::initDynamic()
80 : {
81 0 : initStatic();
82 0 : m_xResultSet2 = m_xResultSet1;
83 0 : }
84 :
85 :
86 : } } } // namespace ucp::ext
87 :
88 :
89 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|