summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Vorel <petr.vorel@gmail.com>2012-03-20 13:33:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-20 13:48:12 +0000
commitda8034199e840092cd80d498b3cdb9d8a4c350f0 (patch)
treee096e11845b054b6c64c0b8ec38cda3fbbf300e7
parent04919d8f9c1c3372acecbb3716d6f557316eb3e5 (diff)
remove unused code (oox, sc)
-rw-r--r--sc/source/filter/inc/biffhelper.hxx4
-rw-r--r--sc/source/filter/inc/biffoutputstream.hxx8
-rw-r--r--sc/source/filter/inc/drawingmanager.hxx6
-rw-r--r--sc/source/filter/oox/biffhelper.cxx21
-rw-r--r--sc/source/filter/oox/biffoutputstream.cxx14
-rw-r--r--sc/source/filter/oox/drawingmanager.cxx79
-rwxr-xr-xunusedcode.easy7
7 files changed, 0 insertions, 139 deletions
diff --git a/sc/source/filter/inc/biffhelper.hxx b/sc/source/filter/inc/biffhelper.hxx
index be8303feac54..5f390fa2fb4f 100644
--- a/sc/source/filter/inc/biffhelper.hxx
+++ b/sc/source/filter/inc/biffhelper.hxx
@@ -607,8 +607,6 @@ public:
/** Converts the passed packed number to a double. */
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. */
static double calcDoubleFromError( sal_uInt8 nErrorCode );
@@ -616,8 +614,6 @@ public:
/** Returns a text encoding from an Windows code page.
@return The corresponding text encoding or RTL_TEXTENCODING_DONTKNOW. */
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 ----------------------------------------------------------
diff --git a/sc/source/filter/inc/biffoutputstream.hxx b/sc/source/filter/inc/biffoutputstream.hxx
index 75440e146436..a38bfdfce488 100644
--- a/sc/source/filter/inc/biffoutputstream.hxx
+++ b/sc/source/filter/inc/biffoutputstream.hxx
@@ -87,7 +87,6 @@ private:
8224 bytes in BIFF8).
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
started automatically and the new data will be written to this record. If
@@ -99,18 +98,11 @@ private:
class BiffOutputStream : public BinaryOutputStream
{
public:
- explicit BiffOutputStream(
- BinaryOutputStream& rOutStream,
- sal_uInt16 nMaxRecSize );
-
// record control ---------------------------------------------------------
/** Starts a new record. */
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. */
void setPortionSize( sal_uInt8 nSize );
diff --git a/sc/source/filter/inc/drawingmanager.hxx b/sc/source/filter/inc/drawingmanager.hxx
index a7580a3e12e6..c597b0306b27 100644
--- a/sc/source/filter/inc/drawingmanager.hxx
+++ b/sc/source/filter/inc/drawingmanager.hxx
@@ -125,8 +125,6 @@ public:
static BiffDrawingObjectRef importObjBiff4( const WorksheetHelper& rHelper, BiffInputStream& rStrm );
/** Reads the BIFF5 OBJ record, returns a new drawing object. */
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). */
inline void setAreaObj( bool bAreaObj ) { mbAreaObj = bAreaObj; }
@@ -452,10 +450,6 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape,
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:
typedef RefMap< sal_uInt16, BiffDrawingObjectBase > BiffDrawingObjectMapById;
typedef ::std::vector< sal_uInt16 > BiffObjIdVector;
diff --git a/sc/source/filter/oox/biffhelper.cxx b/sc/source/filter/oox/biffhelper.cxx
index d71249d76629..9ec1a9864a57 100644
--- a/sc/source/filter/oox/biffhelper.cxx
+++ b/sc/source/filter/oox/biffhelper.cxx
@@ -212,20 +212,6 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm,
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 )
{
sal_uInt16 nApiError = 0x7FFF;
@@ -261,13 +247,6 @@ void lclImportImgDataDib( StreamDataSequence& orDataSeq, BiffInputStream& rStrm,
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 --------------------------------------------------------------
/*static*/ OUString BiffHelper::readString( SequenceInputStream& rStrm, bool b32BitLen, bool bAllowNulChars )
diff --git a/sc/source/filter/oox/biffoutputstream.cxx b/sc/source/filter/oox/biffoutputstream.cxx
index 88bded6e3be4..8914cf1f9f69 100644
--- a/sc/source/filter/oox/biffoutputstream.cxx
+++ b/sc/source/filter/oox/biffoutputstream.cxx
@@ -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 -------------------------------------------------------------
void BiffOutputStream::startRecord( sal_uInt16 nRecId )
@@ -101,12 +93,6 @@ void BiffOutputStream::startRecord( sal_uInt16 nRecId )
setPortionSize( 1 );
}
-void BiffOutputStream::endRecord()
-{
- setPortionSize( 1 );
- maRecBuffer.endRecord();
-}
-
void BiffOutputStream::setPortionSize( sal_uInt8 nSize )
{
OSL_ENSURE( mnPortionPos == 0, "BiffOutputStream::setPortionSize - block operation inside portion" );
diff --git a/sc/source/filter/oox/drawingmanager.cxx b/sc/source/filter/oox/drawingmanager.cxx
index 5ba29e244488..a1cfef9a4b32 100644
--- a/sc/source/filter/oox/drawingmanager.cxx
+++ b/sc/source/filter/oox/drawingmanager.cxx
@@ -389,69 +389,6 @@ BiffDrawingObjectBase::~BiffDrawingObjectBase()
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,
const Reference< XShapes >& rxShapes, const Rectangle* pParentRect ) const
{
@@ -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()
{
Reference< XShapes > xShapes( mxDrawPage, UNO_QUERY );
@@ -1330,14 +1259,6 @@ Reference< XShape > BiffDrawingBase::createAndInsertXShape( const OUString& rSer
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 ) :
diff --git a/unusedcode.easy b/unusedcode.easy
index d3f49cbf29d2..5998942f5049 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -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_getSupportedServiceNames()
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::BiffOutputStream::BiffOutputStream(oox::BinaryOutputStream&, unsigned short)
-oox::xls::BiffOutputStream::endRecord()
oox::xls::BiffOutputStream::fill(unsigned char, int, unsigned long)
oox::xls::BiffOutputStream::sizeBase() const
oox::xls::BiffOutputStream::startRecord(unsigned short)