diff options
Diffstat (limited to 'lotuswordpro')
-rw-r--r-- | lotuswordpro/source/filter/bento.hxx | 10 | ||||
-rw-r--r-- | lotuswordpro/source/filter/benval.cxx | 113 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpsdwrect.cxx | 8 | ||||
-rw-r--r-- | lotuswordpro/source/filter/lwpsdwrect.hxx | 3 | ||||
-rw-r--r-- | lotuswordpro/source/filter/utlist.cxx | 82 | ||||
-rw-r--r-- | lotuswordpro/source/filter/utlist.hxx | 6 |
6 files changed, 0 insertions, 222 deletions
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx index 6f534d03051c..e2b4379780ae 100644 --- a/lotuswordpro/source/filter/bento.hxx +++ b/lotuswordpro/source/filter/bento.hxx @@ -336,20 +336,11 @@ public: unsigned long GetValueSize(); BenError ReadValueData(BenDataPtr pBuffer, unsigned long Offset, unsigned long MaxSize, unsigned long * pAmtRead); - BenError ReadValueDataKnownSize(BenDataPtr pBuffer, - unsigned long Offset, unsigned long Amt); 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); - BenError BEN_EXPORT WriteImmediateValueData(BenConstDataPtr pBuffer, - unsigned short Size); - BenError BEN_EXPORT TruncateValueSize(unsigned long NewSize); - BenError BEN_EXPORT NewReference(BenObjectID ReferencedObjectID, - pCBenReference pReference); - BenObjectID BEN_EXPORT GetReferencedObject(pCBenReference pReference); - pCBenProperty BEN_EXPORT GetProperty() { return cpProperty; } @@ -377,7 +368,6 @@ public: // Internal methods pCurrValueSegment); inline pLtcBenContainer GetContainer(); pCUtList GetValueSegments() { return &cValueSegments; } - BenObjectID GetReferencedListID(); // Currently, no generation support BenGeneration GetGeneration() { return 1; } diff --git a/lotuswordpro/source/filter/benval.cxx b/lotuswordpro/source/filter/benval.cxx index ae3d1d9956c6..de1fc1248304 100644 --- a/lotuswordpro/source/filter/benval.cxx +++ b/lotuswordpro/source/filter/benval.cxx @@ -133,19 +133,6 @@ CBenValue::ReadValueData(BenDataPtr pReadBuffer, unsigned long Offset, } BenError -CBenValue::ReadValueDataKnownSize(BenDataPtr pBuffer, unsigned long Offset, - unsigned long Amt) -{ - unsigned long AmtRead; - BenError Err = ReadValueData(pBuffer, Offset, Amt, &AmtRead); - - if (Err == UtErr_OK && AmtRead != Amt) - Err = (BenError) UtErr_Fail; - - return Err; -} - -BenError CBenValue::WriteValueData(BenConstDataPtr /*pWriteBuffer*/, unsigned long /*Offset*/, unsigned long /*Amt*/, unsigned long * /*pAmtWritten*/) { @@ -153,30 +140,6 @@ CBenValue::WriteValueData(BenConstDataPtr /*pWriteBuffer*/, unsigned long /*Offs } BenError -CBenValue::TruncateValueSize(unsigned long NewSize) -{ - unsigned long SegOffset = 0; - - pCBenValueSegment pCurrSeg = GetNextValueSegment(NULL); - while (pCurrSeg != NULL) - { - pCBenValueSegment pNextSeg = GetNextValueSegment(pCurrSeg); - - long SegSize = UtMin((long) pCurrSeg->GetSize(), (long) NewSize - - (long) SegOffset); - - if (SegSize <= 0) - delete pCurrSeg; - else pCurrSeg->SetSize(SegSize); - - SegOffset += SegSize; - pCurrSeg = pNextSeg; - } - - return BenErr_OK; -} - -BenError CBenValue::WriteValueData(BenConstDataPtr pWriteBuffer, unsigned long Offset, unsigned long Amt) { @@ -184,82 +147,6 @@ CBenValue::WriteValueData(BenConstDataPtr pWriteBuffer, unsigned long Offset, return WriteValueData(pWriteBuffer, Offset, Amt, &AmtWritten); } -BenError -CBenValue::WriteImmediateValueData(BenConstDataPtr pBuffer, - unsigned short Size) -{ - // Only one write can be an immediate value in current implementation - if (cValueSegments.GetFirst() != cValueSegments.GetTerminating() || - Size > 4) - return BenErr_InvalidImmediateWrite; - - if (Size == 0) - return BenErr_OK; - - new CBenValueSegment(this, pBuffer, Size); - return BenErr_OK; -} - -BenError -CBenValue::NewReference(BenObjectID ReferencedObjectID, pCBenReference - pReference) -{ - BenError Err; - - if (cpReferencedList == NULL) - { - pLtcBenContainer pContainer = cpProperty->GetContainer(); - - pCBenObject pNewObject; - if ((Err = pContainer->NewObject(&pNewObject)) != BenErr_OK) - return Err; - - pCBenValue pNewValue; - if ((Err = pNewObject->NewValue(BEN_PROPID_OBJ_REFERENCES, - BEN_TYPEID_OBJ_REFERENCES_DATA, &pNewValue)) != BenErr_OK) - { - delete pNewObject; - return Err; - } - - cpReferencedList = pNewValue; - cReferencedObjectsSize = 0; - } - - BenByte Buffer[8]; - UtPutIntelDWord(Buffer, ReferencedObjectID); - UtPutIntelDWord(Buffer + 4, ReferencedObjectID); - - UtPutIntelDWord(pReference->GetData(), ReferencedObjectID); - - if ((Err = cpReferencedList->WriteValueData(Buffer, - cReferencedObjectsSize, 8)) != BenErr_OK) - return Err; - - cReferencedObjectsSize += 8; - return BenErr_OK; -} - -BenObjectID -CBenValue::GetReferencedObject(pCBenReference pReference) -{ - return UtGetIntelDWord(pReference->GetData()); -} - -BenObjectID -CBenValue::GetReferencedListID() -{ - if (cpReferencedList != NULL) - return cpReferencedList->GetProperty()->GetBenObject()->GetID(); - else - { -#ifdef BENUTIL_SUPPORT - return cReferencedListID; -#else - return 0; -#endif - } -} }//end namespace OpenStormBento /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/lwpsdwrect.cxx b/lotuswordpro/source/filter/lwpsdwrect.cxx index b84b2520e77a..0fb18519e55b 100644 --- a/lotuswordpro/source/filter/lwpsdwrect.cxx +++ b/lotuswordpro/source/filter/lwpsdwrect.cxx @@ -222,12 +222,4 @@ double SdwRectangle::CalcDistBetween2Points(long nX1, long nY1, long nX2, long n return sqrt((double)((nX1-nX2)*(nX1-nX2) + (nY1-nY2)*(nY1-nY2))); } -Rectangle SdwRectangle::GetOriginalRect(const Point& rCenter, long nHalfWidth, long nHalfHeight) -{ - Point aLT(rCenter.X()-nHalfWidth, rCenter.Y()-nHalfHeight); - Point aRB(rCenter.X()+nHalfWidth, rCenter.Y()+nHalfHeight); - - return Rectangle(aLT, aRB); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/lotuswordpro/source/filter/lwpsdwrect.hxx b/lotuswordpro/source/filter/lwpsdwrect.hxx index 074077d05872..0b2b401184b5 100644 --- a/lotuswordpro/source/filter/lwpsdwrect.hxx +++ b/lotuswordpro/source/filter/lwpsdwrect.hxx @@ -121,9 +121,6 @@ public: double GetRotationAngle() const; static double CalcDistBetween2Points(long nX1, long nY1, long nX2, long nY2); - - static Rectangle GetOriginalRect(const Point& rCenter, long nHalfWidth, long nHalfHeight); - }; #endif diff --git a/lotuswordpro/source/filter/utlist.cxx b/lotuswordpro/source/filter/utlist.cxx index d68b49cbe20c..55fa883a17a5 100644 --- a/lotuswordpro/source/filter/utlist.cxx +++ b/lotuswordpro/source/filter/utlist.cxx @@ -91,72 +91,6 @@ CUtList::~CUtList() pTerminating->SetNext(pTerminating); } -int -CUtList::GetCount() -{ - int Count = 0; - - pCUtListElmt pTerminating = GetTerminating(); - for (pCUtListElmt pCurr = GetFirst(); pCurr != pTerminating; - pCurr = pCurr->GetNext()) - { - Count++; - } - return Count; -} - -pCUtListElmt -CUtList::GetIndex(int Index) -{ - int Count = 0; - - pCUtListElmt pTerminating = GetTerminating(); - for (pCUtListElmt pCurr = GetFirst(); pCurr != pTerminating; - pCurr = pCurr->GetNext()) - { - if (Count == Index) - return pCurr; - Count++; - } - return NULL; -} - -int -CUtList::GetIndex(pCUtListElmt pNode) -{ - int Count = 0; - - pCUtListElmt pTerminating = GetTerminating(); - for (pCUtListElmt pCurr = GetFirst(); pCurr != pTerminating; - pCurr = pCurr->GetNext()) - { - if (pNode == pCurr) - break; - Count++; - } - return Count; -} - -// If pCurr is last item in list, returns first item in list (terminating -// item is skipped when circle around) -pCUtListElmt -CUtList::CircularGetNext(pConstCUtListElmt pCurr) -{ - pCUtListElmt pNext = pCurr->GetNext(); - if (pNext == GetTerminating()) - pNext = GetFirst(); - return pNext; -} - -pCUtListElmt -CUtList::CircularGetPrev(pConstCUtListElmt pCurr) -{ - pCUtListElmt pPrev = pCurr->GetPrev(); - if (pPrev == GetTerminating()) - pPrev = GetLast(); - return pPrev; -} - // If pCurr is NULL, returns first item in list. Otherwise, returns item // in list after pCurr or NULL if no more items in list. Terminating item // is never returned @@ -173,22 +107,6 @@ CUtList::GetNextOrNULL(pCUtListElmt pCurr) return pNext; } -// If pCurr is NULL, returns last item in list. Otherwise, returns item -// in list before pCurr or NULL if no more items in list. Terminating item -// is never returned -pCUtListElmt -CUtList::GetPrevOrNULL(pCUtListElmt pCurr) -{ - pCUtListElmt pPrev; - - if (pCurr == NULL) - pPrev = GetLast(); - else pPrev = pCurr->GetPrev(); - if (pPrev == GetTerminating()) - pPrev = NULL; - return pPrev; -} - void CUtList::Destroy() { diff --git a/lotuswordpro/source/filter/utlist.hxx b/lotuswordpro/source/filter/utlist.hxx index 1e318bd9726b..29f7fc39645e 100644 --- a/lotuswordpro/source/filter/utlist.hxx +++ b/lotuswordpro/source/filter/utlist.hxx @@ -128,17 +128,11 @@ public: // Methods pCUtListElmt GetFirst() { return cDummyElmt.GetNext(); } pCUtListElmt GetLast() { return cDummyElmt.GetPrev(); } pCUtListElmt GetTerminating() { return &cDummyElmt; } - pCUtListElmt CircularGetNext(pConstCUtListElmt pCurr); - pCUtListElmt CircularGetPrev(pConstCUtListElmt pCurr); pCUtListElmt GetNextOrNULL(pCUtListElmt pCurr); - pCUtListElmt GetPrevOrNULL(pCUtListElmt pCurr); UtBool IsEmpty() { return GetFirst() == GetTerminating(); }; UtBool ContainsAtLeastTwoItems() { return GetFirst() != GetLast(); }; - int GetCount(void); void Destroy(void); - pCUtListElmt GetIndex(int Index); - int GetIndex(pCUtListElmt pNode); private: // Data CUtListElmt cDummyElmt; |