ww8/dump was never built and rotted code: removed it

This commit is contained in:
Cédric Bosdonnat 2010-12-22 17:26:40 +01:00
parent dda59263cf
commit 7f5b607055
12 changed files with 0 additions and 13749 deletions

View file

@ -1,173 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <vcl/svapp.hxx>
#include <vcl/wrkwin.hxx>
#include <vcl/msgbox.hxx>
#include <sot/storage.hxx>
// globale Vars
char** pPara;
// Deklarationen
int PrepareConvert( String& rName, String& rOutName, String& rMess );
int DoConvert( const String& rName, BYTE nVersion );
void DeInit();
// -----------------------------------------------------------------------
class MyApp : public Application
{
public:
void Main();
};
// -----------------------------------------------------------------------
MyApp aMyApp;
// -----------------------------------------------------------------------
class MyWin : public WorkWindow
{
String& rMessg;
public:
MyWin( Window* pParent, WinBits aWinStyle, String& rMess ) :
WorkWindow(pParent, aWinStyle), rMessg( rMess ) {}
void Paint( const Rectangle& );
void Resize();
void MouseButtonDown( const MouseEvent& rMEvt );
void KeyInput( const KeyEvent& rKEvt );
};
// -----------------------------------------------------------------------
extern SvStorageStreamRef xStrm;
void MyApp::Main()
{
SvFactory::Init();
String aMess, aName, aOutName;
BYTE nVersion = 8;
int nArgs = GetCommandLineParamCount();
if (nArgs)
{
aName = GetCommandLineParam( 0 );
if (aName.Search('.') == STRING_NOTFOUND)
aName.AppendAscii( ".doc" );
if (nArgs >= 2)
{
aOutName = GetCommandLineParam( 1 );
if (nArgs > 2)
{
nVersion = GetCommandLineParam( 2 ).ToInt32();
if( 6 > nVersion || 8 < nVersion )
{
aMess.AssignAscii( "Aufruf: Dump1 InFile [OutFile] [6|7|8]" );
}
}
}
else
{
aOutName = aName;
aOutName.Erase(aOutName.Search('.'));
aOutName.AppendAscii( ".dmp" );
}
}
BOOL bOk = !aMess.Len()
&& !PrepareConvert( aName, aOutName, aMess )
&& !DoConvert( aName, nVersion );
if( !bOk )
{
MyWin aMainWin( NULL, WB_APP | WB_STDWORK, aMess );
aMainWin.SetText( String::CreateFromAscii( "WW8-Dumper" ));
aMainWin.Show();
aMainWin.Invalidate();
Execute();
}
DeInit();
// SvFactory::DeInit();
}
// -----------------------------------------------------------------------
void MyWin::Paint( const Rectangle& )
{
String aText( String::CreateFromAscii( "Dumper fuer WinWord-Dateien !\n"
"Die Wandlung ging schief. Ist es wirklich ein WW-File ?" ));
Size aWinSize = GetOutputSizePixel();
Size aTextSize( GetTextWidth( aText ), GetTextHeight());
Point aPos( aWinSize.Width() / 2 - aTextSize.Width() / 2,
aWinSize.Height() / 2 - aTextSize.Height() / 2 );
DrawText( aPos, aText );
aPos.Y() += 20;
DrawText( aPos, rMessg );
}
// -----------------------------------------------------------------------
void MyWin::Resize()
{
Invalidate();
}
// -----------------------------------------------------------------------
void MyWin::MouseButtonDown( const MouseEvent& )
{
}
// -----------------------------------------------------------------------
void MyWin::KeyInput( const KeyEvent& rKEvt )
{
WorkWindow::KeyInput( rKEvt );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

File diff suppressed because it is too large Load diff

View file

@ -1,122 +0,0 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=.
PRJNAME=DUMP8
TARGET=dump8
# --- Settings ---------------------------------------------------
.INCLUDE : settings.mk
CXXFILES= dump8.cxx dump8a.cxx ww8dout.cxx ww8darr.cxx ww8scan.cxx msvbasic.cxx
OBJFILES= $(OBJ)$/dump8.obj $(OBJ)$/dump8a.obj $(OBJ)$/ww8dout.obj \
$(OBJ)$/ww8darr.obj $(OBJ)$/ww8scan.obj $(OBJ)$/msvbasic.obj
.IF "$(depend)" == ""
CFLAGS+= -DDUMP
# --- DUMP8 EXE --------------------------------------------------------
# IENV=$(IENV);..\RES
APP1TARGET=$(PRJNAME)
# RESLIB1NAME=vu
# RESLIB1SRSFILES=$(SRS)$/main.srs
APP1LIBS=$(LIB1TARGET)
.IF "$(GUI)" == "WNT"
APP1STDLIBS= $(SVTOOLLIB) $(SVLLIB) $(TOOLSLIB) $(SVLIB) $(SVMEMLIB) $(SO2LIB)
# irtl.lib
.IF "$(SO3)" == ""
APP1STDLIBS+= sdstor.lib
.ELSE
APP1STDLIBS+= $(SOTLIB)
.ENDIF
.IF "$(COMEX)"=="10"
APP1STDLIBS+= $(OLE32LIB) $(OLEAUT32LIB) $(UUIDLIB) $(SHELL32LIB) $(ADVAPI32LIB) libci.lib
.ELSE
APP1STDLIBS+= $(OLE32LIB) $(OLEAUT32LIB) $(UUIDLIB) $(SHELL32LIB) $(ADVAPI32LIB) libci.lib msvcirt.lib
.ENDIF
.ELSE
.IF "$(GUI)" == "OS2"
APP1STDLIBS=sdstor.lib $(SO2LIB) $(SVTOOLLIB) $(SVLIB) tools.lib $(SVMEMLIB) $(SVXLIB)
.ELSE
APP1STDLIBS=$(SVTOOLLIB) tools.lib $(SVLIB) $(SVMEMLIB) sdstor.lib $(SO2LIB) $(SVXLIB)
APP1STDLIBS+= ole2 compobj storage shell
.ENDIF
.ENDIF
.IF "$(GUI)"=="WNT"
APP1DEPN= $(L)$/svtool.lib $(L)$/itools.lib $(SVLIBDEPEND) $(L)$/svmem.lib $(L)$/so2.lib
.ELSE
APP1DEPN= $(L)$/svtool.lib $(L)$/tools.lib $(SVLIBDEPEND) $(L)$/svmem.lib $(L)$/so2.lib
.ENDIF
APP1OBJS= $(OBJ)$/dump8.obj $(OBJ)$/dump8a.obj $(OBJ)$/ww8dout.obj \
$(OBJ)$/ww8darr.obj $(OBJ)$/ww8scan.obj $(OBJ)/msvbasic.obj
APP1DEF= $(MISC)$/$(PRJNAME).def
#-------------------------------------------------------------------------
# OS/2
#-------------------------------------------------------------------------
.IF "$(GUI)" == "OS2"
ALL: \
$(SRS)$/main.srs \
ALLTAR
$(MISC)$/$(PRJNAME).def: makefile
echo NAME VIEWER WINDOWAPI >$@
echo DESCRIPTION 'Storage Viewer (C)1995 STAR DIVISION GmbH' >>$@
echo EXETYPE OS2 >>$@
echo PROTMODE >>$@
echo STUB 'OS2STUB.EXE' >>$@
echo CODE LOADONCALL >>$@
echo DATA PRELOAD MULTIPLE >>$@
echo HEAPSIZE 4096 >>$@
echo STACKSIZE 30000 >>$@
.ENDIF # GUI == OS2
#-------------------------------------------------------------------------
# Windows NT
#-------------------------------------------------------------------------
# --- Targets -----------------------------------------------------------
.ENDIF
.INCLUDE : target.mk

View file

@ -1,538 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <string.h> // memset(), ...
#ifndef UNX
#include <io.h> // access()
#endif
#include <msvbasic.hxx>
/* class VBA_Impl:
* The VBA class provides a set of methods to handle Visual Basic For
* Applications streams, the constructor is given the root ole2 stream
* of the document, Open reads the VBA project file and figures out
* the number of VBA streams, and the offset of the data within them.
* Decompress decompresses a particular numbered stream, NoStreams returns
* this number, and StreamName can give you the streams name. Decompress
* will call Output when it has a 4096 byte collection of data to output,
* and also with the final remainder of data if there is still some left
* at the end of compression. Output is virtual to allow custom handling
* of each chunk of decompressed data. So inherit from this to do something
* useful with the data.
*
* cmc
* */
BYTE VBA_Impl::ReadPString(SvStorageStreamRef &xVBAProject)
{
UINT16 idlen;
BYTE type=0;
*xVBAProject >> idlen;
BYTE out;
int i=0;
if (idlen < 6)
{
type=0;
xVBAProject->SeekRel(-2);
return(type);
}
for(i=0;i<idlen/2;i++)
{
*xVBAProject >> out;
xVBAProject->SeekRel(1);
if (i==2)
{
type=out;
if ((type != 'G') && (type != 'C'))
type=0;
if (type == 0)
{
xVBAProject->SeekRel(-8);
break;
}
}
}
return(type);
}
void VBA_Impl::ConfirmFixedOctect(SvStorageStreamRef &xVBAProject)
{
static const BYTE stest[8] =
{
0x06, 0x02, 0x01, 0x00, 0x08, 0x02, 0x00, 0x00
};
BYTE test[8];
xVBAProject->Read(test,8);
if (memcmp(stest,test,8) != 0)
DBG_WARNING("Found a different octect, please report");
}
void VBA_Impl::Confirm12Zeros(SvStorageStreamRef &xVBAProject)
{
static const BYTE stest[12]={0};
BYTE test[12];
xVBAProject->Read(test,12);
if (memcmp(stest,test,12) != 0)
DBG_WARNING("Found a Non Zero block, please report");
}
void VBA_Impl::ConfirmHalfWayMarker(SvStorageStreamRef &xVBAProject)
{
static const BYTE stest[12]={0,0,0,0,0,0,0,0,0,0,1,0};
BYTE test[12];
xVBAProject->Read(test,12);
if (memcmp(stest,test,12) != 0)
DBG_WARNING("Found a different halfway marker, please report");
}
void VBA_Impl::ConfirmFixedMiddle(SvStorageStreamRef &xVBAProject)
{
static const BYTE stest[20] =
{
0x00, 0x00, 0xe1, 0x2e, 0x45, 0x0d, 0x8f, 0xe0,
0x1a, 0x10, 0x85, 0x2e, 0x02, 0x60, 0x8c, 0x4d,
0x0b, 0xb4, 0x00, 0x00
};
BYTE test[20];
xVBAProject->Read(test,20);
if (memcmp(stest,test,20) != 0)
{
DBG_WARNING("Found a different middle marker, please report");
xVBAProject->SeekRel(-20);
}
}
void VBA_Impl::ConfirmFixedMiddle2(SvStorageStreamRef &xVBAProject)
{
static const BYTE stest[20] =
{
0x00, 0x00, 0x2e, 0xc9, 0x27, 0x8e, 0x64, 0x12,
0x1c, 0x10, 0x8a, 0x2f, 0x04, 0x02, 0x24, 0x00,
0x9c, 0x02, 0x00, 0x00
};
BYTE test[20];
xVBAProject->Read(test,20);
if (memcmp(stest,test,20) != 0)
{
DBG_WARNING("Found a different middle2 marker, please report");
xVBAProject->SeekRel(-20);
}
}
void VBA_Impl::Output( int nLen, const BYTE *pData)
{
sVBAString += String( (const sal_Char *)pData, nLen );
/*
//For debugging purposes
for(int i=0;i<len;i++)
*pOut << data[i];
*/
}
int VBA_Impl::ReadVBAProject(const SvStorageRef &rxVBAStorage)
{
SvStorageStreamRef xVBAProject;
xVBAProject = rxVBAStorage->OpenStream(
String::CreateFromAscii( "_VBA_PROJECT" ),
STREAM_STD_READ | STREAM_NOCREATE );
if( !xVBAProject.Is() || SVSTREAM_OK != xVBAProject->GetError() )
{
DBG_WARNING("Not able to find vba project, cannot find macros");
return(0);
}
xVBAProject->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
//*pOut << hex;
BYTE header[30] =
{
0xcc, 0x61, 0x5e, 0x00, 0x00, 0x01, 0x00, 0xff,
0x07, 0x04, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00,
0xe4, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x01, 0x00
};
BYTE headerin[30];
xVBAProject->Read(headerin,30);
if (memcmp(header,headerin,30) != 0)
DBG_WARNING("Warning VBA header is different, please report");
UINT16 value;
*xVBAProject >> value;
//*pOut << "Trigger value 1 is " << value << endl;
UINT16 svalue;
*xVBAProject >> svalue;
if (svalue != 0x02)
DBG_WARNING("Warning VBA number is different, please report");
int count=0;
BYTE testc=0;
//*pOut << "Other strings after the middle are..." << endl;
//There appears to be almost any number of strings acceptable
//most begin with */G , and sometimes with
//*/C. Those with G always have a trailer of 12 bytes, those
//with C come in pairs, the first with no trailer, and the
//second with one of 12 bytes. The following code attemts
//to read these strings and ends when it reaches a sequence of
//bytes which fails a test to be a valid string. So this
//while loop here is the particular piece of code which is
//very suspect and likely to be the cause of any crashes and
//problems.
while ((testc = ReadPString(xVBAProject)) != 0)
{
//*pOut << endl;
//*pOut << "testcharacter is " << testc << endl;
switch (testc)
{
case 'C':
count++;
if (count == 2)
{
Confirm12Zeros(xVBAProject);
count=0;
}
break;
default:
case 'G':
Confirm12Zeros(xVBAProject);
break;
}
}
//appears to be a fixed 20 byte sequence here, and then the strings
//continue
ConfirmFixedMiddle(xVBAProject);
count=0;
testc=0;
while ((testc = ReadPString(xVBAProject)) != 0)
{
//*pOut << endl;
//*pOut << "testcharacter is " << testc << endl;
switch (testc)
{
case 'C':
count++;
if (count == 2)
{
Confirm12Zeros(xVBAProject);
count=0;
}
break;
default:
case 'G':
Confirm12Zeros(xVBAProject);
break;
}
}
//there *may* be another different 20byte fixed string
ConfirmFixedMiddle2(xVBAProject);
//*pOut << "testc is " << testc << endl;
//*pOut << "position is " << xVBAProject->Tell() << endl;
UINT16 nModules;
*xVBAProject >> nModules;
//begin section, this section isn't really 100% correct
//*pOut << nModules << hex << " vba modules" << endl;
xVBAProject->SeekRel(2*nModules);
xVBAProject->SeekRel(4);
//*pOut << "position is " << xVBAProject->Tell() << endl;
ConfirmFixedOctect(xVBAProject);
UINT16 junksize;
while(junksize != 0xFFFF)
{
xVBAProject->Read(&junksize,2); // usually 18 02, sometimes 1e 02
//but sometimes its a run of numbers until 0xffff, gagh!!!
//*pOut << "position is " << xVBAProject->Tell() << "len is "
// << junksize << endl;
}
UINT16 ftest;
*xVBAProject >> ftest;
if (ftest != 0xFFFF)
xVBAProject->SeekRel(ftest);
*xVBAProject >> ftest;
if (ftest != 0xFFFF)
xVBAProject->SeekRel(ftest);
xVBAProject->SeekRel(100);
//*pOut << "position is " << xVBAProject->Tell() << endl;
//end section
*xVBAProject >> nOffsets;
pOffsets = new VBAOffset_Impl[nOffsets];
int i;
for (i=0;i<nOffsets;i++)
{
BYTE discard;
UINT16 len;
*xVBAProject >> len;
int j;
for (j=0;j<len/2;j++)
{
*xVBAProject >> discard;
pOffsets[i].sName += discard;
*xVBAProject >> discard;
}
*xVBAProject >> len;
xVBAProject->SeekRel(len);
//begin section, another problem area
*xVBAProject >> len;
if (len == 0xFFFF)
{
xVBAProject->SeekRel(2);
*xVBAProject >> len;
xVBAProject->SeekRel(len);
}
else
xVBAProject->SeekRel(len+2);
//
/* I have a theory that maybe you read a 16bit len, and
* if it has 0x02 for the second byte then it is a special
* token of its own that affects nothing else, otherwise
* it is a len of the following data. C. I must test this
* theory later.
*/
//end section
xVBAProject->SeekRel(8);
BYTE no_of_octects;
*xVBAProject >> no_of_octects;
for(j=0;j<no_of_octects;j++)
xVBAProject->SeekRel(8);
xVBAProject->SeekRel(6);
*xVBAProject >> pOffsets[i].nOffset;
//*pOut << pOffsets[i].pName.GetStr() << " at 0x" << hex << pOffsets[i].nOffset << endl;
xVBAProject->SeekRel(2);
}
//*pOut << endl;
return(nOffsets);
}
BOOL VBA_Impl::Open( const String &rToplevel,const String &rSublevel )
{
/* beginning test for vba stuff */
BOOL bRet = FALSE;
SvStorageRef xMacros= xStor->OpenStorage(rToplevel);
if( !xMacros.Is() || SVSTREAM_OK != xMacros->GetError() )
{
DBG_WARNING("No Macros Storage");
}
else
{
xVBA = xMacros->OpenStorage(rSublevel);
if( !xVBA.Is() || SVSTREAM_OK != xVBA->GetError() )
{
DBG_WARNING("No Visual Basic in Storage");
}
else
{
if (ReadVBAProject(xVBA))
bRet = TRUE;
}
}
/* end test for vba stuff */
return bRet;
}
const String &VBA_Impl::Decompress( UINT16 nIndex, int *pOverflow)
{
SvStorageStreamRef xVBAStream;
sVBAString.Erase();
DBG_ASSERT( nIndex < nOffsets, "Index out of range" );
xVBAStream = xVBA->OpenStream( pOffsets[nIndex].sName,
STREAM_STD_READ | STREAM_NOCREATE );
if (pOverflow)
*pOverflow=0;
if( !xVBAStream.Is() || SVSTREAM_OK !=
xVBAStream->GetError() )
{
DBG_WARNING("Not able to open vb module ");
// DBG_WARNING((pOffsets[nIndex].sName).GetStr());
}
else
{
xVBAStream->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
DecompressVBA(nIndex,xVBAStream);
/*
* if len was too big for a single string set that variable ?
* if ((len > XX) && (pOverflow))
*pOverflow=1;
*/
if (bCommented)
{
String sTempStringa(String::CreateFromAscii( "\x0D\x0A"));
String sTempStringb(String::CreateFromAscii( "\x0D\x0ARem "));
sVBAString.SearchAndReplaceAll(sTempStringa,sTempStringb);
sVBAString.InsertAscii("Rem ",0);
}
}
return sVBAString;
}
int VBA_Impl::DecompressVBA( int nIndex, SvStorageStreamRef &xVBAStream )
{
BYTE leadbyte;
unsigned int pos = 0;
//*pOut << "jumping to " << hex << offsets[nIndex].offset << endl;
xVBAStream->Seek(pOffsets[nIndex].nOffset+3);
int len;
UINT16 token;
int distance, shift, clean=1;
while(xVBAStream->Read(&leadbyte,1))
{
//*pOut << "reading 8 data unit block beginning with " << leadbyte << int(leadbyte) << " at pos " << xVBAStream->Tell() << " real pos " << pos << endl;
for(int position=0x01;position < 0x100;position=position<<1)
{
//we see if the leadbyte has flagged this location as a dataunit
//which is actually a token which must be looked up in the history
if (leadbyte & position)
{
*xVBAStream >> token;
if (clean == 0)
clean=1;
//For some reason the division of the token into the length
//field of the data to be inserted, and the distance back into
//the history differs depending on how full the history is
int pos2 = pos%WINDOWLEN;
if (pos2 <= 0x10)
shift = 12;
else if (pos2 <= 0x20)
shift = 11;
else if (pos2 <= 0x40)
shift = 10;
else if (pos2 <= 0x80)
shift = 9;
else if (pos2 <= 0x100)
shift = 8;
else if (pos2 <= 0x200)
shift = 7;
else if (pos2 <= 0x400)
shift = 6;
else if (pos2 <= 0x800)
shift = 5;
else
shift = 4;
int i;
len=0;
for(i=0;i<shift;i++)
len |= token & (1<<i);
//*pOut << endl << "match lookup token " << int(token) << "len " << int(len) << endl;
len += 3;
//*pOut << endl << "len is " << len << "shift is " << shift << endl;
distance = token >> shift;
//*pOut << "distance token shift is " << distance << " " << int(token) << " " << shift << "pos is " << pos << " " << xVBAStream->Tell() << endl;
//read the len of data from the history, wrapping around the
//WINDOWLEN boundary if necessary
//data read from the history is also copied into the recent
//part of the history as well.
for (i = 0; i < len; i++)
{
unsigned char c;
//*pOut << endl << (pos%WINDOWLEN)-distance-1 << " " << pos << " " << distance << endl;
c = aHistory[(pos-distance-1)%WINDOWLEN];
aHistory[pos%WINDOWLEN] = c;
pos++;
//*pOut << "real pos is " << pos << endl;
//
//temp removed
//*pOut << c ;
}
}
else
{
// special boundary case code, not guarantueed to be correct
// seems to work though, there is something wrong with the
// compression scheme (or maybe a feature) where when
// the data ends on a WINDOWLEN boundary and the excess
// bytes in the 8 dataunit list are discarded, and not
// interpreted as tokens or normal data.
if ((pos != 0) && ((pos%WINDOWLEN) == 0) && (clean))
{
//*pOut << "at boundary position is " << position << " " << xVBAStream->Tell() << " pos is " << pos << endl;
//if (position != 0x01)
//*pOut << "must restart by eating remainder single byte data units" << endl;
xVBAStream->SeekRel(2);
clean=0;
Output(WINDOWLEN,aHistory);
break;
}
//This is the normal case for when the data unit is not a
//token to be looked up, but instead some normal data which
//can be output, and placed in the history.
if (xVBAStream->Read(&aHistory[pos%WINDOWLEN],1))
{
pos++;
//temp removed
//*pOut << aHistory[pos++%WINDOWLEN];
}
if (clean == 0)
clean=1;
//*pOut << "pos is " << pos << " " << xVBAStream->Tell() << endl;
}
}
}
if (pos%WINDOWLEN)
Output(pos%WINDOWLEN,aHistory);
return(pos);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -1,105 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _MSVBASIC_HXX
#define _MSVBASIC_HXX
#ifdef _SOLAR_H
#include <tools/solar.h>
#endif
#include <tools/debug.hxx>
#include <sot/storage.hxx>
/* class VBA:
* The VBA class provides a set of methods to handle Visual Basic For
* Applications streams, the constructor is given the root ole2 stream
* of the document, Open reads the VBA project file and figures out
* the number of VBA streams, and the offset of the data within them.
* Decompress decompresses a particular numbered stream, NoStreams returns
* this number, and StreamName can give you the streams name. Decompress
* will return a string with the decompressed data. The optional extra
* argument will be set if not NULL to 1 in the case of a string overflow,
* if I can figure out how to do that.
*
* Otherwise it is possible to inherit from VBA and implement a Output
* member which gets called with each 4096 output sized block.
*
* cmc
* */
#define WINDOWLEN 4096
class VBA_Impl
{
public:
VBA_Impl( SvStorage &rIn, BOOL bCmmntd = TRUE )
: xStor(&rIn), pOffsets(0), nOffsets(0), bCommented(bCmmntd)
{}
~VBA_Impl() {if (nOffsets) delete [] pOffsets;}
//0 for failure, 1 for success
BOOL Open( const String &rToplevel, const String &rSublevel);
const String & Decompress( UINT16 nIndex, int *pOverflow=0);
UINT16 GetNoStreams() const { return nOffsets; }
const String &GetStreamName( UINT16 nIndex ) const
{
DBG_ASSERT( nIndex < nOffsets, "Index out of range" );
return pOffsets[ nIndex ].sName;
}
virtual void Output(int len,const BYTE *data);
private:
struct VBAOffset_Impl
{
String sName;
UINT32 nOffset;
};
SvStorageRef xVBA;
String sVBAString;
SvStorageRef xStor;
VBAOffset_Impl *pOffsets;
UINT16 nOffsets;
BYTE aHistory[ WINDOWLEN ];
BOOL bCommented;
//0 for failure, anything else for success
int ReadVBAProject(const SvStorageRef &rxVBAStorage);
int DecompressVBA(int index, SvStorageStreamRef &rxVBAStream);
void Confirm12Zeros(SvStorageStreamRef &xVBAProject);
void ConfirmHalfWayMarker(SvStorageStreamRef &xVBAProject);
void ConfirmFixedMiddle(SvStorageStreamRef &xVBAProject);
void ConfirmFixedMiddle2(SvStorageStreamRef &xVBAProject);
void ConfirmFixedOctect(SvStorageStreamRef &xVBAProject);
BYTE ReadPString(SvStorageStreamRef &xVBAProject);
};
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -1,548 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <stdlib.h>
#include "ww8dout.hxx" // OutShort()
#include "ww8darr.hxx"
//-----------------------------------------
SprmDumpInfo aSprmDumpTab[] = {
0, (FnOut)0, "NOP(0)",
2, OutShort, "sprmPIstd", // pap.istd (style code)
3, (FnOut)0, "sprmPIstdPermute", // pap.istd permutation
4, OutByte, "sprmPIncLv1", // pap.istddifference
5, OutByte, "sprmPJc", // pap.jc (justification)
6, OutBool, "sprmPFSideBySide", // pap.fSideBySide
7, OutBool, "sprmPFKeep", // pap.fKeep
8, OutBool, "sprmPFKeepFollow ", // pap.fKeepFollow
9, OutBool, "sprmPPageBreakBefore", // pap.fPageBreakBefore
10, (FnOut)0, "sprmPBrcl", // pap.brcl
11, (FnOut)0, "sprmPBrcp ", // pap.brcp
12, (FnOut)0, "sprmPAnld", // pap.anld (ANLD structure)
13, OutByte, "sprmPNLvlAnm", // pap.nLvlAnm nn
14, OutBool, "sprmPFNoLineNumb", //ap.fNoLnn
//??
15, OutTab, "?sprmPChgTabsPapx", // pap.itbdMac, ...
16, OutShort, "sprmPDxaRight", // pap.dxaRight
17, OutShort, "sprmPDxaLeft", // pap.dxaLeft
18, OutWord, "sprmPNest", // pap.dxaLeft
19, OutShort, "sprmPDxaLeft1", // pap.dxaLeft1
20, OutShorts, "sprmPDyaLine", // pap.lspd an LSPD
21, OutWord, "sprmPDyaBefore", // pap.dyaBefore
22, OutWord, "sprmPDyaAfter", // pap.dyaAfter
//??
23, (FnOut)0, "?sprmPChgTabs", // pap.itbdMac, pap.rgdxaTab, ...
24, OutBool, "sprmPFInTable", // pap.fInTable
25, OutBool, "sprmPTtp", // pap.fTtp
26, OutWord, "sprmPDxaAbs", // pap.dxaAbs
27, OutWord, "sprmPDyaAbs", // pap.dyaAbs
28, OutWord, "sprmPDxaWidth", // pap.dxaWidth
29, (FnOut)0, "sprmPPc", // pap.pcHorz, pap.pcVert
30, (FnOut)0, "sprmPBrcTop10", // pap.brcTop BRC10
31, (FnOut)0, "sprmPBrcLeft10", // pap.brcLeft BRC10
32, (FnOut)0, "sprmPBrcBottom10", // pap.brcBottom BRC10
33, (FnOut)0, "sprmPBrcRight10", // pap.brcRight BRC10
34, (FnOut)0, "sprmPBrcBetween10", // pap.brcBetween BRC10
35, (FnOut)0, "sprmPBrcBar10", // pap.brcBar BRC10
36, OutWord, "sprmPFromText10", // pap.dxaFromText dxa
37, (FnOut)0, "sprmPWr", // pap.wr wr
38, OutWordHex, "sprmPBrcTop", // pap.brcTop BRC
39, OutWordHex, "sprmPBrcLeft", // pap.brcLeft BRC
40, OutWordHex, "sprmPBrcBottom", // pap.brcBottom BRC
41, OutWordHex, "sprmPBrcRight", // pap.brcRight BRC
42, (FnOut)0, "sprmPBrcBetween", // pap.brcBetween BRC
43, (FnOut)0, "sprmPBrcBar",//pap.brcBar BRC word
44, OutBool, "sprmPFNoAutoHyph",//pap.fNoAutoHyph
45, OutWord, "sprmPWHeightAbs",//pap.wHeightAbs w
46, (FnOut)0, "sprmPDcs",//pap.dcs DCS
47, OutWordHex, "sprmPShd",//pap.shd SHD
48, OutWord, "sprmPDyaFromText",//pap.dyaFromText dya
49, OutWord, "sprmPDxaFromText",//pap.dxaFromText dxa
50, OutBool, "sprmPFLocked", // pap.fLocked 0 or 1 byte
51, OutBool, "sprmPFWidowControl", // pap.fWidowControl 0 or 1 byte
//??
52, (FnOut)0, "?sprmPRuler 52", //???
65, OutBool, "sprmCFStrikeRM", // chp.fRMarkDel 1 or 0 bit
66, OutBool, "sprmCFRMark", // chp.fRMark 1 or 0 bit
67, OutBool, "sprmCFFldVanish", // chp.fFldVanish 1 or 0 bit
68, OutTab68, "sprmCPicLocation", // chp.fcPic and chp.fSpec
69, OutShort, "sprmCIbstRMark", // chp.ibstRMark index into sttbRMark
70, (FnOut)0, "sprmCDttmRMark", // chp.dttm DTTM long
71, OutBool, "sprmCFData", // chp.fData 1 or 0 bit
72, OutShort, "sprmCRMReason", // chp.idslRMReason an index to a table
73, (FnOut)0, "sprmCChse", // chp.fChsDiff and chp.chse see below 3 bytes
74, (FnOut)0, "sprmCSymbol", // chp.fSpec, chp.chSym and chp.ftcSym
75, OutBool, "sprmCFOle2", // chp.fOle2 1 or 0 bit
80, OutShort, "sprmCIstd", // chp.istd istd, see stylesheet definition short
81, (FnOut)0, "sprmCIstdPermute", // chp.istd permutation vector (see below)
82, (FnOut)0, "sprmCDefault", // whole CHP (see below) none variable length
83, (FnOut)0, "sprmCPlain", // whole CHP (see below) none 0
84, (FnOut)0, "??84",
85, OutBool4, "sprmCFBold", // chp.fBold 0,1, 128, or 129 (see below) byte
86, OutBool4, "sprmCFItalic", // chp.fItalic 0,1, 128, or 129 (see below) byte
87, OutBool4, "sprmCFStrike", // chp.fStrike 0,1, 128, or 129 (see below) byte
88, OutBool4, "sprmCFOutline", // chp.fOutline 0,1, 128, or 129 (see below) byte
89, OutBool4, "sprmCFShadow", // chp.fShadow 0,1, 128, or 129 (see below) byte
90, OutBool4, "sprmCFSmallCaps", // chp.fSmallCaps 0,1, 128, or 129 (see below) byte
91, OutBool4, "sprmCFCaps", // chp.fCaps 0,1, 128, or 129 (see below) byte
92, OutBool4, "sprmCFVanish", // chp.fVanish 0,1, 128, or 129 (see below) byte
93, OutWord, "sprmCFtc", // chp.ftc ftc word
94, OutByte, "sprmCKul", // chp.kul kul byte
95, (FnOut)0, "sprmCSizePos", // chp.hps, chp.hpsPos (see below) 3 bytes
96, OutWord, "sprmCDxaSpace", // chp.dxaSpace dxa word
97, OutWord, "sprmCLid", // chp.lid LID word
98, OutByte, "sprmCIco", // chp.ico ico byte
99, OutWord, "sprmCHps", // chp.hps hps word!
100, OutByte, "sprmCHpsInc", // chp.hps (see below) byte
101, OutWord, "sprmCHpsPos", // chp.hpsPos hps byte
102, OutByte, "sprmCHpsPosAdj", // chp.hpsPos hps (see below) byte
//??
103, (FnOut)0, "?sprmCMajority", // chp.fBold, chp.fItalic, chp.fSmallCaps, ...
104, OutByte, "sprmCIss", // chp.iss iss byte
105, (FnOut)0, "sprmCHpsNew50", // chp.hps hps variable width, length always recorded as 2
106, (FnOut)0, "sprmCHpsInc1", // chp.hps complex (see below) variable width, length always recorded as 2
107, OutShort, "sprmCHpsKern", // chp.hpsKern hps short
108, (FnOut)0, "sprmCMajority50", // chp.fBold, chp.fItalic, chp.fSmallCaps, chp.fVanish, ...
109, OutShort, "sprmCHpsMul", // chp.hps percentage to grow hps short
110, OutShort, "sprmCCondHyhen", // chp.ysri ysri short
117, OutBool, "sprmCFSpec", // chp.fSpec 1 or 0 bit
118, OutBool, "sprmCFObj", // chp.fObj 1 or 0 bit
119, (FnOut)0, "sprmPicBrcl", // pic.brcl brcl (see PIC structure definition) byte
120, (FnOut)0, "sprmPicScale", // pic.mx, pic.my, pic.dxaCropleft,
121, (FnOut)0, "sprmPicBrcTop", // pic.brcTop BRC word
122, (FnOut)0, "sprmPicBrcLeft", // pic.brcLeft BRC word
123, (FnOut)0, "sprmPicBrcBottom", // pic.brcBottom BRC word
124, (FnOut)0, "sprmPicBrcRight", // pic.brcRight BRC word
131, OutByte, "sprmSScnsPgn", // sep.cnsPgn cns byte
132, (FnOut)0, "sprmSiHeadingPgn", // sep.iHeadingPgn heading number level byte
133, (FnOut)0, "sprmSOlstAnm", // sep.olstAnm OLST variable length
136, (FnOut)0, "sprmSDxaColWidth", // sep.rgdxaColWidthSpacing complex (see below) 3 bytes
137, (FnOut)0, "sprmSDxaColSpacing", // sep.rgdxaColWidthSpacing complex (see below) 3 bytes
138, OutBool, "sprmSFEvenlySpaced", // sep.fEvenlySpaced 1 or 0 byte
139, OutBool, "sprmSFProtected", // sep.fUnlocked 1 or 0 byte
140, OutWord, "sprmSDmBinFirst", // sep.dmBinFirst word
141, OutWord, "sprmSDmBinOther", // sep.dmBinOther word
142, OutByte, "sprmSBkc", // sep.bkc bkc byte
143, OutBool, "sprmSFTitlePage", // sep.fTitlePage 0 or 1 byte
144, OutWord, "sprmSCcolumns", // sep.ccolM1 # of cols - 1 word
145, OutWord, "sprmSDxaColumns", // sep.dxaColumns dxa word
146, (FnOut)0, "sprmSFAutoPgn", // sep.fAutoPgn obsolete byte
147, OutByte, "sprmSNfcPgn", // sep.nfcPgn nfc byte
148, OutShort, "sprmSDyaPgn", // sep.dyaPgn dya short
149, OutShort, "sprmSDxaPgn", // sep.dxaPgn dya short
150, OutBool, "sprmSFPgnRestart", // sep.fPgnRestart 0 or 1 byte
151, OutBool, "sprmSFEndnote", // sep.fEndnote 0 or 1 byte
152, OutByte, "sprmSLnc", // sep.lnc lnc byte
153, (FnOut)0, "sprmSGprfIhdt", // sep.grpfIhdt grpfihdt (see Headers and Footers topic) byte
154, OutWord, "sprmSNLnnMod", // sep.nLnnMod non-neg int. word
155, OutWord, "sprmSDxaLnn", // sep.dxaLnn dxa word
156, OutWord, "sprmSDyaHdrTop", // sep.dyaHdrTop dya word
157, OutWord, "sprmSDyaHdrBottom", // sep.dyaHdrBottom dya word
158, OutBool, "sprmSLBetween", // sep.fLBetween 0 or 1 byte
159, OutByte, "sprmSVjc", // sep.vjc vjc byte
160, OutWord, "sprmSLnnMin", // sep.lnnMin lnn word
161, OutWord, "sprmSPgnStart", // sep.pgnStart pgn word
162, OutByte, "sprmSBOrientation", // sep.dmOrientPage dm byte
//??
163, OutWord, "?SprmSBCustomize 163", //???
164, OutWord, "sprmSXaPage", // sep.xaPage xa word
165, OutWord, "sprmSYaPage", // sep.yaPage ya word
166, OutWord, "sprmSDxaLeft", // sep.dxaLeft dxa word
167, OutWord, "sprmSDxaRight", // sep.dxaRight dxa word
168, OutWord, "sprmSDyaTop", // sep.dyaTop dya word
169, OutWord, "sprmSDyaBottom", // sep.dyaBottom dya word
170, OutWord, "sprmSDzaGutter", // sep.dzaGutter dza word
171, OutWord, "sprmSDMPaperReq", // sep.dmPaperReq dm word
182, OutWord, "sprmTJc", // tap.jc jc word (low order byte is significant)
183, OutWord, "sprmTDxaLeft", // tap.rgdxaCenter (see below) dxa word
184, OutWord, "sprmTDxaGapHalf", // tap.dxaGapHalf, tap.rgdxaCenter (see below) dxa word
185, OutBool, "sprmTFCantSplit", // tap.fCantSplit 1 or 0 byte
186, OutBool, "sprmTTableHeader", // tap.fTableHeader 1 or 0 byte
187, OutWordsHex, "sprmTTableBorders", // tap.rgbrcTable complex(see below) 12 bytes
188, (FnOut)0, "sprmTDefTable10", // tap.rgdxaCenter, tap.rgtc complex (see below) variable length
189, OutShort, "sprmTDyaRowHeight", // tap.dyaRowHeight dya word
//??
190, OutTab190, "sprmTDefTable", // tap.rgtc complex (see below)
//??
191, OutTab191, "sprmTDefTableShd", // tap.rgshd complex (see below)
192, OutTab192, "sprmTTlp", // tap.tlp TLP 4 bytes
193, (FnOut)0, "sprmTSetBrc", // tap.rgtc[].rgbrc complex (see below) 5 bytes
194, (FnOut)0, "sprmTInsert", // tap.rgdxaCenter,tap.rgtc complex (see below) 4 bytes
195, (FnOut)0, "sprmTDelete", // tap.rgdxaCenter, tap.rgtc complex (see below) word
196, (FnOut)0, "sprmTDxaCol", // tap.rgdxaCenter complex (see below) 4 bytes
197, (FnOut)0, "sprmTMerge", // tap.fFirstMerged, tap.fMerged complex (see below) word
198, (FnOut)0, "sprmTSplit", // tap.fFirstMerged, tap.fMerged complex (see below) word
199, (FnOut)0, "sprmTSetBrc10", // tap.rgtc[].rgbrc complex (see below) 5 bytes
200, (FnOut)0, "sprmTSetShd", // tap.rgshd complex (see below) 4 bytes
// ab hier Selbstdefinierte Ids
256, (FnOut)0, "FootNote",
257, (FnOut)0, "EndNote",
258, (FnOut)0, "??258 selbstdef.",
259, (FnOut)0, "??259 selbstdef.",
260, (FnOut)0, "Field",
//- neue ab Ver8 ------------------------------------------------------------
0x4600, OutShort,"sprmPIstd", // pap.istd;istd (style code);short;
0xC601, (FnOut)0,"sprmPIstdPermute", // pap.istd;permutation vector (see below);variable length;
0x2602, OutByte, "sprmPIncLvl", // pap.istd, pap.lvl;difference between istd of base PAP and istd of PAP to be produced (see below);byte;
0x2403, OutByte, "sprmPJc", // pap.jc;jc (justification);byte;
0x2404, OutByte, "sprmPFSideBySide", // pap.fSideBySide;0 or 1;byte;
0x2405, OutByte, "sprmPFKeep", // pap.fKeep;0 or 1;byte;
0x2406, OutByte, "sprmPFKeepFollow", // pap.fKeepFollow;0 or 1;byte;
0x2407, OutByte, "sprmPFPageBreakBefore", // pap.fPageBreakBefore;0 or 1;byte;
0x2408, OutByte, "sprmPBrcl", // pap.brcl;brcl;byte;
0x2409, OutByte, "sprmPBrcp", // pap.brcp;brcp;byte;
0x260A, OutByte, "sprmPIlvl", // pap.ilvl;ilvl;byte;
0x460B, OutShort, "sprmPIlfo", // pap.ilfo;ilfo (list index) ;short;
0x240C, OutByte, "sprmPFNoLineNumb", // pap.fNoLnn;0 or 1;byte;
0xC60D, OutTab, "sprmPChgTabsPapx", // pap.itbdMac, pap.rgdxaTab, pap.rgtbd;complex - see below;variable length
0x840E, OutWord, "sprmPDxaRight", // pap.dxaRight;dxa;word;
0x840F, OutWord, "sprmPDxaLeft", // pap.dxaLeft;dxa;word;
0x4610, OutWord, "sprmPNest", // pap.dxaLeft;dxa-see below;word;
0x8411, OutWord, "sprmPDxaLeft1", // pap.dxaLeft1;dxa;word;
0x6412,OutLongHex,"sprmPDyaLine", // pap.lspd;an LSPD, a long word structure consisting of a short of dyaLine followed by a short of fMultLinespace - see below;long;
0xA413, OutWord, "sprmPDyaBefore", // pap.dyaBefore;dya;word;
0xA414, OutWord, "sprmPDyaAfter", // pap.dyaAfter;dya;word;
0xC615, (FnOut)0,"sprmPChgTabs", // pap.itbdMac, pap.rgdxaTab, pap.rgtbd;complex - see below;variable length;
0x2416, OutByte, "sprmPFInTable", // pap.fInTable;0 or 1;byte;
0x2417, OutByte, "sprmPFTtp", // pap.fTtp;0 or 1;byte;
0x8418, OutWord, "sprmPDxaAbs", // pap.dxaAbs;dxa;word;
0x8419, OutWord, "sprmPDyaAbs", // pap.dyaAbs;dya;word;
0x841A, OutWord, "sprmPDxaWidth", // pap.dxaWidth;dxa;word;
0x261B, OutByte, "sprmPPc", // pap.pcHorz, pap.pcVert;complex - see below;byte;
0x461C, OutWord, "sprmPBrcTop10", // pap.brcTop;BRC10;word;
0x461D, OutWord, "sprmPBrcLeft10", // pap.brcLeft;BRC10;word;
0x461E, OutWord, "sprmPBrcBottom10", // pap.brcBottom;BRC10;word;
0x461F, OutWord, "sprmPBrcRight10", // pap.brcRight;BRC10;word;
0x4620, OutWord, "sprmPBrcBetween10", // pap.brcBetween;BRC10;word;
0x4621, OutWord, "sprmPBrcBar10", // pap.brcBar;BRC10;word;
0x4622, OutWord, "sprmPDxaFromText10", // pap.dxaFromText;dxa;word;
0x2423, OutByte, "sprmPWr", // pap.wr;wr (see description of PAP for definition;byte;
0x6424,OutLongHex,"sprmPBrcTop", // pap.brcTop;BRC;long;
0x6425,OutLongHex,"sprmPBrcLeft", // pap.brcLeft;BRC;long;
0x6426,OutLongHex,"sprmPBrcBottom", // pap.brcBottom;BRC;long;
0x6427,OutLongHex,"sprmPBrcRight", // pap.brcRight;BRC;long;
0x6428,OutLongHex,"sprmPBrcBetween", // pap.brcBetween;BRC;long;
0x6629,OutLongHex,"sprmPBrcBar", // pap.brcBar;BRC;long;
0x242A, OutByte, "sprmPFNoAutoHyph", // pap.fNoAutoHyph;0 or 1;byte;
0x442B, OutWord, "sprmPWHeightAbs", // pap.wHeightAbs;w;word;
0x442C, OutShort,"sprmPDcs", // pap.dcs;DCS;short;
0x442D, OutWord, "sprmPShd", // pap.shd;SHD;word;
0x842E, OutWord, "sprmPDyaFromText", // pap.dyaFromText;dya;word;
0x842F, OutWord, "sprmPDxaFromText", // pap.dxaFromText;dxa;word;
0x2430, OutByte, "sprmPFLocked", // pap.fLocked;0 or 1;byte;
0x2431, OutByte, "sprmPFWidowControl", // pap.fWidowControl;0 or 1;byte;
0xC632, (FnOut)0,"sprmPRuler", // ;;variable length;
0x2433, OutByte, "sprmPFKinsoku", // pap.fKinsoku;0 or 1;byte;
0x2434, OutByte, "sprmPFWordWrap", // pap.fWordWrap;0 or 1;byte;
0x2435, OutByte, "sprmPFOverflowPunct", // pap.fOverflowPunct;0 or 1;byte;
0x2436, OutByte, "sprmPFTopLinePunct", // pap.fTopLinePunct;0 or 1;byte;
0x2437, OutByte, "sprmPFAutoSpaceDE", // pap.fAutoSpaceDE;0 or 1;byte;
0x2438, OutByte, "sprmPFAutoSpaceDN", // pap.fAutoSpaceDN;0 or 1;byte;
0x4439, OutWord, "sprmPWAlignFont", // pap.wAlignFont;iFa (see description of PAP for definition);word;
0x443A, OutWord, "sprmPFrameTextFlow", // pap.fVertical pap.fBackward pap.fRotateFont;complex (see description of PAP for definition);word;
0x243B, OutByte, "sprmPISnapBaseLine", // obsolete: not applicable in Word97 and later versions;;byte;
0xC63E, (FnOut)0,"sprmPAnld", // pap.anld;;variable length;
0xC63F, (FnOut)0,"sprmPPropRMark", // pap.fPropRMark;complex (see below);variable length;
0x2640, OutByte, "sprmPOutLvl", // pap.lvl;has no effect if pap.istd is < 1 or is > 9;byte;
0x2441, OutByte, "sprmPFBiDi", // ;;byte;
0x2443, OutBool, "sprmPFNumRMIns", // pap.fNumRMIns;1 or 0;bit;
0x2444, OutByte, "sprmPCrLf", // ;;byte;
0xC645, (FnOut)0,"sprmPNumRM", // pap.numrm;;variable length;
0x6645,OutHugeHex,"sprmPHugePapx", // see below;fc in the data stream to locate the huge grpprl (see below);long;
0x6646,OutHugeHex,"sprmPHugePapx", // see below;fc in the data stream to locate the huge grpprl (see below);long;
0x2447, OutByte, "sprmPFUsePgsuSettings", // pap.fUsePgsuSettings;1 or 0;byte;
0x2448, OutByte, "sprmPFAdjustRight", // pap.fAdjustRight;1 or 0;byte;
0x0800, OutBool, "sprmCFRMarkDel", // chp.fRMarkDel;1 or 0;bit;
0x0801, OutBool, "sprmCFRMark", // chp.fRMark;1 or 0;bit;
0x0802, OutBool, "sprmCFFldVanish", // chp.fFldVanish;1 or 0;bit;
0x6A03, OutTab68,"sprmCPicLocation", // chp.fcPic and chp.fSpec;see below;variable length, length recorded is always 4;
0x4804, OutShort,"sprmCIbstRMark", // chp.ibstRMark;index into sttbRMark;short;
0x6805,OutLongHex,"sprmCDttmRMark", // chp.dttmRMark;DTTM;long;
0x0806, OutBool, "sprmCFData", // chp.fData;1 or 0;bit;
0x4807, OutShort, "sprmCIdslRMark", // chp.idslRMReason;an index to a table of strings defined in Word 6.0 executables;short;
0xEA08, (FnOut)0,"sprmCChs", // chp.fChsDiff and chp.chse;see below;3 bytes;
0x6A09, (FnOut)0,"sprmCSymbol", // chp.fSpec, chp.xchSym and chp.ftcSym;see below;variable length, length recorded is always 4;
0x080A, OutBool, "sprmCFOle2", // chp.fOle2;1 or 0;bit;
//0x480B, obsolete,"sprmCIdCharType", // obsolete: not applicable in Word97 and later versions;;;
0x2A0C, OutByte, "sprmCHighlight", // chp.fHighlight, chp.icoHighlight;ico (fHighlight is set to 1 iff ico is not 0);byte;
0x680E,OutLongHex,"sprmCObjLocation", // chp.fcObj;FC;long;
//0x2A10, ? ? ? , "sprmCFFtcAsciSymb", // ;;;
0x4A30, OutShort, "sprmCIstd", // chp.istd;istd, see stylesheet definition;short;
0xCA31, (FnOut)0,"sprmCIstdPermute", // chp.istd;permutation vector (see below);variable length;
0x2A32, (FnOut)0,"sprmCDefault", // whole CHP (see below);none;variable length;
0x2A33, (FnOut)0,"sprmCPlain", // whole CHP (see below);none; Laenge: 0;
0x2A34, OutByte, "sprmCKcd", // ;;;
0x0835, OutByte, "sprmCFBold", // chp.fBold;0,1, 128, or 129 (see below);byte;
0x0836, OutByte, "sprmCFItalic", // chp.fItalic;0,1, 128, or 129 (see below);byte;
0x0837, OutByte, "sprmCFStrike", // chp.fStrike;0,1, 128, or 129 (see below);byte;
0x0838, OutByte, "sprmCFOutline", // chp.fOutline;0,1, 128, or 129 (see below);byte;
0x0839, OutByte, "sprmCFShadow", // chp.fShadow;0,1, 128, or 129 (see below);byte;
0x083A, OutByte, "sprmCFSmallCaps", // chp.fSmallCaps;0,1, 128, or 129 (see below);byte;
0x083B, OutByte, "sprmCFCaps", // chp.fCaps;0,1, 128, or 129 (see below);byte;
0x083C, OutByte, "sprmCFVanish", // chp.fVanish;0,1, 128, or 129 (see below);byte;
0x4A3D, OutWord, "sprmCFtcDefault", // ;ftc, only used internally, never stored in file;word;
0x2A3E, OutByte, "sprmCKul", // chp.kul;kul;byte;
0xEA3F, (FnOut)0,"sprmCSizePos", // chp.hps, chp.hpsPos;(see below);3 bytes;
0x8840, OutWord, "sprmCDxaSpace", // chp.dxaSpace;dxa;word;
0x4A41, OutWord, "sprmCLid", // ;only used internally never stored;word;
0x2A42, OutByte, "sprmCIco", // chp.ico;ico;byte;
0x4A43, OutWord, "sprmCHps", // chp.hps;hps;word;
0x2A44, OutByte, "sprmCHpsInc", // chp.hps;(see below);byte;
0x4845, OutByte, "sprmCHpsPos", // chp.hpsPos;hps;byte;
0x2A46, OutByte, "sprmCHpsPosAdj", // chp.hpsPos;hps (see below);byte;
0xCA47, (FnOut)0,"sprmCMajority", // chp.fBold, chp.fItalic, chp.fSmallCaps, chp.fVanish, chp.fStrike, chp.fCaps, chp.rgftc, chp.hps, chp.hpsPos, chp.kul, chp.dxaSpace, chp.ico, chp.rglid;complex (see below);variable length, length byte plus size of following grpprl;
0x2A48, OutByte, "sprmCIss", // chp.iss;iss;byte;
0xCA49, (FnOut)0,"sprmCHpsNew50", // chp.hps;hps;variable width, length always recorded as 2;
0xCA4A, (FnOut)0,"sprmCHpsInc1", // chp.hps;complex (see below);variable width, length always recorded as 2;
0x484B, OutShort,"sprmCHpsKern", // chp.hpsKern;hps;short;
0xCA4C, (FnOut)0,"sprmCMajority50", // chp.fBold, chp.fItalic, chp.fSmallCaps, chp.fVanish, chp.fStrike, chp.fCaps, chp.ftc, chp.hps, chp.hpsPos, chp.kul, chp.dxaSpace, chp.ico,;complex (see below);variable length;
0x4A4D, OutShort,"sprmCHpsMul", // chp.hps;percentage to grow hps;short;
0x484E, OutShort,"sprmCYsri", // chp.ysri;ysri;short;
0x4A4F, OutShort,"sprmCRgFtc0", // chp.rgftc[0];ftc for ASCII text (see below);short;
0x4A50, OutShort,"sprmCRgFtc1", // chp.rgftc[1];ftc for Far East text (see below);short;
0x4A51, OutShort,"sprmCRgFtc2", // chp.rgftc[2];ftc for non-Far East text (see below);short;
//0x4852, ? ? ? , "sprmCCharScale", // ;;;
0x2A53, OutByte, "sprmCFDStrike", // chp.fDStrike;;byte;
0x0854, OutBool, "sprmCFImprint", // chp.fImprint;1 or 0;bit;
0x0855, OutBool, "sprmCFSpec", // chp.fSpec ;1 or 0;bit;
0x0856, OutBool, "sprmCFObj", // chp.fObj;1 or 0;bit;
0xCA57, (FnOut)0,"sprmCPropRMark", // chp.fPropRMark, chp.ibstPropRMark, chp.dttmPropRMark;Complex (see below);variable length always recorded as 7 bytes;
0x0858, OutBool, "sprmCFEmboss", // chp.fEmboss;1 or 0;bit;
0x2859, OutByte, "sprmCSfxText", // chp.sfxtText;text animation;byte;
//0x085A, ? ? ? , "sprmCFBiDi", // ;;;
//0x085B, ? ? ? , "sprmCFDiacColor", // ;;;
//0x085C, ? ? ? , "sprmCFBoldBi", // ;;;
//0x085D, ? ? ? , "sprmCFItalicBi", // ;;;
0x4A5E, OutWord, "sprmCFtcBi", // ;;;
0x485F, OutWord, "sprmCLidBi", // ;;;
//0x4A60, ? ? ? , "sprmCIcoBi", // ;;;
0x4A61, OutWord, "sprmCHpsBi", // ;;;
0xCA62, (FnOut)0,"sprmCDispFldRMark", // chp.fDispFldRMark, chp.ibstDispFldRMark, chp.dttmDispFldRMark ;Complex (see below);variable length always recorded as 39 bytes;
0x4863, OutShort,"sprmCIbstRMarkDel", // chp.ibstRMarkDel;index into sttbRMark;short;
0x6864,OutLongHex,"sprmCDttmRMarkDel", // chp.dttmRMarkDel;DTTM;long;
0x6865,OutLongHex,"sprmCBrc", // chp.brc;BRC;long;
0x4866, OutShort,"sprmCShd", // chp.shd;SHD;short;
0x4867, OutShort,"sprmCIdslRMarkDel", // chp.idslRMReasonDel;an index to a table of strings defined in Word 6.0 executables;short;
0x0868, OutBool, "sprmCFUsePgsuSettings", // chp.fUsePgsuSettings;1 or 0;bit;
0x486B, OutWord, "sprmCCpg", // ;;word;
0x486D, OutWord, "sprmCRgLid0", // chp.rglid[0];LID: for non-Far East text;word;
0x486E, OutWord, "sprmCRgLid1", // chp.rglid[1];LID: for Far East text;word;
0x286F, OutByte, "sprmCIdctHint", // chp.idctHint;IDCT: (see below);byte;
0x2E00, OutByte, "sprmPicBrcl", // pic.brcl;brcl (see PIC structure definition);byte;
0xCE01, (FnOut)0,"sprmPicScale", // pic.mx, pic.my, pic.dxaCropleft, pic.dyaCropTop pic.dxaCropRight, pic.dyaCropBottom;Complex (see below);length byte plus 12 bytes;
0x6C02,OutLongHex,"sprmPicBrcTop", // pic.brcTop;BRC;long;
0x6C03,OutLongHex,"sprmPicBrcLeft", // pic.brcLeft;BRC;long;
0x6C04,OutLongHex,"sprmPicBrcBottom", // pic.brcBottom;BRC;long;
0x6C05,OutLongHex,"sprmPicBrcRight", // pic.brcRight;BRC;long;
0x3000, OutByte, "sprmScnsPgn", // sep.cnsPgn;cns;byte;
0x3001, OutByte, "sprmSiHeadingPgn", // sep.iHeadingPgn;heading number level;byte;
0xD202, (FnOut)0,"sprmSOlstAnm", // sep.olstAnm;OLST;variable length;
0xF203, (FnOut)0,"sprmSDxaColWidth", // sep.rgdxaColWidthSpacing;complex (see below);3 bytes;
0xF204, (FnOut)0,"sprmSDxaColSpacing", // sep.rgdxaColWidthSpacing;complex (see below);3 bytes;
0x3005, OutByte, "sprmSFEvenlySpaced", // sep.fEvenlySpaced;1 or 0;byte;
0x3006, OutByte, "sprmSFProtected", // sep.fUnlocked;1 or 0;byte;
0x5007, OutWord, "sprmSDmBinFirst", // sep.dmBinFirst;;word;
0x5008, OutWord, "sprmSDmBinOther", // sep.dmBinOther;;word;
0x3009, OutByte, "sprmSBkc", // sep.bkc;bkc;byte;
0x300A, OutByte, "sprmSFTitlePage", // sep.fTitlePage;0 or 1;byte;
0x500B, OutWord, "sprmSCcolumns", // sep.ccolM1;# of cols - 1;word;
0x900C, OutWord, "sprmSDxaColumns", // sep.dxaColumns;dxa;word;
0x300D, OutByte, "sprmSFAutoPgn", // sep.fAutoPgn;obsolete;byte;
0x300E, OutByte, "sprmSNfcPgn", // sep.nfcPgn;nfc;byte;
0xB00F, OutShort,"sprmSDyaPgn", // sep.dyaPgn;dya;short;
0xB010, OutShort,"sprmSDxaPgn", // sep.dxaPgn;dya;short;
0x3011, OutByte, "sprmSFPgnRestart", // sep.fPgnRestart;0 or 1;byte;
0x3012, OutByte, "sprmSFEndnote", // sep.fEndnote;0 or 1;byte;
0x3013, OutByte, "sprmSLnc", // sep.lnc;lnc;byte;
0x3014, OutByte, "sprmSGprfIhdt", // sep.grpfIhdt;grpfihdt (see Headers and Footers topic);byte;
0x5015, OutWord, "sprmSNLnnMod", // sep.nLnnMod;non-neg int.;word;
0x9016, OutWord, "sprmSDxaLnn", // sep.dxaLnn;dxa;word;
0xB017, OutWord, "sprmSDyaHdrTop", // sep.dyaHdrTop;dya;word;
0xB018, OutWord, "sprmSDyaHdrBottom", // sep.dyaHdrBottom;dya;word;
0x3019, OutByte, "sprmSLBetween", // sep.fLBetween;0 or 1;byte;
0x301A, OutByte, "sprmSVjc", // sep.vjc;vjc;byte;
0x501B, OutWord, "sprmSLnnMin", // sep.lnnMin;lnn;word;
0x501C, OutWord, "sprmSPgnStart", // sep.pgnStart;pgn;word;
0x301D, OutByte, "sprmSBOrientation", // sep.dmOrientPage;dm;byte;
//0x301E, ? ? ? , "sprmSBCustomize", // ;;;
0xB01F, OutWord, "sprmSXaPage", // sep.xaPage;xa;word;
0xB020, OutWord, "sprmSYaPage", // sep.yaPage;ya;word;
0xB021, OutWord, "sprmSDxaLeft", // sep.dxaLeft;dxa;word;
0xB022, OutWord, "sprmSDxaRight", // sep.dxaRight;dxa;word;
0x9023, OutWord, "sprmSDyaTop", // sep.dyaTop;dya;word;
0x9024, OutWord, "sprmSDyaBottom", // sep.dyaBottom;dya;word;
0xB025, OutWord, "sprmSDzaGutter", // sep.dzaGutter;dza;word;
0x5026, OutWord, "sprmSDmPaperReq", // sep.dmPaperReq;dm;word;
0xD227, (FnOut)0,"sprmSPropRMark", // sep.fPropRMark, sep.ibstPropRMark, sep.dttmPropRMark ;complex (see below);variable length always recorded as 7 bytes;
//0x3228, ? ? ? , "sprmSFBiDi", // ;;;
//0x3229, ? ? ? , "sprmSFFacingCol", // ;;;
//0x322A, ? ? ? , "sprmSFRTLGutter", // ;;;
0x702B,OutLongHex,"sprmSBrcTop", // sep.brcTop;BRC;long;
0x702C,OutLongHex,"sprmSBrcLeft", // sep.brcLeft;BRC;long;
0x702D,OutLongHex,"sprmSBrcBottom", // sep.brcBottom;BRC;long;
0x702E,OutLongHex,"sprmSBrcRight", // sep.brcRight;BRC;long;
0x522F, OutWord, "sprmSPgbProp", // sep.pgbProp;;word;
0x7030,OutLongHex,"sprmSDxtCharSpace", // sep.dxtCharSpace;dxt;long;
0x9031,OutLongHex,"sprmSDyaLinePitch", // sep.dyaLinePitch;dya;long;
//0x5032, ? ? ? , "sprmSClm", // ;;;
0x5033, OutShort,"sprmSTextFlow", // sep.wTextFlow;complex (see below);short;
0x5400, OutWord, "sprmTJc", // tap.jc;jc;word (low order byte is significant);
0x9601, OutWord, "sprmTDxaLeft", // tap.rgdxaCenter (see below);dxa;word;
0x9602, OutWord, "sprmTDxaGapHalf", // tap.dxaGapHalf, tap.rgdxaCenter (see below);dxa;word;
0x3403, OutByte, "sprmTFCantSplit", // tap.fCantSplit;1 or 0;byte;
0x3404, OutByte, "sprmTTableHeader", // tap.fTableHeader;1 or 0;byte;
0xD605, (FnOut)0,"sprmTTableBorders", // tap.rgbrcTable;complex(see below);24 bytes;
0xD606, (FnOut)0,"sprmTDefTable10", // tap.rgdxaCenter, tap.rgtc;complex (see below);variable length;
0x9407, OutShort, "sprmTDyaRowHeight", // tap.dyaRowHeight;dya;word;
0xD608, OutTabD608,"sprmTDefTable", // tap.rgtc;complex (see below);;
0xD609, OutTabD609,"sprmTDefTableShd", // tap.rgshd;complex (see below);;
0x740A, (FnOut)0,"sprmTTlp", // tap.tlp;TLP;4 bytes;
//0x560B, ? ? ? , "sprmTFBiDi", // ;;;
//0x740C, ? ? ? , "sprmTHTMLProps", // ;;;
0xD620, (FnOut)0,"sprmTSetBrc", // tap.rgtc[].rgbrc;complex (see below);5 bytes;
0x7621, (FnOut)0,"sprmTInsert", // tap.rgdxaCenter, tap.rgtc;complex (see below);4 bytes;
0x5622, OutWord, "sprmTDelete", // tap.rgdxaCenter, tap.rgtc;complex (see below);word;
0x7623, (FnOut)0,"sprmTDxaCol", // tap.rgdxaCenter;complex (see below);4 bytes;
0x5624, OutWord, "sprmTMerge", // tap.fFirstMerged, tap.fMerged;complex (see below);word;
0x5625, OutWord, "sprmTSplit", // tap.fFirstMerged, tap.fMerged;complex (see below);word;
0xD626, (FnOut)0,"sprmTSetBrc10", // tap.rgtc[].rgbrc;complex (see below);5 bytes;
0x7627, (FnOut)0,"sprmTSetShd", // tap.rgshd;complex (see below);4 bytes;
0x7628, (FnOut)0,"sprmTSetShdOdd", // tap.rgshd;complex (see below);4 bytes;
0x7629, OutWord, "sprmTTextFlow", // tap.rgtc[].fVerticaltap.rgtc[].fBackwardtap.rgtc[].fRotateFont;0 or 10 or 10 or 1;word;
//0xD62A, ? ? ? , "sprmTDiagLine", // ;;;
0xD62B, (FnOut)0,"sprmTVertMerge", // tap.rgtc[].vertMerge;complex (see below);variable length always recorded as 2 bytes;
0xD62C, (FnOut)0,"sprmTVertAlign", // tap.rgtc[].vertAlign;complex (see below);variable length always recorded as 3 byte;
0x4873, OutWord, "sprm?? CJK ??", // CJK-Unknown
0x4874, OutWord, "sprm?? CJK ??", // CJK-Unknown
};
static int
#if defined( WNT )
__cdecl
#endif
#if defined( ICC )
_Optlink
#endif
CompSprmDumpId( const void *pFirst, const void *pSecond)
{
return( ((SprmDumpInfo*)pFirst )->nId - ((SprmDumpInfo*)pSecond)->nId );
}
SprmDumpInfo& WW8GetSprmDumpInfo( USHORT nId )
{
// ggfs. Tab sortieren
static BOOL bInit = FALSE;
if( !bInit )
{
qsort( (void*)aSprmDumpTab,
SAL_N_ELEMENTS(aSprmDumpTab),
sizeof( aSprmDumpTab[ 0 ] ),
CompSprmDumpId );
bInit = TRUE;
}
// Sprm heraussuchen
void* pFound;
SprmDumpInfo aSrch;
aSrch.nId = nId;
if( 0 == ( pFound = bsearch( (char *) &aSrch,
(void*) aSprmDumpTab,
SAL_N_ELEMENTS(aSprmDumpTab),
sizeof( aSprmDumpTab[ 0 ] ),
CompSprmDumpId )))
{
// im Fehlerfall auf Nulltes Element verweisen
pFound = (void*)aSprmDumpTab;
}
return *(SprmDumpInfo*) pFound;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -1,46 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _WW8DARR_HXX
#define _WW8DARR_HXX
typedef void (*FnOut)( SvStream& rSt, short );
struct SprmDumpInfo
{
USHORT nId;
FnOut pOutFnc;
char* pName;
};
SprmDumpInfo& WW8GetSprmDumpInfo( USHORT nId );
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -1,419 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
#include <stdio.h> // getchar
#include <tools/solar.h> // BYTE
#include "ww8dout.hxx"
#include <tools/stream.hxx>
#include <sot/storage.hxx>
extern SvStorageStreamRef xStrm;
extern SvStorageStreamRef xTableStream;
extern SvStorageStreamRef xDataStream; // ist bei Ver6-7 mit xStrm identisch,
void DumpSprms( BYTE nVersion, SvStream& rSt, short nLen );
ostream* pOut = 0;
#define DumpVer8
//-----------------------------------------
// Streams
//-----------------------------------------
static int level = 0;
static long lastpos = -1;
ostream& __cdecl endl1( ostream& s ){
//ostream& endl1( ostream& s ) {
s << endl;
return s;
}
ostream& __cdecl hex2( ostream& s ) {
s.width( 2 ); s.fill( (const char)250 );
s << hex;
return s;
}
ostream& __cdecl hex4( ostream& s ) {
s.width( 4 ); s.fill( (const char)250 );
s << hex ;
return s;
}
ostream& __cdecl hex6( ostream& s ) {
s.width( 6 ); s.fill( (const char)250 );
s << hex ;
return s;
}
ostream& __cdecl hex8( ostream& s ) {
s.width( 8 ); s.fill( (const char)250 );
s << hex ;
return s;
}
ostream& __cdecl dec2( ostream& s ) {
s << dec;
s.width( 0 ); s.fill( 0 );
return s;
}
ostream& __cdecl filepos( ostream& s, SvStream& rSt ) {
long pos = rSt.Tell();
if ( pos != lastpos ){
#ifndef DumpVer8
if( &rSt == &xStrm )
s << "D";
else
s << "T";
#endif
s.width( 6 );
s.fill( (const char)250 );
s << hex << pos << dec << ' ';
s.width( 0 ); s.fill( 0 );
lastpos = pos;
}else{
#ifndef DumpVer8
s << " ";
#else
s << " ";
#endif
}
return s;
}
ostream& __cdecl indent( ostream& s, SvStream& rSt ) {
filepos( s, rSt );
for( int i = 0; i < level; i++ ) s << " ";
return s;
}
ostream& __cdecl indent1( ostream& s ) {
for( int i = 0; i < level; i++ ) s << " ";
return s;
}
ostream& __cdecl indent2( ostream& s ) {
#ifndef DumpVer8
s << " " << indent1;
#else
s << " " << indent1;
#endif
return s;
}
ostream& __cdecl begin( ostream& s, SvStream& rSt ) { indent( s, rSt ) << "BEGIN "; level++; return s; }
// begin1 ohne indent
ostream& __cdecl begin1( ostream& s ) { s << "BEGIN "; level++; return s; }
// begin2 ohne Nummer
ostream& __cdecl begin2( ostream& s ) { s << indent2 << "BEGIN "; level++; return s; }
ostream& __cdecl end( ostream& s, SvStream& rSt ) { level--; return indent( s, rSt ) << "END "; }
// end1 ohne filepos
ostream& __cdecl end1( ostream& s ) { level--; return s << indent1 << "END "; }
// end2 ohne Nummer
ostream& __cdecl end2( ostream& s ) { level--; return s << indent2 << "END "; }
//-----------------------------------------
// Ausgabe-Funktionen
//-----------------------------------------
void OutBool( SvStream& rSt, short )
{
BYTE nPara;
rSt.Read( &nPara, sizeof( nPara ) );
switch( nPara ){
case 0: *pOut << "F"; break;
case 1: *pOut << "T"; break;
default: *pOut << "ERROR:" << (USHORT)nPara; break;
}
}
void OutBool4( SvStream& rSt, short )
{
BYTE nPara;
rSt.Read( &nPara, sizeof( nPara ) );
switch( nPara ){
case 0: *pOut << "F"; break;
case 1: *pOut << "T"; break;
case 128: *pOut << "==Style"; break;
case 129: *pOut << "!=Style"; break;
default: *pOut << "ERROR:" << (USHORT)nPara; break;
}
}
void OutByte( SvStream& rSt, short )
{
BYTE nPara;
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << (USHORT)nPara;
}
void OutShort( SvStream& rSt, short )
{
short nPara;
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << nPara;
}
void OutShorts( SvStream& rSt, short nLen )
{
INT16 nPara;
for( short i = 0; i < nLen / 2; i++ ){
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << nPara << ' ';
}
}
void OutWord( SvStream& rSt, short )
{
USHORT nPara;
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << nPara;
}
void OutWords( SvStream& rSt, short nLen )
{
USHORT nPara;
for( short i = 0; i < nLen / 2; i++ ){
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << nPara;
}
}
void OutWordHex( SvStream& rSt, short )
{
USHORT nPara;
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << "0x" << hex4 << nPara << dec;
}
void OutWordsHex( SvStream& rSt, short nLen )
{
USHORT nPara;
nLen /= sizeof( nPara );
for( short i = 0; i < nLen; i++ ){
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << "0x" << hex4 << nPara << dec;
if( i < nLen - 1 )
*pOut << ' ';
}
}
void OutLongsHex( SvStream& rSt, short nLen )
{
long nPara;
nLen /= sizeof( nPara );
for( short i = 0; i < nLen; i++ )
{
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << "0x" << hex8 << nPara << dec;
if( i < nLen - 1 )
*pOut << ' ';
}
}
void OutLongHex( SvStream& rSt, short )
{
ULONG nPara;
rSt.Read( &nPara, sizeof( nPara ) );
*pOut << "0x" << hex8 << nPara << dec;
}
void OutTab68( SvStream& rSt, short )
{
ULONG nPara;
rSt.Read( &nPara, sizeof( nPara ) );
if( nPara == 0 )
*pOut << "None";
else
*pOut << "0x" << hex8 << nPara << dec;
}
void OutTab( SvStream& rSt, short )
{
BYTE nDel, nIns, nType;
short nPos, i;
rSt.Read( &nDel, sizeof( nDel ) );
*pOut << "Del " << (USHORT)nDel;
if ( nDel ) *pOut << ": ";
else *pOut << ", ";
for( i=1; i<=nDel; i++){
rSt.Read( &nPos, sizeof( nPos ) );
*pOut << nPos;
if( i<nDel ) *pOut << ',';
else *pOut << ' ';
}
rSt.Read( &nIns, sizeof( nIns ) );
*pOut << "Ins " << (USHORT)nIns;
if ( nIns ) *pOut << ": ";
for( i=1; i<=nIns; i++){
rSt.Read( &nPos, sizeof( nPos ) );
*pOut << nPos;
if( i<nIns ) *pOut << ',';
else *pOut << ' ';
}
if ( nIns ) *pOut << "Typ: ";
for( i=1; i<=nIns; i++){
rSt.Read( &nType, sizeof( nType ) );
*pOut << (USHORT)nType;
if( i<nIns ) *pOut << ',';
else *pOut << ' ';
}
// nSiz = 1 + 2 * nDel + 1 + nIns * 3; // genaue Laenge,
// stimmt auch bei Laenge > 256
// bei diesem Tab-Befehl anscheinend nicht noetig
}
void OutTab190( SvStream& rSt, short nLen )
{
BYTE nCols;
rSt.Read( &nCols, sizeof( nCols ) );
*pOut << (USHORT)nCols << " Cols: ";
short nPos, i;
for( i = 0; i <= nCols; i++ ){
rSt.Read( &nPos, sizeof( nPos ) );
*pOut << nPos;
if( i < nCols )
*pOut << ", ";
}
*pOut << dec << "; ";
for( i = 0; i < nCols; i++ ){
*pOut << "Col " << i << " TC: ";
OutWordsHex( rSt, 10 );
if( i < nCols - 1 )
*pOut << "; ";
}
}
void OutTab191( SvStream& rSt, short nLen )
{
BYTE nCols;
rSt.Read( &nCols, sizeof( nCols ) );
*pOut << (USHORT)nCols << " Cols, SHDs: ";
OutWordsHex( rSt, ( nCols + 1 ) * 2 );
}
void OutTab192( SvStream& rSt, short )
{
OutWord( rSt, 0 );
OutWordHex( rSt, 0 );
}
void OutHugeHex( SvStream& rSt, short nLen )
{
long nPos;
rSt.Read( &nPos, sizeof( nPos ) );
long nCurr = xDataStream->Tell();
xDataStream->Seek( nPos );
xDataStream->Read( &nLen, sizeof( nLen ) );
// *pOut << ", Len max: " << nLen << ", ID:" << nIStd << endl1;
*pOut << endl1;
DumpSprms( 8, *xDataStream, nLen );
xDataStream->Seek( nCurr );
}
void OutTabD608( SvStream& rSt, short nLen )
{
BYTE nHi, nCols;
rSt.Read( &nHi, sizeof( nHi ) );
// nLen += ((short)nHi) << 8;
rSt.Read( &nCols, sizeof( nCols ) );
*pOut << " Cols: " << (short)nCols << ' ' << endl1 << indent2;
short nPos, i;
for( i = 0; i <= nCols; ++i )
{
rSt.Read( &nPos, sizeof( nPos ) );
*pOut << nPos;
if( i < nCols )
*pOut << ", ";
}
nLen -= ( nCols + 1 ) * 2;
nLen /= 20;
for( i = 0; i < nLen; ++i )
{
*pOut << endl1 << indent2 << "Col " << i << " TC: ";
OutLongsHex( rSt, 20 );
if( i < nLen - 1 )
*pOut << "; ";
}
}
void OutTabD609( SvStream& rSt, short nLen )
{
*pOut << " Brush(FBS): ";
for( short i = 0; i < nLen / 2; ++i )
{
UINT16 nVal;
rSt.Read( &nVal, sizeof( nVal ) );
*pOut << (nVal & 0x1f);
*pOut << "|" << ((nVal >> 5) & 0x1f);
*pOut << "|" << ((nVal >> 10) & 0x3f);
if( i < nLen )
*pOut << ", ";
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View file

@ -1,89 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _WW8DOUT_HXX
#define _WW8DOUT_HXX
#ifndef INC_FSTREAM
#include <fstream.h> // ostream
#endif
#ifndef SOLAR_H
#include <tools/solar.h> // BYTE
#endif
class SvStream;
void OutByte( SvStream& rSt, short nLen );
void OutBool( SvStream& rSt, short nLen );
void OutShort( SvStream& rSt, short );
void OutShorts( SvStream& rSt, short nLen );
void OutWord( SvStream& rSt, short );
void OutWords( SvStream& rSt, short nLen );
void OutWordHex( SvStream& rSt, short );
void OutWordsHex( SvStream& rSt, short );
void OutLongHex( SvStream& rSt, short );
void OutLongsHex( SvStream& rSt, short nLen );
void OutTab( SvStream& rSt, short nLen );
void OutTab68( SvStream& rSt, short nLen );
void OutTab190( SvStream& rSt, short nLen );
void OutTab191( SvStream& rSt, short nLen );
void OutTab192( SvStream& rSt, short nLen );
void OutBool4( SvStream& rSt, short nLen );
void OutHugeHex( SvStream& rSt, short nLen );
void OutTabD608( SvStream& rSt, short nLen );
void OutTabD609( SvStream& rSt, short nLen );
// unter WNTMSCI4 muss das __cdecl sein, damit nicht nur der Fkt-Pointer
// ausgegeben wird....
ostream& __cdecl filepos( ostream& s, SvStream& rSt );
ostream& __cdecl endl1( ostream& s );
ostream& __cdecl indent( ostream& s, SvStream& rSt );
ostream& __cdecl indent1( ostream& s );
ostream& __cdecl indent2( ostream& s );
ostream& __cdecl hex2( ostream& s );
ostream& __cdecl hex4( ostream& s );
ostream& __cdecl hex6( ostream& s );
ostream& __cdecl hex8( ostream& s );
ostream& __cdecl dec2( ostream& s );
ostream& __cdecl begin( ostream& s, SvStream& rSt );
ostream& __cdecl begin1( ostream& s );
ostream& __cdecl begin2( ostream& s );
ostream& __cdecl end( ostream& s, SvStream& rSt );
ostream& __cdecl end1( ostream& s );
ostream& __cdecl end2( ostream& s );
extern ostream* pOut;
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,818 +0,0 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _WW8STRUC_HXX
#define _WW8STRUC_HXX
#include <osl/endian.h>
#include <tools/string.hxx>
// max. Anzahl der Listen-Level in WW8: 1..9
#define nWW8MaxListLevel 9
inline BYTE Get_Byte( BYTE *& p )
{ BYTE n = SVBT8ToByte( *(SVBT8*)p ); p += 1; return n; }
inline short Get_Short( BYTE *& p )
{ short n = SVBT16ToShort( *(SVBT16*)p ); p += 2; return n; }
inline USHORT Get_UShort( BYTE *& p )
{ USHORT n = SVBT16ToShort( *(SVBT16*)p ); p += 2; return n; }
inline long Get_Long( BYTE *& p )
{ long n = SVBT32ToUInt32( *(SVBT32*)p ); p += 4; return n; }
inline ULONG Get_ULong( BYTE *& p )
{ ULONG n = SVBT32ToUInt32( *(SVBT32*)p ); p += 4; return n; }
inline void Set_UInt8( BYTE *& p, UINT8 n )
{ ByteToSVBT8( n, *(SVBT8*)p ); p+= 1; }
inline void Set_UInt16( BYTE *& p, UINT16 n )
{ ShortToSVBT16( n, *(SVBT16*)p ); p+= 2; }
inline void Set_UInt32( BYTE *& p, UINT32 n )
{ UInt32ToSVBT32( n, *(SVBT32*)p ); p+= 4; }
#if defined OSL_BIGENDIAN || SAL_TYPES_ALIGNMENT4 > 2 || defined UNX
#define __WW8_NEEDS_COPY
#else
#if defined WNT || defined WIN || defined OS2
#define __WW8_NEEDS_PACK
#pragma pack(2)
#endif
#endif
typedef INT16 WW8_PN;
typedef INT32 WW8_FC;
typedef INT32 WW8_CP;
// STD: STyle Definition
// The STD contains the entire definition of a style.
// It has two parts, a fixed-length base (cbSTDBase bytes long)
// and a variable length remainder holding the name, and the upx and upe
// arrays (a upx and upe for each type stored in the style, std.cupx)
// Note that new fields can be added to the BASE of the STD without
// invalidating the file format, because the STSHI contains the length
// that is stored in the file. When reading STDs from an older version,
// new fields will be zero.
struct WW8_STD
{
// Base part of STD:
UINT16 sti : 12; // invariant style identifier
UINT16 fScratch : 1; // spare field for any temporary use,
// always reset back to zero!
UINT16 fInvalHeight : 1; // PHEs of all text with this style are wrong
UINT16 fHasUpe : 1; // UPEs have been generated
UINT16 fMassCopy : 1; // std has been mass-copied; if unused at
// save time, style should be deleted
UINT16 sgc : 4; // style type code
UINT16 istdBase : 12; // base style
UINT16 cupx : 4; // # of UPXs (and UPEs)
UINT16 istdNext : 12; // next style
UINT16 bchUpe; // offset to end of upx's, start of upe's
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
UINT16 fAutoRedef : 1; /* auto redefine style when appropriate */
UINT16 fHidden : 1; /* hidden from UI? */
UINT16 : 14; /* unused bits */
// Variable length part of STD:
// UINT8 stzName[2]; /* sub-names are separated by chDelimStyle
// char grupx[];
// the UPEs are not stored on the file; they are a cache of the based-on
// chain
// char grupe[];
};
/*
Basis zum Einlesen UND zum Arbeiten (wird jeweils unter
schiedlich beerbt)
*/
struct WW8_FFN_BASE // Font Descriptor
{
// ab Ver6
BYTE cbFfnM1; // 0x0 total length of FFN - 1.
BYTE prg: 2; // 0x1:03 pitch request
BYTE fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
// 0x1:08 reserved
BYTE ff : 3; // 0x1:70 font family id
// 0x1:80 reserved
short wWeight; // 0x2 base weight of font
BYTE chs; // 0x4 character set identifier
BYTE ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
};
/*
Hiermit arbeiten wir im Parser (und Dumper)
*/
struct WW8_FFN : public WW8_FFN_BASE
{
// ab Ver8 als Unicode
UniString sFontname;// 0x6 bzw. 0x40 ab Ver8 zero terminated string that
// records name of font.
// Maximal size of szFfn is 65 characters.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
// Possibly followed by a second sz which records the
// name of an alternate font to use if the first named
// font does not exist on this system.
};
struct WW8_BRCVer6 // alter Border Code
{
SVBT16 aBits1;
// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
// a single line of border in units of 0.75 points
// Must be nonzero when brcType is nonzero.
// 6 == dotted, 7 == dashed.
// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
// UINT16 ico : 5; // 07C0 color code (see chp.ico)
// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
// Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
};
struct WW8_BRC : public WW8_BRCVer6 // Border Code
{
SVBT16 aBits2;
// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
// a single line of border in units of 0.75 points
// Must be nonzero when brcType is nonzero.
// 6 == dotted, 7 == dashed.
// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
// UINT16 ico : 5; // 07C0 color code (see chp.ico)
// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
// Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
};
typedef WW8_BRC WW8_BRC5[5]; // 5 * Border Code
#define WW8_TOP 0
#define WW8_LEFT 1
#define WW8_BOT 2
#define WW8_RIGHT 3
#define WW8_BETW 4
struct WW8_BordersSO // fuer StarOffice-Border Code
{
USHORT Out;
USHORT In;
USHORT Dist;
};
/*
// Linien-Defaults in Twips: fruehere Writer-Defaults,
// siehe auch <editeng/boxitem.hxx>
#define DEF_LINE_WIDTH_0 1
#define DEF_LINE_WIDTH_1 20
#define DEF_LINE_WIDTH_2 50
#define DEF_LINE_WIDTH_3 80
#define DEF_LINE_WIDTH_4 100
#define DEF_MAX_LINE_WIDHT DEF_LINE_WIDTH_4
#define DEF_MAX_LINE_DIST DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE0_OUT DEF_LINE_WIDTH_0
#define DEF_DOUBLE_LINE0_IN DEF_LINE_WIDTH_0
#define DEF_DOUBLE_LINE0_DIST DEF_LINE_WIDTH_1
#define DEF_DOUBLE_LINE1_OUT DEF_LINE_WIDTH_1
#define DEF_DOUBLE_LINE1_IN DEF_LINE_WIDTH_1
#define DEF_DOUBLE_LINE1_DIST DEF_LINE_WIDTH_1
#define DEF_DOUBLE_LINE2_OUT DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE2_IN DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE2_DIST DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE3_OUT DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE3_IN DEF_LINE_WIDTH_1
#define DEF_DOUBLE_LINE3_DIST DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE4_OUT DEF_LINE_WIDTH_1
#define DEF_DOUBLE_LINE4_IN DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE4_DIST DEF_LINE_WIDTH_1
#define DEF_DOUBLE_LINE5_OUT DEF_LINE_WIDTH_3
#define DEF_DOUBLE_LINE5_IN DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE5_DIST DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE6_OUT DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE6_IN DEF_LINE_WIDTH_3
#define DEF_DOUBLE_LINE6_DIST DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE7_OUT DEF_LINE_WIDTH_0
#define DEF_DOUBLE_LINE7_IN DEF_LINE_WIDTH_0
#define DEF_DOUBLE_LINE7_DIST DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE8_OUT DEF_LINE_WIDTH_1
#define DEF_DOUBLE_LINE8_IN DEF_LINE_WIDTH_0
#define DEF_DOUBLE_LINE8_DIST DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE9_OUT DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE9_IN DEF_LINE_WIDTH_0
#define DEF_DOUBLE_LINE9_DIST DEF_LINE_WIDTH_2
#define DEF_DOUBLE_LINE10_OUT DEF_LINE_WIDTH_3
#define DEF_DOUBLE_LINE10_IN DEF_LINE_WIDTH_0
#define DEF_DOUBLE_LINE10_DIST DEF_LINE_WIDTH_2
*/
// Deklarationen gemaess BOXITEM.HXX
#define WW8_DECL_LINETAB_ARRAY \
static WW8_BordersSO const nLineTabVer8[] = \
{ \
/* 0*/ { DEF_LINE_WIDTH_0, 0, 0 }, \
/* 1*/ { DEF_LINE_WIDTH_1, 0, 0 }, \
/* 2*/ { DEF_LINE_WIDTH_2, 0, 0 }, \
/* 3*/ { DEF_LINE_WIDTH_3, 0, 0 }, \
/* 4*/ { DEF_LINE_WIDTH_4, 0, 0 }, \
/* 5*/ { DEF_DOUBLE_LINE0_OUT, DEF_DOUBLE_LINE0_IN, DEF_DOUBLE_LINE0_DIST },\
/* 6*/ { DEF_DOUBLE_LINE1_OUT, DEF_DOUBLE_LINE1_IN, DEF_DOUBLE_LINE1_DIST },\
/* 7*/ { DEF_DOUBLE_LINE2_OUT, DEF_DOUBLE_LINE2_IN, DEF_DOUBLE_LINE2_DIST },\
/* 8*/ { DEF_DOUBLE_LINE3_OUT, DEF_DOUBLE_LINE3_IN, DEF_DOUBLE_LINE3_DIST },\
/* 9*/ { DEF_DOUBLE_LINE4_OUT, DEF_DOUBLE_LINE4_IN, DEF_DOUBLE_LINE4_DIST },\
/*10*/ { DEF_DOUBLE_LINE5_OUT, DEF_DOUBLE_LINE5_IN, DEF_DOUBLE_LINE5_DIST },\
/*11*/ { DEF_DOUBLE_LINE6_OUT, DEF_DOUBLE_LINE6_IN, DEF_DOUBLE_LINE6_DIST },\
/*12*/ { DEF_DOUBLE_LINE7_OUT, DEF_DOUBLE_LINE7_IN, DEF_DOUBLE_LINE7_DIST },\
/*13*/ { DEF_DOUBLE_LINE8_OUT, DEF_DOUBLE_LINE8_IN, DEF_DOUBLE_LINE8_DIST },\
/*14*/ { DEF_DOUBLE_LINE9_OUT, DEF_DOUBLE_LINE9_IN, DEF_DOUBLE_LINE9_DIST },\
/*15*/ { DEF_DOUBLE_LINE10_OUT,DEF_DOUBLE_LINE10_IN,DEF_DOUBLE_LINE10_DIST} \
};
#define WW8_DECL_LINETAB_OFS_DOUBLE 5 // Beginn des DOUBLE_LINE Abschnitts in meiner Liste
struct WW8_XCHAR // Hilfs-Konstrukt fuer WW8_DOPTYPOGRAPHY
{
sal_Char A;
sal_Char B;
};
struct WW8_DOPTYPOGRAPHY
{ /*
Document Typography Info (DOPTYPOGRAPHY)
These options are Far East only, and are accessible
through the Typography tab of the Tools/Options dialog.
*/
/* a c h t u n g : es duerfen keine solchen Bitfelder ueber einen eingelesenes Byte-Array
gelegt werden!!
stattdessen ist ein aBits1 darueber zu legen, das mit & auszulesen ist
GRUND: Compiler auf Intel und Sparc sortieren die Bits unterschiedlich
*/
short fKerningPunct : 1; // true if we're kerning punctuation
short iJustification : 2; // Kinsoku method of justification:
// 0 = always expand
// 1 = compress punctuation
// 2 = compress punctuation and kana.
short iLevelOfKinsoku: 2; // Level of Kinsoku:
// 0 = Level 1
// 1 = Level 2
// 2 = Custom
short f2on1 : 1; // 2-page-on-1 feature is turned on.
short :10; // reserved
short cchFollowingPunct; // length of rgxchFPunct
short cchLeadingPunct; // length of rgxchLPunct
WW8_XCHAR rgxchFPunct[101]; // array of characters that should
// never appear at the start of a line
WW8_XCHAR rgxchLPunct[51]; // array of characters that should
// never appear at the end of a line
};
struct WW8_DOGRID
{
short xaGrid; // x-coord of the upper left-hand corner of the grid
short yaGrid; // y-coord of the upper left-hand corner of the grid
short dxaGrid; // width of each grid square
short dyaGrid; // height of each grid square
/* a c h t u n g : es duerfen keine solchen Bitfelder ueber einen eingelesenes Byte-Array
gelegt werden!!
stattdessen ist ein aBits1 darueber zu legen, das mit & auszulesen ist
GRUND: Compiler auf Intel und Sparc sortieren die Bits unterschiedlich
*/
short dyGridDisplay:7; // the number of grid squares (in the y direction)
// between each gridline drawn on the screen. 0 means
// don't display any gridlines in the y direction.
short fTurnItOff :1; // suppress display of gridlines
short dxGridDisplay:7; // the number of grid squares (in the x direction)
// between each gridline drawn on the screen. 0 means
// don't display any gridlines in the y direction.
short fFollowMargins:1; // if true, the grid will start at the left and top
// margins and ignore xaGrid and yaGrid.
};
struct WW8_PIC
{
INT32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
UINT16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
struct {
INT16 mm; // 0x6 int
INT16 xExt; // 0x8 int
INT16 yExt; // 0xa int
INT16 hMF; // 0xc int
}MFP;
// BYTE bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
BYTE rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
// and extents when metafile is stored -- ignored if 0
INT16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
INT16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
UINT16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
UINT16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
INT16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
INT16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
INT16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
INT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
INT16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
INT16 fFrameEmpty : 1; // 0010 picture consists of a single frame
INT16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
INT16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
INT16 fError : 1; // 0080 ==1, when picture is just an error message
INT16 bpp : 8; // FF00 bits per pixel, 0 = unknown
WW8_BRC rgbrc[4];
// BRC brcTop; // 0x2e specification for border above picture
// BRC brcLeft; // 0x30 specification for border to the left
// BRC brcBottom; // 0x32 specification for border below picture
// BRC brcRight; // 0x34 specification for border to the right
INT16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
INT16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
// BYTE rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
};
struct WW8_PIC_SHADOW
{
SVBT32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
SVBT16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
struct {
SVBT16 mm; // 0x6 int
SVBT16 xExt; // 0x8 int
SVBT16 yExt; // 0xa int
SVBT16 hMF; // 0xc int
}MFP;
// SVBT8 bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
SVBT8 rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
// and extents when metafile is stored -- ignored if 0
SVBT16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
SVBT16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
SVBT16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
SVBT16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
SVBT16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
SVBT16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
SVBT16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
SVBT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
SVBT8 aBits1; //0x2c
SVBT8 aBits2;
WW8_BRC rgbrc[4];
// BRC brcTop; // 0x2e specification for border above picture
// BRC brcLeft; // 0x30 specification for border to the left
// BRC brcBottom; // 0x32 specification for border below picture
// BRC brcRight; // 0x34 specification for border to the right
SVBT16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
SVBT16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
// SVBT8 rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
};
struct WW8_TBD
{
SVBT8 aBits1;
// BYTE jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
// BYTE tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
// * int :2 C0 reserved
};
struct WW8_TCell // hiermit wird weitergearbeitet (entspricht weitestgehend dem Ver8-Format)
{
BOOL bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
BOOL bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
BOOL bVertical : 1;// set to 1 when cell has vertical text flow
BOOL bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
BOOL bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
BOOL bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
BOOL bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
BYTE nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
// 0 top
// 1 center
// 2 bottom
UINT16 fUnused : 7;// reserved - nicht loeschen: macht das UINT16 voll !!
WW8_BRC rgbrc[4]; // border codes
//notational convenience for referring to brcTop, brcLeft, etc fields.
// BRC brcTop; // specification of the top border of a table cell
// BRC brcLeft; // specification of left border of table row
// BRC brcBottom; // specification of bottom border of table row
// BRC brcRight; // specification of right border of table row.
};
// cbTC (count of bytes of a TC) is 18(decimal), 12(hex).
struct WW8_TCellVer6 // wird aus der Datei gelesen
{
SVBT8 aBits1Ver6;
SVBT8 aBits2Ver6;
// UINT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
// UINT16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
// UINT16 fUnused : 14; // FFFC reserved
WW8_BRCVer6 rgbrcVer6[4];
// notational convenience for referring to brcTop, brcLeft, etc fields:
// BRC brcTop; // specification of the top border of a table cell
// BRC brcLeft; // specification of left border of table row
// BRC brcBottom; // specification of bottom border of table row
// BRC brcRight; // specification of right border of table row.
};
// cbTC (count of bytes of a TC) is 10(decimal), A(hex).
struct WW8_TCellVer8 // wird aus der Datei gelesen
{
SVBT16 aBits1Ver8; // Dokumentation siehe oben unter WW8_TCell
SVBT16 aUnused; // reserve
WW8_BRC rgbrcVer8[4]; // Dokumentation siehe oben unter WW8_TCell
};
// cbTC (count of bytes of a TC) is 20(decimal), 14(hex).
struct WW8_SHD // struct SHD fehlt in der Beschreibung
{
private:
UINT16 aBits;
// UINT16 nFore : 5; // 0x001f ForegroundColor
// UINT16 nBack : 5; // 0x03e0 BackgroundColor
// UINT16 nStyle : 5; // 0x7c00 Percentage and Style
// UINT16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
public:
WW8_SHD(){ aBits = 0; }
BYTE GetFore() const { return (BYTE)( aBits & 0x1f); }
BYTE GetBack() const { return (BYTE)((aBits >> 5 ) & 0x1f); }
BYTE GetStyle(BOOL bVer67) const { return (BYTE)((aBits >> 10) & ( bVer67?0x1f:0x3f ) ); }
UINT16 GetValue() const { return aBits; }
void SetValue( UINT16 nVal ){ aBits = nVal; }
void SetWWValue( SVBT16 nVal ){ aBits = (UINT16)SVBT16ToShort( nVal ); }
void SetFore( BYTE nVal ){ aBits = (aBits & 0xffe0) | (nVal & 0x1f); }
void SetBack( BYTE nVal ){ aBits = (aBits & 0xfc1f) | ((nVal & 0x1f)<<5); }
void SetStyle( BOOL bVer67, BYTE nVal ){
aBits = (aBits & ( bVer67?0x83ff:0x03ff ) )
| ((nVal & ( bVer67?0x1f:0x2f ))<<10); }
};
struct WW8_ANLV
{
SVBT8 nfc; // 0 number format code, 0=Arabic, 1=Upper case Roman, 2=Lower case Roman
// 3=Upper case Letter, 4=Lower case letter, 5=Ordinal
SVBT8 cbTextBefore; // 1 offset into anld.rgch limit of prefix text
SVBT8 cbTextAfter; // 2
SVBT8 aBits1;
// BYTE jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
// BYTE fPrev : 1; // 0x04 when ==1, include previous levels
// BYTE fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
// BYTE fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
// BYTE fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
// BYTE fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
// BYTE fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
SVBT8 aBits2;
// BYTE fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
// BYTE fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
// BYTE fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
// BYTE fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
// BYTE fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
// BYTE fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
// BYTE fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
// BYTE fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
SVBT8 aBits3;
// BYTE kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
// BYTE ico : 5; // 0xF1 color of autonumber
SVBT16 ftc; // 6 font code of autonumber
SVBT16 hps; // 8 font half point size (or 0=auto)
SVBT16 iStartAt; // 0x0a starting value (0 to 65535)
SVBT16 dxaIndent; // 0x0c *short?* *USHORT?* width of prefix text (same as indent)
SVBT16 dxaSpace; // 0x0e minimum space between number and paragraph
};
// *cbANLV (count of bytes of ANLV) is 16 (decimal), 10(hex).
struct WW8_ANLD
{
WW8_ANLV eAnlv; // 0
SVBT8 fNumber1; // 0x10 number only 1 item per table cell
SVBT8 fNumberAcross; // 0x11 number across cells in table rows(instead of down)
SVBT8 fRestartHdn; // 0x12 restart heading number on section boundary
SVBT8 fSpareX; // 0x13 unused( should be 0)
BYTE rgchAnld[32]; // 0x14 characters displayed before/after autonumber
};
struct WW8_OLST
{
WW8_ANLV rganlv[9]; // 0 an array of 9 ANLV structures (heading levels)
SVBT8 fRestartHdr; // 0x90 when ==1, restart heading on section break
SVBT8 fSpareOlst2; // 0x91 reserved
SVBT8 fSpareOlst3; // 0x92 reserved
SVBT8 fSpareOlst4; // 0x93 reserved
BYTE rgch[64]; // 0x94 array of 64 chars text before/after number
};
// cbOLST is 212(decimal), D4(hex).
struct WW8_FDOA
{
SVBT32 fc; // 0 FC pointing to drawing object data
SVBT16 ctxbx; // 4 count of textboxes in the drawing object
};
struct WW8_DO
{
SVBT16 dok; // 0 Drawn Object Kind, currently this is always 0
SVBT16 cb; // 2 size (count of bytes) of the entire DO
SVBT8 bx; // 4 x position relative to anchor CP
SVBT8 by; // 5 y position relative to anchor CP
SVBT16 dhgt; // 6 height of DO
SVBT16 aBits1;
// UINT16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
// BYTE[] rgdp; // 0xa variable length array of drawing primitives
};
struct WW8_DPHEAD
{
SVBT16 dpk; // 0 Drawn Primitive Kind REVIEW davebu
// 0=start of grouping, 1=line, 2=textbox, 3=rectangle,
// 4=arc, 5=elipse, 6=polyline, 7=callout textbox,
// 8=end of grouping, 9=sample primitve holding default values
SVBT16 cb; // 2 size (count of bytes) of this DP
SVBT16 xa; // 4 These 2 points describe the rectangle
SVBT16 ya; // 6 enclosing this DP relative to the origin of
SVBT16 dxa; // 8 the DO
SVBT16 dya; // 0xa
};
struct WW8_DP_LINETYPE
{
SVBT32 lnpc; // LiNe Property Color -- RGB color value
SVBT16 lnpw; // line property weight in twips
SVBT16 lnps; // line property style : 0=Solid, 1=Dashed
// 2=Dotted, 3=Dash Dot, 4=Dash Dot Dot, 5=Hollow
};
struct WW8_DP_SHADOW // Schattierung!
{
SVBT16 shdwpi; // Shadow Property Intensity
SVBT16 xaOffset; // x offset of shadow
SVBT16 yaOffset; // y offset of shadow
};
struct WW8_DP_FILL
{
SVBT32 dlpcFg; // FiLl Property Color ForeGround -- RGB color value
SVBT32 dlpcBg; // Property Color BackGround -- RGB color value
SVBT16 flpp; // FiLl Property Pattern REVIEW davebu
};
struct WW8_DP_LINEEND
{
SVBT16 aStartBits;
// UINT16 eppsStart : 2; // Start EndPoint Property Style
// 0=None, 1=Hollow, 2=Filled
// UINT16 eppwStart : 2; // Start EndPoint Property Weight
// UINT16 epplStart : 2; // Start EndPoint Property length
// UINT16 dummyStart : 10; // Alignment
SVBT16 aEndBits;
// UINT16 eppsEnd : 2; // End EndPoint Property Style
// UINT16 eppwEnd : 2; // End EndPoint Property Weight
// UINT16 epplEnd : 2; // End EndPoint Property length
// UINT16 dummyEnd : 10; // Alignment
};
struct WW8_DP_LINE
{
// WW8_DPHEAD dphead; // 0 Common header for a drawing primitive
SVBT16 xaStart; // starting point for line
SVBT16 yaStart; //
SVBT16 xaEnd; // ending point for line
SVBT16 yaEnd;
WW8_DP_LINETYPE aLnt;
WW8_DP_LINEEND aEpp;
WW8_DP_SHADOW aShd;
};
struct WW8_DP_TXTBOX
{
WW8_DP_LINETYPE aLnt;
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
// UINT16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
SVBT16 dzaInternalMargin; // 0x26 REVIEW davebu
};
struct WW8_DP_RECT
{
WW8_DP_LINETYPE aLnt;
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
// UINT16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
};
struct WW8_DP_ARC
{
WW8_DP_LINETYPE aLnt;
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT8 fLeft; // 0x24 00ff REVIEW davebu
SVBT8 fUp; // 0x24 ff00 REVIEW davebu
// UINT16 fLeft : 8; // 0x24 00ff REVIEW davebu
// UINT16 fUp : 8; // 0x24 ff00 REVIEW davebu
};
struct WW8_DP_ELIPSE
{
WW8_DP_LINETYPE aLnt;
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
};
struct WW8_DP_POLYLINE
{
WW8_DP_LINETYPE aLnt;
WW8_DP_FILL aFill;
WW8_DP_LINEEND aEpp;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
// UINT16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
// UINT16 cpt : 15; // 0x28 00fe count of points
// short xaFirst; // 0x2a These are the endpoints of the first line.
// short yaFirst; // 0x2c
// short xaEnd; // 0x2e
// short yaEnd; // 0x30
// short rgpta[]; // 0x32 An array of xa,ya pairs for the remaining points
};
struct WW8_DP_CALLOUT_TXTBOX
{
SVBT16 flags; // 0x0c REVIEW davebu flags
SVBT16 dzaOffset; // 0x0e REVIEW davebu
SVBT16 dzaDescent; // 0x10 REVIEW davebu
SVBT16 dzaLength; // 0x12 REVIEW davebu
WW8_DPHEAD dpheadTxbx; // 0x14 DPHEAD for a textbox
WW8_DP_TXTBOX dptxbx; // 0x20 DP for a textbox
WW8_DPHEAD dpheadPolyLine; // 0x4c DPHEAD for a Polyline
WW8_DP_POLYLINE dpPolyLine; // 0x48 DP for a polyline
};
struct WW8_DP_DEFAULTS
{
WW8_DP_LINETYPE aLnt;
WW8_DP_FILL aFill;
WW8_DP_LINEEND aEpp;
WW8_DP_SHADOW aShd;
SVBT16 dzaOffset; // 0x2a REVIEW davebu
SVBT16 dzaDescent; // 0x2c REVIEW davebu
SVBT16 dzaLength; // 0x2e REVIEW davebu
SVBT16 aBits3;
// UINT16 fRoundCorners : 1; // 0x30 0001 1 if the textbox has rounded corners
// UINT16 zaShape : 15; // 0x30 000fe REVIEW davebu
SVBT16 dzaInternalMargin; // 0x32 REVIEW davebu
};
struct WW8_PCD
{
SVBT8 aBits1;
// BYTE fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
// BYTE fPaphNil : 1; // used internally by Word
// BYTE fCopied : 1; // used internally by Word
// * int :5
SVBT8 aBits2; // fn int:8, used internally by Word
SVBT32 fc; // file offset of beginning of piece. The size of the
// ithpiece can be determined by subtracting rgcp[i] of
// the containing plcfpcd from its rgcp[i+1].
SVBT16 prm; // PRM contains either a single sprm or else an index number
// of the grpprl which contains the sprms that modify the
// properties of the piece.
};
struct WW8_PHE_Base
{
BYTE aBits1; //
// 0 0 fSpare int :1 0001 reserved
// fUnk int :1 0002 phe entry is invalid
// when == 1
// fDiffLines int :1 0004 when 1, total
// height of paragraph is known but lines in
// paragraph have different heights.
// * int :5 00F8 reserved
BYTE nlMac; // when fDiffLines is 0 is number of lines in
// // paragraph
SVBT16 dxaCol; // width of lines in paragraph
SVBT16 dyl;
// 4 4 dylLine int when fDiffLines is 0,
// is height of every line in paragraph.in pixels
// 4 4 dylHeight uns when fDiffLines is 1,
// is the total height in pixels of the paragraph
};
/*
eigentlich muessten wir das jetzt in etwa *so* praezisieren:
struct WW8_PHE_Ver6 : public WW8_PHE_Base
{
// 6 Bytes gross
};
struct WW8_PHE_Ver6 : public WW8_PHE_Base
{
SVBT16 a;
SVBT16 b;
SVBT16 c; // 12 Byte gross
};
*/
// AnnoTation Refernce Descriptor (ATRD)
struct WW8_ATRD // fuer die 8-Version
{
SVBT16 xstUsrInitl[ 10 ]; // pascal-style String holding initials
// of annotation author
SVBT16 ibst; // index into GrpXstAtnOwners
SVBT16 ak; // not used
SVBT16 grfbmc; // not used
SVBT32 ITagBkmk; // when not -1, this tag identifies the
// annotation bookmark that locates the
// range of CPs in the main document which
// this annotation references.
};
struct WW67_ATRD // fuer die 6/7-Version
{
sal_Char xstUsrInitl[ 10 ]; // pascal-style String holding initials
// of annotation author
SVBT16 ibst; // index into GrpXstAtnOwners
SVBT16 ak; // not used
SVBT16 grfbmc; // not used
SVBT32 ITagBkmk; // when not -1, this tag identifies the
// annotation bookmark that locates the
// range of CPs in the main document which
// this annotation references.
};
#ifdef __WW8_NEEDS_PACK
#pragma pack()
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */