Kaydet (Commit) 226d310c authored tarafından Petr Vorel's avatar Petr Vorel Kaydeden (comit) Caolán McNamara

remove unused code (oox)

üst 19648377
...@@ -77,19 +77,6 @@ OUString SAL_CALL WordVbaProjectFilter_getImplementationName() throw() ...@@ -77,19 +77,6 @@ OUString SAL_CALL WordVbaProjectFilter_getImplementationName() throw()
return CREATE_OUSTRING( "com.sun.star.comp.oox.WordVbaProjectFilter" ); return CREATE_OUSTRING( "com.sun.star.comp.oox.WordVbaProjectFilter" );
} }
Sequence< OUString > SAL_CALL WordVbaProjectFilter_getSupportedServiceNames() throw()
{
Sequence< OUString > aSeq( 1 );
aSeq[ 0 ] = CREATE_OUSTRING( "com.sun.star.document.ImportFilter" );
return aSeq;
}
Reference< XInterface > SAL_CALL WordVbaProjectFilter_createInstance(
const Reference< XComponentContext >& rxContext ) throw( Exception )
{
return static_cast< ::cppu::OWeakObject* >( new WordVbaProjectFilter( rxContext ) );
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
WordVbaProjectFilter::WordVbaProjectFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) : WordVbaProjectFilter::WordVbaProjectFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) :
......
...@@ -129,16 +129,7 @@ private: ...@@ -129,16 +129,7 @@ private:
Trying to read over the record limits results in a stream error. The Trying to read over the record limits results in a stream error. The
isValid() function indicates that by returning false. From now on the data isValid() function indicates that by returning false. From now on the data
returned by the read functions is undefined. The error state will be reset, returned by the read functions is undefined. The error state will be reset,
if the record is reset (with the function resetRecord()), or if the next if the next record is started.
record is started.
To switch off the automatic lookup of CONTINUE records, use resetRecord()
with false parameter. This is useful e.g. on import of drawing layer data,
where sometimes solely CONTINUE records will occur. The automatic lookup
keeps switched off until the method resetRecord() is called with parameter
true. All other settings done on the stream (e.g. alternative CONTINUE
record identifier, enabled decryption, NUL substitution character) will be
reset to default values, if a new record is started.
The import stream supports decrypting the stream data. The contents of a The import stream supports decrypting the stream data. The contents of a
record (not the record header) will be encrypted by Excel if the file has record (not the record header) will be encrypted by Excel if the file has
...@@ -189,22 +180,6 @@ public: ...@@ -189,22 +180,6 @@ public:
*/ */
bool startRecordByHandle( sal_Int64 nRecHandle ); bool startRecordByHandle( sal_Int64 nRecHandle );
/** Sets stream pointer to begin of record content.
@param bContLookup
Automatic CONTINUE lookup on/off. In difference to other stream
settings, this setting is persistent until next call of this
function (because it is wanted to receive the next CONTINUE records
separately).
@param nAltContId
Sets an alternative record identifier for content continuation.
This value is reset automatically when a new record is started with
startNextRecord().
*/
void resetRecord(
bool bContLookup,
sal_uInt16 nAltContId = BIFF_ID_UNKNOWN );
/** Sets stream pointer before current record and invalidates stream. /** Sets stream pointer before current record and invalidates stream.
The next call to startNextRecord() will start again the current record. The next call to startNextRecord() will start again the current record.
......
...@@ -110,8 +110,6 @@ public: ...@@ -110,8 +110,6 @@ public:
/** Returns the absolute position in the wrapped binary stream. */ /** Returns the absolute position in the wrapped binary stream. */
sal_Int64 tellBase() const; sal_Int64 tellBase() const;
/** Returns the total size of the wrapped binary stream. */
sal_Int64 sizeBase() const;
// BinaryOutputStream interface (stream write access) --------------------- // BinaryOutputStream interface (stream write access) ---------------------
...@@ -120,9 +118,6 @@ public: ...@@ -120,9 +118,6 @@ public:
/** Writes nBytes bytes from the passed buffer pMem. */ /** Writes nBytes bytes from the passed buffer pMem. */
virtual void writeMemory( const void* pMem, sal_Int32 nBytes, size_t nAtomSize = 1 ); virtual void writeMemory( const void* pMem, sal_Int32 nBytes, size_t nAtomSize = 1 );
/** Writes a sequence of nBytes bytes with the passed value. */
void fill( sal_uInt8 nValue, sal_Int32 nBytes, size_t nAtomSize = 1 );
/** Stream operator for all data types supported by the writeValue() function. */ /** Stream operator for all data types supported by the writeValue() function. */
template< typename Type > template< typename Type >
inline BiffOutputStream& operator<<( Type nValue ) { writeValue( nValue ); return *this; } inline BiffOutputStream& operator<<( Type nValue ) { writeValue( nValue ); return *this; }
......
...@@ -95,8 +95,6 @@ public: ...@@ -95,8 +95,6 @@ public:
/** Returns true, if the object list is empty. */ /** Returns true, if the object list is empty. */
inline bool empty() const { return maObjects.empty(); } inline bool empty() const { return maObjects.empty(); }
/** Appends the passed object to the list of objects. */
void append( const BiffDrawingObjectRef& rxDrawingObj );
/** Tries to insert the passed object into the last group or appends it. */ /** Tries to insert the passed object into the last group or appends it. */
void insertGrouped( const BiffDrawingObjectRef& rxDrawingObj ); void insertGrouped( const BiffDrawingObjectRef& rxDrawingObj );
...@@ -197,8 +195,6 @@ private: ...@@ -197,8 +195,6 @@ private:
void importObjBiff4( BiffInputStream& rStrm ); void importObjBiff4( BiffInputStream& rStrm );
/** Reads the contents of a BIFF5 OBJ record. */ /** Reads the contents of a BIFF5 OBJ record. */
void importObjBiff5( BiffInputStream& rStrm ); void importObjBiff5( BiffInputStream& rStrm );
/** Reads the contents of a BIFF8 OBJ record. */
void importObjBiff8( BiffInputStream& rStrm );
private: private:
ShapeAnchor maAnchor; /// Position of the drawing object. ShapeAnchor maAnchor; /// Position of the drawing object.
......
...@@ -64,11 +64,6 @@ OUString BiffDetector_getImplementationName() ...@@ -64,11 +64,6 @@ OUString BiffDetector_getImplementationName()
return CREATE_OUSTRING( "com.sun.star.comp.oox.xls.BiffDetector" ); return CREATE_OUSTRING( "com.sun.star.comp.oox.xls.BiffDetector" );
} }
Reference< XInterface > SAL_CALL BiffDetector_createInstance( const Reference< XComponentContext >& rxContext ) throw( Exception )
{
return static_cast< ::cppu::OWeakObject* >( new BiffDetector( rxContext ) );
}
// ============================================================================ // ============================================================================
BiffDetector::BiffDetector( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) : BiffDetector::BiffDetector( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) :
......
...@@ -213,17 +213,6 @@ bool BiffInputStream::startRecordByHandle( sal_Int64 nRecHandle ) ...@@ -213,17 +213,6 @@ bool BiffInputStream::startRecordByHandle( sal_Int64 nRecHandle )
return startNextRecord(); return startNextRecord();
} }
void BiffInputStream::resetRecord( bool bContLookup, sal_uInt16 nAltContId )
{
if( isInRecord() )
{
mbCont = bContLookup;
mnAltContId = nAltContId;
restartRecord( true );
maRecBuffer.enableDecoder( true );
}
}
void BiffInputStream::rewindRecord() void BiffInputStream::rewindRecord()
{ {
rewindToRecord( mnRecHandle ); rewindToRecord( mnRecHandle );
......
...@@ -107,11 +107,6 @@ sal_Int64 BiffOutputStream::tellBase() const ...@@ -107,11 +107,6 @@ sal_Int64 BiffOutputStream::tellBase() const
return maRecBuffer.getBaseStream().tell(); return maRecBuffer.getBaseStream().tell();
} }
sal_Int64 BiffOutputStream::sizeBase() const
{
return maRecBuffer.getBaseStream().size();
}
// BinaryOutputStream interface (stream write access) ------------------------- // BinaryOutputStream interface (stream write access) -------------------------
void BiffOutputStream::writeData( const StreamDataSequence& rData, size_t nAtomSize ) void BiffOutputStream::writeData( const StreamDataSequence& rData, size_t nAtomSize )
...@@ -136,17 +131,6 @@ void BiffOutputStream::writeMemory( const void* pMem, sal_Int32 nBytes, size_t n ...@@ -136,17 +131,6 @@ void BiffOutputStream::writeMemory( const void* pMem, sal_Int32 nBytes, size_t n
} }
} }
void BiffOutputStream::fill( sal_uInt8 nValue, sal_Int32 nBytes, size_t nAtomSize )
{
sal_Int32 nBytesLeft = nBytes;
while( nBytesLeft > 0 )
{
sal_uInt16 nBlockSize = prepareWriteBlock( nBytesLeft, nAtomSize );
maRecBuffer.fill( nValue, nBlockSize );
nBytesLeft -= nBlockSize;
}
}
// private -------------------------------------------------------------------- // private --------------------------------------------------------------------
sal_uInt16 BiffOutputStream::prepareWriteBlock( sal_Int32 nTotalSize, size_t nAtomSize ) sal_uInt16 BiffOutputStream::prepareWriteBlock( sal_Int32 nTotalSize, size_t nAtomSize )
......
...@@ -230,11 +230,6 @@ BiffDrawingObjectContainer::BiffDrawingObjectContainer() ...@@ -230,11 +230,6 @@ BiffDrawingObjectContainer::BiffDrawingObjectContainer()
{ {
} }
void BiffDrawingObjectContainer::append( const BiffDrawingObjectRef& rxDrawingObj )
{
maObjects.push_back( rxDrawingObj );
}
void BiffDrawingObjectContainer::insertGrouped( const BiffDrawingObjectRef& rxDrawingObj ) void BiffDrawingObjectContainer::insertGrouped( const BiffDrawingObjectRef& rxDrawingObj )
{ {
if( !maObjects.empty() ) if( !maObjects.empty() )
...@@ -745,72 +740,6 @@ void BiffDrawingObjectBase::importObjBiff5( BiffInputStream& rStrm ) ...@@ -745,72 +740,6 @@ void BiffDrawingObjectBase::importObjBiff5( BiffInputStream& rStrm )
implReadObjBiff5( rStrm, nNameLen, nMacroSize ); implReadObjBiff5( rStrm, nNameLen, nMacroSize );
} }
void BiffDrawingObjectBase::importObjBiff8( BiffInputStream& rStrm )
{
// back to beginning
rStrm.seekToStart();
bool bLoop = true;
while( bLoop && (rStrm.getRemaining() >= 4) )
{
sal_uInt16 nSubRecId, nSubRecSize;
rStrm >> nSubRecId >> nSubRecSize;
sal_Int64 nStrmPos = rStrm.tell();
// sometimes the last subrecord has an invalid length (OBJLBSDATA) -> min()
nSubRecSize = static_cast< sal_uInt16 >( ::std::min< sal_Int64 >( nSubRecSize, rStrm.getRemaining() ) );
switch( nSubRecId )
{
case BIFF_ID_OBJCMO:
OSL_ENSURE( rStrm.tell() == 4, "BiffDrawingObjectBase::importObjBiff8 - unexpected OBJCMO subrecord" );
if( (rStrm.tell() == 4) && (nSubRecSize >= 6) )
{
sal_uInt16 nObjFlags;
rStrm >> mnObjType >> mnObjId >> nObjFlags;
mbPrintable = getFlag( nObjFlags, BIFF_OBJCMO_PRINTABLE );
}
break;
case BIFF_ID_OBJMACRO:
readMacroBiff8( rStrm );
break;
case BIFF_ID_OBJEND:
bLoop = false;
break;
default:
implReadObjBiff8SubRec( rStrm, nSubRecId, nSubRecSize );
}
// seek to end of subrecord
rStrm.seek( nStrmPos + nSubRecSize );
}
/* Call doReadObj8SubRec() with BIFF_ID_OBJEND for further stream
processing (e.g. charts), even if the OBJEND subrecord is missing. */
implReadObjBiff8SubRec( rStrm, BIFF_ID_OBJEND, 0 );
/* Pictures that Excel reads from BIFF5 and writes to BIFF8 still have the
IMGDATA record following the OBJ record (but they use the image data
stored in DFF). The IMGDATA record may be continued by several CONTINUE
records. But the last CONTINUE record may be in fact an MSODRAWING
record that contains the DFF data of the next drawing object! So we
have to skip just enough CONTINUE records to look at the next
MSODRAWING/CONTINUE record. */
if( (rStrm.getNextRecId() == BIFF3_ID_IMGDATA) && rStrm.startNextRecord() )
{
rStrm.skip( 4 );
sal_Int64 nDataSize = rStrm.readuInt32();
nDataSize -= rStrm.getRemaining();
// skip following CONTINUE records until IMGDATA ends
while( (nDataSize > 0) && (rStrm.getNextRecId() == BIFF_ID_CONT) && rStrm.startNextRecord() )
{
OSL_ENSURE( nDataSize >= rStrm.getRemaining(), "BiffDrawingObjectBase::importObjBiff8 - CONTINUE too long" );
nDataSize -= ::std::min( rStrm.getRemaining(), nDataSize );
}
OSL_ENSURE( nDataSize == 0, "BiffDrawingObjectBase::importObjBiff8 - missing CONTINUE records" );
// next record may be MSODRAWING or CONTINUE or anything else
}
}
// ============================================================================ // ============================================================================
BiffPlaceholderObject::BiffPlaceholderObject( const WorksheetHelper& rHelper ) : BiffPlaceholderObject::BiffPlaceholderObject( const WorksheetHelper& rHelper ) :
......
...@@ -212,20 +212,6 @@ OUString SAL_CALL ExcelBiffFilter_getImplementationName() throw() ...@@ -212,20 +212,6 @@ OUString SAL_CALL ExcelBiffFilter_getImplementationName() throw()
return CREATE_OUSTRING( "com.sun.star.comp.oox.xls.ExcelBiffFilter" ); return CREATE_OUSTRING( "com.sun.star.comp.oox.xls.ExcelBiffFilter" );
} }
Sequence< OUString > SAL_CALL ExcelBiffFilter_getSupportedServiceNames() throw()
{
Sequence< OUString > aSeq( 2 );
aSeq[ 0 ] = CREATE_OUSTRING( "com.sun.star.document.ImportFilter" );
aSeq[ 1 ] = CREATE_OUSTRING( "com.sun.star.document.ExportFilter" );
return aSeq;
}
Reference< XInterface > SAL_CALL ExcelBiffFilter_createInstance(
const Reference< XComponentContext >& rxContext ) throw( Exception )
{
return static_cast< ::cppu::OWeakObject* >( new ExcelBiffFilter( rxContext ) );
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
ExcelBiffFilter::ExcelBiffFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) : ExcelBiffFilter::ExcelBiffFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) :
...@@ -295,19 +281,6 @@ OUString SAL_CALL ExcelVbaProjectFilter_getImplementationName() throw() ...@@ -295,19 +281,6 @@ OUString SAL_CALL ExcelVbaProjectFilter_getImplementationName() throw()
return CREATE_OUSTRING( "com.sun.star.comp.oox.xls.ExcelVbaProjectFilter" ); return CREATE_OUSTRING( "com.sun.star.comp.oox.xls.ExcelVbaProjectFilter" );
} }
Sequence< OUString > SAL_CALL ExcelVbaProjectFilter_getSupportedServiceNames() throw()
{
Sequence< OUString > aSeq( 1 );
aSeq[ 0 ] = CREATE_OUSTRING( "com.sun.star.document.ImportFilter" );
return aSeq;
}
Reference< XInterface > SAL_CALL ExcelVbaProjectFilter_createInstance(
const Reference< XComponentContext >& rxContext ) throw( Exception )
{
return static_cast< ::cppu::OWeakObject* >( new ExcelVbaProjectFilter( rxContext ) );
}
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
ExcelVbaProjectFilter::ExcelVbaProjectFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) : ExcelVbaProjectFilter::ExcelVbaProjectFilter( const Reference< XComponentContext >& rxContext ) throw( RuntimeException ) :
......
...@@ -125,11 +125,6 @@ OUString OOXMLFormulaParser_getImplementationName() ...@@ -125,11 +125,6 @@ OUString OOXMLFormulaParser_getImplementationName()
return CREATE_OUSTRING( "com.sun.star.comp.oox.xls.FormulaParser" ); return CREATE_OUSTRING( "com.sun.star.comp.oox.xls.FormulaParser" );
} }
Reference< XInterface > SAL_CALL OOXMLFormulaParser_createInstance( const Reference< XComponentContext >& ) throw( Exception )
{
return static_cast< ::cppu::OWeakObject* >( new OOXMLFormulaParser );
}
// ============================================================================ // ============================================================================
OOXMLFormulaParser::OOXMLFormulaParser() OOXMLFormulaParser::OOXMLFormulaParser()
......
...@@ -877,15 +877,7 @@ oox::dump::TextStreamObjectBase::construct(oox::dump::InputObjectBase const&, un ...@@ -877,15 +877,7 @@ oox::dump::TextStreamObjectBase::construct(oox::dump::InputObjectBase const&, un
oox::dump::XmlStreamObject::XmlStreamObject(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&) oox::dump::XmlStreamObject::XmlStreamObject(oox::dump::OutputObjectBase const&, oox::dump::BinaryInputStreamRef const&)
oox::formulaimport::XmlStream::AttributeList::hasAttribute(int) const oox::formulaimport::XmlStream::AttributeList::hasAttribute(int) const
oox::formulaimport::XmlStream::skipElement(int) oox::formulaimport::XmlStream::skipElement(int)
oox::ole::WordVbaProjectFilter_createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
oox::ole::WordVbaProjectFilter_getSupportedServiceNames()
oox::ppt::PPTShape::findPlaceholder(int, int, std::__debug::vector<boost::shared_ptr<oox::drawingml::Shape>, std::allocator<boost::shared_ptr<oox::drawingml::Shape> > >&) oox::ppt::PPTShape::findPlaceholder(int, int, std::__debug::vector<boost::shared_ptr<oox::drawingml::Shape>, std::allocator<boost::shared_ptr<oox::drawingml::Shape> > >&)
oox::xls::BiffDetector_createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
oox::xls::BiffDrawingObjectBase::importObjBiff8(oox::xls::BiffInputStream&)
oox::xls::BiffDrawingObjectContainer::append(boost::shared_ptr<oox::xls::BiffDrawingObjectBase> const&)
oox::xls::BiffInputStream::resetRecord(bool, unsigned short)
oox::xls::BiffOutputStream::fill(unsigned char, int, unsigned long)
oox::xls::BiffOutputStream::sizeBase() const
oox::xls::BiffOutputStream::startRecord(unsigned short) oox::xls::BiffOutputStream::startRecord(unsigned short)
oox::xls::BiffOutputStream::tellBase() const oox::xls::BiffOutputStream::tellBase() const
oox::xls::BinAddress::write(oox::xls::BiffOutputStream&, bool, bool) const oox::xls::BinAddress::write(oox::xls::BiffOutputStream&, bool, bool) const
...@@ -895,11 +887,6 @@ oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange ...@@ -895,11 +887,6 @@ oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange
oox::xls::CellBlock::isBefore(oox::ValueRange const&) const oox::xls::CellBlock::isBefore(oox::ValueRange const&) const
oox::xls::CellBlock::isExpandable(oox::ValueRange const&) const oox::xls::CellBlock::isExpandable(oox::ValueRange const&) const
oox::xls::CellBlock::startNextRow() oox::xls::CellBlock::startNextRow()
oox::xls::ExcelBiffFilter_createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
oox::xls::ExcelBiffFilter_getSupportedServiceNames()
oox::xls::ExcelVbaProjectFilter_createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
oox::xls::ExcelVbaProjectFilter_getSupportedServiceNames()
oox::xls::OOXMLFormulaParser_createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
oox::xls::prv::BiffOutputRecordBuffer::BiffOutputRecordBuffer(oox::BinaryOutputStream&, unsigned short) oox::xls::prv::BiffOutputRecordBuffer::BiffOutputRecordBuffer(oox::BinaryOutputStream&, unsigned short)
psp::PrinterGfx::DrawBitmap(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterBmp const&) psp::PrinterGfx::DrawBitmap(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterBmp const&)
psp::PrinterGfx::DrawMask(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterColor&) psp::PrinterGfx::DrawMask(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterColor&)
......
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