[Libreoffice-commits] .: sc/source unusedcode.easy

Julien Nabet serval2412 at kemper.freedesktop.org
Fri Apr 13 22:38:08 PDT 2012


 sc/source/filter/inc/autofilterbuffer.hxx   |    2 
 sc/source/filter/inc/biffhelper.hxx         |    4 
 sc/source/filter/inc/condformatbuffer.hxx   |    3 
 sc/source/filter/inc/defnamesbuffer.hxx     |    7 
 sc/source/filter/inc/externallinkbuffer.hxx |   17 --
 sc/source/filter/inc/stylesbuffer.hxx       |    7 
 sc/source/filter/oox/autofilterbuffer.cxx   |   13 -
 sc/source/filter/oox/biffhelper.cxx         |   15 -
 sc/source/filter/oox/condformatbuffer.cxx   |   19 --
 sc/source/filter/oox/defnamesbuffer.cxx     |  120 ---------------
 sc/source/filter/oox/externallinkbuffer.cxx |  218 ----------------------------
 sc/source/filter/oox/stylesbuffer.cxx       |   47 ------
 unusedcode.easy                             |   11 -
 13 files changed, 483 deletions(-)

New commits:
commit 715138f3aa4a5d2a4efbfd85096d3c97e8a9edb8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Apr 14 07:37:01 2012 +0200

    Some sc cleaning (oox)

diff --git a/sc/source/filter/inc/autofilterbuffer.hxx b/sc/source/filter/inc/autofilterbuffer.hxx
index 7119861..6f5c2af 100644
--- a/sc/source/filter/inc/autofilterbuffer.hxx
+++ b/sc/source/filter/inc/autofilterbuffer.hxx
@@ -199,8 +199,6 @@ public:
     void                importFilterColumn( const AttributeList& rAttribs );
     /** Imports auto filter column settings from the FILTERCOLUMN record. */
     void                importFilterColumn( SequenceInputStream& rStrm );
-    /** Imports auto filter column settings from the FILTERCOLUMN record. */
-    void                importFilterColumn( BiffInputStream& rStrm );
 
     /** Creates and returns the specified filter settings object. */
     template< typename FilterSettingsType >
diff --git a/sc/source/filter/inc/biffhelper.hxx b/sc/source/filter/inc/biffhelper.hxx
index e22f3b4..ca49986 100644
--- a/sc/source/filter/inc/biffhelper.hxx
+++ b/sc/source/filter/inc/biffhelper.hxx
@@ -611,10 +611,6 @@ public:
     /** Converts the passed BIFF error to a double containing the respective Calc error code. */
     static double       calcDoubleFromError( sal_uInt8 nErrorCode );
 
-    /** 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 );
-
     // BIFF12 import ----------------------------------------------------------
 
     /** Reads a BIFF12 string with leading 16-bit or 32-bit length field. */
diff --git a/sc/source/filter/inc/condformatbuffer.hxx b/sc/source/filter/inc/condformatbuffer.hxx
index e236375..3dd17b1 100644
--- a/sc/source/filter/inc/condformatbuffer.hxx
+++ b/sc/source/filter/inc/condformatbuffer.hxx
@@ -135,9 +135,6 @@ public:
     /** Imports a conditional formatting rule from the CFRULE record. */
     void                importCfRule( SequenceInputStream& rStrm );
 
-    /** Imports settings from the CFHEADER record. */
-    void                importCfHeader( BiffInputStream& rStrm );
-
     /** Creates the conditional formatting in the Calc document. */
     void                finalizeImport();
 
diff --git a/sc/source/filter/inc/defnamesbuffer.hxx b/sc/source/filter/inc/defnamesbuffer.hxx
index 5ef1a40..6704f19 100644
--- a/sc/source/filter/inc/defnamesbuffer.hxx
+++ b/sc/source/filter/inc/defnamesbuffer.hxx
@@ -124,8 +124,6 @@ public:
     void                setFormula( const ::rtl::OUString& rFormula );
     /** Imports the defined name from a DEFINEDNAME record in the passed stream. */
     void                importDefinedName( SequenceInputStream& rStrm );
-    /** Imports the defined name from a DEFINEDNAME record in the passed BIFF stream. */
-    void                importDefinedName( BiffInputStream& rStrm, sal_Int16 nCalcSheet );
 
     /** Creates a defined name in the Calc document. */
     void                createNameObject( sal_Int32 nIndex );
@@ -179,15 +177,10 @@ class DefinedNamesBuffer : public WorkbookHelper
 public:
     explicit            DefinedNamesBuffer( const WorkbookHelper& rHelper );
 
