Kaydet (Commit) 30c1a5f9 authored tarafından Caolán McNamara's avatar Caolán McNamara

callcatcher: unused methods

üst 1a44d29e
...@@ -158,117 +158,6 @@ using namespace container ; ...@@ -158,117 +158,6 @@ using namespace container ;
static sal_uInt32 nMSOleObjCntr = 0; static sal_uInt32 nMSOleObjCntr = 0;
#define MSO_OLE_Obj "MSO_OLE_Obj" #define MSO_OLE_Obj "MSO_OLE_Obj"
/*************************************************************************/
sal_Bool Impl_OlePres::Read( SvStream & rStm )
{
sal_uLong nBeginPos = rStm.Tell();
sal_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 sal_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 sal_True;
}
else
{
delete pMtf;
pMtf = NULL;
}
}
}
rStm.ResetError();
if (nBeginPos != rStm.Seek(nBeginPos))
return sal_False;
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 sal_uInt8[ nJobLen ];
rStm.Read( pJob, nJobLen );
}
}
else
{
rStm.SetError( SVSTREAM_GENERALERROR );
return sal_False;
}
sal_uInt32 nAsp(0);
rStm >> nAsp;
sal_uInt16 nSvAsp = sal_uInt16( nAsp );
SetAspect( nSvAsp );
rStm.SeekRel( 4 ); //L-Index ueberlesen
rStm >> nAdvFlags;
rStm.SeekRel( 4 ); //Compression
sal_uInt32 nWidth = 0;
sal_uInt32 nHeight = 0;
sal_uInt32 nSize = 0;
rStm >> nWidth >> nHeight >> nSize;
aSize.Width() = nWidth;
aSize.Height() = nHeight;
if( nFormat == FORMAT_GDIMETAFILE )
{
pMtf = new GDIMetaFile();
ReadWindowMetafile( rStm, *pMtf, NULL );
}
else if( nFormat == FORMAT_BITMAP )
{
pBmp = new Bitmap();
rStm >> *pBmp;
}
else
{
sal_uInt8 * p = new sal_uInt8[ nSize ];
rStm.Read( p, nSize );
delete [] p;
return sal_False;
}
return sal_True;
}
/************************************************************************/ /************************************************************************/
void Impl_OlePres::Write( SvStream & rStm ) void Impl_OlePres::Write( SvStream & rStm )
{ {
......
...@@ -69,8 +69,6 @@ public: ...@@ -69,8 +69,6 @@ public:
sal_uLong GetAdviseFlags() const { return nAdvFlags; } sal_uLong GetAdviseFlags() const { return nAdvFlags; }
void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; } void SetAdviseFlags( sal_uLong nAdv ) { nAdvFlags = nAdv; }
void SetSize( const Size & rSize ) { aSize = rSize; } void SetSize( const Size & rSize ) { aSize = rSize; }
/// return sal_False => unknown format
sal_Bool Read( SvStream & rStm );
void Write( SvStream & rStm ); void Write( SvStream & rStm );
}; };
......
...@@ -124,7 +124,6 @@ $(eval $(call gb_Library_add_exception_objects,lwpft,\ ...@@ -124,7 +124,6 @@ $(eval $(call gb_Library_add_exception_objects,lwpft,\
lotuswordpro/source/filter/lwpnumberingoverride \ lotuswordpro/source/filter/lwpnumberingoverride \
lotuswordpro/source/filter/lwpnumericfmt \ lotuswordpro/source/filter/lwpnumericfmt \
lotuswordpro/source/filter/lwpobj \ lotuswordpro/source/filter/lwpobj \
lotuswordpro/source/filter/lwpobjfactory \
lotuswordpro/source/filter/lwpobjhdr \ lotuswordpro/source/filter/lwpobjhdr \
lotuswordpro/source/filter/lwpobjid \ lotuswordpro/source/filter/lwpobjid \
lotuswordpro/source/filter/lwpobjstrm \ lotuswordpro/source/filter/lwpobjstrm \
......
...@@ -538,72 +538,9 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p ...@@ -538,72 +538,9 @@ BenError LtcBenContainer::CreateGraphicStream(SvStream * &pStream, const char *p
pStream = pMemStream; pStream = pMemStream;
return BenErr_OK; return BenErr_OK;
} }
/**
* Find ole object stream according to object name
* @date 10/24/2005
* @param
* @return the value ole storage stream pointers
*/
#include <tools/globname.hxx> #include <tools/globname.hxx>
SotStorageStreamRef LtcBenContainer::ConvertAswStorageToOLE2Stream(const char * sObjectName)
{
SotStorageStreamRef xOleObjStm;
SvStream* pOleStorageStream = NULL;
//Get Ole Storage stream
AswEntry aEntry;
pOleStorageStream = FindOLEStorageStreamWithObjectName(sObjectName, aEntry);
if( !pOleStorageStream )
return xOleObjStm;
//Find it, create Ole stream
//xOleObjStm = new SotStorageStream(String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "Ole-Object" ) ));
xOleObjStm = new SotStorageStream(String());
if( xOleObjStm->GetError() )
return xOleObjStm;
xOleObjStm->SetBufferSize( 0xff00 );
SotStorageRef xOleObjStor = new SotStorage( *xOleObjStm );
if( xOleObjStor->GetError() )
return xOleObjStm;
//Set class id
ClsId aClsId = aEntry.GetClassId();
SvGlobalName aGName( aClsId.n1, aClsId.n2, aClsId.n3, aClsId.n4,
aClsId.n5, aClsId.n6,aClsId.n7,aClsId.n8,
aClsId.n9,aClsId.n10,aClsId.n11);
xOleObjStor->SetClass( aGName, 0, String());
xOleObjStor->SetVersion( SOFFICE_FILEFORMAT_60 );
std::string aOleStreamName("OleStream");
sal_uInt32 nDLen = 0;
nDLen = GetSvStreamSize(pOleStorageStream);
for(sal_uInt32 nIndex = 0; nIndex < nDLen / ASWENTRY_SIZE; nIndex ++)
{
AswEntry aOleEntry;
ReadAswEntry(pOleStorageStream, aOleEntry);
if(aOleEntry.GetType()== BEN_STGTY_STREAM)
{
SvStream* pOleStream = FindObjectValueStreamWithObjectIDAndProperty(aOleEntry.GetObjectID(), aOleStreamName.c_str());
if(pOleStream)
{
String strName;
aOleEntry.GetName(strName);
SotStorageStreamRef xStm = xOleObjStor->OpenSotStream( strName );
if( xStm->GetError() )
break;
xStm->SetBufferSize( 8192 );
(*pOleStream) >> (*xStm);
xStm->Commit();
delete pOleStream;
pOleStream = NULL;
}
}
}
xOleObjStor->Commit();
xOleObjStm->Commit();
return xOleObjStm;
}
/** /**
* Find ole object storage stream data according to object name * Find ole object storage stream data according to object name
* @date 10/24/2005 * @date 10/24/2005
......
...@@ -299,7 +299,6 @@ public: // Internal methods ...@@ -299,7 +299,6 @@ public: // Internal methods
BenError CreateGraphicStreams(std::vector<SvStream *> * pStreamVector) ; BenError CreateGraphicStreams(std::vector<SvStream *> * pStreamVector) ;
BenError CreateGraphicStream(SvStream * &pStream, const char *pObjectName); BenError CreateGraphicStream(SvStream * &pStream, const char *pObjectName);
SotStorageStreamRef ConvertAswStorageToOLE2Stream(const char * sObjectName);
LtcUtBenValueStream * FindOLEStorageStreamWithObjectName(const char * sObjectName, AswEntry& rDirStruct); LtcUtBenValueStream * FindOLEStorageStreamWithObjectName(const char * sObjectName, AswEntry& rDirStruct);
void ReadAswEntry(SvStream * pStream, AswEntry& rEntry); void ReadAswEntry(SvStream * pStream, AswEntry& rEntry);
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: IBM Corporation
*
* Copyright: 2008 by IBM Corporation
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
/*************************************************************************
* @file
* For LWP filter architecture prototype
************************************************************************/
/*************************************************************************
* Change History
Jan 2005 Created
************************************************************************/
#include "lwpdefobj.hxx"
LwpDefaultObject::LwpDefaultObject(LwpObjectHeader &objHdr, LwpSvStream* pStrm)
:LwpObject(objHdr, pStrm),m_DataBuffer(NULL)
{}
LwpDefaultObject::~LwpDefaultObject()
{
if(m_DataBuffer)
{
delete [] m_DataBuffer;
m_DataBuffer = NULL;
}
}
void LwpDefaultObject::Read()
{
if(m_DataBuffer)
{
delete [] m_DataBuffer;
m_DataBuffer = NULL;
}
m_DataBuffer = new sal_uInt8[m_ObjHdr.GetSize()];
m_pObjStrm->QuickRead(m_DataBuffer, m_ObjHdr.GetSize());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
*
* - GNU Lesser General Public License Version 2.1
* - Sun Industry Standards Source License Version 1.1
*
* Sun Microsystems Inc., October, 2000
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2000 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
*
* Sun Industry Standards Source License Version 1.1
* =================================================
* The contents of this file are subject to the Sun Industry Standards
* Source License Version 1.1 (the "License"); You may not use this file
* except in compliance with the License. You may obtain a copy of the
* License at http://www.openoffice.org/license.html.
*
* Software provided under this License is provided on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
* See the License for the specific provisions governing your rights and
* obligations concerning the Software.
*
* The Initial Developer of the Original Code is: IBM Corporation
*
* Copyright: 2008 by IBM Corporation
*
* All Rights Reserved.
*
* Contributor(s): _______________________________________
*
*
************************************************************************/
/*************************************************************************
* @file
* For LWP filter architecture prototype
************************************************************************/
/*************************************************************************
* Change History
Jan 2005 Created
************************************************************************/
#ifndef LWPDEFAULTOBJECT_HXX_
#define LWPDEFAULTOBJECT_HXX_
#include "lwpobj.hxx"
#include "lwpheader.hxx"
class LwpDefaultObject : public LwpObject
{
public:
LwpDefaultObject(LwpObjectHeader &objHdr, LwpSvStream* pStrm);
~LwpDefaultObject();
private:
sal_uInt8 *m_DataBuffer;
public:
//inline sal_uInt8* GetBuffer(){return m_DataBuffer;}
void Read();
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -690,7 +690,6 @@ LwpObject* LwpObjectFactory::CreateObject(sal_uInt32 type, LwpObjectHeader &objH ...@@ -690,7 +690,6 @@ LwpObject* LwpObjectFactory::CreateObject(sal_uInt32 type, LwpObjectHeader &objH
//Unknown object type //Unknown object type
assert(false); assert(false);
newObj = NULL; newObj = NULL;
//newObj = new LwpDefaultObject(objHdr, m_pSvStream);
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment