[Libreoffice-commits] core.git: include/tools lotuswordpro/source sw/source vcl/source
Marcos Paulo de Souza
marcos.souza.org at gmail.com
Thu Jan 30 08:54:37 PST 2014
include/tools/solar.h | 3 -
lotuswordpro/source/filter/lwpobjstrm.cxx | 6 +-
sw/source/filter/ww1/w1class.cxx | 38 +++++++--------
sw/source/filter/ww1/w1class.hxx | 2
sw/source/filter/ww1/w1filter.cxx | 6 +-
sw/source/filter/ww1/w1sprm.cxx | 12 ++---
sw/source/filter/ww1/w1struct.hxx | 72 +++++++++++++-----------------
sw/source/filter/ww8/wrtw8num.cxx | 14 ++---
sw/source/filter/ww8/ww8atr.cxx | 2
sw/source/filter/ww8/ww8graf.cxx | 13 ++---
sw/source/filter/ww8/ww8graf2.cxx | 14 ++---
sw/source/filter/ww8/ww8par.cxx | 4 -
sw/source/filter/ww8/ww8par2.cxx | 44 ++++++++----------
sw/source/filter/ww8/ww8par6.cxx | 4 -
sw/source/filter/ww8/ww8scan.cxx | 2
sw/source/filter/ww8/ww8struc.hxx | 58 ++++++++++++------------
vcl/source/gdi/gdimtf.cxx | 5 --
17 files changed, 140 insertions(+), 159 deletions(-)
New commits:
commit 73d713a1b38651c6f90826b3b7a2c69181e1622f
Author: Marcos Paulo de Souza <marcos.souza.org at gmail.com>
Date: Sat Jan 25 10:16:24 2014 -0200
fdo#63154: Remove SVBT8 from solar.h
Conflicts:
sw/source/filter/ww8/ww8par2.cxx
Change-Id: I4e500cf0ca89468494fd3f0892839f5ca6cce725
Reviewed-on: https://gerrit.libreoffice.org/7645
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/tools/solar.h b/include/tools/solar.h
index 42316ef..914f0de 100644
--- a/include/tools/solar.h
+++ b/include/tools/solar.h
@@ -41,14 +41,12 @@ typedef sal_uIntPtr sal_uLong; /* Replaces type ULONG */
always little endian;
not necessarily aligned */
-typedef sal_uInt8 SVBT8[1];
typedef sal_uInt8 SVBT16[2];
typedef sal_uInt8 SVBT32[4];
typedef sal_uInt8 SVBT64[8];
#ifdef __cplusplus
-inline sal_uInt8 SVBT8ToByte ( const SVBT8 p ) { return p[0]; }
inline sal_uInt16 SVBT16ToShort( const SVBT16 p ) { return (sal_uInt16)p[0]
+ ((sal_uInt16)p[1] << 8); }
inline sal_uInt32 SVBT32ToUInt32 ( const SVBT32 p ) { return (sal_uInt32)p[0]
@@ -79,7 +77,6 @@ inline double SVBT64ToDouble( const SVBT64 p ) { double n;
return n; }
#endif
-inline void ByteToSVBT8 ( sal_uInt8 n, SVBT8 p ) { p[0] = n; }
inline void ShortToSVBT16( sal_uInt16 n, SVBT16 p ) { p[0] = (sal_uInt8) n;
p[1] = (sal_uInt8)(n >> 8); }
inline void UInt32ToSVBT32 ( sal_uInt32 n, SVBT32 p ) { p[0] = (sal_uInt8) n;
diff --git a/lotuswordpro/source/filter/lwpobjstrm.cxx b/lotuswordpro/source/filter/lwpobjstrm.cxx
index b9dc392..52949e4 100644
--- a/lotuswordpro/source/filter/lwpobjstrm.cxx
+++ b/lotuswordpro/source/filter/lwpobjstrm.cxx
@@ -263,11 +263,11 @@ sal_Int16 LwpObjectStream::QuickReadInt16(bool *pFailure)
*/
sal_uInt8 LwpObjectStream::QuickReaduInt8(bool *pFailure)
{
- SVBT8 aValue = {0};
- sal_uInt16 nRead = QuickRead(aValue, sizeof(aValue));
+ sal_uInt8 aValue = 0;
+ sal_uInt16 nRead = QuickRead(&aValue, sizeof(aValue));
if (pFailure)
*pFailure = (nRead != sizeof(aValue));
- return SVBT8ToByte(aValue);
+ return aValue;
}
/**
* @descr Quick read double
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index be05e22..bfcbf3b 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -103,7 +103,7 @@ void Ww1Style::SetDefaults(sal_uInt8 stc)
sal_uInt16 Ww1Style::ReadName( sal_uInt8*&p, sal_uInt16& rnCountBytes, sal_uInt16 stc )
{
- sal_uInt8 nCountBytes = SVBT8ToByte(p);
+ sal_uInt8 nCountBytes = *p;
p++;
rnCountBytes--;
if( !nCountBytes ) // default
@@ -168,7 +168,7 @@ sal_uInt16 Ww1Style::ReadName( sal_uInt8*&p, sal_uInt16& rnCountBytes, sal_uInt1
sal_uInt16 Ww1Style::ReadChpx( sal_uInt8*&p, sal_uInt16& rnCountBytes )
{
- sal_uInt16 nCountBytes = SVBT8ToByte(p);
+ sal_uInt16 nCountBytes = *p;
p++;
rnCountBytes--;
if (nCountBytes != 255 // unused
@@ -186,7 +186,7 @@ sal_uInt16 Ww1Style::ReadChpx( sal_uInt8*&p, sal_uInt16& rnCountBytes )
sal_uInt16 Ww1Style::ReadPapx(sal_uInt8*&p, sal_uInt16& rnCountBytes)
{
- sal_uInt16 nCountBytes = SVBT8ToByte(p);
+ sal_uInt16 nCountBytes = *p;
p++;
rnCountBytes--;
if (nCountBytes != 255)
@@ -203,10 +203,10 @@ sal_uInt16 Ww1Style::ReadPapx(sal_uInt8*&p, sal_uInt16& rnCountBytes)
sal_uInt16 Ww1Style::ReadEstcp(sal_uInt8*&p, sal_uInt16& rnCountBytes)
{
- stcNext = SVBT8ToByte(p);
+ stcNext = *p;
p++;
rnCountBytes--;
- stcBase = SVBT8ToByte(p);
+ stcBase = *p;
p++;
OSL_ENSURE(rnCountBytes>0, "Ww1Style");
rnCountBytes--;
@@ -442,11 +442,10 @@ Ww1Sprm::Ww1Sprm(SvStream& rStream, sal_uLong ulFilePos)
pArr(NULL),
count(0)
{
- SVBT8 x;
- ByteToSVBT8(0, x);
+ sal_uInt8 x = 0;
if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
if (rStream.Read(&x, sizeof(x)) == (sal_uLong)sizeof(x))
- if ((nCountBytes = SVBT8ToByte(x)) == 255
+ if ((nCountBytes = x) == 255
|| !nCountBytes
|| (p = new sal_uInt8[nCountBytes]) != NULL)
if (nCountBytes == 255
@@ -474,14 +473,14 @@ Ww1SingleSprm::~Ww1SingleSprm()
sal_uInt16 Ww1SingleSprmTab::Size(sal_uInt8* pSprm) // Doc 24/25, Fastsave-Sprm
{
OSL_ENSURE(nCountBytes==0, "Ww1SingleSprmTab");
- sal_uInt16 nRet = sizeof(SVBT8);
- sal_uInt16 nSize = SVBT8ToByte(pSprm);
+ sal_uInt16 nRet = sizeof(sal_uInt8);
+ sal_uInt16 nSize = *pSprm;
if (nSize != 255)
nRet = nRet + nSize;
else
{
- sal_uInt16 nDel = SVBT8ToByte(pSprm+1) * 4;
- sal_uInt16 nIns = SVBT8ToByte(pSprm + 3 + nDel) * 3;
+ sal_uInt16 nDel = (*(pSprm + 1)) * 4;
+ sal_uInt16 nIns = (*(pSprm + 3 + nDel)) * 3;
nRet += nDel + nIns;
}
OSL_ENSURE(nRet <= 354, "Ww1SingleSprmTab");
@@ -492,10 +491,7 @@ sal_uInt16 Ww1SingleSprmTab::Size(sal_uInt8* pSprm) // Doc 24/25, Fastsave-Sprm
sal_uInt16 Ww1SingleSprmByteSized::Size(sal_uInt8* pSprm)
{
- sal_uInt16 nRet;
- nRet = SVBT8ToByte(pSprm);
- nRet += sizeof(SVBT8); // var. l. byte-size
- nRet = nRet + nCountBytes;
+ sal_uInt16 nRet = *pSprm + sizeof(sal_uInt8) + nCountBytes;
return nRet;
}
@@ -523,7 +519,7 @@ sal_Bool Ww1Sprm::Fill(sal_uInt16 index, sal_uInt8& nId, sal_uInt16& nL, sal_uIn
{
OSL_ENSURE(index < Count(), "Ww1Sprm");
pSprm = p + pArr[index];
- nId = SVBT8ToByte(pSprm);
+ nId = *pSprm;
pSprm++;
nL = GetTab(nId).Size(pSprm);
return sal_True;
@@ -966,12 +962,12 @@ sal_uInt8* Ww1Fkp::GetData(sal_uInt16 nIndex)
sal_Bool Ww1FkpPap::Fill(sal_uInt16 nIndex, sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
OSL_ENSURE( nIndex < Count(), "Ww1FkpPap::Fill() Index out of Range" );
- sal_uInt16 nOffset = SVBT8ToByte(GetData(nIndex)) * 2;
+ sal_uInt16 nOffset = *GetData(nIndex) * 2;
if (nOffset)
{
OSL_ENSURE(nOffset>(sal_uInt16)(Count()*sizeof(SVBT32)), "calc error");
- rnCountBytes = SVBT8ToByte(aFkp+nOffset) * 2;
- nOffset += sizeof(SVBT8);
+ rnCountBytes = *(aFkp+nOffset) * 2;
+ nOffset += sizeof(sal_uInt8);
if( nOffset + rnCountBytes < 511 ) // SH: Assert schlug 1 zu frueh zu
rnCountBytes++; // SH: Ich weiss nicht genau,
// ob das letzte Byte des PAPX
@@ -999,7 +995,7 @@ sal_Bool Ww1FkpChp::Fill(sal_uInt16 nIndex, W1_CHP& aChp)
{
OSL_ENSURE(nOffset>(sal_uInt16)(Count()*sizeof(SVBT32)), "calc error");
sal_uInt16 nCountBytes = aFkp[nOffset];
- nOffset += sizeof(SVBT8);
+ nOffset += sizeof(sal_uInt8);
OSL_ENSURE(nCountBytes <= 511-nOffset, "calc error");
OSL_ENSURE(nCountBytes <= sizeof(aChp), "calc error");
memcpy(&aChp, aFkp+nOffset, nCountBytes);
diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx
index 2e01242..2795751 100644
--- a/sw/source/filter/ww1/w1class.hxx
+++ b/sw/source/filter/ww1/w1class.hxx
@@ -986,7 +986,7 @@ protected:
public:
Ww1Fkp(SvStream&, sal_uLong, sal_uInt16);
friend std::ostream& operator <<(std::ostream&, Ww1Fkp&);
- sal_uInt16 Count() const { return SVBT8ToByte(aFkp+511); }
+ sal_uInt16 Count() const { return *(aFkp+511); }
sal_uLong Where(sal_uInt16); // wie im entsprechenden fkp
};
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index 1574e23..06b074b 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -1843,7 +1843,7 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
SVBT32 tmpLong;
SVBT16 tmpShort;
- SVBT8 tmpByte;
+ sal_uInt8 tmpByte;
#define wLong(n) \
UInt32ToSVBT32(n, tmpLong); \
if ((rOut.Write(tmpLong, sizeof(SVBT32))) != sizeof(SVBT32)) goto error;
@@ -1851,8 +1851,8 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
ShortToSVBT16(n, tmpShort); \
if ((rOut.Write(tmpShort, sizeof(SVBT16))) != sizeof(SVBT16)) goto error;
#define wByte(n) \
- ByteToSVBT8(n, tmpByte); \
- if ((rOut.Write(tmpByte, sizeof(SVBT8))) != sizeof(SVBT8)) goto error;
+ tmpByte = n; \
+ if ((rOut.Write(&tmpByte, sizeof(sal_uInt8))) != sizeof(sal_uInt8)) goto error;
wByte('B'); wByte('M');
wLong(54 + 4 * 16 + padx * maxy);
wLong(0);
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index 2d0f74e..6759f53 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -162,7 +162,7 @@ void Ww1SingleSprmPJc::Start(
SVX_ADJUST_CENTER,
SVX_ADJUST_RIGHT,
SVX_ADJUST_BLOCK };
- sal_uInt8 nPara = SVBT8ToByte(pSprm);
+ sal_uInt8 nPara = *pSprm;
nPara %=SAL_N_ELEMENTS(aAdj);
rOut << SvxAdjustItem(aAdj[nPara], RES_PARATR_ADJUST);
}
@@ -172,7 +172,7 @@ STOP1(Ww1SingleSprmPJc, RES_PARATR_ADJUST)
void Ww1SingleSprmPFKeep::Start(
Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
- rOut << SvxFmtSplitItem((SVBT8ToByte(pSprm) & 1) == 0, RES_PARATR_SPLIT);
+ rOut << SvxFmtSplitItem((*pSprm & 1) == 0, RES_PARATR_SPLIT);
}
STOP1(Ww1SingleSprmPFKeep, RES_PARATR_SPLIT)
@@ -180,7 +180,7 @@ STOP1(Ww1SingleSprmPFKeep, RES_PARATR_SPLIT)
void Ww1SingleSprmPFKeepFollow::Start(
Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
- rOut << SvxFmtKeepItem((SVBT8ToByte(pSprm) & 1) != 0, RES_KEEP);
+ rOut << SvxFmtKeepItem((*pSprm & 1) != 0, RES_KEEP);
}
STOP1(Ww1SingleSprmPFKeepFollow, RES_KEEP)
@@ -188,7 +188,7 @@ STOP1(Ww1SingleSprmPFKeepFollow, RES_KEEP)
void Ww1SingleSprmPPageBreakBefore::Start(
Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
- rOut << SvxFmtBreakItem(SVBT8ToByte(pSprm) & 1?
+ rOut << SvxFmtBreakItem(*pSprm & 1?
SVX_BREAK_PAGE_BEFORE:SVX_BREAK_NONE, RES_BREAK );
}
@@ -389,7 +389,7 @@ STOP1(Ww1SingleSprmPChgTabsPapx, RES_PARATR_TABSTOP)
void Ww1SingleSprmSGprfIhdt::Start(
Ww1Shell& /*rOut*/, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
- rMan.GetSep().SetGrpfIhdt(SVBT8ToByte(pSprm));
+ rMan.GetSep().SetGrpfIhdt(*pSprm);
}
void Ww1SingleSprmSColumns::Start(
@@ -545,7 +545,7 @@ void Ww1SingleSprmTDyaRowHeight::Start(
void Ww1SingleSprmPpc::Start(
Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
- sal_uInt8 nPpc = SVBT8ToByte(pSprm);
+ sal_uInt8 nPpc = *pSprm;
if (rOut.IsInTable()) // PMW does not know Flys in tables
return;
diff --git a/sw/source/filter/ww1/w1struct.hxx b/sw/source/filter/ww1/w1struct.hxx
index b8540a79..611fe84 100644
--- a/sw/source/filter/ww1/w1struct.hxx
+++ b/sw/source/filter/ww1/w1struct.hxx
@@ -501,11 +501,11 @@ struct W1_CHP /////////////////////////////////////////////////////////
{
SVBT16 fChar;
SVBT16 ftc;// Font Code
- SVBT8 hps;// Font size in half points
- SVBT8 hpsPos;// Sub/Superscript ( signed number, 0 = normal )
+ sal_uInt8 hps;// Font size in half points
+ sal_uInt8 hpsPos;// Sub/Superscript ( signed number, 0 = normal )
SVBT16 fText;
SVBT32 fcPic;// not stored in File
- SVBT8 fnPic;// internal
+ sal_uInt8 fnPic;// internal
SVBT16 hpsLargeChp;// ???
W1_CHP() { memset( this, 0, sizeof( *this)); }
@@ -552,10 +552,10 @@ struct W1_CHP /////////////////////////////////////////////////////////
sal_uInt16 ftcGet() { return SVBT16ToShort(ftc); }
void ftcSet(sal_uInt16 n) { ShortToSVBT16(n, ftc); }
- void hpsSet(sal_uInt8 n) { ByteToSVBT8(n, hps); }
- sal_uInt8 hpsGet() { return SVBT8ToByte(hps); }
+ void hpsSet(sal_uInt8 n) { hps = n; }
+ sal_uInt8 hpsGet() { return hps; }
- sal_uInt8 hpsPosGet() { return SVBT8ToByte(hpsPos); }
+ sal_uInt8 hpsPosGet() { return hpsPos; }
sal_uInt16 fTextGet() { return SVBT16ToShort(fText); }
void fTextSet(sal_uInt16 n) { ShortToSVBT16(n, fText); }
sal_uInt16 qpsSpaceGet() { return (sal_uInt16)((fTextGet() >> 0) & 0x3f); }
@@ -571,7 +571,7 @@ struct W1_CHP /////////////////////////////////////////////////////////
// SVBT16 fSysVanish: 1;// used internally
sal_uLong fcPicGet() { return SVBT32ToUInt32(fcPic); }
- sal_uInt16 fnPicGet() { return SVBT8ToByte(fnPic); }
+ sal_uInt16 fnPicGet() { return fnPic; }
sal_uInt16 hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); }
void Out(Ww1Shell&, Ww1Manager&);
@@ -579,23 +579,23 @@ struct W1_CHP /////////////////////////////////////////////////////////
struct W1_FFN ///////////////////////////////////////// Font Descriptor
{
- SVBT8 cbFfnM1;// 0x0 total length of FFN - 1.
+ sal_uInt8 cbFfnM1;// 0x0 total length of FFN - 1.
sal_uInt16 cbFfnM1Get() {
- return SVBT8ToByte(cbFfnM1); }
- SVBT8 fFlags;
+ return static_cast<sal_uInt8>(cbFfnM1); }
+ sal_uInt8 fFlags;
sal_uInt16 fFlagsGet() {
- return SVBT8ToByte(fFlags); }
- // SVBT8 prg : 2;// 0x1:03 pitch request
+ return static_cast<sal_uInt8>(fFlags); }
+ // sal_uInt8 prg : 2;// 0x1:03 pitch request
sal_uInt16 prgGet() {
return (sal_uInt16)((fFlagsGet() >> 0) & 3); }
- // SVBT8 fTrueType : 1;// 0x1:04 when 1, font is a TrueType font
+ // sal_uInt8 fTrueType : 1;// 0x1:04 when 1, font is a TrueType font
sal_Bool fTrueTypeGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
- // SVBT8 : 1;// 0x1:08 reserved
- // SVBT8 ff : 3;// 0x1:70 font family id
+ // sal_uInt8 : 1;// 0x1:08 reserved
+ // sal_uInt8 ff : 3;// 0x1:70 font family id
sal_uInt16 ffGet() {
return (sal_uInt16)((fFlagsGet() >> 4) & 7); }
- // SVBT8 : 1;// 0x1:80 reserved
+ // sal_uInt8 : 1;// 0x1:80 reserved
sal_uInt8 szFfn[65];// 0x6 zero terminated string that records name of font.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
// Possibly followed by a second sz which records the name of an
@@ -631,9 +631,8 @@ struct W1_PHE /////////////////////////////////////// Paragraph Height
struct W1_PAPX ///////////////////////// Paragraph Property Difference
{
- SVBT8 stc;
- sal_uInt8 stcGet() {
- return SVBT8ToByte(stc); }
+ sal_uInt8 stc;
+ sal_uInt8 stcGet() { return stc; }
W1_PHE phe;
sal_uInt8 grpprl[1];
sal_uInt8* grpprlGet() {
@@ -690,12 +689,10 @@ struct W1_BRC10 ///////////////////////////////// Border Code Word 1.0
struct W1_FLD //////////////////////////////////////// FieldDescriptor
{
- SVBT8 ch; // boundary-type (begin(19), separator (20), end (21))
- sal_uInt8 chGet() {
- return SVBT8ToByte(ch); }
- SVBT8 flt; // field type / flags
- sal_uInt8 fltGet() {
- return SVBT8ToByte(flt); }
+ sal_uInt8 ch; // boundary-type (begin(19), separator (20), end (21))
+ sal_uInt8 chGet() { return ch; }
+ sal_uInt8 flt; // field type / flags
+ sal_uInt8 fltGet() { return flt; }
// variant, when ch==21:
sal_Bool fDifferGet() {
return (fltGet() >> 0) & 1; }
@@ -734,8 +731,8 @@ struct W1_PIC /////////////////////////////////////// PictureStructure
return SVBT16ToShort(hMF); }
} mfp;
union W1_MFP_BMP {
- 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
+ sal_uInt8 bm[14];// 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
+ sal_uInt8 rcWinMF[14];// 0xe rc (rectangle - 8 bytes) rect for window origin and extents when metafile is stored -- ignored if 0
} MFP_BMP;
SVBT16 dxaGoal;// 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
sal_uInt16 dxaGoalGet() {
@@ -796,20 +793,18 @@ struct W1_PIC /////////////////////////////////////// PictureStructure
// SVBT16 dyaOrigin;// 0x38 vertical offset of hand annotation origin
// sal_uInt16 dyaOriginGet() {
// return SVBT16ToShort(dyaOrigin); }
- SVBT8 rgb;// 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
- sal_uInt8* rgbGet() {
- return rgb; }
+ sal_uInt8 rgb;// 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
+ sal_uInt8* rgbGet() { return &rgb; }
};
struct W1_TBD /////////////////////////////////////////////////////////
{
- SVBT8 aBits1;
- sal_uInt8 aBits1Get() {
- return SVBT8ToByte(aBits1); }
-// SVBT8 jc : 3;// 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
+ sal_uInt8 aBits1;
+ sal_uInt8 aBits1Get() { return aBits1; }
+// sal_uInt8 jc : 3;// 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
sal_uInt8 jcGet() {
return aBits1Get() & 0x07; }
-// SVBT8 tlc : 3;// 0x38 tab leader code: 0=no leader, 1=dotted leader,
+// sal_uInt8 tlc : 3;// 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
sal_uInt8 tlcGet() {
return (aBits1Get() >> 3 ) & 0x07; }
@@ -818,14 +813,13 @@ struct W1_TBD /////////////////////////////////////////////////////////
struct W1_TC //////////////////////////////////////////////////////////
{
- SVBT8 aBits1;
- sal_uInt8 aBits1Get() {
- return SVBT8ToByte(aBits1); }
+ sal_uInt8 aBits1;
+ sal_uInt8 aBits1Get() { return aBits1; }
sal_uInt8 fFirstMergedGet() {
return aBits1Get() & 0x01; }
sal_uInt8 fMergedGet() {
return (aBits1Get() >> 1 ) & 0x01; }
- SVBT8 aBits2;
+ sal_uInt8 aBits2;
// SVBT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
// SVBT16 fMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
// SVBT16 fUnused : 14;// FFFC reserved
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 3331a3c..9fc8f44 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -604,7 +604,7 @@ void WW8Export::Out_SwNumLvl( sal_uInt8 nSwLevel )
void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
sal_uInt16& rCharLen, const SwNumFmt& rFmt)
{
- ByteToSVBT8(11, rAnlv.nfc);
+ rAnlv.nfc = 11;
sal_uInt8 nb = 0; // type of number
switch (rFmt.GetNumAdjust())
@@ -630,7 +630,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
if (GetWordFirstLineOffset(rFmt) < 0)
nb |= 0x8; // number will be displayed using a hanging indent
}
- ByteToSVBT8(nb, rAnlv.aBits1);
+ rAnlv.aBits1 = nb;
if (1 < rCharLen)
{
@@ -678,7 +678,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
rpCh++;
rCharLen--;
ShortToSVBT16(nFontId, rAnlv.ftc);
- ByteToSVBT8( 1, rAnlv.cbTextBefore );
+ rAnlv.cbTextBefore = 1;
}
// #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -710,7 +710,7 @@ void MSWordExportBase::SubstituteBullet( OUString& rNumStr,
}
static void SwWw8_InsertAnlText( const OUString& rStr, sal_uInt8*& rpCh,
- sal_uInt16& rCharLen, SVBT8& r8Len )
+ sal_uInt16& rCharLen, sal_uInt8& r8Len )
{
sal_uInt8 nb = 0;
ww::bytes aO;
@@ -724,14 +724,14 @@ static void SwWw8_InsertAnlText( const OUString& rStr, sal_uInt8*& rpCh,
rpCh += nCnt;
rCharLen = rCharLen - nCnt;
}
- ByteToSVBT8( nb, r8Len );
+ r8Len = nb;
}
void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
sal_uInt16& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
sal_uInt8 nSwLevel)
{
- ByteToSVBT8(WW8Export::GetNumId(rFmt.GetNumberingType()), rAnlv.nfc);
+ rAnlv.nfc = WW8Export::GetNumId(rFmt.GetNumberingType());
sal_uInt8 nb = 0;
switch (rFmt.GetNumAdjust())
@@ -757,7 +757,7 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
if (GetWordFirstLineOffset(rFmt) < 0)
nb |= 0x8; // number will be displayed using a hanging indent
- ByteToSVBT8( nb, rAnlv.aBits1 );
+ rAnlv.aBits1 = nb;
if( bInclUpper && !rRul.IsContinusNum() )
{
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 5f1f9dc..a39f00a 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4863,7 +4863,7 @@ void SwWW8WrTabu::Add(const SvxTabStop & rTS, long nAdjustment)
break;
}
- ByteToSVBT8(nPara, pAddTyp + nAdd);
+ pAddTyp[nAdd] = nPara;
++nAdd;
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 78ab203..3da8df6 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -177,7 +177,7 @@ bool SwWW8ImplReader::ReadGrafStart(void* pData, short nDataSiz,
if (!bCouldRead)
return false;
- RndStdIds eAnchor = (SVBT8ToByte(pDo->by) < 2) ? FLY_AT_PAGE : FLY_AT_PARA;
+ RndStdIds eAnchor = (pDo->by < 2) ? FLY_AT_PAGE : FLY_AT_PARA;
rSet.Put(SwFmtAnchor(eAnchor));
nDrawXOfs2 = nDrawXOfs;
@@ -185,7 +185,7 @@ bool SwWW8ImplReader::ReadGrafStart(void* pData, short nDataSiz,
if (eAnchor == FLY_AT_PARA)
{
- if( SVBT8ToByte( pDo->bx ) == 1 ) // Pos: echt links
+ if( pDo->bx == 1 ) // Pos: echt links
nDrawXOfs2 = static_cast< short >(nDrawXOfs2 - maSectionManager.GetPageLeft());
if( nInTable ) // Obj in Table
nDrawXOfs2 = nDrawXOfs2 - GetTableLeft(); // -> siehe Kommentar
@@ -193,7 +193,7 @@ bool SwWW8ImplReader::ReadGrafStart(void* pData, short nDataSiz,
}
else
{
- if( SVBT8ToByte( pDo->bx ) != 1 )
+ if( pDo->bx != 1 )
nDrawXOfs2 = static_cast< short >(nDrawXOfs2 + maSectionManager.GetPageLeft());
}
@@ -407,13 +407,12 @@ SdrObject* SwWW8ImplReader::ReadArc( WW8_DPHEAD* pHd, const WW8_DO* pDo,
aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya ) * 2;
short nA[] = { 2, 3, 1, 0 };
- short nW = nA[ ( ( SVBT8ToByte( aArc.fLeft ) & 1 ) << 1 )
- + ( SVBT8ToByte( aArc.fUp ) & 1 ) ];
- if( !SVBT8ToByte( aArc.fLeft ) ){
+ short nW = nA[ ( ( aArc.fLeft & 1 ) << 1 ) + ( aArc.fUp & 1 ) ];
+ if( !aArc.fLeft ){
aP0.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
aP1.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
}
- if( SVBT8ToByte( aArc.fUp ) ){
+ if( aArc.fUp ){
aP0.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
aP1.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
}
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 15118e3..5902294 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -729,7 +729,7 @@ void WW8PicShadowToReal( WW8_PIC_SHADOW * pPicS, WW8_PIC * pPic )
pPic->MFP.yExt = SVBT16ToShort( pPicS->MFP.yExt );
pPic->MFP.hMF = SVBT16ToShort( pPicS->MFP.hMF );
for( sal_uInt16 i = 0; i < 14 ; i++ )
- pPic->rcWinMF[i] = SVBT8ToByte( pPicS->rcWinMF[i] );
+ pPic->rcWinMF[i] = pPicS->rcWinMF[i];
pPic->dxaGoal = SVBT16ToShort( pPicS->dxaGoal );
pPic->dyaGoal = SVBT16ToShort( pPicS->dyaGoal );
pPic->mx = SVBT16ToShort( pPicS->mx );
@@ -738,12 +738,12 @@ void WW8PicShadowToReal( WW8_PIC_SHADOW * pPicS, WW8_PIC * pPic )
pPic->dyaCropTop = SVBT16ToShort( pPicS->dyaCropTop );
pPic->dxaCropRight = SVBT16ToShort( pPicS->dxaCropRight );
pPic->dyaCropBottom = SVBT16ToShort( pPicS->dyaCropBottom );
- pPic->brcl = pPicS->aBits1[0] & 0x0f;
- pPic->fFrameEmpty = (pPicS->aBits1[0] & 0x10) >> 4;
- pPic->fBitmap = (pPicS->aBits1[0] & 0x20) >> 5;
- pPic->fDrawHatch = (pPicS->aBits1[0] & 0x40) >> 6;
- pPic->fError = (pPicS->aBits1[0] & 0x80) >> 7;
- pPic->bpp = pPicS->aBits2[0];
+ pPic->brcl = pPicS->aBits1 & 0x0f;
+ pPic->fFrameEmpty = (pPicS->aBits1 & 0x10) >> 4;
+ pPic->fBitmap = (pPicS->aBits1 & 0x20) >> 5;
+ pPic->fDrawHatch = (pPicS->aBits1 & 0x40) >> 6;
+ pPic->fError = (pPicS->aBits1 & 0x80) >> 7;
+ pPic->bpp = pPicS->aBits2;
}
void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 83f3838..285fabd 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1758,7 +1758,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
short nPos = SVBT16ToShort(pIns + i*2);
aTabStop.GetTabPos() = nPos;
- switch( SVBT8ToByte( pTyp[i].aBits1 ) & 0x7 ) // pTyp[i].jc
+ switch( pTyp[i].aBits1 & 0x7 ) // pTyp[i].jc
{
case 0:
aTabStop.GetAdjustment() = SVX_TAB_ADJUST_LEFT;
@@ -1776,7 +1776,7 @@ void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
continue; // Ignore Bar
}
- switch( SVBT8ToByte( pTyp[i].aBits1 ) >> 3 & 0x7 )
+ switch( pTyp[i].aBits1 >> 3 & 0x7 )
{
case 0:
aTabStop.GetFill() = ' ';
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index b0bbc4a..585f9bd 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -570,16 +570,16 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, sal_uInt8 nSwLevel )
// in fact the following 2, but writer UI does not provide
// SVX_ADJUST_CENTER, SVX_ADJUST_BLOCKLINE };
- rNum.SetNumberingType( static_cast< sal_Int16 >(( SVBT8ToByte( rAV.nfc ) < 8 ) ?
- eNumA[SVBT8ToByte( rAV.nfc ) ] : SVX_NUM_NUMBER_NONE) );
- if ((SVBT8ToByte(rAV.aBits1 ) & 0x4) >> 2)
+ rNum.SetNumberingType( static_cast< sal_Int16 >(( rAV.nfc < 8 ) ?
+ eNumA[ rAV.nfc ] : SVX_NUM_NUMBER_NONE) );
+ if ((rAV.aBits1 & 0x4) >> 2)
rNum.SetIncludeUpperLevels(nSwLevel + 1);
rNum.SetStart( SVBT16ToShort( rAV.iStartAt ) );
- rNum.SetNumAdjust( eAdjA[SVBT8ToByte( rAV.aBits1 ) & 0x3] );
+ rNum.SetNumAdjust( eAdjA[ rAV.aBits1 & 0x3] );
rNum.SetCharTextDistance( SVBT16ToShort( rAV.dxaSpace ) );
sal_Int16 nIndent = std::abs((sal_Int16)SVBT16ToShort( rAV.dxaIndent ));
- if( SVBT8ToByte( rAV.aBits1 ) & 0x08 ) //fHang
+ if( rAV.aBits1 & 0x08 ) //fHang
{
rNum.SetFirstLineOffset( -nIndent );
rNum.SetLSpace( nIndent );
@@ -588,7 +588,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, sal_uInt8 nSwLevel )
else
rNum.SetCharTextDistance( nIndent ); // width of number is missing
- if( SVBT8ToByte( rAV.nfc ) == 5 || SVBT8ToByte( rAV.nfc ) == 7 )
+ if( rAV.nfc == 5 || rAV.nfc == 7 )
{
OUString sP = "." + rNum.GetSuffix();
rNum.SetSuffix( sP ); // ordinal number
@@ -607,11 +607,11 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
OUString sTxt;
if (bVer67)
{
- sTxt = OUString((sal_Char*)pTxt, SVBT8ToByte(rAV.cbTextBefore) + SVBT8ToByte(rAV.cbTextAfter), eCharSet);
+ sTxt = OUString((sal_Char*)pTxt, rAV.cbTextBefore + rAV.cbTextAfter, eCharSet);
}
else
{
- for(sal_Int32 i = 0; i < SVBT8ToByte(rAV.cbTextBefore) + SVBT8ToByte(rAV.cbTextAfter); ++i, pTxt += 2)
+ for(sal_Int32 i = 0; i < rAV.cbTextBefore + rAV.cbTextAfter; ++i, pTxt += 2)
{
sTxt += OUString(SVBT16ToShort(*(SVBT16*)pTxt));
}
@@ -630,8 +630,8 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
{
// use cBulletChar for correct mapping on MAC
OUStringBuffer aBuf;
- comphelper::string::padToLength(aBuf, SVBT8ToByte(rAV.cbTextBefore)
- + SVBT8ToByte(rAV.cbTextAfter), cBulletChar);
+ comphelper::string::padToLength(aBuf, rAV.cbTextBefore
+ + rAV.cbTextAfter, cBulletChar);
sTxt = aBuf.makeStringAndClear();
}
}
@@ -658,7 +658,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
rNum.SetBulletFont( &aFont );
// take only the very first character
- if (SVBT8ToByte(rAV.cbTextBefore) || SVBT8ToByte(rAV.cbTextAfter))
+ if (rAV.cbTextBefore || rAV.cbTextAfter)
rNum.SetBulletChar( sTxt[ 0 ] );
else
rNum.SetBulletChar( 0x2190 );
@@ -667,16 +667,15 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
}
if( bInsert )
{
- if (SVBT8ToByte(rAV.cbTextBefore))
+ if (rAV.cbTextBefore)
{
- OUString sP( sTxt.copy( 0, SVBT8ToByte( rAV.cbTextBefore ) ) );
+ OUString sP( sTxt.copy( 0, rAV.cbTextBefore ) );
rNum.SetPrefix( sP );
}
- if (SVBT8ToByte(rAV.cbTextAfter))
+ if( rAV.cbTextAfter )
{
OUString sP( rNum.GetSuffix() );
- sP += sTxt.copy( SVBT8ToByte( rAV.cbTextBefore ),
- SVBT8ToByte( rAV.cbTextAfter ) );
+ sP += sTxt.copy( rAV.cbTextBefore, rAV.cbTextAfter);
rNum.SetSuffix( sP );
}
// The characters before and after multipe digits do not apply because
@@ -694,7 +693,7 @@ void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, sal_uInt8 nSwLeve
SwNumFmt aNF;
if (pAD)
{ // there is a Anld-Sprm
- bAktAND_fNumberAcross = 0 != SVBT8ToByte( pAD->fNumberAcross );
+ bAktAND_fNumberAcross = 0 != pAD->fNumberAcross;
WW8_ANLV &rAV = pAD->eAnlv;
SetBaseAnlv(aNF, rAV, nSwLevel); // set the base format
SetAnlvStrings(aNF, rAV, pAD->rgchAnld, bOutLine ); // set the rest
@@ -826,10 +825,7 @@ void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLe
sal_uInt8 i;
WW8_ANLV* pAV1; // search String-Positions
for (i = 0, pAV1 = pO->rganlv; i < nSwLevel; ++i, ++pAV1)
- {
- nTxtOfs += SVBT8ToByte(pAV1->cbTextBefore)
- + SVBT8ToByte(pAV1->cbTextAfter);
- }
+ nTxtOfs += pAV1->cbTextBefore + pAV1->cbTextAfter;
if (!bVer67)
nTxtOfs *= 2;
@@ -911,7 +907,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
{
// this is ROW numbering ?
pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E); // sprmAnld
- if (pS12 && 0 != SVBT8ToByte(((WW8_ANLD*)pS12)->fNumberAcross))
+ if (pS12 && 0 != ((WW8_ANLD*)pS12)->fNumberAcross)
sNumRule = "";
}
}
@@ -939,7 +935,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
{
if (!pS12)
pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E); // sprmAnld
- if (!pS12 || !SVBT8ToByte( ((WW8_ANLD*)pS12)->fNumberAcross))
+ if (!pS12 || !((WW8_ANLD*)pS12)->fNumberAcross)
pTableDesc->SetNumRuleName(pNumRule->GetName());
}
}
@@ -1134,7 +1130,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS)
{
if( i < nColsToRead )
{ // TC from file ?
- sal_uInt8 aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
+ sal_uInt8 aBits1 = pTc->aBits1Ver6;
pAktTC->bFirstMerged = ( ( aBits1 & 0x01 ) != 0 );
pAktTC->bMerged = ( ( aBits1 & 0x02 ) != 0 );
memcpy( pAktTC->rgbrc[ WW8_TOP ].aBits1,
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index f007d96..d65e7dc 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -158,7 +158,7 @@ static sal_uInt16 ReadUSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nD
static sal_uInt8 ReadBSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, sal_uInt8 nDefaultVal )
{
const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
- sal_uInt8 nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
+ sal_uInt8 nVal = pS ? *pS : nDefaultVal;
return nVal;
}
@@ -3674,7 +3674,7 @@ void SwWW8ImplReader::Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nL
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
return;
}
- sal_uInt8 nfChsDiff = SVBT8ToByte( pData );
+ sal_uInt8 nfChsDiff = *pData;
if( nfChsDiff )
eHardCharSet = rtl_getTextEncodingFromWindowsCharset( *(pData + 1) );
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 324483d..15d81b0 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -849,7 +849,7 @@ SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const
inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
{
- sal_uInt8 n = SVBT8ToByte( *(SVBT8*)p );
+ sal_uInt8 n = *p;
p += 1;
return n;
}
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 0970e23..603eaa2 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -35,7 +35,7 @@
inline void Set_UInt8( sal_uInt8 *& p, sal_uInt8 n )
{
- ByteToSVBT8( n, *(SVBT8*)p );
+ *p = n;
p+= 1;
}
@@ -401,8 +401,8 @@ struct WW8_PIC_SHADOW
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
+// sal_uInt8 bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
+ sal_uInt8 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.
@@ -412,8 +412,8 @@ struct WW8_PIC_SHADOW
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;
+ sal_uInt8 aBits1; //0x2c
+ sal_uInt8 aBits2;
// WW8_BRC rgbrc[4];
// BRC brcTop; // 0x2e specification for border above picture
// BRC brcLeft; // 0x30 specification for border to the left
@@ -421,7 +421,7 @@ struct WW8_PIC_SHADOW
// 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.
+// sal_uInt8 rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
};
BOOST_STATIC_ASSERT(sizeof (WW8_PIC_SHADOW) == 0x2E);
@@ -429,7 +429,7 @@ BOOST_STATIC_ASSERT(sizeof (WW8_PIC_SHADOW) == 0x2E);
struct WW8_TBD
{
- SVBT8 aBits1;
+ sal_uInt8 aBits1;
// sal_uInt8 jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
// sal_uInt8 tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
@@ -463,8 +463,8 @@ struct WW8_TCell // hiermit wird weitergearbeitet (entspricht weitestgehend d
struct WW8_TCellVer6 // wird aus der Datei gelesen
{
- SVBT8 aBits1Ver6;
- SVBT8 aBits2Ver6;
+ sal_uInt8 aBits1Ver6;
+ sal_uInt8 aBits2Ver6;
// sal_uInt16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
// sal_uInt16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
// sal_uInt16 fUnused : 14; // FFFC reserved
@@ -535,11 +535,11 @@ public:
struct WW8_ANLV
{
- SVBT8 nfc; // 0 number format code, 0=Arabic, 1=Upper case Roman, 2=Lower case Roman
+ sal_uInt8 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;
+ sal_uInt8 cbTextBefore; // 1 offset into anld.rgch limit of prefix text
+ sal_uInt8 cbTextAfter; // 2
+ sal_uInt8 aBits1;
// sal_uInt8 jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
// sal_uInt8 fPrev : 1; // 0x04 when ==1, include previous levels
// sal_uInt8 fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
@@ -547,7 +547,7 @@ struct WW8_ANLV
// sal_uInt8 fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
// sal_uInt8 fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
// sal_uInt8 fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
- SVBT8 aBits2;
+ sal_uInt8 aBits2;
// sal_uInt8 fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
// sal_uInt8 fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
// sal_uInt8 fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
@@ -556,7 +556,7 @@ struct WW8_ANLV
// sal_uInt8 fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
// sal_uInt8 fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
// sal_uInt8 fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
- SVBT8 aBits3;
+ sal_uInt8 aBits3;
// sal_uInt8 kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
// sal_uInt8 ico : 5; // 0xF1 color of autonumber
SVBT16 ftc; // 6 font code of autonumber
@@ -570,20 +570,20 @@ struct WW8_ANLV
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)
+ sal_uInt8 fNumber1; // 0x10 number only 1 item per table cell
+ sal_uInt8 fNumberAcross; // 0x11 number across cells in table rows(instead of down)
+ sal_uInt8 fRestartHdn; // 0x12 restart heading number on section boundary
+ sal_uInt8 fSpareX; // 0x13 unused( should be 0)
sal_uInt8 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
+ sal_uInt8 fRestartHdr; // 0x90 when ==1, restart heading on section break
+ sal_uInt8 fSpareOlst2; // 0x91 reserved
+ sal_uInt8 fSpareOlst3; // 0x92 reserved
+ sal_uInt8 fSpareOlst4; // 0x93 reserved
sal_uInt8 rgch[64]; // 0x94 array of 64 chars text before/after number
};
// cbOLST is 212(decimal), D4(hex).
@@ -598,8 +598,8 @@ 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
+ sal_uInt8 bx; // 4 x position relative to anchor CP
+ sal_uInt8 by; // 5 y position relative to anchor CP
SVBT16 dhgt; // 6 height of DO
SVBT16 aBits1;
// sal_uInt16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
@@ -695,8 +695,8 @@ 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
+ sal_uInt8 fLeft; // 0x24 00ff REVIEW davebu
+ sal_uInt8 fUp; // 0x24 ff00 REVIEW davebu
// sal_uInt16 fLeft : 8; // 0x24 00ff REVIEW davebu
// sal_uInt16 fUp : 8; // 0x24 ff00 REVIEW davebu
};
@@ -738,12 +738,12 @@ struct WW8_DP_CALLOUT_TXTBOX
struct WW8_PCD
{
- SVBT8 aBits1;
+ sal_uInt8 aBits1;
// sal_uInt8 fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
// sal_uInt8 fPaphNil : 1; // used internally by Word
// sal_uInt8 fCopied : 1; // used internally by Word
// * int :5
- SVBT8 aBits2; // fn int:8, used internally by Word
+ sal_uInt8 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].
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 51d929d..23566cf 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2645,9 +2645,8 @@ sal_uLong GDIMetaFile::GetChecksum() const
}
}
- SVBT8 aSVBT8;
- ByteToSVBT8((sal_uInt8)pAct->IsClipping(), aSVBT8);
- nCrc = rtl_crc32(nCrc, aSVBT8, 1);
+ sal_uInt8 tmp = (sal_uInt8)pAct->IsClipping();
+ nCrc = rtl_crc32(nCrc, &tmp, 1);
}
else
{
More information about the Libreoffice-commits
mailing list