LibreOffice Module oox (master) 1
oledumper.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <sal/config.h>
21
22#include <string_view>
23
25
26#include <rtl/tencinfo.h>
27#include <o3tl/string_view.hxx>
29
30#ifdef DBG_UTIL
31
32namespace oox::dump {
33
34using namespace ::com::sun::star::io;
35using namespace ::com::sun::star::uno;
36
38{
39 return dumpCharArray( rName, mxStrm->readInt32(), RTL_TEXTENCODING_MS_1252 );
40}
41
43{
44 return dumpUnicodeArray( rName, mxStrm->readInt32() );
45}
46
48{
49 return dumpDec< sal_Int32 >( rName( "clipboard-format" ), "OLE-STD-CLIPBOARD-FORMAT" );
50}
51
53{
54 sal_Int32 nLen = mxStrm->readInt32();
55 return (nLen < 0) ? OUString::number( dumpStdClipboardFormat( rName ) ) : dumpCharArray( rName, nLen, RTL_TEXTENCODING_MS_1252 );
56}
57
59{
60 sal_Int32 nLen = mxStrm->readInt32();
61 return (nLen < 0) ? OUString::number( dumpStdClipboardFormat( rName ) ) : dumpUnicodeArray( rName, nLen );
62}
63
64void OleInputObjectBase::writeOleColorItem( const String& rName, sal_uInt32 nColor )
65{
66 MultiItemsGuard aMultiGuard( mxOut );
67 writeHexItem( rName, nColor, "OLE-COLOR" );
68}
69
70sal_uInt32 OleInputObjectBase::dumpOleColor( const String& rName )
71{
72 sal_uInt32 nOleColor = mxStrm->readuInt32();
73 writeOleColorItem( rName, nOleColor );
74 return nOleColor;
75}
76
78{
79 construct( rParent );
80}
81
83{
84 dumpDec< sal_uInt8 >( "version" );
85 dumpDec< sal_uInt16 >( "charset", "CHARSET" );
86 dumpHex< sal_uInt8 >( "flags", "STDFONT-FLAGS" );
87 dumpDec< sal_uInt16 >( "weight", "FONT-WEIGHT" );
88 dumpDec< sal_uInt32 >( "height", "STDFONT-HEIGHT" );
89 dumpCharArray( "name", mxStrm->readuInt8(), RTL_TEXTENCODING_ASCII_US );
90}
91
93{
94 construct( rParent );
95}
96
98{
99 dumpHex< sal_uInt32 >( "identifier", "STDPIC-ID" );
100 sal_uInt32 nSize = dumpHex< sal_uInt32 >( "image-size", "CONV-DEC" );
101 dumpBinary( "image-data", nSize );
102}
103
104OleStreamObject::OleStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
105{
106 construct( rParent, rxStrm, rSysFileName );
107}
108
109OleCompObjObject::OleCompObjObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName ) :
110 OleStreamObject( rParent, rxStrm, rSysFileName )
111{
112}
113
115{
116 dumpUnused( 4 );
117 dumpDec< sal_uInt32 >( "version" );
118 dumpUnused( 20 );
119 dumpAnsiString32( "ansi-display-name" );
120 dumpAnsiString32OrStdClip( "ansi-clipboard-format" );
121 if( mxStrm->getRemaining() >= 4 )
122 {
123 sal_Int32 nLen = mxStrm->readInt32();
124 if( (0 <= nLen) && (nLen <= 40) )
125 {
126 dumpCharArray( "ansi-unused", nLen, RTL_TEXTENCODING_MS_1252 );
127 if( (mxStrm->getRemaining() >= 4) && (dumpHex< sal_Int32 >( "unicode-marker" ) == 0x71B239F4) )
128 {
129 dumpUniString32( "unicode-display-name" );
130 dumpUniString32OrStdClip( "unicode-clipboard-format" );
131 dumpUniString32( "unicode-unused" );
132 }
133 }
134 else
135 writeDecItem( "length", nLen );
136 }
138}
139
140namespace {
141
142const sal_Int32 OLEPROP_ID_DICTIONARY = 0;
143const sal_Int32 OLEPROP_ID_CODEPAGE = 1;
144
145const sal_uInt16 OLEPROP_TYPE_INT16 = 2;
146const sal_uInt16 OLEPROP_TYPE_INT32 = 3;
147const sal_uInt16 OLEPROP_TYPE_FLOAT = 4;
148const sal_uInt16 OLEPROP_TYPE_DOUBLE = 5;
149const sal_uInt16 OLEPROP_TYPE_DATE = 7;
150const sal_uInt16 OLEPROP_TYPE_STRING = 8;
151const sal_uInt16 OLEPROP_TYPE_STATUS = 10;
152const sal_uInt16 OLEPROP_TYPE_BOOL = 11;
153const sal_uInt16 OLEPROP_TYPE_VARIANT = 12;
154const sal_uInt16 OLEPROP_TYPE_INT8 = 16;
155const sal_uInt16 OLEPROP_TYPE_UINT8 = 17;
156const sal_uInt16 OLEPROP_TYPE_UINT16 = 18;
157const sal_uInt16 OLEPROP_TYPE_UINT32 = 19;
158const sal_uInt16 OLEPROP_TYPE_INT64 = 20;
159const sal_uInt16 OLEPROP_TYPE_UINT64 = 21;
160const sal_uInt16 OLEPROP_TYPE_STRING8 = 30;
161const sal_uInt16 OLEPROP_TYPE_STRING16 = 31;
162const sal_uInt16 OLEPROP_TYPE_FILETIME = 64;
163const sal_uInt16 OLEPROP_TYPE_BLOB = 65;
164const sal_uInt16 OLEPROP_TYPE_STREAM = 66;
165const sal_uInt16 OLEPROP_TYPE_STORAGE = 67;
166const sal_uInt16 OLEPROP_TYPE_CLIPFMT = 71;
167
168const sal_uInt16 OLEPROP_TYPE_SIMPLE = 0x0000;
169const sal_uInt16 OLEPROP_TYPE_VECTOR = 0x1000;
170const sal_uInt16 OLEPROP_TYPE_ARRAY = 0x2000;
171
172const sal_uInt16 CODEPAGE_UNICODE = 1200;
173
174const sal_uInt32 AX_STRING_COMPRESSED = 0x80000000;
175
176} // namespace
177
178OlePropertyStreamObject::OlePropertyStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
179{
180 construct( rParent, rxStrm, rSysFileName );
181}
182
184{
185 OUStringVector aGuidVec;
186 ::std::vector< sal_uInt32 > aStartPosVec;
187
188 // dump header
189 writeEmptyItem( "HEADER" );
190 {
191 IndentGuard aIndGuard( mxOut );
192 dumpHex< sal_uInt16 >( "byte-order", "OLEPROP-BYTE-ORDER" );
193 dumpDec< sal_uInt16 >( "version" );
194 dumpDec< sal_uInt16 >( "os-minor" );
195 dumpDec< sal_uInt16 >( "os-type", "OLEPROP-OSTYPE" );
196 dumpGuid( "guid" );
197 sal_Int32 nSectCount = dumpDec< sal_Int32 >( "section-count" );
198
199 // dump table of section positions
200 {
201 TableGuard aTabGuard( mxOut, 15, 60 );
202 mxOut->resetItemIndex();
203 for( sal_Int32 nSectIdx = 0; !mxStrm->isEof() && (nSectIdx < nSectCount); ++nSectIdx )
204 {
205 MultiItemsGuard aMultiGuard( mxOut );
206 writeEmptyItem( "#section" );
207 aGuidVec.push_back( dumpGuid( "guid" ) );
208 aStartPosVec.push_back( dumpHex< sal_uInt32 >( "start-pos", "CONV-DEC" ) );
209 }
210 }
211 }
212 mxOut->emptyLine();
213
214 // dump sections
215 for( size_t nSectIdx = 0; !mxStrm->isEof() && (nSectIdx < aStartPosVec.size()); ++nSectIdx )
216 dumpSection( aGuidVec[ nSectIdx ], aStartPosVec[ nSectIdx ] );
217}
218
219void OlePropertyStreamObject::dumpSection( const OUString& rGuid, sal_uInt32 nStartPos )
220{
221 // property ID names
222 mxPropIds = cfg().createNameList< ConstList >( "OLEPROP-IDS" );
223 OUString aGuidName = cfg().getStringOption( rGuid, OUString() );
224 if ( aGuidName == "GlobalDocProp" )
225 mxPropIds->includeList( cfg().getNameList( "OLEPROP-GLOBALIDS" ) );
226 else if ( aGuidName == "BuiltinDocProp" )
227 mxPropIds->includeList( cfg().getNameList( "OLEPROP-BUILTINIDS" ) );
228 else
229 mxPropIds->includeList( cfg().getNameList( "OLEPROP-BASEIDS" ) );
230
231 // property ID/position map
232 typedef ::std::map< sal_Int32, sal_uInt32 > PropertyPosMap;
233 PropertyPosMap aPropMap;
234
235 // dump section header line
236 writeSectionHeader( rGuid, nStartPos );
237
238 // seek to section
239 IndentGuard aIndGuard( mxOut );
240 if( startElement( nStartPos ) )
241 {
242 // dump section header
243 dumpDec< sal_Int32 >( "size" );
244 sal_Int32 nPropCount = dumpDec< sal_Int32 >( "property-count" );
245
246 // dump table of property positions
247 {
248 TableGuard aTabGuard( mxOut, 15, 25 );
249 mxOut->resetItemIndex();
250 for( sal_Int32 nPropIdx = 0; !mxStrm->isEof() && (nPropIdx < nPropCount); ++nPropIdx )
251 {
252 MultiItemsGuard aMultiGuard( mxOut );
253 writeEmptyItem( "#property" );
254 sal_Int32 nPropId = dumpDec< sal_Int32 >( "id", mxPropIds );
255 sal_uInt32 nPropPos = nStartPos + dumpHex< sal_uInt32 >( "start-pos", "CONV-DEC" );
256 aPropMap[ nPropId ] = nPropPos;
257 }
258 }
259 }
260 mxOut->emptyLine();
261
262 // code page property
263 meTextEnc = RTL_TEXTENCODING_MS_1252;
264 mbIsUnicode = false;
265 PropertyPosMap::iterator aCodePageIt = aPropMap.find( OLEPROP_ID_CODEPAGE );
266 if( aCodePageIt != aPropMap.end() )
267 {
268 dumpCodePageProperty( aCodePageIt->second );
269 aPropMap.erase( aCodePageIt );
270 }
271
272 // dictionary property
273 PropertyPosMap::iterator aDictIt = aPropMap.find( OLEPROP_ID_DICTIONARY );
274 if( aDictIt != aPropMap.end() )
275 {
276 dumpDictionaryProperty( aDictIt->second );
277 aPropMap.erase( aDictIt );
278 }
279
280 // other properties
281 for (auto const& elem : aPropMap)
282 dumpProperty( elem.first, elem.second );
283
284 // remove the user defined list of property ID names
285 cfg().eraseNameList( "OLEPROP-IDS" );
286}
287
288void OlePropertyStreamObject::dumpProperty( sal_Int32 nPropId, sal_uInt32 nStartPos )
289{
290 writePropertyHeader( nPropId, nStartPos );
291 IndentGuard aIndGuard( mxOut );
292 if( startElement( nStartPos ) )
293 dumpPropertyContents( nPropId );
294 mxOut->emptyLine();
295}
296
298{
299 writePropertyHeader( OLEPROP_ID_CODEPAGE, nStartPos );
300 IndentGuard aIndGuard( mxOut );
301 if( startElement( nStartPos ) )
302 {
303 sal_uInt16 nType = dumpPropertyType();
304 if( nType == OLEPROP_TYPE_INT16 )
305 {
306 sal_uInt16 nCodePage = dumpDec< sal_uInt16 >( "codepage", "CODEPAGES" );
307 rtl_TextEncoding eNewTextEnc = rtl_getTextEncodingFromWindowsCodePage( nCodePage );
308 if( eNewTextEnc != RTL_TEXTENCODING_DONTKNOW )
309 meTextEnc = eNewTextEnc;
310 mbIsUnicode = nCodePage == CODEPAGE_UNICODE;
311 }
312 else
313 dumpPropertyContents( OLEPROP_ID_CODEPAGE );
314 }
315 mxOut->emptyLine();
316}
317
319{
320 writePropertyHeader( OLEPROP_ID_DICTIONARY, nStartPos );
321 IndentGuard aIndGuard( mxOut );
322 if( startElement( nStartPos ) )
323 {
324 sal_Int32 nCount = dumpDec< sal_Int32 >( "count" );
325 for( sal_Int32 nIdx = 0; !mxStrm->isEof() && (nIdx < nCount); ++nIdx )
326 {
327 MultiItemsGuard aMultiGuard( mxOut );
328 TableGuard aTabGuard( mxOut, 10, 20 );
329 sal_Int32 nId = dumpDec< sal_Int32 >( "id" );
330 OUString aName = dumpString8( "name" );
331 if( mxPropIds )
332 mxPropIds->setName( nId, aName );
333 }
334 }
335 mxOut->emptyLine();
336}
337
339{
340 sal_uInt16 nType = dumpPropertyType();
341 sal_uInt16 nBaseType = static_cast< sal_uInt16 >( nType & 0x0FFF );
342 sal_uInt16 nArrayType = static_cast< sal_uInt16 >( nType & 0xF000 );
343 switch( nArrayType )
344 {
345 case OLEPROP_TYPE_SIMPLE: dumpPropertyValue( nPropId, nBaseType ); break;
346 case OLEPROP_TYPE_VECTOR: dumpPropertyVector( nPropId, nBaseType ); break;
347 case OLEPROP_TYPE_ARRAY: /*TODO*/; break;
348 }
349 return nType;
350}
351
352void OlePropertyStreamObject::dumpPropertyValue( sal_Int32 nPropId, sal_uInt16 nBaseType )
353{
354 switch( nBaseType )
355 {
356 case OLEPROP_TYPE_INT16: dumpDec< sal_Int16 >( "value" ); break;
357 case OLEPROP_TYPE_INT32: dumpDec< sal_Int32 >( "value" ); break;
358 case OLEPROP_TYPE_FLOAT: dumpDec< float >( "value" ); break;
359 case OLEPROP_TYPE_DOUBLE: dumpDec< double >( "value" ); break;
360 case OLEPROP_TYPE_DATE: dumpDec< double >( "date" ); break;
361 case OLEPROP_TYPE_STRING: dumpString8( "value" ); break;
362 case OLEPROP_TYPE_STATUS: dumpHex< sal_Int32 >( "status" ); break;
363 case OLEPROP_TYPE_BOOL: dumpBool< sal_Int16 >( "value" ); break;
364 case OLEPROP_TYPE_VARIANT: dumpPropertyContents( nPropId ); break;
365 case OLEPROP_TYPE_INT8: dumpDec< sal_Int8 >( "value" ); break;
366 case OLEPROP_TYPE_UINT8: dumpDec< sal_uInt8 >( "value" ); break;
367 case OLEPROP_TYPE_UINT16: dumpDec< sal_uInt16 >( "value" ); break;
368 case OLEPROP_TYPE_UINT32: dumpDec< sal_uInt32 >( "value" ); break;
369 case OLEPROP_TYPE_INT64: dumpDec< sal_Int64 >( "value" ); break;
370 case OLEPROP_TYPE_UINT64: dumpDec< sal_uInt64 >( "value" ); break;
371 case OLEPROP_TYPE_STRING8: dumpString8( "value" ); break;
372 case OLEPROP_TYPE_STRING16: dumpString16( "value" ); break;
373 case OLEPROP_TYPE_FILETIME: dumpFileTime( "file-time" ); break;
374 case OLEPROP_TYPE_BLOB: dumpBlob( nPropId, "data" ); break;
375 case OLEPROP_TYPE_STREAM: dumpString8( "stream-name" ); break;
376 case OLEPROP_TYPE_STORAGE: dumpString8( "storage-name" ); break;
377 case OLEPROP_TYPE_CLIPFMT: dumpBlob( nPropId, "clip-data" ); break;
378 }
379}
380
381void OlePropertyStreamObject::dumpPropertyVector( sal_Int32 nPropId, sal_uInt16 nBaseType )
382{
383 sal_Int32 nElemCount = dumpDec< sal_Int32 >( "element-count" );
384 for( sal_Int32 nElemIdx = 0; !mxStrm->isEof() && (nElemIdx < nElemCount); ++nElemIdx )
385 {
386 mxOut->resetItemIndex( nElemIdx );
387 writeEmptyItem( "#element" );
388 IndentGuard aIndGuard( mxOut );
389 dumpPropertyValue( nPropId, nBaseType );
390 }
391}
392
394{
395 return static_cast< sal_uInt16 >( dumpHex< sal_Int32 >( "type", "OLEPROP-TYPE" ) & 0xFFFF );
396}
397
398void OlePropertyStreamObject::dumpBlob( sal_Int32 nPropId, const String& rName )
399{
400 sal_Int32 nSize = dumpDec< sal_Int32 >( "data-size" );
401 if( nSize > 0 )
402 {
403 OUString aPropName = mxPropIds->getName( cfg(), nPropId );
404 if( aPropName == "'_PID_HLINKS'" )
405 dumpHlinks( nSize );
406 else
407 dumpBinary( rName, nSize );
408 }
409}
410
412{
413 sal_Int32 nLen = dumpDec< sal_Int32 >( "string-len" );
414 return mbIsUnicode ? dumpCharArray16( rName, nLen ) : dumpCharArray8( rName, nLen );
415}
416
417OUString OlePropertyStreamObject::dumpCharArray8( const String& rName, sal_Int32 nLen )
418{
419 sal_Int32 nNewLen = getLimitedValue< sal_Int32, sal_Int32 >( nLen, 0, 1024 );
420 OUString aData = mxStrm->readCharArrayUC( nNewLen, meTextEnc );
421 writeStringItem( rName, aData );
422 return aData;
423}
424
426{
427 sal_Int32 nLen = dumpDec< sal_Int32 >( "string-len" );
428 return dumpCharArray16( rName, nLen );
429}
430
431OUString OlePropertyStreamObject::dumpCharArray16( const String& rName, sal_Int32 nLen )
432{
433 sal_Int32 nNewLen = getLimitedValue< sal_Int32, sal_Int32 >( nLen, 0, 1024 );
434 OUString aData = mxStrm->readUnicodeArray( nNewLen );
435 writeStringItem( rName, aData );
436 if( nNewLen & 1 ) dumpUnused( 2 ); // always padding to 32bit
437 return aData;
438}
439
440bool OlePropertyStreamObject::dumpTypedProperty( const String& rName, sal_uInt16 nExpectedType )
441{
442 writeEmptyItem( rName );
443 IndentGuard aIndGuard( mxOut );
444 return (dumpPropertyContents( -1 ) == nExpectedType) && !mxStrm->isEof();
445}
446
448{
449 sal_Int64 nEndPos = mxStrm->tell() + nSize;
450 sal_Int32 nCount = dumpDec< sal_Int32 >( "property-count" );
451 bool bValid = true;
452 for( sal_Int32 nHlinkIndex = 0, nHlinkCount = nCount / 6; bValid && !mxStrm->isEof() && (nHlinkIndex < nHlinkCount); ++nHlinkIndex )
453 {
454 writeEmptyItem( "HYPERLINK" );
455 IndentGuard aIndGuard( mxOut );
456 bValid =
457 dumpTypedProperty( "hash", OLEPROP_TYPE_INT32 ) &&
458 dumpTypedProperty( "app", OLEPROP_TYPE_INT32 ) &&
459 dumpTypedProperty( "shape-id", OLEPROP_TYPE_INT32 ) &&
460 dumpTypedProperty( "info", OLEPROP_TYPE_INT32 ) &&
461 dumpTypedProperty( "target", OLEPROP_TYPE_STRING16 ) &&
462 dumpTypedProperty( "location", OLEPROP_TYPE_STRING16 );
463 }
464 dumpRemainingTo( nEndPos );
465}
466
467bool OlePropertyStreamObject::startElement( sal_uInt32 nStartPos )
468{
469 mxStrm->seek( nStartPos );
470 if( mxStrm->isEof() )
471 writeInfoItem( "stream-state", OOX_DUMP_ERR_STREAM );
472 return !mxStrm->isEof();
473}
474
475void OlePropertyStreamObject::writeSectionHeader( const OUString& rGuid, sal_uInt32 nStartPos )
476{
477 MultiItemsGuard aMultiGuard( mxOut );
478 writeEmptyItem( "SECTION" );
479 writeHexItem( "pos", nStartPos, "CONV-DEC" );
480 writeGuidItem( "guid", rGuid );
481}
482
483void OlePropertyStreamObject::writePropertyHeader( sal_Int32 nPropId, sal_uInt32 nStartPos )
484{
485 MultiItemsGuard aMultiGuard( mxOut );
486 writeEmptyItem( "PROPERTY" );
487 writeHexItem( "pos", nStartPos, "CONV-DEC" );
488 writeDecItem( "id", nPropId, mxPropIds );
489}
490
491OleStorageObject::OleStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath )
492{
493 construct( rParent, rxStrg, rSysPath );
494}
495
496void OleStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& /*rStrgPath*/, const OUString& rStrmName, const OUString& rSysFileName )
497{
498 if ( rStrmName == "\001CompObj" )
499 OleCompObjObject( *this, rxStrm, rSysFileName ).dump();
500 else if( rStrmName == "\005SummaryInformation" || rStrmName == "\005DocumentSummaryInformation" )
501 OlePropertyStreamObject( *this, rxStrm, rSysFileName ).dump();
502 else
503 BinaryStreamObject( *this, rxStrm, rSysFileName ).dump();
504}
505
507 sal_uInt32 nDataId5, sal_uInt32 nDataId6, sal_uInt16 nVersion, bool bCommonPart, bool bComplexPart ) :
508 mnDataId5( nDataId5 ),
509 mnDataId6( nDataId6 ),
510 mnVersion( nVersion ),
511 mbCommonPart( bCommonPart ),
512 mbComplexPart( bComplexPart )
513{
514 construct( rParent );
515}
516
518{
519 sal_uInt32 nCommonSize = 0;
520 dumpComCtlSize() && dumpComCtlData( nCommonSize ) && (!mbCommonPart || dumpComCtlCommon( nCommonSize )) && (!mbComplexPart || dumpComCtlComplex());
521}
522
523void ComCtlObjectBase::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
524{
525}
526
528{
529}
530
531bool ComCtlObjectBase::dumpComCtlHeader( sal_uInt32 nExpId, sal_uInt16 nExpMajor, sal_uInt16 nExpMinor )
532{
533 // no idea if all this is correct...
534 sal_uInt32 nId = dumpHex< sal_uInt32 >( "header-id", "COMCTL-HEADER-IDS" );
535 ItemGuard aItem( mxOut, "version" );
536 sal_uInt16 nMinor = mxStrm->readuInt16();
537 sal_uInt16 nMajor = mxStrm->readuInt16();
538 mxOut->writeDec( nMajor );
539 mxOut->writeChar( '.' );
540 mxOut->writeDec( nMinor );
541 return !mxStrm->isEof() && (nId == nExpId) && ((nExpMajor == SAL_MAX_UINT16) || (nExpMajor == nMajor)) && ((nExpMinor == SAL_MAX_UINT16) || (nExpMinor == nMinor));
542}
543
545{
546 if( dumpComCtlHeader( 0x12344321, 0, 8 ) )
547 {
548 IndentGuard aIndGuard( mxOut );
549 dumpDec< sal_Int32 >( "width", "CONV-HMM-TO-CM" );
550 dumpDec< sal_Int32 >( "height", "CONV-HMM-TO-CM" );
551 return !mxStrm->isEof();
552 }
553 return false;
554}
555
556bool ComCtlObjectBase::dumpComCtlData( sal_uInt32& ornCommonPartSize )
557{
559 {
560 IndentGuard aIndGuard( mxOut );
561 if( mbCommonPart )
562 ornCommonPartSize = dumpDec< sal_uInt32 >( "common-part-size" );
564 return !mxStrm->isEof();
565 }
566 return false;
567}
568
569bool ComCtlObjectBase::dumpComCtlCommon( sal_uInt32 nPartSize )
570{
571 sal_Int64 nEndPos = mxStrm->tell() + nPartSize;
572 if( (nPartSize >= 16) && dumpComCtlHeader( 0xABCDEF01, 5, 0 ) )
573 {
574 IndentGuard aIndGuard( mxOut );
575 dumpUnknown( 4 );
576 dumpHex< sal_uInt32 >( "common-flags", "COMCTL-COMMON-FLAGS" );
577 implDumpCommonExtra( nEndPos );
578 dumpRemainingTo( nEndPos );
580 return !mxStrm->isEof();
581 }
582 return false;
583}
584
586{
587 if( dumpComCtlHeader( 0xBDECDE1F, 5, 1 ) )
588 {
589 IndentGuard aIndGuard( mxOut );
590 sal_uInt32 nFlags = dumpHex< sal_uInt32 >( "comctl-complex-flags", "COMCTL-COMPLEX-FLAGS" );
591 if( !mxStrm->isEof() && (nFlags & 0x01) )
592 {
593 writeEmptyItem( "font" );
594 IndentGuard aIndGuard2( mxOut );
595 OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() );
596 if ( aClassName == "StdFont" )
597 StdFontObject( *this ).dump();
598 }
599 if( !mxStrm->isEof() && (nFlags & 0x02) )
600 {
601 writeEmptyItem( "mouse-icon" );
602 IndentGuard aIndGuard2( mxOut );
603 OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() );
604 if ( aClassName == "StdPic" )
605 StdPicObject( *this ).dump();
606 }
607 return !mxStrm->isEof();
608 }
609 return false;
610}
611
612ComCtlScrollBarObject::ComCtlScrollBarObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
613 ComCtlObjectBase( rParent, SAL_MAX_UINT32, 0x99470A83, nVersion, true, true )
614{
615}
616
618{
619 dumpHex< sal_uInt32 >( "flags", "COMCTL-SCROLLBAR-FLAGS" );
620 dumpDec< sal_Int32 >( "large-change" );
621 dumpDec< sal_Int32 >( "small-change" );
622 dumpDec< sal_Int32 >( "min" );
623 dumpDec< sal_Int32 >( "max" );
624 dumpDec< sal_Int32 >( "value" );
625}
626
628 ComCtlObjectBase( rParent, 0xE6E17E84, 0x97AB8A01, nVersion, true, true )
629{
630}
631
633{
634 dumpDec< float >( "min" );
635 dumpDec< float >( "max" );
636 if( mnVersion == 6 )
637 {
638 dumpBool< sal_uInt16 >( "vertical" );
639 dumpBool< sal_uInt16 >( "smooth-scroll" );
640 }
641}
642
643ComCtlSliderObject::ComCtlSliderObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
644 ComCtlObjectBase( rParent, 0xE6E17E86, 0x0A2BAE11, nVersion, true, true )
645{
646}
647
649{
650 dumpBool< sal_Int32 >( "vertical" );
651 dumpDec< sal_Int32 >( "large-change" );
652 dumpDec< sal_Int32 >( "small-change" );
653 dumpDec< sal_Int32 >( "min" );
654 dumpDec< sal_Int32 >( "max" );
655 dumpDec< sal_Int16 >( "select-range", "COMCTL-SLIDER-SELECTRANGE" );
656 dumpUnused( 2 );
657 dumpDec< sal_Int32 >( "select-start" );
658 dumpDec< sal_Int32 >( "select-length" );
659 dumpDec< sal_Int32 >( "tick-style", "COMCTL-SLIDER-TICKSTYLE" );
660 dumpDec< sal_Int32 >( "tick-frequency" );
661 dumpDec< sal_Int32 >( "value" );
662 if( mnVersion == 6 )
663 dumpBool< sal_Int32 >( "tooltip-below" );
664}
665
666ComCtlUpDownObject::ComCtlUpDownObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
667 ComCtlObjectBase( rParent, 0xFF3626A0, 0xFF3626A0, nVersion, false, false )
668{
669}
670
672{
673 dumpUnknown( 16 ); // buddy-property, somehow
674 dumpDec< sal_Int32 >( "buddy-control" );
675 dumpUnknown( 8 );
676 dumpDec< sal_Int32 >( "value" );
677 dumpUnknown( 4 );
678 dumpDec< sal_Int32 >( "increment" );
679 dumpDec< sal_Int32 >( "max" );
680 dumpDec< sal_Int32 >( "min" );
681 dumpHex< sal_uInt32 >( "flags-1", "COMCTL-UPDOWN-FLAGS1" );
682 dumpHex< sal_uInt32 >( "flags-2", "COMCTL-UPDOWN-FLAGS2" );
683 dumpUnknown( 4 );
684}
685
686ComCtlImageListObject::ComCtlImageListObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
687 ComCtlObjectBase( rParent, 0xE6E17E80, 0xE6E17E80, nVersion, true, false )
688{
689}
690
692{
693 dumpDec< sal_uInt16 >( "image-width" );
694 dumpDec< sal_uInt16 >( "image-height" );
695 dumpOleColor( "mask-color" );
696 dumpBool< sal_Int16 >( "use-mask-color" );
697 dumpUnknown( 2 );
698}
699
701{
702 dumpUnknown( 4 );
703 dumpOleColor( "back-color" );
704 dumpUnknown( 4 );
705 sal_Int32 nImageCount = dumpDec< sal_Int32 >( "image-count" );
706 mxOut->resetItemIndex();
707 for( sal_Int32 nImageIndex = 0; (nImageIndex < nImageCount) && !mxStrm->isEof(); ++nImageIndex )
708 {
709 writeEmptyItem( "#image" );
710 IndentGuard aIndGuard( mxOut );
711 sal_uInt8 nFlags = dumpHex< sal_uInt8 >( "text-flags", "COMCTL-IMAGELIST-TEXTFLAGS" );
712 if( nFlags & 0x01 ) dumpUniString32( "caption" );
713 if( nFlags & 0x02 ) dumpUniString32( "key" );
714 }
715}
716
718{
719 sal_Int32 nImageCount = dumpDec< sal_Int32 >( "image-count" );
720 mxOut->resetItemIndex();
721 for( sal_Int32 nImageIndex = 0; (nImageIndex < nImageCount) && !mxStrm->isEof(); ++nImageIndex )
722 {
723 writeEmptyItem( "#image" );
724 IndentGuard aIndGuard( mxOut );
725 dumpDec< sal_Int32 >( "index" );
726 StdPicObject( *this ).dump();
727 }
728}
729
730ComCtlTabStripObject::ComCtlTabStripObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
731 ComCtlObjectBase( rParent, 0xE6E17E8A, 0xD12A7AC1, nVersion, true, true )
732{
733}
734
736{
737 dumpHex< sal_uInt32 >( "flags-1", "COMCTL-TABSTRIP-FLAGS1" );
738 dumpDec< sal_uInt16 >( "tab-fixed-width", "CONV-HMM-TO-CM" );
739 dumpDec< sal_uInt16 >( "tab-fixed-height", "CONV-HMM-TO-CM" );
740 if( mnVersion == 6 )
741 {
742 dumpHex< sal_uInt32 >( "flags-2", "COMCTL-TABSTRIP-FLAGS2" );
743 dumpDec< sal_uInt16 >( "tab-min-width", "CONV-HMM-TO-CM" );
744 dumpUnknown( 2 );
745 dumpHex< sal_uInt32 >( "flags-3", "COMCTL-TABSTRIP-FLAGS3" );
746 }
747}
748
749void ComCtlTabStripObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
750{
751 dumpUnknown( 12 );
752 dumpUniString32( "image-list" );
753 sal_Int32 nTabCount = dumpDec< sal_Int32 >( "tab-count" );
754 mxOut->resetItemIndex();
755 for( sal_Int32 nTabIndex = 0; (nTabIndex < nTabCount) && !mxStrm->isEof(); ++nTabIndex )
756 {
757 writeEmptyItem( "#tab" );
758 IndentGuard aIndGuard( mxOut );
759 dumpUnknown( 4 );
760 sal_uInt32 nTabFlags = dumpHex< sal_uInt32 >( "tab-flags", "COMCTL-TABSTRIP-TABFLAGS" );
761 if( nTabFlags & 0x01 ) dumpUniString32( "caption" );
762 if( nTabFlags & 0x02 ) dumpUniString32( "key" );
763 if( nTabFlags & 0x04 ) dumpUniString32( "tag" );
764 if( nTabFlags & 0x08 ) dumpUniString32( "tooltip" );
765 dumpDec< sal_uInt16 >( "image-id" );
766 }
767}
768
769ComCtlTreeViewObject::ComCtlTreeViewObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
770 ComCtlObjectBase( rParent, 0xE6E17E8E, 0x6AC13CB1, nVersion, true, true ),
771 mnStringFlags( 0 )
772{
773}
774
776{
777 dumpHex< sal_uInt32 >( "flags", "COMCTL-TREEVIEW-FLAGS" );
778 dumpDec< sal_Int32 >( "indentation", "CONV-HMM-TO-CM" );
779 if( mnVersion == 6 )
780 dumpHex< sal_uInt32 >( "flags-2", "COMCTL-TREEVIEW-FLAGS2" );
781 mnStringFlags = dumpHex< sal_uInt32 >( "string-flags", "COMCTL-TREEVIEW-STRINGFLAGS" );
782}
783
784void ComCtlTreeViewObject::implDumpCommonExtra( sal_Int64 /*nEndPos*/ )
785{
786 dumpOleColor( "text-color" );
787 dumpOleColor( "back-color" );
788 dumpUnknown( 4 );
789 if( mnStringFlags & 0x02 )
790 dumpUniString32( "image-list" );
791 dumpUniString32( "path-separator" );
792}
793
794ComCtlStatusBarObject::ComCtlStatusBarObject( const InputObjectBase& rParent, sal_uInt16 nVersion ) :
795 ComCtlObjectBase( rParent, 0xE6E17E88, SAL_MAX_UINT32, nVersion, true, true )
796{
797}
798
800{
801 dumpBool< sal_Int32 >( "style-simple-text" );
802 dumpBool< sal_Int16 >( "show-tips" );
803 dumpUnknown( 2 );
804}
805
807{
808 dumpUnknown( 12 );
809 dumpUniString32( "simple-text" );
810 sal_Int32 nPanelCount = dumpDec< sal_Int32 >( "panel-count" );
811 mxOut->resetItemIndex();
812 for( sal_Int32 nPanelIndex = 0; (nPanelIndex < nPanelCount) && !mxStrm->isEof(); ++nPanelIndex )
813 {
814 writeEmptyItem( "#panel" );
815 IndentGuard aIndGuard( mxOut );
816 dumpHex< sal_uInt32 >( "panel-flags", "COMCTL-STATUSBAR-PANELFLAGS" );
817 dumpDec< sal_Int32 >( "current-width", "CONV-HMM-TO-CM" );
818 dumpDec< sal_Int32 >( "minimal-width", "CONV-HMM-TO-CM" );
819 sal_uInt32 nTextFlags = dumpHex< sal_uInt32 >( "text-flags", "COMCTL-STATUSBAR-TEXTFLAGS" );
820 if( nTextFlags & 0x01 ) dumpUniString32( "text" );
821 if( nTextFlags & 0x02 ) dumpUniString32( "vis-text" );
822 if( nTextFlags & 0x04 ) dumpUniString32( "key" );
823 if( nTextFlags & 0x08 ) dumpUniString32( "tag" );
824 if( nTextFlags & 0x10 ) dumpUniString32( "tooltip" );
825 }
826}
827
829{
830 sal_Int32 nImageCount = dumpDec< sal_Int32 >( "image-count" );
831 mxOut->resetItemIndex();
832 for( sal_Int32 nImageIndex = 0; (nImageIndex < nImageCount) && !mxStrm->isEof(); ++nImageIndex )
833 {
834 writeEmptyItem( "#image" );
835 IndentGuard aIndGuard( mxOut );
836 dumpDec< sal_Int32 >( "panel-index" );
837 StdPicObject( *this ).dump();
838 }
839}
840
842 const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, const String& rPropNameList, bool b64BitPropFlags )
843{
844 OleInputObjectBase::construct( rParent, rxStrm, rSysFileName );
845 constructAxPropObj( rPropNameList, b64BitPropFlags );
846}
847
849 const String& rPropNameList, bool b64BitPropFlags )
850{
852 constructAxPropObj( rPropNameList, b64BitPropFlags );
853}
854
856{
857 return OleInputObjectBase::implIsValid() && mxStrm->isSeekable();
858}
859
861{
862 mbValid = true;
863 // header
865 dumpVersion();
866 sal_uInt16 nSize = dumpDec< sal_uInt16 >( "size" );
867 mnPropertiesEnd = mxStrm->tell() + nSize;
868 // property flags
869 maLargeProps.clear();
870 maStreamProps.clear();
871 mnPropFlags = dumpHex< sal_Int64, sal_uInt32 >( mb64BitPropFlags, "properties", mxPropNames );
872 mnCurrProp = 0;
873 // properties
877 if( ensureValid() )
879}
880
882{
883}
884
886{
887}
888
890{
891 if( mbValid && (!bCondition || mxStrm->isEof()) )
892 {
893 if( !bCondition )
894 writeInfoItem( "state", OOX_DUMP_ERRASCII( "format-error" ) );
895 mbValid = false;
896 }
897 return mbValid;
898}
899
901{
902 mnPropertiesStart = mxStrm->tell();
903}
904
906{
907 if( mnCurrProp == 0 ) mnCurrProp = 1; else mnCurrProp <<= 1;
908 bool bHasProp = getFlag( mnPropFlags, mnCurrProp );
909 setFlag( mnPropFlags, mnCurrProp, false );
910 return ensureValid() && bHasProp;
911}
912
914{
915 return cfg().getName( mxPropNames, mnCurrProp );
916}
917
918sal_uInt32 AxPropertyObjectBase::dumpFlagsProperty( sal_uInt32 nDefault, const char* pcNameList )
919{
920 if( startNextProperty() )
921 {
922 alignInput< sal_uInt32 >();
923 return dumpHex< sal_uInt32 >( getPropertyName(), pcNameList );
924 }
925 return nDefault;
926}
927
928sal_uInt32 AxPropertyObjectBase::dumpColorProperty( sal_uInt32 nDefault )
929{
930 if( startNextProperty() )
931 {
932 alignInput< sal_uInt32 >();
933 return dumpOleColor( getPropertyName() );
934 }
935 return nDefault;
936}
937
939{
940 if( startNextProperty() )
941 {
942 alignInput< sal_uInt16 >();
943 return dumpUnicode( getPropertyName() );
944 }
945 return '\0';
946}
947
949{
950 if( startNextProperty() )
951 ensureValid( false );
952}
953
955{
956 if( startNextProperty() )
958}
959
961{
962 if( startNextProperty() )
964}
965
967{
968 if( startNextProperty() )
969 maLargeProps.emplace_back( LargeProperty::PROPTYPE_GUID, getPropertyName(), 16, pValue );
970}
971
973{
974 if( startNextProperty() )
975 {
976 alignInput< sal_uInt32 >();
977 sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "AX-STRINGLEN" );
978 maLargeProps.emplace_back( LargeProperty::PROPTYPE_STRING, getPropertyName(), nLen, pValue );
979 }
980}
981
983{
984 if( startNextProperty() )
985 {
986 alignInput< sal_uInt32 >();
987 sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "CONV-DEC" );
989 }
990}
991
993{
994 if( startNextProperty() )
995 {
996 alignInput< sal_uInt16 >();
997 sal_uInt16 nData = dumpHex< sal_uInt16 >( getPropertyName() );
998 maStreamProps.emplace_back( getPropertyName(), nData );
999 }
1000}
1001
1003{
1004 if( ensureValid() )
1005 {
1006 writeEmptyItem( "embedded-fontdata" );
1007 IndentGuard aIndGuard( mxOut );
1008 AxCFontNewObject( *this ).dump();
1009 }
1010}
1011
1013{
1015 mbValid = true;
1016 ensureValid();
1017}
1018
1019void AxPropertyObjectBase::constructAxPropObj( const String& rPropNameList, bool b64BitPropFlags )
1020{
1022 {
1023 mxPropNames = cfg().getNameList( rPropNameList );
1024 mb64BitPropFlags = b64BitPropFlags;
1025 mbValid = true;
1026 }
1027}
1028
1030{
1031 ItemGuard aItem( mxOut, "version" );
1032 sal_uInt8 nMinor = mxStrm->readuChar();
1033 sal_uInt8 nMajor = mxStrm->readuChar();
1034 mxOut->writeDec( nMajor );
1035 mxOut->writeChar( '.' );
1036 mxOut->writeDec( nMinor );
1037}
1038
1039OUString AxPropertyObjectBase::dumpString( const String& rName, sal_uInt32 nSize, bool bArray )
1040{
1041 bool bCompressed = getFlag( nSize, AX_STRING_COMPRESSED );
1042 sal_uInt32 nBufSize = extractValue< sal_uInt32 >( nSize, 0, 31 );
1043 OUString aString = bCompressed ?
1044 dumpCharArray( rName, nBufSize, RTL_TEXTENCODING_ISO_8859_1 ) :
1045 dumpUnicodeArray( rName, bArray ? nBufSize : (nBufSize / 2) );
1046 alignInput< sal_Int32 >();
1047 return aString;
1048}
1049
1051{
1052 if( ensureValid() )
1053 {
1054 writeEmptyItem( "short-properties" );
1055 IndentGuard aIndGuard( mxOut );
1057 alignInput< sal_uInt32 >();
1058 }
1059}
1060
1062{
1063 if( ensureValid( mnPropFlags == 0 ) && !maLargeProps.empty() )
1064 {
1065 writeEmptyItem( "large-properties" );
1066 IndentGuard aIndGuard( mxOut );
1067 for (auto const& largeProp : maLargeProps)
1068 {
1069 if (!ensureValid())
1070 break;
1071 switch( largeProp.mePropType )
1072 {
1074 {
1075 MultiItemsGuard aMultiGuard( mxOut );
1076 writeEmptyItem( largeProp.maItemName );
1077 dumpDec< sal_Int32 >( "top", "CONV-HMM-TO-CM" );
1078 dumpDec< sal_Int32 >( "left", "CONV-HMM-TO-CM" );
1079 }
1080 break;
1082 {
1083 MultiItemsGuard aMultiGuard( mxOut );
1084 writeEmptyItem( largeProp.maItemName );
1085 dumpDec< sal_Int32 >( "width", "CONV-HMM-TO-CM" );
1086 dumpDec< sal_Int32 >( "height", "CONV-HMM-TO-CM" );
1087 }
1088 break;
1090 {
1091 OUString aGuid = dumpGuid( largeProp.maItemName );
1092 if( largeProp.mpItemValue )
1093 *largeProp.mpItemValue = cfg().getStringOption( aGuid, OUString() );
1094 }
1095 break;
1097 {
1098 OUString aString = dumpString( largeProp.maItemName, largeProp.mnDataSize, false );
1099 if( largeProp.mpItemValue )
1100 *largeProp.mpItemValue = aString;
1101 }
1102 break;
1104 {
1105 writeEmptyItem( largeProp.maItemName );
1106 IndentGuard aIndGuard2( mxOut );
1107 mxOut->resetItemIndex();
1108 sal_Int64 nEndPos = mxStrm->tell() + largeProp.mnDataSize;
1109 while( mxStrm->tell() < nEndPos )
1110 {
1111 MultiItemsGuard aMultiGuard( mxOut );
1112 sal_uInt32 nDataSize = dumpHex< sal_uInt32 >( "#flags", "AX-ARRAYSTRINGLEN" );
1113 dumpString( "string", nDataSize, true );
1114 }
1115 dumpToPosition( nEndPos );
1116 }
1117 break;
1118 }
1119 }
1120 }
1122
1123 if( !ensureValid() || maStreamProps.empty() )
1124 return;
1125
1126 writeEmptyItem( "stream-properties" );
1127 IndentGuard aIndGuard( mxOut );
1128 for (auto const& streamProp : maStreamProps)
1129 {
1130 if (!ensureValid())
1131 break;
1132 writeEmptyItem( streamProp.maItemName );
1133 if( ensureValid( streamProp.mnData == 0xFFFF ) )
1134 {
1135 IndentGuard aIndGuard2( mxOut );
1136 OUString aClassName = cfg().getStringOption( dumpGuid(), OUString() );
1137 if ( aClassName == "StdFont" )
1138 StdFontObject( *this ).dump();
1139 else if ( aClassName == "StdPic" )
1140 StdPicObject( *this ).dump();
1141 else if ( aClassName == "CFontNew" )
1142 AxCFontNewObject( *this ).dump();
1143 else
1144 ensureValid( false );
1145 }
1146 }
1147}
1148
1150{
1151 AxPropertyObjectBase::construct( rParent, "AX-CFONTNEW-PROPERTIES" );
1152}
1153
1155{
1157 dumpFlagsProperty( 0, "AX-CFONTNEW-FLAGS" );
1158 dumpDecProperty< sal_Int32 >( 160 );
1159 dumpDecProperty< sal_Int32 >( 0 );
1160 dumpDecProperty< sal_uInt8 >( WINDOWS_CHARSET_DEFAULT, "CHARSET" );
1161 dumpDecProperty< sal_uInt8 >( 0, "FONT-PITCHFAMILY" );
1162 dumpDecProperty< sal_uInt8 >( 1, "AX-CFONTNEW-ALIGNMENT" );
1163 dumpDecProperty< sal_uInt16 >( 400, "FONT-WEIGHT" );
1164}
1165
1167{
1168 AxPropertyObjectBase::construct( rParent, "AX-COLUMNINFO-PROPERTIES" );
1169}
1170
1172{
1173 dumpDecProperty< sal_Int32 >( -1, "CONV-HMM-TO-CM" );
1174}
1175
1177{
1178 AxPropertyObjectBase::construct( rParent, "AX-COMMANDBUTTON-PROPERTIES" );
1179}
1180
1182{
1183 dumpColorProperty( 0x80000012 );
1184 dumpColorProperty( 0x80000008 );
1185 dumpFlagsProperty( 0x0000001B );
1194}
1195
1197{
1199}
1200
1202{
1203 AxPropertyObjectBase::construct( rParent, "AX-MORPH-PROPERTIES", true );
1204}
1205
1207{
1208 dumpFlagsProperty( 0x2C80081B );
1209 dumpColorProperty( 0x80000005 );
1210 dumpColorProperty( 0x80000008 );
1211 dumpDecProperty< sal_uInt32 >( 0 );
1212 dumpBorderStyleProperty< sal_uInt8 >( 0 );
1213 dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-SCROLLBARS" );
1214 mnCtrlType = dumpDecProperty< sal_uInt8 >( 1, "AX-MORPH-CONTROLTYPE" );
1218 dumpDecProperty< sal_uInt32 >( 0, "CONV-HMM-TO-CM" );
1219 dumpDecProperty< sal_uInt16 >( 1, "AX-MORPH-BOUNDCOLUMN" );
1220 dumpDecProperty< sal_Int16 >( -1, "AX-MORPH-TEXTCOLUMN" );
1221 dumpDecProperty< sal_Int16 >( 1, "AX-MORPH-COLUMNCOUNT" );
1222 dumpDecProperty< sal_uInt16 >( 8 );
1223 mnColInfoCount = dumpDecProperty< sal_uInt16 >( 1 );
1224 dumpDecProperty< sal_uInt8 >( 2, "AX-MORPH-MATCHENTRYTYPE" );
1225 dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-LISTSTYLE" );
1226 dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-SHOWDROPDOWNMODE" );
1228 dumpDecProperty< sal_uInt8 >( 1, "AX-MORPH-DROPDOWNSTYLE" );
1229 dumpDecProperty< sal_uInt8 >( 0, "AX-MORPH-SELECTIONTYPE" );
1233 dumpColorProperty( 0x80000006 );
1234 dumpSpecialEffectProperty< sal_uInt32 >( 2 );
1241}
1242
1244{
1247}
1248
1250{
1251 if( ensureValid() && (mnColInfoCount > 0) && ((mnCtrlType == 2) || (mnCtrlType == 3)) )
1252 {
1253 mxOut->resetItemIndex();
1254 for( sal_uInt16 nIdx = 0; ensureValid() && (nIdx < mnColInfoCount); ++nIdx )
1255 {
1256 writeEmptyItem( "#column-info" );
1257 IndentGuard aIndGuard( mxOut );
1258 AxColumnInfoObject( *this ).dump();
1259 }
1260 }
1261}
1262
1264{
1265 AxPropertyObjectBase::construct( rParent, "AX-LABEL-PROPERTIES" );
1266}
1267
1269{
1270 dumpColorProperty( 0x80000012 );
1271 dumpColorProperty( 0x8000000F );
1272 dumpFlagsProperty( 0x0080001B );
1277 dumpColorProperty( 0x80000006 );
1278 dumpBorderStyleProperty< sal_uInt16 >( 0 );
1279 dumpSpecialEffectProperty< sal_uInt16 >( 0 );
1283}
1284
1286{
1288}
1289
1291{
1292 AxPropertyObjectBase::construct( rParent, "AX-IMAGE-PROPERTIES" );
1293}
1294
1296{
1300 dumpColorProperty( 0x80000006 );
1301 dumpColorProperty( 0x8000000F );
1302 dumpBorderStyleProperty< sal_uInt8 >( 1 );
1305 dumpSpecialEffectProperty< sal_uInt8 >( 0 );
1310 dumpFlagsProperty( 0x0000001B );
1312}
1313
1315{
1316 AxPropertyObjectBase::construct( rParent, "AX-SCROLLBAR-PROPERTIES" );
1317}
1318
1320{
1321 dumpColorProperty( 0x80000012 );
1322 dumpColorProperty( 0x8000000F );
1323 dumpFlagsProperty( 0x0000001B );
1326 dumpDecProperty< sal_Int32 >( 0 );
1327 dumpDecProperty< sal_Int32 >( 32767 );
1328 dumpDecProperty< sal_Int32 >( 0 );
1329 dumpHexProperty< sal_uInt32 >( 0 );
1332 dumpDecProperty< sal_Int32 >( 1 );
1333 dumpDecProperty< sal_Int32 >( 1 );
1335 dumpDecProperty< sal_Int16 >( -1, "AX-SCROLLBAR-PROPTHUMB" );
1338}
1339
1341{
1342 AxPropertyObjectBase::construct( rParent, "AX-SPINBUTTON-PROPERTIES" );
1343}
1344
1346{
1347 dumpColorProperty( 0x80000012 );
1348 dumpColorProperty( 0x8000000F );
1349 dumpFlagsProperty( 0x0000001B );
1351 dumpHexProperty< sal_uInt32 >( 0 );
1352 dumpDecProperty< sal_Int32 >( 0 );
1353 dumpDecProperty< sal_Int32 >( 100 );
1354 dumpDecProperty< sal_Int32 >( 0 );
1357 dumpDecProperty< sal_Int32 >( 1 );
1362}
1363
1365{
1366 AxPropertyObjectBase::construct( rParent, "AX-TABSTRIP-PROPERTIES" );
1367}
1368
1370{
1371 dumpDecProperty< sal_Int32 >( -1 );
1372 dumpColorProperty( 0x8000000F );
1373 dumpColorProperty( 0x80000012 );
1379 dumpDecProperty< sal_uInt32 >( 0, "AX-TABSTRIP-ORIENTATION" );
1380 dumpDecProperty< sal_uInt32 >( 0, "AX-TABSTRIP-TABSTYLE" );
1389 dumpFlagsProperty( 0x0000001B );
1391 dumpDecProperty< sal_uInt32 >( 0 );
1393 mnTabFlagCount = dumpDecProperty< sal_Int32 >( 0 );
1396}
1397
1399{
1401 if( mnTabFlagCount > 0 )
1402 {
1403 writeEmptyItem( "tab-flags" );
1404 IndentGuard aIndGuard( mxOut );
1405 mxOut->resetItemIndex();
1406 for( sal_Int32 nIdx = 0; ensureValid() && (nIdx < mnTabFlagCount); ++nIdx )
1407 dumpHex< sal_uInt32 >( "#flags", "AX-TABSTRIP-FLAGS" );
1408 }
1409}
1410
1411FormControlStreamObject::FormControlStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, const OUString* pProgId )
1412{
1413 construct( rParent, rxStrm, rSysFileName );
1414 constructFormCtrlStrmObj( pProgId );
1415}
1416
1417FormControlStreamObject::FormControlStreamObject( const OutputObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString* pProgId )
1418{
1419 construct( rParent, rxStrm );
1420 constructFormCtrlStrmObj( pProgId );
1421}
1422
1424{
1425 if( mbReadGuid )
1426 maProgId = cfg().getStringOption( dumpGuid(), OUString() );
1427
1428 if( !maProgId.isEmpty() && !mxStrm->isEof() )
1429 {
1430 if ( maProgId == "Forms.CommandButton.1" )
1431 AxCommandButtonObject( *this ).dump();
1432 else if( maProgId == "Forms.TextBox.1" ||
1433 maProgId == "Forms.ListBox.1" ||
1434 maProgId == "Forms.ComboBox.1" ||
1435 maProgId == "Forms.CheckBox.1" ||
1436 maProgId == "Forms.OptionButton.1" ||
1437 maProgId == "Forms.ToggleButton.1" ||
1438 maProgId == "RefEdit.Ctrl" )
1439 AxMorphControlObject( *this ).dump();
1440 else if ( maProgId == "Forms.Label.1" )
1441 AxLabelObject( *this ).dump();
1442 else if ( maProgId == "Forms.Image.1" )
1443 AxImageObject( *this ).dump();
1444 else if ( maProgId == "Forms.ScrollBar.1" )
1445 AxScrollBarObject( *this ).dump();
1446 else if ( maProgId == "Forms.SpinButton.1" )
1447 AxSpinButtonObject( *this ).dump();
1448 else if ( maProgId == "Forms.TabStrip.1" )
1449 AxTabStripObject( *this ).dump();
1450 else if ( maProgId == "MSComCtl2.FlatScrollBar.2" )
1451 ComCtlScrollBarObject( *this, 6 ).dump();
1452 else if ( maProgId == "COMCTL.ProgCtrl.1" )
1453 ComCtlProgressBarObject( *this, 5 ).dump();
1454 else if ( maProgId == "MSComctlLib.ProgCtrl.2" )
1455 ComCtlProgressBarObject( *this, 6 ).dump();
1456 else if ( maProgId == "COMCTL.Slider.1" )
1457 ComCtlSliderObject( *this, 5 ).dump();
1458 else if ( maProgId == "MSComctlLib.Slider.2" )
1459 ComCtlSliderObject( *this, 6 ).dump();
1460 else if ( maProgId == "ComCtl2.UpDown.1" )
1461 ComCtlUpDownObject( *this, 5 ).dump();
1462 else if ( maProgId == "MSComCtl2.UpDown.2" )
1463 ComCtlUpDownObject( *this, 6 ).dump();
1464 else if ( maProgId == "COMCTL.ImageListCtrl.1" )
1465 ComCtlImageListObject( *this, 5 ).dump();
1466 else if ( maProgId == "MSComctlLib.ImageListCtrl.2" )
1467 ComCtlImageListObject( *this, 6 ).dump();
1468 else if ( maProgId == "COMCTL.TabStrip.1" )
1469 ComCtlTabStripObject( *this, 5 ).dump();
1470 else if ( maProgId == "MSComctlLib.TabStrip.2" )
1471 ComCtlTabStripObject( *this, 6 ).dump();
1472 else if ( maProgId == "COMCTL.TreeCtrl.1" )
1473 ComCtlTreeViewObject( *this, 5 ).dump();
1474 else if ( maProgId == "MSComctlLib.TreeCtrl.2" )
1475 ComCtlTreeViewObject( *this, 6 ).dump();
1476 else if ( maProgId == "COMCTL.SBarCtrl.1" )
1477 ComCtlStatusBarObject( *this, 5 ).dump();
1478 else if ( maProgId == "StdPic" )
1479 StdPicObject( *this ).dump();
1480 }
1482}
1483
1485{
1486 mbReadGuid = pProgId == nullptr;
1487 if( pProgId )
1488 maProgId = *pProgId;
1489}
1490
1492 mrFormData( rFormData )
1493{
1494 AxPropertyObjectBase::construct( rParent, "VBA-CLASSINFO-PROPERTIES" );
1495}
1496
1498{
1499 mrFormData.maClassInfoProgIds.emplace_back( );
1504 dumpFlagsProperty( 0, "VBA-CLASSINFO-FLAGS" );
1505 dumpDecProperty< sal_uInt32 >( 0 );
1506 dumpDecProperty< sal_Int32 >( -1 );
1507 dumpDecProperty< sal_uInt16 >( 0 );
1508 dumpDecProperty< sal_uInt16 >( 0 );
1509 dumpDecProperty< sal_uInt16 >( 0, "OLEPROP-TYPE" );
1510 dumpDecProperty< sal_uInt16 >( 0 );
1511 dumpDecProperty< sal_uInt16 >( 0 );
1512 dumpDecProperty< sal_uInt16 >( 0, "OLEPROP-TYPE" );
1513 dumpDecProperty< sal_Int32 >( -1 );
1514 dumpDecProperty< sal_uInt16 >( 0 );
1515}
1516
1517namespace {
1518
1519const sal_uInt32 VBA_FORMSITE_OBJSTREAM = 0x0010;
1520
1521const sal_uInt16 VBA_FORMSITE_CLASSTABLEINDEX = 0x8000;
1522const sal_uInt16 VBA_FORMSITE_CLASSTABLEMASK = 0x7FFF;
1523
1524} // namespace
1525
1527 mrFormData( rFormData )
1528{
1529 AxPropertyObjectBase::construct( rParent, "VBA-FORMSITE-PROPERTIES" );
1530}
1531
1533{
1534 VbaFormSiteInfo aSiteInfo;
1537 sal_Int32 nId = dumpDecProperty< sal_Int32 >( 0 );
1538 dumpDecProperty< sal_Int32 >( 0 );
1539 sal_uInt32 nFlags = dumpFlagsProperty( 0x00000033, "VBA-FORMSITE-FLAGS" );
1540 sal_uInt32 nLength = dumpDecProperty< sal_uInt32 >( 0 );
1541 dumpDecProperty< sal_Int16 >( -1 );
1542 sal_uInt16 nClassId = dumpHexProperty< sal_uInt16 >( 0x7FFF, "VBA-FORMSITE-CLASSIDCACHE" );
1544 dumpDecProperty< sal_uInt16 >( 0 );
1550
1551 sal_uInt16 nIndex = nClassId & VBA_FORMSITE_CLASSTABLEMASK;
1552 if( getFlag( nClassId, VBA_FORMSITE_CLASSTABLEINDEX ) )
1553 {
1554 if( nIndex < mrFormData.maClassInfoProgIds.size() )
1556 }
1557 else
1558 {
1559 if( cfg().hasName( "VBA-FORMSITE-CLASSNAMES", nIndex ) )
1560 aSiteInfo.maProgId = cfg().getName( "VBA-FORMSITE-CLASSNAMES", nIndex );
1561 }
1562 aSiteInfo.mnId = nId;
1563 aSiteInfo.mnLength = nLength;
1564 aSiteInfo.mbInStream = getFlag( nFlags, VBA_FORMSITE_OBJSTREAM );
1565
1566 mrFormData.maSiteInfos.push_back( aSiteInfo );
1567}
1568
1570{
1571 AxPropertyObjectBase::construct( rParent, "VBA-FORMDESIGNEXT-PROPERTIES" );
1572}
1573
1575{
1576 dumpFlagsProperty( 0x00015F55, "VBA-FORMDESIGNEXT-FLAGS" );
1579 dumpDecProperty< sal_Int8 >( 0, "VBA-FORMDESIGNEXT-CLICKCTRLMODE" );
1580 dumpDecProperty< sal_Int8 >( 0, "VBA-FORMDESIGNEXT-DBLCLICKCTRLMODE" );
1581}
1582
1583namespace {
1584
1585const sal_uInt32 AX_FORM_HASDESIGNEXTENDER = 0x00004000;
1586const sal_uInt32 AX_FORM_SKIPCLASSTABLE = 0x00008000;
1587
1588const sal_uInt8 AX_FORM_SITECOUNTTYPE_COUNT = 0x80;
1589const sal_uInt8 AX_FORM_SITECOUNTTYPE_MASK = 0x7F;
1590
1591} // namespace
1592
1593VbaFStreamObject::VbaFStreamObject( const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaFormSharedData& rFormData ) :
1594 mrFormData( rFormData )
1595{
1596 AxPropertyObjectBase::construct( rParent, rxStrm, rSysFileName, "VBA-FORM-PROPERTIES" );
1597}
1598
1600{
1602 dumpColorProperty( 0x8000000F );
1603 dumpColorProperty( 0x80000012 );
1604 dumpDecProperty< sal_uInt32 >( 0 );
1607 mnFlags = dumpFlagsProperty( 0x00000004, "VBA-FORM-FLAGS" );
1608 dumpBorderStyleProperty< sal_uInt8 >( 0 );
1610 dumpHexProperty< sal_uInt8 >( 0x0C, "VBA-FORM-SCROLLBARS" );
1614 dumpDecProperty< sal_uInt32 >( 0 );
1617 dumpDecProperty< sal_uInt8 >( 0, "VBA-FORM-CYCLE" );
1618 dumpSpecialEffectProperty< sal_uInt8 >( 0 );
1619 dumpColorProperty( 0x80000012 );
1623 dumpDecProperty< sal_Int32 >( 100, "CONV-PERCENT" );
1627 dumpDecProperty< sal_uInt32 >( 0 );
1628 dumpDecProperty< sal_uInt32 >( 0 );
1629}
1630
1632{
1634 dumpSiteData();
1637}
1638
1640{
1641 if( ensureValid() && !getFlag( mnFlags, AX_FORM_SKIPCLASSTABLE ) )
1642 {
1643 mxOut->emptyLine();
1644 sal_uInt16 nCount = dumpDec< sal_uInt16 >( "class-info-count" );
1645 mxOut->resetItemIndex();
1646 for( sal_uInt16 nIdx = 0; ensureValid() && (nIdx < nCount); ++nIdx )
1647 {
1648 writeEmptyItem( "#class-info" );
1649 IndentGuard aIndGuard( mxOut );
1651 }
1652 }
1653}
1654
1656{
1657 mxOut->resetItemIndex();
1658 for( sal_uInt32 nIdx = 0; ensureValid() && (nIdx < nCount); ++nIdx )
1659 {
1660 mxOut->emptyLine();
1661 writeEmptyItem( "#form-site" );
1662 IndentGuard aIndGuard( mxOut );
1663 VbaFormSiteObject( *this, mrFormData ).dump();
1664 }
1665}
1666
1668{
1669 if( !ensureValid() )
1670 return;
1671
1672 mxOut->emptyLine();
1674 sal_uInt32 nSiteCount = dumpDec< sal_uInt32 >( "site-count" );
1675 sal_uInt32 nSiteLength = dumpDec< sal_uInt32 >( "site-data-size" );
1676 sal_Int64 nEndPos = mxStrm->tell() + nSiteLength;
1677 if( !ensureValid( nEndPos <= mxStrm->size() ) )
1678 return;
1679
1680 mxOut->resetItemIndex();
1681 sal_uInt32 nSiteIdx = 0;
1682 while( ensureValid() && (nSiteIdx < nSiteCount) )
1683 {
1684 mxOut->emptyLine();
1685 writeEmptyItem( "#site-info" );
1686 IndentGuard aIndGuard( mxOut );
1687 dumpDec< sal_uInt8 >( "depth" );
1688 sal_uInt8 nTypeCount = dumpHex< sal_uInt8 >( "type-count", "VBA-FORM-SITE-TYPECOUNT" );
1689 if( getFlag( nTypeCount, AX_FORM_SITECOUNTTYPE_COUNT ) )
1690 {
1691 dumpDec< sal_uInt8 >( "repeated-type" );
1692 nSiteIdx += (nTypeCount & AX_FORM_SITECOUNTTYPE_MASK);
1693 }
1694 else
1695 {
1696 ++nSiteIdx;
1697 }
1698 }
1699 alignInput< sal_uInt32 >();
1700 dumpFormSites( nSiteCount );
1701 dumpToPosition( nEndPos );
1702}
1703
1705{
1706 if( ensureValid() && getFlag( mnFlags, AX_FORM_HASDESIGNEXTENDER ) )
1707 {
1708 mxOut->emptyLine();
1709 writeEmptyItem( "design-extender" );
1710 IndentGuard aIndGuard( mxOut );
1711 VbaFormDesignExtObject( *this ).dump();
1712 }
1713}
1714
1716 const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaFormSharedData& rFormData ) :
1717 mrFormData( rFormData )
1718{
1719 OleInputObjectBase::construct( rParent, rxStrm, rSysFileName );
1720}
1721
1723{
1724 for (auto const& siteInfo : mrFormData.maSiteInfos)
1725 {
1726 if (mxStrm->isEof())
1727 break;
1728 if( (siteInfo.mbInStream) && (siteInfo.mnLength > 0) )
1729 {
1730 mxOut->emptyLine();
1731 writeDecItem( "control-id", siteInfo.mnId );
1732 writeInfoItem( "prog-id", siteInfo.maProgId );
1733 IndentGuard aIndGuard( mxOut );
1734 BinaryInputStreamRef xRelStrm( std::make_shared<RelativeInputStream>( *mxStrm, siteInfo.mnLength ) );
1735 FormControlStreamObject( *this, xRelStrm, &siteInfo.maProgId ).dump();
1736 }
1737 }
1739}
1740
1742{
1743 AxPropertyObjectBase::construct( rParent, "VBA-PAGE-PROPERTIES" );
1744}
1745
1747{
1749 dumpDecProperty< sal_uInt32 >( 0, "VBA-PAGE-TRANSITIONEFFECT" );
1750 dumpDecProperty< sal_uInt32 >( 0, "AX-CONV-MS" );
1751}
1752
1754{
1755 AxPropertyObjectBase::construct( rParent, "VBA-MULTIPAGE-PROPERTIES" );
1756}
1757
1759{
1761 mnPageCount = dumpDecProperty< sal_Int32 >( 0 );
1762 dumpDecProperty< sal_Int32 >( 0 );
1764}
1765
1767{
1768 if( ensureValid() && (mnPageCount > 0) )
1769 {
1770 writeEmptyItem( "page-ids" );
1771 IndentGuard aIndGuard( mxOut );
1772 mxOut->resetItemIndex();
1773 for( sal_Int32 nIdx = 0; ensureValid() && (nIdx < mnPageCount); ++nIdx )
1774 dumpDec< sal_Int32 >( "#id" );
1775 }
1776}
1777
1779 const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaFormSharedData& rFormData ) :
1780 mrFormData( rFormData )
1781{
1782 InputObjectBase::construct( rParent, rxStrm, rSysFileName );
1783}
1784
1786{
1787 for( size_t nIdx = 0, nCount = mrFormData.maSiteInfos.size(); !mxStrm->isEof() && (nIdx < nCount); ++nIdx )
1788 {
1789 mxOut->emptyLine();
1790 writeEmptyItem( "page" );
1791 IndentGuard aIndGuard( mxOut );
1792 VbaPageObject( *this ).dump();
1793 }
1794 if( !mxStrm->isEof() )
1795 {
1796 mxOut->emptyLine();
1797 writeEmptyItem( "multi-page" );
1798 IndentGuard aIndGuard( mxOut );
1799 VbaMultiPageObject( *this ).dump();
1800 }
1802}
1803
1804VbaContainerStorageObject::VbaContainerStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath ) :
1805 OleStorageObject( rParent, rxStrg, rSysPath )
1806{
1807 addPreferredStream( "f" );
1808}
1809
1810void VbaContainerStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
1811{
1812 if ( rStrmName == "f" )
1813 VbaFStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
1814 else if ( rStrmName == "o" )
1815 VbaOStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
1816 else if ( rStrmName == "x" )
1817 VbaXStreamObject( *this, rxStrm, rSysFileName, maFormData ).dump();
1818 else
1819 OleStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
1820}
1821
1822void VbaContainerStorageObject::implDumpStorage( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rSysPath )
1823{
1824 if( isFormStorage( rStrgPath ) )
1825 VbaContainerStorageObject( *this, rxStrg, rSysPath ).dump();
1826 else
1827 OleStorageObject( *this, rxStrg, rSysPath ).dump();
1828}
1829
1830bool VbaContainerStorageObject::isFormStorage( std::u16string_view rStrgPath ) const
1831{
1832 if( (rStrgPath.size() >= 3) && (rStrgPath[ 0 ] == 'i') )
1833 {
1834 std::u16string_view aId = rStrgPath.substr( 1 );
1835 if( (aId.size() == 2) && (aId[ 0 ] == '0') )
1836 aId = aId.substr( 1 );
1837 sal_Int32 nId = o3tl::toInt32(aId);
1838 if( (nId > 0) && (std::u16string_view(OUString::number( nId )) == aId) )
1839 for (auto const& siteInfo : maFormData.maSiteInfos)
1840 if( siteInfo.mnId == nId )
1841 return true;
1842 }
1843 return false;
1844}
1845
1847 meTextEnc( RTL_TEXTENCODING_MS_1252 )
1848{
1849}
1850
1851bool VbaSharedData::isModuleStream( const OUString& rStrmName ) const
1852{
1853 return maStrmOffsets.count( rStrmName ) > 0;
1854}
1855
1856sal_Int32 VbaSharedData::getStreamOffset( const OUString& rStrmName ) const
1857{
1858 StreamOffsetMap::const_iterator aIt = maStrmOffsets.find( rStrmName );
1859 return (aIt == maStrmOffsets.end()) ? 0 : aIt->second;
1860}
1861
1863 const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName, VbaSharedData& rVbaData ) :
1864 mrVbaData( rVbaData )
1865{
1866 mxInStrm = rxStrm;
1867 if( mxInStrm )
1868 {
1869 BinaryInputStreamRef xVbaStrm( std::make_shared<::oox::ole::VbaInputStream>( *mxInStrm ) );
1870 SequenceRecordObjectBase::construct( rParent, xVbaStrm, rSysFileName, "VBA-DIR-RECORD-NAMES", "VBA-DIR-SIMPLE-RECORDS" );
1871 }
1872}
1873
1875{
1877}
1878
1879bool VbaDirStreamObject::implReadRecordHeader( BinaryInputStream& rBaseStrm, sal_Int64& ornRecId, sal_Int64& ornRecSize )
1880{
1881 ornRecId = rBaseStrm.readuInt16();
1882 ornRecSize = rBaseStrm.readInt32();
1883
1884 // for no obvious reason, PROJECTVERSION record contains size field of 4, but is 6 bytes long
1885 if( ornRecId == 9 )
1886 ornRecSize = 6;
1887
1888 return !rBaseStrm.isEof();
1889}
1890
1892{
1893 switch( getRecId() )
1894 {
1895 case 0x0003:
1896 mrVbaData.meTextEnc = rtl_getTextEncodingFromWindowsCodePage( dumpDec< sal_uInt16 >( "codepage", "CODEPAGES" ) );
1897 break;
1898 case 0x0004:
1899 dumpByteString( "name" );
1900 break;
1901 case 0x0005:
1902 dumpByteString( "description" );
1903 break;
1904 case 0x0006:
1905 dumpByteString( "helpfile-path" );
1906 break;
1907 case 0x0009:
1908 dumpDec< sal_uInt32 >( "major" );
1909 dumpDec< sal_uInt16 >( "minor" );
1910 break;
1911 case 0x000C:
1912 dumpByteString( "constants" );
1913 break;
1914 case 0x000D:
1915 dumpByteStringWithLength( "lib-id" );
1916 dumpUnused( 6 );
1917 break;
1918 case 0x000E:
1919 dumpByteStringWithLength( "lib-id-absolute" );
1920 dumpByteStringWithLength( "lib-id-relative" );
1921 dumpDec< sal_uInt32 >( "major" );
1922 dumpDec< sal_uInt16 >( "minor" );
1923 break;
1924 case 0x0016:
1925 dumpByteString( "name" );
1926 break;
1927 case 0x0019:
1928 dumpByteString( "name" );
1929 maCurrStream.clear();
1930 mnCurrOffset = 0;
1931 break;
1932 case 0x001A:
1933 maCurrStream = dumpByteString( "stream-name" );
1934 break;
1935 case 0x001C:
1936 dumpByteString( "description" );
1937 break;
1938 case 0x002B:
1939 if( !maCurrStream.isEmpty() )
1941 maCurrStream.clear();
1942 mnCurrOffset = 0;
1943 break;
1944 case 0x002F:
1945 dumpByteStringWithLength( "lib-id-twiddled" );
1946 dumpUnused( 6 );
1947 break;
1948 case 0x0030:
1949 dumpByteStringWithLength( "lib-id-extended" );
1950 dumpUnused( 6 );
1951 dumpGuid( "original-typelib" );
1952 dumpDec< sal_uInt32 >( "cookie" );
1953 break;
1954 case 0x0031:
1955 mnCurrOffset = dumpHex< sal_Int32 >( "stream-offset", "CONV-DEC" );
1956 break;
1957 case 0x0032:
1958 dumpUniString( "stream-name" );
1959 break;
1960 case 0x0033:
1961 dumpByteString( "lib-id-original" );
1962 break;
1963 case 0x003C:
1964 dumpUniString( "constants" );
1965 break;
1966 case 0x003D:
1967 dumpByteString( "helpfile-path" );
1968 break;
1969 case 0x003E:
1970 dumpUniString( "name" );
1971 break;
1972 case 0x0040:
1973 dumpUniString( "description" );
1974 break;
1975 case 0x0047:
1976 dumpUniString( "name" );
1977 break;
1978 case 0x0048:
1979 dumpUniString( "description" );
1980 break;
1981 }
1982}
1983
1985{
1986 return dumpCharArray( rName, static_cast< sal_Int32 >( getRecSize() ), mrVbaData.meTextEnc );
1987}
1988
1990{
1991 return dumpUnicodeArray( rName, static_cast< sal_Int32 >( getRecSize() / 2 ) );
1992}
1993
1995{
1996 return dumpCharArray( rName, mxStrm->readInt32(), mrVbaData.meTextEnc );
1997}
1998
2000 const ObjectBase& rParent, const BinaryInputStreamRef& rxStrm,
2001 const OUString& rSysFileName, VbaSharedData& rVbaData, sal_Int32 nStrmOffset ) :
2002 mrVbaData( rVbaData ),
2003 mnStrmOffset( nStrmOffset )
2004{
2005 InputObjectBase::construct( rParent, rxStrm, rSysFileName );
2006}
2007
2009{
2010 dumpBinary( "perf-cache", mnStrmOffset );
2011 mxOut->emptyLine();
2012 writeEmptyItem( "source-code" );
2013 IndentGuard aIndGuard( mxOut );
2014 BinaryInputStreamRef xVbaStrm( std::make_shared<::oox::ole::VbaInputStream>( *mxStrm ) );
2015 TextLineStreamObject( *this, xVbaStrm, mrVbaData.meTextEnc ).dump();
2016}
2017
2018VbaStorageObject::VbaStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath, VbaSharedData& rVbaData ) :
2019 OleStorageObject( rParent, rxStrg, rSysPath ),
2020 mrVbaData( rVbaData )
2021{
2022 addPreferredStream( "dir" );
2023}
2024
2025void VbaStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
2026{
2027 if( rStrgPath.isEmpty() && rStrmName == "dir" )
2028 VbaDirStreamObject( *this, rxStrm, rSysFileName, mrVbaData ).dump();
2029 else if( mrVbaData.isModuleStream( rStrmName ) )
2030 VbaModuleStreamObject( *this, rxStrm, rSysFileName, mrVbaData, mrVbaData.getStreamOffset( rStrmName ) ).dump();
2031 else
2032 OleStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
2033}
2034
2035VbaFormStorageObject::VbaFormStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath, VbaSharedData& rVbaData ) :
2036 VbaContainerStorageObject( rParent, rxStrg, rSysPath ),
2037 mrVbaData( rVbaData )
2038{
2039}
2040
2041void VbaFormStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
2042{
2043 if ( rStrmName == "\003VBFrame" )
2044 TextLineStreamObject( *this, rxStrm, mrVbaData.meTextEnc, rSysFileName ).dump();
2045 else
2046 VbaContainerStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
2047}
2048
2049VbaProjectStorageObject::VbaProjectStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath ) :
2050 OleStorageObject( rParent, rxStrg, rSysPath )
2051{
2052 addPreferredStorage( "VBA" );
2053}
2054
2055void VbaProjectStorageObject::implDumpStream( const Reference< XInputStream >& rxStrm, const OUString& rStrgPath, const OUString& rStrmName, const OUString& rSysFileName )
2056{
2057 if( rStrgPath.isEmpty() && rStrmName == "PROJECT" )
2058 TextLineStreamObject( *this, rxStrm, maVbaData.meTextEnc, rSysFileName ).dump();
2059 else
2060 OleStorageObject::implDumpStream( rxStrm, rStrgPath, rStrmName, rSysFileName );
2061}
2062
2063void VbaProjectStorageObject::implDumpStorage( const StorageRef& rxStrg, const OUString& rStrgPath, const OUString& rSysPath )
2064{
2065 if ( rStrgPath == "VBA" )
2066 VbaStorageObject( *this, rxStrg, rSysPath, maVbaData ).dump();
2067 else
2068 VbaFormStorageObject( *this, rxStrg, rSysPath, maVbaData ).dump();
2069}
2070
2071ActiveXStorageObject::ActiveXStorageObject( const ObjectBase& rParent, const StorageRef& rxStrg, const OUString& rSysPath ) :
2072 VbaContainerStorageObject( rParent, rxStrg, rSysPath )
2073{
2074}
2075
2076void ActiveXStorageObject::implDumpBaseStream( const BinaryInputStreamRef& rxStrm, const OUString& rSysFileName )
2077{
2078 FormControlStreamObject( *this, rxStrm, rSysFileName ).dump();
2079}
2080
2081} // namespace oox
2082
2083#endif
2084
2085/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Interface for binary input stream classes.
bool isEof() const
Returns true, if the stream position is invalid (EOF).
virtual void implDumpBaseStream(const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName) override
Definition: oledumper.cxx:2076
ActiveXStorageObject(const ObjectBase &rParent, const StorageRef &rxStrg, const OUString &rSysPath)
Definition: oledumper.cxx:2071
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1154
AxCFontNewObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1149
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1171
AxColumnInfoObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1166
AxCommandButtonObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1176
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1181
virtual void implDumpExtended() override
Definition: oledumper.cxx:1196
AxImageObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1290
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1295
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1268
AxLabelObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1263
virtual void implDumpExtended() override
Definition: oledumper.cxx:1285
virtual void implDumpExtended() override
Definition: oledumper.cxx:1243
AxMorphControlObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1201
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1206
sal_uInt32 dumpFlagsProperty(sal_uInt32 nDefault, const char *pcNameList="AX-FLAGS")
Definition: oledumper.cxx:918
sal_uInt32 dumpColorProperty(sal_uInt32 nDefault)
Definition: oledumper.cxx:928
std::vector< StreamProperty > maStreamProps
Definition: oledumper.hxx:372
void construct(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName, const String &rPropNameList, bool b64BitPropFlags=false)
Definition: oledumper.cxx:841
LargePropertyVector maLargeProps
Definition: oledumper.hxx:370
void dumpStringProperty(OUString *pValue=nullptr)
Definition: oledumper.cxx:972
OUString dumpString(const String &rName, sal_uInt32 nSize, bool bArray)
Definition: oledumper.cxx:1039
void dumpGuidProperty(OUString *pValue=nullptr)
Definition: oledumper.cxx:966
void constructAxPropObj(const String &rPropNameList, bool b64BitPropFlags)
Definition: oledumper.cxx:1019
void dumpToPosition(sal_Int64 nPos)
Definition: oledumper.cxx:1012
OUString getPropertyName() const
Definition: oledumper.cxx:913
virtual void implDumpShortProperties()
Definition: oledumper.cxx:881
bool ensureValid(bool bCondition=true)
Definition: oledumper.cxx:889
virtual bool implIsValid() const override
Definition: oledumper.cxx:855
virtual void implDump() override
Definition: oledumper.cxx:860
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1319
AxScrollBarObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1314
AxSpinButtonObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1340
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1345
AxTabStripObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1364
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1369
virtual void implDumpExtended() override
Definition: oledumper.cxx:1398
virtual void implDumpCommonTrailing() override
Definition: oledumper.cxx:717
virtual void implDumpCommonExtra(sal_Int64 nEndPos) override
Definition: oledumper.cxx:700
ComCtlImageListObject(const InputObjectBase &rParent, sal_uInt16 nVersion)
Definition: oledumper.cxx:686
virtual void implDumpProperties() override
Definition: oledumper.cxx:691
virtual void implDump() override
Definition: oledumper.cxx:517
bool dumpComCtlCommon(sal_uInt32 nPartSize)
Definition: oledumper.cxx:569
virtual void implDumpCommonExtra(sal_Int64 nEndPos)
Definition: oledumper.cxx:523
virtual void implDumpCommonTrailing()
Definition: oledumper.cxx:527
bool dumpComCtlHeader(sal_uInt32 nExpId, sal_uInt16 nExpMajor=SAL_MAX_UINT16, sal_uInt16 nExpMinor=SAL_MAX_UINT16)
Definition: oledumper.cxx:531
bool dumpComCtlData(sal_uInt32 &ornCommonPartSize)
Definition: oledumper.cxx:556
virtual void implDumpProperties()=0
ComCtlObjectBase(const InputObjectBase &rParent, sal_uInt32 nDataId5, sal_uInt32 nDataId6, sal_uInt16 nVersion, bool bCommonPart, bool bComplexPart)
Definition: oledumper.cxx:506
virtual void implDumpProperties() override
Definition: oledumper.cxx:632
ComCtlProgressBarObject(const InputObjectBase &rParent, sal_uInt16 nVersion)
Definition: oledumper.cxx:627
virtual void implDumpProperties() override
Definition: oledumper.cxx:617
ComCtlScrollBarObject(const InputObjectBase &rParent, sal_uInt16 nVersion)
Definition: oledumper.cxx:612
virtual void implDumpProperties() override
Definition: oledumper.cxx:648
ComCtlSliderObject(const InputObjectBase &rParent, sal_uInt16 nVersion)
Definition: oledumper.cxx:643
virtual void implDumpProperties() override
Definition: oledumper.cxx:799
ComCtlStatusBarObject(const InputObjectBase &rParent, sal_uInt16 nVersion)
Definition: oledumper.cxx:794
virtual void implDumpCommonExtra(sal_Int64 nEndPos) override
Definition: oledumper.cxx:806
virtual void implDumpCommonTrailing() override
Definition: oledumper.cxx:828
virtual void implDumpProperties() override
Definition: oledumper.cxx:735
ComCtlTabStripObject(const InputObjectBase &rParent, sal_uInt16 nVersion)
Definition: oledumper.cxx:730
virtual void implDumpCommonExtra(sal_Int64 nEndPos) override
Definition: oledumper.cxx:749
ComCtlTreeViewObject(const InputObjectBase &rParent, sal_uInt16 nVersion)
Definition: oledumper.cxx:769
virtual void implDumpCommonExtra(sal_Int64 nEndPos) override
Definition: oledumper.cxx:784
virtual void implDumpProperties() override
Definition: oledumper.cxx:775
virtual void implDumpProperties() override
Definition: oledumper.cxx:671
ComCtlUpDownObject(const InputObjectBase &rParent, sal_uInt16 nVersion)
Definition: oledumper.cxx:666
const OUString & getStringOption(const String &rKey, const OUString &rDefault) const
NameListRef getNameList(const String &rListName) const
void eraseNameList(const String &rListName)
OUString getName(const NameListWrapper &rListWrp, Type nKey) const
Returns the name for the passed key from the passed name list.
Definition: dumperbase.hxx:912
std::shared_ptr< ListType > createNameList(const String &rListName)
Definition: dumperbase.hxx:906
virtual void implDump() override
Definition: oledumper.cxx:1423
FormControlStreamObject(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName, const OUString *pProgId=nullptr)
Definition: oledumper.cxx:1411
void constructFormCtrlStrmObj(const OUString *pProgId)
Definition: oledumper.cxx:1484
void dumpRemainingTo(sal_Int64 nPos)
void construct(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName)
css::util::DateTime dumpFileTime(const String &rName=EMPTY_STRING)
sal_Unicode dumpUnicode(const String &rName)
void dumpUnused(sal_Int32 nBytes)
OUString dumpCharArray(const String &rName, sal_Int32 nLen, rtl_TextEncoding eTextEnc, bool bHideTrailingNul=false)
OUString dumpUnicodeArray(const String &rName, sal_Int32 nLen, bool bHideTrailingNul=false)
void dumpBinary(const String &rName, sal_Int64 nBytes, bool bShowOffset=true)
void dumpUnknown(sal_Int32 nBytes)
OUString dumpGuid(const String &rName=EMPTY_STRING)
virtual bool implIsValid() const override
BinaryInputStreamRef mxStrm
Config & cfg() const
OleCompObjObject(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName)
Definition: oledumper.cxx:109
virtual void implDump() override
Definition: oledumper.cxx:114
void writeOleColorItem(const String &rName, sal_uInt32 nColor)
Definition: oledumper.cxx:64
OUString dumpAnsiString32OrStdClip(const String &rName)
Definition: oledumper.cxx:52
OUString dumpAnsiString32(const String &rName)
Definition: oledumper.cxx:37
OUString dumpUniString32OrStdClip(const String &rName)
Definition: oledumper.cxx:58
OUString dumpUniString32(const String &rName)
Definition: oledumper.cxx:42
sal_Int32 dumpStdClipboardFormat(const String &rName)
Definition: oledumper.cxx:47
sal_uInt32 dumpOleColor(const String &rName)
Definition: oledumper.cxx:70
OUString dumpCharArray8(const String &rName, sal_Int32 nLen)
Definition: oledumper.cxx:417
OlePropertyStreamObject(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName)
Definition: oledumper.cxx:178
OUString dumpString16(const String &rName)
Definition: oledumper.cxx:425
void dumpProperty(sal_Int32 nPropId, sal_uInt32 nStartPos)
Definition: oledumper.cxx:288
bool startElement(sal_uInt32 nStartPos)
Definition: oledumper.cxx:467
void dumpHlinks(sal_Int32 nSize)
Definition: oledumper.cxx:447
OUString dumpString8(const String &rName)
Definition: oledumper.cxx:411
void dumpDictionaryProperty(sal_uInt32 nStartPos)
Definition: oledumper.cxx:318
void dumpSection(const OUString &rGuid, sal_uInt32 nStartPos)
Definition: oledumper.cxx:219
sal_uInt16 dumpPropertyContents(sal_Int32 nPropId)
Definition: oledumper.cxx:338
void dumpBlob(sal_Int32 nPropId, const String &rName)
Definition: oledumper.cxx:398
virtual void implDump() override
Definition: oledumper.cxx:183
void writePropertyHeader(sal_Int32 nPropId, sal_uInt32 nStartPos)
Definition: oledumper.cxx:483
void dumpPropertyValue(sal_Int32 nPropId, sal_uInt16 nBaseType)
Definition: oledumper.cxx:352
bool dumpTypedProperty(const String &rName, sal_uInt16 nExpectedType)
Definition: oledumper.cxx:440
void dumpPropertyVector(sal_Int32 nPropId, sal_uInt16 nBaseType)
Definition: oledumper.cxx:381
OUString dumpCharArray16(const String &rName, sal_Int32 nLen)
Definition: oledumper.cxx:431
void dumpCodePageProperty(sal_uInt32 nStartPos)
Definition: oledumper.cxx:297
void writeSectionHeader(const OUString &rGuid, sal_uInt32 nStartPos)
Definition: oledumper.cxx:475
virtual void implDumpStream(const css::uno::Reference< css::io::XInputStream > &rxStrm, const OUString &rStrgPath, const OUString &rStrmName, const OUString &rSysFileName) override
Definition: oledumper.cxx:496
void construct(const ObjectBase &rParent, const StorageRef &rxStrg, const OUString &rSysPath)
OleStreamObject(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName)
Definition: oledumper.cxx:104
void writeEmptyItem(const String &rName)
void writeGuidItem(const String &rName, const OUString &rGuid)
void writeDecItem(const String &rName, Type nData, const NameListWrapper &rListWrp=NO_LIST)
void writeStringItem(const String &rName, std::u16string_view rData)
void writeHexItem(const String &rName, Type nData, const NameListWrapper &rListWrp=NO_LIST)
void writeInfoItem(const String &rName, const String &rData)
virtual bool implIsValid() const override
sal_Int64 getRecSize() const
sal_Int64 getRecId() const
void construct(const ObjectBase &rParent, const BinaryInputStreamRef &rxBaseStrm, const OUString &rSysFileName, const String &rRecNames, const String &rSimpleRecs)
StdFontObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:77
virtual void implDump() override
Definition: oledumper.cxx:82
StdPicObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:92
virtual void implDump() override
Definition: oledumper.cxx:97
void addPreferredStorage(const String &rStrgPath)
void addPreferredStream(const String &rStrmName)
virtual void implDumpStorage(const StorageRef &rxStrg, const OUString &rStrgPath, const OUString &rSysPath) override
Definition: oledumper.cxx:1822
VbaContainerStorageObject(const ObjectBase &rParent, const StorageRef &rxStrg, const OUString &rSysPath)
Definition: oledumper.cxx:1804
bool isFormStorage(std::u16string_view rStrgPath) const
Definition: oledumper.cxx:1830
virtual void implDumpStream(const css::uno::Reference< css::io::XInputStream > &rxStrm, const OUString &rStrgPath, const OUString &rStrmName, const OUString &rSysFileName) override
Definition: oledumper.cxx:1810
virtual bool implIsValid() const override
Definition: oledumper.cxx:1874
BinaryInputStreamRef mxInStrm
Definition: oledumper.hxx:741
virtual void implDumpRecordBody() override
Definition: oledumper.cxx:1891
OUString dumpByteString(const String &rName)
Definition: oledumper.cxx:1984
OUString dumpUniString(const String &rName)
Definition: oledumper.cxx:1989
virtual bool implReadRecordHeader(BinaryInputStream &rBaseStrm, sal_Int64 &ornRecId, sal_Int64 &ornRecSize) override
Definition: oledumper.cxx:1879
OUString dumpByteStringWithLength(const String &rName)
Definition: oledumper.cxx:1994
VbaDirStreamObject(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName, VbaSharedData &rVbaData)
Definition: oledumper.cxx:1862
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1599
VbaFStreamObject(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName, VbaFormSharedData &rFormData)
Definition: oledumper.cxx:1593
VbaFormSharedData & mrFormData
Definition: oledumper.hxx:615
virtual void implDumpExtended() override
Definition: oledumper.cxx:1631
void dumpFormSites(sal_uInt32 nCount)
Definition: oledumper.cxx:1655
VbaFormSharedData & mrFormData
Definition: oledumper.hxx:568
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1497
VbaFormClassInfoObject(const InputObjectBase &rParent, VbaFormSharedData &rFormData)
Definition: oledumper.cxx:1491
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1574
VbaFormDesignExtObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1569
VbaFormSharedData & mrFormData
Definition: oledumper.hxx:581
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1532
VbaFormSiteObject(const InputObjectBase &rParent, VbaFormSharedData &rFormData)
Definition: oledumper.cxx:1526
virtual void implDumpStream(const css::uno::Reference< css::io::XInputStream > &rxStrm, const OUString &rStrgPath, const OUString &rStrmName, const OUString &rSysFileName) override
Definition: oledumper.cxx:2041
VbaFormStorageObject(const ObjectBase &rParent, const StorageRef &rxStrg, const OUString &rSysPath, VbaSharedData &rVbaData)
Definition: oledumper.cxx:2035
VbaModuleStreamObject(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName, VbaSharedData &rVbaData, sal_Int32 nStrmOffset)
Definition: oledumper.cxx:1999
virtual void implDump() override
Definition: oledumper.cxx:2008
VbaMultiPageObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1753
virtual void implDumpExtended() override
Definition: oledumper.cxx:1766
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1758
VbaFormSharedData & mrFormData
Definition: oledumper.hxx:633
virtual void implDump() override
Definition: oledumper.cxx:1722
VbaOStreamObject(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName, VbaFormSharedData &rFormData)
Definition: oledumper.cxx:1715
VbaPageObject(const InputObjectBase &rParent)
Definition: oledumper.cxx:1741
virtual void implDumpShortProperties() override
Definition: oledumper.cxx:1746
virtual void implDumpStorage(const StorageRef &rxStrg, const OUString &rStrgPath, const OUString &rSysPath) override
Definition: oledumper.cxx:2063
virtual void implDumpStream(const css::uno::Reference< css::io::XInputStream > &rxStrm, const OUString &rStrgPath, const OUString &rStrmName, const OUString &rSysFileName) override
Definition: oledumper.cxx:2055
VbaProjectStorageObject(const ObjectBase &rParent, const StorageRef &rxStrg, const OUString &rSysPath)
Definition: oledumper.cxx:2049
virtual void implDumpStream(const css::uno::Reference< css::io::XInputStream > &rxStrm, const OUString &rStrgPath, const OUString &rStrmName, const OUString &rSysFileName) override
Definition: oledumper.cxx:2025
VbaSharedData & mrVbaData
Definition: oledumper.hxx:783
VbaStorageObject(const ObjectBase &rParent, const StorageRef &rxStrg, const OUString &rSysPath, VbaSharedData &rVbaData)
Definition: oledumper.cxx:2018
VbaXStreamObject(const ObjectBase &rParent, const BinaryInputStreamRef &rxStrm, const OUString &rSysFileName, VbaFormSharedData &rFormData)
Definition: oledumper.cxx:1778
virtual void implDump() override
Definition: oledumper.cxx:1785
VbaFormSharedData & mrFormData
Definition: oledumper.hxx:674
int nCount
#define OOX_DUMP_ERR_STREAM
Definition: dumperbase.hxx:71
#define OOX_DUMP_ERRASCII(ascii)
Definition: dumperbase.hxx:67
sal_Int16 nVersion
sal_Int32 nIndex
OUString aName
sal_uInt16 nPos
size
OUString aPropName
sal_Int32 toInt32(std::u16string_view str, sal_Int16 radix=10)
::std::vector< OUString > OUStringVector
Definition: dumperbase.hxx:94
void setFlag(Type &ornBitField, Type nMask, bool bSet=true)
Sets or clears (according to bSet) all set bits of nMask in ornBitField.
Definition: helper.hxx:167
std::shared_ptr< StorageBase > StorageRef
Definition: storagebase.hxx:42
const sal_uInt8 WINDOWS_CHARSET_DEFAULT
Definition: helper.hxx:63
bool getFlag(Type nBitField, Type nMask)
Returns true, if at least one of the bits set in nMask is set in nBitField.
Definition: helper.hxx:137
sal_Int16 nId
Definition: olehelper.cxx:98
GUIDCNamePair aData
Definition: olehelper.cxx:99
const sal_uInt16 CODEPAGE_UNICODE
QPRO_FUNC_TYPE nType
std::vector< VbaFormSiteInfo > maSiteInfos
Definition: oledumper.hxx:555
OUStringVector maClassInfoProgIds
Definition: oledumper.hxx:554
StreamOffsetMap maStrmOffsets
Definition: oledumper.hxx:710
bool isModuleStream(const OUString &rStrmName) const
Definition: oledumper.cxx:1851
sal_Int32 getStreamOffset(const OUString &rStrmName) const
Definition: oledumper.cxx:1856
rtl_TextEncoding meTextEnc
Definition: oledumper.hxx:711
unsigned char sal_uInt8
#define SAL_MAX_UINT16
sal_uInt16 sal_Unicode
#define SAL_MAX_UINT32
sal_Int32 nLength