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 #ifndef OOX_DUMP_DFFDUMPER_HXX 25 #define OOX_DUMP_DFFDUMPER_HXX 26 27 #include "oox/dump/dumperbase.hxx" 28 29 #if OOX_INCLUDE_DUMPER 30 31 namespace oox { 32 namespace dump { 33 34 // ============================================================================ 35 36 class DffStreamObject : public SequenceRecordObjectBase 37 { 38 public: getVer() const39 inline sal_uInt16 getVer() const { return mnInstVer & 0x000F; } getInst() const40 inline sal_uInt16 getInst() const { return (mnInstVer & 0xFFF0) >> 4; } isContainer() const41 inline bool isContainer() const { return getVer() == 15; } 42 43 protected: DffStreamObject()44 inline explicit DffStreamObject() {} 45 46 using SequenceRecordObjectBase::construct; 47 void construct( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const ::rtl::OUString& rSysFileName ); 48 void construct( const OutputObjectBase& rParent, const BinaryInputStreamRef& rxStrm ); 49 50 virtual bool implReadRecordHeader( BinaryInputStream& rBaseStrm, sal_Int64& ornRecId, sal_Int64& ornRecSize ); 51 virtual void implWriteExtHeader(); 52 virtual void implDumpRecordBody(); 53 virtual void implDumpClientAnchor(); 54 55 private: 56 void constructDffObj(); 57 58 sal_uInt32 dumpDffSimpleColor( const String& rName ); 59 sal_uInt32 dumpDffColor( const String& rName ); 60 61 void dumpDffOpt(); 62 sal_uInt16 dumpDffOptPropHeader(); 63 64 private: 65 ItemFormatMap maSimpleProps; 66 ItemFormatMap maComplexProps; 67 sal_uInt16 mnInstVer; 68 sal_Int32 mnRealSize; 69 }; 70 71 // ============================================================================ 72 73 } // namespace dump 74 } // namespace oox 75 76 #endif 77 #endif 78