-    /** Sets the sheet index for local names (BIFF2-BIFF4 only). */
-    void                setLocalCalcSheet( sal_Int16 nCalcSheet );
-
     /** Imports a defined name from the passed attribute set. */
     DefinedNameRef      importDefinedName( const AttributeList& rAttribs );
     /** Imports a defined name from a DEFINEDNAME record in the passed stream. */
     void                importDefinedName( SequenceInputStream& rStrm );
-    /** Imports a defined name from a DEFINEDNAME record in the passed BIFF stream. */
-    void                importDefinedName( BiffInputStream& rStrm );
 
     /** Creates all defined names in the document. */
     void                finalizeImport();
diff --git a/sc/source/filter/inc/externallinkbuffer.hxx b/sc/source/filter/inc/externallinkbuffer.hxx
index f7f37fe..ee19fd2 100644
--- a/sc/source/filter/inc/externallinkbuffer.hxx
+++ b/sc/source/filter/inc/externallinkbuffer.hxx
@@ -99,9 +99,6 @@ public:
     /** Imports the DDEITEM_STRING record containing a string in a link result. */
     void                importDdeItemString( SequenceInputStream& rStrm );
 
-    /** Imports the EXTERNALNAME record from the passed stream. */
-    void                importExternalName( BiffInputStream& rStrm );
-
     /** Returns true, if the name refers to an OLE object. */
     inline bool         isOleObject() const { return maExtNameModel.mbOleObj; }
 
@@ -242,13 +239,6 @@ public:
     /** Imports the EXTERNALADDIN record from the passed stream. */
     void                importExternalAddin( SequenceInputStream& rStrm );
 
-    /** Imports the EXTERNSHEET record from the passed stream. */
-    void                importExternSheet( BiffInputStream& rStrm );
-    /** Imports the EXTERNALBOOK record from the passed stream. */
-    void                importExternalBook( BiffInputStream& rStrm );
-    /** Imports the EXTERNALNAME record from the passed stream. */
-    void                importExternalName( BiffInputStream& rStrm );
-
     /** Sets the link type to 'self reference'. */
     inline void         setSelfLinkType() { meLinkType = LINKTYPE_SELF; }
 
@@ -358,13 +348,6 @@ public:
     /** Imports the EXTERNALSHEETS record from the passed stream. */
     void                importExternalSheets( SequenceInputStream& rStrm );
 
-    /** Imports the EXTERNSHEET record from the passed stream. */
-    ExternalLinkRef     importExternSheet( BiffInputStream& rStrm );
-    /** Imports the EXTERNALBOOK record from the passed stream. */
-    ExternalLinkRef     importExternalBook( BiffInputStream& rStrm );
-    /** Imports the BIFF8 EXTERNSHEET record from the passed stream. */
-    void                importExternSheet8( BiffInputStream& rStrm );
-
     /** Returns the sequence of link infos needed by the XML formula parser. */
     ::com::sun::star::uno::Sequence< ::com::sun::star::sheet::ExternalLinkInfo >
                         getLinkInfos() const;
diff --git a/sc/source/filter/inc/stylesbuffer.hxx b/sc/source/filter/inc/stylesbuffer.hxx
index 4facf0f..511fc13 100644
--- a/sc/source/filter/inc/stylesbuffer.hxx
+++ b/sc/source/filter/inc/stylesbuffer.hxx
@@ -723,9 +723,6 @@ class Xf : public WorkbookHelper
 public:
     explicit            Xf( const WorkbookHelper& rHelper );
 
-    /** Sets all "attribute used" flags to the passed state. */
-    void                setAllUsedFlags( bool bUsed );
-
     /** Sets all attributes from the xf element. */
     void                importXf( const AttributeList& rAttribs, bool bCellXf );
     /** Sets all attributes from the alignment element. */
@@ -847,8 +844,6 @@ public:
     void                importCellStyle( const AttributeList& rAttribs );
     /** Imports style settings from a CELLSTYLE record. */
     void                importCellStyle( SequenceInputStream& rStrm );
-    /** Imports style settings from a STYLE record. */
-    void                importStyle( BiffInputStream& rStrm );
 
     /** Creates the style sheet in the document described by this cell style object. */
     void                createCellStyle();
@@ -882,8 +877,6 @@ public:
     CellStyleRef        importCellStyle( const AttributeList& rAttribs );
     /** Imports the CELLSTYLE record from the passed stream. */
     CellStyleRef        importCellStyle( SequenceInputStream& rStrm );
-    /** Imports the STYLE record from the passed stream. */
-    CellStyleRef        importStyle( BiffInputStream& rStrm );
 
     /** Final processing after import of all style settings. */
     void                finalizeImport();
