[ooo-build-commit] Branch 'ooo/OOO320' - oox/inc oox/source

Jan Holesovsky kendy at kemper.freedesktop.org
Fri Nov 20 17:50:55 PST 2009


 oox/inc/oox/dump/biffdumper.hxx       |   13 
 oox/inc/oox/dump/dumperbase.hxx       |   13 
 oox/inc/oox/dump/xlsbdumper.hxx       |    1 
 oox/inc/oox/ole/axbinaryreader.hxx    |  188 ++++++++++
 oox/inc/oox/ole/axcontrol.hxx         |   34 +
 oox/inc/oox/ole/axcontrolfragment.hxx |    4 
 oox/inc/oox/xls/biffhelper.hxx        |   27 +
 oox/inc/oox/xls/worksheetfragment.hxx |    2 
 oox/source/dump/biffdumper.cxx        |  610 ++++++++++++++++++++++++++++++----
 oox/source/dump/biffdumper.ini        |  310 ++++++++++++++---
 oox/source/dump/dumperbase.cxx        |   14 
 oox/source/dump/dumperbase.ini        |   19 +
 oox/source/dump/oledumper.cxx         |    1 
 oox/source/dump/xlsbdumper.cxx        |   77 +---
 oox/source/dump/xlsbdumper.ini        |    4 
 oox/source/ole/axbinaryreader.cxx     |  216 ++++++++++++
 oox/source/ole/axcontrol.cxx          |  228 ++++++++++--
 oox/source/ole/axcontrolfragment.cxx  |   32 +
 oox/source/ole/axcontrolhelper.cxx    |    4 
 oox/source/ole/makefile.mk            |    1 
 oox/source/ole/olehelper.cxx          |    1 
 oox/source/xls/worksheetfragment.cxx  |   18 -
 oox/source/xls/worksheetsettings.cxx  |   33 -
 23 files changed, 1586 insertions(+), 264 deletions(-)

New commits:
commit 99fa1f5121f6101cef803557fdb3d57bca543136
Author: Ivo Hinkelmann <ihi at openoffice.org>
Date:   Fri Nov 20 13:02:34 2009 +0000

    CWS-TOOLING: integrate CWS calc32stopper5
    2009-11-12 13:18:26 +0100 dr  r277477 : #i105267# missing in exception files list
    2009-11-12 11:13:57 +0100 dr  r277472 : CWS-TOOLING: rebase CWS calc32stopper5 to branches/OOO320 at 277373 (milestone: OOO320:m4)
    2009-11-11 17:27:10 +0100 dr  r277466 : #i105267# remember all existing copies of ScAccessibeEditLineTextData in the ScTextWnd instance (text input line)
    2009-11-04 09:59:49 +0100 dr  r277334 : dump even more BIFF records written by XL12
    2009-10-27 19:11:37 +0100 dr  r277231 : few dumper additions
    2009-10-27 17:17:10 +0100 nn  r277225 : #i106343# check if pDocShell is set in GetFormatter
    2009-10-26 14:54:15 +0100 dr  r277178 : #i106194# OOXML: load form controls from binary streams
    2009-10-26 14:14:01 +0100 dr  r277177 : #i106194# OOXML: load form controls from binary streams

diff --git a/oox/inc/oox/dump/biffdumper.hxx b/oox/inc/oox/dump/biffdumper.hxx
index a7f021e..5b772d4 100644
--- a/oox/inc/oox/dump/biffdumper.hxx
+++ b/oox/inc/oox/dump/biffdumper.hxx
@@ -415,12 +415,25 @@ private:
     sal_uInt16          dumpFormatIdx( const String& rName = EMPTY_STRING );
     sal_uInt16          dumpXfIdx( const String& rName = EMPTY_STRING, bool bBiff2Style = false );
 
+    template< typename Type >
+    inline Type         dumpExtColorType() { return dumpDec< Type >( "color-type", "EXTCOLOR-TYPE" ); }
+    void                dumpExtColorValue( sal_uInt32 nColorType );
+    void                dumpExtColor( const String& rName = EMPTY_STRING );
+    void                dumpExtCfColor( const String& rName = EMPTY_STRING );
+    void                dumpExtGradientHead();
+
     ::rtl::OUString     dumpPivotString( const String& rName, sal_uInt16 nStrLen );
     ::rtl::OUString     dumpPivotString( const String& rName );
 
     sal_uInt16          dumpCellHeader( bool bBiff2Style = false );
     void                dumpBoolErr();
 
+    void                dumpCfRuleProp();
+    void                dumpXfExtProp();
+    void                dumpDxfProp();
+    void                dumpDxf12Prop();
+    void                dumpCfRule12Param( sal_uInt16 nSubType );
+
     void                dumpFontRec();
     void                dumpFormatRec();
     void                dumpXfRec();
diff --git a/oox/inc/oox/dump/dumperbase.hxx b/oox/inc/oox/dump/dumperbase.hxx
index 9a79194..28cc42a 100644
--- a/oox/inc/oox/dump/dumperbase.hxx
+++ b/oox/inc/oox/dump/dumperbase.hxx
@@ -1901,19 +1901,6 @@ protected:
                             const ObjectBase& rParent,
                             const BinaryInputStreamRef& rxBaseStrm,
                             const ::rtl::OUString& rSysFileName,
-                            const BinaryInputStreamRef& rxRecStrm,
-                            const String& rRecNames,
-                            const String& rSimpleRecs = EMPTY_STRING );
-    void                construct(
-                            const OutputObjectBase& rParent,
-                            const BinaryInputStreamRef& rxBaseStrm,
-                            const BinaryInputStreamRef& rxRecStrm,
-                            const String& rRecNames,
-                            const String& rSimpleRecs = EMPTY_STRING );
-    void                construct(
-                            const ObjectBase& rParent,
-                            const BinaryInputStreamRef& rxBaseStrm,
-                            const ::rtl::OUString& rSysFileName,
                             const String& rRecNames,
                             const String& rSimpleRecs = EMPTY_STRING );
     void                construct(
diff --git a/oox/inc/oox/dump/xlsbdumper.hxx b/oox/inc/oox/dump/xlsbdumper.hxx
index dafa390..6575606 100644
--- a/oox/inc/oox/dump/xlsbdumper.hxx
+++ b/oox/inc/oox/dump/xlsbdumper.hxx
@@ -211,6 +211,7 @@ protected:
     virtual void        implDumpRecordBody();
 
 private:
+    void                dumpGradientHead();
     void                dumpCellHeader( bool bWithColumn );
 
 private:
diff --git a/oox/inc/oox/ole/axbinaryreader.hxx b/oox/inc/oox/ole/axbinaryreader.hxx
new file mode 100755
index 0000000..6bd8a08
--- /dev/null
+++ b/oox/inc/oox/ole/axbinaryreader.hxx
@@ -0,0 +1,188 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: axbinaryreader.hxx,v $
+ * $Revision: 1.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef OOX_OLE_AXBINARYREADER_HXX
+#define OOX_OLE_AXBINARYREADER_HXX
+
+#include "oox/helper/binaryinputstream.hxx"
+#include "oox/helper/containerhelper.hxx"
+
+namespace oox {
+namespace ole {
+
+// ============================================================================
+
+/** A wrapper for an unseekable binary input stream. */
+class AxAlignedInputStream : public BinaryInputStream
+{
+public:
+    explicit            AxAlignedInputStream( BinaryInputStream& rInStrm );
+
+    /** Return the current stream position (relative to position at construction time). */
+    virtual sal_Int64   tell() const;
+    /** Seeks the stream to the passed position, if it is behind the current position. */
+    virtual void        seek( sal_Int64 nPos );
+
+    /** Reads nBytes bytes to the passed sequence.
+        @return  Number of bytes really read. */
+    virtual sal_Int32   readData( StreamDataSequence& orData, sal_Int32 nBytes );
+    /** Reads nBytes bytes to the (existing) buffer opMem.
+        @return  Number of bytes really read. */
+    virtual sal_Int32   readMemory( void* opMem, sal_Int32 nBytes );
+    /** Seeks the stream forward by the passed number of bytes. */
+    virtual void        skip( sal_Int32 nBytes );
+
+    /** Aligns the stream to a multiple of the passed size. */
+    void                align( size_t nSize );
+
+    /** Aligns the stream according to the passed type and reads an atomar value. */
+    template< typename Type >
+    inline Type         readAligned() { align( sizeof( Type ) ); return readValue< Type >(); }
+    /** Aligns the stream according to the passed type and skips the size of the type. */
+    template< typename Type >
+    inline void         skipAligned() { align( sizeof( Type ) ); skip( sizeof( Type ) ); }
+
+private:
+    BinaryInputStream&  mrInStrm;           /// The wrapped input stream.
+    sal_Int64           mnStrmPos;          /// Tracks relative position in the stream.
+};
+
+// ============================================================================
+
+/** Import helper to read simple and complex ActiveX form control properties
+    from a binary input stream. */
+class AxBinaryPropertyReader
+{
+public:
+    explicit            AxBinaryPropertyReader( BinaryInputStream& rInStrm, bool b64BitPropFlags = false );
+
+    /** Reads the next integer property value from the stream, if the
+        respective flag in the property mask is set. */
+    template< typename StreamType, typename DataType >
+    inline void         readIntProperty( DataType& ornValue )
+                            { if( startNextProperty() ) ornValue = maInStrm.readAligned< StreamType >(); }
+    /** Reads the next boolean property value from the stream, if the
+        respective flag in the property mask is set. */
+    void                readBoolProperty( bool& orbValue, bool bReverse = false );
+    /** Reads the next pair property from the stream, if the respective flag in
+        the property mask is set. */
+    void                readPairProperty( sal_Int32& ornValue1, sal_Int32& ornValue2 );
+    /** Reads the next string property from the stream, if the respective flag
+        in the property mask is set. */
+    void                readStringProperty( ::rtl::OUString& orValue );
+    /** Reads the next picture property from the stream, if the respective flag
+        in the property mask is set. */
+    void                readPictureProperty( StreamDataSequence& orPicData );
+
+    /** Skips the next integer property value in the stream, if the respective
+        flag in the property mask is set. */
+    template< typename StreamType >
+    inline void         skipIntProperty() { if( startNextProperty() ) maInStrm.skipAligned< StreamType >(); }
+    /** Skips the next boolean property value in the stream, if the respective
+        flag in the property mask is set. */
+    inline void         skipBoolProperty() { startNextProperty(); }
+    /** Skips the next string property in the stream, if the respective flag in
+        the property mask is set. */
+    inline void         skipStringProperty() { readStringProperty( maDummyString ); }
+    /** Skips the next picture property in the stream, if the respective flag
+        in the property mask is set. */
+    inline void         skipPictureProperty() { readPictureProperty( maDummyPicData ); }
+    /** Has to be called for undefined properties. If the respective flag in
+        the mask is set, the property import cannot be finished successfully. */
+    inline void         skipUndefinedProperty() { ensureValid( !startNextProperty() ); }
+
+    /** Final processing, reads contents of all complex properties. */
+    bool                finalizeImport();
+
+private:
+    bool                ensureValid( bool bCondition = true );
+    bool                startNextProperty();
+
+private:
+    /** Base class for complex properties such as string, point, size, GUID, picture. */
+    struct ComplexProperty
+    {
+        virtual             ~ComplexProperty();
+        virtual bool        readProperty( AxAlignedInputStream& rInStrm ) = 0;
+    };
+
+    /** Complex property for a 32-bit value pair, e.g. point or size. */
+    struct PairProperty : public ComplexProperty
+    {
+        sal_Int32&          mrnValue1;
+        sal_Int32&          mrnValue2;
+
+        inline explicit     PairProperty( sal_Int32& rnValue1, sal_Int32& rnValue2 ) :
+                                mrnValue1( rnValue1 ), mrnValue2( rnValue2 ) {}
+        virtual bool        readProperty( AxAlignedInputStream& rInStrm );
+    };
+
+    /** Complex property for a string value. */
+    struct StringProperty : public ComplexProperty
+    {
+        ::rtl::OUString&    mrValue;
+        sal_uInt32          mnSize;
+
+        inline explicit     StringProperty( ::rtl::OUString& rValue, sal_uInt32 nSize ) :
+                                mrValue( rValue ), mnSize( nSize ) {}
+        virtual bool        readProperty( AxAlignedInputStream& rInStrm );
+    };
+
+    /** Stream property for a picture or mouse icon. */
+    struct PictureProperty : public ComplexProperty
+    {
+        StreamDataSequence& mrPicData;
+
+        inline explicit     PictureProperty( StreamDataSequence& rPicData ) :
+                                mrPicData( rPicData ) {}
+        virtual bool        readProperty( AxAlignedInputStream& rInStrm );
+    };
+
+    typedef RefVector< ComplexProperty > ComplexPropVector;
+
+private:
+    AxAlignedInputStream maInStrm;          /// The input stream to read from.
+    ComplexPropVector   maLargeProps;       /// Stores info for all used large properties.
+    ComplexPropVector   maStreamProps;      /// Stores info for all used stream data properties.
+    StreamDataSequence  maDummyPicData;     /// Dummy picture for unsupported properties.
+    ::rtl::OUString     maDummyString;      /// Dummy string for unsupported properties.
+    sal_Int64           mnPropFlags;        /// Flags specifying existing properties.
+    sal_Int64           mnNextProp;         /// Next property to read.
+    sal_Int64           mnPropsEnd;         /// End position of simple/large properties.
+    bool                mbValid;            /// True = stream still valid.
+};
+
+// ============================================================================
+
+} // namespace ole
+} // namespace oox
+
+#endif
+
diff --git a/oox/inc/oox/ole/axcontrol.hxx b/oox/inc/oox/ole/axcontrol.hxx
index 4c34b54..538e8ae 100644
--- a/oox/inc/oox/ole/axcontrol.hxx
+++ b/oox/inc/oox/ole/axcontrol.hxx
@@ -32,15 +32,16 @@
 #define OOX_OLE_AXCONTROL_HXX
 
 #include <memory>
-#include <rtl/ustring.hxx>
-#include <com/sun/star/uno/Reference.hxx>
 #include "oox/helper/binarystreambase.hxx"
 
 namespace com { namespace sun { namespace star {
     namespace awt { class XControlModel; }
 } } }
 
-namespace oox { class PropertyMap; }
+namespace oox {
+    class BinaryInputStream;
+    class PropertyMap;
+}
 
 namespace oox {
 namespace ole {
@@ -58,7 +59,9 @@ public:
     /** Derived classes set specific OOXML properties at the model structure. */
     virtual void        importProperty( sal_Int32 nPropId, const ::rtl::OUString& rValue );
     /** Derived classes set binary data (picture, mouse icon) at the model structure. */
-    virtual void        importPictureData( sal_Int32 nPropId, const StreamDataSequence& rDataSeq );
+    virtual void        importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm );
+    /** Derived classes import a form control model from the passed input stream. */
+    virtual void        importBinaryModel( BinaryInputStream& rInStrm );
 
     /** Derived classes return the UNO service name used to construct the control component. */
     virtual ::rtl::OUString getServiceName() const = 0;
@@ -81,6 +84,7 @@ public:
     explicit            AxFontDataModel();
 
     virtual void        importProperty( sal_Int32 nPropId, const ::rtl::OUString& rValue );
+    virtual void        importBinaryModel( BinaryInputStream& rInStrm );
     virtual void        convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const;
 
 private:
@@ -100,7 +104,8 @@ public:
 
     virtual ::rtl::OUString getServiceName() const;
     virtual void        importProperty( sal_Int32 nPropId, const ::rtl::OUString& rValue );
-    virtual void        importPictureData( sal_Int32 nPropId, const StreamDataSequence& rDataSeq );
+    virtual void        importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm );
+    virtual void        importBinaryModel( BinaryInputStream& rInStrm );
     virtual void        convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const;
 
 private:
@@ -122,6 +127,7 @@ public:
 
     virtual ::rtl::OUString getServiceName() const;
     virtual void        importProperty( sal_Int32 nPropId, const ::rtl::OUString& rValue );
+    virtual void        importBinaryModel( BinaryInputStream& rInStrm );
     virtual void        convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const;
 
 private:
@@ -143,7 +149,8 @@ public:
 
     virtual ::rtl::OUString getServiceName() const;
     virtual void        importProperty( sal_Int32 nPropId, const ::rtl::OUString& rValue );
-    virtual void        importPictureData( sal_Int32 nPropId, const StreamDataSequence& rDataSeq );
+    virtual void        importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm );
+    virtual void        importBinaryModel( BinaryInputStream& rInStrm );
     virtual void        convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const;
 
 private:
@@ -166,7 +173,8 @@ public:
     explicit            AxMorphDataModel();
 
     virtual void        importProperty( sal_Int32 nPropId, const ::rtl::OUString& rValue );
-    virtual void        importPictureData( sal_Int32 nPropId, const StreamDataSequence& rDataSeq );
+    virtual void        importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm );
+    virtual void        importBinaryModel( BinaryInputStream& rInStrm );
     virtual void        convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const;
 
 protected:
@@ -266,6 +274,7 @@ public:
 
     virtual ::rtl::OUString getServiceName() const;
     virtual void        importProperty( sal_Int32 nPropId, const ::rtl::OUString& rValue );
+    virtual void        importBinaryModel( BinaryInputStream& rInStrm );
     virtual void        convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const;
 
 private:
@@ -289,6 +298,7 @@ public:
 
     virtual ::rtl::OUString getServiceName() const;
     virtual void        importProperty( sal_Int32 nPropId, const ::rtl::OUString& rValue );
+    virtual void        importBinaryModel( BinaryInputStream& rInStrm );
     virtual void        convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const;
 
 private:
@@ -317,6 +327,13 @@ public:
     /** Creates and returns the internal control model according to the passed
         MS class identifier. */
     AxControlModelBase* createModel( const ::rtl::OUString& rClassId );
