diff options
author | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2011-01-15 17:21:37 +0100 |
---|---|---|
committer | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2011-01-15 17:21:37 +0100 |
commit | 560ccd356b046e348c508c3ebecdf7f7d921f42b (patch) | |
tree | 32341d444a4b531200f2b11292cfa3af063531f3 /oox/source/dump | |
parent | fa8c84eb5613359b47fd324b749e7a516d5e8316 (diff) | |
parent | db5c714536cc07744d37f900a26e68af068ddee4 (diff) |
chart46: merge with DEV300_m97
Diffstat (limited to 'oox/source/dump')
-rw-r--r-- | oox/source/dump/biffdumper.cxx | 257 | ||||
-rw-r--r-- | oox/source/dump/biffdumper.ini | 178 | ||||
-rw-r--r-- | oox/source/dump/dffdumper.cxx | 7 | ||||
-rw-r--r-- | oox/source/dump/dffdumper.ini | 1 | ||||
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 60 | ||||
-rw-r--r-- | oox/source/dump/dumperbase.ini | 1 | ||||
-rw-r--r-- | oox/source/dump/oledumper.cxx | 163 | ||||
-rw-r--r-- | oox/source/dump/oledumper.ini | 1 | ||||
-rw-r--r-- | oox/source/dump/pptxdumper.cxx | 23 | ||||
-rw-r--r-- | oox/source/dump/pptxdumper.ini | 1 | ||||
-rw-r--r-- | oox/source/dump/xlsbdumper.cxx | 440 | ||||
-rw-r--r-- | oox/source/dump/xlsbdumper.ini | 123 |
12 files changed, 901 insertions, 354 deletions
diff --git a/oox/source/dump/biffdumper.cxx b/oox/source/dump/biffdumper.cxx index ab4d6c7b9c20..546ad186e7ab 100644 --- a/oox/source/dump/biffdumper.cxx +++ b/oox/source/dump/biffdumper.cxx @@ -29,8 +29,8 @@ #include <osl/thread.h> #include <rtl/tencinfo.h> -#include "oox/dump/oledumper.hxx" #include "oox/core/filterbase.hxx" +#include "oox/dump/oledumper.hxx" #include "oox/ole/olestorage.hxx" #include "oox/xls/biffdetector.hxx" #include "oox/xls/biffinputstream.hxx" @@ -38,23 +38,27 @@ #if OOX_INCLUDE_DUMPER -using ::rtl::OUString; -using ::rtl::OUStringBuffer; +namespace oox { +namespace dump { +namespace biff { + +// ============================================================================ + +using namespace ::com::sun::star::io; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::util; +using namespace ::oox::xls; + +using ::comphelper::MediaDescriptor; +using ::oox::core::FilterBase; using ::rtl::OString; using ::rtl::OStringBuffer; using ::rtl::OStringToOUString; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::util::DateTime; -using ::com::sun::star::lang::XMultiServiceFactory; -using ::com::sun::star::io::XInputStream; -using ::comphelper::MediaDescriptor; -using ::oox::core::FilterBase; - -using namespace ::oox::xls; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; -namespace oox { -namespace dump { -namespace biff { +// ============================================================================ namespace { @@ -93,12 +97,7 @@ const sal_uInt16 BIFF_STYLE_BUILTIN = 0x8000; const sal_uInt16 BIFF_PT_NOSTRING = 0xFFFF; -} // namespace - -// ============================================================================ -// ============================================================================ - -namespace { +// ---------------------------------------------------------------------------- void lclDumpDffClientPos( const OutputRef& rxOut, const BinaryInputStreamRef& rxStrm, const String& rName, sal_uInt16 nSubScale ) { @@ -128,7 +127,8 @@ void lclDumpDffClientRect( const OutputRef& rxOut, const BinaryInputStreamRef& r } // namespace -// ---------------------------------------------------------------------------- +// ============================================================================ +// ============================================================================ BiffDffStreamObject::BiffDffStreamObject( const OutputObjectBase& rParent, const BinaryInputStreamRef& rxStrm ) { @@ -537,6 +537,26 @@ OUString BiffObjectBase::dumpString( const String& rName, BiffStringFlags nByteF return (getBiff() == BIFF8) ? dumpUniString( rName, nUniFlags ) : dumpByteString( rName, nByteFlags, eDefaultTextEnc ); } +OUString BiffObjectBase::dumpSegmentedUniString( const String& rName ) +{ + sal_Int32 nLength = mxBiffStrm->readInt32(); + OUStringBuffer aBuffer; + while( !mxBiffStrm->isEof() && (aBuffer.getLength() < nLength) ) + aBuffer.append( mxBiffStrm->readUniString() ); + OUString aString = aBuffer.makeStringAndClear(); + writeStringItem( rName, aString ); + return aString; +} + +void BiffObjectBase::dumpSegmentedUniStringArray( const String& rName ) +{ + writeEmptyItem( rName ); + IndentGuard aIndGuard( mxOut ); + mxOut->resetItemIndex(); + for( sal_uInt16 nIndex = 0, nCount = dumpDec< sal_uInt16 >( "count" ); !mxBiffStrm->isEof() && (nIndex < nCount); ++nIndex ) + dumpSegmentedUniString( "#entry" ); +} + sal_uInt8 BiffObjectBase::dumpBoolean( const String& rName ) { sal_uInt8 nBool; @@ -2066,6 +2086,69 @@ void WorkbookStreamObject::implDumpRecordBody() dumpBool< sal_uInt32 >( "recommend-compress-pics" ); break; + case BIFF_ID_CONNECTION: + { + dumpFrHeader( true, false ); + sal_uInt16 nType = dumpDec< sal_uInt16 >( "data-source-type", "CONNECTION-SOURCETYPE" ); + sal_uInt16 nFlags1 = dumpHex< sal_uInt16 >( "flags", "CONNECTION-FLAGS" ); + dumpDec< sal_uInt16 >( "param-count" ); + dumpUnused( 2 ); + dumpHex< sal_uInt16 >( "querytable-flags", "QUERYTABLESETTINGS-FLAGS" ); + switch( nType ) + { + case 4: dumpHex< sal_uInt16 >( "html-flags", "QUERYTABLESETTINGS-HTML-FLAGS" ); break; + case 5: dumpHex< sal_uInt16 >( "oledb-flags", "QUERYTABLESETTINGS-OLEDB-FLAGS" ); break; + case 7: dumpHex< sal_uInt16 >( "ado-flags", "QUERYTABLESETTINGS-ADO-FLAGS" ); break; + default: dumpUnused( 2 ); + } + dumpDec< sal_uInt8 >( "edited-version" ); + dumpDec< sal_uInt8 >( "refreshed-version" ); + dumpDec< sal_uInt8 >( "min-refresh-version" ); + dumpDec< sal_uInt16 >( "refresh-interval", "QUERYTABLESETTINGS-INTERVAL" ); + dumpDec< sal_uInt16 >( "html-format", "QUERYTABLESETTINGS-HTMLFORMAT" ); + dumpDec< sal_Int32 >( "reconnect-type", "CONNECTION-RECONNECTTYPE" ); + dumpDec< sal_uInt8 >( "credentials", "CONNECTION-CREDENTIALS" ); + dumpUnused( 1 ); + dumpSegmentedUniString( "source-file" ); + dumpSegmentedUniString( "source-conn-file" ); + dumpSegmentedUniString( "name" ); + dumpSegmentedUniString( "description" ); + dumpSegmentedUniString( "sso-id" ); + if( nFlags1 & 0x0004 ) dumpSegmentedUniString( "table-names" ); + if( nFlags1 & 0x0010 ) + { + break; // TODO: parameter array structure + } + bool bEscape = false; + switch( nType ) + { + case 1: + dumpSegmentedUniString( "connection-string" ); + break; + case 4: + dumpSegmentedUniStringArray( "urls" ); + dumpSegmentedUniStringArray( "post-method" ); + break; + case 5: + bEscape = true; + break; + case 6: + bEscape = true; + break; + } + if( bEscape ) + break; + dumpSegmentedUniStringArray( "sql-command" ); + dumpSegmentedUniStringArray( "orig-sql-command" ); + dumpSegmentedUniStringArray( "webquery-dialog-url" ); + switch( dumpDec< sal_uInt8 >( "linked-object-type", "CONNECTION-LINKEDOBJECTTYPE" ) ) + { + case 1: dumpSegmentedUniString( "defined-name" ); break; + case 2: dumpHex< sal_uInt16 >( "cache-id" ); break; + } + } + break; + case BIFF_ID_CONT: if( (eBiff == BIFF8) && (getLastRecId() == BIFF_ID_OBJ) ) dumpEmbeddedDff(); @@ -2177,6 +2260,21 @@ void WorkbookStreamObject::implDumpRecordBody() dumpDec< sal_uInt16 >( "#cell-offset" ); break; + case BIFF_ID_DBQUERY: + if( eBiff == BIFF8 ) + { + if( (getLastRecId() != BIFF_ID_PCITEM_STRING) && (getLastRecId() != BIFF_ID_DBQUERY) ) + { + dumpHex< sal_uInt16 >( "flags", "DBQUERY-FLAGS" ); + dumpDec< sal_uInt16 >( "sql-param-count" ); + dumpDec< sal_uInt16 >( "command-count" ); + dumpDec< sal_uInt16 >( "post-method-count" ); + dumpDec< sal_uInt16 >( "server-sql-count" ); + dumpDec< sal_uInt16 >( "odbc-connection-count" ); + } + } + break; + case BIFF2_ID_DEFINEDNAME: case BIFF3_ID_DEFINEDNAME: { @@ -2324,7 +2422,7 @@ void WorkbookStreamObject::implDumpRecordBody() rStrm.seekToStart(); BiffDecoderRef xDecoder = BiffCodecHelper::implReadFilePass( rStrm, eBiff ); if( xDecoder.get() ) - cfg().requestPassword( *xDecoder ); + cfg().requestEncryptionData( *xDecoder ); setBinaryOnlyMode( !xDecoder || !xDecoder->isValid() ); } break; @@ -2335,6 +2433,19 @@ void WorkbookStreamObject::implDumpRecordBody() dumpString( "password-creator", BIFF_STR_8BITLENGTH, BIFF_STR_SMARTFLAGS ); break; + case BIFF_ID_FILTERCOLUMN: + { + dumpDec< sal_uInt16 >( "column-index" ); + dumpHex< sal_uInt16 >( "flags", "FILTERCOLUMN-FLAGS" ); + sal_uInt8 nStrLen1 = dumpFilterColumnOperator( "operator-1" ); + sal_uInt8 nStrLen2 = dumpFilterColumnOperator( "operator-2" ); + bool bBiff8 = eBiff == BIFF8; + rtl_TextEncoding eTextEnc = getBiffData().getTextEncoding(); + if( nStrLen1 > 0 ) writeStringItem( "string-1", bBiff8 ? rStrm.readUniStringBody( nStrLen1, true ) : rStrm.readCharArrayUC( nStrLen1, eTextEnc, true ) ); + if( nStrLen2 > 0 ) writeStringItem( "string-2", bBiff8 ? rStrm.readUniStringBody( nStrLen2, true ) : rStrm.readCharArrayUC( nStrLen2, eTextEnc, true ) ); + } + break; + case BIFF2_ID_FONT: case BIFF3_ID_FONT: dumpFontRec(); @@ -2715,6 +2826,58 @@ void WorkbookStreamObject::implDumpRecordBody() } break; + case BIFF_ID_QUERYTABLE: + dumpHex< sal_uInt16 >( "flags", "QUERYTABLE-FLAGS" ); + dumpDec< sal_uInt16 >( "autoformat-id" ); + dumpHex< sal_uInt16 >( "autoformat-flags", "QUERYTABLE-AUTOFORMAT-FLAGS" ); + dumpUnused( 4 ); + dumpUniString( "defined-name" ); + dumpUnused( 2 ); + break; + + case BIFF_ID_QUERYTABLEREFRESH: + { + dumpFrHeader( true, false ); + bool bPivot = dumpBool< sal_uInt16 >( "pivot-table" ); + dumpHex< sal_uInt16 >( "flags", "QUERYTABLEREFRESH-FLAGS" ); + dumpHex< sal_uInt32 >( bPivot ? "pivottable-flags" : "querytable-flags", bPivot ? "QUERYTABLEREFRESH-PTFLAGS" : "QUERYTABLEREFRESH-QTFLAGS" ); + dumpDec< sal_uInt8 >( "refreshed-version" ); + dumpDec< sal_uInt8 >( "min-refresh-version" ); + dumpUnused( 2 ); + dumpUniString( "table-name" ); + dumpUnused( 2 ); + } + break; + + case BIFF_ID_QUERYTABLESETTINGS: + { + dumpFrHeader( true, false ); + sal_uInt16 nType = dumpDec< sal_uInt16 >( "data-source-type", "CONNECTION-SOURCETYPE" ); + dumpHex< sal_uInt16 >( "flags-1", "QUERYTABLESETTINGS-FLAGS" ); + switch( nType ) + { + case 4: dumpHex< sal_uInt16 >( "html-flags", "QUERYTABLESETTINGS-HTML-FLAGS" ); break; + case 5: dumpHex< sal_uInt16 >( "oledb-flags", "QUERYTABLESETTINGS-OLEDB-FLAGS" ); break; + case 7: dumpHex< sal_uInt16 >( "ado-flags", "QUERYTABLESETTINGS-ADO-FLAGS" ); break; + default: dumpUnused( 2 ); + } + dumpHex< sal_uInt16 >( "ext-flags", "QUERYTABLESETTINGS-EXT-FLAGS" ); + dumpDec< sal_uInt8 >( "edited-version" ); + dumpDec< sal_uInt8 >( "refreshed-version" ); + dumpDec< sal_uInt8 >( "min-refresh-version" ); + dumpUnused( 3 ); + dumpDec< sal_uInt16 >( "oledb-count" ); + dumpDec< sal_uInt16 >( "future-data-size" ); + dumpDec< sal_uInt16 >( "refresh-interval", "QUERYTABLESETTINGS-INTERVAL" ); + dumpDec< sal_uInt16 >( "html-format", "QUERYTABLESETTINGS-HTMLFORMAT" ); + } + break; + + case BIFF_ID_QUERYTABLESTRING: + dumpFrHeader( true, false ); + dumpUniString( "connection-string" ); + break; + case BIFF_ID_RECALCID: dumpFrHeader( true, false ); dumpDec< sal_uInt32 >( "recalc-engine-id" ); @@ -2896,18 +3059,6 @@ void WorkbookStreamObject::implDumpRecordBody() dumpDxfProp(); break; - case BIFF_ID_SXEXT: - if( eBiff == BIFF8 ) - { - dumpHex< sal_uInt16 >( "flags", "SXEXT-FLAGS" ); - dumpDec< sal_uInt16 >( "param-string-count" ); - dumpDec< sal_uInt16 >( "sql-statement-string-count" ); - dumpDec< sal_uInt16 >( "webquery-postmethod-string-count" ); - dumpDec< sal_uInt16 >( "server-pagefields-string-count" ); - dumpDec< sal_uInt16 >( "odbc-connection-string-count" ); - } - break; - case BIFF_ID_TABLESTYLES: { dumpFrHeader( true, true ); @@ -3122,6 +3273,38 @@ void WorkbookStreamObject::dumpExtGradientHead() dumpDec< double >( "pos-bottom" ); } +sal_uInt8 WorkbookStreamObject::dumpFilterColumnOperator( const String& rName ) +{ + sal_uInt8 nStrLen = 0; + writeEmptyItem( rName ); + IndentGuard aIndGuard( mxOut ); + sal_uInt8 nType = dumpDec< sal_uInt8 >( "data-type", "FILTERCOLUMN-DATATYPE" ); + dumpDec< sal_uInt8 >( "operator", "FILTERCOLUMN-OPERATOR" ); + switch( nType ) + { + case 2: + dumpRk( "value" ); + dumpUnused( 4 ); + break; + case 4: + dumpDec< double >( "value" ); + break; + case 6: + dumpUnused( 4 ); + nStrLen = dumpDec< sal_uInt8 >( "length" ); + dumpBoolean( "simple" ); + dumpUnused( 2 ); + break; + case 8: + dumpBoolErr(); + dumpUnused( 6 ); + break; + default: + dumpUnused( 8 ); + } + return nStrLen; +} + OUString WorkbookStreamObject::dumpPivotString( const String& rName, sal_uInt16 nStrLen ) { OUString aString; @@ -3151,9 +3334,9 @@ void WorkbookStreamObject::dumpBoolErr() { MultiItemsGuard aMultiGuard( mxOut ); sal_uInt8 nValue = dumpHex< sal_uInt8 >( "value" ); - bool bErrCode = dumpBool< sal_uInt8 >( "is-errorcode" ); + bool bErrCode = dumpBool< sal_uInt8 >( "is-error-code" ); if( bErrCode ) - writeErrorCodeItem( "errorcode", nValue ); + writeErrorCodeItem( "error-code", nValue ); else writeBooleanItem( "boolean", nValue ); } @@ -4362,10 +4545,10 @@ void Dumper::implDump() } // ============================================================================ +// ============================================================================ } // namespace biff } // namespace dump } // namespace oox #endif - diff --git a/oox/source/dump/biffdumper.ini b/oox/source/dump/biffdumper.ini index 296962c6084a..2e25ff81c890 100644 --- a/oox/source/dump/biffdumper.ini +++ b/oox/source/dump/biffdumper.ini @@ -344,14 +344,14 @@ multilist=RECORD-NAMES-BIFF5 0x0018=DEFINEDNAME 0x0023=EXTERNALNAME 0x0031=FONT - 0x0098=,,,FILTERMODE,,AUTOFILTERINFO,AUTOFILTER, + 0x0098=,,,FILTERMODE,,AUTOFILTER,FILTERCOLUMN, 0x00A8=,,,,,,SCENARIOS,SCENARIO 0x00B0=PTDEFINITION,PTFIELD,PTFITEM,,PTROWCOLFIELDS,PTROWCOLITEMS,PTPAGEFIELDS, 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,VBAPROJECT,,PIVOTCACHE,RSTRING,DBCELL - 0x00D8=PCDFRANGEPR,PCDFDISCRETEPR,BOOKBOOL,REVERT,SXEXT|PARAMQRY,SCENPROTECT,OLESIZE,UDDESC + 0x00D8=PCDFRANGEPR,PCDFDISCRETEPR,BOOKBOOL,REVERT,DBORPARAMQUERY,SCENPROTECT,OLESIZE,UDDESC 0x00E0=XF,INTERFACEHDR,INTERFACEEND,PCDSOURCE,,,, 0x0206=FORMULA 0x04BC=SHAREDFMLA @@ -379,17 +379,18 @@ multilist=RECORD-NAMES-BIFF8 0x0158=,,,,,,,LABELRANGES 0x0160=USESELFS,DSF,XL5MODIFY,,,,, 0x0190=,,,,,,CHTRHEADER, - 0x01A8=,USERBVIEW,USERSVIEWBEGIN,USERSVIEWEND,,QSI,EXTERNALBOOK,PROT4REV + 0x01A8=,USERBVIEW,USERSVIEWBEGIN,USERSVIEWEND,,QUERYTABLE,EXTERNALBOOK,PROT4REV 0x01B0=CFHEADER,CFRULE,DATAVALIDATIONS,,,DCONBINAME,TXO,REFRESHALL 0x01B8=HYPERLINK,NLRDELNAME,CODENAME,PCDFSQLTYPE,PROT4REVPASS,VBAPROJECTEMPTY,DATAVALIDATION, 0x01C0=XL9FILE,RECALCID,INTCACHEDDATA,,,,, # future records - 0x0800=SCREENTIP,,,WEBQRYSETTINGS,WEBQRYTABLES,,, + 0x0800=SCREENTIP,,QUERYTABLEREFRESH,QUERYTABLESETTINGS,QUERYTABLESTRING,,, 0x0850=CHFRINFO,CHFRWRAPPER,CHFRBLOCKBEGIN,CHFRBLOCKEND,,,CHFRCATEGORYPROPS,CHFRUNITPROPS 0x0858=CHPIVOTREF,CHPIVOTFLAGS,,,,,, 0x0860=,,SHEETEXT,BOOKEXT,,,,SHAREDFEATHEAD 0x0868=,,,CHFRLABELPROPS,,,, - 0x0878=,,CFRULE12,CFRULEEXT,XFCRC,XFEXT,, + 0x0870=,,,,,,CONNECTION, + 0x0878=,,CFRULE12,CFRULEEXT,XFCRC,XFEXT,FILTERCOLUMN12,CONTINUE12 0x0888=,,,PAGELAYOUTVIEW,CHECKCOMPAT,DXF,TABLESTYLES, 0x0890=,,STYLEEXT,,,,THEME, 0x0898=,,MTHREADSETTINGS,COMPRESSPICS,HEADERFOOTER,CHFRLAYOUT,CHFREXTPROPS,CHFREXTPROPSCONT @@ -464,6 +465,7 @@ end constlist=SIMPLE-RECORDS-BIFF5 include=SIMPLE-RECORDS-BIFF4 + 0x009D=uint16,dec,column-count 0x00C9=double,dec,value 0x00CA=uint16,bool,value 0x00CB=uint16,hex,error-code,ERRORCODES @@ -1231,6 +1233,26 @@ combilist=COLINFO-FLAGS 0x1000=outline-collapsed end +# CONNECTION ----------------------------------------------------------------- + +shortlist=CONNECTION-SOURCETYPE,1,odbc,dao,file,html,ole-db,text,ado,dsp + +flagslist=CONNECTION-FLAGS + 0x0001=save-password + 0x0002=html-tables + 0x0004=table-names + 0x0008=deleted + 0x0010=stand-alone + 0x0020=only-use-conn-file + 0x0040=background + 0x0080=refresh-on-load + 0x0100=save-data +end + +shortlist=CONNECTION-RECONNECTTYPE,0,as-required,always,never +shortlist=CONNECTION-CREDENTIALS,0,integrated,none,stored-sso,prompt +shortlist=CONNECTION-LINKEDOBJECTTYPE,0,none,query-table,pivot-cache + # DATATABLE ------------------------------------------------------------------ flagslist=DATATABLE-FLAGS-BIFF3 @@ -1275,6 +1297,18 @@ end shortlist=DATEMODE,0,1899-12-31,1904-01-01 +# DBQUERY -------------------------------------------------------------------- + +combilist=DBQUERY-FLAGS + 0x0007=uint8,dec,source-type,CONNECTION-SOURCETYPE + 0x0008=odbc-connection + 0x0010=sql-query + 0x0020=server-sql + 0x0040=html-query + 0x0080=save-password + 0x0100=html-tables +end + # DEFINEDNAME ---------------------------------------------------------------- flagslist=DEFINEDNAME-FLAGS-BIFF2 @@ -1382,6 +1416,30 @@ end shortlist=FILEPASS-TYPE,0,xor,rc4 shortlist=FILEPASS-MAJOR,1,rc4,crypto-api-2003,crypto-api-2007 +# FILTERCOLUMN --------------------------------------------------------------- + +combilist=FILTERCOLUMN-FLAGS + 0x0001=!and!or + 0x0004=op-1-simple + 0x0008=op-2-simple + 0x0010=top-10 + 0x0020=!bottom!top + 0x0040=percent + 0xFF80=uint16,dec,top-10-count +end + +constlist=FILTERCOLUMN-DATATYPE + 0=none + 2=rk + 4=double + 6=string + 8=boolean + 12=blank + 14=not-blank +end + +shortlist=FILTERCOLUMN-OPERATOR,0,none,less,equal,less-equal,greater,not-equal,greater-equal + # FONT ----------------------------------------------------------------------- flagslist=FONT-FLAGS @@ -1876,6 +1934,101 @@ combilist=PTROWCOLITEMS-FLAGS 0x1000=multi-data end +# QUERYTABLE ----------------------------------------------------------------- + +combilist=QUERYTABLE-FLAGS + 0x0001=headers + 0x0002=row-numbers + 0x0004=disable-refresh + 0x0008=background + 0x0010=first-background + 0x0020=refresh-on-load + 0x0040=delete-unused + 0x0080=fill-formulas + 0x0100=adjust-column-width + 0x0200=save-data + 0x0400=disable-edit + 0x2000=overwrite-existing +end + +combilist=QUERYTABLE-AUTOFORMAT-FLAGS + 0x0001=apply-num-fmt + 0x0002=apply-font + 0x0004=apply-alignment + 0x0008=apply-border + 0x0010=apply-fill + 0x0020=apply-protection +end + +# QUERYTABLEREFRESH ---------------------------------------------------------- + +flagslist=QUERYTABLEREFRESH-FLAGS + 0x0001=enable-refresh + 0x0002=pivot-cache-invalid + 0x0004=olap-pivot-table +end + +flagslist=QUERYTABLEREFRESH-PTFLAGS + 0x00000001=disable-draw-drop + 0x00000002=hide-totals-annotation + 0x00000008=include-empty-rows + 0x00000010=include-empty-columns +end + +flagslist=QUERYTABLEREFRESH-QTFLAGS + 0x00000001=preserve-formatting + 0x00000002=adjust-column-width + 0x00000010=ext-data-list + 0x00000040=create-table-list + 0x00000080=create-dummy-list +end + +# QUERYTABLESETTINGS --------------------------------------------------------- + +flagslist=QUERYTABLESETTINGS-FLAGS + 0x0001=keep-alive + 0x0002=new + 0x0004=source-data + 0x0008=web-based-prov + 0x0010=reinit-list + 0x0080=xml +end + +flagslist=QUERYTABLESETTINGS-HTML-FLAGS + 0x0001=parse-pre + 0x0002=consecutive-delimiters + 0x0004=first-row + 0x0008=xl97-created + 0x0010=text-dates + 0x0020=xl2000-refreshed +end + +combilist=QUERYTABLESETTINGS-OLEDB-FLAGS + 0x0007=uint8,dec,command-type,QUERYTABLESETTINGS-OLEDB-COMMANDTYPE + 0x0008=alt-connection-string + 0x0010=no-refresh-cube + 0x0020=olap-has-locale + 0x0040=server-num-fmt + 0x0080=server-fill-color + 0x0100=server-font-color + 0x0200=server-font-format + 0x0400=olap-member-l10n +end + +shortlist=QUERYTABLESETTINGS-OLEDB-COMMANDTYPE,0,none,cube,sql,table,default,list + +flagslist=QUERYTABLESETTINGS-ADO-FLAGS + 0x0100=ado-refreshable +end + +flagslist=QUERYTABLESETTINGS-EXT-FLAGS + 0x0001=text-query + 0x0002=table-names +end + +unitconverter=QUERYTABLESETTINGS-INTERVAL,60,sec +shortlist=QUERYTABLESETTINGS-HTMLFORMAT,1,none,rtf,all + # REFMODE -------------------------------------------------------------------- shortlist=REFMODE,0,R1C1,A1 @@ -2000,20 +2153,6 @@ multilist=STYLEEXT-BUILTIN 50=20%-accent6,40%-accent6,60%-accent6,explanatory-text end -# SXEXT ---------------------------------------------------------------------- - -combilist=SXEXT-FLAGS - 0x0007=uint8,dec,source-type,SXEXT-SOURCETYPE - 0x0008=odbc-connection - 0x0010=odbc-sql - 0x0020=server-pagefields - 0x0040=webquery - 0x0080=save-password - 0x0100=tables-html-only -end - -shortlist=SXEXT-SOURCETYPE,1,odbc,dao,,webquery - # THEME ---------------------------------------------------------------------- constlist=THEME-VERSION @@ -2237,4 +2376,3 @@ multilist=XFEXT-SUBREC end # ============================================================================ - diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx index 8730698561ce..01994865c69d 100644 --- a/oox/source/dump/dffdumper.cxx +++ b/oox/source/dump/dffdumper.cxx @@ -29,13 +29,15 @@ #if OOX_INCLUDE_DUMPER -using ::rtl::OUString; - namespace oox { namespace dump { // ============================================================================ +using ::rtl::OUString; + +// ============================================================================ + namespace { const sal_uInt16 DFF_ID_BSE = 0xF007; /// BLIP store entry. @@ -320,4 +322,3 @@ sal_uInt16 DffStreamObject::dumpDffOptPropHeader() } // namespace oox #endif - diff --git a/oox/source/dump/dffdumper.ini b/oox/source/dump/dffdumper.ini index c33d733c6bd8..5526663e0e15 100644 --- a/oox/source/dump/dffdumper.ini +++ b/oox/source/dump/dffdumper.ini @@ -648,4 +648,3 @@ combilist=DFFSPLITMENUC-RECORD-INST end # ============================================================================ - diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 807a5ec74715..f7c6c6102b1d 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -29,44 +29,45 @@ #include <algorithm> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess.hpp> #include <com/sun/star/io/XActiveDataSink.hpp> #include <com/sun/star/io/XActiveDataSource.hpp> #include <com/sun/star/io/XTextInputStream.hpp> #include <com/sun/star/io/XTextOutputStream.hpp> -#include <rtl/math.hxx> -#include <osl/file.hxx> +#include <com/sun/star/ucb/XSimpleFileAccess.hpp> #include <comphelper/docpasswordhelper.hxx> +#include <osl/file.hxx> +#include <rtl/math.hxx> +#include "oox/core/filterbase.hxx" #include "oox/helper/binaryoutputstream.hxx" #include "oox/helper/textinputstream.hxx" -#include "oox/core/filterbase.hxx" #include "oox/xls/biffhelper.hxx" #if OOX_INCLUDE_DUMPER +namespace oox { +namespace dump { + +// ============================================================================ + +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::io; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::ucb; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::util; + +using ::comphelper::MediaDescriptor; +using ::oox::core::FilterBase; using ::rtl::OString; using ::rtl::OStringBuffer; using ::rtl::OStringToOUString; using ::rtl::OUString; using ::rtl::OUStringBuffer; using ::rtl::OUStringToOString; -using ::com::sun::star::uno::Exception; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::uno::UNO_QUERY_THROW; -using ::com::sun::star::util::DateTime; -using ::com::sun::star::lang::XMultiServiceFactory; -using ::com::sun::star::ucb::XSimpleFileAccess; -using ::com::sun::star::io::XActiveDataSink; -using ::com::sun::star::io::XActiveDataSource; -using ::com::sun::star::io::XInputStream; -using ::com::sun::star::io::XOutputStream; -using ::com::sun::star::io::XTextInputStream; -using ::com::sun::star::io::XTextOutputStream; -using ::comphelper::MediaDescriptor; -using ::oox::core::FilterBase; -namespace oox { -namespace dump { +// ============================================================================ + +namespace { const sal_Unicode OOX_DUMP_BOM = 0xFEFF; const sal_Int32 OOX_DUMP_MAXSTRLEN = 80; @@ -79,6 +80,8 @@ const sal_Unicode OOX_DUMP_ITEMSEP = '='; const sal_Int32 OOX_DUMP_BYTESPERLINE = 16; const sal_Int64 OOX_DUMP_MAXARRAY = 16; +} // namespace + // ============================================================================ // ============================================================================ @@ -1581,18 +1584,18 @@ NameListRef SharedConfigData::getNameList( const OUString& rListName ) const return xList; } -OUString SharedConfigData::requestPassword( ::comphelper::IDocPasswordVerifier& rVerifier ) +Sequence< NamedValue > SharedConfigData::requestEncryptionData( ::comphelper::IDocPasswordVerifier& rVerifier ) { - OUString aPassword; + Sequence< NamedValue > aEncryptionData; if( !mbPwCancelled ) { ::std::vector< OUString > aDefaultPasswords; aDefaultPasswords.push_back( CREATE_OUSTRING( "VelvetSweatshop" ) ); - aPassword = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword( + aEncryptionData = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword( rVerifier, mrMediaDesc, ::comphelper::DocPasswordRequestType_MS, &aDefaultPasswords ); - mbPwCancelled = aPassword.getLength() == 0; + mbPwCancelled = !aEncryptionData.hasElements(); } - return aPassword; + return aEncryptionData; } bool SharedConfigData::implIsValid() const @@ -1712,7 +1715,7 @@ void Config::construct( const Config& rParent ) void Config::construct( const sal_Char* pcEnvVar, const FilterBase& rFilter ) { if( rFilter.getFileUrl().getLength() > 0 ) - construct( pcEnvVar, rFilter.getGlobalFactory(), rFilter.getStorage(), rFilter.getFileUrl(), rFilter.getMediaDescriptor() ); + construct( pcEnvVar, rFilter.getServiceFactory(), rFilter.getStorage(), rFilter.getFileUrl(), rFilter.getMediaDescriptor() ); } void Config::construct( const sal_Char* pcEnvVar, const Reference< XMultiServiceFactory >& rxFactory, const StorageRef& rxRootStrg, const OUString& rSysFileName, MediaDescriptor& rMediaDesc ) @@ -1764,9 +1767,9 @@ NameListRef Config::getNameList( const String& rListName ) const return implGetNameList( rListName ); } -OUString Config::requestPassword( ::comphelper::IDocPasswordVerifier& rVerifier ) +Sequence< NamedValue > Config::requestEncryptionData( ::comphelper::IDocPasswordVerifier& rVerifier ) { - return mxCfgData->requestPassword( rVerifier ); + return mxCfgData->requestEncryptionData( rVerifier ); } bool Config::isPasswordCancelled() const @@ -3212,4 +3215,3 @@ void DumperBase::construct( const ConfigRef& rxConfig ) } // namespace oox #endif - diff --git a/oox/source/dump/dumperbase.ini b/oox/source/dump/dumperbase.ini index 34ef302c784c..28aa59a03b81 100644 --- a/oox/source/dump/dumperbase.ini +++ b/oox/source/dump/dumperbase.ini @@ -393,4 +393,3 @@ multilist=SYSTEMCOLOR end # ============================================================================ - diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx index cc49ee050ea6..bd2a0e05ecce 100644 --- a/oox/source/dump/oledumper.cxx +++ b/oox/source/dump/oledumper.cxx @@ -26,30 +26,33 @@ ************************************************************************/ #include "oox/dump/oledumper.hxx" + #include <com/sun/star/io/XInputStream.hpp> #include <com/sun/star/io/XOutputStream.hpp> -#include <osl/thread.h> #include <osl/file.hxx> +#include <osl/thread.h> #include <rtl/tencinfo.h> -#include "oox/helper/binaryoutputstream.hxx" #include "oox/core/filterbase.hxx" +#include "oox/helper/binaryoutputstream.hxx" #include "oox/ole/olestorage.hxx" #include "oox/ole/vbainputstream.hxx" #if OOX_INCLUDE_DUMPER -using ::rtl::OUString; -using ::rtl::OUStringBuffer; -using ::rtl::OString; -using ::rtl::OStringToOUString; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::io::XInputStream; -using ::com::sun::star::io::XOutputStream; - namespace oox { namespace dump { // ============================================================================ + +using namespace ::com::sun::star::io; +using namespace ::com::sun::star::uno; + +using ::rtl::OString; +using ::rtl::OStringToOUString; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; + +// ============================================================================ // ============================================================================ OUString OleInputObjectBase::dumpAnsiString32( const String& rName ) @@ -302,28 +305,32 @@ namespace { const sal_Int32 OLEPROP_ID_DICTIONARY = 0; const sal_Int32 OLEPROP_ID_CODEPAGE = 1; -const sal_Int32 OLEPROP_TYPE_INT16 = 2; -const sal_Int32 OLEPROP_TYPE_INT32 = 3; -const sal_Int32 OLEPROP_TYPE_FLOAT = 4; -const sal_Int32 OLEPROP_TYPE_DOUBLE = 5; -const sal_Int32 OLEPROP_TYPE_DATE = 7; -const sal_Int32 OLEPROP_TYPE_STRING = 8; -const sal_Int32 OLEPROP_TYPE_STATUS = 10; -const sal_Int32 OLEPROP_TYPE_BOOL = 11; -const sal_Int32 OLEPROP_TYPE_VARIANT = 12; -const sal_Int32 OLEPROP_TYPE_INT8 = 16; -const sal_Int32 OLEPROP_TYPE_UINT8 = 17; -const sal_Int32 OLEPROP_TYPE_UINT16 = 18; -const sal_Int32 OLEPROP_TYPE_UINT32 = 19; -const sal_Int32 OLEPROP_TYPE_INT64 = 20; -const sal_Int32 OLEPROP_TYPE_UINT64 = 21; -const sal_Int32 OLEPROP_TYPE_STRING8 = 30; -const sal_Int32 OLEPROP_TYPE_STRING16 = 31; -const sal_Int32 OLEPROP_TYPE_FILETIME = 64; -const sal_Int32 OLEPROP_TYPE_BLOB = 65; -const sal_Int32 OLEPROP_TYPE_STREAM = 66; -const sal_Int32 OLEPROP_TYPE_STORAGE = 67; -const sal_Int32 OLEPROP_TYPE_CLIPFMT = 71; +const sal_uInt16 OLEPROP_TYPE_INT16 = 2; +const sal_uInt16 OLEPROP_TYPE_INT32 = 3; +const sal_uInt16 OLEPROP_TYPE_FLOAT = 4; +const sal_uInt16 OLEPROP_TYPE_DOUBLE = 5; +const sal_uInt16 OLEPROP_TYPE_DATE = 7; +const sal_uInt16 OLEPROP_TYPE_STRING = 8; +const sal_uInt16 OLEPROP_TYPE_STATUS = 10; +const sal_uInt16 OLEPROP_TYPE_BOOL = 11; +const sal_uInt16 OLEPROP_TYPE_VARIANT = 12; +const sal_uInt16 OLEPROP_TYPE_INT8 = 16; +const sal_uInt16 OLEPROP_TYPE_UINT8 = 17; +const sal_uInt16 OLEPROP_TYPE_UINT16 = 18; +const sal_uInt16 OLEPROP_TYPE_UINT32 = 19; +const sal_uInt16 OLEPROP_TYPE_INT64 = 20; +const sal_uInt16 OLEPROP_TYPE_UINT64 = 21; +const sal_uInt16 OLEPROP_TYPE_STRING8 = 30; +const sal_uInt16 OLEPROP_TYPE_STRING16 = 31; +const sal_uInt16 OLEPROP_TYPE_FILETIME = 64; +const sal_uInt16 OLEPROP_TYPE_BLOB = 65; +const sal_uInt16 OLEPROP_TYPE_STREAM = 66; +const sal_uInt16 OLEPROP_TYPE_STORAGE = 67; +const sal_uInt16 OLEPROP_TYPE_CLIPFMT = 71; + +const sal_uInt16 OLEPROP_TYPE_SIMPLE = 0x0000; +const sal_uInt16 OLEPROP_TYPE_VECTOR = 0x1000; +const sal_uInt16 OLEPROP_TYPE_ARRAY = 0x2000; const sal_uInt16 CODEPAGE_UNICODE = 1200; @@ -458,7 +465,7 @@ void OlePropertyStreamObject::dumpCodePageProperty( sal_uInt32 nStartPos ) IndentGuard aIndGuard( mxOut ); if( startElement( nStartPos ) ) { - sal_Int32 nType = dumpPropertyType(); + sal_uInt16 nType = dumpPropertyType(); if( nType == OLEPROP_TYPE_INT16 ) { sal_uInt16 nCodePage = dumpDec< sal_uInt16 >( "codepage", "CODEPAGES" ); @@ -493,28 +500,21 @@ void OlePropertyStreamObject::dumpDictionaryProperty( sal_uInt32 nStartPos ) mxOut->emptyLine(); } -void OlePropertyStreamObject::dumpPropertyContents( sal_Int32 nPropId ) +sal_uInt16 OlePropertyStreamObject::dumpPropertyContents( sal_Int32 nPropId ) { - sal_Int32 nType = dumpPropertyType(); - if( getFlag< sal_Int32 >( nType, 0x1000 ) ) // vector + sal_uInt16 nType = dumpPropertyType(); + sal_uInt16 nBaseType = static_cast< sal_uInt16 >( nType & 0x0FFF ); + sal_uInt16 nArrayType = static_cast< sal_uInt16 >( nType & 0xF000 ); + switch( nArrayType ) { - sal_Int32 nBaseType = nType & 0x0FFF; - sal_Int32 nElemCount = dumpDec< sal_Int32 >( "element-count" ); - for( sal_Int32 nElemIdx = 0; !mxStrm->isEof() && (nElemIdx < nElemCount); ++nElemIdx ) - { - mxOut->resetItemIndex( nElemIdx ); - writeEmptyItem( "#element" ); - IndentGuard aIndGuard( mxOut ); - dumpPropertyValue( nPropId, nBaseType ); - } - } - else if( !getFlag< sal_Int32 >( nType, 0x7000 ) ) - { - dumpPropertyValue( nPropId, nType ); + case OLEPROP_TYPE_SIMPLE: dumpPropertyValue( nPropId, nBaseType ); break; + case OLEPROP_TYPE_VECTOR: dumpPropertyVector( nPropId, nBaseType ); break; + case OLEPROP_TYPE_ARRAY: dumpPropertyArray( nPropId, nBaseType ); break; } + return nType; } -void OlePropertyStreamObject::dumpPropertyValue( sal_Int32 nPropId, sal_Int32 nBaseType ) +void OlePropertyStreamObject::dumpPropertyValue( sal_Int32 nPropId, sal_uInt16 nBaseType ) { switch( nBaseType ) { @@ -536,23 +536,46 @@ void OlePropertyStreamObject::dumpPropertyValue( sal_Int32 nPropId, sal_Int32 nB case OLEPROP_TYPE_STRING8: dumpString8( "value" ); break; case OLEPROP_TYPE_STRING16: dumpString16( "value" ); break; case OLEPROP_TYPE_FILETIME: dumpFileTime( "file-time" ); break; - case OLEPROP_TYPE_BLOB: dumpBlob( "data" ); break; + case OLEPROP_TYPE_BLOB: dumpBlob( nPropId, "data" ); break; case OLEPROP_TYPE_STREAM: dumpString8( "stream-name" ); break; case OLEPROP_TYPE_STORAGE: dumpString8( "storage-name" ); break; - case OLEPROP_TYPE_CLIPFMT: dumpBlob( "clip-data" ); break; + case OLEPROP_TYPE_CLIPFMT: dumpBlob( nPropId, "clip-data" ); break; } } -sal_Int32 OlePropertyStreamObject::dumpPropertyType() +void OlePropertyStreamObject::dumpPropertyVector( sal_Int32 nPropId, sal_uInt16 nBaseType ) { - return dumpHex< sal_Int32 >( "type", "OLEPROP-TYPE" ); + sal_Int32 nElemCount = dumpDec< sal_Int32 >( "element-count" ); + for( sal_Int32 nElemIdx = 0; !mxStrm->isEof() && (nElemIdx < nElemCount); ++nElemIdx ) + { + mxOut->resetItemIndex( nElemIdx ); + writeEmptyItem( "#element" ); + IndentGuard aIndGuard( mxOut ); + dumpPropertyValue( nPropId, nBaseType ); + } +} + +void OlePropertyStreamObject::dumpPropertyArray( sal_Int32 /*nPropId*/, sal_uInt16 /*nBaseType*/ ) +{ + // TODO +} + +sal_uInt16 OlePropertyStreamObject::dumpPropertyType() +{ + return static_cast< sal_uInt16 >( dumpHex< sal_Int32 >( "type", "OLEPROP-TYPE" ) & 0xFFFF ); } -void OlePropertyStreamObject::dumpBlob( const String& rName ) +void OlePropertyStreamObject::dumpBlob( sal_Int32 nPropId, const String& rName ) { sal_Int32 nSize = dumpDec< sal_Int32 >( "data-size" ); if( nSize > 0 ) - dumpBinary( rName, nSize ); + { + OUString aPropName = mxPropIds->getName( cfg(), nPropId ); + if( aPropName == CREATE_OUSTRING( "'_PID_HLINKS'" ) ) + dumpHlinks( nSize ); + else + dumpBinary( rName, nSize ); + } } OUString OlePropertyStreamObject::dumpString8( const String& rName ) @@ -596,6 +619,33 @@ OUString OlePropertyStreamObject::dumpCharArray16( const String& rName, sal_Int3 return aData; } +bool OlePropertyStreamObject::dumpTypedProperty( const String& rName, sal_uInt16 nExpectedType ) +{ + writeEmptyItem( rName ); + IndentGuard aIndGuard( mxOut ); + return (dumpPropertyContents( -1 ) == nExpectedType) && !mxStrm->isEof(); +} + +void OlePropertyStreamObject::dumpHlinks( sal_Int32 nSize ) +{ + sal_Int64 nEndPos = mxStrm->tell() + nSize; + sal_Int32 nCount = dumpDec< sal_Int32 >( "property-count" ); + bool bValid = true; + for( sal_Int32 nHlinkIndex = 0, nHlinkCount = nCount / 6; bValid && !mxStrm->isEof() && (nHlinkIndex < nHlinkCount); ++nHlinkIndex ) + { + writeEmptyItem( "HYPERLINK" ); + IndentGuard aIndGuard( mxOut ); + bValid = + dumpTypedProperty( "hash", OLEPROP_TYPE_INT32 ) && + dumpTypedProperty( "app", OLEPROP_TYPE_INT32 ) && + dumpTypedProperty( "shape-id", OLEPROP_TYPE_INT32 ) && + dumpTypedProperty( "info", OLEPROP_TYPE_INT32 ) && + dumpTypedProperty( "target", OLEPROP_TYPE_STRING16 ) && + dumpTypedProperty( "location", OLEPROP_TYPE_STRING16 ); + } + dumpRemainingTo( nEndPos ); +} + bool OlePropertyStreamObject::startElement( sal_uInt32 nStartPos ) { mxStrm->seek( nStartPos ); @@ -2312,4 +2362,3 @@ void ActiveXStorageObject::implDumpBaseStream( const BinaryInputStreamRef& rxStr } // namespace oox #endif - diff --git a/oox/source/dump/oledumper.ini b/oox/source/dump/oledumper.ini index 13478464e6b3..c8461d4b28a7 100644 --- a/oox/source/dump/oledumper.ini +++ b/oox/source/dump/oledumper.ini @@ -885,4 +885,3 @@ end shortlist=VBA-DIR-PROJECTSYSKIND-PLATFORM,0,16-bit-windows,32-bit-windows,macintosh # ============================================================================ - diff --git a/oox/source/dump/pptxdumper.cxx b/oox/source/dump/pptxdumper.cxx index e01d7d349855..39e0ccc2be55 100644 --- a/oox/source/dump/pptxdumper.cxx +++ b/oox/source/dump/pptxdumper.cxx @@ -26,27 +26,31 @@ ************************************************************************/ #include "oox/dump/pptxdumper.hxx" -#include "oox/helper/zipstorage.hxx" -#include "oox/ole/olestorage.hxx" + #include "oox/dump/biffdumper.hxx" #include "oox/dump/oledumper.hxx" #include "oox/dump/xlsbdumper.hxx" +#include "oox/helper/zipstorage.hxx" +#include "oox/ole/olestorage.hxx" #if OOX_INCLUDE_DUMPER -using ::rtl::OUString; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::lang::XMultiServiceFactory; -using ::com::sun::star::io::XInputStream; -using ::comphelper::MediaDescriptor; -using ::oox::core::FilterBase; - namespace oox { namespace dump { namespace pptx { // ============================================================================ +using namespace ::com::sun::star::io; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; + +using ::comphelper::MediaDescriptor; +using ::oox::core::FilterBase; +using ::rtl::OUString; + +// ============================================================================ + RootStorageObject::RootStorageObject( const DumperBase& rParent ) { StorageObjectBase::construct( rParent ); @@ -144,4 +148,3 @@ void Dumper::implDump() } // namespace oox #endif - diff --git a/oox/source/dump/pptxdumper.ini b/oox/source/dump/pptxdumper.ini index fa03953b7113..f3c058ecfbf5 100644 --- a/oox/source/dump/pptxdumper.ini +++ b/oox/source/dump/pptxdumper.ini @@ -16,4 +16,3 @@ include-config-file=dumperbase.ini # enable-import=1 # ============================================================================ - diff --git a/oox/source/dump/xlsbdumper.cxx b/oox/source/dump/xlsbdumper.cxx index dd78ac3c4e2e..3dc2974420a6 100644 --- a/oox/source/dump/xlsbdumper.cxx +++ b/oox/source/dump/xlsbdumper.cxx @@ -26,12 +26,13 @@ ************************************************************************/ #include "oox/dump/xlsbdumper.hxx" + #include <com/sun/star/io/XTextInputStream.hpp> +#include "oox/core/filterbase.hxx" #include "oox/dump/biffdumper.hxx" #include "oox/dump/oledumper.hxx" #include "oox/dump/pptxdumper.hxx" #include "oox/helper/zipstorage.hxx" -#include "oox/core/filterbase.hxx" #include "oox/ole/olestorage.hxx" #include "oox/xls/biffhelper.hxx" #include "oox/xls/formulabase.hxx" @@ -39,34 +40,31 @@ #if OOX_INCLUDE_DUMPER -using ::rtl::OUString; -using ::rtl::OUStringBuffer; -using ::com::sun::star::uno::Reference; -using ::com::sun::star::util::DateTime; -using ::com::sun::star::lang::XMultiServiceFactory; -using ::com::sun::star::io::XInputStream; -using ::comphelper::MediaDescriptor; -using ::oox::core::FilterBase; - -using namespace ::oox::xls; - namespace oox { namespace dump { namespace xlsb { // ============================================================================ -namespace { +using namespace ::com::sun::star::io; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::util; +using namespace ::oox::xls; + +using ::comphelper::MediaDescriptor; +using ::oox::core::FilterBase; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; -const sal_uInt8 OOBIN_STRINGFLAG_FONTS = 0x01; -const sal_uInt8 OOBIN_STRINGFLAG_PHONETICS = 0x02; +// ============================================================================ + +namespace { -const sal_uInt8 OOBIN_TOK_ARRAY_DOUBLE = 0; -const sal_uInt8 OOBIN_TOK_ARRAY_STRING = 1; -const sal_uInt8 OOBIN_TOK_ARRAY_BOOL = 2; -const sal_uInt8 OOBIN_TOK_ARRAY_ERROR = 4; +const sal_uInt8 BIFF12_STRINGFLAG_FONTS = 0x01; +const sal_uInt8 BIFF12_STRINGFLAG_PHONETICS = 0x02; -const sal_uInt16 OOBIN_OLEOBJECT_LINKED = 0x0001; +const sal_uInt16 BIFF12_OLEOBJECT_LINKED = 0x0001; } // namespace @@ -82,7 +80,7 @@ RecordObjectBase::~RecordObjectBase() void RecordObjectBase::construct( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName ) { - mxBiffStrm.reset( new RecordInputStream( getRecordDataSequence() ) ); + mxBiffStrm.reset( new SequenceInputStream( getRecordDataSequence() ) ); SequenceRecordObjectBase::construct( rParent, rxStrm, rSysFileName, mxBiffStrm, "RECORD-NAMES", "SIMPLE-RECORDS" ); if( SequenceRecordObjectBase::implIsValid() ) mxErrCodes = cfg().getNameList( "ERRORCODES" ); @@ -200,11 +198,11 @@ OUString RecordObjectBase::dumpString( const String& rName, bool bRich, bool b32 { sal_uInt8 nFlags = bRich ? dumpHex< sal_uInt8 >( "flags", "STRING-FLAGS" ) : 0; - OUString aString = mxBiffStrm->readString( b32BitLen ); + OUString aString = BiffHelper::readString( *mxBiffStrm, b32BitLen ); writeStringItem( rName( "text" ), aString ); // --- formatting --- - if( getFlag( nFlags, OOBIN_STRINGFLAG_FONTS ) ) + if( getFlag( nFlags, BIFF12_STRINGFLAG_FONTS ) ) { IndentGuard aIndGuard( mxOut ); FontPortionModelList aPortions; @@ -213,7 +211,7 @@ OUString RecordObjectBase::dumpString( const String& rName, bool bRich, bool b32 } // --- phonetic text --- - if( getFlag( nFlags, OOBIN_STRINGFLAG_PHONETICS ) ) + if( getFlag( nFlags, BIFF12_STRINGFLAG_PHONETICS ) ) { IndentGuard aIndGuard( mxOut ); dumpString( "phonetic-text" ); @@ -489,7 +487,7 @@ void FormulaObject::constructFmlaObj() { if( RecordObjectBase::implIsValid() ) { - mxFuncProv.reset( new FunctionProvider( FILTER_OOX, BIFF_UNKNOWN, true ) ); + mxFuncProv.reset( new FunctionProvider( FILTER_OOXML, BIFF_UNKNOWN, true ) ); Config& rCfg = cfg(); mxClasses = rCfg.getNameList( "TOKENCLASSES" ); @@ -567,7 +565,7 @@ OUString FormulaObject::writeFuncIdItem( sal_uInt16 nFuncId, const FunctionInfo* ItemGuard aItem( mxOut, "func-id" ); writeHexItem( EMPTY_STRING, nFuncId, "FUNCID" ); OUStringBuffer aBuffer; - const FunctionInfo* pFuncInfo = mxFuncProv->getFuncInfoFromOobFuncId( nFuncId ); + const FunctionInfo* pFuncInfo = mxFuncProv->getFuncInfoFromBiff12FuncId( nFuncId ); if( pFuncInfo ) aBuffer.append( pFuncInfo->maOoxFuncName ); else @@ -588,9 +586,9 @@ OUString FormulaObject::writeFuncIdItem( sal_uInt16 nFuncId, const FunctionInfo* sal_Int32 FormulaObject::dumpTokenCol( const String& rName, bool& rbRelC, bool& rbRelR ) { sal_uInt16 nCol = dumpHex< sal_uInt16 >( rName, mxRelFlags ); - rbRelC = getFlag( nCol, OOBIN_TOK_REF_COLREL ); - rbRelR = getFlag( nCol, OOBIN_TOK_REF_ROWREL ); - nCol &= OOBIN_TOK_REF_COLMASK; + rbRelC = getFlag( nCol, BIFF12_TOK_REF_COLREL ); + rbRelR = getFlag( nCol, BIFF12_TOK_REF_ROWREL ); + nCol &= BIFF12_TOK_REF_COLMASK; return nCol; } @@ -821,17 +819,17 @@ bool FormulaObject::dumpTableToken() StringHelper::appendIndex( aColRange, mxOut->getLastItemValue() ); OUStringBuffer aParams; size_t nParams = 0; - if( getFlag( nFlags, OOBIN_TOK_TABLE_ALL ) && ++nParams ) + if( getFlag( nFlags, BIFF12_TOK_TABLE_ALL ) && ++nParams ) StringHelper::appendToken( aParams, CREATE_OUSTRING( "[#All]" ) ); - if( getFlag( nFlags, OOBIN_TOK_TABLE_HEADERS ) && ++nParams ) + if( getFlag( nFlags, BIFF12_TOK_TABLE_HEADERS ) && ++nParams ) StringHelper::appendToken( aParams, CREATE_OUSTRING( "[#Headers]" ) ); - if( getFlag( nFlags, OOBIN_TOK_TABLE_DATA ) && ++nParams ) + if( getFlag( nFlags, BIFF12_TOK_TABLE_DATA ) && ++nParams ) StringHelper::appendToken( aParams, CREATE_OUSTRING( "[#Data]" ) ); - if( getFlag( nFlags, OOBIN_TOK_TABLE_TOTALS ) && ++nParams ) + if( getFlag( nFlags, BIFF12_TOK_TABLE_TOTALS ) && ++nParams ) StringHelper::appendToken( aParams, CREATE_OUSTRING( "[#Totals]" ) ); - if( getFlag( nFlags, OOBIN_TOK_TABLE_THISROW ) && ++nParams ) + if( getFlag( nFlags, BIFF12_TOK_TABLE_THISROW ) && ++nParams ) StringHelper::appendToken( aParams, CREATE_OUSTRING( "[#This Row]" ) ); - if( (getFlag( nFlags, OOBIN_TOK_TABLE_COLUMN ) || getFlag( nFlags, OOBIN_TOK_TABLE_COLRANGE )) && ++nParams ) + if( (getFlag( nFlags, BIFF12_TOK_TABLE_COLUMN ) || getFlag( nFlags, BIFF12_TOK_TABLE_COLRANGE )) && ++nParams ) StringHelper::appendToken( aParams, aColRange.makeStringAndClear() ); OUStringBuffer aOp; StringHelper::appendIndexedText( aOp, CREATE_OUSTRING( "TABLE" ), nTabId ); @@ -849,13 +847,13 @@ bool FormulaObject::dumpAttrToken() sal_uInt8 nType = dumpHex< sal_uInt8 >( "type", mxAttrTypes ); switch( nType ) { - case OOBIN_TOK_ATTR_VOLATILE: + case BIFF_TOK_ATTR_VOLATILE: dumpUnused( 2 ); break; - case OOBIN_TOK_ATTR_IF: + case BIFF_TOK_ATTR_IF: dumpDec< sal_uInt16 >( "skip" ); break; - case OOBIN_TOK_ATTR_CHOOSE: + case BIFF_TOK_ATTR_CHOOSE: { sal_uInt16 nCount = dumpDec< sal_uInt16 >( "choices" ); mxOut->resetItemIndex(); @@ -864,22 +862,22 @@ bool FormulaObject::dumpAttrToken() dumpDec< sal_uInt16 >( "skip-err" ); } break; - case OOBIN_TOK_ATTR_SKIP: + case BIFF_TOK_ATTR_SKIP: dumpDec< sal_uInt16 >( "skip" ); break; - case OOBIN_TOK_ATTR_SUM: + case BIFF_TOK_ATTR_SUM: dumpUnused( 2 ); mxStack->pushFuncOp( CREATE_OUSTRING( "SUM" ), OUString( OOX_DUMP_BASECLASS ), 1 ); break; - case OOBIN_TOK_ATTR_ASSIGN: + case BIFF_TOK_ATTR_ASSIGN: dumpUnused( 2 ); break; - case OOBIN_TOK_ATTR_SPACE: - case OOBIN_TOK_ATTR_SPACE | BIFF_TOK_ATTR_VOLATILE: + case BIFF_TOK_ATTR_SPACE: + case BIFF_TOK_ATTR_SPACE | BIFF_TOK_ATTR_VOLATILE: dumpDec< sal_uInt8 >( "char-type", mxSpTypes ); dumpDec< sal_uInt8 >( "char-count" ); break; - case OOBIN_TOK_ATTR_IFERROR: + case BIFF_TOK_ATTR_IFERROR: dumpDec< sal_uInt16 >( "skip" ); break; default: @@ -967,19 +965,19 @@ OUString FormulaObject::dumpaddDataArrayValue() OUStringBuffer aValue; switch( dumpDec< sal_uInt8 >( "type", "ARRAYVALUE-TYPE" ) ) { - case OOBIN_TOK_ARRAY_DOUBLE: + case BIFF_TOK_ARRAY_DOUBLE: dumpDec< double >( "value" ); aValue.append( mxOut->getLastItemValue() ); break; - case OOBIN_TOK_ARRAY_STRING: + case BIFF_TOK_ARRAY_STRING: aValue.append( dumpString( "value", false, false ) ); StringHelper::enclose( aValue, OOX_DUMP_STRQUOTE ); break; - case OOBIN_TOK_ARRAY_BOOL: + case BIFF_TOK_ARRAY_BOOL: dumpBoolean( "value" ); aValue.append( mxOut->getLastItemValue() ); break; - case OOBIN_TOK_ARRAY_ERROR: + case BIFF_TOK_ARRAY_ERROR: dumpErrorCode( "value" ); aValue.append( mxOut->getLastItemValue() ); dumpUnused( 3 ); @@ -1006,18 +1004,22 @@ void RecordStreamObject::implDumpRecordBody() { switch( getRecId() ) { - case OOBIN_ID_ARRAY: + case BIFF12_ID_ARRAY: dumpRange( "array-range" ); dumpHex< sal_uInt8 >( "flags", "ARRAY-FLAGS" ); mxFmlaObj->dumpCellFormula(); break; - case OOBIN_ID_BINARYINDEXBLOCK: + case BIFF12_ID_AUTOFILTER: + dumpRange( "filter-range" ); + break; + + case BIFF12_ID_BINARYINDEXBLOCK: dumpRowRange( "row-range" ); dumpUnknown( 12 ); break; - case OOBIN_ID_BINARYINDEXROWS: + case BIFF12_ID_BINARYINDEXROWS: { sal_uInt32 nUsedRows = dumpBin< sal_uInt32 >( "used-rows" ); dumpDec< sal_Int64 >( "stream-offset" ); @@ -1027,7 +1029,7 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_BORDER: + case BIFF12_ID_BORDER: dumpHex< sal_uInt8 >( "flags", "BORDER-FLAGS" ); dumpDec< sal_uInt16 >( "top-style", "BORDERSTYLES" ); dumpColor( "top-color" ); @@ -1041,7 +1043,7 @@ void RecordStreamObject::implDumpRecordBody() dumpColor( "diag-color" ); break; - case OOBIN_ID_BRK: + case BIFF12_ID_BRK: dumpDec< sal_Int32 >( "id" ); dumpDec< sal_Int32 >( "min" ); dumpDec< sal_Int32 >( "max" ); @@ -1049,7 +1051,7 @@ void RecordStreamObject::implDumpRecordBody() dumpDec< sal_Int32 >( "pivot-break", "BOOLEAN" ); break; - case OOBIN_ID_CALCPR: + case BIFF12_ID_CALCPR: dumpDec< sal_Int32 >( "calc-id" ); dumpDec< sal_Int32 >( "calc-mode", "CALCPR-CALCMODE" ); dumpDec< sal_Int32 >( "iteration-count" ); @@ -1058,46 +1060,46 @@ void RecordStreamObject::implDumpRecordBody() dumpHex< sal_uInt16 >( "flags", "CALCPR-FLAGS" ); break; - case OOBIN_ID_CELL_BLANK: + case BIFF12_ID_CELL_BLANK: dumpCellHeader( true ); break; - case OOBIN_ID_CELL_BOOL: + case BIFF12_ID_CELL_BOOL: dumpCellHeader( true ); dumpBoolean(); break; - case OOBIN_ID_CELL_DOUBLE: + case BIFF12_ID_CELL_DOUBLE: dumpCellHeader( true ); dumpDec< double >( "value" ); break; - case OOBIN_ID_CELL_ERROR: + case BIFF12_ID_CELL_ERROR: dumpCellHeader( true ); dumpErrorCode(); break; - case OOBIN_ID_CELL_RK: + case BIFF12_ID_CELL_RK: dumpCellHeader( true ); dumpRk( "value" ); break; - case OOBIN_ID_CELL_RSTRING: + case BIFF12_ID_CELL_RSTRING: dumpCellHeader( true ); dumpString( "value", true ); break; - case OOBIN_ID_CELL_SI: + case BIFF12_ID_CELL_SI: dumpCellHeader( true ); dumpDec< sal_Int32 >( "string-id" ); break; - case OOBIN_ID_CELL_STRING: + case BIFF12_ID_CELL_STRING: dumpCellHeader( true ); dumpString( "value" ); break; - case OOBIN_ID_CELLSTYLE: + case BIFF12_ID_CELLSTYLE: dumpDec< sal_Int32 >( "xf-id" ); dumpHex< sal_uInt16 >( "flags", "CELLSTYLE-FLAGS" ); dumpDec< sal_uInt8 >( "builtin-id", "CELLSTYLE-BUILTIN" ); @@ -1105,11 +1107,11 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "name" ); break; - case OOBIN_ID_CFCOLOR: + case BIFF12_ID_CFCOLOR: dumpColor(); break; - case OOBIN_ID_CFRULE: + case BIFF12_ID_CFRULE: { // type/subtype/operator is a mess... dumpDec< sal_Int32 >( "type", "CFRULE-TYPE" ); @@ -1153,7 +1155,7 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_CHARTPAGESETUP: + case BIFF12_ID_CHARTPAGESETUP: dumpDec< sal_Int32 >( "paper-size", "PAGESETUP-PAPERSIZE" ); dumpDec< sal_Int32 >( "horizontal-res", "PAGESETUP-DPI" ); dumpDec< sal_Int32 >( "vertical-res", "PAGESETUP-DPI" ); @@ -1163,75 +1165,110 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "printer-settings-rel-id" ); break; - case OOBIN_ID_CHARTPROTECTION: + case BIFF12_ID_CHARTPROTECTION: dumpHex< sal_uInt16 >( "password-hash" ); // no flags field for the boolean flags?!? dumpDec< sal_Int32 >( "content-locked", "BOOLEAN" ); dumpDec< sal_Int32 >( "objects-locked", "BOOLEAN" ); break; - case OOBIN_ID_CHARTSHEETPR: + case BIFF12_ID_CHARTSHEETPR: dumpHex< sal_uInt16 >( "flags", "CHARTSHEETPR-FLAGS" ); dumpColor( "tab-color" ); dumpString( "codename" ); break; - case OOBIN_ID_CHARTSHEETVIEW: + case BIFF12_ID_CHARTSHEETVIEW: dumpHex< sal_uInt16 >( "flags", "CHARTSHEETVIEW-FLAGS" ); dumpDec< sal_Int32 >( "zoom-scale", "CONV-PERCENT" ); dumpDec< sal_Int32 >( "workbookview-id" ); break; - case OOBIN_ID_COL: + case BIFF12_ID_COL: dumpColRange(); dumpDec< sal_Int32 >( "col-width", "CONV-COLWIDTH" ); dumpDec< sal_Int32 >( "custom-xf-id" ); dumpHex< sal_uInt16 >( "flags", "COL-FLAGS" ); break; - case OOBIN_ID_COLBREAKS: + case BIFF12_ID_COLBREAKS: dumpDec< sal_Int32 >( "count" ); dumpDec< sal_Int32 >( "manual-count" ); break; - case OOBIN_ID_COLOR: + case BIFF12_ID_COLOR: dumpColor(); break; - case OOBIN_ID_COMMENT: + case BIFF12_ID_COMMENT: dumpDec< sal_Int32 >( "author-id" ); dumpRange( "ref" ); dumpGuid(); break; - case OOBIN_ID_COMMENTAUTHOR: + case BIFF12_ID_COMMENTAUTHOR: dumpString( "author" ); break; - case OOBIN_ID_COMMENTTEXT: + case BIFF12_ID_COMMENTTEXT: dumpString( "text", true ); break; - case OOBIN_ID_CONDFORMATTING: + case BIFF12_ID_CONDFORMATTING: dumpDec< sal_Int32 >( "cfrule-count" ); dumpDec< sal_Int32 >( "pivot-table", "BOOLEAN" ); dumpRangeList(); break; - case OOBIN_ID_CONTROL: + case BIFF12_ID_CONNECTION: + { + dumpDec< sal_uInt8 >( "refreshed-version" ); + dumpDec< sal_uInt8 >( "min-refresh-version" ); + dumpDec< sal_uInt8 >( "save-password", "CONNECTION-SAVEPASSWORD" ); + dumpUnused( 1 ); + dumpDec< sal_uInt16 >( "refresh-interval", "CONNECTION-INTERVAL" ); + dumpHex< sal_uInt16 >( "flags", "CONNECTION-FLAGS" ); + sal_uInt16 nStrFlags = dumpHex< sal_uInt16 >( "string-flags", "CONNECTION-STRINGFLAGS" ); + dumpDec< sal_Int32 >( "data-source-type", "CONNECTION-SOURCETYPE" ); + dumpDec< sal_Int32 >( "reconnect-type", "CONNECTION-RECONNECTTYPE" ); + dumpDec< sal_Int32 >( "id" ); + dumpDec< sal_uInt8 >( "credentials", "CONNECTION-CREDENTIALS" ); + if( nStrFlags & 0x0001 ) dumpString( "source-file" ); + if( nStrFlags & 0x0002 ) dumpString( "source-conn-file" ); + if( nStrFlags & 0x0004 ) dumpString( "description" ); + if( nStrFlags & 0x0008 ) dumpString( "name" ); + if( nStrFlags & 0x0010 ) dumpString( "sso-id" ); + } + break; + + case BIFF12_ID_CONTROL: dumpDec< sal_Int32 >( "shape-id" ); dumpString( "rel-id" ); dumpString( "name" ); break; - case OOBIN_ID_DATATABLE: + case BIFF12_ID_CUSTOMFILTER: + { + sal_uInt8 nType = dumpDec< sal_uInt8 >( "data-type", "CUSTOMFILTER-DATATYPE" ); + dumpDec< sal_uInt8 >( "operator", "CUSTOMFILTER-OPERATOR" ); + switch( nType ) + { + case 4: dumpDec< double >( "value" ); break; + case 6: dumpUnused( 8 ); dumpString( "value" ); break; + case 8: dumpBoolean( "value" ); dumpUnused( 7 ); break; + default: dumpUnused( 8 ); + } + } + break; + + case BIFF12_ID_DATATABLE: dumpRange( "table-range" ); dumpAddress( "ref1" ); dumpAddress( "ref2" ); dumpHex< sal_uInt8 >( "flags", "DATATABLE-FLAGS" ); break; - case OOBIN_ID_DATAVALIDATION: + case BIFF12_ID_DATAVALIDATION: dumpHex< sal_uInt32 >( "flags", "DATAVALIDATION-FLAGS" ); dumpRangeList(); dumpString( "error-title" ); @@ -1242,7 +1279,7 @@ void RecordStreamObject::implDumpRecordBody() mxFmlaObj->dumpNameFormula( "formula2" ); break; - case OOBIN_ID_DATAVALIDATIONS: + case BIFF12_ID_DATAVALIDATIONS: dumpHex< sal_uInt16 >( "flags", "DATAVALIDATIONS-FLAGS" ); dumpDec< sal_Int32 >( "input-x" ); dumpDec< sal_Int32 >( "input-y" ); @@ -1250,16 +1287,16 @@ void RecordStreamObject::implDumpRecordBody() dumpDec< sal_Int32 >( "count" ); break; - case OOBIN_ID_DDEITEMVALUES: + case BIFF12_ID_DDEITEMVALUES: dumpDec< sal_Int32 >( "rows" ); dumpDec< sal_Int32 >( "columns" ); break; - case OOBIN_ID_DDEITEM_STRING: + case BIFF12_ID_DDEITEM_STRING: dumpString( "value" ); break; - case OOBIN_ID_DEFINEDNAME: + case BIFF12_ID_DEFINEDNAME: dumpHex< sal_uInt32 >( "flags", "DEFINEDNAME-FLAGS" ); dumpChar( "accelerator", RTL_TEXTENCODING_ISO_8859_1 ); dumpDec< sal_Int32 >( "sheet-id", "DEFINEDNAME-SHEETID" ); @@ -1272,15 +1309,24 @@ void RecordStreamObject::implDumpRecordBody() if( mxStrm->getRemaining() >= 4 ) dumpString( "statusbar-text" ); break; - case OOBIN_ID_DIMENSION: + case BIFF12_ID_DIMENSION: dumpRange( "used-range" ); break; - case OOBIN_ID_DRAWING: + case BIFF12_ID_DISCRETEFILTER: + dumpString( "value" ); + break; + + case BIFF12_ID_DISCRETEFILTERS: + dumpBool< sal_Int32 >( "show-blank" ); + dumpDec< sal_Int32 >( "calendar-type", "DISCRETEFILTERS-CALTYPE" ); + break; + + case BIFF12_ID_DRAWING: dumpString( "rel-id" ); break; - case OOBIN_ID_DXF: + case BIFF12_ID_DXF: dumpHex< sal_uInt32 >( "flags", "DXF-FLAGS" ); for( sal_uInt16 nIndex = 0, nCount = dumpDec< sal_uInt16 >( "subrec-count" ); !mxStrm->isEof() && (nIndex < nCount); ++nIndex ) { @@ -1377,27 +1423,27 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_EXTCELL_BOOL: + case BIFF12_ID_EXTCELL_BOOL: dumpColIndex(); dumpBoolean(); break; - case OOBIN_ID_EXTCELL_DOUBLE: + case BIFF12_ID_EXTCELL_DOUBLE: dumpColIndex(); dumpDec< double >( "value" ); break; - case OOBIN_ID_EXTCELL_ERROR: + case BIFF12_ID_EXTCELL_ERROR: dumpColIndex(); dumpErrorCode(); break; - case OOBIN_ID_EXTCELL_STRING: + case BIFF12_ID_EXTCELL_STRING: dumpColIndex(); dumpString( "value" ); break; - case OOBIN_ID_EXTERNALBOOK: + case BIFF12_ID_EXTERNALBOOK: switch( dumpDec< sal_uInt16 >( "type", "EXTERNALBOOK-TYPE" ) ) { case 0: @@ -1415,21 +1461,21 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_EXTERNALNAME: + case BIFF12_ID_EXTERNALNAME: dumpString( "name" ); break; - case OOBIN_ID_EXTERNALNAMEFLAGS: + case BIFF12_ID_EXTERNALNAMEFLAGS: dumpHex< sal_uInt16 >( "flags", "EXTERNALNAMEFLAGS-FLAGS" ); dumpDec< sal_Int32 >( "sheet-id" ); dumpBoolean( "is-dde-ole" ); break; - case OOBIN_ID_EXTERNALREF: + case BIFF12_ID_EXTERNALREF: dumpString( "rel-id" ); break; - case OOBIN_ID_EXTERNALSHEETS: + case BIFF12_ID_EXTERNALSHEETS: { sal_Int32 nCount = dumpDec< sal_Int32 >( "ref-count" ); TableGuard aTabGuard( mxOut, 13, 17, 24 ); @@ -1445,28 +1491,28 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_EXTROW: + case BIFF12_ID_EXTROW: dumpRowIndex(); break; - case OOBIN_ID_EXTSHEETDATA: + case BIFF12_ID_EXTSHEETDATA: dumpDec< sal_Int32 >( "sheet-id" ); dumpHex< sal_uInt8 >( "flags", "EXTSHEETDATA-FLAGS" ); break; - case OOBIN_ID_EXTSHEETNAMES: + case BIFF12_ID_EXTSHEETNAMES: mxOut->resetItemIndex(); for( sal_Int32 nSheet = 0, nCount = dumpDec< sal_Int32 >( "sheet-count" ); !mxStrm->isEof() && (nSheet < nCount); ++nSheet ) dumpString( "#sheet-name" ); break; - case OOBIN_ID_FILESHARING: + case BIFF12_ID_FILESHARING: dumpBool< sal_uInt16 >( "recommend-read-only" ); dumpHex< sal_uInt16 >( "password-hash" ); dumpString( "password-creator" ); break; - case OOBIN_ID_FILL: + case BIFF12_ID_FILL: dumpDec< sal_Int32 >( "fill-pattern", "FILLPATTERNS" ); dumpColor( "fg-color" ); dumpColor( "bg-color" ); @@ -1481,7 +1527,7 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_FILEVERSION: + case BIFF12_ID_FILEVERSION: dumpGuid( "codename" ); dumpString( "app-name" ); dumpString( "last-edited" ); @@ -1489,7 +1535,12 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "build-version" ); break; - case OOBIN_ID_FONT: + case BIFF12_ID_FILTERCOLUMN: + dumpDec< sal_Int32 >( "column-index" ); + dumpHex< sal_uInt16 >( "flags", "FILTERCOLUMN-FLAGS" ); + break; + + case BIFF12_ID_FONT: dumpDec< sal_uInt16 >( "height", "CONV-TWIP-TO-PT" ); dumpHex< sal_uInt16 >( "flags", "FONT-FLAGS" ); dumpDec< sal_uInt16 >( "weight", "FONT-WEIGHT" ); @@ -1503,39 +1554,39 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "name" ); break; - case OOBIN_ID_FORMULA_BOOL: + case BIFF12_ID_FORMULA_BOOL: dumpCellHeader( true ); dumpBoolean(); dumpHex< sal_uInt16 >( "flags", "FORMULA-FLAGS" ); mxFmlaObj->dumpCellFormula(); break; - case OOBIN_ID_FORMULA_DOUBLE: + case BIFF12_ID_FORMULA_DOUBLE: dumpCellHeader( true ); dumpDec< double >( "value" ); dumpHex< sal_uInt16 >( "flags", "FORMULA-FLAGS" ); mxFmlaObj->dumpCellFormula(); break; - case OOBIN_ID_FORMULA_ERROR: + case BIFF12_ID_FORMULA_ERROR: dumpCellHeader( true ); dumpErrorCode(); dumpHex< sal_uInt16 >( "flags", "FORMULA-FLAGS" ); mxFmlaObj->dumpCellFormula(); break; - case OOBIN_ID_FORMULA_STRING: + case BIFF12_ID_FORMULA_STRING: dumpCellHeader( true ); dumpString( "value" ); dumpHex< sal_uInt16 >( "flags", "FORMULA-FLAGS" ); mxFmlaObj->dumpCellFormula(); break; - case OOBIN_ID_FUNCTIONGROUP: + case BIFF12_ID_FUNCTIONGROUP: dumpString( "name" ); break; - case OOBIN_ID_HEADERFOOTER: + case BIFF12_ID_HEADERFOOTER: dumpHex< sal_uInt16 >( "flags", "HEADERFOOTER-FLAGS" ); dumpString( "odd-header" ); dumpString( "odd-footer" ); @@ -1545,7 +1596,7 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "first-footer" ); break; - case OOBIN_ID_HYPERLINK: + case BIFF12_ID_HYPERLINK: dumpRange(); dumpString( "rel-id" ); dumpString( "location" ); @@ -1553,84 +1604,84 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "display" ); break; - case OOBIN_ID_INPUTCELLS: + case BIFF12_ID_INPUTCELLS: dumpAddress( "pos" ); dumpUnused( 8 ); dumpDec< sal_uInt16 >( "numfmt-id" ); dumpString( "value" ); break; - case OOBIN_ID_LEGACYDRAWING: + case BIFF12_ID_LEGACYDRAWING: dumpString( "rel-id" ); break; - case OOBIN_ID_MERGECELL: + case BIFF12_ID_MERGECELL: dumpRange(); break; - case OOBIN_ID_MULTCELL_BLANK: + case BIFF12_ID_MULTCELL_BLANK: dumpCellHeader( false ); break; - case OOBIN_ID_MULTCELL_BOOL: + case BIFF12_ID_MULTCELL_BOOL: dumpCellHeader( false ); dumpBoolean(); break; - case OOBIN_ID_MULTCELL_DOUBLE: + case BIFF12_ID_MULTCELL_DOUBLE: dumpCellHeader( false ); dumpDec< double >( "value" ); break; - case OOBIN_ID_MULTCELL_ERROR: + case BIFF12_ID_MULTCELL_ERROR: dumpCellHeader( false ); dumpErrorCode(); break; - case OOBIN_ID_MULTCELL_RK: + case BIFF12_ID_MULTCELL_RK: dumpCellHeader( false ); dumpRk( "value" ); break; - case OOBIN_ID_MULTCELL_RSTRING: + case BIFF12_ID_MULTCELL_RSTRING: dumpCellHeader( false ); dumpString( "value", true ); break; - case OOBIN_ID_MULTCELL_SI: + case BIFF12_ID_MULTCELL_SI: dumpCellHeader( false ); dumpDec< sal_Int32 >( "string-id" ); break; - case OOBIN_ID_MULTCELL_STRING: + case BIFF12_ID_MULTCELL_STRING: dumpCellHeader( false ); dumpString( "value" ); break; - case OOBIN_ID_NUMFMT: + case BIFF12_ID_NUMFMT: dumpDec< sal_uInt16 >( "numfmt-id" ); dumpString( "format" ); break; - case OOBIN_ID_OLEOBJECT: + case BIFF12_ID_OLEOBJECT: { dumpDec< sal_Int32 >( "aspect", "OLEOBJECT-ASPECT" ); dumpDec< sal_Int32 >( "update", "OLEOBJECT-UPDATE" ); dumpDec< sal_Int32 >( "shape-id" ); sal_uInt16 nFlags = dumpHex< sal_uInt16 >( "flags", "OLEOBJECT-FLAGS" ); dumpString( "prog-id" ); - if( getFlag( nFlags, OOBIN_OLEOBJECT_LINKED ) ) + if( getFlag( nFlags, BIFF12_OLEOBJECT_LINKED ) ) mxFmlaObj->dumpNameFormula( "link" ); else dumpString( "rel-id" ); } break; - case OOBIN_ID_OLESIZE: + case BIFF12_ID_OLESIZE: dumpRange( "visible-range" ); break; - case OOBIN_ID_PAGEMARGINS: + case BIFF12_ID_PAGEMARGINS: dumpDec< double >( "left-margin" ); dumpDec< double >( "right-margin" ); dumpDec< double >( "top-margin" ); @@ -1639,7 +1690,7 @@ void RecordStreamObject::implDumpRecordBody() dumpDec< double >( "footer-margin" ); break; - case OOBIN_ID_PAGESETUP: + case BIFF12_ID_PAGESETUP: dumpDec< sal_Int32 >( "paper-size", "PAGESETUP-PAPERSIZE" ); dumpDec< sal_Int32 >( "scaling", "CONV-PERCENT" ); dumpDec< sal_Int32 >( "horizontal-res", "PAGESETUP-DPI" ); @@ -1652,7 +1703,7 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "printer-settings-rel-id" ); break; - case OOBIN_ID_PANE: + case BIFF12_ID_PANE: dumpDec< double >( "x-split-pos" ); dumpDec< double >( "y-split-pos" ); dumpAddress( "second-top-left" ); @@ -1660,7 +1711,7 @@ void RecordStreamObject::implDumpRecordBody() dumpHex< sal_uInt8 >( "flags", "PANE-FLAGS" ); break; - case OOBIN_ID_PCDEFINITION: + case BIFF12_ID_PCDEFINITION: { dumpDec< sal_uInt8 >( "refreshed-version" ); dumpDec< sal_uInt8 >( "min-refresh-version" ); @@ -1675,7 +1726,7 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_PCDFIELD: + case BIFF12_ID_PCDFIELD: { sal_uInt16 nFlags = dumpHex< sal_uInt16 >( "flags", "PCDFIELD-FLAGS" ); dumpDec< sal_Int32 >( "numfmt-id" ); @@ -1695,12 +1746,12 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_PCDFIELDGROUP: + case BIFF12_ID_PCDFIELDGROUP: dumpDec< sal_Int32 >( "parent-field" ); dumpDec< sal_Int32 >( "base-field" ); break; - case OOBIN_ID_PCDFRANGEPR: + case BIFF12_ID_PCDFRANGEPR: dumpDec< sal_uInt8 >( "group-by", "PCDFRANGEPR-GROUPBY" ); dumpHex< sal_uInt8 >( "flags", "PCDFRANGEPR-FLAGS" ); dumpDec< double >( "start-value" ); @@ -1708,7 +1759,7 @@ void RecordStreamObject::implDumpRecordBody() dumpDec< double >( "interval" ); break; - case OOBIN_ID_PCDFSHAREDITEMS: + case BIFF12_ID_PCDFSHAREDITEMS: { sal_uInt16 nFlags = dumpHex< sal_uInt16 >( "flags", "PCDFSHAREDITEMS-FLAGS" ); dumpDec< sal_Int32 >( "count" ); @@ -1717,7 +1768,7 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_PCDSHEETSOURCE: + case BIFF12_ID_PCDSHEETSOURCE: { sal_uInt8 nIsDefName = dumpBoolean( "is-def-name" ); dumpBoolean( "is-builtin-def-name" ); @@ -1728,12 +1779,12 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_PCDSOURCE: + case BIFF12_ID_PCDSOURCE: dumpDec< sal_Int32 >( "source-type", "PCDSOURCE-TYPE" ); dumpDec< sal_Int32 >( "connection-id" ); break; - case OOBIN_ID_PCITEM_ARRAY: + case BIFF12_ID_PCITEM_ARRAY: { sal_uInt16 nType = dumpDec< sal_uInt16 >( "type", "PCITEM_ARRAY-TYPE" ); sal_Int32 nCount = dumpDec< sal_Int32 >( "count" ); @@ -1752,97 +1803,97 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_PCITEM_BOOL: + case BIFF12_ID_PCITEM_BOOL: dumpBoolean( "value" ); break; - case OOBIN_ID_PCITEM_DATE: + case BIFF12_ID_PCITEM_DATE: dumpPivotDateTime( "value" ); break; - case OOBIN_ID_PCITEM_DOUBLE: + case BIFF12_ID_PCITEM_DOUBLE: dumpDec< double >( "value" ); // TODO: server formatting break; - case OOBIN_ID_PCITEM_ERROR: + case BIFF12_ID_PCITEM_ERROR: dumpErrorCode( "value" ); // TODO: server formatting break; - case OOBIN_ID_PCITEM_INDEX: + case BIFF12_ID_PCITEM_INDEX: dumpDec< sal_Int32 >( "index" ); break; - case OOBIN_ID_PCITEM_MISSING: + case BIFF12_ID_PCITEM_MISSING: // TODO: server formatting break; - case OOBIN_ID_PCITEM_STRING: + case BIFF12_ID_PCITEM_STRING: dumpString( "value" ); // TODO: server formatting break; - case OOBIN_ID_PCITEMA_BOOL: + case BIFF12_ID_PCITEMA_BOOL: dumpBoolean( "value" ); // TODO: additional info break; - case OOBIN_ID_PCITEMA_DATE: + case BIFF12_ID_PCITEMA_DATE: dumpPivotDateTime( "value" ); // TODO: additional info break; - case OOBIN_ID_PCITEMA_DOUBLE: + case BIFF12_ID_PCITEMA_DOUBLE: dumpDec< double >( "value" ); // TODO: additional info break; - case OOBIN_ID_PCITEMA_ERROR: + case BIFF12_ID_PCITEMA_ERROR: dumpErrorCode( "value" ); // TODO: additional info break; - case OOBIN_ID_PCITEMA_MISSING: + case BIFF12_ID_PCITEMA_MISSING: // TODO: additional info break; - case OOBIN_ID_PCITEMA_STRING: + case BIFF12_ID_PCITEMA_STRING: dumpString( "value" ); // TODO: additional info break; - case OOBIN_ID_PHONETICPR: + case BIFF12_ID_PHONETICPR: dumpDec< sal_uInt16 >( "font-id", "FONTNAMES" ); dumpDec< sal_Int32 >( "type", "PHONETICPR-TYPE" ); dumpDec< sal_Int32 >( "alignment", "PHONETICPR-ALIGNMENT" ); break; - case OOBIN_ID_PICTURE: + case BIFF12_ID_PICTURE: dumpString( "rel-id" ); break; - case OOBIN_ID_PIVOTAREA: + case BIFF12_ID_PIVOTAREA: dumpDec< sal_Int32 >( "field" ); dumpDec< sal_uInt8 >( "type", "PIVOTAREA-TYPE" ); dumpHex< sal_uInt8 >( "flags-1", "PIVOTAREA-FLAGS1" ); dumpHex< sal_uInt16 >( "flags-2", "PIVOTAREA-FLAGS2" ); break; - case OOBIN_ID_PIVOTCACHE: + case BIFF12_ID_PIVOTCACHE: dumpDec< sal_Int32 >( "cache-id" ); dumpString( "rel-id" ); break; - case OOBIN_ID_PTCOLFIELDS: + case BIFF12_ID_PTCOLFIELDS: dumpDec< sal_Int32 >( "count" ); mxOut->resetItemIndex(); while( mxStrm->getRemaining() >= 4 ) dumpDec< sal_Int32 >( "#field", "PT-FIELDINDEX" ); break; - case OOBIN_ID_PTDATAFIELD: + case BIFF12_ID_PTDATAFIELD: dumpDec< sal_Int32 >( "field" ); dumpDec< sal_Int32 >( "subtotal", "PTDATAFIELD-SUBTOTAL" ); dumpDec< sal_Int32 >( "show-data-as", "PTDATAFIELD-SHOWDATAAS" ); @@ -1853,7 +1904,7 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "name" ); break; - case OOBIN_ID_PTDEFINITION: + case BIFF12_ID_PTDEFINITION: { dumpDec< sal_uInt8 >( "created-version" ); dumpHex< sal_uInt8 >( "flags-1", "PTDEFINITION-FLAGS1" ); @@ -1883,7 +1934,7 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_PTFIELD: + case BIFF12_ID_PTFIELD: dumpHex< sal_uInt32 >( "flags-1", "PTFIELD-FLAGS1" ); dumpDec< sal_Int32 >( "num-fmt" ); dumpHex< sal_uInt32 >( "flags-2", "PTFIELD-FLAGS2" ); @@ -1891,7 +1942,7 @@ void RecordStreamObject::implDumpRecordBody() dumpDec< sal_Int32 >( "autoshow-datafield-idx" ); break; - case OOBIN_ID_PTFILTER: + case BIFF12_ID_PTFILTER: { dumpDec< sal_Int32 >( "field" ); dumpDec< sal_Int32 >( "member-prop-field" ); @@ -1908,7 +1959,7 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_PTFITEM: + case BIFF12_ID_PTFITEM: { dumpDec< sal_uInt8 >( "type", "PTFITEM-TYPE" ); sal_uInt16 nFlags = dumpHex< sal_uInt16 >( "flags", "PTFITEM-FLAGS" ); @@ -1917,7 +1968,7 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_PTLOCATION: + case BIFF12_ID_PTLOCATION: dumpRange( "location" ); dumpDec< sal_Int32 >( "first-header-row" ); dumpDec< sal_Int32 >( "first-data-row" ); @@ -1926,7 +1977,7 @@ void RecordStreamObject::implDumpRecordBody() dumpDec< sal_Int32 >( "page-col-count" ); break; - case OOBIN_ID_PTPAGEFIELD: + case BIFF12_ID_PTPAGEFIELD: { dumpDec< sal_Int32 >( "field" ); dumpDec< sal_Int32 >( "cache-item", "PTPAGEFIELD-ITEM" ); @@ -1937,21 +1988,28 @@ void RecordStreamObject::implDumpRecordBody() } break; - case OOBIN_ID_PTREFERENCE: + case BIFF12_ID_PTREFERENCE: dumpDec< sal_Int32 >( "field", "PT-FIELDINDEX" ); dumpDec< sal_Int32 >( "item-count" ); dumpHex< sal_uInt16 >( "flags-1", "PTREFERENCE-FLAGS1" ); dumpHex< sal_uInt8 >( "flags-2", "PTREFERENCE-FLAGS2" ); break; - case OOBIN_ID_PTROWFIELDS: + case BIFF12_ID_PTROWFIELDS: dumpDec< sal_Int32 >( "count" ); mxOut->resetItemIndex(); while( mxStrm->getRemaining() >= 4 ) dumpDec< sal_Int32 >( "#field", "PT-FIELDINDEX" ); break; - case OOBIN_ID_ROW: + case BIFF12_ID_QUERYTABLE: + dumpHex< sal_uInt32 >( "flags", "QUERYTABLE-FLAGS" ); + dumpDec< sal_uInt16 >( "autoformat-id" ); + dumpDec< sal_Int32 >( "connection-id" ); + dumpString( "defined-name" ); + break; + + case BIFF12_ID_ROW: dumpRowIndex(); dumpDec< sal_Int32 >( "custom-xf-id" ); dumpDec< sal_uInt16 >( "height", "CONV-TWIP-TO-PT" ); @@ -1962,12 +2020,12 @@ void RecordStreamObject::implDumpRecordBody() dumpRowRange( "#row-spans" ); break; - case OOBIN_ID_ROWBREAKS: + case BIFF12_ID_ROWBREAKS: dumpDec< sal_Int32 >( "count" ); dumpDec< sal_Int32 >( "manual-count" ); break; - case OOBIN_ID_SCENARIO: + case BIFF12_ID_SCENARIO: dumpDec< sal_uInt16 >( "cell-count" ); // two longs instead of flag field dumpDec< sal_Int32 >( "locked", "BOOLEAN" ); @@ -1977,32 +2035,32 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "user" ); break; - case OOBIN_ID_SCENARIOS: + case BIFF12_ID_SCENARIOS: dumpDec< sal_uInt16 >( "selected" ); dumpDec< sal_uInt16 >( "shown" ); dumpRangeList( "result-cells" ); break; - case OOBIN_ID_SELECTION: + case BIFF12_ID_SELECTION: dumpDec< sal_Int32 >( "pane", "PANE-ID" ); dumpAddress( "active-cell" ); dumpDec< sal_Int32 >( "active-cell-id" ); dumpRangeList( "selection" ); break; - case OOBIN_ID_SHAREDFMLA: + case BIFF12_ID_SHAREDFMLA: dumpRange( "formula-range" ); mxFmlaObj->dumpCellFormula(); break; - case OOBIN_ID_SHEET: + case BIFF12_ID_SHEET: dumpDec< sal_Int32 >( "sheet-state", "SHEET-STATE" ); dumpDec< sal_Int32 >( "sheet-id" ); dumpString( "rel-id" ); dumpString( "sheet-name" ); break; - case OOBIN_ID_SHEETFORMATPR: + case BIFF12_ID_SHEETFORMATPR: dumpDec< sal_Int32 >( "default-col-width", "CONV-COLWIDTH" ); dumpDec< sal_uInt16 >( "base-col-width" ); dumpDec< sal_uInt16 >( "default-row-height", "CONV-TWIP-TO-PT" ); @@ -2011,7 +2069,7 @@ void RecordStreamObject::implDumpRecordBody() dumpDec< sal_uInt8 >( "max-col-outline" ); break; - case OOBIN_ID_SHEETPR: + case BIFF12_ID_SHEETPR: dumpHex< sal_uInt16 >( "flags1", "SHEETPR-FLAGS1" ); dumpHex< sal_uInt8 >( "flags2", "SHEETPR-FLAGS2" ); dumpColor( "tab-color" ); @@ -2019,7 +2077,7 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "codename" ); break; - case OOBIN_ID_SHEETPROTECTION: + case BIFF12_ID_SHEETPROTECTION: dumpHex< sal_uInt16 >( "password-hash" ); // no flags field for all these boolean flags?!? dumpDec< sal_Int32 >( "sheet-locked", "BOOLEAN" ); @@ -2040,7 +2098,7 @@ void RecordStreamObject::implDumpRecordBody() dumpDec< sal_Int32 >( "select-unlocked-cells-locked", "BOOLEAN" ); break; - case OOBIN_ID_SHEETVIEW: + case BIFF12_ID_SHEETVIEW: dumpHex< sal_uInt16 >( "flags", "SHEETVIEW-FLAGS" ); dumpDec< sal_Int32 >( "view-type", "SHEETVIEW-TYPE" ); dumpAddress( "top-left" ); @@ -2052,16 +2110,16 @@ void RecordStreamObject::implDumpRecordBody() dumpDec< sal_Int32 >( "workbookview-id" ); break; - case OOBIN_ID_SI: + case BIFF12_ID_SI: dumpString( "string", true ); break; - case OOBIN_ID_SST: + case BIFF12_ID_SST: dumpDec< sal_Int32 >( "string-cell-count" ); dumpDec< sal_Int32 >( "sst-size" ); break; - case OOBIN_ID_TABLE: + case BIFF12_ID_TABLE: dumpRange(); dumpDec< sal_Int32 >( "type", "TABLE-TYPE" ); dumpDec< sal_Int32 >( "id" ); @@ -2083,41 +2141,51 @@ void RecordStreamObject::implDumpRecordBody() dumpString( "totalsrow-cell-style" ); break; - case OOBIN_ID_TABLEPART: + case BIFF12_ID_TABLEPART: dumpString( "rel-id" ); break; - case OOBIN_ID_TABLESTYLEINFO: + case BIFF12_ID_TABLESTYLEINFO: dumpHex< sal_uInt16 >( "flags", "TABLESTYLEINFO-FLAGS" ); dumpString( "style-name" ); break; - case OOBIN_ID_TOP10FILTER: + case BIFF12_ID_TOP10FILTER: dumpHex< sal_uInt8 >( "flags", "TOP10FILTER-FLAGS" ); dumpDec< double >( "value" ); dumpDec< double >( "cell-value" ); break; - case OOBIN_ID_VOLTYPEMAIN: + case BIFF12_ID_VOLTYPEMAIN: dumpString( "first" ); break; - case OOBIN_ID_VOLTYPESTP: + case BIFF12_ID_VOLTYPESTP: dumpString( "topic-value" ); break; - case OOBIN_ID_VOLTYPETR: + case BIFF12_ID_VOLTYPETR: dumpAddress( "ref" ); dumpDec< sal_Int32 >( "sheet-id" ); break; - case OOBIN_ID_WORKBOOKPR: + case BIFF12_ID_WEBPR: + { + dumpHex< sal_uInt32 >( "flags", "WEBPR-FLAGS" ); + sal_uInt8 nStrFlags = dumpHex< sal_uInt8 >( "string-flags", "WEBPR-STRINGFLAGS" ); + if( nStrFlags & 0x04 ) dumpString( "url" ); + if( nStrFlags & 0x01 ) dumpString( "post-method" ); + if( nStrFlags & 0x02 ) dumpString( "edit-page" ); + } + break; + + case BIFF12_ID_WORKBOOKPR: dumpHex< sal_uInt32 >( "flags", "WORKBBOKPR-FLAGS" ); dumpDec< sal_Int32 >( "default-theme-version" ); dumpString( "codename" ); break; - case OOBIN_ID_WORKBOOKVIEW: + case BIFF12_ID_WORKBOOKVIEW: dumpDec< sal_Int32 >( "x-window" ); dumpDec< sal_Int32 >( "y-window" ); dumpDec< sal_Int32 >( "win-width" ); @@ -2128,7 +2196,7 @@ void RecordStreamObject::implDumpRecordBody() dumpHex< sal_uInt8 >( "flags", "WORKBOOKVIEW-FLAGS" ); break; - case OOBIN_ID_XF: + case BIFF12_ID_XF: dumpDec< sal_uInt16 >( "parent-xf-id" ); dumpDec< sal_uInt16 >( "numfmt-id" ); dumpDec< sal_uInt16 >( "font-id", "FONTNAMES" ); @@ -2219,6 +2287,7 @@ void RootStorageObject::implDumpStream( const BinaryInputStreamRef& rxStrm, cons rStrgPath.equalsAscii( "xl/macrosheets" ) || rStrgPath.equalsAscii( "xl/pivotCache" ) || rStrgPath.equalsAscii( "xl/pivotTables" ) || + rStrgPath.equalsAscii( "xl/queryTables" ) || rStrgPath.equalsAscii( "xl/tables" ) || rStrgPath.equalsAscii( "xl/worksheets" ) ) { @@ -2269,4 +2338,3 @@ void Dumper::implDump() } // namespace oox #endif - diff --git a/oox/source/dump/xlsbdumper.ini b/oox/source/dump/xlsbdumper.ini index f2ac3b49b4d6..3490111c4ba5 100644 --- a/oox/source/dump/xlsbdumper.ini +++ b/oox/source/dump/xlsbdumper.ini @@ -174,18 +174,20 @@ multilist=RECORD-NAMES 0x0088=BOOKVIEWS_END,SHEETVIEW,SHEETVIEW_END,CHARTSHEETVIEWS,CHARTSHEETVIEWS_END,CHARTSHEETVIEW,CHARTSHEETVIEW_END,SHEETS 0x0090=SHEETS_END,SHEETDATA,SHEETDATA_END,SHEETPR,DIMENSION,,,PANE 0x0098=SELECTION,WORKBOOKPR,SMARTTAGPR,FILERECOVERYPR,SHEET,CALCPR,WORKBOOKVIEW,SST - 0x00A0=SST_END,AUTOFILTER,AUTOFILTER_END,FILTERCOLUMN,FILTERCOLUMN_END,FILTERS,FILTERS_END,FILTER - 0x00A8=COLORFILTER,ICONFILTER,TOP10FILTER,DYNAMICFILTER,CUSTOMFILTERS,CUSTOMFILTERS_END,CUSTOMFILTER,AUTOFILTERDATEGROUPITEM + 0x00A0=SST_END,AUTOFILTER,AUTOFILTER_END,FILTERCOLUMN,FILTERCOLUMN_END,DISCRETEFILTERS,DISCRETEFILTERS_END,DISCRETEFILTER + 0x00A8=COLORFILTER,ICONFILTER,TOP10FILTER,DYNAMICFILTER,CUSTOMFILTERS,CUSTOMFILTERS_END,CUSTOMFILTER,AFDATEGROUPITEM 0x00B0=MERGECELL,MERGECELLS,MERGECELLS_END,PCDEFINITION,PCDEFINITION_END,PCDFIELDS,PCDFIELDS_END,PCDFIELD 0x00B8=PCDFIELD_END,PCDSOURCE,PCDSOURCE_END,PCDSHEETSOURCE,PCDSHEETSOURCE_END,PCDFSHAREDITEMS,PCDFSHAREDITEMS_END,PCITEM_ARRAY 0x00C0=PCITEM_ARRAY_END,PCRECORDS,PCRECORDS_END,,,,, + 0x00C8=,CONNECTION,CONNECTION_END,,,,, 0x00D8=,,,PCDFIELDGROUP,PCDFIELDGROUP_END,PCDFGROUPITEMS,PCDFGROUPITEMS_END,PCDFRANGEPR 0x00E0=PCDFRANGEPR_END,PCDFDISCRETEPR,PCDFDISCRETEPR_END,,,,, 0x00F0=,,,,,,,PIVOTAREA 0x00F8=PIVOTAREA_END,PTREFERENCES,PTREFERENCES_END,PTREFERENCE,PTREFERENCE_END,,, - + 0x0100=,,,,,WEBPR,WEBPR_END,WEBPRTABLES + 0x0108=WEBPRTABLES_END,,,,,,, 0x0110=,,,,,BINARYINDEX_END,STYLESHEET,STYLESHEET_END 0x0118=PTDEFINITION,PTFITEM_END,PTFITEM,PTFITEMS,PTFITEMS_END,PTFIELD,PTFIELD_END,PTFIELDS 0x0120=PTFIELDS_END,PTPAGEFIELD,PTPAGEFIELD_END,PTPAGEFIELDS,PTPAGEFIELDS_END,PTDATAFIELD,PTDATAFIELD_END,PTDATAFIELDS @@ -203,8 +205,10 @@ multilist=RECORD-NAMES 0x0188=ROWBREAKS,ROWBREAKS_END,COLBREAKS,COLBREAKS_END,BRK,CUSTOMWORKBOOKVIEW,, 0x01A0=,,,,,,CUSTOMSHEETVIEWS,CUSTOMSHEETVIEW - 0x01A8=CUSTOMSHEETVIEW_END,CUSTOMSHEETVIEWS_END,ARRAY,SHAREDFMLA,DATATABLE,,, + 0x01A8=CUSTOMSHEETVIEW_END,CUSTOMSHEETVIEWS_END,ARRAY,SHAREDFMLA,DATATABLE,CONNECTIONS,CONNECTIONS_END, + 0x01B8=,,,,,,,QUERYTABLE + 0x01C0=QUERYTABLE_END,QUERYTABLEREFRESH,QUERYTABLEREFRESH_END,,,,, 0x01C8=,,,AUTOSORTSCOPE,AUTOSORTSCOPE_END,CONDFORMATTING,CONDFORMATTING_END,CFRULE 0x01D0=CFRULE_END,ICONSET,ICONSET_END,DATABAR,DATABAR_END,COLORSCALE,COLORSCALE_END,CFVO 0x01D8=,COLORS,COLORS_END,RGBCOLOR,PAGEMARGINS,PRINTOPTIONS,PAGESETUP,HEADERFOOTER @@ -238,11 +242,13 @@ end constlist=SIMPLE-RECORDS 0x001A=int32,dec,item-index + 0x00AC=int32,dec,relation,CUSTOMFILTERS-RELATION 0x00B5=int32,dec,count 0x00C1=int32,dec,count 0x00DD=int32,dec,count 0x00E1=int32,dec,count 0x00F9=int32,dec,count + 0x0107=int32,dec,count 0x011B=int32,dec,count 0x011F=int32,dec,count 0x0123=int32,dec,count @@ -374,6 +380,48 @@ combilist=COL-FLAGS 0x1000=outline-collapsed end +# CONNECTION ----------------------------------------------------------------- + +shortlist=CONNECTION-SAVEPASSWORD,1,on,off +unitconverter=CONNECTION-INTERVAL,60,sec +shortlist=CONNECTION-SOURCETYPE,1,odbc,dao,file,html,ole-db,text,ado,dsp +shortlist=CONNECTION-RECONNECTTYPE,1,as-required,always,never +shortlist=CONNECTION-CREDENTIALS,0,integrated,none,stored-sso,prompt + +flagslist=CONNECTION-FLAGS + 0x0001=keep-alive + 0x0002=new + 0x0004=deleted + 0x0008=only-use-conn-file + 0x0010=background + 0x0020=refresh-on-load + 0x0040=save-data +end + +flagslist=CONNECTION-STRINGFLAGS + 0x0001=has-source-file + 0x0002=has-source-conn-file + 0x0004=has-description + 0x0008=has-name + 0x0010=has-sso-id +end + +# CUSTOMFILTER --------------------------------------------------------------- + +constlist=CUSTOMFILTER-DATATYPE + 4=double + 6=string + 8=boolean + 12=blank + 14=not-blank +end + +shortlist=CUSTOMFILTER-OPERATOR,1,less,equal,less-equal,greater,not-equal,greater-equal + +# CUSTOMFILTERS -------------------------------------------------------------- + +shortlist=CUSTOMFILTERS-RELATION,0,and,or + # DATATABLE ------------------------------------------------------------------ flagslist=DATATABLE-FLAGS @@ -428,6 +476,10 @@ constlist=DEFINEDNAME-SHEETID -1=global end +# DISCRETEFILTERS -------------------------------------------------------------------- + +shortlist=DISCRETEFILTERS-CALTYPE,0,none,gregorian,gregorian-us,japan,taiwan,korea,hijri,thai,hebrew,gregorian-mideast-fr,gregorian-ar,gregorian-xlit-en,gregorian-xlit-fr + # DXF ------------------------------------------------------------------------ flagslist=DXF-FLAGS @@ -478,6 +530,13 @@ end shortlist=FILL-GRADIENTTYPE,0,linear,path +# FILTERCOLUMN --------------------------------------------------------------- + +flagslist=FILTERCOLUMN-FLAGS + 0x0001=hidden-button + 0x0002=show-button +end + # FONT ----------------------------------------------------------------------- flagslist=FONT-FLAGS @@ -741,7 +800,7 @@ flagslist=PTDEFINITION-FLAGS3 0x00004000=col-grand-totals 0x00008000=field-print-titles 0x00020000=item-print-titles - 0x00040000=merge-labels + 0x00040000=merge-item 0x00080000=has-data-caption 0x00100000=has-grand-total-caption 0x00200000=has-page-field-style @@ -751,8 +810,8 @@ flagslist=PTDEFINITION-FLAGS3 0x02000000=apply-font 0x04000000=apply-alignment 0x08000000=apply-border - 0x10000000=apply-pattern - 0x20000000=protected + 0x10000000=apply-fill + 0x20000000=apply-protection 0x40000000=has-tag end @@ -905,6 +964,32 @@ flagslist=PTREFERENCE-FLAGS2 0x01=selected end +# QUERYTABLE ----------------------------------------------------------------- + +combilist=QUERYTABLE-FLAGS + 0x00000001=headers + 0x00000002=row-numbers + 0x00000004=disable-refresh + 0x00000008=background + 0x00000010=first-background + 0x00000020=refresh-on-load + 0x000000C0=uint8,dec,grow-shrink,QUERYTABLE-GROWSHRINK + 0x00000100=fill-formulas + 0x00000200=save-data + 0x00000400=disable-edit + 0x00000800=preserve-formatting + 0x00001000=adjust-column-width + 0x00002000=intermediate + 0x00004000=apply-num-fmt + 0x00008000=apply-font + 0x00010000=apply-alignment + 0x00020000=apply-border + 0x00040000=apply-fill + 0x00080000=apply-protection +end + +shortlist=QUERYTABLE-GROWSHRINK,0,insert-clear,insert-delete,overwrite-clear + # ROW ------------------------------------------------------------------------ combilist=ROW-FLAGS1 @@ -1012,6 +1097,29 @@ end shortlist=VOLTYPE-TYPE,0,realtime-data,olap-functions +# WEBPR ---------------------------------------------------------------------- + +combilist=WEBPR-FLAGS + 0x000000FF=uint8,dec,html-format,WEBPR-HTMLFORMAT + 0x00000100=xml + 0x00000200=source-data + 0x00000400=parse-pre + 0x00000800=consecutive-delimiters + 0x00001000=first-row + 0x00002000=xl97-created + 0x00004000=text-dates + 0x00008000=xl2000-refreshed + 0x00010000=html-tables +end + +shortlist=WEBPR-HTMLFORMAT,0,none,rtf,all + +flagslist=WEBPR-STRINGFLAGS + 0x01=has-post-method + 0x02=has-edit-page + 0x04=has-url +end + # WORKBBOKPR ----------------------------------------------------------------- combilist=WORKBBOKPR-FLAGS @@ -1076,4 +1184,3 @@ flagslist=XF-USEDFLAGS end # ============================================================================ - |