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 #ifndef INCLUDE_WRITERFILTER_PROTOCOL_HXX 24 #define INCLUDE_WRITERFILTER_PROTOCOL_HXX 25 26 #ifdef DEBUG 27 28 #include <boost/shared_ptr.hpp> 29 #include "WW8ResourceModel.hxx" 30 #include "TagLogger.hxx" 31 namespace writerfilter 32 { 33 34 class StreamProtocol : public Stream 35 { 36 Stream * m_pStream; 37 TagLogger::Pointer_t m_pTagLogger; 38 39 public: 40 typedef boost::shared_ptr<StreamProtocol> Pointer_t; 41 42 StreamProtocol(Stream * pStream, TagLogger::Pointer_t pTagLogger); 43 virtual ~StreamProtocol(); 44 45 virtual void startSectionGroup(); 46 virtual void endSectionGroup(); 47 virtual void startParagraphGroup(); 48 virtual void endParagraphGroup(); 49 virtual void startCharacterGroup(); 50 virtual void endCharacterGroup(); 51 virtual void text(const sal_uInt8 * data, size_t len); 52 virtual void utext(const sal_uInt8 * data, size_t len); 53 virtual void props(writerfilter::Reference<Properties>::Pointer_t ref); 54 virtual void table(Id name, 55 writerfilter::Reference<Table>::Pointer_t ref); 56 virtual void substream(Id name, 57 writerfilter::Reference<Stream>::Pointer_t ref); 58 virtual void info(const string & rInfo); 59 virtual void startShape( ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > xShape ); 60 virtual void endShape(); 61 }; 62 63 class PropertiesProtocol : public Properties 64 { 65 Properties * m_pProperties; 66 TagLogger::Pointer_t m_pTagLogger; 67 68 public: 69 typedef boost::shared_ptr<PropertiesProtocol> Pointer_t; 70 71 PropertiesProtocol(Properties * pProperties, TagLogger::Pointer_t pTagLogger); 72 virtual ~PropertiesProtocol(); 73 74 virtual void attribute(Id name, Value & val); 75 virtual void sprm(Sprm & sprm); 76 }; 77 78 class TableProtocol : public Table 79 { 80 Table * m_pTable; 81 TagLogger::Pointer_t m_pTagLogger; 82 83 public: 84 typedef boost::shared_ptr<TableProtocol> Pointer_t; 85 86 TableProtocol(Table * pTable, TagLogger::Pointer_t pTagLogger); 87 virtual ~TableProtocol(); 88 89 virtual void entry(int pos, writerfilter::Reference<Properties>::Pointer_t ref); 90 }; 91 92 } 93 94 #endif // DEBUG 95 #endif // INCLUDE_WRITERFILTER_PROTOCOL_HXX 96