+    /** Imports a form control model from the passed input stream. */
+    void                importBinaryModel( BinaryInputStream& rInStrm );
+
+    /** Returns the internal control model. */
+    inline const AxControlModelBase* getModel() const { return mxModel.get(); }
+    /** Returns the MS class identifier used to create the internal control model. */
+    inline const ::rtl::OUString& getClassId() const { return maClassId; }
 
     /** Creates and returns the UNO form component object for this control and
         inserts it into the form wrapped by the passed helper. */
@@ -325,7 +342,8 @@ public:
 
 private:
     ::std::auto_ptr< AxControlModelBase > mxModel;
-    ::rtl::OUString     maName;
+    ::rtl::OUString     maClassId;          /// Class identifier of the control model.
+    ::rtl::OUString     maName;             /// Name of the control.
 };
 
 // ============================================================================
diff --git a/oox/inc/oox/ole/axcontrolfragment.hxx b/oox/inc/oox/ole/axcontrolfragment.hxx
index d97691e..a99e8b7 100644
--- a/oox/inc/oox/ole/axcontrolfragment.hxx
+++ b/oox/inc/oox/ole/axcontrolfragment.hxx
@@ -45,7 +45,9 @@ class AxControlModelBase;
 class AxControlPropertyContext : public ::oox::core::ContextHandler2
 {
 public:
-    explicit            AxControlPropertyContext( ::oox::core::FragmentHandler2& rFragment, AxControlModelBase& rModel );
+    explicit            AxControlPropertyContext(
+                            ::oox::core::FragmentHandler2& rFragment,
+                            AxControlModelBase& rModel );
 
     virtual ::oox::core::ContextHandlerRef
                         onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs );
diff --git a/oox/inc/oox/xls/biffhelper.hxx b/oox/inc/oox/xls/biffhelper.hxx
index 60efb9e..c013240 100644
--- a/oox/inc/oox/xls/biffhelper.hxx
+++ b/oox/inc/oox/xls/biffhelper.hxx
@@ -269,11 +269,16 @@ const sal_uInt16 BIFF3_ID_BOF               = 0x0209;
 const sal_uInt16 BIFF4_ID_BOF               = 0x0409;
 const sal_uInt16 BIFF5_ID_BOF               = 0x0809;
 const sal_uInt16 BIFF_ID_BOOKBOOL           = 0x00DA;
+const sal_uInt16 BIFF_ID_BOOKEXT            = 0x0863;
 const sal_uInt16 BIFF2_ID_BOOLERR           = 0x0005;
 const sal_uInt16 BIFF3_ID_BOOLERR           = 0x0205;
 const sal_uInt16 BIFF_ID_BOTTOMMARGIN       = 0x0029;
 const sal_uInt16 BIFF_ID_CALCCOUNT          = 0x000C;
 const sal_uInt16 BIFF_ID_CALCMODE           = 0x000D;
+const sal_uInt16 BIFF_ID_CFHEADER           = 0x01B0;
+const sal_uInt16 BIFF_ID_CFRULE             = 0x01B1;
+const sal_uInt16 BIFF_ID_CFRULE12           = 0x087A;
+const sal_uInt16 BIFF_ID_CFRULEEXT          = 0x087B;
 const sal_uInt16 BIFF_ID_CH3DDATAFORMAT     = 0x105F;
 const sal_uInt16 BIFF_ID_CHAREA             = 0x101A;
 const sal_uInt16 BIFF_ID_CHAREAFORMAT       = 0x100A;
@@ -289,6 +294,7 @@ const sal_uInt16 BIFF_ID_CHCHARTLINE        = 0x101C;
 const sal_uInt16 BIFF_ID_CHDATAFORMAT       = 0x1006;
 const sal_uInt16 BIFF_ID_CHDEFAULTTEXT      = 0x1024;
 const sal_uInt16 BIFF_ID_CHDROPBAR          = 0x103D;
+const sal_uInt16 BIFF_ID_CHECKCOMPAT        = 0x088C;
 const sal_uInt16 BIFF_ID_CHEND              = 0x1034;
 const sal_uInt16 BIFF_ID_CHESCHERFORMAT     = 0x1066;
 const sal_uInt16 BIFF_ID_CHFONT             = 0x1026;
@@ -335,15 +341,15 @@ const sal_uInt16 BIFF_ID_CHTEXT             = 0x1025;
 const sal_uInt16 BIFF_ID_CHTICK             = 0x101E;
 const sal_uInt16 BIFF_ID_CHTYPEGROUP        = 0x1014;
 const sal_uInt16 BIFF_ID_CHVALUERANGE       = 0x101F;
-const sal_uInt16 BIFF_ID_CFHEADER           = 0x01B0;
-const sal_uInt16 BIFF_ID_CFRULE             = 0x01B1;
 const sal_uInt16 BIFF_ID_CODENAME           = 0x01BA;
 const sal_uInt16 BIFF_ID_CODEPAGE           = 0x0042;
 const sal_uInt16 BIFF_ID_COLINFO            = 0x007D;
 const sal_uInt16 BIFF_ID_COLUMNDEFAULT      = 0x0020;
 const sal_uInt16 BIFF_ID_COLWIDTH           = 0x0024;
+const sal_uInt16 BIFF_ID_COMPRESSPICS       = 0x089B;
 const sal_uInt16 BIFF_ID_CONT               = 0x003C;
 const sal_uInt16 BIFF_ID_COORDLIST          = 0x00A9;
+const sal_uInt16 BIFF_ID_COUNTRY            = 0x008C;
 const sal_uInt16 BIFF_ID_CRN                = 0x005A;
 const sal_uInt16 BIFF2_ID_DATATABLE         = 0x0036;
 const sal_uInt16 BIFF3_ID_DATATABLE         = 0x0236;
@@ -351,6 +357,7 @@ const sal_uInt16 BIFF2_ID_DATATABLE2        = 0x0037;
 const sal_uInt16 BIFF_ID_DATAVALIDATION     = 0x01BE;
 const sal_uInt16 BIFF_ID_DATAVALIDATIONS    = 0x01B2;
 const sal_uInt16 BIFF_ID_DATEMODE           = 0x0022;
+const sal_uInt16 BIFF_ID_DBCELL             = 0x00D7;
 const sal_uInt16 BIFF_ID_DCONBINAME         = 0x01B5;
 const sal_uInt16 BIFF_ID_DCONNAME           = 0x0052;
 const sal_uInt16 BIFF_ID_DCONREF            = 0x0051;
@@ -363,6 +370,7 @@ const sal_uInt16 BIFF3_ID_DEFROWHEIGHT      = 0x0225;
 const sal_uInt16 BIFF_ID_DELTA              = 0x0010;
 const sal_uInt16 BIFF2_ID_DIMENSION         = 0x0000;
 const sal_uInt16 BIFF3_ID_DIMENSION         = 0x0200;
+const sal_uInt16 BIFF_ID_DXF                = 0x088D;
 const sal_uInt16 BIFF_ID_EOF                = 0x000A;
 const sal_uInt16 BIFF_ID_EXTERNALBOOK       = 0x01AE;
 const sal_uInt16 BIFF2_ID_EXTERNALNAME      = 0x0023;
@@ -377,19 +385,24 @@ const sal_uInt16 BIFF3_ID_FONT              = 0x0231;
 const sal_uInt16 BIFF5_ID_FONT              = 0x0031;
 const sal_uInt16 BIFF_ID_FONTCOLOR          = 0x0045;
 const sal_uInt16 BIFF_ID_FOOTER             = 0x0015;
+const sal_uInt16 BIFF_ID_FORCEFULLCALC      = 0x08A3;
 const sal_uInt16 BIFF2_ID_FORMAT            = 0x001E;
 const sal_uInt16 BIFF4_ID_FORMAT            = 0x041E;
 const sal_uInt16 BIFF2_ID_FORMULA           = 0x0006;
 const sal_uInt16 BIFF3_ID_FORMULA           = 0x0206;
 const sal_uInt16 BIFF4_ID_FORMULA           = 0x0406;
 const sal_uInt16 BIFF5_ID_FORMULA           = 0x0006;
+const sal_uInt16 BIFF_ID_GUTS               = 0x0080;
 const sal_uInt16 BIFF_ID_HCENTER            = 0x0083;
 const sal_uInt16 BIFF_ID_HEADER             = 0x0014;
+const sal_uInt16 BIFF_ID_HEADERFOOTER       = 0x089C;
 const sal_uInt16 BIFF_ID_HIDEOBJ            = 0x008D;
 const sal_uInt16 BIFF_ID_HORPAGEBREAKS      = 0x001B;
 const sal_uInt16 BIFF_ID_HYPERLINK          = 0x01B8;
 const sal_uInt16 BIFF3_ID_IMGDATA           = 0x007F;
 const sal_uInt16 BIFF8_ID_IMGDATA           = 0x00E9;
+const sal_uInt16 BIFF2_ID_INDEX             = 0x000B;
+const sal_uInt16 BIFF3_ID_INDEX             = 0x020B;
 const sal_uInt16 BIFF2_ID_INTEGER           = 0x0002;
 const sal_uInt16 BIFF_ID_INTERFACEHDR       = 0x00E1;
 const sal_uInt16 BIFF_ID_ITERATION          = 0x0011;
@@ -403,6 +416,7 @@ const sal_uInt16 BIFF_ID_MERGEDCELLS        = 0x00E5;
 const sal_uInt16 BIFF_ID_MSODRAWING         = 0x00EC;
 const sal_uInt16 BIFF_ID_MSODRAWINGGROUP    = 0x00EB;
 const sal_uInt16 BIFF_ID_MSODRAWINGSEL      = 0x00ED;
+const sal_uInt16 BIFF_ID_MTHREADSETTINGS    = 0x089A;
 const sal_uInt16 BIFF_ID_MULTBLANK          = 0x00BE;
 const sal_uInt16 BIFF_ID_MULTRK             = 0x00BD;
 const sal_uInt16 BIFF_ID_NOTE               = 0x001C;
@@ -410,6 +424,7 @@ const sal_uInt16 BIFF2_ID_NUMBER            = 0x0003;
 const sal_uInt16 BIFF3_ID_NUMBER            = 0x0203;
 const sal_uInt16 BIFF_ID_OBJ                = 0x005D;
 const sal_uInt16 BIFF_ID_OBJECTPROTECT      = 0x0063;
+const sal_uInt16 BIFF_ID_PAGELAYOUTVIEW     = 0x088B;
 const sal_uInt16 BIFF_ID_PAGESETUP          = 0x00A1;
 const sal_uInt16 BIFF_ID_PALETTE            = 0x0092;
 const sal_uInt16 BIFF_ID_PANE               = 0x0041;
@@ -448,6 +463,7 @@ const sal_uInt16 BIFF_ID_PTFITEM            = 0x00B2;
 const sal_uInt16 BIFF_ID_PTPAGEFIELDS       = 0x00B6;
 const sal_uInt16 BIFF_ID_PTROWCOLFIELDS     = 0x00B4;
 const sal_uInt16 BIFF_ID_PTROWCOLITEMS      = 0x00B5;
+const sal_uInt16 BIFF_ID_RECALCID           = 0x01C1;
 const sal_uInt16 BIFF_ID_REFMODE            = 0x000F;
 const sal_uInt16 BIFF_ID_RIGHTMARGIN        = 0x0027;
 const sal_uInt16 BIFF_ID_RK                 = 0x027E;
@@ -461,11 +477,12 @@ const sal_uInt16 BIFF_ID_SCL                = 0x00A0;
 const sal_uInt16 BIFF_ID_SCENPROTECT        = 0x00DD;
 const sal_uInt16 BIFF_ID_SCREENTIP          = 0x0800;
 const sal_uInt16 BIFF_ID_SELECTION          = 0x001D;
+const sal_uInt16 BIFF_ID_SHAREDFEATHEAD     = 0x0867;
 const sal_uInt16 BIFF_ID_SHAREDFMLA         = 0x04BC;
 const sal_uInt16 BIFF_ID_SHEET              = 0x0085;
+const sal_uInt16 BIFF_ID_SHEETEXT           = 0x0862;
 const sal_uInt16 BIFF_ID_SHEETHEADER        = 0x008F;
 const sal_uInt16 BIFF_ID_SHEETPR            = 0x0081;
-const sal_uInt16 BIFF_ID_SHEETPROTECTION    = 0x0867;
 const sal_uInt16 BIFF_ID_SST                = 0x00FC;
 const sal_uInt16 BIFF_ID_STANDARDWIDTH      = 0x0099;
 const sal_uInt16 BIFF2_ID_STRING            = 0x0007;
@@ -473,6 +490,8 @@ const sal_uInt16 BIFF3_ID_STRING            = 0x0207;
 const sal_uInt16 BIFF_ID_STYLE              = 0x0293;
 const sal_uInt16 BIFF_ID_STYLEEXT           = 0x0892;
 const sal_uInt16 BIFF_ID_SXEXT              = 0x00DC;
+const sal_uInt16 BIFF_ID_TABLESTYLES        = 0x088E;
+const sal_uInt16 BIFF_ID_THEME              = 0x0896;
 const sal_uInt16 BIFF_ID_TOPMARGIN          = 0x0028;
 const sal_uInt16 BIFF_ID_TXO                = 0x01B6;
 const sal_uInt16 BIFF_ID_UNCALCED           = 0x005E;
@@ -488,6 +507,8 @@ const sal_uInt16 BIFF2_ID_XF                = 0x0043;
 const sal_uInt16 BIFF3_ID_XF                = 0x0243;
 const sal_uInt16 BIFF4_ID_XF                = 0x0443;
 const sal_uInt16 BIFF5_ID_XF                = 0x00E0;
+const sal_uInt16 BIFF_ID_XFCRC              = 0x087C;
+const sal_uInt16 BIFF_ID_XFEXT              = 0x087D;
 
 const sal_uInt16 BIFF_ID_UNKNOWN            = SAL_MAX_UINT16;
 
diff --git a/oox/inc/oox/xls/worksheetfragment.hxx b/oox/inc/oox/xls/worksheetfragment.hxx
index 110851e..9125014 100644
--- a/oox/inc/oox/xls/worksheetfragment.hxx
+++ b/oox/inc/oox/xls/worksheetfragment.hxx
@@ -182,6 +182,8 @@ private:
     void                importPTDefinition();
     /** Imports the SCENARIOS record and the following scenarios. */
     void                importScenarios();
+    /** Imports the SHAREDFEATHEAD record. */
+    void                importSharedFeatHead();
     /** Imports the STANDARDWIDTH record and sets standard column width. */
     void                importStandardWidth();
 
