/* I'm not certain as to how this should work, but it will probably never occur, its in here for the sake of completeness */ void wvConvertBRC10ToBRC (BRC * item, BRC10 * in) { wvInitBRC (item); item->dptSpace = in->dxpSpace; item->fShadow = in->fShadow; /* The border lines and their brc10 settings follow: line type dxpLine1Width dxpSpaceBetween dxpLine2Width no border 0 0 0 single line 1 0 0 border two single line 1 1 1 border fat solid border 4 0 0 thick solid 2 0 0 border dotted border 6 (special value meaning 0 0 dotted line) hairline border 7(special value meaning 0 0 hairline) */ if ((in->dxpLine1Width == 0) && (in->dxpSpaceBetween == 0) && (in->dxpLine2Width == 0)) item->brcType = 0; else if ((in->dxpLine1Width == 1) && (in->dxpSpaceBetween == 0) && (in->dxpLine2Width == 0)) item->brcType = 1; else if ((in->dxpLine1Width == 1) && (in->dxpSpaceBetween == 1) && (in->dxpLine2Width == 1)) item->brcType = 3; else if ((in->dxpLine1Width == 4) && (in->dxpSpaceBetween == 0) && (in->dxpLine2Width == 0)) item->brcType = 3; else if ((in->dxpLine1Width == 2) && (in->dxpSpaceBetween == 0) && (in->dxpLine2Width == 0)) item->brcType = 2; else if ((in->dxpLine1Width == 6) && (in->dxpSpaceBetween == 0) && (in->dxpLine2Width == 0)) item->brcType = 6; else if ((in->dxpLine1Width == 7) && (in->dxpSpaceBetween == 0) && (in->dxpLine2Width == 0)) item->brcType = 5; else item->brcType = 0; }
void wvGetBRC_internal6(BRC *abrc, wvStream *infd, U8 *pointer) { U16 temp16; #ifdef PURIFY wvInitBRC(abrc); #endif temp16 = dread_16ubit(infd, &pointer); abrc->dptLineWidth = (temp16 & 0x0007); abrc->brcType = (temp16 & 0x0018) >> 3; abrc->fShadow = (temp16 & 0x0020) >> 5; abrc->ico = (temp16 & 0x07C0) >> 6; abrc->dptSpace = (temp16 & 0xF800) >> 11; }
void wvGetBRC_internal(BRC *abrc, wvStream *infd, U8 *pointer) { U8 temp8; #ifdef PURIFY wvInitBRC(abrc); #endif abrc->dptLineWidth = dread_8ubit(infd, &pointer); abrc->brcType = dread_8ubit(infd, &pointer); abrc->ico = dread_8ubit(infd, &pointer); temp8 = dread_8ubit(infd, &pointer); abrc->dptSpace = temp8 & 0x1f; abrc->fShadow = (temp8 & 0x20) >> 5; abrc->fFrame = (temp8 & 0x40) >> 6; abrc->reserved = (temp8 & 0x80) >> 7; }
void wvInitTAP(TAP *item) { int i; static TAP cache; static int test = 0; if (!test) { cache.jc = 0; cache.dxaGapHalf = 0; cache.dyaRowHeight = 0; cache.fCantSplit = 0; cache.fTableHeader = 0; wvInitTLP(&cache.tlp); cache.lwHTMLProps = 0; cache.fCaFull = 0; cache.fFirstRow = 0; cache.fLastRow = 0; cache.fOutline = 0; cache.reserved = 0; cache.itcMac = 0; cache.dxaAdjust = 0; cache.dxaScale = 0; cache.dxsInch = 0; for (i = 0; i < itcMax + 1; i++) cache.rgdxaCenter[i] = 0; for (i = 0; i < itcMax + 1; i++) cache.rgdxaCenterPrint[i] = 0; for (i = 0; i < itcMax; i++) wvInitTC(&(cache.rgtc[i])); for (i = 0; i < itcMax; i++) wvInitSHD(&(cache.rgshd[i])); for (i = 0; i < 6; i++) wvInitBRC(&(cache.rgbrcTable[i])); test++; } wvCopyTAP(item, &cache); }
void wvInitCHP(CHP *item) { int i; item->fBold = 0; item->fItalic = 0; item->fRMarkDel = 0; item->fOutline = 0; item->fFldVanish = 0; item->fSmallCaps = 0; item->fCaps = 0; item->fVanish = 0; item->fRMark = 0; item->fSpec = 0; item->fStrike = 0; item->fObj = 0; item->fShadow = 0; item->fLowerCase = 0; item->fData = 0; item->fOle2 = 0; item->fEmboss = 0; item->fImprint = 0; item->fDStrike = 0; item->fUsePgsuSettings = -1; /*-1 ? */ item->reserved1 = 0; item->reserved2 = 0; item->reserved11 = 0; item->ftc = 0; item->ftcAscii = 0; item->ftcFE = 0; item->ftcOther = 0; item->hps = 20; item->dxaSpace = 0; item->iss = 0; item->kul = 0; item->fSpecSymbol = 0; item->ico = 0; item->reserved3 = 0; item->fSysVanish = 0; item->hpsPos = 0; item->super_sub = 0; item->lid = 0; item->lidDefault = 0x0400; item->lidFE = 0x0400; item->idct = 0; item->idctHint = 0; item->wCharScale = 100; item->fcPic_fcObj_lTagObj = -1; item->ibstRMark = 0; item->ibstRMarkDel = 0; wvInitDTTM(&item->dttmRMark); wvInitDTTM(&item->dttmRMarkDel); item->reserved4 = 0; item->istd = istdNormalChar; item->ftcSym = 0; item->xchSym = 0; item->idslRMReason = 0; item->idslReasonDel = 0; item->ysr = 0; item->chYsr = 0; item->cpg = 0; item->hpsKern = 0; item->icoHighlight = 0; item->fHighlight = 0; item->kcd = 0; item->fNavHighlight = 0; item->fChsDiff = 0; item->fMacChs = 0; item->fFtcAsciSym = 0; item->reserved5 = 0; item->fPropRMark = 0; item->ibstPropRMark = 0; wvInitDTTM(&item->dttmPropRMark); item->sfxtText = 0; item->reserved6 = 0; item->reserved7 = 0; item->reserved8 = 0; item->reserved9 = 0; wvInitDTTM(&item->reserved10); item->fDispFldRMark = 0; item->ibstDispFldRMark = 0; wvInitDTTM(&item->dttmDispFldRMark); for (i = 0; i < 16; i++) item->xstDispFldRMark[i] = 0; wvInitSHD(&item->shd); wvInitBRC(&item->brc); /* bidi */ item->fBidi = 0; item->fBoldBidi = 0; item->fItalicBidi = 0; item->ftcBidi = 0; item->hpsBidi = 0; item->icoBidi = 0; item->lidBidi = 0; item->stylename[0] = 0; }
void wvInitSEP (SEP * item) { U8 i; item->bkc = 2; item->fTitlePage = 0; item->fAutoPgn = 0; item->nfcPgn = 0; item->fUnlocked = 0; item->cnsPgn = 0; item->fPgnRestart = 0; item->fEndNote = 1; item->lnc = 0; item->grpfIhdt = 0; item->nLnnMod = 0; item->dxaLnn = 0; item->dxaPgn = 720; item->dyaPgn = 720; item->fLBetween = 0; item->vjc = 0; item->dmBinFirst = 0; item->dmBinOther = 0; item->dmPaperReq = 0; wvInitBRC (&item->brcTop); wvInitBRC (&item->brcLeft); wvInitBRC (&item->brcBottom); wvInitBRC (&item->brcRight); item->fPropRMark = 0; item->ibstPropRMark = 0; wvInitDTTM (&item->dttmPropRMark); item->dxtCharSpace = 0; item->dyaLinePitch = 0; item->clm = 0; item->reserved1 = 0; item->dmOrientPage = 0; item->iHeadingPgn = 0; item->pgnStart = 1; item->lnnMin = 0; item->wTextFlow = 0; item->reserved2 = 0; item->pgbProp = 0; item->pgbApplyTo = 0; item->pgbPageDepth = 0; item->pgbOffsetFrom = 0; item->reserved = 0; item->xaPage = 12240; item->yaPage = 15840; item->xaPageNUp = 12240; item->yaPageNUp = 15840; item->dxaLeft = 1800; item->dxaRight = 1800; item->dyaTop = 1440; item->dyaBottom = 1440; item->dzaGutter = 0; item->dyaHdrTop = 720; item->dyaHdrBottom = 720; item->ccolM1 = 0; item->fEvenlySpaced = 1; item->reserved3 = 0; item->dxaColumns = 720; for (i = 0; i < 89; i++) item->rgdxaColumnWidthSpacing[i] = 0; item->dxaColumnWidth = 0; item->dmOrientFirst = 0; item->fLayout = 0; item->reserved4 = 0; wvInitOLST (&item->olstAnm); item->fBidi = 0; }