1*2f86921cSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*2f86921cSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*2f86921cSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*2f86921cSAndrew Rist * distributed with this work for additional information 6*2f86921cSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*2f86921cSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*2f86921cSAndrew Rist * "License"); you may not use this file except in compliance 9*2f86921cSAndrew Rist * with the License. You may obtain a copy of the License at 10*2f86921cSAndrew Rist * 11*2f86921cSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*2f86921cSAndrew Rist * 13*2f86921cSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*2f86921cSAndrew Rist * software distributed under the License is distributed on an 15*2f86921cSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*2f86921cSAndrew Rist * KIND, either express or implied. See the License for the 17*2f86921cSAndrew Rist * specific language governing permissions and limitations 18*2f86921cSAndrew Rist * under the License. 19*2f86921cSAndrew Rist * 20*2f86921cSAndrew Rist *************************************************************/ 21*2f86921cSAndrew Rist 22*2f86921cSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include "precompiled_ucb.hxx" 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "ucpext_resultset.hxx" 27cdf0e10cSrcweir #include "ucpext_content.hxx" 28cdf0e10cSrcweir #include "ucpext_datasupplier.hxx" 29cdf0e10cSrcweir 30cdf0e10cSrcweir /** === begin UNO includes === **/ 31cdf0e10cSrcweir /** === end UNO includes === **/ 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include <ucbhelper/resultset.hxx> 34cdf0e10cSrcweir 35cdf0e10cSrcweir //...................................................................................................................... 36cdf0e10cSrcweir namespace ucb { namespace ucp { namespace ext 37cdf0e10cSrcweir { 38cdf0e10cSrcweir //...................................................................................................................... 39cdf0e10cSrcweir 40cdf0e10cSrcweir /** === begin UNO using === **/ 41cdf0e10cSrcweir using ::com::sun::star::uno::Reference; 42cdf0e10cSrcweir using ::com::sun::star::uno::XInterface; 43cdf0e10cSrcweir using ::com::sun::star::uno::UNO_QUERY; 44cdf0e10cSrcweir using ::com::sun::star::uno::UNO_QUERY_THROW; 45cdf0e10cSrcweir using ::com::sun::star::uno::UNO_SET_THROW; 46cdf0e10cSrcweir using ::com::sun::star::uno::Exception; 47cdf0e10cSrcweir using ::com::sun::star::uno::RuntimeException; 48cdf0e10cSrcweir using ::com::sun::star::uno::Any; 49cdf0e10cSrcweir using ::com::sun::star::uno::makeAny; 50cdf0e10cSrcweir using ::com::sun::star::uno::Sequence; 51cdf0e10cSrcweir using ::com::sun::star::uno::Type; 52cdf0e10cSrcweir using ::com::sun::star::lang::XMultiServiceFactory; 53cdf0e10cSrcweir using ::com::sun::star::ucb::XContentIdentifier; 54cdf0e10cSrcweir using ::com::sun::star::ucb::OpenCommandArgument2; 55cdf0e10cSrcweir using ::com::sun::star::ucb::XCommandEnvironment; 56cdf0e10cSrcweir /** === end UNO using === **/ 57cdf0e10cSrcweir 58cdf0e10cSrcweir //================================================================================================================== 59cdf0e10cSrcweir //= ResultSet 60cdf0e10cSrcweir //================================================================================================================== 61cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ ResultSet(const Reference<XMultiServiceFactory> & i_rORB,const::rtl::Reference<Content> & i_rContent,const OpenCommandArgument2 & i_rCommand,const Reference<XCommandEnvironment> & i_rEnv)62cdf0e10cSrcweir ResultSet::ResultSet( const Reference< XMultiServiceFactory >& i_rORB, const ::rtl::Reference< Content >& i_rContent, 63cdf0e10cSrcweir const OpenCommandArgument2& i_rCommand, const Reference< XCommandEnvironment >& i_rEnv ) 64cdf0e10cSrcweir :ResultSetImplHelper( i_rORB, i_rCommand ) 65cdf0e10cSrcweir ,m_xEnvironment( i_rEnv ) 66cdf0e10cSrcweir ,m_xContent( i_rContent ) 67cdf0e10cSrcweir { 68cdf0e10cSrcweir } 69cdf0e10cSrcweir 70cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ initStatic()71cdf0e10cSrcweir void ResultSet::initStatic() 72cdf0e10cSrcweir { 73cdf0e10cSrcweir ::rtl::Reference< DataSupplier > pDataSupplier( new DataSupplier( 74cdf0e10cSrcweir m_xSMgr, 75cdf0e10cSrcweir m_xContent, 76cdf0e10cSrcweir m_aCommand.Mode 77cdf0e10cSrcweir ) ); 78cdf0e10cSrcweir m_xResultSet1 = new ::ucbhelper::ResultSet( 79cdf0e10cSrcweir m_xSMgr, 80cdf0e10cSrcweir m_aCommand.Properties, 81cdf0e10cSrcweir pDataSupplier.get(), 82cdf0e10cSrcweir m_xEnvironment 83cdf0e10cSrcweir ); 84cdf0e10cSrcweir pDataSupplier->fetchData(); 85cdf0e10cSrcweir } 86cdf0e10cSrcweir 87cdf0e10cSrcweir //------------------------------------------------------------------------------------------------------------------ initDynamic()88cdf0e10cSrcweir void ResultSet::initDynamic() 89cdf0e10cSrcweir { 90cdf0e10cSrcweir initStatic(); 91cdf0e10cSrcweir m_xResultSet2 = m_xResultSet1; 92cdf0e10cSrcweir } 93cdf0e10cSrcweir 94cdf0e10cSrcweir //...................................................................................................................... 95cdf0e10cSrcweir } } } // namespace ucp::ext 96cdf0e10cSrcweir //...................................................................................................................... 97