diff --git a/oox/source/dump/biffdumper.cxx b/oox/source/dump/biffdumper.cxx
index 2e42d2d..f891e88 100644
--- a/oox/source/dump/biffdumper.cxx
+++ b/oox/source/dump/biffdumper.cxx
@@ -510,8 +510,25 @@ OUString BiffObjectBase::dumpUniString( const String& rName, BiffStringFlags nFl
     // #122185# bPhonetic flag may be set, but phonetic data may be missing
     if( nPhoneticSize > 0 )
     {
+        sal_Int64 nStrmPos = mxBiffStrm->tell();
         IndentGuard aIndGuard( out() );
-        dumpBinary( "phonetic-data", nPhoneticSize, false );
+        writeEmptyItem( "phonetic-data" );
+        dumpUnused( 2 );
+        dumpDec< sal_uInt16 >( "size" );
+        dumpDec< sal_uInt16 >( "font-idx", "FONTNAMES" );
+        dumpHex< sal_uInt16 >( "flags", "PHONETICPR-FLAGS" );
+        sal_uInt16 nCount = dumpDec< sal_uInt16 >( "portion-count" );
+        sal_uInt16 nLen = dumpDec< sal_uInt16 >( "text-len" );
+        dumpUnicodeArray( "text", mxBiffStrm->readuInt16() );
+        if( nLen == 0 ) dumpUnused( 2 );
+        for( sal_uInt16 nPortion = 0; !mxBiffStrm->isEof() && (nPortion < nCount); ++nPortion )
+        {
+            MultiItemsGuard aMultiGuard( out() );
+            dumpDec< sal_uInt16 >( "first-portion-char" );
+            dumpDec< sal_uInt16 >( "first-main-char" );
+            dumpDec< sal_uInt16 >( "main-char-count" );
+        }
+        dumpRemainingTo( nStrmPos + nPhoneticSize );
     }
 
     return aString;
@@ -1604,6 +1621,14 @@ void WorkbookStreamObject::implDumpRecordBody()
                 initializePerSheet();
         break;
 
+        case BIFF_ID_BOOKEXT:
+            dumpFrHeader( true, true );
+            dumpDec< sal_uInt32 >( "rec-size" );
+            dumpHex< sal_uInt32 >( "flags-1", "BOOKEXT-FLAGS1" );
+            if( rStrm.getRemaining() > 0 ) dumpHex< sal_uInt8 >( "flags-2", "BOOKEXT-FLAGS2" );
+            if( rStrm.getRemaining() > 0 ) dumpHex< sal_uInt8 >( "flags-3", "BOOKEXT-FLAGS3" );
+        break;
+
         case BIFF2_ID_BOOLERR:
         case BIFF3_ID_BOOLERR:
             dumpCellHeader( nRecId == BIFF2_ID_BOOLERR );
@@ -1612,7 +1637,7 @@ void WorkbookStreamObject::implDumpRecordBody()
 
         case BIFF_ID_CFHEADER:
             dumpDec< sal_uInt16 >( "rule-count" );
-            dumpBool< sal_uInt16 >( "need-update" );
+            dumpHex< sal_uInt16 >( "flags", "CFHEADER-FLAGS" );
             dumpRange( "bounding-range" );
             dumpRangeList();
         break;
@@ -1623,63 +1648,43 @@ void WorkbookStreamObject::implDumpRecordBody()
             dumpDec< sal_uInt8 >( "operator", "CFRULE-OPERATOR" );
             sal_uInt16 nFmla1Size = dumpDec< sal_uInt16 >( "formula1-size" );
             sal_uInt16 nFmla2Size = dumpDec< sal_uInt16 >( "formula2-size" );
-            sal_uInt32 nFlags = dumpHex< sal_uInt32 >( "flags", "CFRULE-FLAGS" );
-            dumpUnused( 2 );
-            if( getFlag< sal_uInt32 >( nFlags, 0x04000000 ) )
-            {
-                writeEmptyItem( "font-block" );
-                IndentGuard aIndGuard( out() );
-                sal_Int64 nRecPos = rStrm.tell();
-                dumpUniString( "name", BIFF_STR_8BITLENGTH );
-                dumpUnused( static_cast< sal_Int32 >( nRecPos + 64 - rStrm.tell() ) );
-                dumpDec< sal_Int32 >( "height", "CONV-TWIP-TO-PT" );
-                dumpHex< sal_uInt32 >( "flags", "CFRULE-FONTFLAGS" );
-                dumpDec< sal_uInt16 >( "weight", "FONT-WEIGHT" );
-                dumpDec< sal_uInt16 >( "escapement", "FONT-ESCAPEMENT" );
-                dumpDec< sal_uInt8 >( "underline", "FONT-UNDERLINE" );
-                dumpUnused( 3 );    // family/charset?
-                dumpDec< sal_Int32 >( "color", mxColors );
-                dumpUnused( 4 );
-                dumpHex< sal_uInt32 >( "used-flags", "CFRULE-FONTUSEDFLAGS" );
-                dumpDec< sal_uInt32 >( "escapement-used", "CFRULE-FONTUSED" );
-                dumpDec< sal_uInt32 >( "underline-used", "CFRULE-FONTUSED" );
-                dumpUnused( 18 );
-            }
-            if( getFlag< sal_uInt32 >( nFlags, 0x08000000 ) )
-            {
-                writeEmptyItem( "alignment-block" );
-                IndentGuard aIndGuard( out() );
-                dumpHex< sal_uInt8 >( "alignent", "CFRULE-ALIGNMENT" );
-                dumpHex< sal_uInt8 >( "rotation", "TEXTROTATION" );
-                dumpHex< sal_uInt16 >( "indent", "CFRULE-INDENT" );
-                dumpDec< sal_uInt16 >( "relative-indent" );
-                dumpUnknown( 2 );
-            }
-            if( getFlag< sal_uInt32 >( nFlags, 0x10000000 ) )
-            {
-                writeEmptyItem( "border-block" );
-                IndentGuard aIndGuard( out() );
-                dumpHex< sal_uInt16 >( "border-style", "XF-BORDERSTYLE" );
-                dumpHex< sal_uInt16 >( "border-color1", "XF-BORDERCOLOR1" );
-                dumpHex< sal_uInt32 >( "border-color2", "CFRULE-BORDERCOLOR2" );
-            }
-            if( getFlag< sal_uInt32 >( nFlags, 0x20000000 ) )
-            {
-                writeEmptyItem( "pattern-block" );
-                IndentGuard aIndGuard( out() );
-                dumpHex< sal_uInt32 >( "pattern", "CFRULE-FILLBLOCK" );
-            }
-            if( getFlag< sal_uInt32 >( nFlags, 0x40000000 ) )
+            dumpCfRuleProp();
+            if( nFmla1Size > 0 ) getFormulaDumper().dumpNameFormula( "formula1", nFmla1Size );
+            if( nFmla2Size > 0 ) getFormulaDumper().dumpNameFormula( "formula2", nFmla2Size );
+        }
+        break;
+
+        case BIFF_ID_CFRULE12:
+        {
+            dumpFrHeader( true, true );
+            dumpDec< sal_uInt8 >( "type", "CFRULE12-TYPE" );
+            dumpDec< sal_uInt8 >( "operator", "CFRULE-OPERATOR" );
+            sal_uInt16 nFmla1Size = dumpDec< sal_uInt16 >( "formula1-size" );
+            sal_uInt16 nFmla2Size = dumpDec< sal_uInt16 >( "formula2-size" );
+            dumpDxf12Prop();
+            if( nFmla1Size > 0 ) getFormulaDumper().dumpNameFormula( "formula1", nFmla1Size );
+            if( nFmla2Size > 0 ) getFormulaDumper().dumpNameFormula( "formula2", nFmla2Size );
+            getFormulaDumper().dumpNameFormula( "active-formula" );
+            dumpHex< sal_uInt8 >( "flags", "CFRULE12-FLAGS" );
+            dumpDec< sal_uInt16 >( "priority" );
+            dumpCfRule12Param( dumpDec< sal_uInt16 >( "sub-type", "CFRULE12-SUBTYPE" ) );
+        }
+        break;
+
+        case BIFF_ID_CFRULEEXT:
+            dumpFrHeader( true, true );
+            dumpBool< sal_uInt32 >( "cfrule12-follows" );
+            dumpDec< sal_uInt16 >( "cfheader-id" );
+            if( rStrm.getRemaining() >= 25 )
             {
-                writeEmptyItem( "protection-block" );
-                IndentGuard aIndGuard( out() );
-                dumpHex< sal_uInt16 >( "flags", "CFRULE-PROTECTION-FLAGS" );
+                dumpDec< sal_uInt16 >( "cfrule-idx" );
+                dumpDec< sal_uInt8 >( "operator", "CFRULE-OPERATOR" );
+                sal_uInt8 nSubType = dumpDec< sal_uInt8 >( "sub-type", "CFRULE12-SUBTYPE" );
+                dumpDec< sal_uInt16 >( "priority" );
+                dumpHex< sal_uInt8 >( "flags", "CFRULEEXT-FLAGS" );
+                if( dumpBoolean( "has-dxf-data" ) ) dumpDxf12Prop();
+                dumpCfRule12Param( nSubType );
             }
-            if( nFmla1Size > 0 )
-                getFormulaDumper().dumpNameFormula( "formula1", nFmla1Size );
-            if( nFmla2Size > 0 )
-                getFormulaDumper().dumpNameFormula( "formula2", nFmla2Size );
-        }
         break;
 
         case BIFF_ID_CH3DDATAFORMAT:
@@ -1729,10 +1734,9 @@ void WorkbookStreamObject::implDumpRecordBody()
             dumpHex< sal_uInt16 >( "flags", "CHCHART3D-FLAGS" );
         break;
 
-        case BIFF_ID_CHTYPEGROUP:
-            dumpUnused( 16 );
-            dumpHex< sal_uInt16 >( "flags", "CHTYPEGROUP-FLAGS" );
-            if( eBiff >= BIFF5 ) dumpDec< sal_uInt16 >( "group-idx" );
+        case BIFF_ID_CHECKCOMPAT:
+            dumpFrHeader( true, true );
+            dumpBool< sal_uInt32 >( "check-compatibility" );
         break;
 
         case BIFF_ID_CHDATAFORMAT:
@@ -1961,6 +1965,12 @@ void WorkbookStreamObject::implDumpRecordBody()
             if( eBiff == BIFF8 ) dumpDec< sal_uInt16 >( "label-rotation", "TEXTROTATION" );
         break;
 
+        case BIFF_ID_CHTYPEGROUP:
+            dumpUnused( 16 );
+            dumpHex< sal_uInt16 >( "flags", "CHTYPEGROUP-FLAGS" );
+            if( eBiff >= BIFF5 ) dumpDec< sal_uInt16 >( "group-idx" );
+        break;
+
         case BIFF_ID_CHVALUERANGE:
             dumpDec< double >( "minimum" );
             dumpDec< double >( "maximum" );
@@ -1999,6 +2009,11 @@ void WorkbookStreamObject::implDumpRecordBody()
             dumpDec< sal_uInt16 >( "col-width", "CONV-COLWIDTH" );
         break;
 
+        case BIFF_ID_COMPRESSPICS:
+            dumpFrHeader( true, true );
+            dumpBool< sal_uInt32 >( "recommend-compress-pics" );
+        break;
+
         case BIFF_ID_CONT:
             if( (eBiff == BIFF8) && (getLastRecId() == BIFF_ID_OBJ) )
                 dumpEmbeddedDff();
@@ -2018,6 +2033,11 @@ void WorkbookStreamObject::implDumpRecordBody()
         }
         break;
 
+        case BIFF_ID_COUNTRY:
+            dumpDec< sal_uInt16 >( "ui-country", "COUNTRY" );
+            dumpDec< sal_uInt16 >( "sys-country", "COUNTRY" );
+        break;
+
         case BIFF_ID_CRN:
         {
             sal_Int32 nCol2 = dumpColIndex( "last-col-idx", false );
@@ -2098,6 +2118,13 @@ void WorkbookStreamObject::implDumpRecordBody()
             dumpDec< sal_Int32 >( "dval-entry-count" );
         break;
 
+        case BIFF_ID_DBCELL:
+            dumpDec< sal_uInt32 >( "reverse-offset-to-row" );
+            out().resetItemIndex();
+            while( rStrm.getRemaining() >= 2 )
+                dumpDec< sal_uInt16 >( "#cell-offset" );
+        break;
+
         case BIFF2_ID_DEFINEDNAME:
         case BIFF3_ID_DEFINEDNAME:
         {
@@ -2143,6 +2170,12 @@ void WorkbookStreamObject::implDumpRecordBody()
             if( nRecId == BIFF3_ID_DIMENSION ) dumpUnused( 2 );
         break;
 
+        case BIFF_ID_DXF:
+            dumpFrHeader( true, true );
+            dumpHex< sal_uInt16 >( "flags", "DXF-FLAGS" );
+            dumpDxfProp();
+        break;
+
         case BIFF_ID_EXTERNALBOOK:
         {
             sal_uInt16 nCount = dumpDec< sal_uInt16 >( "sheet-count" );
@@ -2255,6 +2288,11 @@ void WorkbookStreamObject::implDumpRecordBody()
             dumpFontRec();
         break;
 
+        case BIFF_ID_FORCEFULLCALC:
+            dumpFrHeader( true, true );
+            dumpBool< sal_Int32 >( "recalc-all-formulas" );
+        break;
+
         case BIFF2_ID_FORMAT:
         case BIFF4_ID_FORMAT:
             dumpFormatRec();
@@ -2275,11 +2313,34 @@ void WorkbookStreamObject::implDumpRecordBody()
                 dumpString( "footer", BIFF_STR_8BITLENGTH );
         break;
 
+        case BIFF_ID_GUTS:
+            dumpDec< sal_uInt16 >( "row-outlines-width" );
+            dumpDec< sal_uInt16 >( "column-outlines-height" );
+            dumpDec< sal_uInt16 >( "row-levels", "GUTS-LEVELS" );
+            dumpDec< sal_uInt16 >( "column-levels", "GUTS-LEVELS" );
+        break;
+
         case BIFF_ID_HEADER:
             if( rStrm.getRemaining() > 0 )
                 dumpString( "header", BIFF_STR_8BITLENGTH );
         break;
 
+        case BIFF_ID_HEADERFOOTER:
+        {
+            dumpFrHeader( true, true );
+            dumpGuid( "view-guid" );
+            dumpHex< sal_uInt16 >( "flags", "HEADERFOOTER-FLAGS" );
+            sal_uInt16 nEvenHLen = dumpDec< sal_uInt16 >( "even-h-len" );
+            sal_uInt16 nEvenFLen = dumpDec< sal_uInt16 >( "even-f-len" );
+            sal_uInt16 nFirstHLen = dumpDec< sal_uInt16 >( "first-h-len" );
+            sal_uInt16 nFirstFLen = dumpDec< sal_uInt16 >( "first-f-len" );
+            if( nEvenHLen > 0 ) dumpUniString( "even-h" );
+            if( nEvenFLen > 0 ) dumpUniString( "even-f" );
+            if( nFirstHLen > 0 ) dumpUniString( "first-h" );
+            if( nFirstFLen > 0 ) dumpUniString( "first-f" );
+        }
+        break;
+
         case BIFF_ID_HYPERLINK:
             dumpRange();
             if( cfg().getStringOption( dumpGuid( "guid" ), OUString() ).equalsAscii( "StdHlink" ) )
@@ -2307,6 +2368,20 @@ void WorkbookStreamObject::implDumpRecordBody()
         }
         break;
 
+        case BIFF2_ID_INDEX:
+        case BIFF3_ID_INDEX:
+            if( eBiff <= BIFF4 )
+                dumpHex< sal_uInt32 >( "first-defname-pos", "CONV-DEC" );
+            else
+                dumpUnused( 4 );
+            dumpRowIndex( "first-row-with-cell", eBiff == BIFF8 );
+            dumpRowIndex( "first-free-row", eBiff == BIFF8 );
+            if( nRecId == BIFF3_ID_INDEX ) dumpHex< sal_uInt32 >( (eBiff <= BIFF4) ? "first-xf-pos" : "defcolwidth-pos", "CONV-DEC" );
+            out().resetItemIndex();
+            while( rStrm.getRemaining() >= 4 )
+                dumpHex< sal_uInt32 >( "#first-row-pos-of-block", "CONV-DEC" );
+        break;
+
         case BIFF2_ID_INTEGER:
             dumpCellHeader( true );
             dumpDec< sal_uInt16 >( "value" );
@@ -2341,6 +2416,13 @@ void WorkbookStreamObject::implDumpRecordBody()
             mbHasDff = true;
         break;
 
+        case BIFF_ID_MTHREADSETTINGS:
+            dumpFrHeader( true, true );
+            dumpBool< sal_Int32 >( "multi-thread-enabled" );
+            dumpBool< sal_Int32 >( "manual-thread-count" );
+            dumpDec< sal_Int32 >( "thread-count" );
+        break;
+
         case BIFF_ID_MULTBLANK:
         {
             Address aPos = dumpAddress();
@@ -2398,6 +2480,12 @@ void WorkbookStreamObject::implDumpRecordBody()
             dumpObjRec();
         break;
 
+        case BIFF_ID_PAGELAYOUTVIEW:
+            dumpFrHeader( true, true );
+            dumpDec< sal_uInt16 >( "scaling", "CONV-PERCENT" );
+            dumpHex< sal_uInt16 >( "flags", "PAGELAYOUTVIEW-FLAGS" );
+        break;
+
         case BIFF_ID_PAGESETUP:
             dumpDec< sal_uInt16 >( "paper-size", "PAGESETUP-PAPERSIZE" );
             dumpDec< sal_uInt16 >( "scaling", "CONV-PERCENT" );
@@ -2570,6 +2658,11 @@ void WorkbookStreamObject::implDumpRecordBody()
             }
         break;
 
+        case BIFF_ID_RECALCID:
+            dumpFrHeader( true, false );
+            dumpDec< sal_uInt32 >( "recalc-engine-id" );
+        break;
+
         case BIFF_ID_RK:
             dumpCellHeader();
             dumpRk( "value" );
@@ -2661,6 +2754,20 @@ void WorkbookStreamObject::implDumpRecordBody()
             dumpRangeList( "selection", false );
         break;
 
+        case BIFF_ID_SHAREDFEATHEAD:
+        {
+            dumpFrHeader( true, true );
+            sal_uInt16 nType = dumpDec< sal_uInt16 >( "feature-type", "SHAREDFEATHEAD-TYPE" );
+            dumpUnused( 1 );
+            if( dumpBool< sal_Int32 >( "has-data" ) ) switch( nType )
+            {
+                case 2:
+                    dumpHex< sal_uInt32 >( "allowed-flags", "SHAREDFEATHEAD-PROT-FLAGS" );
+                break;
+            }
+        }
+        break;
+
         case BIFF_ID_SHAREDFMLA:
             dumpRange( "formula-range", false );
             dumpUnused( 1 );
@@ -2680,18 +2787,22 @@ void WorkbookStreamObject::implDumpRecordBody()
             dumpString( "sheet-name", BIFF_STR_8BITLENGTH, BIFF_STR_8BITLENGTH );
         break;
 
+        case BIFF_ID_SHEETEXT:
+            dumpFrHeader( true, true );
+            dumpDec< sal_uInt32 >( "rec-size" );
+            dumpDec< sal_uInt32 >( "flags-1", "SHEETEXT-FLAGS1" );
+            if( rStrm.getRemaining() >= 20 )
+            {
+                dumpDec< sal_uInt32 >( "flags-2", "SHEETEXT-FLAGS2" );
+                dumpExtCfColor( "tab-color" );
+            }
+        break;
+
         case BIFF_ID_SHEETHEADER:
             dumpHex< sal_uInt32 >( "substream-size", "CONV-DEC" );
             dumpByteString( "sheet-name", BIFF_STR_8BITLENGTH );
         break;
 
-        case BIFF_ID_SHEETPROTECTION:
-            dumpFrHeader( true, true );
-            dumpUnused( 7 );
-            dumpHex< sal_uInt16 >( "allowed-flags", "SHEETPROTECTION-FLAGS" );
-            dumpUnused( 2 );
-        break;
-
         case BIFF_ID_SST:
             dumpDec< sal_uInt32 >( "string-cell-count" );
             dumpDec< sal_uInt32 >( "sst-size" );
@@ -2725,6 +2836,7 @@ void WorkbookStreamObject::implDumpRecordBody()
             dumpDec< sal_Int8 >( "builtin-idx", "STYLEEXT-BUILTIN" );
             dumpDec< sal_Int8 >( "outline-level" );
             dumpUnicodeArray( "style-name", rStrm.readuInt16() );
+            dumpDxfProp();
         break;
 
         case BIFF_ID_SXEXT:
@@ -2739,6 +2851,22 @@ void WorkbookStreamObject::implDumpRecordBody()
             }
         break;
 
+        case BIFF_ID_TABLESTYLES:
+        {
+            dumpFrHeader( true, true );
+            dumpDec< sal_uInt32 >( "table-style-count" );
+            sal_uInt16 nDefTableLen, nDefPivotLen;
+            rStrm >> nDefTableLen >> nDefPivotLen;
+            dumpUnicodeArray( "def-table-style", nDefTableLen );
+            dumpUnicodeArray( "def-pivot-style", nDefPivotLen );
+        }
+        break;
+
+        case BIFF_ID_THEME:
+            dumpFrHeader( true, true );
+            dumpDec< sal_uInt32 >( "theme-version", "THEME-VERSION" );
+        break;
+
         case BIFF_ID_TXO:
             dumpHex< sal_uInt16 >( "flags", "TXO-FLAGS" );
             dumpDec< sal_uInt16 >( "orientation", "TEXTORIENTATION" );
@@ -2813,6 +2941,21 @@ void WorkbookStreamObject::implDumpRecordBody()
         case BIFF5_ID_XF:
             dumpXfRec();
         break;
+
+        case BIFF_ID_XFCRC:
+            dumpFrHeader( true, true );
+            dumpUnused( 2 );
+            dumpDec< sal_uInt16 >( "xf-count" );
+            dumpHex< sal_uInt32 >( "xf-checksum" );
+        break;
+
+        case BIFF_ID_XFEXT:
+            dumpFrHeader( true, true );
+            dumpUnused( 2 );
+            dumpXfIdx( "xf-idx" );
+            dumpUnused( 2 );
+            dumpXfExtProp();
+        break;
     }
 }
 