diff --git a/sc/source/filter/oox/autofilterbuffer.cxx b/sc/source/filter/oox/autofilterbuffer.cxx
index ed5f1c3..8543840 100644
--- a/sc/source/filter/oox/autofilterbuffer.cxx
+++ b/sc/source/filter/oox/autofilterbuffer.cxx
@@ -631,19 +631,6 @@ void FilterColumn::importFilterColumn( SequenceInputStream& rStrm )
     mbShowButton = getFlag( nFlags, BIFF12_FILTERCOLUMN_SHOWBUTTON );
 }
 
-void FilterColumn::importFilterColumn( BiffInputStream& rStrm )
-{
-    sal_uInt16 nFlags;
-    mnColId = rStrm.readuInt16();
-    rStrm >> nFlags;
-
-    // BIFF5/BIFF8 support top-10 filters and custom filters
-    if( getFlag( nFlags, BIFF_FILTERCOLUMN_TOP10FILTER ) )
-        createFilterSettings< Top10Filter >().importBiffRecord( rStrm, nFlags );
-    else
-        createFilterSettings< CustomFilter >().importBiffRecord( rStrm, nFlags );
-}
-
 ApiFilterSettings FilterColumn::finalizeImport( sal_Int32 nMaxCount )
 {
     ApiFilterSettings aSettings;
diff --git a/sc/source/filter/oox/biffhelper.cxx b/sc/source/filter/oox/biffhelper.cxx
index b7241a9..0d0b78e 100644
--- a/sc/source/filter/oox/biffhelper.cxx
+++ b/sc/source/filter/oox/biffhelper.cxx
@@ -115,21 +115,6 @@ union DecodedDouble
     return aDecDbl.mfValue;
 }
 
-/*static*/ rtl_TextEncoding BiffHelper::calcTextEncodingFromCodePage( sal_uInt16 nCodePage )
-{
-    // some specials for BIFF
-    switch( nCodePage )
-    {
-        case 1200:  return RTL_TEXTENCODING_DONTKNOW;       // BIFF8 Unicode
-        case 32768: return RTL_TEXTENCODING_APPLE_ROMAN;
-        case 32769: return RTL_TEXTENCODING_MS_1252;        // BIFF2-BIFF3
-    }
-
-    rtl_TextEncoding eTextEnc = rtl_getTextEncodingFromWindowsCodePage( nCodePage );
-    OSL_ENSURE( eTextEnc != RTL_TEXTENCODING_DONTKNOW, "BiffHelper::calcTextEncodingFromCodePage - unknown code page" );
-    return eTextEnc;
-}
-
 // BIFF12 import --------------------------------------------------------------
 
 /*static*/ OUString BiffHelper::readString( SequenceInputStream& rStrm, bool b32BitLen, bool bAllowNulChars )
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 2985a8f..2aff3e4 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -665,25 +665,6 @@ void CondFormat::importCfRule( SequenceInputStream& rStrm )
     insertRule( xRule );
 }
 
-void CondFormat::importCfHeader( BiffInputStream& rStrm )
-{
-    // import the CFHEADER record
-    sal_uInt16 nRuleCount;
-    BinRangeList aRanges;
-    rStrm >> nRuleCount;
-    rStrm.skip( 10 );
-    rStrm >> aRanges;
-    getAddressConverter().convertToCellRangeList( maModel.maRanges, aRanges, getSheetIndex(), true );
-
-    // import following list of CFRULE records
-    for( sal_uInt16 nRule = 0; (nRule < nRuleCount) && (rStrm.getNextRecId() == BIFF_ID_CFRULE) && rStrm.startNextRecord(); ++nRule )
-    {
-        CondFormatRuleRef xRule = createRule();
-        xRule->importCfRule( rStrm, nRule + 1 );
-        insertRule( xRule );
-    }
-}
-
 void CondFormat::finalizeImport()
 {
     try
diff --git a/sc/source/filter/oox/defnamesbuffer.cxx b/sc/source/filter/oox/defnamesbuffer.cxx
index e823e73..9f63afc 100644
--- a/sc/source/filter/oox/defnamesbuffer.cxx
+++ b/sc/source/filter/oox/defnamesbuffer.cxx
@@ -366,114 +366,6 @@ void DefinedName::importDefinedName( SequenceInputStream& rStrm )
     }
 }
 
