1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef OOX_DUMP_DFFDUMPER_HXX 29 #define OOX_DUMP_DFFDUMPER_HXX 30 31 #include "oox/dump/dumperbase.hxx" 32 33 #if OOX_INCLUDE_DUMPER 34 35 namespace oox { 36 namespace dump { 37 38 // ============================================================================ 39 40 class DffStreamObject : public SequenceRecordObjectBase 41 { 42 public: 43 inline sal_uInt16 getVer() const { return mnInstVer & 0x000F; } 44 inline sal_uInt16 getInst() const { return (mnInstVer & 0xFFF0) >> 4; } 45 inline bool isContainer() const { return getVer() == 15; } 46 47 protected: 48 inline explicit DffStreamObject() {} 49 50 using SequenceRecordObjectBase::construct; 51 void construct( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const ::rtl::OUString& rSysFileName ); 52 void construct( const OutputObjectBase& rParent, const BinaryInputStreamRef& rxStrm ); 53 54 virtual bool implReadRecordHeader( BinaryInputStream& rBaseStrm, sal_Int64& ornRecId, sal_Int64& ornRecSize ); 55 virtual void implWriteExtHeader(); 56 virtual void implDumpRecordBody(); 57 virtual void implDumpClientAnchor(); 58 59 private: 60 void constructDffObj(); 61 62 sal_uInt32 dumpDffSimpleColor( const String& rName ); 63 sal_uInt32 dumpDffColor( const String& rName ); 64 65 void dumpDffOpt(); 66 sal_uInt16 dumpDffOptPropHeader(); 67 68 private: 69 ItemFormatMap maSimpleProps; 70 ItemFormatMap maComplexProps; 71 sal_uInt16 mnInstVer; 72 sal_Int32 mnRealSize; 73 }; 74 75 // ============================================================================ 76 77 } // namespace dump 78 } // namespace oox 79 80 #endif 81 #endif 82