[Libreoffice-commits] .: lotuswordpro/source
Michael Meeks
mmeeks at kemper.freedesktop.org
Mon Oct 18 11:33:50 PDT 2010
lotuswordpro/source/filter/benname.cxx | 9
lotuswordpro/source/filter/bento.hxx | 21 -
lotuswordpro/source/filter/benval.cxx | 86 ------
lotuswordpro/source/filter/explode.cxx | 134 ----------
lotuswordpro/source/filter/lwp9reader.cxx | 36 --
lotuswordpro/source/filter/lwpfilter.cxx | 64 ----
lotuswordpro/source/filter/lwpobjfactory.cxx | 15 -
lotuswordpro/source/filter/lwpobjfactory.hxx | 25 -
lotuswordpro/source/filter/lwpoleobject.cxx | 348 ---------------------------
lotuswordpro/source/filter/lwppara.cxx | 56 ----
lotuswordpro/source/filter/utbenvs.cxx | 121 ---------
lotuswordpro/source/filter/utlist.cxx | 41 ---
lotuswordpro/source/filter/utlist.hxx | 7
13 files changed, 3 insertions(+), 960 deletions(-)
New commits:
commit 83c0e9c40c35db07bbbc9570b673fe1d1acfd931
Author: Povilas Kanapickas <povilas.kanapickas at gmail.com>
Date: Mon Oct 18 19:33:02 2010 +0100
remove non-compiled code
diff --git a/lotuswordpro/source/filter/benname.cxx b/lotuswordpro/source/filter/benname.cxx
index 42bdcbc..d75ce2b 100644
--- a/lotuswordpro/source/filter/benname.cxx
+++ b/lotuswordpro/source/filter/benname.cxx
@@ -56,15 +56,6 @@
#include "first.hxx"
namespace OpenStormBento
{
-#if 0
-CBenNamedObject::CBenNamedObject(pLtcBenContainer pContainer,
- BenObjectID ObjectID, pCBenObject pPrevObject, const char * sName,
- pCBenNamedObjectListElmt pPrevNamedObjectListElmt) :
- CBenObject(pContainer, ObjectID, pPrevObject), csName(sName),
- cNameListElmt(this, pPrevNamedObjectListElmt)
-{
-}
-#endif
// changed by to remove warning 2004-06-24
CBenNamedObject::CBenNamedObject(pLtcBenContainer pContainer,
BenObjectID ObjectID, pCBenObject pPrevObject, const char * sName,
diff --git a/lotuswordpro/source/filter/bento.hxx b/lotuswordpro/source/filter/bento.hxx
index 9b64b2b..7a67720 100644
--- a/lotuswordpro/source/filter/bento.hxx
+++ b/lotuswordpro/source/filter/bento.hxx
@@ -237,18 +237,6 @@ public:
~LtcUtBenValueStream();
public: // Overridden methods
-#if 0 // Deleted by 2004-06-16
- UtError Open(UtBool /* OpenNew */, UtStrmOpenFlags /* Flags */);
- UtError Close();
- UtError Seek(long Offset, UtSeekMode Mode);
- UtError GetPosition(unsigned long * pPosition);
- UtError GetSize(unsigned long * pSize);
- UtError Read(UtStrmDataPtr pBuffer, unsigned long MaxSize,
- unsigned long * pAmtRead);
- UtError Write(UtConstStrmDataPtr pBuffer, unsigned long Size,
- unsigned long * pAmtWritten);
- UtError Flush();
-#endif
/* added by */
CBenValue * GetValue(){ return cpValue; };
@@ -261,9 +249,6 @@ protected: // Overridden methods
virtual void SetSize( ULONG nSize );
virtual void FlushData();
-#if 0// Deleted by 2004-06-16
- UtError TruncateSize(unsigned long Size);
-#endif
private: // Data
pCBenValue cpValue;
unsigned long cCurrentPosition;
@@ -428,12 +413,6 @@ public:
pLtcBenContainer GetContainer() { return GetBenObject()->GetContainer(); }
public: // Internal methods
-#if 0
- CBenProperty(pCBenObject pObject, BenObjectID PropertyID,
- BenObjectID TypeID, pCBenIDListElmt pPrevProperty) :
- CBenIDListElmt(PropertyID, pPrevProperty), cValue(this, TypeID)
- { cpObject = pObject; }
-#endif
// changed by to remove WARNING here 2004-06-24
CBenProperty(pCBenObject pObject, BenObjectID PropertyID,
BenObjectID TypeID, pCBenIDListElmt pPrevProperty) :
diff --git a/lotuswordpro/source/filter/benval.cxx b/lotuswordpro/source/filter/benval.cxx
index b597596..9ff1cbc 100644
--- a/lotuswordpro/source/filter/benval.cxx
+++ b/lotuswordpro/source/filter/benval.cxx
@@ -149,92 +149,6 @@ BenError
CBenValue::WriteValueData(BenConstDataPtr /*pWriteBuffer*/, unsigned long /*Offset*/,
unsigned long /*Amt*/, unsigned long * /*pAmtWritten*/)
{
-#if 0// Deleted by 2004-06-16
- unsigned long AmtWritten;
- if (pAmtWritten == NULL)
- pAmtWritten = &AmtWritten;
-
- *pAmtWritten = 0;
-
- if (Amt == 0)
- return BenErr_OK;
-
- unsigned long SegOffset = 0;
- pCBenValueSegment pCurrSeg = NULL;
- BenError Err;
- pLtcBenContainer pContainer = GetContainer();
- BenConstByteDataPtr pBuffer = (BenConstByteDataPtr) pWriteBuffer;
-
- while ((pCurrSeg = GetNextValueSegment(pCurrSeg)) != NULL)
- {
- if (Amt == 0)
- return BenErr_OK;
-
- if (SegOffset <= Offset && Offset < SegOffset + pCurrSeg->GetSize())
- {
- unsigned long OffsetIntoSeg = Offset - SegOffset;
-
- unsigned long AmtThisSeg = UtMin(Amt, pCurrSeg->GetSize() -
- OffsetIntoSeg);
-
- if (pCurrSeg->IsImmediate())
- {
- UtHugeMemcpy(pCurrSeg->GetImmediateData() + OffsetIntoSeg,
- pBuffer, AmtThisSeg);
- *pAmtWritten += AmtThisSeg;
- }
- else
- {
- if ((Err = pContainer->SeekToPosition(pCurrSeg->GetPosition()
- + OffsetIntoSeg)) != BenErr_OK)
- return Err;
-
- unsigned long AmtWrittenThisWrite;
- Err = pContainer->Write(pBuffer, AmtThisSeg,
- &AmtWrittenThisWrite);
- *pAmtWritten += AmtWrittenThisWrite;
- if (Err != BenErr_OK)
- return Err;
- }
-
- pBuffer += AmtThisSeg;
- Offset += AmtThisSeg;
- Amt -= AmtThisSeg;
- }
-
- SegOffset += pCurrSeg->GetSize();
- }
-
- if (Offset > SegOffset)
- {
- assert(! "Write past end of value");
- return BenErr_InvalidWriteOffset;
- }
-
- if (Amt == 0)
- return BenErr_OK;
-
- if ((Err = pContainer->SeekFromEnd(0)) != BenErr_OK)
- return Err;
-
- BenContainerPos EndFilePos;
- if ((Err = pContainer->GetPosition(&EndFilePos)) != BenErr_OK)
- return Err;
-
- unsigned long AmtWrittenThisWrite;
- Err = pContainer->Write(pBuffer, Amt, &AmtWrittenThisWrite);
- *pAmtWritten += AmtWrittenThisWrite;
- if (Err != BenErr_OK)
- return Err;
-
- pCBenValueSegment pLastSeg = (pCBenValueSegment) (
- cValueSegments.GetLast() == cValueSegments.GetTerminating() ?
- NULL : cValueSegments.GetLast() );
- if (pLastSeg != NULL && ! pLastSeg->IsImmediate() &&
- pLastSeg->GetPosition() + pLastSeg->GetSize() == EndFilePos)
- pLastSeg->SetSize(pLastSeg->GetSize() + Amt);
- else new CBenValueSegment(this, EndFilePos, Amt);
-#endif
return BenErr_OK;
}
diff --git a/lotuswordpro/source/filter/explode.cxx b/lotuswordpro/source/filter/explode.cxx
index 2671bb0..6db3a0b 100644
--- a/lotuswordpro/source/filter/explode.cxx
+++ b/lotuswordpro/source/filter/explode.cxx
@@ -432,140 +432,6 @@ void Decompression::ConstructTree2()
{
m_Tree2->InsertNode(i, Tree2String[i]);
}
-#if 0
- m_Tree2 = new HuffmanTreeNode();
- //Huffman Tree #2
- //The second huffman code tree contains the distance values. It can be built from the following table:
- //value (hex) code (binary)
- //00 11
- //01 1011
- //02 1010
- //03 1001 1
- //04 1001 0
- //05 1000 1
- //06 1000 0
- //07 0111 11
- //08 0111 10
- //09 0111 01
- //0a 0111 00
- //0b 0110 11
- //0c 0110 10
- //0d 0110 01
- //0e 0110 00
- //0f 0101 11
- m_Tree2->InsertNode(0x0, "11");
- m_Tree2->InsertNode(0x1, "1011");
- m_Tree2->InsertNode(0x2, "1010");
- m_Tree2->InsertNode(0x3, "10011");
- m_Tree2->InsertNode(0x4, "10010");
- m_Tree2->InsertNode(0x5, "10001");
- m_Tree2->InsertNode(0x6, "10000");
- m_Tree2->InsertNode(0x7, "011111");
- m_Tree2->InsertNode(0x8, "011110");
- m_Tree2->InsertNode(0x9, "011101");
- m_Tree2->InsertNode(0x0a, "011100");
- m_Tree2->InsertNode(0x0b, "011011");
- m_Tree2->InsertNode(0x0c, "011010");
- m_Tree2->InsertNode(0x0d, "011001");
- m_Tree2->InsertNode(0x0e, "011000");
- m_Tree2->InsertNode(0x0f, "010111");
- //10 0101 10
- //11 0101 01
- //12 0101 00
- //13 0100 11
- //14 0100 10
- //15 0100 01
- //16 0100 001
- //17 0100 000
- //18 0011 111
- //19 0011 110
- // 1a 0011 101
- // 1b 0011 100
- // 1c 0011 011
- // 1d 0011 010
- // 1e 0011 001
- // 1f 0011 000
- m_Tree2->InsertNode(0x10, "010110");
- m_Tree2->InsertNode(0x11, "010101");
- m_Tree2->InsertNode(0x12, "010100");
- m_Tree2->InsertNode(0x13, "010011");
- m_Tree2->InsertNode(0x14, "010010");
- m_Tree2->InsertNode(0x15, "010001");
- m_Tree2->InsertNode(0x16, "0100001");
- m_Tree2->InsertNode(0x17, "0100000");
- m_Tree2->InsertNode(0x18, "0011111");
- m_Tree2->InsertNode(0x19, "0011110");
- m_Tree2->InsertNode(0x1a, "0011101");
- m_Tree2->InsertNode(0x1b, "0011100");
- m_Tree2->InsertNode(0x1c, "0011011");
- m_Tree2->InsertNode(0x1d, "0011010");
- m_Tree2->InsertNode(0x1e, "0011001");
- m_Tree2->InsertNode(0x1f, "0011000");
- //20 0010 111
- //21 0010 110
- //22 0010 101
- //23 0010 100
- //24 0010 011
- //25 0010 010
- //26 0010 001
- //27 0010 000
- //28 0001 111
- //29 0001 110
- // 2a 0001 101
- // 2b 0001 100
- // 2c 0001 011
- // 2d 0001 010
- // 2e 0001 001
- // 2f 0001 000
- m_Tree2->InsertNode(0x20, "0010111");
- m_Tree2->InsertNode(0x21, "0010110");
- m_Tree2->InsertNode(0x22, "0010101");
- m_Tree2->InsertNode(0x23, "0010100");
- m_Tree2->InsertNode(0x24, "0010011");
- m_Tree2->InsertNode(0x25, "0010010");
- m_Tree2->InsertNode(0x26, "0010001");
- m_Tree2->InsertNode(0x27, "0010000");
- m_Tree2->InsertNode(0x28, "0001111");
- m_Tree2->InsertNode(0x29, "0001110");
- m_Tree2->InsertNode(0x2a, "0001101");
- m_Tree2->InsertNode(0x2b, "0001100");
- m_Tree2->InsertNode(0x2c, "0001011");
- m_Tree2->InsertNode(0x2d, "0001010");
- m_Tree2->InsertNode(0x2e, "0001001");
- m_Tree2->InsertNode(0x2f, "0001000");
- //30 0000 1111
- //31 0000 1110
- //32 0000 1101
- //33 0000 1100
- //34 0000 1011
- //35 0000 1010
- //36 0000 1001
- //37 0000 1000
- //38 0000 0111
- //39 0000 0110
- // 3a 0000 0101
- // 3b 0000 0100
- // 3c 0000 0011
- // 3d 0000 0010
- // 3e 0000 0001
- // 3f 0000 0000
- m_Tree2->InsertNode(0x30, "00001111");
- m_Tree2->InsertNode(0x31, "00001110");
- m_Tree2->InsertNode(0x32, "00001101");
- m_Tree2->InsertNode(0x33, "00001100");
- m_Tree2->InsertNode(0x34, "00001011");
- m_Tree2->InsertNode(0x35, "00001010");
- m_Tree2->InsertNode(0x36, "00001001");
- m_Tree2->InsertNode(0x37, "00001000");
- m_Tree2->InsertNode(0x38, "00000111");
- m_Tree2->InsertNode(0x39, "00000110");
- m_Tree2->InsertNode(0x3a, "00000101");
- m_Tree2->InsertNode(0x3b, "00000100");
- m_Tree2->InsertNode(0x3c, "00000011");
- m_Tree2->InsertNode(0x3d, "00000010");
- m_Tree2->InsertNode(0x3e, "00000001");
- m_Tree2->InsertNode(0x3f, "00000000");
-#endif
//where bits should be read from the left to the right.
}
/**
diff --git a/lotuswordpro/source/filter/lwp9reader.cxx b/lotuswordpro/source/filter/lwp9reader.cxx
index ec7fa83..7184fd5 100644
--- a/lotuswordpro/source/filter/lwp9reader.cxx
+++ b/lotuswordpro/source/filter/lwp9reader.cxx
@@ -98,42 +98,6 @@ void Lwp9Reader::Read()
*/
void Lwp9Reader::ReadOleObjects()
{
-#if 0
-#ifdef WIN32
- if(m_pObjMgr)
- {
- // Get the buffer of the whole file
- LwpSvStream* pRawStream = m_pDocStream;
- sal_Int64 nCurPos = pRawStream->Tell();
- sal_uInt32 nSize = static_cast<sal_uInt32>(pRawStream->Seek(STREAM_SEEK_TO_END));
- BYTE* pBuf = new BYTE[nSize];
-
- if(pBuf == NULL) // this buffer may be too big
- {
- assert(sal_False);
- return;
- }
- pRawStream->Seek(STREAM_SEEK_TO_BEGIN);
- pRawStream->Read(pBuf,nSize);
- pRawStream->Seek(nCurPos);
-
- // Break the buffer into separate objects by ASWAN lib
- BYTE* pOut = NULL;
- sal_uInt32 nWritten;
- CBenStorageConverter benConverter;
- benConverter.Convert(pBuf, nSize, (void**)&pOut, &nWritten);
- delete[] pBuf;
-
- if (NULL != pOut)
- {
- SvStream* pMemStream = new SvMemoryStream(pOut, nWritten, STREAM_READ|STREAM_WRITE);
- SvStorageRef objStor = new SvStorage(pMemStream, true); // set true to let SvStorage free the memstream.
- m_pObjMgr->SetOleObjInfo(objStor);
- }
-
- }
-#endif
-#endif
}
/**
* @descr Read the LWP7 object.
diff --git a/lotuswordpro/source/filter/lwpfilter.cxx b/lotuswordpro/source/filter/lwpfilter.cxx
index 00185e8..4b740b4 100644
--- a/lotuswordpro/source/filter/lwpfilter.cxx
+++ b/lotuswordpro/source/filter/lwpfilter.cxx
@@ -326,65 +326,6 @@ Sequence< OUString> LWPFilterImportFilter::getSupportedServiceNames( void ) thro
}
return ret;
}
-#if 0
-EXTERN_C void SAL_CALL
-component_getImplementationEnvironment(const sal_Char** ppEnvTypeName, uno_Environment** ppEnv)
-{
- *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
-}
-
-EXTERN_C sal_Bool SAL_CALL
-component_writeInfo(void* pServiceManager, void* pRegistryKey)
-{
- if (pRegistryKey)
- {
- try
- {
- uno::Reference< XRegistryKey > xKey( reinterpret_cast<XRegistryKey*>(pRegistryKey) );
-
- uno::Reference< XRegistryKey > xNewKey = xKey->createKey( OUString::createFromAscii( IMPLEMENTATION_NAME ) );
- xNewKey = xNewKey->createKey( OUString::createFromAscii( "/UNO/SERVICES" ) );
-
- xNewKey->createKey( OUString::createFromAscii( STR_SERVICE_NAME ) );
-
- return sal_True;
- }
- catch (InvalidRegistryException &)
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
- }
- }
- return sal_False;
-}
-
-EXTERN_C void* SAL_CALL
-component_getFactory(const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey)
-{
- void * pRet = 0;
-
- if(pServiceManager )
- {
- uno::Reference< XSingleServiceFactory > xRet;
- uno::Reference< XMultiServiceFactory > xSMgr = reinterpret_cast< XMultiServiceFactory * > ( pServiceManager );
-
- OUString aImplementationName = OUString::createFromAscii( pImplName );
-
- if(aImplementationName == OUString::createFromAscii( STR_IMPLEMENTATION_NAME ) )
- {
- xRet = createSingleFactory( xSMgr, aImplementationName,
- LWPFilterImportFilter_CreateInstance,
- LWPFilterImportFilter::getSupportedServiceNames_Static() );
- }
- if (xRet.is())
- {
- xRet->acquire();
- pRet = xRet.get();
- }
- }
-
- return pRet;
-}
-#endif
/**
* @descr decompressed small file
@@ -533,11 +474,6 @@ sal_Bool IsWordProStr(const sal_Int8 *pBuf)
{
0x57, 0x6F, 0x72, 0x64,
0x50, 0x72, 0x6F
-#if 0
- , 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0
-#endif
};
for(size_t i=0; i<sizeof(pLotusLwp); ++i)
{
diff --git a/lotuswordpro/source/filter/lwpobjfactory.cxx b/lotuswordpro/source/filter/lwpobjfactory.cxx
index 19c226c..077a65e 100644
--- a/lotuswordpro/source/filter/lwpobjfactory.cxx
+++ b/lotuswordpro/source/filter/lwpobjfactory.cxx
@@ -740,21 +740,6 @@ LwpObject* LwpObjectFactory::QueryObject(const LwpObjectID &objID)
}
return obj;
}
-#if 0
-#ifdef WIN32
-void LwpObjectFactory::SetOleObjInfo(SvStorageRef& objStor)
-{
- m_objStor = objStor;
- m_objStor->FillInfoList(&m_infoList); //Fill all objects into a list from then storage.
-}
-
-void LwpObjectFactory::GetOleObjInfo(SvStorageRef & objStor, SvStorageInfoList ** ppInfoList)
-{
- objStor = m_objStor;
- *ppInfoList = &m_infoList;
-}
-#endif
-#endif
/**
* @descr find object in the factory per the object id
diff --git a/lotuswordpro/source/filter/lwpobjfactory.hxx b/lotuswordpro/source/filter/lwpobjfactory.hxx
index a9f33e1..bb63fab 100644
--- a/lotuswordpro/source/filter/lwpobjfactory.hxx
+++ b/lotuswordpro/source/filter/lwpobjfactory.hxx
@@ -69,18 +69,7 @@
#include "lwpobj.hxx"
#include "lwpobjhdr.hxx"
#include "lwpidxmgr.hxx"
-#if 0
-#ifdef WIN32
-#include <so3/svstor.hxx>
-#include <so3/outplace.hxx>
-#include <so3/ipobj.hxx>
-#include <so3/factory.hxx>
-#include <svx/svdoole2.hxx>
-#include <svx/svdpage.hxx>
-#include <sfx2/objsh.hxx>
-#include <sot/storinfo.hxx>
-#endif //WIN32
-#endif
+
/**
* @brief object factory used for lwp object creation and maintenance
*/
@@ -124,17 +113,7 @@ public:
void ReleaseObject(const LwpObjectID &objID);
void ReadIndex(LwpSvStream* pStrm);
LwpIndexManager* GetIndexManager(){return &m_IndexMgr;}
-#if 0
-// for OLE objects in current wordpro file
-#ifdef WIN32
-private:
- SvStorageRef m_objStor;
- SvStorageInfoList m_infoList;
-public:
- void SetOleObjInfo(SvStorageRef & objStor);
- void GetOleObjInfo(SvStorageRef & objStor, SvStorageInfoList ** ppInfoList);
-#endif
-#endif
+
};
#endif
diff --git a/lotuswordpro/source/filter/lwpoleobject.cxx b/lotuswordpro/source/filter/lwpoleobject.cxx
index 699da41..8a0e359 100644
--- a/lotuswordpro/source/filter/lwpoleobject.cxx
+++ b/lotuswordpro/source/filter/lwpoleobject.cxx
@@ -280,241 +280,10 @@ void LwpOleObject::GetChildStorageName(char *pObjName)
*/
void LwpOleObject::Parse(IXFStream* /*pOutputStream*/)
{
-#if 0
-#ifdef WIN32
-
- //
- // Construct OLE object storage name
- //
- char sObjectName[MAX_STREAMORSTORAGENAME];
- GetChildStorageName(sObjectName);
- String aObjName= String::CreateFromAscii(sObjectName);
-
- //
- // Get OLE objects information
- //
- LwpGlobalMgr* pGlobal = LwpGlobalMgr::GetInstance();
- LwpObjectFactory* pObjMgr = pGlobal->GetLwpObjFactory();
- SvStorageRef objStor;
- SvStorageInfoList * pInfoList;
- pObjMgr->GetOleObjInfo(objStor, &pInfoList);
-
- if(pInfoList == NULL)
- {
- assert(sal_False);
- return;
- }
-
- //
- // Get ole object buffer
- //
- BYTE * pBuf = NULL;
- sal_uInt32 nSize = 0;
- for (sal_uInt32 j=0; j<pInfoList->Count(); j++)
- {
-
- SvStorageInfo& rInfo = pInfoList->GetObject(j);
- String aName = rInfo.GetName();
-
- if(aName == aObjName)
- {
- SvStorageRef childStor;
- childStor = objStor->OpenStorage(rInfo.GetName());
- SvStorage * aEleStor;
- aEleStor = objStor->OpenOLEStorage( rInfo.GetName() );
- SvInPlaceObjectRef xInplaceObj( ((SvFactory*)SvInPlaceObject::ClassFactory())->CreateAndLoad( childStor ) );
- SvOutPlaceObjectRef xOutplaceObj(xInplaceObj);
- aEleStor->SetVersion( SOFFICE_FILEFORMAT_60 );
- SvStream *pStream=xOutplaceObj->GetOLEObjectStream(aEleStor);
-
- //Get Ole original size
- m_SizeRect = xOutplaceObj->GetVisSize(xOutplaceObj->GetViewAspect());
-
- nSize = pStream->Seek( STREAM_SEEK_TO_END );
- pBuf = new BYTE[nSize];
- if (pBuf == NULL)
- {
- assert(sal_False);
- return;
- }
- pStream->Seek(0);
- pStream->Read(pBuf, nSize);
-
- delete pStream;
- break;
- }
- }
-
- //
- // dump the buffer by XFilter
- //
- if(pBuf != NULL)
- {
- // set ole buffer
- XFOleObject *pOleObj = new XFOleObject();
- pOleObj->SetOleData(pBuf, nSize);
-
- // set frame attributes
- pOleObj->SetAnchorType(enumXFAnchorPara);
- double fWidth = 0;
- double fHeight = 0;
- GetGrafScaledSize( fWidth, fHeight);
- if(fWidth < 0.001 || fHeight < 0.001)
- {
- fWidth = 5.0;
- fHeight = 5.0;
- }
- pOleObj->SetWidth(fWidth);
- pOleObj->SetHeight(fHeight);
- /*
- pOleObj->SetName(A2OUSTR("TestOle"));
- pOleObj->SetX(5);
- pOleObj->SetY(5);
- pOleObj->SetWidth(5);
- pOleObj->SetHeight(5);
- */
-
- // To XML
- XFParagraph *pPara = new XFParagraph();
- pPara->Add(pOleObj);
- pPara->ToXml(pOutputStream);
-
- delete pPara; // pOleObj will be deleted inside
-
-#if 0
- // dump to file
- String aTempDir( SvtPathOptions().GetTempPath() );
- sal_Int32 nLength = aTempDir.Len();
- if ( aTempDir.GetChar(nLength-1 ) !=UChar32( '/' ) )
- aTempDir += String::CreateFromAscii("/");
-
- aTempDir += aObjName;
- SvFileStream aStream(aTempDir, STREAM_WRITE);
- aStream.Write(pBuf, nSize);
- aStream.Close();
-#endif
- delete []pBuf;
-
- // dump attributes to
- }
-
- return;
-#endif
-#endif
}
void LwpOleObject::XFConvert(XFContentContainer * /*pCont*/)
{
-#if 0
- //Add by 10/24/2005
- //Get ole object stream with the object name;
-
- // modified by
- // if small file, use the compressed stream for BENTO
- LwpSvStream* pStream = m_pStrm->GetCompressedStream() ? m_pStrm->GetCompressedStream(): m_pStrm;
- // end modified by
-
- OpenStormBento::LtcBenContainer* pBentoContainer;
- ULONG ulRet = OpenStormBento::BenOpenContainer(pStream, &pBentoContainer);
-
- char sObjectName[MAX_STREAMORSTORAGENAME];
- GetChildStorageName(sObjectName);
- std::string aObjName(sObjectName);
- SotStorageStreamRef xOleObjStm = pBentoContainer->ConvertAswStorageToOLE2Stream(aObjName.c_str());
-
- //Get stream size and data
- if(!xOleObjStm.Is() || xOleObjStm->GetError())
- return;
-
-
- BYTE * pBuf = NULL;
- sal_uInt32 nSize = 0;
-
- SvStorageRef xOleObjStor = new SvStorage( *xOleObjStm );
- //SvStorageRef xOleObjStor = pBentoContainer->CreateOLEStorageWithObjectName(aObjName.c_str());
- if( !xOleObjStor.Is())
- return ;
-
- SvInPlaceObjectRef xInplaceObj( ((SvFactory*)SvInPlaceObject::ClassFactory())->CreateAndLoad( xOleObjStor ) );
-
-
- //when the OLE object is converted into native object.
-// SvOutPlaceObjectRef xOutplaceObj(xInplaceObj);
-// xOutplaceObj->SetVersion( SOFFICE_FILEFORMAT_60 );
-// SvStream *pOleStream=xOutplaceObj->GetOLEObjectStream(xOleObjStor);
- //Get Ole original size
- m_SizeRect = GetOLEObjectSize(xOleObjStor);
- //End by
-
- nSize = xOleObjStm->Seek( STREAM_SEEK_TO_END );
- pBuf = new BYTE[nSize];
- if (pBuf == NULL)
- {
- assert(sal_False);
- return;
- }
- xOleObjStm->Seek(0);
- xOleObjStm->Read(pBuf, nSize);
-
- //delete pOleStream;
-
-
- //End by
-
- //
- // dump the buffer by XFilter
- //
- if(pBuf != NULL)
- {
- // set ole buffer
- XFOleObject *pOleObj = new XFOleObject();
- pOleObj->SetOleData(pBuf, nSize);
-
- // set frame attributes
- pOleObj->SetAnchorType(enumXFAnchorFrame);
- pOleObj->SetStyleName( m_strStyleName);
- LwpFrameLayout* pMyFrameLayout = static_cast<LwpFrameLayout*>(GetLayout(NULL));
- if(pMyFrameLayout)
- {
- pOleObj->SetX(pMyFrameLayout->GetMarginsValue(MARGIN_LEFT));
- pOleObj->SetY(pMyFrameLayout->GetMarginsValue(MARGIN_TOP));
- }
-
- double fWidth = 0;
- double fHeight = 0;
- GetGrafScaledSize( fWidth, fHeight);
- if(fWidth < 0.001 || fHeight < 0.001)
- {
- fWidth = 5.0;
- fHeight = 5.0;
- }
-
-
- pOleObj->SetWidth(fWidth);
- pOleObj->SetHeight(fHeight);
-
-
- //delete pPara; // pOleObj will be deleted inside
- pCont->Add(pOleObj);
-
-#if 0
- // dump to file
- String aTempDir( SvtPathOptions().GetTempPath() );
- sal_Int32 nLength = aTempDir.Len();
- if ( aTempDir.GetChar(nLength-1 ) !=UChar32( '/' ) )
- aTempDir += String::CreateFromAscii("/");
-
- aTempDir += aObjName;
- SvFileStream aStream(aTempDir, STREAM_WRITE);
- aStream.Write(pBuf, nSize);
- aStream.Close();
-#endif
- delete []pBuf;
-
- // dump attributes to
- }
-#endif
- return;
}
void LwpOleObject::GetGrafOrgSize(double & rWidth, double & rHeight)
@@ -525,19 +294,6 @@ void LwpOleObject::GetGrafOrgSize(double & rWidth, double & rHeight)
void LwpOleObject::RegisterStyle()
{
-#if 0
-#ifdef WIN32
- LwpVirtualLayout* pMyLayout = GetLayout(NULL);
- if(pMyLayout->IsFrame())
- {
- XFFrameStyle* pXFFrameStyle = new XFFrameStyle();
- pXFFrameStyle->SetXPosType(enumXFFrameXPosFromLeft, enumXFFrameXRelFrame);
- pXFFrameStyle->SetYPosType(enumXFFrameYPosFromTop, enumXFFrameYRelPara);
- XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- m_strStyleName = pXFStyleManager->AddStyle(pXFFrameStyle)->GetStyleName();
- }
-#endif
-#endif
}
@@ -591,110 +347,6 @@ Rectangle LwpOleObject::GetOLEObjectSize( SotStorage * pStor ) const
*/
BOOL LwpOlePres::Read( SvStream & /*rStm*/ )
{
-#if 0
- ULONG nBeginPos = rStm.Tell();
- INT32 n;
- rStm >> n;
- if( n != -1 )
- {
- pBmp = new Bitmap;
- rStm >> *pBmp;
- if( rStm.GetError() == SVSTREAM_OK )
- {
- nFormat = FORMAT_BITMAP;
- aSize = pBmp->GetPrefSize();
- MapMode aMMSrc;
- if( !aSize.Width() || !aSize.Height() )
- {
- // letzte Chance
- aSize = pBmp->GetSizePixel();
- aMMSrc = MAP_PIXEL;
- }
- else
- aMMSrc = pBmp->GetPrefMapMode();
- MapMode aMMDst( MAP_100TH_MM );
- aSize = OutputDevice::LogicToLogic( aSize, aMMSrc, aMMDst );
- return TRUE;
- }
- else
- {
- delete pBmp;
- pBmp = NULL;
-
- pMtf = new GDIMetaFile();
- rStm.ResetError();
- rStm >> *pMtf;
- if( rStm.GetError() == SVSTREAM_OK )
- {
- nFormat = FORMAT_GDIMETAFILE;
- aSize = pMtf->GetPrefSize();
- MapMode aMMSrc = pMtf->GetPrefMapMode();
- MapMode aMMDst( MAP_100TH_MM );
- aSize = OutputDevice::LogicToLogic( aSize, aMMSrc, aMMDst );
- return TRUE;
- }
- else
- {
- delete pMtf;
- pMtf = NULL;
- }
- }
-
- }
-
- rStm.ResetError();
- rStm.Seek( nBeginPos );
- nFormat = ReadClipboardFormat( rStm );
- // JobSetup, bzw. TargetDevice ueberlesen
- // Information aufnehmen, um sie beim Schreiben nicht zu verlieren
- nJobLen = 0;
- rStm >> nJobLen;
- if( nJobLen >= 4 )
- {
- nJobLen -= 4;
- if( nJobLen )
- {
- pJob = new BYTE[ nJobLen ];
- rStm.Read( pJob, nJobLen );
- }
- }
- else
- {
- rStm.SetError( SVSTREAM_GENERALERROR );
- return FALSE;
- }
- UINT32 nAsp;
- rStm >> nAsp;
- USHORT nSvAsp = USHORT( nAsp );
- SetAspect( nSvAsp );
- rStm.SeekRel( 4 ); //L-Index ueberlesen
- rStm >> nAdvFlags;
- rStm.SeekRel( 4 ); //Compression
- UINT32 nWidth = 0;
- UINT32 nHeight = 0;
- UINT32 nSize = 0;
- rStm >> nWidth >> nHeight >> nSize;
- aSize.Width() = nWidth;
- aSize.Height() = nHeight;
-
- if( nFormat == FORMAT_GDIMETAFILE )
- {
- pMtf = new GDIMetaFile();
- ReadWindowMetafile( rStm, *pMtf );
- }
- else if( nFormat == FORMAT_BITMAP )
- {
- pBmp = new Bitmap();
- rStm >> *pBmp;
- }
- else
- {
- void * p = new BYTE[ nSize ];
- rStm.Read( p, nSize );
- delete p;
- return FALSE;
- }
-#endif
return TRUE;
}
diff --git a/lotuswordpro/source/filter/lwppara.cxx b/lotuswordpro/source/filter/lwppara.cxx
index 4554062..4a9e108 100644
--- a/lotuswordpro/source/filter/lwppara.cxx
+++ b/lotuswordpro/source/filter/lwppara.cxx
@@ -958,39 +958,6 @@ XFContentContainer* LwpPara::AddBulletList(XFContentContainer* pCont)
/*LwpStory* pMyStory =*/ GetStory();
pBulletStyleMgr->SetContinueFlag(m_bBullContinue);
-#if 0
- if (m_pSilverBullet->IsBulletOrdered())
- {
- LwpObjectID aSilverBulletID = pBulletStyleMgr->GetCurrentSilverBullet();
- if (aSilverBulletID.IsNull())
- {
- pBulletStyleMgr->SetContinueFlag(sal_False);
- }
- else if (pMyStory && pMyStory->IsBullStyleUsedBefore(m_aBulletStyleName, this->m_aParaNumbering.GetPosition()))
- {
- pBulletStyleMgr->SetContinueFlag(sal_True);
- }
-/* else if (aSilverBulletID == *(m_pSilverBullet->GetObjectID()))
- {
- LwpNumberingOverride* pNumOver = pBulletStyleMgr->GetCurrentNumOver();
- if (!pNumOver)
- {
- pBulletStyleMgr->SetContinueFlag(sal_False);
- }
- else if (m_aParaNumbering.GetPosition() == pNumOver->GetPosition())
- {
- pBulletStyleMgr->SetContinueFlag(sal_True);
- }
- }
- else
- {
- pBulletStyleMgr->SetContinueFlag(sal_False);
- }
-*/
- pBulletStyleMgr->SetCurrentNumOver(m_aParaNumbering);
- pBulletStyleMgr->SetCurrentSilverBullet(*(m_pSilverBullet->GetObjectID()));
- }
-#endif
if (m_pSilverBullet->IsBulletOrdered())
{
@@ -1011,29 +978,6 @@ XFContentContainer* LwpPara::AddBulletList(XFContentContainer* pCont)
LwpNumberingOverride* LwpPara::GetParaNumbering()
{
return &m_aParaNumbering;
-#if 0
- LwpNumberingOverride* pNumbering = NULL;
- LwpParaStyle* pStyle = this->GetParaStyle();
- if (pStyle)
- {
- pNumbering = pStyle->GetNumberingOverride();
- }
-
- if (pNumbering)
- {
-/* if (m_pParaNumbering)
- {
- m_pParaNumbering->Override(pNumbering);
- }*/
- m_aParaNumbering.Override(pNumbering);
- return pNumbering;
- }
- else
- {
-// return m_pParaNumbering;
- return &m_aParaNumbering;
- }
-#endif
}
void LwpForked3NotifyList::Read(LwpObjectStream* pObjStrm)
diff --git a/lotuswordpro/source/filter/utbenvs.cxx b/lotuswordpro/source/filter/utbenvs.cxx
index ba142b8..a14e6c3 100644
--- a/lotuswordpro/source/filter/utbenvs.cxx
+++ b/lotuswordpro/source/filter/utbenvs.cxx
@@ -164,128 +164,7 @@ LtcUtBenValueStream::LtcUtBenValueStream(pCBenValue pValue)
LtcUtBenValueStream::~LtcUtBenValueStream()
{
}
-#if 0 // Deleted by 2004-06-16
-UtError
-CUtBenValueStream::Open(UtBool /* OpenNew */, UtStrmOpenFlags /* Flags */)
-{
- cCurrentPosition = 0;
- return UtErr_OK;
-}
-
-UtError
-CUtBenValueStream::Close()
-{
- return UtErr_OK;
-}
-
-UtError
-CUtBenValueStream::Seek(long Offset, UtSeekMode Mode)
-{
- unsigned long NewPos;
-
- if (Mode == UtSeek_FromStart)
- NewPos = (unsigned long) Offset;
- else if (Mode == UtSeek_FromCurr)
- {
- if (Offset < 0 && cCurrentPosition < (unsigned long) -Offset)
- return UtErr_SeekError;
- NewPos = cCurrentPosition + Offset;
- }
- else if (Mode == UtSeek_FromEnd)
- {
- unsigned long ValueSize = cpValue->GetValueSize();
- if (Offset < 0 && ValueSize < (unsigned long) -Offset)
- return UtErr_SeekError;
- NewPos = ValueSize + Offset;
- }
- else
- {
- UT_ASSERT(! "Illegal seek");
- return UtErr_SeekError;
- }
-
- cCurrentPosition = NewPos;
- return UtErr_OK;
-}
-
-UtError
-CUtBenValueStream::GetPosition(unsigned long * pPosition)
-{
- *pPosition = cCurrentPosition;
- return UtErr_OK;
-}
-
-UtError
-CUtBenValueStream::GetSize(unsigned long * pSize)
-{
- *pSize = cpValue->GetValueSize();
- return UtErr_OK;
-}
-UtError
-CUtBenValueStream::Read(UtStrmDataPtr pBuffer, unsigned long MaxSize,
- unsigned long * pAmtRead)
-{
- unsigned long AmtLeft;
- GetAmountLeft(&AmtLeft);
-
- unsigned long AmtShouldRead = UtMin(MaxSize, AmtLeft);
-
- BenError Err = cpValue->ReadValueData(pBuffer, cCurrentPosition, MaxSize,
- pAmtRead);
- cCurrentPosition += *pAmtRead;
-
- return BenToUtError(Err);
-}
-
-UtError
-CUtBenValueStream::Write(UtConstStrmDataPtr pBuffer, unsigned long Size,
- unsigned long * pAmtWritten)
-{
- BenError Err;
-
- *pAmtWritten = 0;
-
- // IStream::Write semantics are that when write zero bytes, doesn't fill
- // in gap
- if (Size == 0)
- return UtErr_OK;
-
- // See if anybody exercies code below
- //UT_ASSERT(cCurrentPosition <= (long) cpValue->GetValueSize());
-
- // Fill out "gap" in data, if there is one, with nulls
- while (cCurrentPosition > cpValue->GetValueSize())
- if ((Err = cpValue->WriteValueData("", cpValue->GetValueSize(), 1,
- NULL)) != BenErr_OK)
- return BenToUtError(Err);
-
- unsigned long AmtWritten;
- Err = cpValue->WriteValueData(pBuffer, cCurrentPosition, Size,
- &AmtWritten);
-
- //UT_ASSERT(Size == AmtWritten);
-
- cCurrentPosition += AmtWritten;
-
- *pAmtWritten = AmtWritten;
-
- return BenToUtError(Err);
-}
-
-UtError
-CUtBenValueStream::TruncateSize(unsigned long Size)
-{
- return BenToUtError(cpValue->TruncateValueSize(Size));
-}
-
-UtError
-CUtBenValueStream::Flush()
-{
- return UtErr_OK;
-
-}
-#endif
} // end namespace OpenStormBento
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/lotuswordpro/source/filter/utlist.cxx b/lotuswordpro/source/filter/utlist.cxx
index aa578e2..0acd2db 100644
--- a/lotuswordpro/source/filter/utlist.cxx
+++ b/lotuswordpro/source/filter/utlist.cxx
@@ -187,48 +187,7 @@ CUtList::GetPrevOrNULL(pCUtListElmt pCurr)
pPrev = NULL;
return pPrev;
}
-#if 0 // Deleted by 2004-06-16
-// Does an insertion sort on list. If list is already sorted, takes O(n)
-// time. Assumes elements are of type CUtComparableListElmt
-void
-CUtList::Sort(LCID LangID)
-{
- pCUtListElmt pSortedTo = GetFirst();
-
- // Before each iteration, list is sorted up to, but not including,
- // pSortedTo. On each iteration, we look backwards through sorted portion
- // of list searching for spot that pSortedTo should go and move it to that
- // location
- while (pSortedTo != GetTerminating())
- {
- pCUtListElmt pNextSortedTo = pSortedTo->GetNext();
-
- UtBool FoundSpot = UT_FALSE;
- for (pCUtListElmt pCurr = pSortedTo->GetPrev();
- pCurr != GetTerminating();
- pCurr = pCurr->GetPrev())
- {
- if (((pCUtComparableListElmt) pSortedTo)->
- Compare((pCUtComparableListElmt) pCurr, LangID) >= 0)
- {
- pSortedTo->Remove();
- pSortedTo->InsertAfter(pCurr);
- FoundSpot = UT_TRUE;
- break;
- }
- }
-
- if (! FoundSpot)
- {
- pSortedTo->Remove();
- pSortedTo->InsertAfter(GetTerminating()); // Add at beginning
- }
-
- pSortedTo = pNextSortedTo;
- }
-}
-#endif
void
CUtList::Destroy()
{
diff --git a/lotuswordpro/source/filter/utlist.hxx b/lotuswordpro/source/filter/utlist.hxx
index 4c7448b..7c44ecb 100644
--- a/lotuswordpro/source/filter/utlist.hxx
+++ b/lotuswordpro/source/filter/utlist.hxx
@@ -110,9 +110,6 @@ public: // Methods
CUtComparableListElmt(pCUtList pList) : CUtListElmt(pList) { ; }
public: // Pure virtual methods
-#if 0 // Deleted by 2004-06-16
- virtual int Compare(pCUtComparableListElmt pOther, LCID LangID = 0) = 0;
-#endif
};
@@ -133,9 +130,7 @@ public: // Methods
pCUtListElmt GetPrevOrNULL(pCUtListElmt pCurr);
UtBool IsEmpty() { return GetFirst() == GetTerminating(); };
UtBool ContainsAtLeastTwoItems() { return GetFirst() != GetLast(); };
-#if 0 // Deleted by 2004-06-16
-void Sort(LCID LangID = 0); // Assumes elements are of type CUtComparableListElmt
-#endif
+
int GetCount(void);
void Destroy(void);
pCUtListElmt GetIndex(int Index);
More information about the Libreoffice-commits
mailing list