1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 #include <com/sun/star/uno/XComponentContext.hpp> 25 #include <com/sun/star/io/XInputStream.hpp> 26 #include <com/sun/star/container/XNameContainer.hpp> 27 #include <doctok/WW8Document.hxx> 28 #ifndef INCLUDED_OUTPUT_WITH_DEPTH_HXX 29 #include <resourcemodel/OutputWithDepth.hxx> 30 #endif 31 32 namespace writerfilter { 33 namespace doctok 34 { 35 using namespace ::com::sun::star; 36 37 class WW8StreamImpl : public WW8Stream 38 { 39 uno::Reference<uno::XComponentContext> mrComponentContext; 40 uno::Reference<io::XInputStream> mrStream; 41 uno::Reference<container::XNameContainer> xOLESimpleStorage; 42 uno::Reference<lang::XMultiComponentFactory> xFactory; 43 44 public: 45 WW8StreamImpl(uno::Reference<uno::XComponentContext> rContext, 46 uno::Reference<io::XInputStream> rStream); 47 virtual ~WW8StreamImpl(); 48 49 virtual WW8Stream::Pointer_t getSubStream(const ::rtl::OUString & rId); 50 51 virtual Sequence get(sal_uInt32 nOffset, sal_uInt32 nCount) 52 const; 53 54 //virtual bool put(sal_uInt32 nOffset, const Sequence & rSeq); 55 56 virtual string getSubStreamNames() const; 57 virtual uno::Sequence<rtl::OUString> getSubStreamUNames() const; 58 59 virtual void dump(OutputWithDepth<string> & o) const; 60 }; 61 }} 62