@@ -2851,12 +2994,12 @@ sal_uInt16 WorkbookStreamObject::dumpColorIdx( const String& rName, bool b16Bit
 
 sal_uInt16 WorkbookStreamObject::dumpFontIdx( const String& rName, bool b16Bit )
 {
-    return dumpDec< sal_uInt16, sal_uInt8 >( b16Bit, rName( "font-idx" ), "FONTNAMES" );
+    return dumpDec< sal_uInt16, sal_uInt8 >( b16Bit, rName( "font-idx" ), mxFontNames );
 }
 
 sal_uInt16 WorkbookStreamObject::dumpFormatIdx( const String& rName )
 {
-    return dumpDec< sal_uInt16, sal_uInt8 >( getBiff() >= BIFF5, rName( "fmt-idx" ), "FORMATS" );
+    return dumpDec< sal_uInt16, sal_uInt8 >( getBiff() >= BIFF5, rName( "fmt-idx" ), mxFormats );
 }
 
 sal_uInt16 WorkbookStreamObject::dumpXfIdx( const String& rName, bool bBiff2Style )
@@ -2874,6 +3017,54 @@ sal_uInt16 WorkbookStreamObject::dumpXfIdx( const String& rName, bool bBiff2Styl
     return nXfIdx;
 }
 
+void WorkbookStreamObject::dumpExtColorValue( sal_uInt32 nColorType )
+{
+    switch( nColorType )
+    {
+        case 0:     dumpUnused( 4 );                                break;
+        case 1:     dumpDec< sal_uInt32 >( "color-idx", mxColors ); break;
+        case 2:     dumpColorABGR();                                break;
+        case 3:     dumpDec< sal_uInt32 >( "theme-id" );            break;
+        case 4:     dumpUnused( 4 );                                break;
+        default:    dumpUnknown( 4 );
+    }
+}
+
+void WorkbookStreamObject::dumpExtColor( const String& rName )
+{
+    MultiItemsGuard aMultiGuard( out() );
+    writeEmptyItem( rName( "color" ) );
+    switch( extractValue< sal_uInt8 >( dumpDec< sal_uInt8 >( "flags", "EXTCOLOR-FLAGS" ), 1, 7 ) )
+    {
+        case 0:     dumpUnused( 1 );                    break;
+        case 1:     dumpColorIdx( "color-idx", false ); break;
+        case 2:     dumpUnused( 1 );                    break;
+        case 3:     dumpDec< sal_uInt8 >( "theme-id" ); break;
+        case 4:     dumpUnused( 1 );                    break;
+        default:    dumpUnknown( 1 );
+    }
+    dumpDec< sal_Int16 >( "tint", "CONV-TINT" );
+    dumpColorABGR();
+}
+
+void WorkbookStreamObject::dumpExtCfColor( const String& rName )
+{
+    MultiItemsGuard aMultiGuard( out() );
+    writeEmptyItem( rName( "color" ) );
+    dumpExtColorValue( dumpExtColorType< sal_uInt32 >() );
+    dumpDec< double >( "tint", "CONV-FLOAT-TO-PERC" );
+}
+
+void WorkbookStreamObject::dumpExtGradientHead()
+{
+    dumpDec< sal_Int32 >( "gradient-type", "EXTGRADIENT-TYPE" );
+    dumpDec< double >( "linear-angle" );
+    dumpDec< double >( "pos-left" );
+    dumpDec< double >( "pos-right" );
+    dumpDec< double >( "pos-top" );
+    dumpDec< double >( "pos-bottom" );
+}
+
 OUString WorkbookStreamObject::dumpPivotString( const String& rName, sal_uInt16 nStrLen )
 {
     OUString aString;
@@ -2910,6 +3101,285 @@ void WorkbookStreamObject::dumpBoolErr()
         writeBooleanItem( "boolean", nValue );
 }
 
+void WorkbookStreamObject::dumpCfRuleProp()
+{
+    BiffInputStream& rStrm = getBiffStream();
+    sal_uInt32 nFlags1 = dumpHex< sal_uInt32 >( "flags-1", "CFRULE-FLAGS1" );
+    sal_uInt16 nFlags2 = dumpHex< sal_uInt16 >( "flags-2", "CFRULE-FLAGS2" );
+    if( getFlag< sal_uInt32 >( nFlags1, 0x02000000 ) )
+    {
+        writeEmptyItem( "numfmt-block" );
+        IndentGuard aIndGuard( out() );
+        if( getFlag< sal_uInt16 >( nFlags2, 0x0001 ) )
+        {
+            dumpDec< sal_uInt16 >( "size" );
+            dumpUniString( "numfmt" );
+        }
+        else
+        {
+            dumpUnused( 1 );
+            dumpDec< sal_uInt8 >( "fmt-idx", mxFormats );
+        }
+    }
+    if( getFlag< sal_uInt32 >( nFlags1, 0x04000000 ) )
+    {
+        writeEmptyItem( "font-block" );
+        IndentGuard aIndGuard( out() );
+        sal_Int64 nRecPos = rStrm.tell();
+        dumpUniString( "name", BIFF_STR_8BITLENGTH );
+        dumpUnused( static_cast< sal_Int32 >( nRecPos + 64 - rStrm.tell() ) );
+        dumpDec< sal_Int32 >( "height", "CONV-TWIP-TO-PT" );
+        dumpHex< sal_uInt32 >( "flags", "CFRULE-FONTFLAGS" );
+        dumpDec< sal_Int16 >( "weight", "CFRULE-FONTWEIGHT" );
+        dumpDec< sal_Int16 >( "escapement", "CFRULE-FONTESCAPEMENT" );
+        dumpDec< sal_Int8 >( "underline", "CFRULE-FONTUNDERLINE" );
+        dumpDec< sal_uInt8 >( "family", "FONT-FAMILY" );
+        dumpDec< sal_uInt8 >( "charset", "CHARSET" );
+        dumpUnused( 1 );
+        dumpDec< sal_Int32 >( "color", "CFRULE-FONTCOLOR" );
+        dumpUnused( 4 );
+        dumpHex< sal_uInt32 >( "used-flags", "CFRULE-FONTUSEDFLAGS" );
+        dumpDec< sal_uInt32 >( "escapement-used", "CFRULE-FONTUSED" );
+        dumpDec< sal_uInt32 >( "underline-used", "CFRULE-FONTUSED" );
+        dumpDec< sal_uInt32 >( "weight-used", "CFRULE-FONTUSED" );
+        dumpUnused( 4 );
+        dumpDec< sal_Int32 >( "first-char" );
+        dumpDec< sal_Int32 >( "char-count" );
+        dumpDec< sal_uInt16 >( "font-idx" );
+    }
+    if( getFlag< sal_uInt32 >( nFlags1, 0x08000000 ) )
+    {
+        writeEmptyItem( "alignment-block" );
+        IndentGuard aIndGuard( out() );
+        dumpHex< sal_uInt8 >( "alignent", "CFRULE-ALIGNMENT" );
+        dumpHex< sal_uInt8 >( "rotation", "TEXTROTATION" );
+        dumpHex< sal_uInt16 >( "indent", "CFRULE-INDENT" );
+        dumpDec< sal_Int32 >( "relative-indent" );
+    }
+    if( getFlag< sal_uInt32 >( nFlags1, 0x10000000 ) )
+    {
+        writeEmptyItem( "border-block" );
+        IndentGuard aIndGuard( out() );
+        dumpHex< sal_uInt16 >( "border-style", "XF-BORDERSTYLE" );
+        dumpHex< sal_uInt16 >( "border-color1", "XF-BORDERCOLOR1" );
+        dumpHex< sal_uInt32 >( "border-color2", "CFRULE-BORDERCOLOR2" );
+    }
+    if( getFlag< sal_uInt32 >( nFlags1, 0x20000000 ) )
+    {
+        writeEmptyItem( "pattern-block" );
+        IndentGuard aIndGuard( out() );
+        dumpHex< sal_uInt32 >( "pattern", "CFRULE-FILLBLOCK" );
+    }
+    if( getFlag< sal_uInt32 >( nFlags1, 0x40000000 ) )
+    {
+        writeEmptyItem( "protection-block" );
+        IndentGuard aIndGuard( out() );
+        dumpHex< sal_uInt16 >( "flags", "CFRULE-PROTECTION-FLAGS" );
+    }
+}
+
+void WorkbookStreamObject::dumpXfExtProp()
+{
+    BiffInputStream& rStrm = getBiffStream();
+    for( sal_uInt16 nIndex = 0, nCount = dumpDec< sal_uInt16 >( "subrec-count" ); !rStrm.isEof() && (nIndex < nCount); ++nIndex )
+    {
+        out().startMultiItems();
+        sal_Int64 nStartPos = rStrm.tell();
+        writeEmptyItem( "SUBREC" );
+        sal_uInt16 nSubRecId = dumpDec< sal_uInt16 >( "id", "XFEXT-SUBREC" );
+        sal_uInt16 nSubRecSize = dumpDec< sal_uInt16 >( "size" );
+        sal_Int64 nEndPos = nStartPos + nSubRecSize;
+        out().endMultiItems();
+        IndentGuard aIndGuard( out() );
+        switch( nSubRecId )
+        {
+            case 4: case 5: case 7: case 8: case 9: case 10: case 11: case 13:
+            {
+                sal_uInt16 nColorType = dumpExtColorType< sal_uInt16 >();
+                dumpDec< sal_Int16 >( "tint", "CONV-TINT" );
+                dumpExtColorValue( nColorType );
+                dumpUnused( 8 );
+            }
+            break;
+            case 6:
+                dumpExtGradientHead();
+                out().resetItemIndex();
+                for( sal_Int32 nStop = 0, nStopCount = dumpDec< sal_Int32 >( "stop-count" ); (nStop < nStopCount) && !in().isEof(); ++nStop )
+                {
+                    writeEmptyItem( "#stop" );
+                    IndentGuard aIndGuard( out() );
+                    sal_uInt16 nColorType = dumpExtColorType< sal_uInt16 >();
+                    dumpExtColorValue( nColorType );
+                    dumpDec< double >( "stop-pos" );
+                    dumpDec< double >( "tint", "CONV-FLOAT-TO-PERC" );
+                }
+            break;
+            case 14:
+                dumpDec< sal_Int8 >( "font-scheme", "EXTFONT-SCHEME" );
+            break;
+            case 15:
+                dumpDec< sal_uInt16 >( "indent" );
+            break;
+        }
+        dumpRemainingTo( nEndPos );
+    }
+}
+
+void WorkbookStreamObject::dumpDxfProp()
+{
+    BiffInputStream& rStrm = getBiffStream();
+    dumpUnused( 2 );
+    for( sal_uInt16 nIndex = 0, nCount = dumpDec< sal_uInt16 >( "subrec-count" ); !rStrm.isEof() && (nIndex < nCount); ++nIndex )
+    {
+        out().startMultiItems();
+        sal_Int64 nStartPos = rStrm.tell();
+        writeEmptyItem( "SUBREC" );
+        sal_uInt16 nSubRecId = dumpDec< sal_uInt16 >( "id", "DXF-SUBREC" );
+        sal_uInt16 nSubRecSize = dumpDec< sal_uInt16 >( "size" );
+        sal_Int64 nEndPos = nStartPos + nSubRecSize;
+        out().endMultiItems();
+        IndentGuard aIndGuard( out() );
+        switch( nSubRecId )
+        {
+            case 0:
+                dumpDec< sal_uInt8 >( "pattern", mxFillPatterns );
+            break;
+            case 1: case 2: case 5:
+                dumpExtColor();
+            break;
+            case 3:
+                dumpExtGradientHead();
+            break;
+            case 4:
+                dumpDec< sal_uInt16 >( "index" );
+                dumpDec< double >( "stop-position" );
+                dumpExtColor( "stop-color" );
+            break;
+            case 6: case 7: case 8: case 9: case 10: case 11: case 12:
+                dumpExtColor( "color" );
+                dumpDec< sal_uInt16 >( "style", mxBorderStyles );
+            break;
+            case 13: case 14:
+                dumpBoolean( "value" );
+            break;
+            case 15:
+                dumpDec< sal_uInt8 >( "alignment", "XF-HORALIGN" );
+            break;
+            case 16:
+                dumpDec< sal_uInt8 >( "alignment", "XF-VERALIGN" );
+            break;
+            case 17:
+                dumpDec< sal_uInt8 >( "rotation", "TEXTROTATION" );
+            break;
+            case 18:
+                dumpDec< sal_uInt16 >( "indent" );
+            break;
+            case 19:
+                dumpDec< sal_uInt8 >( "text-dir", "XF-TEXTDIRECTION" );
+            break;
+            case 20: case 21: case 22: case 23:
+                dumpBoolean( "value" );
+            break;
+            case 24:
+                dumpUnicodeArray( "name", rStrm.readuInt16() );
+            break;
+            case 25:
+                dumpDec< sal_uInt16 >( "weight", "FONT-WEIGHT" );
+            break;
+            case 26:
+                dumpDec< sal_uInt16 >( "underline", "FONT-UNDERLINE" );
+            break;
+            case 27:
+                dumpDec< sal_uInt16 >( "escapement", "FONT-ESCAPEMENT" );
+            break;
+            case 28: case 29: case 30: case 31: case 32: case 33:
+                dumpBoolean( "value" );
+            break;
+            case 34:
+                dumpDec< sal_uInt8 >( "charset", "CHARSET" );
+            break;
+            case 35:
+                dumpDec< sal_uInt8 >( "family", "FONT-FAMILY" );
+            break;
+            case 36:
+                dumpDec< sal_Int32 >( "height", "CONV-TWIP-TO-PT" );
+            break;
+            case 37:
+                dumpDec< sal_uInt8 >( "scheme", "EXTFONT-SCHEME" );
+            break;
+            case 38:
+                dumpUnicodeArray( "numfmt", rStrm.readuInt16() );
+            break;
+            case 41:
+                dumpDec< sal_uInt16 >( "fmt-idx", mxFormats );
+            break;
+            case 42:
+                dumpDec< sal_Int16 >( "relative-indent" );
+            break;
+            case 43: case 44:
+                dumpBoolean( "value" );
+            break;
+        }
+        dumpRemainingTo( nEndPos );
+    }
+}
+
+void WorkbookStreamObject::dumpDxf12Prop()
+{
+    BiffInputStream& rStrm = getBiffStream();
+    writeEmptyItem( "dxf-data" );
+    IndentGuard aIndGuard( out() );
+    sal_uInt32 nSize = dumpDec< sal_uInt32 >( "dxf-size" );
+    if( nSize == 0 )
+    {
+        dumpUnused( 2 );
+    }
+    else
+    {
+        sal_Int64 nEndPos = rStrm.tell() + nSize;
+        dumpCfRuleProp();
+        if( rStrm.tell() + 8 <= nEndPos )
+        {
+            dumpUnused( 6 );
+            dumpXfExtProp();
+        }
+        dumpRemainingTo( nEndPos );
+    }
+}
+
+void WorkbookStreamObject::dumpCfRule12Param( sal_uInt16 nSubType )
+{
+    sal_uInt8 nSize = dumpDec< sal_uInt8 >( "params-size" );
+    sal_Int64 nEndPos = getBiffStream().tell() + nSize;
+    {
+        writeEmptyItem( "params" );
+        IndentGuard aIndGuard( out() );
+        switch( nSubType )
+        {
+            case 5:
+                dumpHex< sal_uInt8 >( "flags", "CFRULE12-TOP10-FLAGS" );
+                dumpDec< sal_uInt16 >( "rank" );
+                dumpUnused( 13 );
+            break;
+            case 8:
+                dumpDec< sal_uInt16 >( "operator", "CFRULE12-TEXT-OPERATOR" );
+                dumpUnused( 14 );
+            break;
+            case 15: case 16: case 17: case 18: case 19: case 20: case 21: case 22: case 23: case 24:
+                dumpDec< sal_uInt16 >( "operator", "CFRULE12-DATE-OPERATOR" );
+                dumpUnused( 14 );
+            break;
+            case 25: case 26: case 29: case 30:
+                dumpDec< sal_uInt16 >( "std-dev" );
+                dumpUnused( 14 );
+            break;
+            default:
+                dumpUnused( 16 );
+        }
+    }
+    dumpRemainingTo( nEndPos );
+}
+
 void WorkbookStreamObject::dumpFontRec()
 {
     sal_uInt16 nFontId = getBiffData().getFontCount();
diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini
index cc9a5d1..645bb2b 100644
--- a/oox/source/dump/biffdumper.ini
+++ b/oox/source/dump/biffdumper.ini
@@ -29,6 +29,7 @@ merge-continue-record=1
 
 unitconverter=CONV-PERCENT-NEG,-1,%
 unitconverter=CONV-COLWIDTH,/256,chars
+unitconverter=CONV-TINT,/327.67,%
 
 shortlist=BIFF,0,biff2,biff3,biff4,biff5,biff8
 
@@ -42,30 +43,57 @@ constlist=ERRORCODES
   0x2A=#N/A
 end
 
-shortlist=EGA-COLORS,0,ega-black,ega-white,ega-red,ega-green,ega-blue,ega-yellow,ega-magenta,ega-cyan
+shortlist=WINDOWS-PALETTE-0,0,black,white,red,green,blue,yellow,magenta,cyan
+shortlist=WINDOWS-PALETTE-8,8,black,white,red,green,blue,yellow,magenta,cyan
+shortlist=WINDOWS-PALETTE-16,16,dark-red,dark-green,dark-blue,dark-yellow,dark-magenta,dark-cyan,light-grey,dark-grey
 
-constlist=COLORS-BIFF2
-  include=EGA-COLORS
-  default=
-  24=sys-window-text
-  25=sys-window-bg
+multilist=WINDOWS-SYSCOLORS-BIFF2
+  24=sys-window-text,sys-window-bg
   0x7FFF=sys-window-text
 end
 
-constlist=COLORS-BIFF5
-  include=EGA-COLORS
-  default=
-  64=sys-window-text
-  65=sys-window-bg
-  67=sys-button-face
-  77=sys-window-text-chart
-  78=sys-window-bg-chart
-  79=auto-border-chart
-  80=sys-tooltip-bg
-  81=sys-tooltip-text
+multilist=WINDOWS-SYSCOLORS-BIFF5
+  64=sys-window-text,sys-window-bg,,sys-button-face
+  77=sys-window-text-chart,sys-window-bg-chart,auto-border-chart,sys-tooltip-bg,sys-tooltip-text
   0x7FFF=sys-window-text
 end
 
+constlist=COLORS-BIFF2
+  include=WINDOWS-PALETTE-0
+  include=WINDOWS-SYSCOLORS-BIFF2
+end
+
+constlist=COLORS-BIFF3
+  include=WINDOWS-PALETTE-0
+  include=WINDOWS-PALETTE-8
+  include=WINDOWS-PALETTE-16
+  include=WINDOWS-SYSCOLORS-BIFF2
+end
+
+multilist=COLORS-BIFF5
+  include=WINDOWS-PALETTE-0
+  include=WINDOWS-PALETTE-8
+  include=WINDOWS-PALETTE-16
+  24=0x8080FF,0x802060,0xFFFFC0,0xA0E0E0,0x600080,0xFF8080,0x0080C0,0xC0C0FF
+  32=0x000080,0xFF00FF,0xFFFF00,0x00FFFF,0x800080,0x800000,0x008080,0x0000FF
+  40=0x00CFFF,0x69FFFF,0xE0FFE0,0xFFFF80,0xA6CAF0,0xDD9CB3,0xB38FEE,0xE3E3E3
+  48=0x2A6FF9,0x3FB8CD,0x488436,0x958C41,0x8E5E42,0xA0627A,0x624FAC,0x969696
+  56=0x1D2FBE,0x286676,0x004500,0x453E01,0x6A2813,0x85396A,0x4A3285,0x424242
+  include=WINDOWS-SYSCOLORS-BIFF5
+end
+
+multilist=COLORS-BIFF8
+  include=WINDOWS-PALETTE-0
+  include=WINDOWS-PALETTE-8
+  include=WINDOWS-PALETTE-16
+  24=0x9999FF,0x993366,0xFFFFCC,0xCCFFFF,0x660066,0xFF8080,0x0066CC,0xCCCCFF
+  32=0x000080,0xFF00FF,0xFFFF00,0x00FFFF,0x800080,0x800000,0x008080,0x0000FF
+  40=0x00CCFF,0xCCFFFF,0xCCFFCC,0xFFFF99,0x99CCFF,0xFF99CC,0xCC99FF,0xFFCC99
+  48=0x3366FF,0x33CCCC,0x99CC00,0xFFCC00,0xFF9900,0xFF6600,0x666699,0x969696
+  56=0x003366,0x339966,0x003300,0x333300,0x993300,0x993366,0x333399,0x333333
+  include=WINDOWS-SYSCOLORS-BIFF5
+end
+
 shortlist=BORDERSTYLES-BIFF3,0,none,thin,medium,dash,dot,thick,double,hair
 
 multilist=BORDERSTYLES-BIFF8
@@ -130,6 +158,17 @@ flagslist=FR-FLAGS
   0x0002=alert-unsupported
 end
 
+shortlist=EXTCOLOR-TYPE,0,auto,indexed,rgb,theme,n/a
+
+combilist=EXTCOLOR-FLAGS
+  0x01=rgb-valid
+  0xFE=uint8,dec,type,EXTCOLOR-TYPE
+end
+
+shortlist=EXTGRADIENT-TYPE,0,linear,path
+
+shortlist=EXTFONT-SCHEME,-1,n/a,none,major,minor
+
 # DFF ------------------------------------------------------------------------
 
 flagslist=DFF-CLIENTANCHOR-FLAGS
@@ -265,7 +304,7 @@ multilist=RECORD-NAMES-BIFF3
   0x0088=EDG,PUB,NOTEOFF,LH,COUNTRY,HIDEOBJ,,
   0x0090=SORT,SUB,PALETTE,,LHRECORD,LHNGRAPH,,
   0x0200=,,,,,,FORMULA,STRING
-  0x0208=ROW,BOF,,INDEX,,,,
+  0x0208=ROW,BOF,,,,,,
   0x0218=DEFINEDNAME
   0x0221=ARRAY
   0x0223=EXTERNALNAME
@@ -308,13 +347,14 @@ multilist=RECORD-NAMES-BIFF5
   0x0098=,,,FILTERMODE,,AUTOFILTERINFO,AUTOFILTER,
   0x00A8=,,,,,,SCENARIOS,SCENARIO
   0x00B0=PTDEFINITION,PTFIELD,PTFITEM,,PTROWCOLFIELDS,PTROWCOLITEMS,PTPAGEFIELDS,
-  0x00B8=DOCROUTE,RECIPNAME,,,SHAREDFMLA,MULTRK,MULTBLANK,TOOLBARHDR
+  0x00B8=DOCROUTE,RECIPNAME,,,,MULTRK,MULTBLANK,TOOLBARHDR
   0x00C0=TOOLBAREND,MMS,ADDMENU,DELMENU,,PTDATAFIELD,PCDEFINITION,PCDFIELD
   0x00C8=PCITEM_INDEXLIST,PCITEM_DOUBLE,PCITEM_BOOL,PCITEM_ERROR,PCITEM_INTEGER,PCITEM_STRING,PCITEM_DATE,PCITEM_MISSING
   0x00D0=SXTBL,SXTBRGITEM,SXTBPG,OBPROJ,,PIVOTCACHE,RSTRING,DBCELL
   0x00D8=PCDFRANGEPR,PCDFDISCRETEPR,BOOKBOOL,REVERT,SXEXT|PARAMQRY,SCENPROTECT,OLESIZE,UDDESC
   0x00E0=XF,INTERFACEHDR,INTERFACEEND,PCDSOURCE,,,,
   0x0206=FORMULA
+  0x04BC=SHAREDFMLA
   # chart records
   exclude=0x1004,0x102D,0x102F,0x1036,0x1037,0x1038,0x103B
   0x1040=CHRADARAREA,CHAXESSET,,CHLEGENDENTRY,CHPROPERTIES,CHSERGROUP,CHUSEDAXESSETS,
@@ -342,13 +382,17 @@ multilist=RECORD-NAMES-BIFF8
   0x01A8=,USERBVIEW,USERSVIEWBEGIN,USERSVIEWEND,,QSI,EXTERNALBOOK,PROT4REV
   0x01B0=CFHEADER,CFRULE,DATAVALIDATIONS,,,DCONBINAME,TXO,REFRESHALL
   0x01B8=HYPERLINK,NLRDELNAME,CODENAME,PCDFSQLTYPE,PROT4REVPASS,,DATAVALIDATION,
-  0x01C0=XL9FILE,,,,,,,
+  0x01C0=XL9FILE,RECALCID,INTCACHEDDATA,,,,,
   0x0800=SCREENTIP,,,WEBQRYSETTINGS,WEBQRYTABLES,,,
   0x0850=CHFRINFO,CHFRWRAPPER,CHFRBLOCKBEGIN,CHFRBLOCKEND,,,,CHFRUNITPROPS
   0x0858=CHPIVOTREF,CHPIVOTFLAGS,,,,,,
-  0x0860=,,SHEETLAYOUT,,,,,SHEETPROTECTION
+  0x0860=,,SHEETEXT,BOOKEXT,,,,SHAREDFEATHEAD
   0x0868=,,,CHFRLABELPROPS,,,,
-  0x0890=,,STYLEEXT,,,,,
+  0x0878=,,CFRULE12,CFRULEEXT,XFCRC,XFEXT,,
+  0x0888=,,,PAGELAYOUTVIEW,CHECKCOMPAT,DXF,TABLESTYLES,
+  0x0890=,,STYLEEXT,,,,THEME,
+  0x0898=,,MTHREADSETTINGS,COMPRESSPICS,HEADERFOOTER,,,
+  0x08A0=,,,FORCEFULLCALC,,,,
   # chart records
   0x1058=,,,,,,,CH3DDATAFORMAT
   0x1060=CHFONTBASE,CHPIEEXT,CHLABELRANGE2,CHDATATABLE,CHPLOTGROWTH,CHSERINDEX,CHESCHERFORMAT,CHPIEEXTSETT
@@ -476,7 +520,7 @@ constlist=BOF-SHEETTYPE
   0x0100=workspace
 end
 
-shortlist=BOF-EXCELVERSION,0,excel-97,excel-2000,excel-2002,excel-2003,excel-2007
+shortlist=BOF-EXCELVERSION,0,excel-97,excel-2000,excel-2002,excel-2003,excel-2007,,excel-2010
 shortlist=BOF-LOWESTVERSION-BIFF,6,biff8
 
 combilist=BOF-HISTORY-FLAGS
@@ -499,17 +543,50 @@ combilist=BOF-LOWESTVERSION-FLAGS
   0x00000F00=uint8,dec,version-saved,BOF-EXCELVERSION
 end
 
+# BOOKEXT --------------------------------------------------------------------
+
+combilist=BOOKEXT-FLAGS1
+  0x00000001=no-auto-recover
+  0x00000002=hide-pivot-list
+  0x00000004=filter-privacy
+  0x00000008=embed-smarttags
+  0x00000030=uint8,dec,display-smarttags,BOOKEXT-DISPLAY-SMARTTAGS
+  0x00000040=saved-on-recovery
+  0x00000080=minimal-save
+  0x00000100=opened-on-recovery
+  0x00000200=opened-in-save-mode
+end
+
+shortlist=BOOKEXT-DISPLAY-SMARTTAGS,0,button-and-indicator,button,nothing
+
+flagslist=BOOKEXT-FLAGS2
+  0x01=warn-smart-doc-manifest
+  0x02=show-inc-annotations
+end
+
+flagslist=BOOKEXT-FLAGS3
+  0x02=!all-published!selected-items-published
+  0x04=show-pivot-chart-filter
+end
+
 # CALCMODE -------------------------------------------------------------------
 
 shortlist=CALCMODE,-1,automatic-no-table,manual,automatic
 
+# CFHEADER -------------------------------------------------------------------
+
+combilist=CFHEADER-FLAGS
+  0x0001=complex
+  0xFFFE=uint16,dec,id
+end
+
 # CFRULE ---------------------------------------------------------------------
 
 shortlist=CFRULE-TYPE,1,value,formula
 shortlist=CFRULE-OPERATOR,0,none,between,not-between,equal,not-equal,greater-than,less-than,greater-equal,less-equal
 
-flagslist=CFRULE-FLAGS
-  ignore=0x00380080
+flagslist=CFRULE-FLAGS1
+  ignore=0x00200000
   0x00000001=!hor-align-used
   0x00000002=!vert-align-used
   0x00000004=!text-wrap-used
@@ -517,6 +594,7 @@ flagslist=CFRULE-FLAGS
   0x00000010=!justify-lastline-used
   0x00000020=!indent-used
   0x00000040=!shrinktofit-used
+  0x00000080=!cell-merged-used
   0x00000100=!cell-locked-used
   0x00000200=!cell-hidden-used
   0x00000400=!left-border-used
@@ -528,6 +606,9 @@ flagslist=CFRULE-FLAGS
   0x00010000=!fill-pattern-used
   0x00020000=!fg-color-idx-used
   0x00040000=!bg-color-idx-used
+  0x00080000=!fmt-idx-used
+  0x00100000=!def-font-used
+  0x02000000=numfmt-block
   0x04000000=font-block
   0x08000000=alignment-block
   0x10000000=border-block
@@ -536,6 +617,13 @@ flagslist=CFRULE-FLAGS
   0x80000000=!text-dir-used
 end
 
+flagslist=CFRULE-FLAGS2
+  ignore=0x0002
+  0x0001=!numfmt-id!numfmt-string
+  0x0004=outline-border
+  0x8000=use-text-dir
+end
+
 combilist=CFRULE-ALIGNMENT
   0x07=uint8,dec,hor-align,XF-HORALIGN
   0x08=text-wrap
@@ -546,6 +634,7 @@ end
 combilist=CFRULE-INDENT
   0x000F=uint8,dec,indent
   0x0010=shrink-to-fit
+  0x0020=cell-merged
   0x00C0=uint8,dec,text-dir,XF-TEXTDIRECTION
 end
 
@@ -558,7 +647,28 @@ flagslist=CFRULE-FONTFLAGS
   0x00000080=strikeout
 end
 
+constlist=CFRULE-FONTWEIGHT
+  include=FONT-WEIGHT
+  -1=unused
+end
+
+constlist=CFRULE-FONTESCAPEMENT
+  include=FONT-ESCAPEMENT
+  -1=unused
+end
+
+constlist=CFRULE-FONTUNDERLINE
+  include=FONT-UNDERLINE
+  -1=unused
+end
+
+constlist=CFRULE-FONTCOLOR
+  include=COLORS-BIFF8
+  -1=unused
+end
+
 flagslist=CFRULE-FONTUSEDFLAGS
+  ignore=0xFFFFFF00
   0x00000002=!italic-used
   0x00000008=!outline-used
   0x00000010=!shadow-used
@@ -590,6 +700,36 @@ flagslist=CFRULE-PROTECTION-FLAGS
   0x0002=formula-hidden
 end
 
+# CFRULE12 -------------------------------------------------------------------
+
+shortlist=CFRULE12-TYPE,1,cell-is,expression,color-scale,data-bar,top-ten,icon-set
+
+flagslist=CFRULE12-FLAGS
+  0x0002=stop-if-true
+end
+
+multilist=CFRULE12-SUBTYPE
+  0=cell-is,expression,color-scale,data-bar,icon-set,top-ten,,unique-values,contains-text,contains-blanks
+  10=not-contains-blanks,contains-errors,not-contains-errors,,,today,tomorrow,yesterday,last-7-days,last-month
+  20=next-month,this-week,next-week,last-week,this-month,above-average,below-average,duplicate-values,,equal-above-average
+  30=equal-below-average
+end
+
+flagslist=CFRULE12-TOP10-FLAGS
+  0x01=!bottom!top
+  0x02=percent
+end
+
+shortlist=CFRULE12-TEXT-OPERATOR,0,contains,not-contains,begins-with,ends-with
+shortlist=CFRULE12-DATE-OPERATOR,0,today,yesterday,last-7-days,this-week,last-week,last-month,tomorrow,next-week,next-month,this-month
+
+# CFRULEEXT ------------------------------------------------------------------
+
+flagslist=CFRULEEXT-FLAGS
+  0x0001=active
+  0x0002=stop-if-true
+end
+
 # CH3DDATAFORMAT -------------------------------------------------------------
 
 shortlist=CH3DDATAFORMAT-BASE,0,rectangular,circular
@@ -1071,6 +1211,25 @@ flagslist=DEFROWHEIGHT-FLAGS-BIFF3
   0x0008=thick-bottom
 end
 
+# DXF ------------------------------------------------------------------------
+
+flagslist=DXF-FLAGS
+  0x0001=!swap-fg-bg-color
+  0x0002=use-internal-borders
+end
+
+multilist=DXF-SUBREC
+  0=FILL-PATTERN,FILL-FGCOLOR,FILL-BGCOLOR,FILL-GRADIENT,FILL-STOP
+  5=FONT-COLOR,BORDER-TOP,BORDER-BOTTOM,BORDER-LEFT,BORDER-RIGHT
+  10=BORDER-DIAGONAL,BORDER-VERTICAL,BORDER-HORIZONTAL,BORDER-DIAGUP,BORDER-DIAGDOWN
+  15=ALIGN-HORIZONTAL,ALIGN-VERTICAL,ALIGN-ROTATION,ALIGN-INDENT,ALIGN-READINGORDER
+  20=ALIGN-WRAPTEXT,ALIGN-JUSTLASTLINE,ALIGN-SHRINKTOFIT,ALIGN-MERGED,FONT-NAME
+  25=FONT-WEIGHT,FONT-UNDERLINE,FONT-ESCAPEMENT,FONT-ITALIC,FONT-STRIKE
+  30=FONT-OUTLINE,FONT-SHADOW,FONT-CONDENSE,FONT-EXTEND,FONT-CHARSET
+  35=FONT-PITCHFAMILY,FONT-HEIGHT,FONT-SCHEME,NUMFMT-CODE,
+  40=,NUMFMT-ID,ALIGN-RELINDENT,PROT-LOCKED,PROT-HIDDEN
+end
+
 # EXTERNALBOOK ---------------------------------------------------------------
 
 constlist=EXTERNALBOOK-KEY
@@ -1145,6 +1304,20 @@ end
 
 shortlist=FORMULA-RESULTTYPE,0,string,boolean,error,empty
 
+# GUTS -----------------------------------------------------------------------
+
+shortlist=GUTS-LEVELS,0,none,,1-level,2-levels,3-levels,4-levels,5-levels,6-levels,7-levels
+
+# HEADERFOOTER ---------------------------------------------------------------
+
+flagslist=HEADERFOOTER-FLAGS
+  ignore=0xFFF0
+  0x0001=has-even-hf
+  0x0002=has-first-hf
+  0x0004=scale-with-sheet
+  0x0008=align-with-margins
+end
+
 # HIDEOBJ --------------------------------------------------------------------
 
 shortlist=HIDEOBJ,0,show,placeholder,hide
@@ -1337,6 +1510,15 @@ flagslist=OBJCMO-FLAGS
   0x4000=auto-area
 end
 
+# PAGELAYOUTVIEW -------------------------------------------------------------
+
+flagslist=PAGELAYOUTVIEW-FLAGS
+  ignore=0xFFF8
+  0x0001=page-layout-view
+  0x0002=show-ruler
+  0x0004=hide-margins
+end
+
 # PAGESETUP ------------------------------------------------------------------
 
 multilist=PAGESETUP-PAPERSIZE
@@ -1441,7 +1623,7 @@ shortlist=PHONETICPR-TYPE,0,halfwidth-katakana,fullwidth-katakana,hiragana,no-co
 shortlist=PHONETICPR-ALIGNMENT,0,no-control,left,center,distributed
 
 combilist=PHONETICPR-FLAGS
-  ignore=0x0030
+  ignore=0xFFF0
   0x0003=uint8,dec,type,PHONETICPR-TYPE
   0x000C=uint8,dec,alignment,PHONETICPR-ALIGNMENT
 end
@@ -1602,11 +1784,50 @@ combilist=ROW-FLAGS
   0x40000000=show-phonetic
 end
 
+# SHAREDFEATHEAD -------------------------------------------------------------
+
+shortlist=SHAREDFEATHEAD-TYPE,2,protection,ignored-formula-errors,smarttag,table
+
+flagslist=SHAREDFEATHEAD-PROT-FLAGS
+  0x00000001=edit-object
+  0x00000002=edit-scenario
+  0x00000004=format-cell
+  0x00000008=format-column
+  0x00000010=format-row
+  0x00000020=insert-column
+  0x00000040=insert-row
+  0x00000080=insert-hyperlink
+  0x00000100=delete-column
+  0x00000200=delete-row
+  0x00000400=select-locked
+  0x00000800=sort
+  0x00001000=use-autofilter
+  0x00002000=pivottable-report
+  0x00004000=select-unlocked
+end
+
 # SHEET ----------------------------------------------------------------------
 
 shortlist=SHEET-STATE,0,visible,hidden,very-hidden
 shortlist=SHEET-TYPE,0,worksheet,macrosheet,chartsheet,,,,vb-module
 
+# SHEETEXT -------------------------------------------------------------------
+
+combilist=SHEETEXT-FLAGS1
+  0x0000007F=uint8,dec,color-idx,SHEETEXT-COLOR
+end
+
+constlist=SHEETEXT-COLOR
+  include=COLORS
+  0x7F=undefined
+end
+
+combilist=SHEETEXT-FLAGS2
+  include=SHEETEXT-FLAGS1
+  0x00000080=eval-cond-formats
+  0x00000100=!published!unpublished
+end
+
 # SHEETPR --------------------------------------------------------------------
 
 shortlist=SHEETPR-WINDOWPOS,0,tiled,horizontal,vertical,cascaded
@@ -1635,26 +1856,6 @@ flagslist=SHEETPR-FLAGS-BIFF5
   0x0010=dialog-sheet
 end
 
-# SHEETPROTECTION ------------------------------------------------------------
-
-flagslist=SHEETPROTECTION-FLAGS
-  0x0001=edit-object
-  0x0002=edit-scenario
-  0x0004=format-cell
-  0x0008=format-column
-  0x0010=format-row
-  0x0020=insert-column
-  0x0040=insert-row
-  0x0080=insert-hyperlink
-  0x0100=delete-column
-  0x0200=delete-row
-  0x0400=select-locked
-  0x0800=sort
-  0x1000=use-autofilter
-  0x2000=pivottable-report
-  0x4000=select-unlocked
-end
-
 # STYLE ----------------------------------------------------------------------
 
 combilist=STYLE-FLAGS
@@ -1697,6 +1898,14 @@ end
 
 shortlist=SXEXT-SOURCETYPE,1,odbc,dao,,webquery
 
+# THEME ----------------------------------------------------------------------
+
+constlist=THEME-VERSION
+  0=custom
+  123820=default
+  124226=default
+end
+
 # TXO ------------------------------------------------------------------------
 
 combilist=TXO-FLAGS
@@ -1901,5 +2110,14 @@ combilist=CELL-XFSTYLE-BIFF2
   include=XF-STYLEFLAGS-BIFF2
 end
 
+# XFEXT ----------------------------------------------------------------------
+
+multilist=XFEXT-SUBREC
+  0=,,,,FILL-FGCOLOR
+  5=FILL-BGCOLOR,FILL-GRADIENT,BORDER-TOP-COLOR,BORDER-BOTTOM-COLOR,BORDER-LEFT-COLOR
+  10=BORDER-RIGHT-COLOR,BORDER-DIAG-COLOR,,TEXT-COLOR,FONT-SCHEME
+  15=INDENT
+end
+
 # ============================================================================
 
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 81f6306..af3b9b4 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -3130,20 +3130,6 @@ void RecordObjectBase::writeHeader()
 
 // ============================================================================
 
-void SequenceRecordObjectBase::construct(
-        const ObjectBase& rParent, const BinaryInputStreamRef& rxBaseStrm, const ::rtl::OUString& rSysFileName,
-        const BinaryInputStreamRef& rxRecStrm, const String& rRecNames, const String& rSimpleRecs )
-{
-    RecordObjectBase::construct( rParent, rxBaseStrm, rSysFileName, rxRecStrm, rRecNames, rSimpleRecs );
-}
-
-void SequenceRecordObjectBase::construct( const OutputObjectBase& rParent,
-        const BinaryInputStreamRef& rxBaseStrm, const BinaryInputStreamRef& rxRecStrm,
-        const String& rRecNames, const String& rSimpleRecs )
-{
-    RecordObjectBase::construct( rParent, rxBaseStrm, rxRecStrm, rRecNames, rSimpleRecs );
-}
-
 void SequenceRecordObjectBase::construct( const ObjectBase& rParent,
         const BinaryInputStreamRef& rxBaseStrm, const ::rtl::OUString& rSysFileName,
         const String& rRecNames, const String& rSimpleRecs )
diff --git a/oox/source/dump/dumperbase.ini b/oox/source/dump/dumperbase.ini
index bf51365..99603e1 100644
--- a/oox/source/dump/dumperbase.ini
+++ b/oox/source/dump/dumperbase.ini
@@ -222,6 +222,7 @@ show-record-position=0
 
 unitconverter=CONV-DEC,1
 unitconverter=CONV-PERCENT,1,%
+unitconverter=CONV-FLOAT-TO-PERC,100,%
 unitconverter=CONV-DEG,1,°
 unitconverter=CONV-HMM-TO-CM,/1000,cm
 unitconverter=CONV-INCH-TO-CM,2.54,cm
@@ -351,5 +352,23 @@ constlist=CODEPAGES
   65001=utf-8
 end
 
+multilist=COUNTRY
+  1=usa,canada,latin-america,,,,russia
+  20=egypt
+  30=greece,netherlands,belgium,france,spain,,hungary,,,italy
+  40=,switzerland,,austria,uk,denmark,sweden,norway,poland,germany
+  50=,,mexico,,,brazil
+  60=,australia,,,new-zealand,,thailand
+  80=,japan,korea,,vietnam,,china
+  90=turkey
+  210=,,,algeria,,,morocco,,libya
+  350=,portugal,,,iceland,,,,finland
+  420=czech
+  880=,,,,,,taiwan
+  960=,lebanon,jordan,syria,iraq,kuwait,saudi-arabia
+  970=,uae,israel,,qatar
+  980=,iran
+end
+
 # ============================================================================
 
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index 7218200..db0cca3 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -1037,7 +1037,6 @@ void OcxLabelObject::implDumpShortProperties()
     dumpSpecialEffectProperty< sal_uInt16 >( 0 );
     dumpStreamProperty();
     dumpUnicodeProperty();
-    dumpBoolProperty();
     dumpStreamProperty();
 }
 
diff --git a/oox/source/dump/xlsbdumper.cxx b/oox/source/dump/xlsbdumper.cxx
index 3db91fd..5a74a15 100644
--- a/oox/source/dump/xlsbdumper.cxx
+++ b/oox/source/dump/xlsbdumper.cxx
@@ -1130,16 +1130,16 @@ void RecordStreamObject::implDumpRecordBody()
                 case 0:     dumpDec< sal_Int32 >( "operator", "CFRULE-CELL-OPERATOR" ); break;
                 case 5:     dumpDec< sal_Int32 >( "rank" );                             break;
                 case 8:     dumpDec< sal_Int32 >( "operator", "CFRULE-TEXT-OPERATOR" ); break;
-                case 15:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
-                case 16:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
-                case 17:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
-                case 18:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
-                case 19:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
-                case 20:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
-                case 21:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
-                case 22:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
-                case 23:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
-                case 24:    dumpDec< sal_Int32 >( "operator", "CFRULE-TIME-OPERATOR" ); break;
+                case 15:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
+                case 16:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
+                case 17:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
+                case 18:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
+                case 19:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
+                case 20:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
+                case 21:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
+                case 22:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
+                case 23:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
+                case 24:    dumpDec< sal_Int32 >( "operator", "CFRULE-DATE-OPERATOR" ); break;
                 case 25:    dumpDec< sal_Int32 >( "std-dev" );                          break;
                 case 26:    dumpDec< sal_Int32 >( "std-dev" );                          break;
                 case 29:    dumpDec< sal_Int32 >( "std-dev" );                          break;
@@ -1306,38 +1306,22 @@ void RecordStreamObject::implDumpRecordBody()
                     case 0:
                         dumpDec< sal_uInt8 >( "pattern", "FILLPATTERNS" );
                     break;
-                    case 1:
-                    case 2:
+                    case 1: case 2: case 5:
                         dumpColor();
                     break;
                     case 3:
-                        dumpDec< sal_Int32 >( "gradient-type", "FILL-GRADIENTTYPE" );
-                        dumpDec< double >( "linear-angle" );
-                        dumpDec< double >( "pos-left" );
-                        dumpDec< double >( "pos-right" );
-                        dumpDec< double >( "pos-top" );
-                        dumpDec< double >( "pos-bottom" );
+                        dumpGradientHead();
                     break;
                     case 4:
                         dumpDec< sal_uInt16 >( "index" );
                         dumpDec< double >( "stop-position" );
                         dumpColor( "stop-color" );
                     break;
-                    case 5:
-                        dumpColor();
-                    break;
-                    case 6:
-                    case 7:
-                    case 8:
-                    case 9:
-                    case 10:
-                    case 11:
-                    case 12:
+                    case 6: case 7: case 8: case 9: case 10: case 11: case 12:
                         dumpColor( "color" );
                         dumpDec< sal_uInt16 >( "style", "BORDERSTYLES" );
                     break;
-                    case 13:
-                    case 14:
+                    case 13: case 14:
                         dumpBoolean( "value" );
                     break;
                     case 15:
@@ -1355,9 +1339,7 @@ void RecordStreamObject::implDumpRecordBody()
                     case 19:
                         dumpDec< sal_uInt8 >( "text-dir", "XF-TEXTDIRECTION" );
                     break;
-                    case 20:
-                    case 21:
-                    case 22:
+                    case 20: case 21: case 22:
                         dumpBoolean( "value" );
                     break;
                     case 24:
@@ -1372,12 +1354,7 @@ void RecordStreamObject::implDumpRecordBody()
                     case 27:
                         dumpDec< sal_uInt16 >( "escapement", "FONT-ESCAPEMENT" );
                     break;
-                    case 28:
-                    case 29:
-                    case 30:
-                    case 31:
-                    case 32:
-                    case 33:
+                    case 28: case 29: case 30: case 31: case 32: case 33:
                         dumpBoolean( "value" );
                     break;
                     case 34:
@@ -1399,10 +1376,9 @@ void RecordStreamObject::implDumpRecordBody()
                         dumpDec< sal_uInt16 >( "numfmt-id" );
                     break;
                     case 42:
-                        dumpDec< sal_uInt16 >( "relative-indent" );
+                        dumpDec< sal_Int16 >( "relative-indent" );
                     break;
-                    case 43:
-                    case 44:
+                    case 43: case 44:
                         dumpBoolean( "value" );
                     break;
                 }
