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