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

remove unused code (oox, sc)

üst 04919d8f
...@@ -607,8 +607,6 @@ public: ...@@ -607,8 +607,6 @@ public:
/** Converts the passed packed number to a double. */ /** Converts the passed packed number to a double. */
static double calcDoubleFromRk( sal_Int32 nRkValue ); static double calcDoubleFromRk( sal_Int32 nRkValue );
/** Converts the passed double to a packed number, returns true on success. */
static bool calcRkFromDouble( sal_Int32& ornRkValue, double fValue );
/** Converts the passed BIFF error to a double containing the respective Calc error code. */ /** Converts the passed BIFF error to a double containing the respective Calc error code. */
static double calcDoubleFromError( sal_uInt8 nErrorCode ); static double calcDoubleFromError( sal_uInt8 nErrorCode );
...@@ -616,8 +614,6 @@ public: ...@@ -616,8 +614,6 @@ public:
/** Returns a text encoding from an Windows code page. /** Returns a text encoding from an Windows code page.
@return The corresponding text encoding or RTL_TEXTENCODING_DONTKNOW. */ @return The corresponding text encoding or RTL_TEXTENCODING_DONTKNOW. */
static rtl_TextEncoding calcTextEncodingFromCodePage( sal_uInt16 nCodePage ); static rtl_TextEncoding calcTextEncodingFromCodePage( sal_uInt16 nCodePage );
/** Returns a Windows code page from a text encoding. */
static sal_uInt16 calcCodePageFromTextEncoding( rtl_TextEncoding eTextEnc );
// BIFF12 import ---------------------------------------------------------- // BIFF12 import ----------------------------------------------------------
......
...@@ -87,7 +87,6 @@ private: ...@@ -87,7 +87,6 @@ private:
8224 bytes in BIFF8). 8224 bytes in BIFF8).
To start writing a record, call startRecord() with the record identifier. To start writing a record, call startRecord() with the record identifier.
Each record must be closed by calling endRecord().
If some data exceeds the record size limit, a CONTINUE record will be If some data exceeds the record size limit, a CONTINUE record will be
started automatically and the new data will be written to this record. If started automatically and the new data will be written to this record. If
...@@ -99,18 +98,11 @@ private: ...@@ -99,18 +98,11 @@ private:
class BiffOutputStream : public BinaryOutputStream class BiffOutputStream : public BinaryOutputStream
{ {
public: public:
explicit BiffOutputStream(
BinaryOutputStream& rOutStream,
sal_uInt16 nMaxRecSize );
// record control --------------------------------------------------------- // record control ---------------------------------------------------------
/** Starts a new record. */ /** Starts a new record. */
void startRecord( sal_uInt16 nRecId ); void startRecord( sal_uInt16 nRecId );
/** Finishes the current record. Must be called for every started record. */
void endRecord();
/** Sets size of data portion in bytes. 0 or 1 means no portions are used. */ /** Sets size of data portion in bytes. 0 or 1 means no portions are used. */
void setPortionSize( sal_uInt8 nSize ); void setPortionSize( sal_uInt8 nSize );
......
...@@ -125,8 +125,6 @@ public: ...@@ -125,8 +125,6 @@ public:
static BiffDrawingObjectRef importObjBiff4( const WorksheetHelper& rHelper, BiffInputStream& rStrm ); static BiffDrawingObjectRef importObjBiff4( const WorksheetHelper& rHelper, BiffInputStream& rStrm );
/** Reads the BIFF5 OBJ record, returns a new drawing object. */ /** Reads the BIFF5 OBJ record, returns a new drawing object. */
static BiffDrawingObjectRef importObjBiff5( const WorksheetHelper& rHelper, BiffInputStream& rStrm ); static BiffDrawingObjectRef importObjBiff5( const WorksheetHelper& rHelper, BiffInputStream& rStrm );
/** Reads the BIFF8 OBJ record, returns a new drawing object. */
static BiffDrawingObjectRef importObjBiff8( const WorksheetHelper& rHelper, BiffInputStream& rStrm );
/** Sets whether this is an area object (then its width and height must be greater than 0). */ /** Sets whether this is an area object (then its width and height must be greater than 0). */
inline void setAreaObj( bool bAreaObj ) { mbAreaObj = bAreaObj; } inline void setAreaObj( bool bAreaObj ) { mbAreaObj = bAreaObj; }
...@@ -452,10 +450,6 @@ public: ...@@ -452,10 +450,6 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape,
const ::com::sun::star::awt::Rectangle& rShapeRect ) = 0; const ::com::sun::star::awt::Rectangle& rShapeRect ) = 0;
protected:
/** Appends a new drawing object to the list of raw objects (without DFF data). */
void appendRawObject( const BiffDrawingObjectRef& rxDrawingObj );
private: private:
typedef RefMap< sal_uInt16, BiffDrawingObjectBase > BiffDrawingObjectMapById; typedef RefMap< sal_uInt16, BiffDrawingObjectBase > BiffDrawingObjectMapById;
typedef ::std::vector< sal_uInt16 > BiffObjIdVector; typedef ::std::vector< sal_uInt16 > BiffObjIdVector;
......
...@@ -212,20 +212,6 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm, ...@@ -212,20 +212,6 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm,
return aDecDbl.mfValue; return aDecDbl.mfValue;
} }
/*static*/ bool BiffHelper::calcRkFromDouble( sal_Int32& ornRkValue, double fValue )
{
if( lclCalcRkFromDouble( ornRkValue, fValue ) )
return true;
if( lclCalcRkFromDouble( ornRkValue, fValue * 100 ) )
{
ornRkValue |= BIFF_RK_100FLAG;
return true;
}
return false;
}
/*static*/ double BiffHelper::calcDoubleFromError( sal_uInt8 nErrorCode ) /*static*/ double BiffHelper::calcDoubleFromError( sal_uInt8 nErrorCode )
{ {
sal_uInt16 nApiError = 0x7FFF; sal_uInt16 nApiError = 0x7FFF;
...@@ -261,13 +247,6 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm, ...@@ -261,13 +247,6 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm,
return eTextEnc; return eTextEnc;
} }
/*static*/ sal_uInt16 BiffHelper::calcCodePageFromTextEncoding( rtl_TextEncoding eTextEnc )
{
sal_uInt32 nCodePage = rtl_getWindowsCodePageFromTextEncoding( eTextEnc );
OSL_ENSURE( (0 < nCodePage) && (nCodePage <= SAL_MAX_UINT16), "BiffHelper::calcCodePageFromTextEncoding - unknown text encoding" );
return static_cast< sal_uInt16 >( (nCodePage == 0) ? 1252 : nCodePage );
}
// BIFF12 import -------------------------------------------------------------- // BIFF12 import --------------------------------------------------------------
/*static*/ OUString BiffHelper::readString( SequenceInputStream& rStrm, bool b32BitLen, bool bAllowNulChars ) /*static*/ OUString BiffHelper::readString( SequenceInputStream& rStrm, bool b32BitLen, bool bAllowNulChars )
......
...@@ -85,14 +85,6 @@ void BiffOutputRecordBuffer::fill( sal_uInt8 nValue, sal_uInt16 nBytes ) ...@@ -85,14 +85,6 @@ void BiffOutputRecordBuffer::fill( sal_uInt8 nValue, sal_uInt16 nBytes )
// ============================================================================ // ============================================================================
BiffOutputStream::BiffOutputStream( BinaryOutputStream& rOutStream, sal_uInt16 nMaxRecSize ) :
BinaryStreamBase( true ),
maRecBuffer( rOutStream, nMaxRecSize ),
mnPortionSize( 0 ),
mnPortionPos( 0 )
{
}
// record control ------------------------------------------------------------- // record control -------------------------------------------------------------
void BiffOutputStream::startRecord( sal_uInt16 nRecId ) void BiffOutputStream::startRecord( sal_uInt16 nRecId )
...@@ -101,12 +93,6 @@ void BiffOutputStream::startRecord( sal_uInt16 nRecId ) ...@@ -101,12 +93,6 @@ void BiffOutputStream::startRecord( sal_uInt16 nRecId )
setPortionSize( 1 ); setPortionSize( 1 );
} }
void BiffOutputStream::endRecord()
{
setPortionSize( 1 );
maRecBuffer.endRecord();
}
void BiffOutputStream::setPortionSize( sal_uInt8 nSize ) void BiffOutputStream::setPortionSize( sal_uInt8 nSize )
{ {
OSL_ENSURE( mnPortionPos == 0, "BiffOutputStream::setPortionSize - block operation inside portion" ); OSL_ENSURE( mnPortionPos == 0, "BiffOutputStream::setPortionSize - block operation inside portion" );
......
...@@ -389,69 +389,6 @@ BiffDrawingObjectBase::~BiffDrawingObjectBase() ...@@ -389,69 +389,6 @@ BiffDrawingObjectBase::~BiffDrawingObjectBase()
return xDrawingObj; return xDrawingObj;
} }
/*static*/ BiffDrawingObjectRef BiffDrawingObjectBase::importObjBiff8( const WorksheetHelper& rHelper, BiffInputStream& rStrm )
{
BiffDrawingObjectRef xDrawingObj;
if( rStrm.getRemaining() >= 10 )
{
sal_uInt16 nSubRecId, nSubRecSize, nObjType;
rStrm >> nSubRecId >> nSubRecSize >> nObjType;
OSL_ENSURE( nSubRecId == BIFF_ID_OBJCMO, "BiffDrawingObjectBase::importObjBiff8 - OBJCMO subrecord expected" );
if( (nSubRecId == BIFF_ID_OBJCMO) && (nSubRecSize >= 6) )
{
switch( nObjType )
{
#if 0
// in BIFF8, all simple objects support text
case BIFF_OBJTYPE_LINE:
case BIFF_OBJTYPE_ARC:
xDrawingObj.reset( new XclImpTextObj( rHelper ) );
// lines and arcs may be 2-dimensional
xDrawingObj->setAreaObj( false );
break;
// in BIFF8, all simple objects support text
case BIFF_OBJTYPE_RECTANGLE:
case BIFF_OBJTYPE_OVAL:
case BIFF_OBJTYPE_POLYGON:
case BIFF_OBJTYPE_DRAWING:
case BIFF_OBJTYPE_TEXT:
xDrawingObj.reset( new XclImpTextObj( rHelper ) );
break;
#endif
case BIFF_OBJTYPE_GROUP: xDrawingObj.reset( new BiffGroupObject( rHelper ) ); break;
#if 0
case BIFF_OBJTYPE_CHART: xDrawingObj.reset( new XclImpChartObj( rHelper ) ); break;
case BIFF_OBJTYPE_BUTTON: xDrawingObj.reset( new XclImpButtonObj( rHelper ) ); break;
case BIFF_OBJTYPE_PICTURE: xDrawingObj.reset( new XclImpPictureObj( rHelper ) ); break;
case BIFF_OBJTYPE_CHECKBOX: xDrawingObj.reset( new XclImpCheckBoxObj( rHelper ) ); break;
case BIFF_OBJTYPE_OPTIONBUTTON: xDrawingObj.reset( new XclImpOptionButtonObj( rHelper ) ); break;
case BIFF_OBJTYPE_EDIT: xDrawingObj.reset( new XclImpEditObj( rHelper ) ); break;
case BIFF_OBJTYPE_LABEL: xDrawingObj.reset( new XclImpLabelObj( rHelper ) ); break;
case BIFF_OBJTYPE_DIALOG: xDrawingObj.reset( new XclImpDialogObj( rHelper ) ); break;
case BIFF_OBJTYPE_SPIN: xDrawingObj.reset( new XclImpSpinButtonObj( rHelper ) ); break;
case BIFF_OBJTYPE_SCROLLBAR: xDrawingObj.reset( new XclImpScrollBarObj( rHelper ) ); break;
case BIFF_OBJTYPE_LISTBOX: xDrawingObj.reset( new XclImpListBoxObj( rHelper ) ); break;
case BIFF_OBJTYPE_GROUPBOX: xDrawingObj.reset( new XclImpGroupBoxObj( rHelper ) ); break;
case BIFF_OBJTYPE_DROPDOWN: xDrawingObj.reset( new XclImpDropDownObj( rHelper ) ); break;
case BIFF_OBJTYPE_NOTE: xDrawingObj.reset( new XclImpNoteObj( rHelper ) ); break;
#endif
default:
#if 0
OSL_ENSURE( false, "BiffDrawingObjectBase::importObjBiff8 - unknown object type" );
#endif
xDrawingObj.reset( new BiffPlaceholderObject( rHelper ) );
}
}
}
xDrawingObj->importObjBiff8( rStrm );
return xDrawingObj;
}
Reference< XShape > BiffDrawingObjectBase::convertAndInsert( BiffDrawingBase& rDrawing, Reference< XShape > BiffDrawingObjectBase::convertAndInsert( BiffDrawingBase& rDrawing,
const Reference< XShapes >& rxShapes, const Rectangle* pParentRect ) const const Reference< XShapes >& rxShapes, const Rectangle* pParentRect ) const
{ {
...@@ -1285,14 +1222,6 @@ void BiffDrawingBase::importObj( BiffInputStream& rStrm ) ...@@ -1285,14 +1222,6 @@ void BiffDrawingBase::importObj( BiffInputStream& rStrm )
} }
} }
void BiffDrawingBase::setSkipObj( sal_uInt16 nObjId )
{
/* Store identifiers of objects to be skipped in a separate list (the OBJ
record may not be read yet). In the finalization phase, all objects
registered here will be skipped. */
maSkipObjs.push_back( nObjId );
}
void BiffDrawingBase::finalizeImport() void BiffDrawingBase::finalizeImport()
{ {
Reference< XShapes > xShapes( mxDrawPage, UNO_QUERY ); Reference< XShapes > xShapes( mxDrawPage, UNO_QUERY );
...@@ -1330,14 +1259,6 @@ Reference< XShape > BiffDrawingBase::createAndInsertXShape( const OUString& rSer ...@@ -1330,14 +1259,6 @@ Reference< XShape > BiffDrawingBase::createAndInsertXShape( const OUString& rSer
return xShape; return xShape;
} }
// protected ------------------------------------------------------------------
void BiffDrawingBase::appendRawObject( const BiffDrawingObjectRef& rxDrawingObj )
{
OSL_ENSURE( rxDrawingObj.get(), "BiffDrawingBase::appendRawObject - unexpected empty object reference" );
maRawObjs.append( rxDrawingObj );
}
// ============================================================================ // ============================================================================
BiffSheetDrawing::BiffSheetDrawing( const WorksheetHelper& rHelper ) : BiffSheetDrawing::BiffSheetDrawing( const WorksheetHelper& rHelper ) :
......
...@@ -913,14 +913,7 @@ oox::formulaimport::XmlStream::skipElement(int) ...@@ -913,14 +913,7 @@ oox::formulaimport::XmlStream::skipElement(int)
oox::ole::WordVbaProjectFilter_createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) oox::ole::WordVbaProjectFilter_createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
oox::ole::WordVbaProjectFilter_getSupportedServiceNames() oox::ole::WordVbaProjectFilter_getSupportedServiceNames()
oox::xls::BiffDetector_createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) oox::xls::BiffDetector_createInstance(com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&)
oox::xls::BiffDrawingBase::appendRawObject(boost::shared_ptr<oox::xls::BiffDrawingObjectBase> const&)
oox::xls::BiffDrawingBase::setSkipObj(unsigned short)
oox::xls::BiffDrawingObjectBase::importObjBiff8(oox::xls::WorksheetHelper const&, oox::xls::BiffInputStream&)
oox::xls::BiffHelper::calcCodePageFromTextEncoding(unsigned short)
oox::xls::BiffHelper::calcRkFromDouble(int&, double)
oox::xls::BiffInputStream::resetRecord(bool, unsigned short) oox::xls::BiffInputStream::resetRecord(bool, unsigned short)
oox::xls::BiffOutputStream::BiffOutputStream(oox::BinaryOutputStream&, unsigned short)
oox::xls::BiffOutputStream::endRecord()
oox::xls::BiffOutputStream::fill(unsigned char, int, unsigned long) oox::xls::BiffOutputStream::fill(unsigned char, int, unsigned long)
oox::xls::BiffOutputStream::sizeBase() const oox::xls::BiffOutputStream::sizeBase() const
oox::xls::BiffOutputStream::startRecord(unsigned short) oox::xls::BiffOutputStream::startRecord(unsigned short)
......
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