summaryrefslogtreecommitdiff
path: root/oox/source/dump/oledumper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/dump/oledumper.cxx')
-rw-r--r--oox/source/dump/oledumper.cxx1257
1 files changed, 860 insertions, 397 deletions
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index b7750d4113b8..cc49ee050ea6 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -33,8 +33,8 @@
#include <rtl/tencinfo.h>
#include "oox/helper/binaryoutputstream.hxx"
#include "oox/core/filterbase.hxx"
+#include "oox/ole/olestorage.hxx"
#include "oox/ole/vbainputstream.hxx"
-#include "oox/xls/biffhelper.hxx"
#if OOX_INCLUDE_DUMPER
@@ -52,9 +52,52 @@ namespace dump {
// ============================================================================
// ============================================================================
-StdFontObject::StdFontObject( const InputObjectBase& rParent ) :
- InputObjectBase( rParent )
+OUString OleInputObjectBase::dumpAnsiString32( const String& rName )
{
+ return dumpCharArray( rName, mxStrm->readInt32(), RTL_TEXTENCODING_MS_1252 );
+}
+
+OUString OleInputObjectBase::dumpUniString32( const String& rName )
+{
+ return dumpUnicodeArray( rName, mxStrm->readInt32() );
+}
+
+sal_Int32 OleInputObjectBase::dumpStdClipboardFormat( const String& rName )
+{
+ return dumpDec< sal_Int32 >( rName( "clipboard-format" ), "OLE-STD-CLIPBOARD-FORMAT" );
+}
+
+OUString OleInputObjectBase::dumpAnsiString32OrStdClip( const String& rName )
+{
+ sal_Int32 nLen = mxStrm->readInt32();
+ return (nLen < 0) ? OUString::valueOf( dumpStdClipboardFormat( rName ) ) : dumpCharArray( rName, nLen, RTL_TEXTENCODING_MS_1252 );
+}
+
+OUString OleInputObjectBase::dumpUniString32OrStdClip( const String& rName )
+{
+ sal_Int32 nLen = mxStrm->readInt32();
+ return (nLen < 0) ? OUString::valueOf( dumpStdClipboardFormat( rName ) ) : dumpUnicodeArray( rName, nLen );
+}
+
+void OleInputObjectBase::writeOleColorItem( const String& rName, sal_uInt32 nColor )
+{
+ MultiItemsGuard aMultiGuard( mxOut );
+ writeHexItem( rName, nColor, "OLE-COLOR" );
+}
+
+sal_uInt32 OleInputObjectBase::dumpOleColor( const String& rName )
+{
+ sal_uInt32 nOleColor = mxStrm->readuInt32();
+ writeOleColorItem( rName, nOleColor );
+ return nOleColor;
+}
+
+// ============================================================================
+// ============================================================================
+
+StdFontObject::StdFontObject( const InputObjectBase& rParent )
+{
+ construct( rParent );
}
void StdFontObject::implDump()
@@ -64,19 +107,19 @@ void StdFontObject::implDump()
dumpHex< sal_uInt8 >( "flags", "STDFONT-FLAGS" );
dumpDec< sal_uInt16 >( "weight", "FONT-WEIGHT" );
dumpDec< sal_uInt32 >( "height", "STDFONT-HEIGHT" );
- dumpCharArray( "name", in().readuInt8(), RTL_TEXTENCODING_ASCII_US );
+ dumpCharArray( "name", mxStrm->readuInt8(), RTL_TEXTENCODING_ASCII_US );
}
// ============================================================================
-StdPicObject::StdPicObject( const InputObjectBase& rParent ) :
- InputObjectBase( rParent )
+StdPicObject::StdPicObject( const InputObjectBase& rParent )
{
+ construct( rParent );
}
void StdPicObject::implDump()
{
- dumpHex< sal_uInt32 >( "identifier" );
+ dumpHex< sal_uInt32 >( "identifier", "STDPIC-ID" );
sal_uInt32 nSize = dumpHex< sal_uInt32 >( "image-size", "CONV-DEC" );
dumpBinary( "image-data", nSize );
}
@@ -96,9 +139,9 @@ const sal_uInt32 STDHLINK_ASSTRING = 0x00000100; /// Hyperlink as sim
} // namespace
-StdHlinkObject::StdHlinkObject( const InputObjectBase& rParent ) :
- InputObjectBase( rParent )
+StdHlinkObject::StdHlinkObject( const InputObjectBase& rParent )
{
+ construct( rParent );
}
void StdHlinkObject::implDump()
@@ -126,15 +169,14 @@ void StdHlinkObject::implDump()
OUString StdHlinkObject::dumpHyperlinkString( const String& rName, bool bUnicode )
{
- sal_Int32 nLen = in().readInt32();
- return bUnicode ? dumpUnicodeArray( rName, nLen ) : dumpCharArray( rName, nLen, osl_getThreadTextEncoding() );
+ return bUnicode ? dumpUniString32( rName ) : dumpAnsiString32( rName );
}
bool StdHlinkObject::dumpGuidAndMoniker()
{
bool bValidMoniker = true;
OUString aGuid = cfg().getStringOption( dumpGuid( "moniker" ), OUString() );
- IndentGuard aIndGuard( out() );
+ IndentGuard aIndGuard( mxOut );
if( aGuid.equalsAscii( "URLMoniker" ) )
dumpUrlMoniker();
else if( aGuid.equalsAscii( "FileMoniker" ) )
@@ -153,9 +195,9 @@ bool StdHlinkObject::dumpGuidAndMoniker()
void StdHlinkObject::dumpUrlMoniker()
{
sal_Int32 nBytes = dumpDec< sal_Int32 >( "url-bytes" );
- sal_Int64 nEndPos = in().tell() + ::std::max< sal_Int32 >( nBytes, 0 );
+ sal_Int64 nEndPos = mxStrm->tell() + ::std::max< sal_Int32 >( nBytes, 0 );
dumpNullUnicodeArray( "url" );
- if( in().tell() + 24 == nEndPos )
+ if( mxStrm->tell() + 24 == nEndPos )
{
dumpGuid( "implementation-id" );
dumpDec< sal_uInt32 >( "version" );
@@ -172,7 +214,7 @@ void StdHlinkObject::dumpFileMoniker()
dumpHex< sal_uInt16 >( "version" );
dumpUnused( 20 );
sal_Int32 nBytes = dumpDec< sal_Int32 >( "total-bytes" );
- sal_Int64 nEndPos = in().tell() + ::std::max< sal_Int32 >( nBytes, 0 );
+ sal_Int64 nEndPos = mxStrm->tell() + ::std::max< sal_Int32 >( nBytes, 0 );
if( nBytes > 0 )
{
sal_Int32 nFileBytes = dumpDec< sal_Int32 >( "uni-filename-bytes" );
@@ -185,18 +227,18 @@ void StdHlinkObject::dumpFileMoniker()
void StdHlinkObject::dumpItemMoniker()
{
sal_Int32 nBytes = dumpDec< sal_Int32 >( "delimiter-bytes" );
- sal_Int64 nEndPos = in().tell() + ::std::max< sal_Int32 >( nBytes, 0 );
- dumpNullCharArray( "ansi-delimiter", osl_getThreadTextEncoding() );
- if( in().tell() < nEndPos )
- dumpUnicodeArray( "unicode-delimiter", (nEndPos - in().tell()) / 2 );
- in().seek( nEndPos );
+ sal_Int64 nEndPos = mxStrm->tell() + ::std::max< sal_Int32 >( nBytes, 0 );
+ dumpNullCharArray( "ansi-delimiter", RTL_TEXTENCODING_MS_1252 );
+ if( mxStrm->tell() < nEndPos )
+ dumpUnicodeArray( "unicode-delimiter", (nEndPos - mxStrm->tell()) / 2 );
+ mxStrm->seek( nEndPos );
nBytes = dumpDec< sal_Int32 >( "item-bytes" );
- nEndPos = in().tell() + ::std::max< sal_Int32 >( nBytes, 0 );
- dumpNullCharArray( "ansi-item", osl_getThreadTextEncoding() );
- if( in().tell() < nEndPos )
- dumpUnicodeArray( "unicode-item", (nEndPos - in().tell()) / 2 );
- in().seek( nEndPos );
+ nEndPos = mxStrm->tell() + ::std::max< sal_Int32 >( nBytes, 0 );
+ dumpNullCharArray( "ansi-item", RTL_TEXTENCODING_MS_1252 );
+ if( mxStrm->tell() < nEndPos )
+ dumpUnicodeArray( "unicode-item", (nEndPos - mxStrm->tell()) / 2 );
+ mxStrm->seek( nEndPos );
}
void StdHlinkObject::dumpAntiMoniker()
@@ -207,13 +249,54 @@ void StdHlinkObject::dumpAntiMoniker()
void StdHlinkObject::dumpCompositeMoniker()
{
sal_Int32 nCount = dumpDec< sal_Int32 >( "moniker-count" );
- for( sal_Int32 nIndex = 0; !in().isEof() && (nIndex < nCount); ++nIndex )
+ for( sal_Int32 nIndex = 0; !mxStrm->isEof() && (nIndex < nCount); ++nIndex )
dumpGuidAndMoniker();
}
// ============================================================================
// ============================================================================
+OleStreamObject::OleStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
+{
+ construct( rParent, rxStrm, rSysFileName );
+}
+
+// ============================================================================
+
+OleCompObjObject::OleCompObjObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName ) :
+ OleStreamObject( rParent, rxStrm, rSysFileName )
+{
+}
+
+void OleCompObjObject::implDump()
+{
+ dumpUnused( 4 );
+ dumpDec< sal_uInt32 >( "version" );
+ dumpUnused( 20 );
+ dumpAnsiString32( "ansi-display-name" );
+ dumpAnsiString32OrStdClip( "ansi-clipboard-format" );
+ if( mxStrm->getRemaining() >= 4 )
+ {
+ sal_Int32 nLen = mxStrm->readInt32();
+ if( (0 <= nLen) && (nLen <= 40) )
+ {
+ dumpCharArray( "ansi-unused", nLen, RTL_TEXTENCODING_MS_1252 );
+ if( (mxStrm->getRemaining() >= 4) && (dumpHex< sal_Int32 >( "unicode-marker" ) == 0x71B239F4) )
+ {
+ dumpUniString32( "unicode-display-name" );
+ dumpUniString32OrStdClip( "unicode-clipboard-format" );
+ dumpUniString32( "unicode-unused" );
+ }
+ }
+ else
+ writeDecItem( "length", nLen );
+ }
+ dumpRemainingStream();
+}
+
+// ============================================================================
+// ============================================================================
+
namespace {
const sal_Int32 OLEPROP_ID_DICTIONARY = 0;
@@ -244,29 +327,26 @@ const sal_Int32 OLEPROP_TYPE_CLIPFMT = 71;
const sal_uInt16 CODEPAGE_UNICODE = 1200;
-const sal_uInt32 OCX_STRING_COMPRESSED = 0x80000000;
+const sal_uInt32 AX_STRING_COMPRESSED = 0x80000000;
} // namespace
// ============================================================================
-OlePropertyStreamObject::OlePropertyStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName ) :
- BinaryStreamObject( rParent, rxStrm, rSysFileName )
+OlePropertyStreamObject::OlePropertyStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
{
+ construct( rParent, rxStrm, rSysFileName );
}
void OlePropertyStreamObject::implDump()
{
- BinaryInputStream& rStrm = in();
- Output& rOut = out();
-
OUStringVector aGuidVec;
::std::vector< sal_uInt32 > aStartPosVec;
// dump header
writeEmptyItem( "HEADER" );
{
- IndentGuard aIndGuard( rOut );
+ IndentGuard aIndGuard( mxOut );
dumpHex< sal_uInt16 >( "byte-order", "OLEPROP-BYTE-ORDER" );
dumpDec< sal_uInt16 >( "version" );
dumpDec< sal_uInt16 >( "os-minor" );
@@ -276,29 +356,26 @@ void OlePropertyStreamObject::implDump()
// dump table of section positions
{
- TableGuard aTabGuard( rOut, 15, 60 );
- rOut.resetItemIndex();
- for( sal_Int32 nSectIdx = 0; !rStrm.isEof() && (nSectIdx < nSectCount); ++nSectIdx )
+ TableGuard aTabGuard( mxOut, 15, 60 );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nSectIdx = 0; !mxStrm->isEof() && (nSectIdx < nSectCount); ++nSectIdx )
{
- MultiItemsGuard aMultiGuard( rOut );
+ MultiItemsGuard aMultiGuard( mxOut );
writeEmptyItem( "#section" );
aGuidVec.push_back( dumpGuid( "guid" ) );
aStartPosVec.push_back( dumpHex< sal_uInt32 >( "start-pos", "CONV-DEC" ) );
}
}
}
- rOut.emptyLine();
+ mxOut->emptyLine();
// dump sections
- for( size_t nSectIdx = 0; !rStrm.isEof() && (nSectIdx < aStartPosVec.size()); ++nSectIdx )
+ for( size_t nSectIdx = 0; !mxStrm->isEof() && (nSectIdx < aStartPosVec.size()); ++nSectIdx )
dumpSection( aGuidVec[ nSectIdx ], aStartPosVec[ nSectIdx ] );
}
void OlePropertyStreamObject::dumpSection( const OUString& rGuid, sal_uInt32 nStartPos )
{
- BinaryInputStream& rStrm = in();
- Output& rOut = out();
-
// property ID names
mxPropIds = cfg().createNameList< ConstList >( "OLEPROP-IDS" );
OUString aGuidName = cfg().getStringOption( rGuid, OUString() );
@@ -317,7 +394,7 @@ void OlePropertyStreamObject::dumpSection( const OUString& rGuid, sal_uInt32 nSt
writeSectionHeader( rGuid, nStartPos );
// seek to section
- IndentGuard aIndGuard( rOut );
+ IndentGuard aIndGuard( mxOut );
if( startElement( nStartPos ) )
{
// dump section header
@@ -326,11 +403,11 @@ void OlePropertyStreamObject::dumpSection( const OUString& rGuid, sal_uInt32 nSt
// dump table of property positions
{
- TableGuard aTabGuard( rOut, 15, 25 );
- rOut.resetItemIndex();
- for( sal_Int32 nPropIdx = 0; !rStrm.isEof() && (nPropIdx < nPropCount); ++nPropIdx )
+ TableGuard aTabGuard( mxOut, 15, 25 );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nPropIdx = 0; !mxStrm->isEof() && (nPropIdx < nPropCount); ++nPropIdx )
{
- MultiItemsGuard aMultiGuard( rOut );
+ MultiItemsGuard aMultiGuard( mxOut );
writeEmptyItem( "#property" );
sal_Int32 nPropId = dumpDec< sal_Int32 >( "id", mxPropIds );
sal_uInt32 nPropPos = nStartPos + dumpHex< sal_uInt32 >( "start-pos", "CONV-DEC" );
@@ -338,10 +415,10 @@ void OlePropertyStreamObject::dumpSection( const OUString& rGuid, sal_uInt32 nSt
}
}
}
- rOut.emptyLine();
+ mxOut->emptyLine();
// code page property
- meTextEnc = osl_getThreadTextEncoding();
+ meTextEnc = RTL_TEXTENCODING_MS_1252;
mbIsUnicode = false;
PropertyPosMap::iterator aCodePageIt = aPropMap.find( OLEPROP_ID_CODEPAGE );
if( aCodePageIt != aPropMap.end() )
@@ -369,16 +446,16 @@ void OlePropertyStreamObject::dumpSection( const OUString& rGuid, sal_uInt32 nSt
void OlePropertyStreamObject::dumpProperty( sal_Int32 nPropId, sal_uInt32 nStartPos )
{
writePropertyHeader( nPropId, nStartPos );
- IndentGuard aIndGuard( out() );
+ IndentGuard aIndGuard( mxOut );
if( startElement( nStartPos ) )
dumpPropertyContents( nPropId );
- out().emptyLine();
+ mxOut->emptyLine();
}
void OlePropertyStreamObject::dumpCodePageProperty( sal_uInt32 nStartPos )
{
writePropertyHeader( OLEPROP_ID_CODEPAGE, nStartPos );
- IndentGuard aIndGuard( out() );
+ IndentGuard aIndGuard( mxOut );
if( startElement( nStartPos ) )
{
sal_Int32 nType = dumpPropertyType();
@@ -393,27 +470,27 @@ void OlePropertyStreamObject::dumpCodePageProperty( sal_uInt32 nStartPos )
else
dumpPropertyContents( OLEPROP_ID_CODEPAGE );
}
- out().emptyLine();
+ mxOut->emptyLine();
}
void OlePropertyStreamObject::dumpDictionaryProperty( sal_uInt32 nStartPos )
{
writePropertyHeader( OLEPROP_ID_DICTIONARY, nStartPos );
- IndentGuard aIndGuard( out() );
+ IndentGuard aIndGuard( mxOut );
if( startElement( nStartPos ) )
{
sal_Int32 nCount = dumpDec< sal_Int32 >( "count" );
- for( sal_Int32 nIdx = 0; !in().isEof() && (nIdx < nCount); ++nIdx )
+ for( sal_Int32 nIdx = 0; !mxStrm->isEof() && (nIdx < nCount); ++nIdx )
{
- MultiItemsGuard aMultiGuard( out() );
- TableGuard aTabGuard( out(), 10, 20 );
+ MultiItemsGuard aMultiGuard( mxOut );
+ TableGuard aTabGuard( mxOut, 10, 20 );
sal_Int32 nId = dumpDec< sal_Int32 >( "id" );
OUString aName = dumpString8( "name" );
if( mxPropIds.get() )
mxPropIds->setName( nId, aName );
}
}
- out().emptyLine();
+ mxOut->emptyLine();
}
void OlePropertyStreamObject::dumpPropertyContents( sal_Int32 nPropId )
@@ -423,11 +500,11 @@ void OlePropertyStreamObject::dumpPropertyContents( sal_Int32 nPropId )
{
sal_Int32 nBaseType = nType & 0x0FFF;
sal_Int32 nElemCount = dumpDec< sal_Int32 >( "element-count" );
- for( sal_Int32 nElemIdx = 0; !in().isEof() && (nElemIdx < nElemCount); ++nElemIdx )
+ for( sal_Int32 nElemIdx = 0; !mxStrm->isEof() && (nElemIdx < nElemCount); ++nElemIdx )
{
- out().resetItemIndex( nElemIdx );
+ mxOut->resetItemIndex( nElemIdx );
writeEmptyItem( "#element" );
- IndentGuard aIndGuard( out() );
+ IndentGuard aIndGuard( mxOut );
dumpPropertyValue( nPropId, nBaseType );
}
}
@@ -491,7 +568,7 @@ OUString OlePropertyStreamObject::dumpCharArray8( const String& rName, sal_Int32
if( nNewLen > 0 )
{
::std::vector< sal_Char > aBuffer( nNewLen + 1 );
- in().readMemory( &aBuffer.front(), nNewLen );
+ mxStrm->readMemory( &aBuffer.front(), nNewLen );
aBuffer[ nNewLen ] = 0;
aData = OStringToOUString( OString( &aBuffer.front() ), meTextEnc );
}
@@ -511,7 +588,7 @@ OUString OlePropertyStreamObject::dumpCharArray16( const String& rName, sal_Int3
::std::vector< sal_Unicode > aBuffer;
aBuffer.reserve( nNewLen + 1 );
for( size_t nIdx = 0; nIdx < nNewLen; ++nIdx )
- aBuffer.push_back( static_cast< sal_Unicode >( in().readuInt16() ) );
+ aBuffer.push_back( static_cast< sal_Unicode >( mxStrm->readuInt16() ) );
aBuffer.push_back( 0 );
OUString aData( &aBuffer.front() );
writeStringItem( rName, aData );
@@ -521,15 +598,15 @@ OUString OlePropertyStreamObject::dumpCharArray16( const String& rName, sal_Int3
bool OlePropertyStreamObject::startElement( sal_uInt32 nStartPos )
{
- in().seek( nStartPos );
- if( in().isEof() )
+ mxStrm->seek( nStartPos );
+ if( mxStrm->isEof() )
writeInfoItem( "stream-state", OOX_DUMP_ERR_STREAM );
- return !in().isEof();
+ return !mxStrm->isEof();
}
void OlePropertyStreamObject::writeSectionHeader( const OUString& rGuid, sal_uInt32 nStartPos )
{
- MultiItemsGuard aMultiGuard( out() );
+ MultiItemsGuard aMultiGuard( mxOut );
writeEmptyItem( "SECTION" );
writeHexItem( "pos", nStartPos, "CONV-DEC" );
writeGuidItem( "guid", rGuid );
@@ -537,7 +614,7 @@ void OlePropertyStreamObject::writeSectionHeader( const OUString& rGuid, sal_uIn
void OlePropertyStreamObject::writePropertyHeader( sal_Int32 nPropId, sal_uInt32 nStartPos )
{
- MultiItemsGuard aMultiGuard( out() );
+ MultiItemsGuard aMultiGuard( mxOut );
writeEmptyItem( "PROPERTY" );
writeHexItem( "pos", nStartPos, "CONV-DEC" );
writeDecItem( "id", nPropId, mxPropIds );
@@ -562,7 +639,9 @@ void OleStorageObject::construct( const ObjectBase& rParent )
void OleStorageObject::implDumpStream( const BinaryInputStreamRef& rxStrm, const OUString& /*rStrgPath*/, const OUString& rStrmName, const OUString& rSysFileName )
{
- if( rStrmName.equalsAscii( "\005SummaryInformation" ) || rStrmName.equalsAscii( "\005DocumentSummaryInformation" ) )
+ if( rStrmName.equalsAscii( "\001CompObj" ) )
+ OleCompObjObject( *this, rxStrm, rSysFileName ).dump();
+ else if( rStrmName.equalsAscii( "\005SummaryInformation" ) || rStrmName.equalsAscii( "\005DocumentSummaryInformation" ) )
OlePropertyStreamObject( *this, rxStrm, rSysFileName ).dump();
else
BinaryStreamObject( *this, rxStrm, rSysFileName ).dump();
@@ -571,40 +650,394 @@ void OleStorageObject::implDumpStream( const BinaryInputStreamRef& rxStrm, const
// ============================================================================
// ============================================================================
-void OcxPropertyObjectBase::construct( const ObjectBase& rParent,
+ComCtlObjectBase::ComCtlObjectBase( const InputObjectBase& rParent,
+ sal_uInt32 nDataId5, sal_uInt32 nDataId6, sal_uInt16 nVersion, bool bCommonPart, bool bComplexPart ) :
+ mnDataId5( nDataId5 ),
+ mnDataId6( nDataId6 ),
+ mnVersion( nVersion ),
+ mbCommonPart( bCommonPart ),
+ mbComplexPart( bComplexPart )
+{
+ construct( rParent );
+}
+
+void ComCtlObjectBase::implDump()
+{
+ sal_uInt32 nCommonSize = 0;
+ dumpComCtlSize() && dumpComCtlData( nCommonSize ) && (!mbCommonPart || dumpComCtlCommon( nCommonSize )) && (!mbComplexPart || dumpComCtlComplex());
+}
+
+void ComCtlObjectBase::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+}
+
+void ComCtlObjectBase::implDumpCommonTrailing()
+{
+}
+
+bool ComCtlObjectBase::dumpComCtlHeader( sal_uInt32 nExpId, sal_uInt16 nExpMajor, sal_uInt16 nExpMinor )
+{
+ // no idea if all this is correct...
+ sal_uInt32 nId = dumpHex< sal_uInt32 >( "header-id", "COMCTL-HEADER-IDS" );
+ ItemGuard aItem( mxOut, "version" );
+ sal_uInt16 nMinor, nMajor;
+ *mxStrm >> nMinor >> nMajor;
+ mxOut->writeDec( nMajor );
+ mxOut->writeChar( '.' );
+ mxOut->writeDec( nMinor );
+ return !mxStrm->isEof() && (nId == nExpId) && ((nExpMajor == SAL_MAX_UINT16) || (nExpMajor == nMajor)) && ((nExpMinor == SAL_MAX_UINT16) || (nExpMinor == nMinor));
+}
+
+bool ComCtlObjectBase::dumpComCtlSize()
+{
+ if( dumpComCtlHeader( 0x12344321, 0, 8 ) )
+ {
+ IndentGuard aIndGuard( mxOut );
+ dumpDec< sal_Int32 >( "width", "CONV-HMM-TO-CM" );
+ dumpDec< sal_Int32 >( "height", "CONV-HMM-TO-CM" );
+ return !mxStrm->isEof();
+ }
+ return false;
+}
+
+bool ComCtlObjectBase::dumpComCtlData( sal_uInt32& ornCommonPartSize )
+{
+ if( dumpComCtlHeader( (mnVersion == 5) ? mnDataId5 : mnDataId6, mnVersion ) )
+ {
+ IndentGuard aIndGuard( mxOut );
+ if( mbCommonPart )
+ ornCommonPartSize = dumpDec< sal_uInt32 >( "common-part-size" );
+ implDumpProperties();
+ return !mxStrm->isEof();
+ }
+ return false;
+}
+
+bool ComCtlObjectBase::dumpComCtlCommon( sal_uInt32 nPartSize )
+{
+ sal_Int64 nEndPos = mxStrm->tell() + nPartSize;
+ if( (nPartSize >= 16) && dumpComCtlHeader( 0xABCDEF01, 5, 0 ) )
+ {
+ IndentGuard aIndGuard( mxOut );
+ dumpUnknown( 4 );
+ dumpHex< sal_uInt32 >( "common-flags", "COMCTL-COMMON-FLAGS" );
+ implDumpCommonExtra( nEndPos );
+ dumpRemainingTo( nEndPos );
+ implDumpCommonTrailing();
+ return !mxStrm->isEof();
+ }
+ return false;
+}
+
+bool ComCtlObjectBase::dumpComCtlComplex()
+{
+ if( dumpComCtlHeader( 0xBDECDE1F, 5, 1 ) )
+ {
+ IndentGuard aIndGuard( mxOut );
+ sal_uInt32 nFlags = dumpHex< sal_uInt32 >( "comctl-complex-flags", "COMCTL-COMPLEX-FLAGS" );
+ if( !mxStrm->isEof() && (nFlags & 0x01) )
+ {
+ writeEmptyItem( "font" );
+ IndentGuard aIndGuard2( mxOut );
+ OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() );
+ if( aClassName.equalsAscii( "StdFont" ) )
+ StdFontObject( *this ).dump();
+ }
+ if( !mxStrm->isEof() && (nFlags & 0x02) )
+ {
+ writeEmptyItem( "mouse-icon" );
+ IndentGuard aIndGuard2( mxOut );
+ OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() );
+ if( aClassName.equalsAscii( "StdPic" ) )
+ StdPicObject( *this ).dump();
+ }
+ return !mxStrm->isEof();
+ }
+ return false;
+}
+
+// ============================================================================
+
+ComCtlScrollBarObject::ComCtlScrollBarObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, SAL_MAX_UINT32, 0x99470A83, nVersion, true, true )
+{
+}
+
+void ComCtlScrollBarObject::implDumpProperties()
+{
+ dumpHex< sal_uInt32 >( "flags", "COMCTL-SCROLLBAR-FLAGS" );
+ dumpDec< sal_Int32 >( "large-change" );
+ dumpDec< sal_Int32 >( "small-change" );
+ dumpDec< sal_Int32 >( "min" );
+ dumpDec< sal_Int32 >( "max" );
+ dumpDec< sal_Int32 >( "value" );
+}
+
+// ============================================================================
+
+ComCtlProgressBarObject::ComCtlProgressBarObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E84, 0x97AB8A01, nVersion, true, true )
+{
+}
+
+void ComCtlProgressBarObject::implDumpProperties()
+{
+ dumpDec< float >( "min" );
+ dumpDec< float >( "max" );
+ if( mnVersion == 6 )
+ {
+ dumpBool< sal_uInt16 >( "vertical" );
+ dumpBool< sal_uInt16 >( "smooth-scroll" );
+ }
+}
+
+// ============================================================================
+
+ComCtlSliderObject::ComCtlSliderObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E86, 0x0A2BAE11, nVersion, true, true )
+{
+}
+
+void ComCtlSliderObject::implDumpProperties()
+{
+ dumpBool< sal_Int32 >( "vertical" );
+ dumpDec< sal_Int32 >( "large-change" );
+ dumpDec< sal_Int32 >( "small-change" );
+ dumpDec< sal_Int32 >( "min" );
+ dumpDec< sal_Int32 >( "max" );
+ dumpDec< sal_Int16 >( "select-range", "COMCTL-SLIDER-SELECTRANGE" );
+ dumpUnused( 2 );
+ dumpDec< sal_Int32 >( "select-start" );
+ dumpDec< sal_Int32 >( "select-length" );
+ dumpDec< sal_Int32 >( "tick-style", "COMCTL-SLIDER-TICKSTYLE" );
+ dumpDec< sal_Int32 >( "tick-frequency" );
+ dumpDec< sal_Int32 >( "value" );
+ if( mnVersion == 6 )
+ dumpBool< sal_Int32 >( "tooltip-below" );
+}
+
+// ============================================================================
+
+ComCtlUpDownObject::ComCtlUpDownObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xFF3626A0, 0xFF3626A0, nVersion, false, false )
+{
+}
+
+void ComCtlUpDownObject::implDumpProperties()
+{
+ dumpUnknown( 16 ); // buddy-property, somehow
+ dumpDec< sal_Int32 >( "buddy-control" );
+ dumpUnknown( 8 );
+ dumpDec< sal_Int32 >( "value" );
+ dumpUnknown( 4 );
+ dumpDec< sal_Int32 >( "increment" );
+ dumpDec< sal_Int32 >( "max" );
+ dumpDec< sal_Int32 >( "min" );
+ dumpHex< sal_uInt32 >( "flags-1", "COMCTL-UPDOWN-FLAGS1" );
+ dumpHex< sal_uInt32 >( "flags-2", "COMCTL-UPDOWN-FLAGS2" );
+ dumpUnknown( 4 );
+}
+
+// ============================================================================
+
+ComCtlImageListObject::ComCtlImageListObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E80, 0xE6E17E80, nVersion, true, false )
+{
+}
+
+void ComCtlImageListObject::implDumpProperties()
+{
+ dumpDec< sal_uInt16 >( "image-width" );
+ dumpDec< sal_uInt16 >( "image-height" );
+ dumpOleColor( "mask-color" );
+ dumpBool< sal_Int16 >( "use-mask-color" );
+ dumpUnknown( 2 );
+}
+
+void ComCtlImageListObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+ dumpUnknown( 4 );
+ dumpOleColor( "back-color" );
+ dumpUnknown( 4 );
+ sal_Int32 nImageCount = dumpDec< sal_Int32 >( "image-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nImageIndex = 0; (nImageIndex < nImageCount) && !mxStrm->isEof(); ++nImageIndex )
+ {
+ writeEmptyItem( "#image" );
+ IndentGuard aIndGuard( mxOut );
+ sal_uInt8 nFlags = dumpHex< sal_uInt8 >( "text-flags", "COMCTL-IMAGELIST-TEXTFLAGS" );
+ if( nFlags & 0x01 ) dumpUniString32( "caption" );
+ if( nFlags & 0x02 ) dumpUniString32( "key" );
+ }
+}
+
+void ComCtlImageListObject::implDumpCommonTrailing()
+{
+ sal_Int32 nImageCount = dumpDec< sal_Int32 >( "image-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nImageIndex = 0; (nImageIndex < nImageCount) && !mxStrm->isEof(); ++nImageIndex )
+ {
+ writeEmptyItem( "#image" );
+ IndentGuard aIndGuard( mxOut );
+ dumpDec< sal_Int32 >( "index" );
+ StdPicObject( *this ).dump();
+ }
+}
+
+// ============================================================================
+
+ComCtlTabStripObject::ComCtlTabStripObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E8A, 0xD12A7AC1, nVersion, true, true )
+{
+}
+
+void ComCtlTabStripObject::implDumpProperties()
+{
+ dumpHex< sal_uInt32 >( "flags-1", "COMCTL-TABSTRIP-FLAGS1" );
+ dumpDec< sal_uInt16 >( "tab-fixed-width", "CONV-HMM-TO-CM" );
+ dumpDec< sal_uInt16 >( "tab-fixed-height", "CONV-HMM-TO-CM" );
+ if( mnVersion == 6 )
+ {
+ dumpHex< sal_uInt32 >( "flags-2", "COMCTL-TABSTRIP-FLAGS2" );
+ dumpDec< sal_uInt16 >( "tab-min-width", "CONV-HMM-TO-CM" );
+ dumpUnknown( 2 );
+ dumpHex< sal_uInt32 >( "flags-3", "COMCTL-TABSTRIP-FLAGS3" );
+ }
+}
+
+void ComCtlTabStripObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+ dumpUnknown( 12 );
+ dumpUniString32( "image-list" );
+ sal_Int32 nTabCount = dumpDec< sal_Int32 >( "tab-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nTabIndex = 0; (nTabIndex < nTabCount) && !mxStrm->isEof(); ++nTabIndex )
+ {
+ writeEmptyItem( "#tab" );
+ IndentGuard aIndGuard( mxOut );
+ dumpUnknown( 4 );
+ sal_uInt32 nTabFlags = dumpHex< sal_uInt32 >( "tab-flags", "COMCTL-TABSTRIP-TABFLAGS" );
+ if( nTabFlags & 0x01 ) dumpUniString32( "caption" );
+ if( nTabFlags & 0x02 ) dumpUniString32( "key" );
+ if( nTabFlags & 0x04 ) dumpUniString32( "tag" );
+ if( nTabFlags & 0x08 ) dumpUniString32( "tooltip" );
+ dumpDec< sal_uInt16 >( "image-id" );
+ }
+}
+
+// ============================================================================
+
+ComCtlTreeViewObject::ComCtlTreeViewObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E8E, 0x6AC13CB1, nVersion, true, true ),
+ mnStringFlags( 0 )
+{
+}
+
+void ComCtlTreeViewObject::implDumpProperties()
+{
+ dumpHex< sal_uInt32 >( "flags", "COMCTL-TREEVIEW-FLAGS" );
+ dumpDec< sal_Int32 >( "indentation", "CONV-HMM-TO-CM" );
+ if( mnVersion == 6 )
+ dumpHex< sal_uInt32 >( "flags-2", "COMCTL-TREEVIEW-FLAGS2" );
+ mnStringFlags = dumpHex< sal_uInt32 >( "string-flags", "COMCTL-TREEVIEW-STRINGFLAGS" );
+}
+
+void ComCtlTreeViewObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+ dumpOleColor( "text-color" );
+ dumpOleColor( "back-color" );
+ dumpUnknown( 4 );
+ if( mnStringFlags & 0x02 )
+ dumpUniString32( "image-list" );
+ dumpUniString32( "path-separator" );
+}
+
+// ============================================================================
+
+ComCtlStatusBarObject::ComCtlStatusBarObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
+ ComCtlObjectBase( rParent, 0xE6E17E88, SAL_MAX_UINT32, nVersion, true, true )
+{
+}
+
+void ComCtlStatusBarObject::implDumpProperties()
+{
+ dumpBool< sal_Int32 >( "style-simple-text" );
+ dumpBool< sal_Int16 >( "show-tips" );
+ dumpUnknown( 2 );
+}
+
+void ComCtlStatusBarObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
+{
+ dumpUnknown( 12 );
+ dumpUniString32( "simple-text" );
+ sal_Int32 nPanelCount = dumpDec< sal_Int32 >( "panel-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nPanelIndex = 0; (nPanelIndex < nPanelCount) && !mxStrm->isEof(); ++nPanelIndex )
+ {
+ writeEmptyItem( "#panel" );
+ IndentGuard aIndGuard( mxOut );
+ dumpHex< sal_uInt32 >( "panel-flags", "COMCTL-STATUSBAR-PANELFLAGS" );
+ dumpDec< sal_Int32 >( "current-width", "CONV-HMM-TO-CM" );
+ dumpDec< sal_Int32 >( "minimal-width", "CONV-HMM-TO-CM" );
+ sal_uInt32 nTextFlags = dumpHex< sal_uInt32 >( "text-flags", "COMCTL-STATUSBAR-TEXTFLAGS" );
+ if( nTextFlags & 0x01 ) dumpUniString32( "text" );
+ if( nTextFlags & 0x02 ) dumpUniString32( "vis-text" );
+ if( nTextFlags & 0x04 ) dumpUniString32( "key" );
+ if( nTextFlags & 0x08 ) dumpUniString32( "tag" );
+ if( nTextFlags & 0x10 ) dumpUniString32( "tooltip" );
+ }
+}
+
+void ComCtlStatusBarObject::implDumpCommonTrailing()
+{
+ sal_Int32 nImageCount = dumpDec< sal_Int32 >( "image-count" );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nImageIndex = 0; (nImageIndex < nImageCount) && !mxStrm->isEof(); ++nImageIndex )
+ {
+ writeEmptyItem( "#image" );
+ IndentGuard aIndGuard( mxOut );
+ dumpDec< sal_Int32 >( "panel-index" );
+ StdPicObject( *this ).dump();
+ }
+}
+
+// ============================================================================
+// ============================================================================
+
+void AxPropertyObjectBase::construct( const ObjectBase& rParent,
const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, const String& rPropNameList, bool b64BitPropFlags )
{
- InputObjectBase::construct( rParent, rxStrm, rSysFileName );
- constructOcxPropObj( rPropNameList, b64BitPropFlags );
+ OleInputObjectBase::construct( rParent, rxStrm, rSysFileName );
+ constructAxPropObj( rPropNameList, b64BitPropFlags );
}
-void OcxPropertyObjectBase::construct( const OutputObjectBase& rParent,
+void AxPropertyObjectBase::construct( const OutputObjectBase& rParent,
const BinaryInputStreamRef& rxStrm, const String& rPropNameList, bool b64BitPropFlags )
{
- InputObjectBase::construct( rParent, rxStrm );
- constructOcxPropObj( rPropNameList, b64BitPropFlags );
+ OleInputObjectBase::construct( rParent, rxStrm );
+ constructAxPropObj( rPropNameList, b64BitPropFlags );
}
-void OcxPropertyObjectBase::construct( const InputObjectBase& rParent,
+void AxPropertyObjectBase::construct( const InputObjectBase& rParent,
const String& rPropNameList, bool b64BitPropFlags )
{
- InputObjectBase::construct( rParent );
- constructOcxPropObj( rPropNameList, b64BitPropFlags );
+ OleInputObjectBase::construct( rParent );
+ constructAxPropObj( rPropNameList, b64BitPropFlags );
}
-bool OcxPropertyObjectBase::implIsValid() const
+bool AxPropertyObjectBase::implIsValid() const
{
- return InputObjectBase::implIsValid() && in().isSeekable();
+ return OleInputObjectBase::implIsValid() && mxStrm->isSeekable();
}
-void OcxPropertyObjectBase::implDump()
+void AxPropertyObjectBase::implDump()
{
mbValid = true;
// header
setAlignAnchor();
dumpVersion();
sal_uInt16 nSize = dumpDec< sal_uInt16 >( "size" );
- mnPropertiesEnd = in().tell() + nSize;
+ mnPropertiesEnd = mxStrm->tell() + nSize;
// property flags
maLargeProps.clear();
maStreamProps.clear();
@@ -618,17 +1051,17 @@ void OcxPropertyObjectBase::implDump()
implDumpExtended();
}
-void OcxPropertyObjectBase::implDumpShortProperties()
+void AxPropertyObjectBase::implDumpShortProperties()
{
}
-void OcxPropertyObjectBase::implDumpExtended()
+void AxPropertyObjectBase::implDumpExtended()
{
}
-bool OcxPropertyObjectBase::ensureValid( bool bCondition )
+bool AxPropertyObjectBase::ensureValid( bool bCondition )
{
- if( mbValid && (!bCondition || in().isEof()) )
+ if( mbValid && (!bCondition || mxStrm->isEof()) )
{
if( !bCondition )
writeInfoItem( "state", OOX_DUMP_ERRASCII( "format-error" ) );
@@ -637,12 +1070,12 @@ bool OcxPropertyObjectBase::ensureValid( bool bCondition )
return mbValid;
}
-void OcxPropertyObjectBase::setAlignAnchor()
+void AxPropertyObjectBase::setAlignAnchor()
{
- mnPropertiesStart = in().tell();
+ mnPropertiesStart = mxStrm->tell();
}
-bool OcxPropertyObjectBase::startNextProperty()
+bool AxPropertyObjectBase::startNextProperty()
{
if( mnCurrProp == 0 ) mnCurrProp = 1; else mnCurrProp <<= 1;
bool bHasProp = getFlag( mnPropFlags, mnCurrProp );
@@ -650,12 +1083,12 @@ bool OcxPropertyObjectBase::startNextProperty()
return ensureValid() && bHasProp;
}
-OUString OcxPropertyObjectBase::getPropertyName() const
+OUString AxPropertyObjectBase::getPropertyName() const
{
return cfg().getName( mxPropNames, mnCurrProp );
}
-sal_uInt32 OcxPropertyObjectBase::dumpFlagsProperty( sal_uInt32 nDefault, const sal_Char* pcNameList )
+sal_uInt32 AxPropertyObjectBase::dumpFlagsProperty( sal_uInt32 nDefault, const sal_Char* pcNameList )
{
if( startNextProperty() )
{
@@ -665,18 +1098,17 @@ sal_uInt32 OcxPropertyObjectBase::dumpFlagsProperty( sal_uInt32 nDefault, const
return nDefault;
}
-sal_uInt32 OcxPropertyObjectBase::dumpColorProperty( sal_uInt32 nDefault )
+sal_uInt32 AxPropertyObjectBase::dumpColorProperty( sal_uInt32 nDefault )
{
if( startNextProperty() )
{
- MultiItemsGuard aMultiGuard( out() );
alignInput< sal_uInt32 >();
- return dumpHex< sal_uInt32 >( getPropertyName(), "OCX-COLOR" );
+ return dumpOleColor( getPropertyName() );
}
return nDefault;
}
-sal_Unicode OcxPropertyObjectBase::dumpUnicodeProperty()
+sal_Unicode AxPropertyObjectBase::dumpUnicodeProperty()
{
if( startNextProperty() )
{
@@ -686,41 +1118,41 @@ sal_Unicode OcxPropertyObjectBase::dumpUnicodeProperty()
return '\0';
}
-void OcxPropertyObjectBase::dumpUnknownProperty()
+void AxPropertyObjectBase::dumpUnknownProperty()
{
if( startNextProperty() )
ensureValid( false );
}
-void OcxPropertyObjectBase::dumpPosProperty()
+void AxPropertyObjectBase::dumpPosProperty()
{
if( startNextProperty() )
maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_POS, getPropertyName(), 8 ) );
}
-void OcxPropertyObjectBase::dumpSizeProperty()
+void AxPropertyObjectBase::dumpSizeProperty()
{
if( startNextProperty() )
maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_SIZE, getPropertyName(), 8 ) );
}
-void OcxPropertyObjectBase::dumpGuidProperty( OUString* pValue )
+void AxPropertyObjectBase::dumpGuidProperty( OUString* pValue )
{
if( startNextProperty() )
maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_GUID, getPropertyName(), 16, pValue ) );
}
-void OcxPropertyObjectBase::dumpStringProperty( OUString* pValue )
+void AxPropertyObjectBase::dumpStringProperty( OUString* pValue )
{
if( startNextProperty() )
{
alignInput< sal_uInt32 >();
- sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "OCX-STRINGLEN" );
+ sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "AX-STRINGLEN" );
maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_STRING, getPropertyName(), nLen, pValue ) );
}
}
-void OcxPropertyObjectBase::dumpStringArrayProperty()
+void AxPropertyObjectBase::dumpStringArrayProperty()
{
if( startNextProperty() )
{
@@ -730,7 +1162,7 @@ void OcxPropertyObjectBase::dumpStringArrayProperty()
}
}
-void OcxPropertyObjectBase::dumpStreamProperty()
+void AxPropertyObjectBase::dumpStreamProperty()
{
if( startNextProperty() )
{
@@ -740,26 +1172,26 @@ void OcxPropertyObjectBase::dumpStreamProperty()
}
}
-void OcxPropertyObjectBase::dumpEmbeddedFont()
+void AxPropertyObjectBase::dumpEmbeddedFont()
{
if( ensureValid() )
{
writeEmptyItem( "embedded-fontdata" );
- IndentGuard aIndGuard( out() );
- OcxCFontNewObject( *this ).dump();
+ IndentGuard aIndGuard( mxOut );
+ AxCFontNewObject( *this ).dump();
}
}
-void OcxPropertyObjectBase::dumpToPosition( sal_Int64 nPos )
+void AxPropertyObjectBase::dumpToPosition( sal_Int64 nPos )
{
dumpRemainingTo( nPos );
mbValid = true;
ensureValid();
}
-void OcxPropertyObjectBase::constructOcxPropObj( const String& rPropNameList, bool b64BitPropFlags )
+void AxPropertyObjectBase::constructAxPropObj( const String& rPropNameList, bool b64BitPropFlags )
{
- if( InputObjectBase::implIsValid() )
+ if( OleInputObjectBase::implIsValid() )
{
mxPropNames = cfg().getNameList( rPropNameList );
mb64BitPropFlags = b64BitPropFlags;
@@ -767,19 +1199,19 @@ void OcxPropertyObjectBase::constructOcxPropObj( const String& rPropNameList, bo
}
}
-void OcxPropertyObjectBase::dumpVersion()
+void AxPropertyObjectBase::dumpVersion()
{
- ItemGuard aItem( out(), "version" );
+ ItemGuard aItem( mxOut, "version" );
sal_uInt8 nMinor, nMajor;
- in() >> nMinor >> nMajor;
- out().writeDec( nMajor );
- out().writeChar( '.' );
- out().writeDec( nMinor );
+ *mxStrm >> nMinor >> nMajor;
+ mxOut->writeDec( nMajor );
+ mxOut->writeChar( '.' );
+ mxOut->writeDec( nMinor );
}
-OUString OcxPropertyObjectBase::dumpString( const String& rName, sal_uInt32 nSize, bool bArray )
+OUString AxPropertyObjectBase::dumpString( const String& rName, sal_uInt32 nSize, bool bArray )
{
- bool bCompressed = getFlag( nSize, OCX_STRING_COMPRESSED );
+ bool bCompressed = getFlag( nSize, AX_STRING_COMPRESSED );
sal_uInt32 nBufSize = extractValue< sal_uInt32 >( nSize, 0, 31 );
OUString aString = bCompressed ?
dumpCharArray( rName, nBufSize, RTL_TEXTENCODING_ISO_8859_1 ) :
@@ -788,30 +1220,30 @@ OUString OcxPropertyObjectBase::dumpString( const String& rName, sal_uInt32 nSiz
return aString;
}
-void OcxPropertyObjectBase::dumpShortProperties()
+void AxPropertyObjectBase::dumpShortProperties()
{
if( ensureValid() )
{
writeEmptyItem( "short-properties" );
- IndentGuard aIndGuard( out() );
+ IndentGuard aIndGuard( mxOut );
implDumpShortProperties();
alignInput< sal_uInt32 >();
}
}
-void OcxPropertyObjectBase::dumpLargeProperties()
+void AxPropertyObjectBase::dumpLargeProperties()
{
if( ensureValid( mnPropFlags == 0 ) && !maLargeProps.empty() )
{
writeEmptyItem( "large-properties" );
- IndentGuard aIndGuard( out() );
+ IndentGuard aIndGuard( mxOut );
for( LargePropertyVector::iterator aIt = maLargeProps.begin(), aEnd = maLargeProps.end(); ensureValid() && (aIt != aEnd); ++aIt )
{
switch( aIt->mePropType )
{
case LargeProperty::PROPTYPE_POS:
{
- MultiItemsGuard aMultiGuard( out() );
+ MultiItemsGuard aMultiGuard( mxOut );
writeEmptyItem( aIt->maItemName );
dumpDec< sal_Int32 >( "top", "CONV-HMM-TO-CM" );
dumpDec< sal_Int32 >( "left", "CONV-HMM-TO-CM" );
@@ -819,7 +1251,7 @@ void OcxPropertyObjectBase::dumpLargeProperties()
break;
case LargeProperty::PROPTYPE_SIZE:
{
- MultiItemsGuard aMultiGuard( out() );
+ MultiItemsGuard aMultiGuard( mxOut );
writeEmptyItem( aIt->maItemName );
dumpDec< sal_Int32 >( "width", "CONV-HMM-TO-CM" );
dumpDec< sal_Int32 >( "height", "CONV-HMM-TO-CM" );
@@ -842,13 +1274,13 @@ void OcxPropertyObjectBase::dumpLargeProperties()
case LargeProperty::PROPTYPE_STRINGARRAY:
{
writeEmptyItem( aIt->maItemName );
- IndentGuard aIndGuard2( out() );
- out().resetItemIndex();
- sal_Int64 nEndPos = in().tell() + aIt->mnDataSize;
- while( in().tell() < nEndPos )
+ IndentGuard aIndGuard2( mxOut );
+ mxOut->resetItemIndex();
+ sal_Int64 nEndPos = mxStrm->tell() + aIt->mnDataSize;
+ while( mxStrm->tell() < nEndPos )
{
- MultiItemsGuard aMultiGuard( out() );
- sal_uInt32 nDataSize = dumpHex< sal_uInt32 >( "#flags", "OCX-ARRAYSTRINGLEN" );
+ MultiItemsGuard aMultiGuard( mxOut );
+ sal_uInt32 nDataSize = dumpHex< sal_uInt32 >( "#flags", "AX-ARRAYSTRINGLEN" );
dumpString( "string", nDataSize, true );
}
dumpToPosition( nEndPos );
@@ -862,20 +1294,20 @@ void OcxPropertyObjectBase::dumpLargeProperties()
if( ensureValid() && !maStreamProps.empty() )
{
writeEmptyItem( "stream-properties" );
- IndentGuard aIndGuard( out() );
+ IndentGuard aIndGuard( mxOut );
for( StreamPropertyVector::iterator aIt = maStreamProps.begin(), aEnd = maStreamProps.end(); ensureValid() && (aIt != aEnd); ++aIt )
{
writeEmptyItem( aIt->maItemName );
if( ensureValid( aIt->mnData == 0xFFFF ) )
{
- IndentGuard aIndGuard2( out() );
+ IndentGuard aIndGuard2( mxOut );
OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() );
if( aClassName.equalsAscii( "StdFont" ) )
StdFontObject( *this ).dump();
else if( aClassName.equalsAscii( "StdPic" ) )
StdPicObject( *this ).dump();
else if( aClassName.equalsAscii( "CFontNew" ) )
- OcxCFontNewObject( *this ).dump();
+ AxCFontNewObject( *this ).dump();
else
ensureValid( false );
}
@@ -885,43 +1317,43 @@ void OcxPropertyObjectBase::dumpLargeProperties()
// ============================================================================
-OcxCFontNewObject::OcxCFontNewObject( const InputObjectBase& rParent )
+AxCFontNewObject::AxCFontNewObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-CFONTNEW-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "AX-CFONTNEW-PROPERTIES" );
}
-void OcxCFontNewObject::implDumpShortProperties()
+void AxCFontNewObject::implDumpShortProperties()
{
dumpStringProperty();
- dumpFlagsProperty( 0, "OCX-CFONTNEW-FLAGS" );
+ dumpFlagsProperty( 0, "AX-CFONTNEW-FLAGS" );
dumpDecProperty< sal_Int32 >( 160 );
dumpDecProperty< sal_Int32 >( 0 );
- dumpDecProperty< sal_uInt8 >( 1, "CHARSET" );
+ dumpDecProperty< sal_uInt8 >( WINDOWS_CHARSET_DEFAULT, "CHARSET" );
dumpDecProperty< sal_uInt8 >( 0, "FONT-PITCHFAMILY" );
- dumpDecProperty< sal_uInt8 >( 1, "OCX-CFONTNEW-ALIGNMENT" );
+ dumpDecProperty< sal_uInt8 >( 1, "AX-CFONTNEW-ALIGNMENT" );
dumpDecProperty< sal_uInt16 >( 400, "FONT-WEIGHT" );
}
// ============================================================================
-OcxColumnInfoObject::OcxColumnInfoObject( const InputObjectBase& rParent )
+AxColumnInfoObject::AxColumnInfoObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-COLUMNINFO-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "AX-COLUMNINFO-PROPERTIES" );
}
-void OcxColumnInfoObject::implDumpShortProperties()
+void AxColumnInfoObject::implDumpShortProperties()
{
dumpDecProperty< sal_Int32 >( -1, "CONV-HMM-TO-CM" );
}
// ============================================================================
-OcxCommandButtonObject::OcxCommandButtonObject( const InputObjectBase& rParent )
+AxCommandButtonObject::AxCommandButtonObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-COMMANDBUTTON-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "AX-COMMANDBUTTON-PROPERTIES" );
}
-void OcxCommandButtonObject::implDumpShortProperties()
+void AxCommandButtonObject::implDumpShortProperties()
{
dumpColorProperty( 0x80000012 );
dumpColorProperty( 0x80000008 );
@@ -936,42 +1368,42 @@ void OcxCommandButtonObject::implDumpShortProperties()
dumpStreamProperty();
}
-void OcxCommandButtonObject::implDumpExtended()
+void AxCommandButtonObject::implDumpExtended()
{
dumpEmbeddedFont();
}
// ============================================================================
-OcxMorphControlObject::OcxMorphControlObject( const InputObjectBase& rParent )
+AxMorphControlObject::AxMorphControlObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-MORPH-PROPERTIES", true );
+ AxPropertyObjectBase::construct( rParent, "AX-MORPH-PROPERTIES", true );
}
-void OcxMorphControlObject::implDumpShortProperties()
+void AxMorphControlObject::implDumpShortProperties()
{
dumpFlagsProperty( 0x2C80081B );
dumpColorProperty( 0x80000005 );
dumpColorProperty( 0x80000008 );
dumpDecProperty< sal_uInt32 >( 0 );
dumpBorderStyleProperty< sal_uInt8 >( 0 );
- dumpDecProperty< sal_uInt8 >( 0, "OCX-MORPH-SCROLLBARS" );
- mnCtrlType = dumpDecProperty< sal_uInt8 >( 1, "OCX-MORPH-CONTROLTYPE" );
+ dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-SCROLLBARS" );
+ mnCtrlType = dumpDecProperty< sal_uInt8 >( 1, "AX-MORPH-CONTROLTYPE" );
dumpMousePtrProperty();
dumpSizeProperty();
dumpUnicodeProperty();
dumpDecProperty< sal_uInt32 >( 0, "CONV-HMM-TO-CM" );
- dumpDecProperty< sal_uInt16 >( 1, "OCX-MORPH-BOUNDCOLUMN" );
- dumpDecProperty< sal_Int16 >( -1, "OCX-MORPH-TEXTCOLUMN" );
- dumpDecProperty< sal_Int16 >( 1, "OCX-MORPH-COLUMNCOUNT" );
+ dumpDecProperty< sal_uInt16 >( 1, "AX-MORPH-BOUNDCOLUMN" );
+ dumpDecProperty< sal_Int16 >( -1, "AX-MORPH-TEXTCOLUMN" );
+ dumpDecProperty< sal_Int16 >( 1, "AX-MORPH-COLUMNCOUNT" );
dumpDecProperty< sal_uInt16 >( 8 );
mnColInfoCount = dumpDecProperty< sal_uInt16 >( 1 );
- dumpDecProperty< sal_uInt8 >( 2, "OCX-MORPH-MATCHENTRYTYPE" );
- dumpDecProperty< sal_uInt8 >( 0, "OCX-MORPH-LISTSTYLE" );
- dumpDecProperty< sal_uInt8 >( 0, "OCX-MORPH-SHOWDROPDOWNMODE" );
+ dumpDecProperty< sal_uInt8 >( 2, "AX-MORPH-MATCHENTRYTYPE" );
+ dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-LISTSTYLE" );
+ dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-SHOWDROPDOWNMODE" );
dumpUnknownProperty();
- dumpDecProperty< sal_uInt8 >( 1, "OCX-MORPH-DROPDOWNSTYLE" );
- dumpDecProperty< sal_uInt8 >( 0, "OCX-MORPH-SELECTIONTYPE" );
+ dumpDecProperty< sal_uInt8 >( 1, "AX-MORPH-DROPDOWNSTYLE" );
+ dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-SELECTIONTYPE" );
dumpStringProperty();
dumpStringProperty();
dumpImagePosProperty();
@@ -985,34 +1417,34 @@ void OcxMorphControlObject::implDumpShortProperties()
dumpStringProperty();
}
-void OcxMorphControlObject::implDumpExtended()
+void AxMorphControlObject::implDumpExtended()
{
dumpEmbeddedFont();
dumpColumnInfos();
}
-void OcxMorphControlObject::dumpColumnInfos()
+void AxMorphControlObject::dumpColumnInfos()
{
if( ensureValid() && (mnColInfoCount > 0) && ((mnCtrlType == 2) || (mnCtrlType == 3)) )
{
- out().resetItemIndex();
+ mxOut->resetItemIndex();
for( sal_uInt16 nIdx = 0; ensureValid() && (nIdx < mnColInfoCount); ++nIdx )
{
writeEmptyItem( "#column-info" );
- IndentGuard aIndGuard( out() );
- OcxColumnInfoObject( *this ).dump();
+ IndentGuard aIndGuard( mxOut );
+ AxColumnInfoObject( *this ).dump();
}
}
}
// ============================================================================
-OcxLabelObject::OcxLabelObject( const InputObjectBase& rParent )
+AxLabelObject::AxLabelObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-LABEL-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "AX-LABEL-PROPERTIES" );
}
-void OcxLabelObject::implDumpShortProperties()
+void AxLabelObject::implDumpShortProperties()
{
dumpColorProperty( 0x80000012 );
dumpColorProperty( 0x8000000F );
@@ -1029,19 +1461,19 @@ void OcxLabelObject::implDumpShortProperties()
dumpStreamProperty();
}
-void OcxLabelObject::implDumpExtended()
+void AxLabelObject::implDumpExtended()
{
dumpEmbeddedFont();
}
// ============================================================================
-OcxImageObject::OcxImageObject( const InputObjectBase& rParent )
+AxImageObject::AxImageObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-IMAGE-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "AX-IMAGE-PROPERTIES" );
}
-void OcxImageObject::implDumpShortProperties()
+void AxImageObject::implDumpShortProperties()
{
dumpUnknownProperty();
dumpUnknownProperty();
@@ -1062,12 +1494,12 @@ void OcxImageObject::implDumpShortProperties()
// ============================================================================
-OcxScrollBarObject::OcxScrollBarObject( const InputObjectBase& rParent )
+AxScrollBarObject::AxScrollBarObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-SCROLLBAR-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "AX-SCROLLBAR-PROPERTIES" );
}
-void OcxScrollBarObject::implDumpShortProperties()
+void AxScrollBarObject::implDumpShortProperties()
{
dumpColorProperty( 0x80000012 );
dumpColorProperty( 0x8000000F );
@@ -1083,19 +1515,19 @@ void OcxScrollBarObject::implDumpShortProperties()
dumpDecProperty< sal_Int32 >( 1 );
dumpDecProperty< sal_Int32 >( 1 );
dumpOrientationProperty();
- dumpDecProperty< sal_Int16 >( -1, "OCX-SCROLLBAR-PROPTHUMB" );
+ dumpDecProperty< sal_Int16 >( -1, "AX-SCROLLBAR-PROPTHUMB" );
dumpDelayProperty();
dumpStreamProperty();
}
// ============================================================================
-OcxSpinButtonObject::OcxSpinButtonObject( const InputObjectBase& rParent )
+AxSpinButtonObject::AxSpinButtonObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-SPINBUTTON-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "AX-SPINBUTTON-PROPERTIES" );
}
-void OcxSpinButtonObject::implDumpShortProperties()
+void AxSpinButtonObject::implDumpShortProperties()
{
dumpColorProperty( 0x80000012 );
dumpColorProperty( 0x8000000F );
@@ -1116,12 +1548,12 @@ void OcxSpinButtonObject::implDumpShortProperties()
// ============================================================================
-OcxTabStripObject::OcxTabStripObject( const InputObjectBase& rParent )
+AxTabStripObject::AxTabStripObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-TABSTRIP-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "AX-TABSTRIP-PROPERTIES" );
}
-void OcxTabStripObject::implDumpShortProperties()
+void AxTabStripObject::implDumpShortProperties()
{
dumpDecProperty< sal_Int32 >( -1 );
dumpColorProperty( 0x8000000F );
@@ -1131,8 +1563,8 @@ void OcxTabStripObject::implDumpShortProperties()
dumpStringArrayProperty();
dumpMousePtrProperty();
dumpUnknownProperty();
- dumpDecProperty< sal_uInt32 >( 0, "OCX-TABSTRIP-ORIENTATION" );
- dumpDecProperty< sal_uInt32 >( 0, "OCX-TABSTRIP-TABSTYLE" );
+ dumpDecProperty< sal_uInt32 >( 0, "AX-TABSTRIP-ORIENTATION" );
+ dumpDecProperty< sal_uInt32 >( 0, "AX-TABSTRIP-TABSTYLE" );
dumpBoolProperty();
dumpHmmProperty();
dumpHmmProperty();
@@ -1150,35 +1582,43 @@ void OcxTabStripObject::implDumpShortProperties()
dumpStreamProperty();
}
-void OcxTabStripObject::implDumpExtended()
+void AxTabStripObject::implDumpExtended()
{
dumpEmbeddedFont();
if( mnTabFlagCount > 0 )
{
writeEmptyItem( "tab-flags" );
- IndentGuard aIndGuard( out() );
- out().resetItemIndex();
+ IndentGuard aIndGuard( mxOut );
+ mxOut->resetItemIndex();
for( sal_Int32 nIdx = 0; ensureValid() && (nIdx < mnTabFlagCount); ++nIdx )
- dumpHex< sal_uInt32 >( "#flags", "OCX-TABSTRIP-FLAGS" );
+ dumpHex< sal_uInt32 >( "#flags", "AX-TABSTRIP-FLAGS" );
}
}
// ============================================================================
+// ============================================================================
-OcxControlObject::OcxControlObject( const InputObjectBase& rParent, const OUString& rProgId, sal_Int64 nLength ) :
- maProgId( rProgId ),
- mnLength( nLength )
+FormControlStreamObject::FormControlStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, const OUString* pProgId )
{
- InputObjectBase::construct( rParent );
+ construct( rParent, rxStrm, rSysFileName );
+ constructFormCtrlStrmObj( pProgId );
}
-void OcxControlObject::implDump()
+FormControlStreamObject::FormControlStreamObject( const OutputObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString* pProgId )
{
- sal_Int64 nEndPos = in().tell() + ::std::max< sal_Int64 >( mnLength, 0 );
- if( (maProgId.getLength() > 0) && (mnLength > 0) && !in().isEof() )
+ construct( rParent, rxStrm );
+ constructFormCtrlStrmObj( pProgId );
+}
+
+void FormControlStreamObject::implDump()
+{
+ if( mbReadGuid )
+ maProgId = cfg().getStringOption( dumpGuid(), OUString() );
+
+ if( (maProgId.getLength() > 0) && !mxStrm->isEof() )
{
if( maProgId.equalsAscii( "Forms.CommandButton.1" ) )
- OcxCommandButtonObject( *this ).dump();
+ AxCommandButtonObject( *this ).dump();
else if( maProgId.equalsAscii( "Forms.TextBox.1" ) ||
maProgId.equalsAscii( "Forms.ListBox.1" ) ||
maProgId.equalsAscii( "Forms.ComboBox.1" ) ||
@@ -1186,161 +1626,76 @@ void OcxControlObject::implDump()
maProgId.equalsAscii( "Forms.OptionButton.1" ) ||
maProgId.equalsAscii( "Forms.ToggleButton.1" ) ||
maProgId.equalsAscii( "RefEdit.Ctrl" ) )
- OcxMorphControlObject( *this ).dump();
+ AxMorphControlObject( *this ).dump();
else if( maProgId.equalsAscii( "Forms.Label.1" ) )
- OcxLabelObject( *this ).dump();
+ AxLabelObject( *this ).dump();
else if( maProgId.equalsAscii( "Forms.Image.1" ) )
- OcxImageObject( *this ).dump();
+ AxImageObject( *this ).dump();
else if( maProgId.equalsAscii( "Forms.ScrollBar.1" ) )
- OcxScrollBarObject( *this ).dump();
+ AxScrollBarObject( *this ).dump();
else if( maProgId.equalsAscii( "Forms.SpinButton.1" ) )
- OcxSpinButtonObject( *this ).dump();
+ AxSpinButtonObject( *this ).dump();
else if( maProgId.equalsAscii( "Forms.TabStrip.1" ) )
- OcxTabStripObject( *this ).dump();
+ AxTabStripObject( *this ).dump();
+ else if( maProgId.equalsAscii( "MSComCtl2.FlatScrollBar.2" ) )
+ ComCtlScrollBarObject( *this, 6 ).dump();
+ else if( maProgId.equalsAscii( "COMCTL.ProgCtrl.1" ) )
+ ComCtlProgressBarObject( *this, 5 ).dump();
+ else if( maProgId.equalsAscii( "MSComctlLib.ProgCtrl.2" ) )
+ ComCtlProgressBarObject( *this, 6 ).dump();
+ else if( maProgId.equalsAscii( "COMCTL.Slider.1" ) )
+ ComCtlSliderObject( *this, 5 ).dump();
+ else if( maProgId.equalsAscii( "MSComctlLib.Slider.2" ) )
+ ComCtlSliderObject( *this, 6 ).dump();
+ else if( maProgId.equalsAscii( "ComCtl2.UpDown.1" ) )
+ ComCtlUpDownObject( *this, 5 ).dump();
+ else if( maProgId.equalsAscii( "MSComCtl2.UpDown.2" ) )
+ ComCtlUpDownObject( *this, 6 ).dump();
+ else if( maProgId.equalsAscii( "COMCTL.ImageListCtrl.1" ) )
+ ComCtlImageListObject( *this, 5 ).dump();
+ else if( maProgId.equalsAscii( "MSComctlLib.ImageListCtrl.2" ) )
+ ComCtlImageListObject( *this, 6 ).dump();
+ else if( maProgId.equalsAscii( "COMCTL.TabStrip.1" ) )
+ ComCtlTabStripObject( *this, 5 ).dump();
+ else if( maProgId.equalsAscii( "MSComctlLib.TabStrip.2" ) )
+ ComCtlTabStripObject( *this, 6 ).dump();
+ else if( maProgId.equalsAscii( "COMCTL.TreeCtrl.1" ) )
+ ComCtlTreeViewObject( *this, 5 ).dump();
+ else if( maProgId.equalsAscii( "MSComctlLib.TreeCtrl.2" ) )
+ ComCtlTreeViewObject( *this, 6 ).dump();
+ else if( maProgId.equalsAscii( "COMCTL.SBarCtrl.1" ) )
+ ComCtlStatusBarObject( *this, 5 ).dump();
else if( maProgId.equalsAscii( "StdPic" ) )
StdPicObject( *this ).dump();
}
- dumpRemainingTo( nEndPos );
-}
-
-// ============================================================================
-
-OcxGuidControlObject::OcxGuidControlObject( const InputObjectBase& rParent, sal_Int64 nLength ) :
- mnLength( nLength )
-{
- InputObjectBase::construct( rParent );
-}
-
-OcxGuidControlObject::OcxGuidControlObject( const OutputObjectBase& rParent, const BinaryInputStreamRef& rxStrm )
-{
- mnLength = rxStrm.get() ? rxStrm->getLength() : -1;
- InputObjectBase::construct( rParent, rxStrm );
-}
-
-OcxGuidControlObject::OcxGuidControlObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
-{
- mnLength = rxStrm.get() ? rxStrm->getLength() : -1;
- InputObjectBase::construct( rParent, rxStrm, rSysFileName );
-}
-
-void OcxGuidControlObject::implDump()
-{
- OUString aProgId = cfg().getStringOption( dumpGuid(), OUString() );
- OcxControlObject( *this, aProgId, mnLength - 16 ).dump();
-}
-
-// ============================================================================
-
-OcxControlsStreamObject::OcxControlsStreamObject( const ObjectBase& rParent,
- const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, OcxFormSharedData& rFormData ) :
- mrFormData( rFormData )
-{
- InputObjectBase::construct( rParent, rxStrm, rSysFileName );
-}
-
-void OcxControlsStreamObject::implDump()
-{
- for( OcxFormSiteInfoVector::iterator aIt = mrFormData.maSiteInfos.begin(), aEnd = mrFormData.maSiteInfos.end(); !in().isEof() && (aIt != aEnd); ++aIt )
- {
- if( (aIt->mbInStream) && (aIt->mnLength > 0) )
- {
- out().emptyLine();
- writeDecItem( "control-id", aIt->mnId );
- writeInfoItem( "prog-id", aIt->maProgId );
- IndentGuard aIndGuard( out() );
- OcxControlObject( *this, aIt->maProgId, aIt->mnLength ).dump();
- }
- }
dumpRemainingStream();
}
-// ============================================================================
-// ============================================================================
-
-OcxPageObject::OcxPageObject( const InputObjectBase& rParent )
+void FormControlStreamObject::constructFormCtrlStrmObj( const OUString* pProgId )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-PAGE-PROPERTIES" );
-}
-
-void OcxPageObject::implDumpShortProperties()
-{
- dumpUnknownProperty();
- dumpDecProperty< sal_uInt32 >( 0, "OCX-PAGE-TRANSITIONEFFECT" );
- dumpDecProperty< sal_uInt32 >( 0, "OCX-CONV-MS" );
+ mbReadGuid = pProgId == 0;
+ if( pProgId )
+ maProgId = *pProgId;
}
// ============================================================================
-
-OcxMultiPageObject::OcxMultiPageObject( const InputObjectBase& rParent )
-{
- OcxPropertyObjectBase::construct( rParent, "OCX-MULTIPAGE-PROPERTIES" );
-}
-
-void OcxMultiPageObject::implDumpShortProperties()
-{
- dumpUnknownProperty();
- mnPageCount = dumpDecProperty< sal_Int32 >( 0 );
- dumpDecProperty< sal_Int32 >( 0 );
- dumpBoolProperty();
-}
-
-void OcxMultiPageObject::implDumpExtended()
-{
- if( ensureValid() && (mnPageCount > 0) )
- {
- writeEmptyItem( "page-ids" );
- IndentGuard aIndGuard( out() );
- out().resetItemIndex();
- for( sal_Int32 nIdx = 0; ensureValid() && (nIdx < mnPageCount); ++nIdx )
- dumpDec< sal_Int32 >( "#id" );
- }
-}
-
// ============================================================================
-OcxMultiPageStreamObject::OcxMultiPageStreamObject( const ObjectBase& rParent,
- const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, OcxFormSharedData& rFormData ) :
+VbaFormClassInfoObject::VbaFormClassInfoObject( const InputObjectBase& rParent, VbaFormSharedData& rFormData ) :
mrFormData( rFormData )
{
- InputObjectBase::construct( rParent, rxStrm, rSysFileName );
+ AxPropertyObjectBase::construct( rParent, "VBA-CLASSINFO-PROPERTIES" );
}
-void OcxMultiPageStreamObject::implDump()
-{
- for( size_t nIdx = 0, nCount = mrFormData.maSiteInfos.size(); !in().isEof() && (nIdx < nCount); ++nIdx )
- {
- out().emptyLine();
- writeEmptyItem( "page" );
- IndentGuard aIndGuard( out() );
- OcxPageObject( *this ).dump();
- }
- if( !in().isEof() )
- {
- out().emptyLine();
- writeEmptyItem( "multi-page" );
- IndentGuard aIndGuard( out() );
- OcxMultiPageObject( *this ).dump();
- }
- dumpRemainingStream();
-}
-
-// ============================================================================
-// ============================================================================
-
-OcxFormClassInfoObject::OcxFormClassInfoObject( const InputObjectBase& rParent, OcxFormSharedData& rFormData ) :
- mrFormData( rFormData )
-{
- OcxPropertyObjectBase::construct( rParent, "OCX-CLASSINFO-PROPERTIES" );
-}
-
-void OcxFormClassInfoObject::implDumpShortProperties()
+void VbaFormClassInfoObject::implDumpShortProperties()
{
mrFormData.maClassInfoProgIds.push_back( OUString() );
dumpGuidProperty( &mrFormData.maClassInfoProgIds.back() );
dumpGuidProperty();
dumpUnknownProperty();
dumpGuidProperty();
- dumpFlagsProperty( 0, "OCX-CLASSINFO-FLAGS" );
+ dumpFlagsProperty( 0, "VBA-CLASSINFO-FLAGS" );
+ dumpDecProperty< sal_uInt32 >( 0 );
dumpDecProperty< sal_Int32 >( -1 );
dumpDecProperty< sal_uInt16 >( 0 );
dumpDecProperty< sal_uInt16 >( 0 );
@@ -1356,32 +1711,32 @@ void OcxFormClassInfoObject::implDumpShortProperties()
namespace {
-const sal_uInt32 OCX_FORMSITE_OBJSTREAM = 0x0010;
+const sal_uInt32 VBA_FORMSITE_OBJSTREAM = 0x0010;
-const sal_uInt16 OCX_FORMSITE_CLASSTABLEINDEX = 0x8000;
-const sal_uInt16 OCX_FORMSITE_CLASSTABLEMASK = 0x7FFF;
+const sal_uInt16 VBA_FORMSITE_CLASSTABLEINDEX = 0x8000;
+const sal_uInt16 VBA_FORMSITE_CLASSTABLEMASK = 0x7FFF;
} // namespace
// ----------------------------------------------------------------------------
-OcxFormSiteObject::OcxFormSiteObject( const InputObjectBase& rParent, OcxFormSharedData& rFormData ) :
+VbaFormSiteObject::VbaFormSiteObject( const InputObjectBase& rParent, VbaFormSharedData& rFormData ) :
mrFormData( rFormData )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-FORMSITE-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "VBA-FORMSITE-PROPERTIES" );
}
-void OcxFormSiteObject::implDumpShortProperties()
+void VbaFormSiteObject::implDumpShortProperties()
{
- OcxFormSiteInfo aSiteInfo;
+ VbaFormSiteInfo aSiteInfo;
dumpStringProperty();
dumpStringProperty();
sal_Int32 nId = dumpDecProperty< sal_Int32 >( 0 );
dumpDecProperty< sal_Int32 >( 0 );
- sal_uInt32 nFlags = dumpFlagsProperty( 0x00000033, "OCX-FORMSITE-FLAGS" );
+ sal_uInt32 nFlags = dumpFlagsProperty( 0x00000033, "VBA-FORMSITE-FLAGS" );
sal_uInt32 nLength = dumpDecProperty< sal_uInt32 >( 0 );
dumpDecProperty< sal_Int16 >( -1 );
- sal_uInt16 nClassId = dumpHexProperty< sal_uInt16 >( 0x7FFF, "OCX-FORMSITE-CLASSIDCACHE" );
+ sal_uInt16 nClassId = dumpHexProperty< sal_uInt16 >( 0x7FFF, "VBA-FORMSITE-CLASSIDCACHE" );
dumpPosProperty();
dumpDecProperty< sal_uInt16 >( 0 );
dumpUnknownProperty();
@@ -1390,61 +1745,61 @@ void OcxFormSiteObject::implDumpShortProperties()
dumpStringProperty();
dumpStringProperty();
- sal_uInt16 nIndex = nClassId & OCX_FORMSITE_CLASSTABLEMASK;
- if( getFlag( nClassId, OCX_FORMSITE_CLASSTABLEINDEX ) )
+ sal_uInt16 nIndex = nClassId & VBA_FORMSITE_CLASSTABLEMASK;
+ if( getFlag( nClassId, VBA_FORMSITE_CLASSTABLEINDEX ) )
{
if( nIndex < mrFormData.maClassInfoProgIds.size() )
aSiteInfo.maProgId = mrFormData.maClassInfoProgIds[ nIndex ];
}
else
{
- if( cfg().hasName( "OCX-FORMSITE-CLASSNAMES", nIndex ) )
- aSiteInfo.maProgId = cfg().getName( "OCX-FORMSITE-CLASSNAMES", nIndex );
+ if( cfg().hasName( "VBA-FORMSITE-CLASSNAMES", nIndex ) )
+ aSiteInfo.maProgId = cfg().getName( "VBA-FORMSITE-CLASSNAMES", nIndex );
}
aSiteInfo.mnId = nId;
aSiteInfo.mnLength = nLength;
- aSiteInfo.mbInStream = getFlag( nFlags, OCX_FORMSITE_OBJSTREAM );
+ aSiteInfo.mbInStream = getFlag( nFlags, VBA_FORMSITE_OBJSTREAM );
mrFormData.maSiteInfos.push_back( aSiteInfo );
}
// ============================================================================
-OcxFormDesignExtObject::OcxFormDesignExtObject( const InputObjectBase& rParent )
+VbaFormDesignExtObject::VbaFormDesignExtObject( const InputObjectBase& rParent )
{
- OcxPropertyObjectBase::construct( rParent, "OCX-FORMDESIGNEXT-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, "VBA-FORMDESIGNEXT-PROPERTIES" );
}
-void OcxFormDesignExtObject::implDumpShortProperties()
+void VbaFormDesignExtObject::implDumpShortProperties()
{
- dumpFlagsProperty( 0x00015F55, "OCX-FORMDESIGNEXT-FLAGS" );
+ dumpFlagsProperty( 0x00015F55, "VBA-FORMDESIGNEXT-FLAGS" );
dumpHmmProperty();
dumpHmmProperty();
- dumpDecProperty< sal_Int8 >( 0, "OCX-FORMDESIGNEXT-CLICKCTRLMODE" );
- dumpDecProperty< sal_Int8 >( 0, "OCX-FORMDESIGNEXT-DBLCLICKCTRLMODE" );
+ dumpDecProperty< sal_Int8 >( 0, "VBA-FORMDESIGNEXT-CLICKCTRLMODE" );
+ dumpDecProperty< sal_Int8 >( 0, "VBA-FORMDESIGNEXT-DBLCLICKCTRLMODE" );
}
// ============================================================================
namespace {
-const sal_uInt32 OCX_FORM_HASDESIGNEXTENDER = 0x00004000;
-const sal_uInt32 OCX_FORM_SKIPCLASSTABLE = 0x00008000;
+const sal_uInt32 AX_FORM_HASDESIGNEXTENDER = 0x00004000;
+const sal_uInt32 AX_FORM_SKIPCLASSTABLE = 0x00008000;
-const sal_uInt8 OCX_FORM_SITECOUNTTYPE_COUNT = 0x80;
-const sal_uInt8 OCX_FORM_SITECOUNTTYPE_MASK = 0x7F;
+const sal_uInt8 AX_FORM_SITECOUNTTYPE_COUNT = 0x80;
+const sal_uInt8 AX_FORM_SITECOUNTTYPE_MASK = 0x7F;
} // namespace
// ----------------------------------------------------------------------------
-OcxFormObject::OcxFormObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, OcxFormSharedData& rFormData ) :
+VbaFStreamObject::VbaFStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaFormSharedData& rFormData ) :
mrFormData( rFormData )
{
- OcxPropertyObjectBase::construct( rParent, rxStrm, rSysFileName, "OCX-FORM-PROPERTIES" );
+ AxPropertyObjectBase::construct( rParent, rxStrm, rSysFileName, "VBA-FORM-PROPERTIES" );
}
-void OcxFormObject::implDumpShortProperties()
+void VbaFStreamObject::implDumpShortProperties()
{
dumpUnknownProperty();
dumpColorProperty( 0x8000000F );
@@ -1452,17 +1807,17 @@ void OcxFormObject::implDumpShortProperties()
dumpDecProperty< sal_uInt32 >( 0 );
dumpUnknownProperty();
dumpUnknownProperty();
- mnFlags = dumpFlagsProperty( 0x00000004, "OCX-FORM-FLAGS" );
+ mnFlags = dumpFlagsProperty( 0x00000004, "VBA-FORM-FLAGS" );
dumpBorderStyleProperty< sal_uInt8 >( 0 );
dumpMousePtrProperty();
- dumpHexProperty< sal_uInt8 >( 0x0C, "OCX-FORM-SCROLLBARS" );
+ dumpHexProperty< sal_uInt8 >( 0x0C, "VBA-FORM-SCROLLBARS" );
dumpSizeProperty();
dumpSizeProperty();
dumpPosProperty();
dumpDecProperty< sal_uInt32 >( 0 );
dumpUnknownProperty();
dumpStreamProperty();
- dumpDecProperty< sal_uInt8 >( 0, "OCX-FORM-CYCLE" );
+ dumpDecProperty< sal_uInt8 >( 0, "VBA-FORM-CYCLE" );
dumpSpecialEffectProperty< sal_uInt8 >( 0 );
dumpColorProperty( 0x80000012 );
dumpStringProperty();
@@ -1476,7 +1831,7 @@ void OcxFormObject::implDumpShortProperties()
dumpDecProperty< sal_uInt32 >( 0 );
}
-void OcxFormObject::implDumpExtended()
+void VbaFStreamObject::implDumpExtended()
{
dumpClassInfos();
dumpSiteData();
@@ -1484,58 +1839,58 @@ void OcxFormObject::implDumpExtended()
dumpRemainingStream();
}
-void OcxFormObject::dumpClassInfos()
+void VbaFStreamObject::dumpClassInfos()
{
- if( ensureValid() && !getFlag( mnFlags, OCX_FORM_SKIPCLASSTABLE ) )
+ if( ensureValid() && !getFlag( mnFlags, AX_FORM_SKIPCLASSTABLE ) )
{
- out().emptyLine();
+ mxOut->emptyLine();
sal_uInt16 nCount = dumpDec< sal_uInt16 >( "class-info-count" );
- out().resetItemIndex();
+ mxOut->resetItemIndex();
for( sal_uInt16 nIdx = 0; ensureValid() && (nIdx < nCount); ++nIdx )
{
writeEmptyItem( "#class-info" );
- IndentGuard aIndGuard( out() );
- OcxFormClassInfoObject( *this, mrFormData ).dump();
+ IndentGuard aIndGuard( mxOut );
+ VbaFormClassInfoObject( *this, mrFormData ).dump();
}
}
}
-void OcxFormObject::dumpFormSites( sal_uInt32 nCount )
+void VbaFStreamObject::dumpFormSites( sal_uInt32 nCount )
{
- out().resetItemIndex();
+ mxOut->resetItemIndex();
for( sal_uInt32 nIdx = 0; ensureValid() && (nIdx < nCount); ++nIdx )
{
- out().emptyLine();
+ mxOut->emptyLine();
writeEmptyItem( "#form-site" );
- IndentGuard aIndGuard( out() );
- OcxFormSiteObject( *this, mrFormData ).dump();
+ IndentGuard aIndGuard( mxOut );
+ VbaFormSiteObject( *this, mrFormData ).dump();
}
}
-void OcxFormObject::dumpSiteData()
+void VbaFStreamObject::dumpSiteData()
{
if( ensureValid() )
{
- out().emptyLine();
+ mxOut->emptyLine();
setAlignAnchor();
sal_uInt32 nSiteCount = dumpDec< sal_uInt32 >( "site-count" );
sal_uInt32 nSiteLength = dumpDec< sal_uInt32 >( "site-data-size" );
- sal_Int64 nEndPos = in().tell() + nSiteLength;
- if( ensureValid( nEndPos <= in().getLength() ) )
+ sal_Int64 nEndPos = mxStrm->tell() + nSiteLength;
+ if( ensureValid( nEndPos <= mxStrm->getLength() ) )
{
- out().resetItemIndex();
+ mxOut->resetItemIndex();
sal_uInt32 nSiteIdx = 0;
while( ensureValid() && (nSiteIdx < nSiteCount) )
{
- out().emptyLine();
+ mxOut->emptyLine();
writeEmptyItem( "#site-info" );
- IndentGuard aIndGuard( out() );
+ IndentGuard aIndGuard( mxOut );
dumpDec< sal_uInt8 >( "depth" );
- sal_uInt8 nTypeCount = dumpHex< sal_uInt8 >( "type-count", "OCX-FORM-SITE-TYPECOUNT" );
- if( getFlag( nTypeCount, OCX_FORM_SITECOUNTTYPE_COUNT ) )
+ sal_uInt8 nTypeCount = dumpHex< sal_uInt8 >( "type-count", "VBA-FORM-SITE-TYPECOUNT" );
+ if( getFlag( nTypeCount, AX_FORM_SITECOUNTTYPE_COUNT ) )
{
dumpDec< sal_uInt8 >( "repeated-type" );
- nSiteIdx += (nTypeCount & OCX_FORM_SITECOUNTTYPE_MASK);
+ nSiteIdx += (nTypeCount & AX_FORM_SITECOUNTTYPE_MASK);
}
else
{
@@ -1549,46 +1904,141 @@ void OcxFormObject::dumpSiteData()
}
}
-void OcxFormObject::dumpDesignExtender()
+void VbaFStreamObject::dumpDesignExtender()
{
- if( ensureValid() && getFlag( mnFlags, OCX_FORM_HASDESIGNEXTENDER ) )
+ if( ensureValid() && getFlag( mnFlags, AX_FORM_HASDESIGNEXTENDER ) )
{
- out().emptyLine();
+ mxOut->emptyLine();
writeEmptyItem( "design-extender" );
- IndentGuard aIndGuard( out() );
- OcxFormDesignExtObject( *this ).dump();
+ IndentGuard aIndGuard( mxOut );
+ VbaFormDesignExtObject( *this ).dump();
+ }
+}
+
+// ============================================================================
+
+VbaOStreamObject::VbaOStreamObject( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaFormSharedData& rFormData ) :
+ mrFormData( rFormData )
+{
+ OleInputObjectBase::construct( rParent, rxStrm, rSysFileName );
+}
+
+void VbaOStreamObject::implDump()
+{
+ for( VbaFormSiteInfoVector::iterator aIt = mrFormData.maSiteInfos.begin(), aEnd = mrFormData.maSiteInfos.end(); !mxStrm->isEof() && (aIt != aEnd); ++aIt )
+ {
+ if( (aIt->mbInStream) && (aIt->mnLength > 0) )
+ {
+ mxOut->emptyLine();
+ writeDecItem( "control-id", aIt->mnId );
+ writeInfoItem( "prog-id", aIt->maProgId );
+ IndentGuard aIndGuard( mxOut );
+ RelativeInputStreamRef xRelStrm( new RelativeInputStream( *mxStrm, aIt->mnLength ) );
+ FormControlStreamObject( *this, xRelStrm, &aIt->maProgId ).dump();
+ }
}
+ dumpRemainingStream();
+}
+
+// ============================================================================
+
+VbaPageObject::VbaPageObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "VBA-PAGE-PROPERTIES" );
+}
+
+void VbaPageObject::implDumpShortProperties()
+{
+ dumpUnknownProperty();
+ dumpDecProperty< sal_uInt32 >( 0, "VBA-PAGE-TRANSITIONEFFECT" );
+ dumpDecProperty< sal_uInt32 >( 0, "AX-CONV-MS" );
}
// ============================================================================
-OcxFormStorageObject::OcxFormStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath ) :
+VbaMultiPageObject::VbaMultiPageObject( const InputObjectBase& rParent )
+{
+ AxPropertyObjectBase::construct( rParent, "VBA-MULTIPAGE-PROPERTIES" );
+}
+
+void VbaMultiPageObject::implDumpShortProperties()
+{
+ dumpUnknownProperty();
+ mnPageCount = dumpDecProperty< sal_Int32 >( 0 );
+ dumpDecProperty< sal_Int32 >( 0 );
+ dumpBoolProperty();
+}
+
+void VbaMultiPageObject::implDumpExtended()
+{
+ if( ensureValid() && (mnPageCount > 0) )
+ {
+ writeEmptyItem( "page-ids" );
+ IndentGuard aIndGuard( mxOut );
+ mxOut->resetItemIndex();
+ for( sal_Int32 nIdx = 0; ensureValid() && (nIdx < mnPageCount); ++nIdx )
+ dumpDec< sal_Int32 >( "#id" );
+ }
+}
+
+// ============================================================================
+
+VbaXStreamObject::VbaXStreamObject( const ObjectBase& rParent,
+ const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaFormSharedData& rFormData ) :
+ mrFormData( rFormData )
+{
+ InputObjectBase::construct( rParent, rxStrm, rSysFileName );
+}
+
+void VbaXStreamObject::implDump()
+{
+ for( size_t nIdx = 0, nCount = mrFormData.maSiteInfos.size(); !mxStrm->isEof() && (nIdx < nCount); ++nIdx )
+ {
+ mxOut->emptyLine();
+ writeEmptyItem( "page" );
+ IndentGuard aIndGuard( mxOut );
+ VbaPageObject( *this ).dump();
+ }
+ if( !mxStrm->isEof() )
+ {
+ mxOut->emptyLine();
+ writeEmptyItem( "multi-page" );
+ IndentGuard aIndGuard( mxOut );
+ VbaMultiPageObject( *this ).dump();
+ }
+ dumpRemainingStream();
+}
+
+// ============================================================================
+
+VbaContainerStorageObject::VbaContainerStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath ) :
OleStorageObject( rParent, rxStrg, rSysPath )
{
addPreferredStream( "f" );
}
-void OcxFormStorageObject::implDumpStream( const BinaryInputStreamRef& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
+void VbaContainerStorageObject::implDumpStream( const BinaryInputStreamRef& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
{
if( rStrmName.equalsAscii( "f" ) )
- OcxFormObject( *this, rxStrm, rSysFileName, maFormData ).dump();
+ VbaFStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
else if( rStrmName.equalsAscii( "o" ) )
- OcxControlsStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
+ VbaOStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
else if( rStrmName.equalsAscii( "x" ) )
- OcxMultiPageStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
+ VbaXStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
else
OleStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
}
-void OcxFormStorageObject::implDumpStorage( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rSysPath )
+void VbaContainerStorageObject::implDumpStorage( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rSysPath )
{
if( isFormStorage( rStrgPath ) )
- OcxFormStorageObject( *this, rxStrg, rSysPath ).dump();
+ VbaContainerStorageObject( *this, rxStrg, rSysPath ).dump();
else
OleStorageObject( *this, rxStrg, rSysPath ).dump();
}
-bool OcxFormStorageObject::isFormStorage( const OUString& rStrgPath ) const
+bool VbaContainerStorageObject::isFormStorage( const OUString& rStrgPath ) const
{
if( (rStrgPath.getLength() >= 3) && (rStrgPath[ 0 ] == 'i') )
{
@@ -1597,7 +2047,7 @@ bool OcxFormStorageObject::isFormStorage( const OUString& rStrgPath ) const
aId = aId.copy( 1 );
sal_Int32 nId = aId.toInt32();
if( (nId > 0) && (OUString::valueOf( nId ) == aId) )
- for( OcxFormSiteInfoVector::const_iterator aIt = maFormData.maSiteInfos.begin(), aEnd = maFormData.maSiteInfos.end(); aIt != aEnd; ++aIt )
+ for( VbaFormSiteInfoVector::const_iterator aIt = maFormData.maSiteInfos.begin(), aEnd = maFormData.maSiteInfos.end(); aIt != aEnd; ++aIt )
if( aIt->mnId == nId )
return true;
}
@@ -1608,7 +2058,7 @@ bool OcxFormStorageObject::isFormStorage( const OUString& rStrgPath ) const
// ============================================================================
VbaSharedData::VbaSharedData() :
- meTextEnc( osl_getThreadTextEncoding() )
+ meTextEnc( RTL_TEXTENCODING_MS_1252 )
{
}
@@ -1659,7 +2109,7 @@ void VbaDirStreamObject::implDumpRecordBody()
switch( getRecId() )
{
case 0x0003:
- mrVbaData.meTextEnc = ::oox::xls::BiffHelper::calcTextEncodingFromCodePage( dumpDec< sal_uInt16 >( "codepage", "CODEPAGES" ) );
+ mrVbaData.meTextEnc = rtl_getTextEncodingFromWindowsCodePage( dumpDec< sal_uInt16 >( "codepage", "CODEPAGES" ) );
break;
case 0x0004:
dumpByteString( "name" );
@@ -1730,7 +2180,7 @@ void VbaDirStreamObject::implDumpRecordBody()
dumpUniString( "constants" );
break;
case 0x003D:
- dumpUniString( "helpfile-path" );
+ dumpByteString( "helpfile-path" );
break;
case 0x003E:
dumpUniString( "name" );
@@ -1759,7 +2209,7 @@ OUString VbaDirStreamObject::dumpUniString( const String& rName )
OUString VbaDirStreamObject::dumpByteStringWithLength( const String& rName )
{
- return dumpCharArray( rName, in().readInt32(), mrVbaData.meTextEnc );
+ return dumpCharArray( rName, mxStrm->readInt32(), mrVbaData.meTextEnc );
}
// ============================================================================
@@ -1776,10 +2226,10 @@ VbaModuleStreamObject::VbaModuleStreamObject(
void VbaModuleStreamObject::implDump()
{
dumpBinary( "perf-cache", mnStrmOffset );
- out().emptyLine();
+ mxOut->emptyLine();
writeEmptyItem( "source-code" );
- IndentGuard aIndGuard( out() );
- BinaryInputStreamRef xVbaStrm( new ::oox::ole::VbaInputStream( in() ) );
+ IndentGuard aIndGuard( mxOut );
+ BinaryInputStreamRef xVbaStrm( new ::oox::ole::VbaInputStream( *mxStrm ) );
TextStreamObject( *this, xVbaStrm, mrVbaData.meTextEnc ).dump();
}
@@ -1805,7 +2255,7 @@ void VbaStorageObject::implDumpStream( const BinaryInputStreamRef& rxStrm, const
// ============================================================================
VbaFormStorageObject::VbaFormStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath, VbaSharedData& rVbaData ) :
- OcxFormStorageObject( rParent, rxStrg, rSysPath ),
+ VbaContainerStorageObject( rParent, rxStrg, rSysPath ),
mrVbaData( rVbaData )
{
}
@@ -1815,7 +2265,7 @@ void VbaFormStorageObject::implDumpStream( const BinaryInputStreamRef& rxStrm, c
if( rStrmName.equalsAscii( "\003VBFrame" ) )
TextStreamObject( *this, rxStrm, mrVbaData.meTextEnc, rSysFileName ).dump();
else
- OcxFormStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
+ VbaContainerStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
}
// ============================================================================
@@ -1845,6 +2295,19 @@ void VbaProjectStorageObject::implDumpStorage( const StorageRef& rxStrg, const O
// ============================================================================
// ============================================================================
+ActiveXStorageObject::ActiveXStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath ) :
+ VbaContainerStorageObject( rParent, rxStrg, rSysPath )
+{
+}
+
+void ActiveXStorageObject::implDumpBaseStream( const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
+{
+ FormControlStreamObject( *this, rxStrm, rSysFileName ).dump();
+}
+
+// ============================================================================
+// ============================================================================
+
} // namespace dump
} // namespace oox