-void DefinedName::importDefinedName( BiffInputStream& rStrm, sal_Int16 nCalcSheet )
-{
-    BiffType eBiff = getBiff();
-    sal_uInt16 nFlags = 0;
-    sal_Int16 nRefId = BIFF_DEFNAME_GLOBAL;
-    sal_Int16 nTabId = BIFF_DEFNAME_GLOBAL;
-    sal_uInt8 nNameLen = 0, nShortCut = 0;
-
-    switch( eBiff )
-    {
-        case BIFF2:
-        {
-            sal_uInt8 nFlagsBiff2;
-            rStrm >> nFlagsBiff2;
-            rStrm.skip( 1 );
-            rStrm >> nShortCut >> nNameLen;
-            mnFmlaSize = rStrm.readuInt8();
-            setFlag( nFlags, BIFF_DEFNAME_FUNC, getFlag( nFlagsBiff2, BIFF2_DEFNAME_FUNC ) );
-            maModel.maName = rStrm.readCharArrayUC( nNameLen, getTextEncoding(), true );
-        }
-        break;
-        case BIFF3:
-        case BIFF4:
-            rStrm >> nFlags >> nShortCut >> nNameLen >> mnFmlaSize;
-            maModel.maName = rStrm.readCharArrayUC( nNameLen, getTextEncoding(), true );
-        break;
-        case BIFF5:
-            rStrm >> nFlags >> nShortCut >> nNameLen >> mnFmlaSize >> nRefId >> nTabId;
-            rStrm.skip( 4 );
-            maModel.maName = rStrm.readCharArrayUC( nNameLen, getTextEncoding(), true );
-        break;
-        case BIFF8:
-            rStrm >> nFlags >> nShortCut >> nNameLen >> mnFmlaSize >> nRefId >> nTabId;
-            rStrm.skip( 4 );
-            maModel.maName = rStrm.readUniStringBody( nNameLen, true );
-        break;
-        case BIFF_UNKNOWN: break;
-    }
-
-    // macro function/command, hidden flag
-    maModel.mnFuncGroupId = extractValue< sal_Int32 >( nFlags, 6, 6 );
-    maModel.mbMacro       = getFlag( nFlags, BIFF_DEFNAME_MACRO );
-    maModel.mbFunction    = getFlag( nFlags, BIFF_DEFNAME_FUNC );
-    maModel.mbVBName      = getFlag( nFlags, BIFF_DEFNAME_VBNAME );
-    maModel.mbHidden      = getFlag( nFlags, BIFF_DEFNAME_HIDDEN );
-
-    // get built-in name index from name
-    if( getFlag( nFlags, BIFF_DEFNAME_BUILTIN ) )
-    {
-        // name may be the built-in identifier or the built-in base name
-        if( maModel.maName.getLength() == 1 )
-            mcBuiltinId = maModel.maName[ 0 ];
-        else
-            mcBuiltinId = lclGetBuiltinIdFromBaseName( maModel.maName );
-    }
-    /*  In BIFF5, '_FilterDatabase' appears as hidden user name without
-        built-in flag, and even worse, localized. */
-    else if( (eBiff == BIFF5) && lclIsFilterDatabaseName( maModel.maName ) )
-    {
-        mcBuiltinId = BIFF_DEFNAME_FILTERDATABASE;
-    }
-
-    // get sheet index for sheet-local names in BIFF5-BIFF8
-    switch( getBiff() )
-    {
-        case BIFF2:
-        case BIFF3:
-        case BIFF4:
-            // BIFF2-BIFF4: all defined names are sheet-local
-            mnCalcSheet = nCalcSheet;
-        break;
-        case BIFF5:
-            // #i44019# nTabId may be invalid, resolve nRefId to sheet index
-            if( nRefId != BIFF_DEFNAME_GLOBAL )
-                if( const ExternalLink* pExtLink = getExternalLinks().getExternalLink( nRefId ).get() )
-                    if( pExtLink->getLinkType() == LINKTYPE_INTERNAL )
-                        mnCalcSheet = pExtLink->getCalcSheetIndex();
-        break;
-        case BIFF8:
-            // convert one-based worksheet index to zero-based Calc sheet index
-            OSL_ENSURE( nTabId >= 0, "DefinedName::importDefinedName - invalid local sheet index" );
-            if( nTabId != BIFF_DEFNAME_GLOBAL )
-                mnCalcSheet = getWorksheets().getCalcSheetIndex( nTabId - 1 );
-        break;
-        case BIFF_UNKNOWN:
-        break;
-    }
-
-    if( (getBiff() <= BIFF4) && maModel.mbHidden && (maModel.maName.getLength() > 1) && (maModel.maName[ 0 ] == '\x01') )
-    {
-        /*  Read the token array of special internal names containing addresses
-            for BIFF3-BIFF4 3D references immediately. It is expected that
-            these names contain a simple cell reference or range reference.
-            Other regular defined names and external names rely on existence of
-            this reference. */
-        ApiTokenSequence aTokens = importBiffFormula( mnCalcSheet, rStrm, &mnFmlaSize );
-        extractReference( aTokens );
-    }
-    else
-    {
-        /*  Store record position of other defined names to be able to import
-            token array later. This is needed to correctly resolve references
-            to names that are stored later in the defined names list following
-            this name. */
-        mxBiffStrm.reset( new BiffInputStreamPos( rStrm ) );
-    }
-}
-
 void DefinedName::createNameObject( sal_Int32 nIndex )
 {
     // do not create names for (macro) functions or VBA procedures
@@ -610,13 +502,6 @@ DefinedNamesBuffer::DefinedNamesBuffer( const WorkbookHelper& rHelper ) :
 {
 }
 
-void DefinedNamesBuffer::setLocalCalcSheet( sal_Int16 nCalcSheet )
-{
-    OSL_ENSURE( (getFilterType() == FILTER_BIFF) && (getBiff() <= BIFF4),
-        "DefinedNamesBuffer::setLocalCalcSheet - invalid call" );
-    mnCalcSheet = nCalcSheet;
-}
-
 DefinedNameRef DefinedNamesBuffer::importDefinedName( const AttributeList& rAttribs )
 {
     DefinedNameRef xDefName = createDefinedName();
@@ -629,11 +514,6 @@ void DefinedNamesBuffer::importDefinedName( SequenceInputStream& rStrm )
     createDefinedName()->importDefinedName( rStrm );
 }
 
-void DefinedNamesBuffer::importDefinedName( BiffInputStream& rStrm )
-{
-    createDefinedName()->importDefinedName( rStrm, mnCalcSheet );
-}
-
 void DefinedNamesBuffer::finalizeImport()
 {
     // first insert all names without formula definition into the document, and insert them into the maps
diff --git a/sc/source/filter/oox/externallinkbuffer.cxx b/sc/source/filter/oox/externallinkbuffer.cxx
index 2a6faca..c15e32f 100644
--- a/sc/source/filter/oox/externallinkbuffer.cxx
+++ b/sc/source/filter/oox/externallinkbuffer.cxx
@@ -192,119 +192,6 @@ void ExternalName::importDdeItemString( SequenceInputStream& rStrm )
     appendResultValue( BiffHelper::readString( rStrm ) );
 }
 
-void ExternalName::importExternalName( BiffInputStream& rStrm )
-{
-    sal_uInt16 nFlags = 0;
-    if( getBiff() >= BIFF3 )
-    {
-        rStrm >> nFlags;
-        maExtNameModel.mbBuiltIn    = getFlag( nFlags, BIFF_EXTNAME_BUILTIN );
-        maExtNameModel.mbNotify     = getFlag( nFlags, BIFF_EXTNAME_AUTOMATIC );
-        maExtNameModel.mbPreferPic  = getFlag( nFlags, BIFF_EXTNAME_PREFERPIC );
-
-        // BIFF5-BIFF8: sheet index for sheet-local names, OLE settings
-        if( getBiff() >= BIFF5 )
-        {
-            maExtNameModel.mbStdDocName = getFlag( nFlags, BIFF_EXTNAME_STDDOCNAME );
-            maExtNameModel.mbOleObj     = getFlag( nFlags, BIFF_EXTNAME_OLEOBJECT );
-            maExtNameModel.mbIconified  = getFlag( nFlags, BIFF_EXTNAME_ICONIFIED );
-
-            if( maExtNameModel.mbOleObj )
-            {
-                rStrm >> mnStorageId;
-            }
-            else
-            {
-                /*  Import the reference ID for names that are sheet-local in
-                    the external document. This index will be resolved later to
-                    the index of the external sheet cache which is able to
-                    provide the name of the sheet related to this defined name.
-                    - BIFF5: one-based index to EXTERNSHEET record containing
-                        the document and sheet name
-                    - BIFF8: one-based index into EXTERNALBOOK sheet name list
-                    The value zero means this external name is a global name.
-                 */
-                rStrm.skip( 2 );
-                maModel.mnSheet = rStrm.readuInt16();
-            }
-        }
-    }
-
-    maModel.maName = (getBiff() == BIFF8) ?
-        rStrm.readUniStringBody( rStrm.readuInt8() ) :
-        rStrm.readByteStringUC( false, getTextEncoding() );
-    OSL_ENSURE( !maModel.maName.isEmpty(), "ExternalName::importExternalName - empty name" );
-
-    // load cell references that are stored in hidden external names (seen in BIFF3-BIFF4)
-    bool bHiddenRef = (getBiff() <= BIFF4) && (maModel.maName.getLength() > 1) && (maModel.maName[ 0 ] == '\x01') && (rStrm.getRemaining() > 2);
-    switch( mrParentLink.getLinkType() )
-    {
-        case LINKTYPE_INTERNAL:
-            // cell references to other internal sheets are stored in hidden external names
-            if( bHiddenRef && (getBiff() == BIFF4) && isWorkbookFile() )
-            {
-                ApiTokenSequence aTokens = importBiffFormula( mrParentLink.getCalcSheetIndex(), rStrm );
-                extractReference( aTokens );
-            }
-        break;
-
-        case LINKTYPE_EXTERNAL:
-            // cell references to other documents are stored in hidden external names
-            if( bHiddenRef )
-            {
-                ApiTokenSequence aTokens = importBiffFormula( 0, rStrm );
-                extractExternalReference( aTokens );
-            }
-        break;
-
-        case LINKTYPE_DDE:
-        case LINKTYPE_OLE:
-        case LINKTYPE_MAYBE_DDE_OLE:
-            // DDE/OLE link results
-            if( rStrm.getRemaining() > 3 )
-            {
-                bool bBiff8 = getBiff() == BIFF8;
-                sal_Int32 nCols = rStrm.readuInt8();
-                sal_Int32 nRows = rStrm.readuInt16();
-                if( bBiff8 ) { ++nCols; ++nRows; } else if( nCols == 0 ) nCols = 256;
-                setResultSize( nCols, nRows );
-
-                bool bLoop = true;
-                while( bLoop && !rStrm.isEof() && (maCurrIt != maResults.end()) )
-                {
-                    switch( rStrm.readuInt8() )
-                    {
-                        case BIFF_DATATYPE_EMPTY:
-                            appendResultValue( OUString() );
-                            rStrm.skip( 8 );
-                        break;
-                        case BIFF_DATATYPE_DOUBLE:
-                            appendResultValue( rStrm.readDouble() );
-                        break;
-                        case BIFF_DATATYPE_STRING:
-                            appendResultValue( bBiff8 ? rStrm.readUniString() : rStrm.readByteStringUC( false, getTextEncoding() ) );
-                        break;
-                        case BIFF_DATATYPE_BOOL:
-                            appendResultValue< double >( (rStrm.readuInt8() == 0) ? 0.0 : 1.0 );
-                            rStrm.skip( 7 );
-                        break;
-                        case BIFF_DATATYPE_ERROR:
-                            appendResultValue( BiffHelper::calcDoubleFromError( rStrm.readuInt8() ) );
-                            rStrm.skip( 7 );
-                        break;
-                        default:
-                            bLoop = false;
-                    }
-                }
-                OSL_ENSURE( bLoop && !rStrm.isEof() && (maCurrIt == maResults.end()),
-                    "ExternalName::importExternalName - stream error in result set" );
-            }
-        break;
-
-        default:;
-    }
-}
-
 #if 0
 sal_Int32 ExternalName::getSheetCacheIndex() const
 {
@@ -605,78 +492,6 @@ ExternalNameRef ExternalLink::importExternalName( SequenceInputStream& rStrm )
     return xExtName;
 }
 
-void ExternalLink::importExternSheet( BiffInputStream& rStrm )
-{
-    OStringBuffer aTargetBuffer( rStrm.readByteString( false, true ) );
-    // references to own sheets have wrong string length field (off by 1)
-    if( (aTargetBuffer.getLength() > 0) && (aTargetBuffer[ 0 ] == 3) )
-        aTargetBuffer.append( static_cast< sal_Char >( rStrm.readuInt8() ) );
-    // parse the encoded URL
-    OUString aBiffTarget = OStringToOUString( aTargetBuffer.makeStringAndClear(), getTextEncoding() );
-    OUString aSheetName = parseBiffTargetUrl( aBiffTarget );
-    switch( meLinkType )
-    {
-        case LINKTYPE_INTERNAL:
-            maCalcSheets.push_back( getWorksheets().getCalcSheetIndex( aSheetName ) );
-        break;
-        case LINKTYPE_EXTERNAL:
-            insertExternalSheet( aSheetName.isEmpty() ? WorksheetBuffer::getBaseFileName( maTargetUrl ) : aSheetName);
-        break;
-        default:;
-    }
-}
-
-void ExternalLink::importExternalBook( BiffInputStream& rStrm )
-{
-    OUString aTarget;
-    sal_uInt16 nSheetCount;
-    rStrm >> nSheetCount;
-    if( rStrm.getRemaining() == 2 )
-    {
-        if( rStrm.readuInt8() == 1 )
-        {
-            sal_Char cChar = static_cast< sal_Char >( rStrm.readuInt8() );
-            if( cChar != 0 )
-                aTarget = OStringToOUString( OString( cChar ), getTextEncoding() );
-        }
-    }
-    else if( rStrm.getRemaining() >= 3 )
-    {
-        // NUL characters may occur
-        aTarget = rStrm.readUniString( true );
-    }
-
-    // parse the encoded URL
-    OUString aDummySheetName = parseBiffTargetUrl( aTarget );
-    OSL_ENSURE( aDummySheetName.isEmpty(), "ExternalLink::importExternalBook - sheet name in encoded URL" );
-    (void)aDummySheetName;  // prevent compiler warning
-
-    // load external sheet names and create the sheet caches in the Calc document
-    if( meLinkType == LINKTYPE_EXTERNAL )
-        for( sal_uInt16 nSheet = 0; !rStrm.isEof() && (nSheet < nSheetCount); ++nSheet )
-            insertExternalSheet( rStrm.readUniString() );
-}
-
-void ExternalLink::importExternalName( BiffInputStream& rStrm )
-{
-    ExternalNameRef xExtName = createExternalName();
-    xExtName->importExternalName( rStrm );
-    switch( meLinkType )
-    {
-        case LINKTYPE_DDE:
-            OSL_ENSURE( !xExtName->isOleObject(), "ExternalLink::importExternalName - OLE object in DDE link" );
-        break;
-        case LINKTYPE_OLE:
-            OSL_ENSURE( xExtName->isOleObject(), "ExternalLink::importExternalName - anything but OLE object in OLE link" );
-        break;
-        case LINKTYPE_MAYBE_DDE_OLE:
-            meLinkType = xExtName->isOleObject() ? LINKTYPE_OLE : LINKTYPE_DDE;
-        break;
-        default:
-            OSL_ENSURE( !xExtName->isOleObject(), "ExternalLink::importExternalName - OLE object in external name" );
-    }
-}
-
 ExternalLinkInfo ExternalLink::getLinkInfo() const
 {
     ExternalLinkInfo aLinkInfo;
@@ -1000,39 +815,6 @@ void ExternalLinkBuffer::importExternalSheets( SequenceInputStream& rStrm )
     }
 }
 