@@ -1503,12 +1479,7 @@ void RecordStreamObject::implDumpRecordBody()
             dumpDec< sal_Int32 >( "fill-pattern", "FILLPATTERNS" );
             dumpColor( "fg-color" );
             dumpColor( "bg-color" );
-            dumpDec< sal_Int32 >( "gradient-type", "FILL-GRADIENTTYPE" );
-            dumpDec< double >( "linear-angle" );
-            dumpDec< double >( "pos-left" );
-            dumpDec< double >( "pos-right" );
-            dumpDec< double >( "pos-top" );
-            dumpDec< double >( "pos-bottom" );
+            dumpGradientHead();
             out().resetItemIndex();
             for( sal_Int32 nStop = 0, nStopCount = dumpDec< sal_Int32 >( "stop-count" ); (nStop < nStopCount) && !in().isEof(); ++nStop )
             {
@@ -2174,6 +2145,16 @@ void RecordStreamObject::implDumpRecordBody()
     }
 }
 
+void RecordStreamObject::dumpGradientHead()
+{
+    dumpDec< sal_Int32 >( "gradient-type", "FILL-GRADIENTTYPE" );
+    dumpDec< double >( "linear-angle" );
+    dumpDec< double >( "pos-left" );
+    dumpDec< double >( "pos-right" );
+    dumpDec< double >( "pos-top" );
+    dumpDec< double >( "pos-bottom" );
+}
+
 void RecordStreamObject::dumpCellHeader( bool bWithColumn )
 {
     if( bWithColumn ) dumpColIndex();
diff --git a/oox/source/dump/xlsbdumper.ini b/oox/source/dump/xlsbdumper.ini
index 34c464c..d8bc97d 100644
--- a/oox/source/dump/xlsbdumper.ini
+++ b/oox/source/dump/xlsbdumper.ini
@@ -328,13 +328,13 @@ end
 
 shortlist=CFRULE-CELL-OPERATOR,1,between,not-between,equal,not-equal,greater-than,less-than,greater-equal,less-equal
 shortlist=CFRULE-TEXT-OPERATOR,0,contains,not-contains,begins-with,ends-with
-shortlist=CFRULE-TIME-OPERATOR,0,today,yesterday,last-7-days,this-week,last-week,last-month,tomorrow,next-week,next-month,this-month
+shortlist=CFRULE-DATE-OPERATOR,0,today,yesterday,last-7-days,this-week,last-week,last-month,tomorrow,next-week,next-month,this-month
 shortlist=CFRULE-OTHER-OPERATOR,0,none
 
 flagslist=CFRULE-FLAGS
   0x0001=table-row
   0x0002=stop-if-true
-  0x0004=avove-average
+  0x0004=above-average
   0x0008=bottom
   0x0010=percent
 end
diff --git a/oox/source/ole/axbinaryreader.cxx b/oox/source/ole/axbinaryreader.cxx
new file mode 100755
index 0000000..b0512b2
--- /dev/null
+++ b/oox/source/ole/axbinaryreader.cxx
@@ -0,0 +1,216 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: axbinaryreader.cxx,v $
+ * $Revision: 1.1 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "oox/ole/axbinaryreader.hxx"
+#include "oox/ole/olehelper.hxx"
+
+using ::rtl::OUString;
+
+namespace oox {
+namespace ole {
+
+// ============================================================================
+
+namespace {
+
+const sal_uInt32 AX_STRING_SIZEMASK         = 0x7FFFFFFF;
+const sal_uInt32 AX_STRING_COMPRESSED       = 0x80000000;
+
+} // namespace
+
+// ============================================================================
+
+AxAlignedInputStream::AxAlignedInputStream( BinaryInputStream& rInStrm ) :
+    mrInStrm( rInStrm ),
+    mnStrmPos( 0 )
+{
+}
+
+sal_Int64 AxAlignedInputStream::tell() const
+{
+    return mnStrmPos;
+}
+
+void AxAlignedInputStream::seek( sal_Int64 nPos )
+{
+    mbEof = mbEof || (nPos < mnStrmPos);
+    if( !mbEof )
+        skip( static_cast< sal_Int32 >( nPos - mnStrmPos ) );
+}
+
+sal_Int32 AxAlignedInputStream::readData( StreamDataSequence& orData, sal_Int32 nBytes )
+{
+    sal_Int32 nReadSize = mrInStrm.readData( orData, nBytes );
+    mnStrmPos += nReadSize;
+    return nReadSize;
+}
+
+sal_Int32 AxAlignedInputStream::readMemory( void* opMem, sal_Int32 nBytes )
+{
+    sal_Int32 nReadSize = mrInStrm.readMemory( opMem, nBytes );
+    mnStrmPos += nReadSize;
+    return nReadSize;
+}
+
+void AxAlignedInputStream::skip( sal_Int32 nBytes )
+{
+    mrInStrm.skip( nBytes );
+    mnStrmPos += nBytes;
+}
+
+void AxAlignedInputStream::align( size_t nSize )
+{
+    skip( static_cast< sal_Int32 >( (nSize - (mnStrmPos % nSize)) % nSize ) );
+}
+
+// ============================================================================
+
+AxBinaryPropertyReader::ComplexProperty::~ComplexProperty()
+{
+}
+
+bool AxBinaryPropertyReader::PairProperty::readProperty( AxAlignedInputStream& rInStrm )
+{
+    rInStrm >> mrnValue1 >> mrnValue2;
+    return true;
+}
+
+bool AxBinaryPropertyReader::StringProperty::readProperty( AxAlignedInputStream& rInStrm )
+{
+    bool bCompressed = getFlag( mnSize, AX_STRING_COMPRESSED );
+    sal_uInt32 nBufSize = mnSize & AX_STRING_SIZEMASK;
+    sal_Int64 nEndPos = rInStrm.tell() + nBufSize;
+    sal_Int32 nChars = static_cast< sal_Int32 >( nBufSize / (bCompressed ? 1 : 2) );
+    bool bValidChars = nChars <= 65536;
+    OSL_ENSURE( bValidChars, "StringProperty::readProperty - string too long" );
+    nChars = ::std::min< sal_Int32 >( nChars, 65536 );
+    mrValue = bCompressed ?
+        // ISO-8859-1 maps all byte values xx to the same Unicode code point U+00xx
+        rInStrm.readCharArrayUC( nChars, RTL_TEXTENCODING_ISO_8859_1 ) :
+        rInStrm.readUnicodeArray( nChars );
+    rInStrm.seek( nEndPos );
+    return bValidChars;
+}
+
+bool AxBinaryPropertyReader::PictureProperty::readProperty( AxAlignedInputStream& rInStrm )
+{
+    return OleHelper::importStdPic( mrPicData, rInStrm, true );
+}
+
+// ----------------------------------------------------------------------------
+
+AxBinaryPropertyReader::AxBinaryPropertyReader( BinaryInputStream& rInStrm, bool b64BitPropFlags ) :
+    maInStrm( rInStrm ),
+    mbValid( true )
+{
+    // version and size of property block
+    maInStrm.skip( 2 );
+    sal_uInt16 nBlockSize = maInStrm.readValue< sal_uInt16 >();
+    mnPropsEnd = maInStrm.tell() + nBlockSize;
+    // flagfield containing existing properties
+    if( b64BitPropFlags )
+        maInStrm >> mnPropFlags;
+    else
+        mnPropFlags = maInStrm.readuInt32();
+    mnNextProp = 1;
+}
+
+void AxBinaryPropertyReader::readBoolProperty( bool& orbValue, bool bReverse )
+{
+    // there is no data, the boolean value is equivalent to the property flag itself
+    orbValue = startNextProperty() != bReverse;
+}
+
+void AxBinaryPropertyReader::readPairProperty( sal_Int32& ornValue1, sal_Int32& ornValue2 )
+{
+    if( startNextProperty() )
+        maLargeProps.push_back( ComplexPropVector::value_type( new PairProperty( ornValue1, ornValue2 ) ) );
+}
+
+void AxBinaryPropertyReader::readStringProperty( OUString& orValue )
+{
+    if( startNextProperty() )
+    {
+        sal_uInt32 nSize = maInStrm.readAligned< sal_uInt32 >();
+        maLargeProps.push_back( ComplexPropVector::value_type( new StringProperty( orValue, nSize ) ) );
+    }
+}
+
+void AxBinaryPropertyReader::readPictureProperty( StreamDataSequence& orPicData )
+{
+    if( startNextProperty() )
+    {
+        sal_Int16 nData = maInStrm.readAligned< sal_Int16 >();
+        if( ensureValid( nData == -1 ) )
+            maStreamProps.push_back( ComplexPropVector::value_type( new PictureProperty( orPicData ) ) );
+    }
+}
+
+bool AxBinaryPropertyReader::finalizeImport()
+{
+    // read large properties
+    maInStrm.align( 4 );
+    if( ensureValid( mnPropFlags == 0 ) && !maLargeProps.empty() )
+    {
+        for( ComplexPropVector::iterator aIt = maLargeProps.begin(), aEnd = maLargeProps.end(); ensureValid() && (aIt != aEnd); ++aIt )
+        {
+            ensureValid( (*aIt)->readProperty( maInStrm ) );
+            maInStrm.align( 4 );
+        }
+    }
+    maInStrm.seek( mnPropsEnd );
+
+    // read stream properties (no stream alignment between properties!)
+    if( ensureValid() && !maStreamProps.empty() )
+        for( ComplexPropVector::iterator aIt = maStreamProps.begin(), aEnd = maStreamProps.end(); ensureValid() && (aIt != aEnd); ++aIt )
+            ensureValid( (*aIt)->readProperty( maInStrm ) );
+
+    return mbValid;
+}
+
+bool AxBinaryPropertyReader::ensureValid( bool bCondition )
+{
+    mbValid = mbValid && bCondition && !maInStrm.isEof();
+    return mbValid;
+}
+
+bool AxBinaryPropertyReader::startNextProperty()
+{
+    bool bHasProp = getFlag( mnPropFlags, mnNextProp );
+    setFlag( mnPropFlags, mnNextProp, false );
+    mnNextProp <<= 1;
+    return ensureValid() && bHasProp;
+}
+
+// ============================================================================
+
+} // namespace ole
+} // namespace oox
+
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 2495305..3247e03 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -52,6 +52,7 @@
 #include "oox/helper/propertymap.hxx"
 #include "oox/helper/propertyset.hxx"
 #include "oox/core/filterbase.hxx"
+#include "oox/ole/axbinaryreader.hxx"
 #include "oox/ole/axcontrolhelper.hxx"
 #include "oox/ole/olehelper.hxx"
 
@@ -254,25 +255,20 @@ void lclConvertVisualEffect( AxControlHelper& /*rHelper*/, PropertyMap& rPropMap
 
 // ----------------------------------------------------------------------------
 
-/** Converts the AX picture to UNO properties. */
+/** Converts the passed picture stream to UNO properties. */
 void lclConvertPicture( AxControlHelper& rHelper, PropertyMap& rPropMap, const StreamDataSequence& rPicData )
 {
     if( rPicData.hasElements() )
     {
-        SequenceInputStream aInStrm( rPicData );
-        StreamDataSequence aPictureData;
-        if( OleHelper::importStdPic( aPictureData, aInStrm, true ) )
-        {
-            OUString aGraphicUrl = rHelper.getFilter().getGraphicHelper().importGraphicObject( aPictureData );
-            if( aGraphicUrl.getLength() > 0 )
-                rPropMap.setProperty( PROP_ImageURL, aGraphicUrl );
-        }
+        OUString aGraphicUrl = rHelper.getFilter().getGraphicHelper().importGraphicObject( rPicData );
+        if( aGraphicUrl.getLength() > 0 )
+            rPropMap.setProperty( PROP_ImageURL, aGraphicUrl );
     }
 }
 
 // ----------------------------------------------------------------------------
 
-/** Converts the AX picture and position to UNO properties. */
+/** Converts the passed picture stream and position to UNO properties. */
 void lclConvertPicture( AxControlHelper& rHelper, PropertyMap& rPropMap, const StreamDataSequence& rPicData, sal_uInt32 nPicPos )
 {
     // the picture
@@ -303,7 +299,7 @@ void lclConvertPicture( AxControlHelper& rHelper, PropertyMap& rPropMap, const S
 
 // ----------------------------------------------------------------------------
 
-/** Converts the AX picture and position to UNO properties. */
+/** Converts the passed picture stream and position to UNO properties. */
 void lclConvertPicture( AxControlHelper& rHelper, PropertyMap& rPropMap, const StreamDataSequence& rPicData, sal_Int32 nPicSizeMode, sal_Int32 /*nPicAlign*/, bool /*bPicTiling*/ )
 {
     // the picture
@@ -392,7 +388,11 @@ void AxControlModelBase::importProperty( sal_Int32 nPropId, const OUString& rVal
     }
 }
 
-void AxControlModelBase::importPictureData( sal_Int32 /*nPropId*/, const StreamDataSequence& /*rDataSeq*/ )
+void AxControlModelBase::importBinaryModel( BinaryInputStream& /*rInStrm*/ )
+{
+}
+
+void AxControlModelBase::importPictureData( sal_Int32 /*nPropId*/, BinaryInputStream& /*rInStrm*/ )
 {
 }
 
@@ -423,6 +423,20 @@ void AxFontDataModel::importProperty( sal_Int32 nPropId, const OUString& rValue
     }
 }
 
+void AxFontDataModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+    AxBinaryPropertyReader aReader( rInStrm );
+    aReader.readStringProperty( maFontName );
+    aReader.readIntProperty< sal_uInt32 >( mnFontEffects );
+    aReader.readIntProperty< sal_Int32 >( mnFontHeight );
+    aReader.skipIntProperty< sal_Int32 >(); // font offset
+    aReader.readIntProperty< sal_uInt8 >( mnFontCharSet );
+    aReader.skipIntProperty< sal_uInt8 >(); // font pitch/family
+    aReader.readIntProperty< sal_uInt8 >( mnHorAlign );
+    aReader.skipIntProperty< sal_uInt16 >(); // font weight
+    aReader.finalizeImport();
+}
+
 void AxFontDataModel::convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const
 {
     namespace cssa = ::com::sun::star::awt;
@@ -491,15 +505,33 @@ void AxCommandButtonModel::importProperty( sal_Int32 nPropId, const OUString& rV
     }
 }
 
-void AxCommandButtonModel::importPictureData( sal_Int32 nPropId, const StreamDataSequence& rDataSeq )
+void AxCommandButtonModel::importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm )
 {
     switch( nPropId )
     {
-        case XML_Picture:   maPictureData = rDataSeq;   break;
-        default:            AxFontDataModel::importPictureData( nPropId, rDataSeq );
+        case XML_Picture:   OleHelper::importStdPic( maPictureData, rInStrm, true );    break;
+        default:            AxFontDataModel::importPictureData( nPropId, rInStrm );
     }
 }
 
+void AxCommandButtonModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+    AxBinaryPropertyReader aReader( rInStrm );
+    aReader.readIntProperty< sal_uInt32 >( mnTextColor );
+    aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+    aReader.readIntProperty< sal_uInt32 >( mnFlags );
+    aReader.readStringProperty( maCaption );
+    aReader.readIntProperty< sal_uInt32 >( mnPicturePos );
+    aReader.readPairProperty( mnWidth, mnHeight );
+    aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+    aReader.readPictureProperty( maPictureData );
+    aReader.skipIntProperty< sal_uInt16 >(); // accelerator
+    aReader.readBoolProperty( mbFocusOnClick, true ); // binary flag means "do not take focus"
+    aReader.skipPictureProperty(); // mouse icon
+    if( aReader.finalizeImport() )
+        AxFontDataModel::importBinaryModel( rInStrm );
+}
+
 OUString AxCommandButtonModel::getServiceName() const
 {
     return CREATE_OUSTRING( "com.sun.star.form.component.CommandButton" );
@@ -545,6 +577,26 @@ void AxLabelModel::importProperty( sal_Int32 nPropId, const OUString& rValue )
     }
 }
 
