ooo-build r15242 - trunk/patches/test
- From: noelpwer svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r15242 - trunk/patches/test
- Date: Thu, 29 Jan 2009 18:21:59 +0000 (UTC)
Author: noelpwer
Date: Thu Jan 29 18:21:59 2009
New Revision: 15242
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15242&view=rev
Log:
latest changes, more print of read data, more fixing of dumb logic and
misreading of spec.
Modified:
trunk/patches/test/word-read-custom-toolbar-filter.diff
Modified: trunk/patches/test/word-read-custom-toolbar-filter.diff
==============================================================================
--- trunk/patches/test/word-read-custom-toolbar-filter.diff (original)
+++ trunk/patches/test/word-read-custom-toolbar-filter.diff Thu Jan 29 18:21:59 2009
@@ -14,7 +14,7 @@
# --- Tagets -------------------------------------------------------
diff --git sw/source/filter/ww8/ww8par.cxx sw/source/filter/ww8/ww8par.cxx
-index a7f122b..c9a478b 100644
+index a7f122b..d1a582c 100644
--- sw/source/filter/ww8/ww8par.cxx
+++ sw/source/filter/ww8/ww8par.cxx
@@ -142,11 +142,12 @@
@@ -62,7 +62,7 @@
+ rTableStream->Seek( pWwFib->fcCmds ); // point at tgc record
+ aTCG.Read( rTableStream );
+ rTableStream->Seek( nCur ); // return to previous position
-+ //aTCG.Print( stderr ); // print routines not chained yet
++ aTCG.Print( stderr );
+ }
+ }
+#endif
@@ -70,8 +70,8 @@
pTableStream->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
--- /dev/null 2008-04-22 00:28:44.000000000 +0100
-+++ sw/source/filter/ww8/ww8toolbar.hxx 2009-01-28 17:48:04.000000000 +0000
-@@ -0,0 +1,421 @@
++++ sw/source/filter/ww8/ww8toolbar.hxx 2009-01-29 17:40:04.000000000 +0000
+@@ -0,0 +1,489 @@
+#ifndef _WW8TOOLBAR_HXX
+#define _WW8TOOLBAR_HXX
+
@@ -96,6 +96,7 @@
+ Xst(){}
+ bool Read(SotStorageStream *pS);
+ rtl::OUString getString() { return sString; }
++ void Print( FILE* fp );
+};
+
+class WString : public TBBase
@@ -127,6 +128,7 @@
+ TBCExtraInfo();
+ ~TBCExtraInfo(){}
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class TBCGeneralInfo : public TBBase
@@ -143,10 +145,12 @@
+ TBCGeneralInfo();
+ ~TBCGeneralInfo() {}
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class TBCBitMap : public TBBase
+{
++friend class TBCSpecific; // #FIXME hacky access, need to fix
+ sal_Int32 cbDIB;
+// BITMapInfoHeader biHeader; // lets cheat and not read the bit map stuff right now
+ sal_uInt8* pRestOfIt;
@@ -156,6 +160,7 @@
+ TBCBitMap();
+ ~TBCBitMap();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class TBCSpecific : public TBBase
@@ -172,23 +177,49 @@
+ TBCSpecific();
+ ~TBCSpecific(){}
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
++/* TBCHeader.tct controlSpecificInfo type
++
++0x01 (Button control) TBCBSpecific
++0x10 (ExpandingGrid control) TBCBSpecific
++0x0A (Popup control) TBCMenuSpecific
++0x0C (ButtonPopup control) TBCMenuSpecific
++0x0D (SplitButtonPopup control) TBCMenuSpecific
++0x0E (SplitButtonMRUPopup control) TBCMenuSpecific
++0x02 (Edit control) TBCComboDropdow nSpecific
++0x04 (ComboBox control) TBCComboDropdow nSpecific
++0x14 (GraphicCombo control) TBCComboDropdow nSpecific
++0x03 (DropDown control) TBCComboDropdow nSpecific
++0x06 (SplitDropDown control) TBCComboDropdow nSpecific
++0x09 (GraphicDropDown control) TBCComboDropdow nSpecific
++0x07 (OCXDropDown control) controlSpecificInfo MUST NOT exist
++0x0F (Label control) controlSpecificInfo MUST NOT exist
++0x12 (Grid control) controlSpecificInfo MUST NOT exist
++0x13 (Gauge control) controlSpecificInfo MUST NOT exist
++0x16 (ActiveX control) controlSpecificInfo MUST NOT exist
++
++*/
++class TBCHeader;
+class TBCData : public TBBase
+{
++ const TBCHeader& rHeader;
+ TBCGeneralInfo controlGeneralInfo;
+ TBCSpecific controlSpecificInfo; // can be one of TBCSpecific, TBCMenuSpecific or TBCComboDropdow nSpecific depending on the control type specified by TBCHeader.tct ( initially lets just implement TBCSpecific
+ TBCData(const TBCData&);
+ TBCData& operator = ( const TBCData&);
+public:
-+ TBCData(){}
++ TBCData( const TBCHeader& Header ) : rHeader( Header ) {}
+ ~TBCData(){}
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class TBCHeader : public TBBase
+{
+friend class TBC;
++friend class TBCData;
+ sal_Int8 bSignature;
+ sal_Int8 bVersion;
+ sal_uInt8 bFlagsTCR;
@@ -205,6 +236,7 @@
+ TBCHeader();
+ ~TBCHeader();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class TBC : public TBBase
@@ -218,12 +250,33 @@
+ TBC();
+ ~TBC();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
++};
++
++class TB : public TBBase
++{
++ sal_Int8 bSignature; //Signed integer that specifies the toolbar signature number. MUST be 0x02.
++ sal_Int8 bVersion; //Signed integer that specifies the toolbar version number. MUST be 0x01.
++ sal_Int16 cCL; //Signed integer that SHOULD specify the number of toolbar controls contained in this toolbar.
++ sal_Int32 ltbid; //Signed integer that specifies the toolbar ID. MUST be 0x0001 (custom toolbar ID).
++ sal_uInt32 ltbtr; //Unsigned integer of type TBTRFlags that specifies the toolbar type and toolbar restrictions.
++ sal_uInt16 cRowsDefault; //Unsigned integer that specifies the number of preferred rows for the toolbar when the toolbar is not docked. MUST be less than or equal to 255.
++ sal_uInt16 bFlags; //Unsigned integer of type TBFlags.
++ WString name; //Structure of type WString that specifies the toolbar name.
++ TB(const TB&);
++ TB& operator = ( const TB&);
++public:
++ TB();
++ ~TB(){}
++ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
++
+class CTB : public TBBase
+{
+ Xst name;
+ sal_Int32 cbTBData;
-+ sal_uInt8* tb; // array of toolbar data ( currently not read )
++ TB tb; // array of toolbar data ( currently not read )
+ sal_uInt8 rVisualData[ 100 ];
+ sal_Int32 iWCTBl;
+ sal_uInt16 reserved;
@@ -237,6 +290,7 @@
+ CTB();
+ ~CTB();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* fp );
+};
+
+class TBDelta : TBBase
@@ -286,6 +340,7 @@
+ Customization();
+ ~Customization();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class CTBWrapper : public Tcg255SubStruct
@@ -331,6 +386,7 @@
+ MCD();
+ ~MCD(){}
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class PlfMcd : public Tcg255SubStruct
@@ -343,6 +399,7 @@
+ PlfMcd( bool bReadId = true );
+ ~PlfMcd();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class Acd : public TBBase
@@ -355,6 +412,7 @@
+ Acd();
+ ~Acd(){}
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class PlfAcd: public Tcg255SubStruct
@@ -367,6 +425,7 @@
+ PlfAcd( bool bReadId = true );
+ ~PlfAcd();
+ bool Read(SotStorageStream *pS);
++ void Print(FILE*);
+};
+
+class Kme : public TBBase
@@ -384,6 +443,7 @@
+ Kme();
+ ~Kme();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class PlfKme : public Tcg255SubStruct
@@ -396,6 +456,7 @@
+ PlfKme( bool bReadId = true );
+ ~PlfKme();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class TcgSttbfCore : public TBBase
@@ -403,7 +464,7 @@
+struct SBBItem
+{
+ sal_uInt16 cchData;
-+ rtl::OUString data; // maybe substitute with a string
++ rtl::OUString data;
+ sal_uInt16 extraData;
+ SBBItem() : cchData(0), extraData(0){}
+};
@@ -417,6 +478,7 @@
+ TcgSttbfCore();
+ ~TcgSttbfCore();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* fp );
+};
+
+class TcgSttbf : public Tcg255SubStruct
@@ -428,6 +490,7 @@
+ TcgSttbf( bool bReadId = true );
+ ~TcgSttbf(){}
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* fp );
+};
+
+class Xstz : public TBBase
@@ -441,6 +504,7 @@
+ Xstz();
+ ~Xstz(){}
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* fp );
+};
+
+class MacroName : public TBBase
@@ -453,6 +517,7 @@
+ MacroName();
+ ~MacroName(){}
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class MacroNames : public Tcg255SubStruct
@@ -466,6 +531,7 @@
+ MacroNames( bool bReadId = true );
+ ~MacroNames();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class Tcg255 : public TBBase
@@ -478,6 +544,7 @@
+ Tcg255();
+ ~Tcg255();
+ bool Read(SotStorageStream *pS);
++ void Print( FILE* );
+};
+
+class Tcg: public TBBase
@@ -492,10 +559,11 @@
+ bool Read(SotStorageStream *pS);
+ void Print( FILE* );
+};
++
+#endif
--- /dev/null 2008-04-22 00:28:44.000000000 +0100
-+++ sw/source/filter/ww8/ww8toolbar.cxx 2009-01-28 18:11:23.000000000 +0000
-@@ -0,0 +1,679 @@
++++ sw/source/filter/ww8/ww8toolbar.cxx 2009-01-29 18:02:16.000000000 +0000
+@@ -0,0 +1,978 @@
+#include "ww8toolbar.hxx"
+#include <rtl/ustrbuf.hxx>
+
@@ -554,8 +622,6 @@
+ return false;
+ }
+ }
-+ OSL_TRACE("Cheating debug, call Print directly 'cause its not tied into the top level classes yet" );
-+ Print( stderr );
+ return true;
+}
+
@@ -577,10 +643,16 @@
+ }
+ fprintf(fp," cbTBD: no. of TBDelta structures ( skipped if present ) 0x%x\n", cbTBD );
+ fprintf(fp," cCust: no. of cCust structures 0x%x\n",cCust);
-+ fprintf(fp," cbDTBC: no. of bytes in rtbdc array 0x%x\n",cbDTBC);
++ fprintf(fp," cbDTBC: no. of bytes in rtbdc array 0x%x\n", static_cast< unsigned int >( cbDTBC ));
+ fprintf(fp," .... skipping rtbdc\n");
+ if ( rCustomizations )
-+ rCustomizations->Print( fp );
++ {
++ for ( sal_Int32 index = 0; index < cCust; ++index )
++ {
++ fprintf(fp," Dumping custimization [%d]\n", static_cast< int >( index ));
++ rCustomizations[ index ].Print(fp);
++ }
++ }
+}
+Customization::Customization() : tbidForTBD( 0 )
+,reserved1( 0 )
@@ -593,7 +665,7 @@
+Customization::~Customization()
+{
+ if ( customizationDataCTB )
-+ delete [] customizationDataCTB;
++ delete customizationDataCTB;
+/* we don't read TBDelta structures yet
+ if ( customizationDataTBDelta )
+ delete [] customizationDataTBDelta;
@@ -605,18 +677,29 @@
+ *pS >> tbidForTBD >> reserved1 >> ctbds;
+ if ( tbidForTBD ) //TBDelta - which we don't read yet
+ return false;
-+ if ( ctbds )
++ if ( !ctbds ) // should be 0 for CTB
+ {
-+ customizationDataCTB = new CTB[ ctbds ];
-+ for ( sal_Int32 index=0; index < ctbds; ++index )
-+ {
-+ if ( !customizationDataCTB[ index ].Read( pS ) )
++ customizationDataCTB = new CTB();
++ if ( !customizationDataCTB->Read( pS ) )
+ return false;
-+ }
+ }
+ return true;
+}
+
++void Customization::Print( FILE* fp )
++{
++ fprintf( fp,"Customization -- dump \n");
++ fprintf( fp," tbidForTBD 0x%x ( should be 0 for CTBs )\n", static_cast< unsigned int >( tbidForTBD ));
++ fprintf( fp," reserved1 0x%x \n", reserved1);
++ fprintf( fp," ctbds - number of customisations %d(0x%x) \n", ctbds, ctbds );
++ if ( !tbidForTBD && !ctbds )
++ customizationDataCTB->Print( fp );
++ else
++ fprintf( fp," quiting... we don't handle TBDelta's yet\n" );
++
++
++}
++
+TBDelta::TBDelta() : doprfatendFlags(0)
+,ibts(0)
+,cidNext(0)
@@ -635,7 +718,6 @@
+}
+
+CTB::CTB() : cbTBData( 0 )
-+,tb( 0 )
+,iWCTBl( 0 )
+,reserved( 0 )
+,unused( 0 )
@@ -646,21 +728,18 @@
+
+CTB::~CTB()
+{
-+ if ( tb )
-+ delete [] tb;
+ if ( rTBC )
+ delete [] rTBC;
+}
+
+bool CTB::Read( SotStorageStream *pS)
+{
-+
+ if ( !name.Read( pS ) )
+ return false;
+ *pS >> cbTBData;
-+ sal_Int32 nTBSize = cbTBData - sizeof(rVisualData) - 12;
-+ if ( nTBSize )
-+ tb = new sal_uInt8[ nTBSize ];
++ // sal_Int32 nTBSize = cbTBData - sizeof(rVisualData) - 12;
++ if ( !tb.Read( pS ) )
++ return false;
+ pS->Read( &rVisualData, sizeof( rVisualData ) );
+
+ *pS >> iWCTBl >> reserved >> unused >> cCtls;
@@ -677,6 +756,50 @@
+ return true;
+}
+
++void
++CTB::Print( FILE* fp )
++{
++ fprintf(fp, "CTB - dump\n");
++ fprintf(fp, " name %s\n", rtl::OUStringToOString( name.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++ fprintf(fp, " cbTBData size, in bytes, of this structure excluding the name, cCtls, and rTBC fields. %x\n", static_cast< unsigned int >( cbTBData ) );
++
++ tb.Print(fp);
++ fprintf(fp, " iWCTBl 0x%x reserved 0x%x unused 0x%x cCtls( toolbar controls ) 0x%x \n", static_cast< unsigned int >( iWCTBl ), reserved, unused, static_cast< unsigned int >( cCtls ) );
++ if ( cCtls )
++ {
++ for ( sal_Int32 index = 0; index < cCtls; ++index )
++ {
++
++ fprintf(fp, " dumping toolbar control 0x%x\n", static_cast< unsigned int >( index ) );
++ rTBC[ index ].Print( fp );
++ }
++ }
++}
++
++TB::TB() : bSignature( 0 )
++,bVersion( 0 )
++,cCL( 0 )
++,ltbid( 0 )
++,ltbtr( 0 )
++,cRowsDefault( 0 )
++,bFlags( 0 )
++{
++}
++
++bool TB::Read( SotStorageStream* pS )
++{
++ *pS >> bSignature >> bVersion >> cCL >> ltbid >> ltbtr >> cRowsDefault >> bFlags;
++ return name.Read( pS );
++}
++
++void TB::Print( FILE* fp )
++{
++ fprintf( fp, "TB -- dump\n");
++ fprintf( fp, " bSignature (0x%x), bVersion(0x%x), cCL(0x%x), ltbid(0x%x), cRowsDefault (0x%x), ltbtr(0x%x), bFlags(0x%x)\n", bSignature, bVersion, cCL, static_cast< unsigned int >( ltbid ), static_cast< unsigned int >( ltbtr ), cRowsDefault, bFlags );
++ fprintf( fp, " name %s\n", rtl::OUStringToOString( name.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++
++}
++
+TBC::TBC() : cid( 0 )
+{
+}
@@ -699,13 +822,27 @@
+ // MUST exist if tbch.tct is not equal to 0x16
+ if ( tbch.tct != 0x16 )
+ {
-+ tbcd.reset( new TBCData() );
++ tbcd.reset( new TBCData( tbch ) );
+ if ( !tbcd->Read( pS ) )
+ return false;
+ }
+ return true;
+}
+
++void TBC::Print( FILE* fp )
++{
++ fprintf(fp,"TCB -- dump\n");
++ fprintf(fp," dumping header ( TBCHeader )\n");
++ tbch.Print( fp );
++ if ( cid )
++ fprintf(fp," cid = 0x%x\n", static_cast< unsigned int >( *cid ) );
++ if ( tbcd.get() )
++ {
++ fprintf(fp," dumping toolbar data TBCData \n");
++ tbcd->Print(fp);
++ }
++}
++
+TBCHeader::TBCHeader() : bSignature( 0x3 )
+,bVersion( 0x01 )
+,bFlagsTCR( 0 )
@@ -739,12 +876,38 @@
+ return true;
+}
+
++void TBCHeader::Print( FILE* fp )
++{
++ fprintf(fp,"TBCHeader -- dump\n");
++ fprintf(fp," bSignature 0x%x\n bVersion 0x%x\n bFlagsTCR 0x%x\n", bSignature, bVersion, bFlagsTCR );
++ fprintf(fp," tct 0x%x\n tcid 0x%x\n tbct 0x%x\n bPriority 0x%x\n", tct, tcid, static_cast< unsigned int >( tbct ), bPriority );
++ if ( width )
++ fprintf(fp," width 0x%d(0x%x)\n", *width, *width);
++ if ( height )
++ fprintf(fp," height 0x%d(0x%x)\n", *height, *height);
++}
+
+bool TBCData::Read(SotStorageStream *pS)
+{
+ if ( !controlGeneralInfo.Read(pS) /*|| !controlSpecificInfo.Read(pS)*/ )
+ return false;
-+ return true;
++ if ( rHeader.tct == 1 )
++ return controlSpecificInfo.Read( pS );
++
++ OSL_TRACE("#FIXME I need to be able to handle different controlSpecificInfo types.");
++ return false;
++}
++
++void TBCData::Print( FILE* fp )
++{
++ fprintf(fp,"TBCData -- dump\n");
++ fprintf(fp," dumping controlGeneralInfo( TBCGeneralInfo )\n");
++ controlGeneralInfo.Print( fp );
++ if ( rHeader.tct == 1 )
++ {
++ fprintf(fp," dumping controlSpecificInfo( TBCSpecificInfo )\n");
++ controlSpecificInfo.Print( fp );
++ }
+}
+
+bool
@@ -765,6 +928,12 @@
+ return true;
+}
+
++void
++Xst::Print( FILE* fp )
++{
++ fprintf( fp, "Xst -- dump\n");
++ fprintf( fp, " %s", rtl::OUStringToOString( sString, RTL_TEXTENCODING_UTF8 ).getStr() );
++}
+TBCExtraInfo::TBCExtraInfo() : idHelpContext( 0 )
+{
+}
@@ -784,6 +953,24 @@
+ return true;
+}
+
++void
++TBCExtraInfo::Print( FILE* fp )
++{
++ fprintf( fp, "TBCExtraInfo -- dump\n");
++ fprintf( fp, " wstrHelpFile %s\n",
++ rtl::OUStringToOString( wstrHelpFile.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++ fprintf( fp, " idHelpContext 0x%x\n", static_cast< unsigned int >( idHelpContext ) );
++ fprintf( fp, " wstrTag %s\n",
++ rtl::OUStringToOString( wstrTag.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++ fprintf( fp, " wstrOnAction %s\n",
++ rtl::OUStringToOString( wstrOnAction.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++ fprintf( fp, " wstrParam %s\n",
++ rtl::OUStringToOString( wstrParam.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++ fprintf( fp, " tbcu 0x%x\n", tbcu );
++ fprintf( fp, " tbmg 0x%x\n", tbmg );
++
++}
++
+TBCGeneralInfo::TBCGeneralInfo() : bFlags( 0 )
+{
+}
@@ -792,11 +979,25 @@
+{
+ *pS >> bFlags;
+ if ( !customText.Read( pS ) || !descriptionText.Read( pS ) || !tooltip.Read( pS )
-+ || extraInfo.Read( pS ) )
++ || !extraInfo.Read( pS ) )
+ return false;
+ return true;
+}
+
++void
++TBCGeneralInfo::Print( FILE* fp )
++{
++ fprintf( fp, "TBCGeneralInfo -- dump\n");
++ fprintf( fp, " bFlags 0x%x\n", bFlags );
++ fprintf( fp, " customText %s\n",
++ rtl::OUStringToOString( customText.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++ fprintf( fp, " description %s\n",
++ rtl::OUStringToOString( descriptionText.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++ fprintf( fp, " tooltip %s\n",
++ rtl::OUStringToOString( tooltip.getString(), RTL_TEXTENCODING_UTF8 ).getStr() );
++ extraInfo.Print( fp );
++}
++
+TBCSpecific::TBCSpecific() : bFlags( 0 )
+{
+}
@@ -830,6 +1031,25 @@
+ return true;
+}
+
++
++void TBCSpecific::Print( FILE* fp )
++{
++ fprintf( fp, "TBCSpecific -- dump\n");
++ fprintf( fp, " bFlags 0x%x\n", bFlags );
++ bool bResult = ( icon.get() != NULL );
++ fprintf( fp, " icon present? %s\n", bResult ? "true" : "false" );
++ if ( bResult )
++ icon->Print( fp ); // will dump size
++ bResult = ( iconMask.get() != NULL );
++ fprintf( fp, " icon mask present? %s\n", bResult ? "true" : "false" );
++ if ( bResult )
++ iconMask->Print( fp ); // will dump size
++ if ( iBtnFace.get() )
++ fprintf( fp, " iBtnFace 0x%x\n", *(iBtnFace.get()) );
++ bResult = ( wstrAcc.get() != NULL );
++ fprintf( fp, " option string present? %s ->%s<-\n", bResult ? "true" : "false", bResult ? rtl::OUStringToOString( wstrAcc->getString(), RTL_TEXTENCODING_UTF8 ).getStr() : "N/A" );
++}
++
+TBCBitMap::TBCBitMap() : cbDIB( 0 ), pRestOfIt( NULL )
+{
+}
@@ -851,6 +1071,12 @@
+ return true;
+}
+
++void TBCBitMap::Print( FILE* fp )
++{
++ fprintf(fp, "TBCBitMap -- dump\n");
++ fprintf(fp, " TBCBitMap size of bitmap data 0x%x\n", static_cast< unsigned int > ( cbDIB ) );
++}
++
+Tcg::Tcg() : nTcgVer( 255 )
+{
+}
@@ -866,7 +1092,9 @@
+
+void Tcg::Print( FILE* fp )
+{
-+ // fprint("
++ fprintf(fp, "Tcg - dump %d\n", nTcgVer);
++ fprintf(fp," nTcgVer %d\n", nTcgVer);
++ tcg->Print( fp );
+}
+
+Tcg255::Tcg255()
@@ -941,6 +1169,21 @@
+ // Peek at
+}
+
++void Tcg255::Print( FILE* fp)
++{
++ fprintf(fp, "Tcg255 - dump\n");
++ fprintf(fp, " contains %d sub records\n", rgtcgData.size() );
++ std::vector< Tcg255SubStruct* >::iterator it = rgtcgData.begin();
++ std::vector< Tcg255SubStruct* >::iterator it_end = rgtcgData.end();
++
++ for( sal_Int32 count = 1; it != it_end ; ++it, ++count )
++ {
++ fprintf(fp, "[%d] \n", static_cast< unsigned int >( count ) );
++ (*it)->Print(fp);
++ }
++}
++
++
+Tcg255SubStruct::Tcg255SubStruct( bool bReadId ) : mbReadId( bReadId ), ch(0)
+{
+}
@@ -968,7 +1211,7 @@
+ if ( iMac )
+ {
+ rgmcd = new MCD[ iMac ];
-+ for ( sal_Int32 index; index < iMac; ++index )
++ for ( sal_Int32 index = 0; index < iMac; ++index )
+ {
+ if ( !rgmcd[ index ].Read( pS ) )
+ return false;
@@ -977,6 +1220,18 @@
+ return true;
+}
+
++void PlfMcd::Print( FILE* fp )
++{
++ fprintf(fp, "PlfMcd ( Tcg255SubStruct ) - dump\n");
++ fprintf(fp, " contains %d MCD records\n", static_cast<int>( iMac ) );
++ for ( sal_Int32 count=0; count < iMac; ++count )
++ {
++ fprintf(fp, "[%d] MCD\n", static_cast< int >( count ) );
++ rgmcd[ count ].Print( fp );
++ }
++
++}
++
+PlfAcd::PlfAcd( bool bReadId ) : Tcg255SubStruct( bReadId )
+,iMac(0)
+,rgacd(NULL)
@@ -1005,6 +1260,17 @@
+ }
+ return true;
+}
++void PlfAcd::Print( FILE* fp )
++{
++ fprintf(fp, "PlfAcd ( Tcg255SubStruct ) - dump\n");
++ fprintf(fp, " contains %d ACD records\n", static_cast< int >( iMac ) );
++ for ( sal_Int32 count=0; count < iMac; ++count )
++ {
++ fprintf(fp, "[%d] ACD\n", static_cast< int >( count ) );
++ rgacd[ count ].Print( fp );
++ }
++
++}
+
+PlfKme::PlfKme( bool bReadId ) : Tcg255SubStruct( bReadId )
+,iMac( 0 )
@@ -1033,6 +1299,18 @@
+ }
+ return true;
+}
++
++void PlfKme::Print( FILE* fp )
++{
++ fprintf(fp, "PlfKme ( Tcg255SubStruct ) - dump\n");
++ fprintf(fp, " contains %d Kme records\n", static_cast< int >( iMac ) );
++ for ( sal_Int32 count=0; count < iMac; ++count )
++ {
++ fprintf(fp, "[%d] Kme\n", static_cast< int >( count ) );
++ rgkme[ count ].Print( fp );
++ }
++
++}
+
+TcgSttbf::TcgSttbf( bool bReadId ) : Tcg255SubStruct( bReadId )
+{
@@ -1044,6 +1322,12 @@
+ return sttbf.Read( pS );
+}
+
++void TcgSttbf::Print( FILE* fp )
++{
++ fprintf(fp,"TcgSttbf - dump\n");
++ sttbf.Print( fp );
++}
++
+TcgSttbfCore::TcgSttbfCore() : fExtend( 0 )
+,cData( 0 )
+,cbExtra( 0 )
@@ -1073,6 +1357,20 @@
+ return true;
+}
+
++void TcgSttbfCore::Print( FILE* fp )
++{
++ fprintf( fp, "TcgSttbfCore - dump\n");
++ fprintf( fp, " fExtend 0x%x [expected 0xFFFF ]\n", fExtend );
++ fprintf( fp, " cbExtra 0x%x [expected 0x02 ]\n", cbExtra );
++ fprintf( fp, " cData no. or string data items %d (0x%x)\n", cData, cData );
++
++ if ( cData )
++ {
++ for ( sal_Int32 index = 0; index < cData; ++index )
++ fprintf(fp," string dataItem[ %d(0x%x) ] has name %s and if referenced %d times.\n", static_cast< int >( index ), static_cast< unsigned int >( index ), rtl::OUStringToOString( dataItems[ index ].data, RTL_TEXTENCODING_UTF8 ).getStr(), dataItems[ index ].extraData );
++ }
++
++}
+MacroNames::MacroNames( bool bReadId ) : Tcg255SubStruct( bReadId )
+,iMac( 0 )
+,rgNames( NULL )
@@ -1101,16 +1399,38 @@
+ return true;
+}
+
++void MacroNames::Print( FILE* fp )
++{
++ fprintf(fp, "MacroNames ( Tcg255SubStruct ) - dump\n");
++ fprintf(fp, " contains %d MacroName records\n", iMac );
++ for ( sal_Int32 count=0; count < iMac; ++count )
++ {
++ fprintf(fp, "[%d] MacroName\n", static_cast<int>( count ) );
++ rgNames[ count ].Print( fp );
++ }
++
++}
++
+MacroName::MacroName():ibst(0)
+{
+}
+
++
+bool MacroName::Read(SotStorageStream *pS)
+{
+ *pS >> ibst;
+ return xstz.Read( pS );
+}
+
++void MacroName::Print( FILE* fp )
++{
++ fprintf( fp, "MacroName - dump");
++ fprintf( fp," index - 0x%x has associated following record\n", ibst );
++ xstz.Print( fp );
++}
++
++
++
+Xstz::Xstz():chTerm(0)
+{
+}
@@ -1126,6 +1446,14 @@
+ return true;
+}
+
++void Xstz::Print( FILE* fp )
++{
++ fprintf(fp,"Xstz -- dump\n");
++ fprintf(fp," Xst\n");
++ xst.Print( fp );
++ fprintf(fp," chterm 0x%x ( should be zero )\n", chTerm);
++}
++
+Kme::Kme() : reserved1(0)
+,reserved2(0)
+,kcm1(0)
@@ -1146,6 +1474,18 @@
+ return true;
+}
+
++void Kme::Print( FILE* fp )
++{
++
++ fprintf( fp, "Kme - dump\n");
++ fprintf( fp, " reserved1 0x%x [expected 0x0 ]\n", reserved1 );
++ fprintf( fp, " reserved2 0x%x [expected 0x0 ]\n", reserved2 );
++ fprintf( fp, " kcm1 0x%x [shortcut key]\n", kcm1 );
++ fprintf( fp, " kcm2 0x%x [shortcut key]\n", kcm2 );
++ fprintf( fp, " kt 0x%x \n", kt );
++ fprintf( fp, " param 0x%x \n", static_cast< unsigned int >( param ) );
++}
++
+Acd::Acd() : ibst( 0 )
+, fciBasedOnABC( 0 )
+{
@@ -1157,6 +1497,14 @@
+ return true;
+}
+
++void Acd::Print( FILE* fp )
++{
++ fprintf( fp,"ACD - dump\n");
++ // #TODO flesh out interpretation of these values
++ fprintf( fp," ibst 0x%x\n", ibst);
++ fprintf( fp," fciBaseObABC 0x%x\n", fciBasedOnABC);
++}
++
+MCD::MCD() : reserved1(0x56)
+,reserved2( 0 )
+,ibst( 0 )
@@ -1171,7 +1519,26 @@
+
+bool MCD::Read(SotStorageStream *pS)
+{
-+ *pS >> reserved1 >> reserved2 >> ibst >> ibstName >> reserved3 >>
++
++ OSL_TRACE("*** MCD before read 0x%x", pS->Tell());
++ *pS >> reserved1 >> reserved2 >> ibst >> ibstName >> reserved3;
+ *pS >> reserved4 >> reserved5 >> reserved6 >> reserved7;
++ OSL_TRACE("*** MCD after read 0x%x", pS->Tell());
+ return true;
+}
++
++void MCD::Print( FILE* fp )
++{
++ fprintf( fp, "MCD - dump\n");
++ fprintf( fp, " reserved1 0x%x [expected 0x56 ]\n", reserved1 );
++ fprintf( fp, " reserved2 0x%x [expected 0x0 ]\n", reserved2 );
++ fprintf( fp, " ibst 0x%x specifies macro with MacroName.xstz = 0x%x\n", ibst, ibst );
++ fprintf( fp, " ibstName 0x%x index into command string table ( TcgSttbf.sttbf )\n", ibstName );
++
++ fprintf( fp, " reserved3 0x%x [expected 0xFFFF ]\n", reserved3 );
++ fprintf( fp, " reserved4 0x%x\n", static_cast< unsigned int >( reserved4 ) );
++ fprintf( fp, " reserved5 0x%x [expected 0x0 ]\n", static_cast< unsigned int >( reserved5 ) );
++ fprintf( fp, " reserved6 0x%x\n", static_cast< unsigned int >( reserved6 ) );
++ fprintf( fp, " reserved7 0x%x\n", static_cast< unsigned int >( reserved7 ) );
++}
++
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]