-ExternalLinkRef ExternalLinkBuffer::importExternSheet( BiffInputStream& rStrm )
-{
-    OSL_ENSURE( getBiff() <= BIFF5, "ExternalLinkBuffer::importExternSheet - wrong BIFF version" );
-    ExternalLinkRef xExtLink = createExternalLink();
-    xExtLink->importExternSheet( rStrm );
-    return xExtLink;
-}
-
-ExternalLinkRef ExternalLinkBuffer::importExternalBook( BiffInputStream& rStrm )
-{
-    ExternalLinkRef xExtLink = createExternalLink();
-    xExtLink->importExternalBook( rStrm );
-    return xExtLink;
-}
-
-void ExternalLinkBuffer::importExternSheet8( BiffInputStream& rStrm )
-{
-    OSL_ENSURE( getBiff() == BIFF8, "ExternalLinkBuffer::importExternSheet8 - wrong BIFF version" );
-
-    sal_uInt16 nRefCount;
-    rStrm >> nRefCount;
-    OSL_ENSURE( static_cast< sal_Int64 >( nRefCount * 6 ) == rStrm.getRemaining(), "ExternalLinkBuffer::importExternSheet8 - invalid count" );
-    nRefCount = static_cast< sal_uInt16 >( ::std::min< sal_Int64 >( nRefCount, rStrm.getRemaining() / 6 ) );
-
-    /*  #i104057# A weird external XLS generator writes multiple EXTERNSHEET
-        records instead of only one as expected. Surprisingly, Excel seems to
-        insert the entries of the second record before the entries of the first
-        record. */
-    maRefSheets.insert( maRefSheets.begin(), nRefCount, RefSheetsModel() );
-    for( RefSheetsModelVec::iterator aIt = maRefSheets.begin(), aEnd = aIt + nRefCount; !rStrm.isEof() && (aIt != aEnd); ++aIt )
-        aIt->readBiff8Data( rStrm );
-}
-
 Sequence< ExternalLinkInfo > ExternalLinkBuffer::getLinkInfos() const
 {
     ::std::vector< ExternalLinkInfo > aLinkInfos;
diff --git a/sc/source/filter/oox/stylesbuffer.cxx b/sc/source/filter/oox/stylesbuffer.cxx
index 7c3cb20..9b27372 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -2305,12 +2305,6 @@ Xf::Xf( const WorkbookHelper& rHelper ) :
 {
 }
 
-void Xf::setAllUsedFlags( bool bUsed )
-{
-    maModel.mbAlignUsed = maModel.mbProtUsed = maModel.mbFontUsed =
-        maModel.mbNumFmtUsed = maModel.mbBorderUsed = maModel.mbAreaUsed = bUsed;
-}
-
 void Xf::importXf( const AttributeList& rAttribs, bool bCellXf )
 {
     maModel.mbCellXf = bCellXf;
@@ -2815,39 +2809,6 @@ void CellStyle::importCellStyle( SequenceInputStream& rStrm )
     maModel.mbHidden = getFlag( nFlags, BIFF12_CELLSTYLE_HIDDEN );
 }
 
-void CellStyle::importStyle( BiffInputStream& rStrm )
-{
-    sal_uInt16 nStyleXf;
-    rStrm >> nStyleXf;
-    maModel.mnXfId = static_cast< sal_Int32 >( nStyleXf & BIFF_STYLE_XFMASK );
-    maModel.mbBuiltin = getFlag( nStyleXf, BIFF_STYLE_BUILTIN );
-    if( maModel.mbBuiltin )
-    {
-        maModel.mnBuiltinId = rStrm.readInt8();
-        maModel.mnLevel = rStrm.readInt8();
-    }
-    else
-    {
-        maModel.maName = (getBiff() == BIFF8) ?
-            rStrm.readUniString() : rStrm.readByteStringUC( false, getTextEncoding() );
-        // #i103281# check if this is a new built-in style introduced in XL2007
-        if( (getBiff() == BIFF8) && (rStrm.getNextRecId() == BIFF_ID_STYLEEXT) && rStrm.startNextRecord() )
-        {
-            sal_uInt8 nExtFlags;
-            rStrm.skip( 12 );
-            rStrm >> nExtFlags;
-            maModel.mbBuiltin = getFlag( nExtFlags, BIFF_STYLEEXT_BUILTIN );
-            maModel.mbCustom = getFlag( nExtFlags, BIFF_STYLEEXT_CUSTOM );
-            maModel.mbHidden = getFlag( nExtFlags, BIFF_STYLEEXT_HIDDEN );
-            if( maModel.mbBuiltin )
-            {
-                maModel.mnBuiltinId = rStrm.readInt8();
-                maModel.mnLevel = rStrm.readInt8();
-            }
-        }
-    }
-}
-
 void CellStyle::createCellStyle()
 {
 
@@ -2916,14 +2877,6 @@ CellStyleRef CellStyleBuffer::importCellStyle( SequenceInputStream& rStrm )
     return xCellStyle;
 }
 
-CellStyleRef CellStyleBuffer::importStyle( BiffInputStream& rStrm )
-{
-    CellStyleRef xCellStyle( new CellStyle( *this ) );
-    xCellStyle->importStyle( rStrm );
-    insertCellStyle( xCellStyle );
-    return xCellStyle;
-}
-
 void CellStyleBuffer::finalizeImport()
 {
     // calculate final names of all styles
diff --git a/unusedcode.easy b/unusedcode.easy
index a9538af..a30c963 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -760,19 +760,8 @@ nullcanvas::SpriteCanvasHelper::scrollUpdate(basegfx::B2DRange const&, basegfx::
 oox::PropertyMap::dump(com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>)
 oox::xls::BiffDecoder_RCF::BiffDecoder_RCF(unsigned char*, unsigned char*, unsigned char*)
 oox::xls::BiffDecoder_XOR::BiffDecoder_XOR(unsigned short, unsigned short)
-oox::xls::BiffHelper::calcTextEncodingFromCodePage(unsigned short)
 oox::xls::BiffWorkbookContextBase::BiffWorkbookContextBase(oox::xls::WorkbookHelper const&)
 oox::xls::CellBlock::CellBlock(oox::xls::WorksheetHelper const&, oox::ValueRange const&, int)
-oox::xls::CellStyleBuffer::importStyle(oox::xls::BiffInputStream&)
-oox::xls::CondFormat::importCfHeader(oox::xls::BiffInputStream&)
-oox::xls::DefinedNamesBuffer::importDefinedName(oox::xls::BiffInputStream&)
-oox::xls::DefinedNamesBuffer::setLocalCalcSheet(short)
-oox::xls::ExternalLink::importExternalName(oox::xls::BiffInputStream&)
-oox::xls::ExternalLinkBuffer::importExternSheet(oox::xls::BiffInputStream&)
-oox::xls::ExternalLinkBuffer::importExternSheet8(oox::xls::BiffInputStream&)
-oox::xls::ExternalLinkBuffer::importExternalBook(oox::xls::BiffInputStream&)
-oox::xls::FilterColumn::importFilterColumn(oox::xls::BiffInputStream&)
-oox::xls::Xf::setAllUsedFlags(bool)
 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::GetGlyphBoundRect(unsigned short, Rectangle&)


More information about the Libreoffice-commits mailing list