+void AxLabelModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+    AxBinaryPropertyReader aReader( rInStrm );
+    aReader.readIntProperty< sal_uInt32 >( mnTextColor );
+    aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+    aReader.readIntProperty< sal_uInt32 >( mnFlags );
+    aReader.readStringProperty( maCaption );
+    aReader.skipIntProperty< sal_uInt32 >(); // picture position
+    aReader.readPairProperty( mnWidth, mnHeight );
+    aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+    aReader.readIntProperty< sal_uInt32 >( mnBorderColor );
+    aReader.readIntProperty< sal_uInt16 >( mnBorderStyle );
+    aReader.readIntProperty< sal_uInt16 >( mnSpecialEffect );
+    aReader.skipPictureProperty(); // picture
+    aReader.skipIntProperty< sal_uInt16 >(); // accelerator
+    aReader.skipPictureProperty(); // mouse icon
+    if( aReader.finalizeImport() )
+        AxFontDataModel::importBinaryModel( rInStrm );
+}
+
 OUString AxLabelModel::getServiceName() const
 {
     return CREATE_OUSTRING( "com.sun.star.form.component.FixedText" );
@@ -592,15 +644,36 @@ void AxImageModel::importProperty( sal_Int32 nPropId, const OUString& rValue )
     }
 }
 
