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 _SDSTOR_STGOLE_HXX 29 #define _SDSTOR_STGOLE_HXX 30 31 #include <string.h> // memset() 32 33 #include "sot/stg.hxx" 34 #include "stgelem.hxx" 35 36 class StgInternalStream : public SvStream 37 { 38 BaseStorageStream* pStrm; 39 virtual sal_uLong GetData( void* pData, sal_uLong nSize ); 40 virtual sal_uLong PutData( const void* pData, sal_uLong nSize ); 41 virtual sal_uLong SeekPos( sal_uLong nPos ); 42 virtual void FlushData(); 43 public: 44 StgInternalStream( BaseStorage&, const String&, sal_Bool ); 45 ~StgInternalStream(); 46 void Commit(); 47 }; 48 49 // standard stream "\1CompObj" 50 51 class StgCompObjStream : public StgInternalStream 52 { 53 ClsId aClsId; 54 String aUserName; 55 sal_uLong nCbFormat; 56 public: 57 StgCompObjStream( BaseStorage&, sal_Bool ); 58 ClsId& GetClsId() { return aClsId; } 59 String& GetUserName() { return aUserName; } 60 sal_uLong& GetCbFormat() { return nCbFormat; } 61 sal_Bool Load(); 62 sal_Bool Store(); 63 }; 64 65 // standard stream "\1Ole" 66 67 class StgOleStream : public StgInternalStream 68 { 69 sal_uInt32 nFlags; 70 public: 71 StgOleStream( BaseStorage&, sal_Bool ); 72 sal_uInt32& GetFlags() { return nFlags; } 73 sal_Bool Load(); 74 sal_Bool Store(); 75 }; 76 77 #endif 78