diff options
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/bencont.cxx | 62 | ||||
-rw-r--r-- | lotuswordpro/source/filter/benobj.cxx | 47 | ||||
-rw-r--r-- | lotuswordpro/source/filter/bento.hxx | 69 | ||||
-rw-r--r-- | lotuswordpro/source/filter/benval.cxx | 15 | ||||
-rw-r--r-- | lotuswordpro/source/filter/tocread.cxx | 11 | ||||
-rw-r--r-- | lotuswordpro/source/filter/tocread.hxx | 1 |
6 files changed, 0 insertions, 205 deletions
diff --git a/lotuswordpro/source/filter/bencont.cxx b/lotuswordpro/source/filter/bencont.cxx index e074e11e4200..fc0638b3e6f5 100644 --- a/lotuswordpro/source/filter/bencont.cxx +++ b/lotuswordpro/source/filter/bencont.cxx @@ -141,19 +141,6 @@ LtcBenContainer::RegisterPropertyName(const char * sPropertyName, return BenErr_OK; } -BenError -LtcBenContainer::NewObject(pCBenObject * ppBenObject) -{ - pCBenIDListElmt pPrev; - if (FindID(&cObjects, cNextAvailObjectID, &pPrev) != NULL) - return BenErr_DuplicateObjectID; - - *ppBenObject = new CBenObject(this, cNextAvailObjectID, pPrev); - - ++cNextAvailObjectID; - return BenErr_OK; -} - pCBenObject LtcBenContainer::GetNextObject(pCBenObject pCurrObject) { @@ -378,55 +365,6 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p return BenErr_OK; } -#include <tools/globname.hxx> - -//////////////////////////////////////////////////////////////////// -//classs AswEntry -AswEntry::AswEntry() -{ - Init(); -} -void AswEntry::Init() -{ - memset( this, 0, sizeof (AswEntry)); -} -void AswEntry::SetName( const String& rName ) -{ - int i; - for( i = 0; i < rName.Len() && i < 68; i++ ) - nName[ i ] = rName.GetChar( i ); - while( i < 68 ) - nName[ i++ ] = 0; -} -void AswEntry::GetName(String & rName) const -{ - rName = nName; -} -void AswEntry::Store( void* pTo ) -{ - SvMemoryStream r( (sal_Char *)pTo, ASWENTRY_SIZE, STREAM_WRITE ); - for( short i = 0; i < 68; i++ ) - r << nName[ i ]; // 00 name as WCHAR - r<< nMtime[ 0 ] // 42 entry type - << nMtime[ 1 ] // 43 0 or 1 (tree balance?) - << nCtime[ 0 ] // 44 left node entry - << nCtime[ 1 ] // 48 right node entry - << nAtime[ 0 ] // 44 left node entry - << nAtime[ 1 ]; // 48 right node entry - r.Write(&aClsId ,16); // 50 class ID (optional) - r<< nStatebits // 60 state flags(?) - << nType - << nObjectIDRef // 64 modification time - << nMversion // 6C creation and access time - << nLversion // 6C creation and access time - << nReserved[ 0 ] // 74 starting block (either direct or translated) - << nReserved[ 1 ]; // 78 file size -} -void AswEntry::SetClassId( const ClsId& r ) -{ - memcpy( &aClsId, &r, sizeof( ClsId ) ); -} -/////////////////////////////////////////////////////////////////// }// end namespace OpenStormBento /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/benobj.cxx b/lotuswordpro/source/filter/benobj.cxx index fb9f9394791e..1a159cb92166 100644 --- a/lotuswordpro/source/filter/benobj.cxx +++ b/lotuswordpro/source/filter/benobj.cxx @@ -64,24 +64,12 @@ CBenObject::IsNamedObject() } pCBenProperty -CBenObject::GetNextProperty(pCBenProperty pCurrProperty) -{ - return (pCBenProperty) cProperties.GetNextOrNULL(pCurrProperty); -} - -pCBenProperty CBenObject::UseProperty(BenObjectID PropertyID) { pCBenIDListElmt pPrev; return (pCBenProperty) FindID(&cProperties, PropertyID, &pPrev); } -void -CBenObject::DeleteProperty(pCBenProperty pProperty) -{ - delete pProperty; -} - pCBenValue CBenObject::UseValue(BenObjectID PropertyID) { @@ -91,41 +79,6 @@ CBenObject::UseValue(BenObjectID PropertyID) return pProperty->UseValue(); } -pCBenValue -CBenObject::UseValueWithPropertyName(const char * sPropertyName) -{ - pCBenPropertyName pPropertyName; - if (GetContainer()->RegisterPropertyName(sPropertyName, &pPropertyName) - != BenErr_OK) - return NULL; - - return UseValue(pPropertyName->GetID()); -} - -pCBenValue -CBenObject::UseSingleValue() -{ - if (cProperties.IsEmpty() || cProperties.ContainsAtLeastTwoItems()) - return NULL; - pCBenProperty pProperty = (pCBenProperty) cProperties.GetFirst(); - return pProperty->UseValue(); -} - -BenError -CBenObject::NewValue(BenObjectID PropertyID, BenObjectID TypeID, pCBenValue * - ppValue) -{ - pCBenIDListElmt pPrevProperty; - pCBenProperty pProperty = (pCBenProperty) FindID(&cProperties, - PropertyID, &pPrevProperty); - if (pProperty != NULL) - return BenErr_PropertyAlreadyExists; - - pProperty = new CBenProperty(this, PropertyID, TypeID, pPrevProperty); - *ppValue = pProperty->UseValue(); - - return BenErr_OK; -} }// end namespace OpenStormBento /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx index e2b4379780ae..7512d6bdd956 100644 --- a/lotuswordpro/source/filter/bento.hxx +++ b/lotuswordpro/source/filter/bento.hxx @@ -83,43 +83,6 @@ namespace OpenStormBento #define BEN_LABEL_SIZE 24 #define BEN_MAGIC_BYTES "\xA4""CM""\xA5""Hdr""\xD7" -//For Ole2DirectoryStruct, Add by 10/24/2005 -#define BEN_STGTY_STORAGE 1 -#define BEN_STGTY_STREAM 2 -#define ASWENTRY_SIZE 204 -struct ClsId -{ - sal_Int32 n1; - sal_Int16 n2, n3; - sal_uInt8 n4, n5, n6, n7, n8, n9, n10, n11; -}; -class AswEntry //total length: 204 -{ - sal_uInt16 nName[ 68 ]; //Name of IStorage or IStream referenced by this entry, length = 136 - sal_Int32 nMtime[ 2 ]; - sal_Int32 nCtime[ 2 ]; - sal_Int32 nAtime[ 2 ]; - ClsId aClsId; //CLSID from OLE 2 IStorage::SetClass call - sal_uInt32 nStatebits; //State bits from OLE 2 IStorage::SetStateBits call - sal_uInt32 nType; // STGTY_STORAGE: 1 or STGTY_STREAM:2, - sal_uInt32 nObjectIDRef; //Persistent Bento reference to Bento object for this IStorage or IStream - sal_uInt32 nMversion; - sal_uInt32 nLversion; - sal_uInt32 nReserved[2]; //skip 16 char -public: - AswEntry(); - void Init(); // initialize the data - void SetName( const String& ); // store a name (ASCII, up to 32 chars) - void GetName( String& rName ) const; - void Store( void* ); - sal_uInt32 GetType() const { return nType; } - void SetType( sal_uInt32 t ) { nType = t;} - const ClsId& GetClassId() const { return aClsId;} - void SetClassId( const ClsId& ); - void SetObjectID(sal_uInt32 id) { nObjectIDRef = id;} - sal_uInt32 GetObjectID() const { return nObjectIDRef;} -}; -//End by enum BenError { @@ -155,24 +118,6 @@ enum BenError // subclass of UtStream (custom handler), can define own error codes-- // those should start at 200 }; -/* - * These two functions are useless in SODC - * -inline UtError BenToUtError(BenError Err) -{ - if (Err == 0 || Err >= 100) - return (UtError) Err; - else return UtErr_Fail; -} - -inline BenError UtToBenError(UtError Err) -{ UT_ASSERT(Err == 0 || Err >= 100); return (BenError) Err; } -enum BenSeekMode { - BenSeek_FromStart = 1, - BenSeek_FromCurr = 2, - BenSeek_FromEnd = 3 -}; -*/ UtDefClassP(LtcBenContainer); UtDefClassP(CBenIDListElmt); @@ -269,7 +214,6 @@ public: pCBenObject GetNextObject(pCBenObject pCurrObject); pCBenObject FindNextObjectWithProperty(pCBenObject pCurrObject, BenObjectID PropertyID); - BenError BEN_EXPORT NewObject(pCBenObject * ppBenObject); public: // Internal methods LtcBenContainer(LwpSvStream * pStream); @@ -306,19 +250,11 @@ private: // Data class CBenObject : public CBenIDListElmt { public: - pCBenProperty GetNextProperty(pCBenProperty pCurrProperty); pCBenProperty UseProperty(BenObjectID PropertyID); - void DeleteProperty(pCBenProperty pProperty); pCBenValue UseValue(BenObjectID PropertyID); - pCBenValue UseSingleValue(); - // Inefficient to use this method if will use property multiple times-- - // instead register property and call UseProperty with property ID - pCBenValue UseValueWithPropertyName(const char * sPropertyName); virtual UtBool IsNamedObject(); pLtcBenContainer GetContainer() { return cpContainer; } BenObjectID GetObjectID() { return GetID(); } - BenError BEN_EXPORT NewValue(BenObjectID PropertyID, BenObjectID TypeID, - pCBenValue * ppValue); public: // Internal methods CBenObject(pLtcBenContainer pContainer, BenObjectID ObjectID, pCBenIDListElmt pPrev) : CBenIDListElmt(ObjectID, pPrev) @@ -337,11 +273,6 @@ public: BenError ReadValueData(BenDataPtr pBuffer, unsigned long Offset, unsigned long MaxSize, unsigned long * pAmtRead); - BenError BEN_EXPORT WriteValueData(BenConstDataPtr pBuffer, - unsigned long Offset, unsigned long Size); - BenError BEN_EXPORT WriteValueData(BenConstDataPtr pBuffer, - unsigned long Offset, unsigned long Size, unsigned long * pAmtWritten); - pCBenProperty BEN_EXPORT GetProperty() { return cpProperty; } public: // Internal methods diff --git a/lotuswordpro/source/filter/benval.cxx b/lotuswordpro/source/filter/benval.cxx index de1fc1248304..06f45fe26cd2 100644 --- a/lotuswordpro/source/filter/benval.cxx +++ b/lotuswordpro/source/filter/benval.cxx @@ -132,21 +132,6 @@ CBenValue::ReadValueData(BenDataPtr pReadBuffer, unsigned long Offset, return BenErr_OK; } -BenError -CBenValue::WriteValueData(BenConstDataPtr /*pWriteBuffer*/, unsigned long /*Offset*/, - unsigned long /*Amt*/, unsigned long * /*pAmtWritten*/) -{ - return BenErr_OK; -} - -BenError -CBenValue::WriteValueData(BenConstDataPtr pWriteBuffer, unsigned long Offset, - unsigned long Amt) -{ - unsigned long AmtWritten; - return WriteValueData(pWriteBuffer, Offset, Amt, &AmtWritten); -} - }//end namespace OpenStormBento /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/tocread.cxx b/lotuswordpro/source/filter/tocread.cxx index 84aaf24adcc6..42d376bcf15b 100644 --- a/lotuswordpro/source/filter/tocread.cxx +++ b/lotuswordpro/source/filter/tocread.cxx @@ -468,17 +468,6 @@ CBenTOCReader::GetByte(BenByte * pByte) } BenError -CBenTOCReader::GetWord(BenWord * pWord) -{ - if (! CanGetData(2)) - return BenErr_ReadPastEndOfTOC; - - *pWord = UtGetIntelWord(cpTOC + cCurr); - cCurr += 2; - return BenErr_OK; -} - -BenError CBenTOCReader::GetDWord(BenDWord * pDWord) { if (! CanGetData(4)) diff --git a/lotuswordpro/source/filter/tocread.hxx b/lotuswordpro/source/filter/tocread.hxx index e0b68f3f4a99..9c60ad4660ee 100644 --- a/lotuswordpro/source/filter/tocread.hxx +++ b/lotuswordpro/source/filter/tocread.hxx @@ -74,7 +74,6 @@ private: // Methods BenError ReadSegment(pCBenValue pValue, BenByte * pLookAhead); UtBool CanGetData(unsigned long Amt); BenError GetByte(BenByte * pByte); - BenError GetWord(BenWord * pWord); BenError GetDWord(BenDWord * pDWord); BenByte GetCode(); BenError GetData(BenDataPtr pBuffer, unsigned long Amt); |