-void AxImageModel::importPictureData( sal_Int32 nPropId, const StreamDataSequence& rDataSeq )
+void AxImageModel::importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm )
 {
     switch( nPropId )
     {
-        case XML_Picture:   maPictureData = rDataSeq;   break;
-        default:            AxControlModelBase::importPictureData( nPropId, rDataSeq );
+        case XML_Picture:   OleHelper::importStdPic( maPictureData, rInStrm, true );    break;
+        default:            AxControlModelBase::importPictureData( nPropId, rInStrm );
     }
 }
 
+void AxImageModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+    AxBinaryPropertyReader aReader( rInStrm );
+    aReader.skipUndefinedProperty();
+    aReader.skipUndefinedProperty();
+    aReader.skipBoolProperty(); // auto-size
+    aReader.readIntProperty< sal_uInt32 >( mnBorderColor );
+    aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+    aReader.readIntProperty< sal_uInt8 >( mnBorderStyle );
+    aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+    aReader.readIntProperty< sal_uInt8 >( mnPicSizeMode );
+    aReader.readIntProperty< sal_uInt8 >( mnSpecialEffect );
+    aReader.readPairProperty( mnWidth, mnHeight );
+    aReader.readPictureProperty( maPictureData );
+    aReader.readIntProperty< sal_uInt8 >( mnPicAlign );
+    aReader.readBoolProperty( mbPicTiling );
+    aReader.readIntProperty< sal_uInt32 >( mnFlags );
+    aReader.skipPictureProperty(); // mouse icon
+    aReader.finalizeImport();
+}
+
 OUString AxImageModel::getServiceName() const
 {
     return CREATE_OUSTRING( "com.sun.star.form.component.DatabaseImageControl" );
@@ -662,15 +735,55 @@ void AxMorphDataModel::importProperty( sal_Int32 nPropId, const OUString& rValue
     }
 }
 
-void AxMorphDataModel::importPictureData( sal_Int32 nPropId, const StreamDataSequence& rDataSeq )
+void AxMorphDataModel::importPictureData( sal_Int32 nPropId, BinaryInputStream& rInStrm )
 {
     switch( nPropId )
     {
-        case XML_Picture:   maPictureData = rDataSeq;   break;
-        default:            AxFontDataModel::importPictureData( nPropId, rDataSeq );
+        case XML_Picture:   OleHelper::importStdPic( maPictureData, rInStrm, true );    break;
+        default:            AxFontDataModel::importPictureData( nPropId, rInStrm );
     }
 }
 
+void AxMorphDataModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+    AxBinaryPropertyReader aReader( rInStrm, true );
+    aReader.readIntProperty< sal_uInt32 >( mnFlags );
+    aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+    aReader.readIntProperty< sal_uInt32 >( mnTextColor );
+    aReader.readIntProperty< sal_Int32 >( mnMaxLength );
+    aReader.readIntProperty< sal_uInt8 >( mnBorderStyle );
+    aReader.readIntProperty< sal_uInt8 >( mnScrollBars );
+    aReader.readIntProperty< sal_uInt8 >( mnDisplayStyle );
+    aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+    aReader.readPairProperty( mnWidth, mnHeight );
+    aReader.readIntProperty< sal_uInt16 >( mnPasswordChar );
+    aReader.skipIntProperty< sal_uInt32 >(); // list width
+    aReader.skipIntProperty< sal_uInt16 >(); // bound column
+    aReader.skipIntProperty< sal_Int16 >(); // text column
+    aReader.skipIntProperty< sal_Int16 >(); // column count
+    aReader.readIntProperty< sal_uInt16 >( mnListRows );
+    aReader.skipIntProperty< sal_uInt16 >(); // column info count
+    aReader.readIntProperty< sal_uInt8 >( mnMatchEntry );
+    aReader.skipIntProperty< sal_uInt8 >(); // list style
+    aReader.readIntProperty< sal_uInt8 >( mnShowDropButton );
+    aReader.skipUndefinedProperty();
+    aReader.skipIntProperty< sal_uInt8 >(); // drop down style
+    aReader.readIntProperty< sal_uInt8 >( mnMultiSelect );
+    aReader.readStringProperty( maValue );
+    aReader.readStringProperty( maCaption );
+    aReader.readIntProperty< sal_uInt32 >( mnPicturePos );
+    aReader.readIntProperty< sal_uInt32 >( mnBorderColor );
+    aReader.readIntProperty< sal_uInt32 >( mnSpecialEffect );
+    aReader.skipPictureProperty(); // mouse icon
+    aReader.readPictureProperty( maPictureData );
+    aReader.skipIntProperty< sal_uInt16 >(); // accelerator
+    aReader.skipUndefinedProperty();
+    aReader.skipBoolProperty();
+    aReader.readStringProperty( maGroupName );
+    if( aReader.finalizeImport() )
+        AxFontDataModel::importBinaryModel( rInStrm );
+}
+
 void AxMorphDataModel::convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const
 {
     rPropMap.setProperty( PROP_TextColor, rHelper.convertColor( mnTextColor ) );
@@ -865,6 +978,27 @@ void AxSpinButtonModel::importProperty( sal_Int32 nPropId, const OUString& rValu
     }
 }
 
+void AxSpinButtonModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+    AxBinaryPropertyReader aReader( rInStrm );
+    aReader.readIntProperty< sal_uInt32 >( mnArrowColor );
+    aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+    aReader.readIntProperty< sal_uInt32 >( mnFlags );
+    aReader.readPairProperty( mnWidth, mnHeight );
+    aReader.skipIntProperty< sal_uInt32 >(); // unused
+    aReader.readIntProperty< sal_Int32 >( mnMin );
+    aReader.readIntProperty< sal_Int32 >( mnMax );
+    aReader.readIntProperty< sal_Int32 >( mnPosition );
+    aReader.skipIntProperty< sal_uInt32 >(); // prev enabled
+    aReader.skipIntProperty< sal_uInt32 >(); // next enabled
+    aReader.readIntProperty< sal_Int32 >( mnSmallChange );
+    aReader.readIntProperty< sal_Int32 >( mnOrientation );
+    aReader.readIntProperty< sal_Int32 >( mnDelay );
+    aReader.skipPictureProperty(); // mouse icon
+    aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+    aReader.finalizeImport();
+}
+
 void AxSpinButtonModel::convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const
 {
     sal_Int32 nMin = ::std::min( mnMin, mnMax );
@@ -924,6 +1058,29 @@ void AxScrollBarModel::importProperty( sal_Int32 nPropId, const OUString& rValue
     }
 }
 
