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 _SOT_STORINFO_HXX 25 #define _SOT_STORINFO_HXX 26 27 #include <tools/pstm.hxx> 28 #include <tools/globname.hxx> 29 #include <tools/ownlist.hxx> 30 #include "sot/sotdllapi.h" 31 32 class StgDirEntry; 33 class SvStorageInfo 34 { 35 friend class SvStorage; 36 String aName; 37 SvGlobalName aClassName; 38 sal_uLong nSize; 39 sal_Bool bStream:1, 40 bStorage:1; 41 SvStorageInfo()42 SvStorageInfo(){}; // Fuer SvStorage 43 public: 44 SvStorageInfo( const StgDirEntry& ); SvStorageInfo(const String & rName,sal_uLong nSz,sal_Bool bIsStorage)45 SvStorageInfo( const String& rName, sal_uLong nSz, sal_Bool bIsStorage ) 46 : aName( rName ) 47 , nSize( nSz ) 48 , bStream( !bIsStorage ) 49 , bStorage( bIsStorage ) 50 {} 51 GetClassName() const52 const SvGlobalName & GetClassName() const { return aClassName; } GetName() const53 const String & GetName() const { return aName; } IsStream() const54 sal_Bool IsStream() const { return bStream; } IsStorage() const55 sal_Bool IsStorage() const { return bStorage; } GetSize() const56 sal_uLong GetSize() const { return nSize; } 57 }; 58 59 class SOT_DLLPUBLIC SvStorageInfoList 60 { 61 PRV_SV_DECL_OWNER_LIST(SvStorageInfoList,SvStorageInfo) 62 const SvStorageInfo * Get( const String & rName ); 63 }; 64 65 SOT_DLLPUBLIC sal_uLong ReadClipboardFormat( SvStream & rStm ); 66 SOT_DLLPUBLIC void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat ); 67 68 #endif // _STORINFO_HXX 69