Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef INCLUDED_SOT_SOURCE_SDSTOR_STGOLE_HXX
21 : #define INCLUDED_SOT_SOURCE_SDSTOR_STGOLE_HXX
22 :
23 : #include <string.h>
24 :
25 : #include "sot/stg.hxx"
26 : #include "stgelem.hxx"
27 :
28 : class StgInternalStream : public SvStream
29 : {
30 : BaseStorageStream* pStrm;
31 : virtual sal_uLong GetData( void* pData, sal_uLong nSize ) SAL_OVERRIDE;
32 : virtual sal_uLong PutData( const void* pData, sal_uLong nSize ) SAL_OVERRIDE;
33 : virtual sal_uInt64 SeekPos( sal_uInt64 nPos ) SAL_OVERRIDE;
34 : virtual void FlushData() SAL_OVERRIDE;
35 : public:
36 : StgInternalStream( BaseStorage&, const OUString&, bool );
37 : virtual ~StgInternalStream();
38 : void Commit();
39 : };
40 :
41 : // standard stream "\1CompObj"
42 :
43 77 : class StgCompObjStream : public StgInternalStream
44 : {
45 : ClsId aClsId;
46 : OUString aUserName;
47 : SotClipboardFormatId nCbFormat;
48 : public:
49 : StgCompObjStream( BaseStorage&, bool );
50 53 : ClsId& GetClsId() { return aClsId; }
51 53 : OUString& GetUserName() { return aUserName; }
52 53 : SotClipboardFormatId& GetCbFormat() { return nCbFormat; }
53 : bool Load();
54 : bool Store();
55 : };
56 :
57 : // standard stream "\1Ole"
58 :
59 53 : class StgOleStream : public StgInternalStream
60 : {
61 : sal_uInt32 nFlags;
62 : public:
63 : StgOleStream( BaseStorage&, bool );
64 0 : sal_uInt32& GetFlags() { return nFlags; }
65 : bool Load();
66 : bool Store();
67 : };
68 :
69 : #endif
70 :
71 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|