+void AxScrollBarModel::importBinaryModel( BinaryInputStream& rInStrm )
+{
+    AxBinaryPropertyReader aReader( rInStrm );
+    aReader.readIntProperty< sal_uInt32 >( mnArrowColor );
+    aReader.readIntProperty< sal_uInt32 >( mnBackColor );
+    aReader.readIntProperty< sal_uInt32 >( mnFlags );
+    aReader.readPairProperty( mnWidth, mnHeight );
+    aReader.skipIntProperty< sal_uInt8 >(); // mouse pointer
+    aReader.readIntProperty< sal_Int32 >( mnMin );
+    aReader.readIntProperty< sal_Int32 >( mnMax );
+    aReader.readIntProperty< sal_Int32 >( mnPosition );
+    aReader.skipIntProperty< sal_uInt32 >(); // unused
+    aReader.skipIntProperty< sal_uInt32 >(); // prev enabled
+    aReader.skipIntProperty< sal_uInt32 >(); // next enabled
+    aReader.readIntProperty< sal_Int32 >( mnSmallChange );
+    aReader.readIntProperty< sal_Int32 >( mnLargeChange );
+    aReader.readIntProperty< sal_Int32 >( mnOrientation );
+    aReader.readIntProperty< sal_Int16 >( mnPropThumb );
+    aReader.readIntProperty< sal_Int32 >( mnDelay );
+    aReader.skipPictureProperty(); // mouse icon
+    aReader.finalizeImport();
+}
+
 void AxScrollBarModel::convertProperties( AxControlHelper& rHelper, PropertyMap& rPropMap ) const
 {
     sal_Int32 nMin = ::std::min( mnMin, mnMax );
@@ -962,27 +1119,28 @@ AxControl::~AxControl()
 AxControlModelBase* AxControl::createModel( const OUString& rClassId )
 {
     // TODO: move into a factory
-    if( rClassId.equalsIgnoreAsciiCaseAscii( "{D7053240-CE69-11CD-A777-00DD01143C57}" ) )       // Forms.CommandButton.1
+    maClassId = rClassId.toAsciiUpperCase();
+    if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{D7053240-CE69-11CD-A777-00DD01143C57}" ) ) )       // Forms.CommandButton.1
         mxModel.reset( new AxCommandButtonModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{978C9E23-D4B0-11CE-BF2D-00AA003F40D0}" ) )  // Forms.Label.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{978C9E23-D4B0-11CE-BF2D-00AA003F40D0}" ) ) )  // Forms.Label.1
         mxModel.reset( new AxLabelModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{4C599241-6926-101B-9992-00000B65C6F9}" ) )  // Forms.Image.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{4C599241-6926-101B-9992-00000B65C6F9}" ) ) )  // Forms.Image.1
         mxModel.reset( new AxImageModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{8BD21D60-EC42-11CE-9E0D-00AA006002F3}" ) )  // Forms.ToggleButton.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{8BD21D60-EC42-11CE-9E0D-00AA006002F3}" ) ) )  // Forms.ToggleButton.1
         mxModel.reset( new AxToggleButtonModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{8BD21D40-EC42-11CE-9E0D-00AA006002F3}" ) )  // Forms.CheckBox.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{8BD21D40-EC42-11CE-9E0D-00AA006002F3}" ) ) )  // Forms.CheckBox.1
         mxModel.reset( new AxCheckBoxModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{8BD21D50-EC42-11CE-9E0D-00AA006002F3}" ) )  // Forms.OptionButton.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{8BD21D50-EC42-11CE-9E0D-00AA006002F3}" ) ) )  // Forms.OptionButton.1
         mxModel.reset( new AxOptionButtonModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{8BD21D10-EC42-11CE-9E0D-00AA006002F3}" ) )  // Forms.TextBox.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{8BD21D10-EC42-11CE-9E0D-00AA006002F3}" ) ) )  // Forms.TextBox.1
         mxModel.reset( new AxTextBoxModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{8BD21D20-EC42-11CE-9E0D-00AA006002F3}" ) )  // Forms.ListBox.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{8BD21D20-EC42-11CE-9E0D-00AA006002F3}" ) ) )  // Forms.ListBox.1
         mxModel.reset( new AxListBoxModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{8BD21D30-EC42-11CE-9E0D-00AA006002F3}" ) )  // Forms.ComboBox.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{8BD21D30-EC42-11CE-9E0D-00AA006002F3}" ) ) )  // Forms.ComboBox.1
         mxModel.reset( new AxComboBoxModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{79176FB0-B7F2-11CE-97EF-00AA006D2776}" ) )  // Forms.SpinButton.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{79176FB0-B7F2-11CE-97EF-00AA006D2776}" ) ) )  // Forms.SpinButton.1
         mxModel.reset( new AxSpinButtonModel );
-    else if( rClassId.equalsIgnoreAsciiCaseAscii( "{DFD181E0-5E2F-11CE-A449-00AA004A803D}" ) )  // Forms.ScrollBar.1
+    else if( maClassId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "{DFD181E0-5E2F-11CE-A449-00AA004A803D}" ) ) )  // Forms.ScrollBar.1
         mxModel.reset( new AxScrollBarModel );
     else
         mxModel.reset();
@@ -990,6 +1148,12 @@ AxControlModelBase* AxControl::createModel( const OUString& rClassId )
     return mxModel.get();
 }
 
+void AxControl::importBinaryModel( BinaryInputStream& rInStrm )
+{
+    if( AxControlModelBase* pModel = createModel( OleHelper::importGuid( rInStrm ) ) )
+        pModel->importBinaryModel( rInStrm );
+}
+
 Reference< XControlModel > AxControl::convertAndInsert( AxControlHelper& rHelper ) const
 {
     Reference< XControlModel > xCtrlModel;
diff --git a/oox/source/ole/axcontrolfragment.cxx b/oox/source/ole/axcontrolfragment.cxx
index ff1b1e1..047fd8d 100644
--- a/oox/source/ole/axcontrolfragment.cxx
+++ b/oox/source/ole/axcontrolfragment.cxx
@@ -79,9 +79,8 @@ ContextHandlerRef AxControlPropertyContext::onCreateContext( sal_Int32 nElement,
                 OUString aPicturePath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
                 if( aPicturePath.getLength() > 0 )
                 {
-                    StreamDataSequence aPictureData;
-                    if( getFilter().importBinaryData( aPictureData, aPicturePath ) )
-                        mrModel.importPictureData( mnPropId, aPictureData );
+                    BinaryXInputStream aInStrm( getFilter().openInputStream( aPicturePath ), true );
+                    mrModel.importPictureData( mnPropId, aInStrm );
                 }
             }
         break;
@@ -101,11 +100,30 @@ ContextHandlerRef AxControlFragment::onCreateContext( sal_Int32 nElement, const
 {
     if( isRootElement() && (nElement == AX_TOKEN( ocx )) )
     {
-        if( rAttribs.getToken( AX_TOKEN( persistence ), XML_TOKEN_INVALID ) == XML_persistPropertyBag )
+        OUString aClassId = rAttribs.getString( AX_TOKEN( classid ), OUString() );
+        switch( rAttribs.getToken( AX_TOKEN( persistence ), XML_TOKEN_INVALID ) )
         {
-            OUString aClassId = rAttribs.getString( AX_TOKEN( classid ), OUString() );
-            if( AxControlModelBase* pModel = mrControl.createModel( aClassId ) )
-                return new AxControlPropertyContext( *this, *pModel );
+            case XML_persistPropertyBag:
+                if( AxControlModelBase* pModel = mrControl.createModel( aClassId ) )
+                    return new AxControlPropertyContext( *this, *pModel );
+            break;
+
+            case XML_persistStreamInit:
+            {
+                OUString aFragmentPath = getFragmentPathFromRelId( rAttribs.getString( R_TOKEN( id ), OUString() ) );
+                if( aFragmentPath.getLength() > 0 )
+                {
+                    BinaryXInputStream aInStrm( getFilter().openInputStream( aFragmentPath ), true );
+                    if( !aInStrm.isEof() )
+                    {
+                        mrControl.importBinaryModel( aInStrm );
+                        // binary stream contains a copy of the class ID, must be equal to attribute value
+                        OSL_ENSURE( !mrControl.getModel() || aClassId.equalsIgnoreAsciiCase( mrControl.getClassId() ),
+                            "AxControlFragment::importBinaryControl - form control class ID mismatch" );
+                    }
+                }
+            }
+            break;
         }
     }
     return 0;
diff --git a/oox/source/ole/axcontrolhelper.cxx b/oox/source/ole/axcontrolhelper.cxx
index cd81807..057adc6 100644
--- a/oox/source/ole/axcontrolhelper.cxx
+++ b/oox/source/ole/axcontrolhelper.cxx
@@ -93,8 +93,10 @@ AxControlHelper::~AxControlHelper()
 Reference< XForm > AxControlHelper::getControlForm() const
 {
     if( !mbHasFormQuerried )
+    {
+        mbHasFormQuerried = true;
         mxForm = createControlForm();   // virtual call
-    mbHasFormQuerried = true;
+    }
     return mxForm;
 }
 
diff --git a/oox/source/ole/makefile.mk b/oox/source/ole/makefile.mk
index 6d466e1..d843b42 100644
--- a/oox/source/ole/makefile.mk
+++ b/oox/source/ole/makefile.mk
@@ -45,6 +45,7 @@ ENABLE_EXCEPTIONS=TRUE
 # --- Files --------------------------------------------------------
 
 SLOFILES =	\
+        $(SLO)$/axbinaryreader.obj		\
         $(SLO)$/axcontrol.obj			\
         $(SLO)$/axcontrolfragment.obj	\
         $(SLO)$/axcontrolhelper.obj		\
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index c0eb370..499c796 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -42,6 +42,7 @@ namespace ole {
 
 namespace {
 
+const sal_Char* const OLE_GUID_STDFONT      = "{0BE35203-8F91-11CE-9DE3-00AA004BB851}";
 const sal_Char* const OLE_GUID_STDPIC       = "{0BE35204-8F91-11CE-9DE3-00AA004BB851}";
 const sal_Char* const OLE_GUID_STDHLINK     = "{79EAC9D0-BAF9-11CE-8C82-00AA004BA90B}";
 const sal_Char* const OLE_GUID_URLMONIKER   = "{79EAC9E0-BAF9-11CE-8C82-00AA004BA90B}";
diff --git a/oox/source/xls/worksheetfragment.cxx b/oox/source/xls/worksheetfragment.cxx
index ed8907c..37c1adf 100644
--- a/oox/source/xls/worksheetfragment.cxx
+++ b/oox/source/xls/worksheetfragment.cxx
@@ -88,6 +88,8 @@ const sal_uInt32 BIFF_DATAVAL_NODROPDOWN    = 0x00000200;
 const sal_uInt32 BIFF_DATAVAL_SHOWINPUT     = 0x00040000;
 const sal_uInt32 BIFF_DATAVAL_SHOWERROR     = 0x00080000;
 
+const sal_uInt32 BIFF_SHRFEATHEAD_SHEETPROT = 2;
+
 const sal_Int32 OOBIN_OLEOBJECT_CONTENT     = 1;
 const sal_Int32 OOBIN_OLEOBJECT_ICON        = 4;
 const sal_Int32 OOBIN_OLEOBJECT_ALWAYS      = 1;
@@ -889,7 +891,7 @@ bool BiffWorksheetFragment::importFragment()
                         case BIFF_ID_SCENPROTECT:       rWorksheetSett.importScenProtect( mrStrm );     break;
                         case BIFF_ID_SCL:               rSheetViewSett.importScl( mrStrm );             break;
                         case BIFF_ID_SHEETPR:           rWorksheetSett.importSheetPr( mrStrm );         break;
-                        case BIFF_ID_SHEETPROTECTION:   rWorksheetSett.importSheetProtection( mrStrm ); break;
+                        case BIFF_ID_SHAREDFEATHEAD:    importSharedFeatHead();                         break;
                         case BIFF_ID_STANDARDWIDTH:     importStandardWidth();                          break;
                         case BIFF_ID_UNCALCED:          rWorkbookSett.importUncalced( mrStrm );         break;
                         case BIFF_ID_VCENTER:           rPageSett.importVerCenter( mrStrm );            break;
@@ -1155,6 +1157,20 @@ void BiffWorksheetFragment::importScenarios()
     getScenarios().createSheetScenarios( getSheetIndex() ).importScenarios( mrStrm );
 }
 
+void BiffWorksheetFragment::importSharedFeatHead()
+{
+    mrStrm.skip( 12 );
+    sal_uInt16 nType = mrStrm.readuInt16();
+    mrStrm.skip( 5 );
+    switch( nType )
+    {
+        case BIFF_SHRFEATHEAD_SHEETPROT:
+            if( mrStrm.getRemaining() >= 4 )
+                getWorksheetSettings().importSheetProtection( mrStrm );
+        break;
+    }
+}
+
 void BiffWorksheetFragment::importStandardWidth()
 {
     sal_uInt16 nWidth;
diff --git a/oox/source/xls/worksheetsettings.cxx b/oox/source/xls/worksheetsettings.cxx
index d791e48..c05e471 100644
--- a/oox/source/xls/worksheetsettings.cxx
+++ b/oox/source/xls/worksheetsettings.cxx
@@ -60,21 +60,21 @@ const sal_uInt16 BIFF_SHEETPR_SYMBOLSRIGHT      = 0x0080;
 const sal_uInt16 BIFF_SHEETPR_FITTOPAGES        = 0x0100;
 const sal_uInt16 BIFF_SHEETPR_SKIPEXT           = 0x0200;       /// BIFF3-BIFF4
 
-const sal_uInt16 BIFF_SHEETPROT_OBJECTS         = 0x0001;
-const sal_uInt16 BIFF_SHEETPROT_SCENARIOS       = 0x0002;
-const sal_uInt16 BIFF_SHEETPROT_FORMAT_CELLS    = 0x0004;
-const sal_uInt16 BIFF_SHEETPROT_FORMAT_COLUMNS  = 0x0008;
-const sal_uInt16 BIFF_SHEETPROT_FORMAT_ROWS     = 0x0010;
-const sal_uInt16 BIFF_SHEETPROT_INSERT_COLUMNS  = 0x0020;
-const sal_uInt16 BIFF_SHEETPROT_INSERT_ROWS     = 0x0040;
-const sal_uInt16 BIFF_SHEETPROT_INSERT_HLINKS   = 0x0080;
-const sal_uInt16 BIFF_SHEETPROT_DELETE_COLUMNS  = 0x0100;
-const sal_uInt16 BIFF_SHEETPROT_DELETE_ROWS     = 0x0200;
-const sal_uInt16 BIFF_SHEETPROT_SELECT_LOCKED   = 0x0400;
-const sal_uInt16 BIFF_SHEETPROT_SORT            = 0x0800;
-const sal_uInt16 BIFF_SHEETPROT_AUTOFILTER      = 0x1000;
-const sal_uInt16 BIFF_SHEETPROT_PIVOTTABLES     = 0x2000;
-const sal_uInt16 BIFF_SHEETPROT_SELECT_UNLOCKED = 0x4000;
+const sal_uInt32 BIFF_SHEETPROT_OBJECTS         = 0x00000001;
+const sal_uInt32 BIFF_SHEETPROT_SCENARIOS       = 0x00000002;
+const sal_uInt32 BIFF_SHEETPROT_FORMAT_CELLS    = 0x00000004;
+const sal_uInt32 BIFF_SHEETPROT_FORMAT_COLUMNS  = 0x00000008;
+const sal_uInt32 BIFF_SHEETPROT_FORMAT_ROWS     = 0x00000010;
+const sal_uInt32 BIFF_SHEETPROT_INSERT_COLUMNS  = 0x00000020;
+const sal_uInt32 BIFF_SHEETPROT_INSERT_ROWS     = 0x00000040;
+const sal_uInt32 BIFF_SHEETPROT_INSERT_HLINKS   = 0x00000080;
+const sal_uInt32 BIFF_SHEETPROT_DELETE_COLUMNS  = 0x00000100;
+const sal_uInt32 BIFF_SHEETPROT_DELETE_ROWS     = 0x00000200;
+const sal_uInt32 BIFF_SHEETPROT_SELECT_LOCKED   = 0x00000400;
+const sal_uInt32 BIFF_SHEETPROT_SORT            = 0x00000800;
+const sal_uInt32 BIFF_SHEETPROT_AUTOFILTER      = 0x00001000;
+const sal_uInt32 BIFF_SHEETPROT_PIVOTTABLES     = 0x00002000;
+const sal_uInt32 BIFF_SHEETPROT_SELECT_UNLOCKED = 0x00004000;
 
 } // namespace
 
@@ -277,8 +277,7 @@ void WorksheetSettings::importPassword( BiffInputStream& rStrm )
 
 void WorksheetSettings::importSheetProtection( BiffInputStream& rStrm )
 {
-    rStrm.skip( 19 );
-    sal_uInt16 nFlags = rStrm.readuInt16();
+    sal_uInt32 nFlags = rStrm.readuInt32();
     // set flag means protection is disabled
     maSheetProt.mbObjects          = !getFlag( nFlags, BIFF_SHEETPROT_OBJECTS );
     maSheetProt.mbScenarios        = !getFlag( nFlags, BIFF_SHEETPROT_SCENARIOS );


More information about the ooo-build-commit mailing list