From 7af2994aa0af81e3465574ec96608a42f8b506ae Mon Sep 17 00:00:00 2001
From: Santiago Martinez <smvarela@gmail.com>
Date: Sun, 8 Apr 2012 21:53:03 +0200
Subject: [PATCH] Remove unused code in oox.

---
 sc/source/filter/oox/workbookhelper.cxx |   54 -------------------------------
 unusedcode.easy                         |    3 --
 2 files changed, 0 insertions(+), 57 deletions(-)

diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx
index 5958d7b..f9dfb39 100644
--- a/sc/source/filter/oox/workbookhelper.cxx
+++ b/sc/source/filter/oox/workbookhelper.cxx
@@ -233,14 +233,8 @@ public:
     inline rtl_TextEncoding getTextEncoding() const { return meTextEnc; }
     /** Sets the text encoding to import/export byte strings. */
     void                setTextEncoding( rtl_TextEncoding eTextEnc );
-    /** Sets code page read from a CODEPAGE record for byte string import. */
-    void                setCodePage( sal_uInt16 nCodePage );
     /** Sets text encoding from the default application font, if CODEPAGE record is missing. */
     void                setAppFontEncoding( rtl_TextEncoding eAppFontEnc );
-    /** Enables workbook file mode, used for BIFF4 workspace files. */
-    void                setIsWorkbookFile();
-    /** Recreates global buffers that are used per sheet in specific BIFF versions. */
-    void                createBuffersPerSheet( sal_Int16 nSheet );
     /** Returns the codec helper that stores the encoder/decoder object. */
     inline BiffCodecHelper& getCodecHelper() { return *mxCodecHelper; }
 
@@ -517,60 +511,12 @@ void WorkbookGlobals::setTextEncoding( rtl_TextEncoding eTextEnc )
         meTextEnc = eTextEnc;
 }
 
-void WorkbookGlobals::setCodePage( sal_uInt16 nCodePage )
-{
-    setTextEncoding( BiffHelper::calcTextEncodingFromCodePage( nCodePage ) );
-    mbHasCodePage = true;
-}
-
 void WorkbookGlobals::setAppFontEncoding( rtl_TextEncoding eAppFontEnc )
 {
     if( !mbHasCodePage )
         setTextEncoding( eAppFontEnc );
 }
 
-void WorkbookGlobals::setIsWorkbookFile()
-{
-    OSL_ENSURE( meBiff == BIFF4, "WorkbookGlobals::setIsWorkbookFile - invalid call" );
-    mbWorkbook = true;
-}
-
-void WorkbookGlobals::createBuffersPerSheet( sal_Int16 nSheet )
-{
-    switch( meBiff )
-    {
-        case BIFF2:
-        case BIFF3:
-            OSL_ENSURE( nSheet == 0, "WorkbookGlobals::createBuffersPerSheet - unexpected sheet index" );
-            mxDefNames->setLocalCalcSheet( nSheet );
-        break;
-
-        case BIFF4:
-            OSL_ENSURE( mbWorkbook || (nSheet == 0), "WorkbookGlobals::createBuffersPerSheet - unexpected sheet index" );
-            // #i11183# sheets in BIFF4W files have own styles and names
-            if( nSheet > 0 )
-            {
-                mxStyles.reset( new StylesBuffer( *this ) );
-                mxDefNames.reset( new DefinedNamesBuffer( *this ) );
-                mxExtLinks.reset( new ExternalLinkBuffer( *this ) );
-            }
-            mxDefNames->setLocalCalcSheet( nSheet );
-        break;
-
-        case BIFF5:
-            // BIFF5 stores external references per sheet
-            if( nSheet > 0 )
-                mxExtLinks.reset( new ExternalLinkBuffer( *this ) );
-        break;
-
-        case BIFF8:
-        break;
-
-        case BIFF_UNKNOWN:
-        break;
-    }
-}
-
 // private --------------------------------------------------------------------
 
 void WorkbookGlobals::initialize( bool bWorkbookFile )
diff --git a/unusedcode.easy b/unusedcode.easy
index 6fe8ca6..a5fa961 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -815,9 +815,6 @@ oox::xls::Font::importFont(oox::xls::BiffInputStream&)
 oox::xls::NumberFormatsBuffer::importFormat(oox::xls::BiffInputStream&)
 oox::xls::PivotCache::importPCDSource(oox::xls::BiffInputStream&)
 oox::xls::SheetScenarios::importScenarios(oox::xls::BiffInputStream&)
-oox::xls::WorkbookGlobals::createBuffersPerSheet(short)
-oox::xls::WorkbookGlobals::setCodePage(unsigned short)
-oox::xls::WorkbookGlobals::setIsWorkbookFile()
 oox::xls::WorkbookHelper::setAppFontEncoding(unsigned short)
 oox::xls::Xf::importXf(oox::xls::BiffInputStream&)
 psp::PrinterGfx::DrawBitmap(Rectangle const&, Rectangle const&, psp::PrinterBmp const&, psp::PrinterBmp const&)
-- 
1.7.7.6

