31#include <rtl/tencinfo.h>
34#include <osl/diagnose.h>
63 bool TestBeltAndBraces(
SvStream& rStrm)
429 for (sal_uInt16
nId = 111;
nId <= 113; ++
nId)
449 InfoRow<NS_sprm::PIstd>(),
450 InfoRow<NS_sprm::PIstdPermute>(),
451 InfoRow<NS_sprm::PIncLvl>(),
454 InfoRow<NS_sprm::PJc80>(),
456 InfoRow<NS_sprm::PFKeep>(),
457 InfoRow<NS_sprm::PFKeepFollow>(),
458 InfoRow<NS_sprm::PFPageBreakBefore>(),
462 InfoRow<NS_sprm::PIlvl>(),
463 InfoRow<NS_sprm::PIlfo>(),
464 InfoRow<NS_sprm::PFNoLineNumb>(),
465 InfoRow<NS_sprm::PChgTabsPapx>(),
467 InfoRow<NS_sprm::PDxaRight80>(),
468 InfoRow<NS_sprm::PDxaLeft80>(),
469 InfoRow<NS_sprm::PNest80>(),
470 InfoRow<NS_sprm::PDxaLeft180>(),
471 InfoRow<NS_sprm::PDyaLine>(),
474 InfoRow<NS_sprm::PDyaBefore>(),
475 InfoRow<NS_sprm::PDyaAfter>(),
476 InfoRow<NS_sprm::PChgTabs>(),
478 InfoRow<NS_sprm::PFInTable>(),
479 InfoRow<NS_sprm::PFTtp>(),
480 InfoRow<NS_sprm::PDxaAbs>(),
481 InfoRow<NS_sprm::PDyaAbs>(),
482 InfoRow<NS_sprm::PDxaWidth>(),
483 InfoRow<NS_sprm::PPc>(),
491 InfoRow<NS_sprm::PWr>(),
492 InfoRow<NS_sprm::PBrcTop80>(),
493 InfoRow<NS_sprm::PBrcLeft80>(),
494 InfoRow<NS_sprm::PBrcBottom80>(),
495 InfoRow<NS_sprm::PBrcRight80>(),
496 InfoRow<NS_sprm::PBrcBetween80>(),
497 InfoRow<NS_sprm::PBrcBar80>(),
498 InfoRow<NS_sprm::PFNoAutoHyph>(),
499 InfoRow<NS_sprm::PWHeightAbs>(),
500 InfoRow<NS_sprm::PDcs>(),
501 InfoRow<NS_sprm::PShd80>(),
502 InfoRow<NS_sprm::PDyaFromText>(),
503 InfoRow<NS_sprm::PDxaFromText>(),
504 InfoRow<NS_sprm::PFLocked>(),
505 InfoRow<NS_sprm::PFWidowControl>(),
507 InfoRow<NS_sprm::PFKinsoku>(),
508 InfoRow<NS_sprm::PFWordWrap>(),
509 InfoRow<NS_sprm::PFOverflowPunct>(),
510 InfoRow<NS_sprm::PFTopLinePunct>(),
511 InfoRow<NS_sprm::PFAutoSpaceDE>(),
512 InfoRow<NS_sprm::PFAutoSpaceDN>(),
513 InfoRow<NS_sprm::PWAlignFont>(),
514 InfoRow<NS_sprm::PFrameTextFlow>(),
520 InfoRow<NS_sprm::POutLvl>(),
522 InfoRow<NS_sprm::PFBiDi>(),
523 InfoRow<NS_sprm::PFNumRMIns>(),
525 InfoRow<NS_sprm::PNumRM>(),
528 InfoRow<NS_sprm::PHugePapx>(),
530 InfoRow<NS_sprm::PFUsePgsuSettings>(),
532 InfoRow<NS_sprm::PFAdjustRight>(),
533 InfoRow<NS_sprm::CFRMarkDel>(),
534 InfoRow<NS_sprm::CFRMarkIns>(),
535 InfoRow<NS_sprm::CFFldVanish>(),
536 InfoRow<NS_sprm::CPicLocation>(),
537 InfoRow<NS_sprm::CIbstRMark>(),
539 InfoRow<NS_sprm::CDttmRMark>(),
540 InfoRow<NS_sprm::CFData>(),
541 InfoRow<NS_sprm::CIdslRMark>(),
545 InfoRow<NS_sprm::CSymbol>(),
547 InfoRow<NS_sprm::CFOle2>(),
550 InfoRow<NS_sprm::CHighlight>(),
555 InfoRow<NS_sprm::CIstd>(),
556 InfoRow<NS_sprm::CIstdPermute>(),
558 InfoRow<NS_sprm::CPlain>(),
559 InfoRow<NS_sprm::CKcd>(),
560 InfoRow<NS_sprm::CFBold>(),
561 InfoRow<NS_sprm::CFItalic>(),
562 InfoRow<NS_sprm::CFStrike>(),
563 InfoRow<NS_sprm::CFOutline>(),
564 InfoRow<NS_sprm::CFShadow>(),
565 InfoRow<NS_sprm::CFSmallCaps>(),
566 InfoRow<NS_sprm::CFCaps>(),
567 InfoRow<NS_sprm::CFVanish>(),
569 InfoRow<NS_sprm::CKul>(),
571 InfoRow<NS_sprm::CDxaSpace>(),
573 InfoRow<NS_sprm::CIco>(),
574 InfoRow<NS_sprm::CHps>(),
576 InfoRow<NS_sprm::CHpsPos>(),
578 InfoRow<NS_sprm::CMajority>(),
584 InfoRow<NS_sprm::CIss>(),
587 InfoRow<NS_sprm::CHpsKern>(),
593 InfoRow<NS_sprm::CHresi>(),
594 InfoRow<NS_sprm::CRgFtc0>(),
595 InfoRow<NS_sprm::CRgFtc1>(),
596 InfoRow<NS_sprm::CRgFtc2>(),
597 InfoRow<NS_sprm::CCharScale>(),
598 InfoRow<NS_sprm::CFDStrike>(),
599 InfoRow<NS_sprm::CFImprint>(),
600 InfoRow<NS_sprm::CFSpec>(),
601 InfoRow<NS_sprm::CFObj>(),
602 InfoRow<NS_sprm::CPropRMark90>(),
604 InfoRow<NS_sprm::CFEmboss>(),
605 InfoRow<NS_sprm::CSfxText>(),
606 InfoRow<NS_sprm::CFBiDi>(),
608 InfoRow<NS_sprm::CFBoldBi>(),
609 InfoRow<NS_sprm::CFItalicBi>(),
610 InfoRow<NS_sprm::CFtcBi>(),
611 InfoRow<NS_sprm::CLidBi>(),
612 InfoRow<NS_sprm::CIcoBi>(),
613 InfoRow<NS_sprm::CHpsBi>(),
614 InfoRow<NS_sprm::CDispFldRMark>(),
616 InfoRow<NS_sprm::CIbstRMarkDel>(),
618 InfoRow<NS_sprm::CDttmRMarkDel>(),
619 InfoRow<NS_sprm::CBrc80>(),
620 InfoRow<NS_sprm::CShd80>(),
621 InfoRow<NS_sprm::CIdslRMarkDel>(),
624 InfoRow<NS_sprm::CFUsePgsuSettings>(),
627 InfoRow<NS_sprm::CRgLid0_80>(),
628 InfoRow<NS_sprm::CRgLid1_80>(),
629 InfoRow<NS_sprm::CIdctHint>(),
634 InfoRow<NS_sprm::PicBrcTop80>(),
635 InfoRow<NS_sprm::PicBrcLeft80>(),
636 InfoRow<NS_sprm::PicBrcBottom80>(),
637 InfoRow<NS_sprm::PicBrcRight80>(),
638 InfoRow<NS_sprm::ScnsPgn>(),
639 InfoRow<NS_sprm::SiHeadingPgn>(),
642 InfoRow<NS_sprm::SDxaColWidth>(),
643 InfoRow<NS_sprm::SDxaColSpacing>(),
645 InfoRow<NS_sprm::SFEvenlySpaced>(),
646 InfoRow<NS_sprm::SFProtected>(),
647 InfoRow<NS_sprm::SDmBinFirst>(),
648 InfoRow<NS_sprm::SDmBinOther>(),
649 InfoRow<NS_sprm::SBkc>(),
650 InfoRow<NS_sprm::SFTitlePage>(),
651 InfoRow<NS_sprm::SCcolumns>(),
652 InfoRow<NS_sprm::SDxaColumns>(),
654 InfoRow<NS_sprm::SNfcPgn>(),
657 InfoRow<NS_sprm::SFPgnRestart>(),
658 InfoRow<NS_sprm::SFEndnote>(),
659 InfoRow<NS_sprm::SLnc>(),
661 InfoRow<NS_sprm::SNLnnMod>(),
662 InfoRow<NS_sprm::SDxaLnn>(),
663 InfoRow<NS_sprm::SDyaHdrTop>(),
664 InfoRow<NS_sprm::SDyaHdrBottom>(),
665 InfoRow<NS_sprm::SLBetween>(),
666 InfoRow<NS_sprm::SVjc>(),
667 InfoRow<NS_sprm::SLnnMin>(),
668 InfoRow<NS_sprm::SPgnStart97>(),
669 InfoRow<NS_sprm::SBOrientation>(),
671 InfoRow<NS_sprm::SXaPage>(),
672 InfoRow<NS_sprm::SYaPage>(),
673 InfoRow<NS_sprm::SDxaLeft>(),
674 InfoRow<NS_sprm::SDxaRight>(),
675 InfoRow<NS_sprm::SDyaTop>(),
676 InfoRow<NS_sprm::SDyaBottom>(),
677 InfoRow<NS_sprm::SDzaGutter>(),
678 InfoRow<NS_sprm::SDmPaperReq>(),
681 InfoRow<NS_sprm::SFBiDi>(),
683 InfoRow<NS_sprm::SFRTLGutter>(),
685 InfoRow<NS_sprm::SBrcTop80>(),
686 InfoRow<NS_sprm::SBrcLeft80>(),
687 InfoRow<NS_sprm::SBrcBottom80>(),
688 InfoRow<NS_sprm::SBrcRight80>(),
689 InfoRow<NS_sprm::SPgbProp>(),
690 InfoRow<NS_sprm::SDxtCharSpace>(),
691 InfoRow<NS_sprm::SDyaLinePitch>(),
693 InfoRow<NS_sprm::SClm>(),
694 InfoRow<NS_sprm::STextFlow>(),
695 InfoRow<NS_sprm::TJc90>(),
697 InfoRow<NS_sprm::TDxaLeft>(),
698 InfoRow<NS_sprm::TDxaGapHalf>(),
700 InfoRow<NS_sprm::TFCantSplit90>(),
701 InfoRow<NS_sprm::TTableHeader>(),
702 InfoRow<NS_sprm::TFCantSplit>(),
703 InfoRow<NS_sprm::TTableBorders80>(),
706 InfoRow<NS_sprm::TDyaRowHeight>(),
708 InfoRow<NS_sprm::TDefTableShd80>(),
709 InfoRow<NS_sprm::TTlp>(),
710 InfoRow<NS_sprm::TFBiDi>(),
712 InfoRow<NS_sprm::TSetBrc80>(),
713 InfoRow<NS_sprm::TInsert>(),
714 InfoRow<NS_sprm::TDelete>(),
715 InfoRow<NS_sprm::TDxaCol>(),
716 InfoRow<NS_sprm::TMerge>(),
717 InfoRow<NS_sprm::TSplit>(),
721 InfoRow<NS_sprm::TTextFlow>(),
725 InfoRow<NS_sprm::TVertMerge>(),
726 InfoRow<NS_sprm::TVertAlign>(),
727 InfoRow<NS_sprm::CFELayout>(),
728 InfoRow<NS_sprm::PItap>(),
729 InfoRow<NS_sprm::TTableWidth>(),
730 InfoRow<NS_sprm::TDefTableShd>(),
731 InfoRow<NS_sprm::TTableBorders>(),
732 InfoRow<NS_sprm::TBrcTopCv>(),
733 InfoRow<NS_sprm::TBrcLeftCv>(),
734 InfoRow<NS_sprm::TBrcBottomCv>(),
735 InfoRow<NS_sprm::TBrcRightCv>(),
736 InfoRow<NS_sprm::TCellPadding>(),
737 InfoRow<NS_sprm::TCellPaddingDefault>(),
738 {0xD238, { 0,
L_VAR} },
739 InfoRow<NS_sprm::PBrcTop>(),
740 InfoRow<NS_sprm::PBrcLeft>(),
741 InfoRow<NS_sprm::PBrcBottom>(),
742 InfoRow<NS_sprm::PBrcRight>(),
743 InfoRow<NS_sprm::PBrcBetween>(),
744 InfoRow<NS_sprm::TWidthIndent>(),
745 InfoRow<NS_sprm::CRgLid0>(),
746 InfoRow<NS_sprm::CRgLid1>(),
747 {0x6463, { 4,
L_FIX} },
748 InfoRow<NS_sprm::PJc>(),
749 InfoRow<NS_sprm::PDxaRight>(),
750 InfoRow<NS_sprm::PDxaLeft>(),
751 InfoRow<NS_sprm::PDxaLeft1>(),
752 InfoRow<NS_sprm::TFAutofit>(),
753 InfoRow<NS_sprm::TPc>(),
754 InfoRow<NS_sprm::SRsid>(),
755 InfoRow<NS_sprm::SFpc>(),
756 InfoRow<NS_sprm::PFInnerTableCell>(),
757 InfoRow<NS_sprm::PFInnerTtp>(),
758 InfoRow<NS_sprm::TDxaAbs>(),
759 InfoRow<NS_sprm::TDyaAbs>(),
760 InfoRow<NS_sprm::TDxaFromText>(),
761 InfoRow<NS_sprm::CRsidProp>(),
762 InfoRow<NS_sprm::CRsidText>(),
763 InfoRow<NS_sprm::CCv>(),
764 InfoRow<NS_sprm::PShd>(),
765 InfoRow<NS_sprm::PRsid>(),
766 InfoRow<NS_sprm::PTableProps>(),
767 InfoRow<NS_sprm::TWidthBefore>(),
768 InfoRow<NS_sprm::TSetShdTable>(),
769 InfoRow<NS_sprm::TDefTableShdRaw>(),
770 InfoRow<NS_sprm::CShd>(),
771 InfoRow<NS_sprm::SRncFtn>(),
772 InfoRow<NS_sprm::PFDyaBeforeAuto>(),
773 InfoRow<NS_sprm::PFDyaAfterAuto>(),
775 InfoRow<NS_sprm::PFContextualSpacing>(),
785 "Impossible value for version");
800 if (pFound !=
nullptr)
806 "Unknown ww7- sprm, dangerous, report to development");
853 const sal_uInt16
n = SVBT16ToUInt16( *
reinterpret_cast<SVBT16*
>(
p) );
865 sal_uInt32
n = SVBT32ToUInt32( *
reinterpret_cast<SVBT32*
>(
p) );
877 : mrSprmParser(rParser), m_pSprms( pSprms_), m_nRemLen( nLen_)
912 SAL_WARN_IF(!bValid,
"sw.ww8",
"sprm longer than remaining bytes, doc or parser is wrong");
937 if ( !pNextByteMatch || (aSprmResult.
nRemainingData >= 1 && *aSprmResult.
pSprm == *pNextByteMatch) )
955 :
WW8PLCFx(rFib, true), m_pPcdI(pPLCFx_PCD->GetPLCFIter()),
956 m_pPcd(pPLCFx_PCD), mrGrpprls(pBase->m_aPieceGrpprls)
987 p->bRealLineEnd =
false;
992 p->pMemPos =
nullptr;
997 const sal_uInt16 nPrm = SVBT16ToUInt16(
static_cast<WW8_PCD*
>(
pData)->prm );
1001 const sal_uInt16 nSprmIdx = nPrm >> 1;
1007 p->pMemPos =
nullptr;
1013 p->nSprmsLen = SVBT16ToUInt16( pSprms );
1015 p->pMemPos = pSprms;
1028 p->nSprmsLen = nPrm ? 2 : 0;
1035 p->pMemPos =
nullptr;
1046 static const sal_uInt16 aSprmId[0x80] =
1049 0x0000,0x0000,0x0000,0x0000,
1056 0x260A,0x0000,0x240C,0x0000,
1058 0x0000,0x0000,0x0000,0x0000,
1060 0x0000,0x0000,0x0000,0x0000,
1062 0x2416,0x2417,0x0000,0x0000,
1064 0x0000,0x261B,0x0000,0x0000,
1066 0x0000,0x0000,0x0000,0x0000,
1068 0x0000,0x2423,0x0000,0x0000,
1070 0x0000,0x0000,0x0000,0x0000,
1072 0x242A,0x0000,0x0000,0x0000,
1074 0x0000,0x0000,0x2430,0x2431,
1077 0x0000,0x2433,0x2434,0x2435,
1080 0x2436,0x2437,0x2438,0x0000,
1084 0x0000,0x0800,0x0801,0x0802,
1086 0x0000,0x0000,0x0000,0x0806,
1088 0x0000,0x0000,0x0000,0x080A,
1090 0x0000,0x2A0C,0x0858,0x2859,
1092 0x0000,0x0000,0x0000,0x2A33,
1094 0x0000,0x0835,0x0836,0x0837,
1096 0x0838,0x0839,0x083a,0x083b,
1098 0x083C,0x0000,0x2A3E,0x0000,
1100 0x0000,0x0000,0x2A42,0x0000,
1104 0x2A48,0x0000,0x0000,0x0000,
1106 0x0000,0x0000,0x0000,0x0000,
1108 0x0000,0x0000,0x0000,0x2A53,
1112 0x2640,0x2441,0x0000,0x0000,
1114 0x0000,0x0000,0x0000,0x0000
1118 const sal_uInt16 nSprmId = aSprmId[ nSprmListIdx ];
1128 p->nSprmsLen = nPrm ? 3 : 0;
1139 WW8_CP nStartCp,
bool bVer67P)
1140 :
WW8PLCFx(rFib, false), m_nClipStart(-1)
1192 OSL_ENSURE(
m_pPcdI ,
"missing pPcdI");
1204 OSL_ENSURE(
false,
"CurrentPieceStartCp2Fc() with false Cp found (1)" );
1208 OSL_ENSURE( nCp >= nCpStart && nCp < nCpEnd,
1209 "AktPieceCp2Fc() with false Cp found (2)" );
1211 if( nCp < nCpStart )
1216 bool bIsUnicode =
false;
1225 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1231 bFail = o3tl::checked_multiply<WW8_CP>(nDistance, 2, nDistance);
1234 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1243 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1257 rStartPos = pSBase->
WW8Fc2Cp( rStartPos );
1258 rEndPos = pSBase->
WW8Fc2Cp( rEndPos );
1267 OSL_ENSURE(
false,
"CurrentPieceStartFc2Cp() - error" );
1270 bool bIsUnicode =
false;
1271 sal_Int32 nFcStart = SVBT32ToUInt32(
static_cast<WW8_PCD*
>(
pData)->fc );
1275 sal_Int32 nUnicodeFactor = bIsUnicode ? 2 : 1;
1277 if( nStartPos < nFcStart )
1278 nStartPos = nFcStart;
1284 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1292 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1300 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1308 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1313 if (nStartPos >= nFcEnd)
1314 nStartPos = nFcEnd - (1 * nUnicodeFactor);
1316 WW8_FC nFcDiff = (nStartPos - nFcStart) / nUnicodeFactor;
1322 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1337 if (_dptLineWidth > 5)
1339 _brcType = _dptLineWidth;
1351 if (brcVer8.
isNil()) {
1352 UInt32ToSVBT32(0,
aBits1);
1353 UInt32ToSVBT32(0xffffffff,
aBits2);
1357 sal_uInt32 _cv = brcVer8.
ico() == 0 ? 0xff000000
1378 short nMSTotalWidth;
1381 nMSTotalWidth =
static_cast<short>(
dptLineWidth()) * 20 / 8;
1392 OSL_FAIL(
"Can't create these from the menus, please report");
1406 if (nMSTotalWidth == 5)
1408 else if (nMSTotalWidth == 10)
1409 nMSTotalWidth = nMSTotalWidth*9/2;
1429 nMSTotalWidth += 45*2;
1434 *pSpace =
static_cast<short>(
dptSpace()) * 20;
1435 return nMSTotalWidth;
1448 return nFallBackCpEnd;
1467 OSL_ENSURE(
false,
"PLCFpcd-WW8Fc2Cp() went wrong" );
1470 sal_Int32 nFcStart = SVBT32ToUInt32(
static_cast<WW8_PCD*
>(
pData)->fc );
1484 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1489 if (o3tl::checked_multiply<WW8_CP>(nLen, 2, nLen))
1491 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1500 if (nFcPos >= nFcStart)
1506 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1514 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1520 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1523 if (nFcPos < nFcEnd)
1528 else if (nFcPos == nFcEnd)
1532 nFallBackCpEnd = nTempCp;
1543 return nFallBackCpEnd;
1549 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1555 nFallBackCpEnd = nFcDiff;
1557 nFallBackCpEnd = (nFcDiff + 1) / 2;
1559 return nFallBackCpEnd;
1567 WW8_CP* pNextPieceCp,
bool* pTestFlag)
const
1576 pIsUnicode = &bIsUnicode;
1579 *pIsUnicode =
false;
1596 OSL_ENSURE(
false,
"Handed over wrong CP to WW8Cp2Fc()" );
1607 OSL_ENSURE(
false,
"PLCFfpcd-Get went wrong" );
1612 *pNextPieceCp = nCpEnd;
1614 nRet = SVBT32ToUInt32(
static_cast<WW8_PCD*
>(
pData)->fc );
1624 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1630 bFail = o3tl::checked_multiply<WW8_CP>(nCpLen, 2, nCpLen);
1633 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1641 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1650 const bool bFail = o3tl::checked_multiply<WW8_CP>(nCpPos, 2, nCpPos);
1653 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1662 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1671 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
1691 sal_Int32 nClxLen = pWwF->
m_lcbClx;
1692 sal_Int32 nLeft = nClxLen;
1712 std::unique_ptr<sal_uInt8[]>
p(
new sal_uInt8[nLen+2]);
1713 ShortToSVBT16(nLen,
p.get());
1728 sal_Int32 nPLCFfLen(0);
1731 sal_Int16 nWordTwoLen(0);
1733 nPLCFfLen = nWordTwoLen;
1737 OSL_ENSURE( 65536 > nPLCFfLen,
"PLCFfpcd above 64 k" );
1738 return std::make_unique<WW8PLCFpcd>( pStr, pStr->
Tell(), nPLCFfLen, 8 );
1849 sal_uInt64
const nOldPos = pTableSt->
Tell();
1857 pTableSt->
Seek(nOldPos);
1862 OSL_ENSURE(
false,
"nVersion not implemented!" );
1970 sal_uInt32 nOldIdx = rPLCF.
GetIdx();
2020 if (o3tl::checked_sub<WW8_CP>(rF.
nLRes, rF.
nSCode, nTmp))
2025 if (o3tl::checked_add<WW8_CP>(nTmp, 2, rF.
nLen))
2031 if (o3tl::checked_add<WW8_CP>(rF.
nSRes, 1, rF.
nSRes))
2040 if (o3tl::checked_sub<WW8_CP>(rF.
nSRes, rF.
nSCode, nTmp))
2045 if (o3tl::checked_add<WW8_CP>(nTmp, 2, rF.
nLen))
2095 if (nCurrentStartCp < 0 || nTotalLen < 0)
2098 WW8_CP nBehindTextCp = nCurrentStartCp + nTotalLen;
2099 WW8_CP nNextPieceCp = nBehindTextCp;
2103 bool bIsUnicode(
false), bPosOk(
false);
2104 WW8_FC fcAct =
WW8Cp2Fc(nCurrentStartCp,&bIsUnicode,&nNextPieceCp,&bPosOk);
2114 WW8_CP nEnd = (nNextPieceCp < nBehindTextCp) ? nNextPieceCp
2129 nCurrentStartCp += nLen;
2130 if ( nTotalRead != rStr.getLength() )
2133 while( nTotalRead < nTotalLen );
2135 return rStr.getLength();
2139 sal_uInt32 nPLCF, sal_uInt32 nStruct)
2140 : m_nIdx(0), m_nStru(nStruct)
2142 const sal_uInt32 nValidMin=4;
2144 sal_uInt64
const nOldPos = pSt->
Tell();
2146 bool bValid =
checkSeek(*pSt, nFilePos);
2148 if( nRemainingSize < nValidMin || nPLCF < nValidMin )
2150 nPLCF = bValid ?
std::min(nRemainingSize,
static_cast<std::size_t
>(nPLCF)) : nValidMin;
2158 nPLCF = std::max(nPLCF, nValidMin);
2160 m_nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
2193 for(
int n = (1==
m_nIdx ? 1 : 2);
n; --
n )
2195 for( ; nI <=nEnd; ++nI)
2227 for(
int n = (0==
m_nIdx ? 1 : 2);
n; --
n )
2229 for( ; nI < nEnd; ++nI)
2265 WW8_CP nStartPos) : m_nIdx(0), m_nStru(nStruct)
2269 SAL_WARN(
"sw.ww8",
"broken WW8PLCF, ignoring");
2273 m_nIMax = (nPLCF - 4) / (4 + nStruct);
2277 if( nStartPos >= 0 )
2287 WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN): m_nIdx(0),
2292 SAL_WARN(
"sw.ww8",
"broken WW8PLCF, ignoring");
2296 m_nIMax = (nPLCF - 4) / (4 + nStruct);
2303 if( nStartPos >= 0 )
2309 sal_uInt64
const nOldPos = rSt.
Tell();
2310 bool bValid = nPLCF != 0 &&
checkSeek(rSt, nFilePos)
2316 const size_t nEntries = (nPLCF + 3) / 4;
2319 size_t nBytesAllocated = nEntries *
sizeof(
WW8_CP);
2320 if (bValid && nPLCF != nBytesAllocated)
2323 memset(pStartBlock + nPLCF, 0, nBytesAllocated - nPLCF);
2340 OSL_ENSURE(bValid,
"Document has corrupt PLCF, ignoring it");
2358 sal_Int32 TruncToSortedRange(
const sal_Int32* pPLCF_PosArray, sal_Int32 nIMax)
2362 for (
auto nI = 0; nI < nIMax; ++nI)
2364 if (pPLCF_PosArray[nI] > pPLCF_PosArray[nI+1])
2366 SAL_WARN(
"sw.ww8",
"Document has unsorted PLCF, truncated to sorted portion");
2387 OSL_ENSURE(
m_nIMax < ncpN,
"Pcl.Fkp: Why is PLCF too big?" );
2389 bool failure =
false;
2405 size_t nElems = ( nSiz + 3 ) / 4;
2408 for (sal_Int32
i = 0;
i < ncpN && !failure; ++
i)
2430 std::size_t nLastFkpPos = nPN +
m_nIMax - 1;
2431 nLastFkpPos = nLastFkpPos << 9;
2439 if (!
checkSeek(rSt, nLastFkpPos + nb * 4))
2456 for (sal_Int32
i = 0;
i < ncpN; ++
i)
2458 ShortToSVBT16(o3tl::narrowing<sal_uInt16>(nPN +
i),
p);
2463 SAL_WARN_IF(failure,
"sw.ww8",
"Document has corrupt PLCF, ignoring it");
2487 for(
int n = (1==
m_nIdx ? 1 : 2);
n; --
n )
2489 for( ; nI <=nEnd; ++nI)
2527 sal_uInt32 nPLCF, sal_uInt32 nStruct)
2528 : m_nStru( nStruct )
2530 const sal_uInt32 nValidMin=4;
2532 sal_uInt64
const nOldPos = pSt->
Tell();
2534 bool bValid =
checkSeek(*pSt, nFilePos);
2536 if( nRemainingSize < nValidMin || nPLCF < nValidMin )
2538 nPLCF = bValid ?
std::min(nRemainingSize,
static_cast<std::size_t
>(nPLCF)) : nValidMin;
2544 nPLCF = std::max(nPLCF, nValidMin);
2546 m_nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
2556 pSt->
Seek( nOldPos );
2561 :m_rPLCF( rPLCFpcd ), m_nIdx( 0 )
2563 if( nStartPos >= 0 )
2583 for(
int n = (1==
m_nIdx ? 1 : 2);
n; --
n )
2585 for( ; nI <=nEnd; ++nI)
2621bool WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator<
2624 return (mnFC < rSecond.mnFC);
2634 return 0x646B == nSpId;
2638 std::size_t nDataOffset, sal_uInt16 nLen)
2640 bool bValidPos = (nDataOffset <
sizeof(
maRawData));
2642 OSL_ENSURE(bValidPos,
"sprm sequence offset is out of range, ignoring");
2650 const sal_uInt16 nAvailableData =
sizeof(
maRawData)-nDataOffset;
2651 OSL_ENSURE(nLen <= nAvailableData,
"sprm sequence len is out of range, clipping");
2659 : m_nItemSize(nItemSiz), m_nFilePos(_nFilePos),
mnIdx(0),
m_ePLCF(ePl)
2660 , mnMustRemainCached(0), maSprmParser(rFib)
2666 sal_uInt64
const nOldPos = pSt->
Tell();
2675 const size_t nRawDataStart = (
mnIMax + 1) * 4;
2682 if (nRawDataOffset >= 511)
2688 unsigned int nOfs =
maRawData[nRawDataOffset] * 2;
2702 std::size_t nDataOffset = nOfs + 1;
2709 std::vector<sal_uInt8> aSprms =
ChpxToSprms(aChpx);
2710 aEntry.
mnLen =
static_cast< sal_uInt16
>(aSprms.size());
2714 memcpy(aEntry.
mpData, aSprms.data(), aEntry.
mnLen);
2735 if (aEntry.
mnLen >= 1)
2739 if (aEntry.
mnLen >= 6)
2743 unsigned int nOffset = nOfs + 8;
2748 if (nOffset + aEntry.
mnLen > 512)
2749 aEntry.
mnLen = 512 - nOffset;
2759 if (aEntry.
mnLen >= 2)
2762 std::size_t nDataOffset = nOfs + 1 + nDelta;
2764 SVBT16ToUInt16(
maRawData+nDataOffset) : 0;
2769 nDataOffset +=
sizeof(aEntry.
mnIStd);
2778 const sal_uInt16 nSpId = aEntry.
mnLen
2788 = aEntry.
mpData ==
nullptr ? nullptr : aEntry.
mpData + 2;
2790 if (pStartData !=
nullptr && pStartData > pLastValidDataPos)
2791 pStartData =
nullptr;
2794 sal_uInt32 nCurr = pDataSt->
Tell();
2795 sal_uInt32
nPos = SVBT32ToUInt32(pStartData);
2807 const sal_uInt16 nOrigLen = bExpand ? aEntry.
mnLen : 0;
2810 aEntry.
mnLen = nLen;
2817 pDataSt->
Seek( nCurr );
2822 pOrigData, nOrigLen);
2830 OSL_FAIL(
"sweet god, what have you done!");
2837#ifdef DEBUGSPRMREADER
2866 : mnFC(rEntry.mnFC), mnLen(rEntry.mnLen), mnIStd(rEntry.mnIStd),
2867 mbMustDelete(rEntry.mbMustDelete)
2881 if (
this == &rEntry)
2888 mnLen = rEntry.
mnLen;
2895 memcpy(mpData, rEntry.
mpData, mnLen);
2933 for( ; nI <=nEnd; ++nI)
2993 std::vector<SprmResult> &rResult)
3022 OSL_ENSURE(
false,
"Called wrong GetSprms" );
3024 p->pMemPos =
nullptr;
3026 p->bRealLineEnd =
false;
3031 OSL_ENSURE(
false,
"Called wrong GetNoSprms" );
3055 bool operator()(
const std::unique_ptr<WW8PLCFx_Fc_FKP::WW8Fkp>& pFkp)
3056 {
return mnPo == pFkp->GetFilePos();}
3063 WW8_CP nPLCFStart, nPLCFEnd;
3066 static const int WW8FkpSizeTabVer2[
PLCF_END ] =
3070 static const int WW8FkpSizeTabVer6[
PLCF_END ] =
3074 static const int WW8FkpSizeTabVer8[
PLCF_END ] =
3078 const int* pFkpSizeTab;
3084 pFkpSizeTab = WW8FkpSizeTabVer2;
3088 pFkpSizeTab = WW8FkpSizeTabVer6;
3091 pFkpSizeTab = WW8FkpSizeTabVer8;
3095 OSL_ENSURE(
false,
"nVersion not implemented!" );
3099 if (!
m_pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ))
3109 if (nCurrentFkpFilePos == nPo)
3169 sal_uInt32
u =
m_pPLCF->GetIdx() << 8;
3177 if( !( nIdx & 0xffffff00L ) )
3185 m_pPLCF->SetIdx( ( nIdx >> 8 ) - 1 );
3200 bool bRet =
m_pPLCF->SeekPos(nFcPos);
3203 WW8_CP nPLCFStart, nPLCFEnd;
3272 OSL_FAIL(
"+Problem: GetPCDSprms: NewFkp necessary (not possible!)" );
3285 OSL_FAIL(
"+Motz: HasSprm: NewFkp needed ( no const possible )" );
3317 OSL_FAIL(
"+Motz: HasSprm: NewFkp needed ( no const possible )" );
3351 rBase.WW8Cp2Fc(0)), m_rSBase(rBase), m_nAttrStart(-1), m_nAttrEnd(-1),
3353 m_bComplex( (7 < rBase.m_pWw8Fib->m_nVersion) || rBase.m_pWw8Fib->m_fComplex )
3395 if( !
m_pPcd->SeekPos( nCpPos ) )
3409 return m_pPcd->CurrentPieceStartFc2Cp( nFc );
3415 WW8_CP nOrigCp =
p->nStartPos;
3453 bool bIsUnicode=
false;
3465 p->nStartPos = nOrigCp;
3479 WW8_FC nOldEndPos =
p->nEndPos;
3487 void*
pData=
nullptr;
3497 WW8_FC nBeginLimitFC = nLimitFC;
3509 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3517 bFail = o3tl::checked_multiply<WW8_CP>(nCpLen, 2, nCpLen);
3520 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3530 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3536 if (nOldEndPos <= nLimitFC)
3541 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3547 nCpLen /= (bIsUnicode ? 2 : 1);
3552 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3560 p->nEndPos = nCpEnd;
3588 OSL_ENSURE(
false,
"piece iter broken!" );
3592 sal_Int32 nFcStart=SVBT32ToUInt32(
static_cast<WW8_PCD*
>(
pData)->fc);
3598 nFcStart,bIsUnicode );
3604 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3611 bFail = o3tl::checked_multiply<WW8_CP>(nCpLen, 2, nCpLen);
3614 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3623 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3634 nSmallest,
p->nSprmsLen);
3636 if (nSmallest <= nLimitFC)
3642 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3653 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3658 OSL_ENSURE(nEndPos >=
p->nStartPos,
"EndPos before StartPos");
3660 if (nEndPos >=
p->nStartPos)
3661 p->nEndPos = nEndPos;
3711 :
WW8PLCFx(rFib, true), maSprmParser(rFib),
3712 m_pStrm(pSt), m_nArrMax(256), m_nSprmSiz(0)
3751 p->bRealLineEnd =
false;
3755 p->pMemPos =
nullptr;
3760 sal_uInt32 nPo = SVBT32ToUInt32(
static_cast<sal_uInt8*
>(
pData)+2 );
3764 p->pMemPos =
nullptr;
3827 bool bFound =
false;
3837 bool bValid =
x <= nRemLen;
3840 SAL_WARN(
"sw.ww8",
"sprm longer than remaining bytes, doc or parser is wrong");
3844 if( nCurrentId == nId1 )
3849 else if( nCurrentId == nId2 )
3854 else if( nCurrentId == nId3 )
3859 else if( nCurrentId == nId4 )
3890 if( nLenRef && nLenText )
3892 m_pRef.reset(
new WW8PLCF(*pSt, nFcRef, nLenRef, nStruct, nStartCp));
3893 m_pText.reset(
new WW8PLCF(*pSt, nFcText, nLenText, 0, nStartCp));
3915 m_pRef->SetIdx( nIdx >> 16 );
3917 m_pText->SetIdx( nIdx & 0xFFFF );
3934 p->pMemPos =
nullptr;
3936 p->bRealLineEnd =
false;
3941 sal_uInt32 nNr =
m_pRef->GetIdx();
3951 if (o3tl::checked_add<WW8_CP>(
p->nStartPos, 1,
p->nEndPos))
3953 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
3970 if (
p->nCp2OrIdx < 0 ||
p->nCp2OrIdx >
p->nSprmsLen)
3972 SAL_WARN(
"sw.ww8",
"Document has invalid Cp or Idx, ignoring it");
3978 p->nSprmsLen -=
p->nCp2OrIdx;
3992 :
WW8PLCFx(rMyFib, true), m_rFib(rMyFib)
4092 p->pMemPos =
nullptr;
4094 p->bRealLineEnd =
false;
4153 sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<OUString> &rArray,
4154 std::vector<ww::bytes>* pExtraArray, std::vector<OUString>* pValueArray)
4159 sal_uInt64
const nOldPos =
rStrm.
Tell();
4162 sal_uInt16 nLen2(0);
4168 sal_uInt16 nStrings(0);
4169 bool bUnicode = (0xFFFF == nLen2);
4177 const size_t nMinStringLen = bUnicode ?
sizeof(sal_uInt16) :
sizeof(
sal_uInt8);
4178 const size_t nMinRecordSize = nExtraLen + nMinStringLen;
4179 assert(nMinRecordSize != 0 &&
"impossible to be zero");
4181 if (nStrings > nMaxPossibleStrings)
4183 SAL_WARN(
"sw.ww8",
"STTBF claims " << nStrings <<
" entries, but only " << nMaxPossibleStrings <<
" are possible");
4184 nStrings = nMaxPossibleStrings;
4187 if (nExtraLen && nStrings)
4189 const size_t nMaxExtraLen = (
rStrm.
remainingSize() - (nStrings * nMinStringLen)) / nStrings;
4190 if (nExtraLen > nMaxExtraLen)
4192 SAL_WARN(
"sw.ww8",
"STTBF claims " << nMaxExtraLen <<
" extra len, but only " << nMaxExtraLen <<
" are possible");
4193 nExtraLen = nMaxExtraLen;
4197 for (sal_uInt16
i=0;
i < nStrings; ++
i)
4204 rArray.push_back(OStringToOUString(aTmp, eCS));
4214 pExtraArray->push_back(extraData);
4223 for (sal_uInt16
i=0;
i < nStrings; ++
i)
4230 pValueArray->push_back(OStringToOUString(aTmp, eCS));
4239 OSL_ENSURE(nLen2 == nLen,
4240 "Fib length and read length are different");
4245 nLen2 = o3tl::narrowing<sal_uInt16>(nLen);
4248 for( nLen2 -= 2; nRead < nLen2; )
4256 nRead += aTmp.getLength();
4257 rArray.push_back(OStringToOUString(aTmp, eCS));
4260 rArray.emplace_back();
4270 pExtraArray->push_back(extraData);
4283 :
WW8PLCFx(rFib, false), m_nIsEnd(0), m_nBookmarkId(1)
4335 m_pBook[1]->SetIdx( nI & 0x7fffffff );
4336 m_nIsEnd = o3tl::narrowing<sal_uInt16>( ( nI >> 31 ) & 1 );
4345 bool bOk =
m_pBook[0]->SeekPosExact( nCpPos );
4346 bOk &=
m_pBook[1]->SeekPosExact( nCpPos );
4402 tools::Long nPairFor = (
p ==
nullptr) ? 0 : SVBT16ToUInt16(*
static_cast<SVBT16 const *
>(
p));
4414 OSL_ENSURE(
false,
"Incorrect call (1) of PLCF_Book::GetLen()" );
4421 OSL_ENSURE(
false,
"Incorrect call (2) of PLCF_Book::GetLen()" );
4424 const sal_uInt16 nEndIdx = SVBT16ToUInt16( *
static_cast<SVBT16*
>(
p) );
4433 "bookmark index " <<
nIndex <<
" invalid");
4456 return SVBT16ToUInt16( *
static_cast<SVBT16 const *
>(
p) );
4464 bool bFound =
false;
4468 WW8_CP nStartCurrent, nEndCurrent;
4475 nEndIdx = SVBT16ToUInt16( *
static_cast<SVBT16*
>(
p) );
4478 OSL_ENSURE(
false,
"Bookmark-EndIdx not readable" );
4482 nEndCurrent =
m_pBook[1]->GetPos( nEndIdx );
4484 if ((nStartCurrent >= nStart) && (nEndCurrent <= nEnd))
4498 OUString aRet(rSuggestedName.isEmpty() ? OUString(
"Unnamed") : rSuggestedName);
4504 sal_Int32 len = aRet.getLength();
4505 sal_Int32
p = len - 1;
4506 while (
p > 0 && aRet[
p] >=
'0' && aRet[
p] <=
'9')
4536 const OUString *pRet =
nullptr;
4588 m_pBook[1]->SetIdx( nI & 0x7fffffff );
4589 m_bIsEnd =
static_cast<bool>(( nI >> 31 ) & 1);
4598 bool bOk =
m_pBook[0]->SeekPosExact(nCpPos);
4599 bOk &=
m_pBook[1]->SeekPosExact(nCpPos);
4642 tools::Long nPairFor = (
p ==
nullptr) ? 0 : SVBT16ToUInt16(*
static_cast<SVBT16 const *
>(
p));
4660 return SVBT16ToUInt16(*
static_cast<const SVBT16*
>(
p));
4717 m_pBook[1]->SetIdx(nI & 0x7fffffff);
4718 m_bIsEnd =
static_cast<bool>((nI >> 31) & 1);
4727 bool bOk =
m_pBook[0]->SeekPosExact(nCpPos);
4728 bOk &=
m_pBook[1]->SeekPosExact(nCpPos);
4771 tools::Long nPairFor = (
p ==
nullptr) ? 0 : SVBT16ToUInt16(*
static_cast<SVBT16 const *
>(
p));
4789 return SVBT16ToUInt16(*
static_cast<const SVBT16*
>(
p));
4813 SAL_WARN(
"sw.ww8",
"WW8PLCFxDesc End same as Start, abandoning to avoid looping");
4846 else if (&rDesc ==
m_pSep)
4876 SAL_WARN(
"sw.ww8",
"broken subdocument piece entry");
4927 bool bDoingDrawTextBox)
4928 : maSprmParser(*pBase->m_pWw8Fib),
4930 mbDoingDrawTextBox(bDoingDrawTextBox)
5061 p->bFirstSprm =
false;
5062 p->xIdStack.reset();
5065 p->nStartPos =
p->nEndPos = nStartCp;
5080 if(
p->pPLCFx->IsSprm() )
5083 p->xIdStack.emplace();
5086 WW8_CP nTemp =
p->nEndPos+
p->nCpOfs;
5087 p->pMemPos =
nullptr;
5089 p->nStartPos = nTemp;
5090 if (!(*
p->pPLCFx).SeekPos(
p->nStartPos))
5098 else if(
p->pPLCFx )
5106 m_aD[
i].xIdStack.reset();
5114 OSL_ENSURE(
m_nPLCF,
"What the hell");
5116 sal_uInt16 nNextIdx =
m_nPLCF;
5197 bool IsSizeLegal(
tools::Long nSprmLen, sal_Int32 nSprmsLen)
5199 if (nSprmLen > nSprmsLen)
5201 SAL_WARN(
"sw.ww8",
"Short sprm, len " << nSprmLen <<
" claimed, max possible is " << nSprmsLen);
5217 bRet = nSprmId >= 112 && nSprmId <= 145;
5232 auto nSGC = ((nSprmId & 0x1C00) >> 10);
5236 SAL_INFO(
"sw.ww8",
"sprm, id " << nSprmId <<
" wrong category for section properties");
5280 if (!(
p->xIdStack->empty()))
5281 pRes->
nSprmId =
p->xIdStack->top();
5284 OSL_ENSURE(
false,
"No Id on the Stack" );
5346 if (!
p || !
p->xIdStack)
5348 while (!
p->xIdStack->empty())
5350 rStack.push(
p->xIdStack->top());
5360 p->bFirstSprm =
false;
5363 const sal_uInt16 nLastId =
GetId(
p);
5367 p->xIdStack->push(nLastAttribStarted);
5379 p->nSprmsLen -= nSprmL;
5385 p->pMemPos =
nullptr;
5389 p->pMemPos += nSprmL;
5399 if (!(
p->xIdStack->empty()))
5401 if (
p->xIdStack->empty())
5405 p->pMemPos =
nullptr;
5407 p->nStartPos =
p->nOrigEndPos+
p->nCpOfs;
5415 if (!(*
p->pPLCFx).SeekPos(
p->nStartPos))
5418 p->pPLCFx->SetDirty(
true);
5420 if (!
p->pPLCFx->GetDirty() ||
m_pPcd)
5422 p->pPLCFx->SetDirty(
false);
5459 p->pPLCFx->advance();
5460 p->pMemPos =
nullptr;
5465 "End " <<
p->nEndPos <<
" before Start " <<
p->nStartPos);
5487 if (
m_aD[nIdx+1].xIdStack->empty())
5498 p->pPLCFx->advance();
5499 p->pMemPos =
nullptr;
5519 p->pPLCFx->advance();
5520 p->pMemPos =
nullptr;
5529 const sal_uInt16 nIdx =
WhereIdx(&bStart);
5534 p->bFirstSprm =
true;
5536 if(
p->pPLCFx->IsSprm() )
5550 const sal_uInt16 nIdx =
WhereIdx(&bStart);
5554 OSL_ENSURE(
false,
"Position not found" );
5558 if(
m_aD[nIdx].pPLCFx->IsSprm() )
5592 OSL_ENSURE(
false,
"GetColl without PLCF_Pap" );
5613 std::vector<SprmResult> &rResult)
const
5715 SAL_WARN(
"sw.ww8",
"restored properties don't match saved properties, bailing out");
5732 sal_uInt16 nShort(0);
5738 sal_uInt32 nLong(0);
5747 assert(cp !=
nullptr);
5759 if (m_ccpEdn < 0 || m_ccpEdn > std::numeric_limits<WW8_CP>::max() - nOffset) {
5765 if (m_ccpAtn < 0 || m_ccpAtn > std::numeric_limits<WW8_CP>::max() - nOffset) {
5771 if (m_ccpMcr < 0 || m_ccpMcr > std::numeric_limits<WW8_CP>::max() - nOffset) {
5784 if (m_ccpHdr < 0 || m_ccpHdr > std::numeric_limits<WW8_CP>::max() - nOffset) {
5790 if (m_ccpFootnote < 0 || m_ccpFootnote > std::numeric_limits<WW8_CP>::max() - nOffset) {
5796 if (m_ccpText < 0 || m_ccpText > std::numeric_limits<WW8_CP>::max() - nOffset) {
5854 m_fDot(false), m_fGlsy(false), m_fComplex(false), m_fHasPic(false), m_cQuickSaves(0),
5855 m_fEncrypted(false), m_fWhichTableStm(false), m_fReadOnlyRecommended(false),
5856 m_fWriteReservation(false), m_fExtChar(false), m_fFarEast(false), m_fObfuscated(false),
5857 m_fMac(false), m_fEmptySpecial(false), m_fLoadOverridePage(false), m_fFuturesavedUndo(false),
5858 m_fWord97Saved(false), m_fWord2000Saved(false)
5863 rSt.
Seek( nOffset );
5898 OSL_ENSURE(
false,
"nVersion not implemented!" );
5911 sal_Int16 pnChpFirst_Ver67=0;
5912 sal_Int16 pnPapFirst_Ver67=0;
5913 sal_Int16 cpnBteChp_Ver67=0;
5914 sal_Int16 cpnBtePap_Ver67=0;
5917 sal_uInt16 nTmpLid = 0;
5954 rSt.
SeekRel( 9 *
sizeof( sal_Int16 ) );
5968 sal_uInt16 nTmpFE = 0;
5980 rSt.
SeekRel( 2 *
sizeof( sal_Int32) );
5984 rSt.
SeekRel( 2 *
sizeof( sal_Int32) );
5997 rSt.
SeekRel( 1 *
sizeof( sal_Int32) );
6116 rSt.
SeekRel(1*
sizeof(sal_Int32));
6117 rSt.
SeekRel(1*
sizeof(sal_Int16));
6185 m_fGlsy = ( aBits1 & 0x02 ) >> 1;
6211 m_fMac = aVer8Bits1 & 0x01 ;
6223 sal_uInt64 nOldPos = rSt.
Tell();
6281 rSt.
Seek( nOldPos );
6291 m_nVersion(nVer), m_fDot(false), m_fGlsy(false), m_fComplex(false), m_fHasPic(false), m_cQuickSaves(0),
6292 m_fEncrypted(false), m_fWhichTableStm(false), m_fReadOnlyRecommended(false),
6293 m_fWriteReservation(false), m_fExtChar(false), m_fFarEast(false), m_fObfuscated(false),
6294 m_fMac(false), m_fEmptySpecial(false), m_fLoadOverridePage(false), m_fFuturesavedUndo(false),
6295 m_fWord97Saved(false), m_fWord2000Saved(false)
6352 size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
6353 std::unique_ptr<sal_uInt8[]> pDataPtr(
new sal_uInt8[ nUnencryptedHdr ] );
6355 memset(
pData, 0, nUnencryptedHdr );
6365 sal_uInt16 nBits16 = 0;
6366 if(
m_fDot ) nBits16 |= 0x0001;
6367 if(
m_fGlsy) nBits16 |= 0x0002;
6392 if(
m_fMac ) nBits8 |= 0x0001;
6417 pData += 9 *
sizeof( sal_Int16 );
6436 size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
6438 std::unique_ptr<sal_uInt8[]> pDataPtr(
new sal_uInt8[
m_fcMin - nUnencryptedHdr ] );
6445 pData += 2 *
sizeof( sal_Int32);
6449 pData += 2 *
sizeof( sal_Int32);
6462 pData += 1 *
sizeof( sal_Int32);
6563 pData += 1*
sizeof( sal_Int16);
6619 pData += 0x2da - 0x27a;
6631 pData += 0x372 - 0x302;
6635 pData += 0x382 - 0x37A;
6639 pData += 0x3FA - 0x38A;
6643 pData += 0x41A - 0x3FE;
6647 pData += 0x42a - 0x422;
6653 pData += 0x442 - 0x43A;
6659 pData += 0x4BA - 0x452;
6663 pData += 0x4DA - 0x4c2;
6673 OSL_ENSURE(chs <= 0x100,
"overflowed winword charset set");
6675 return RTL_TEXTENCODING_APPLE_ROMAN;
6676 if (chs == 0 &&
static_cast<sal_uInt16
>(nLidLocale) >= 999)
6687 return rtl_getTextEncodingFromWindowsCharset(
static_cast<sal_uInt8>(chs));
6703 sal_uInt16 nCch = nBuf & 0x7fff;
6704 bool bAnsiString = (nBuf & (1 << 15)) >> 15;
6715 sal_uInt16 nBuf = 0;
6716 nBuf |= sal_Int32(aString.size());
6725 sal_uInt32 cbFactoid(0);
6749 sal_uInt32 cFactoidType(0);
6751 for (sal_uInt32
i = 0;
i < cFactoidType && rStream.
good(); ++
i)
6754 aFactoidType.
Read(rStream);
6757 sal_uInt16 cbHdr(0);
6759 SAL_WARN_IF(cbHdr != 0xc,
"sw.ww8",
"MSOPropertyBagStore::Read: unexpected cbHdr");
6762 SAL_WARN_IF(nVer != 0x0100,
"sw.ww8",
"MSOPropertyBagStore::Read: unexpected nVer");
6764 sal_uInt32 nCste(0);
6768 const size_t nMaxPossibleRecords = rStream.
remainingSize() /
sizeof(sal_uInt16);
6769 if (nCste > nMaxPossibleRecords)
6771 SAL_WARN(
"sw.ww8", nCste <<
" records claimed, but max possible is " << nMaxPossibleRecords);
6772 nCste = nMaxPossibleRecords;
6775 for (sal_uInt32
i = 0;
i < nCste; ++
i)
6787 rType.Write(rExport);
6822 sal_uInt16 cProp(0);
6824 if (!rStream.
good())
6828 const size_t nMaxPossibleRecords = rStream.
remainingSize() / 8;
6829 if (cProp > nMaxPossibleRecords)
6831 SAL_WARN(
"sw.ww8", cProp <<
" records claimed, but max possible is " << nMaxPossibleRecords);
6832 cProp = nMaxPossibleRecords;
6834 for (sal_uInt16
i = 0;
i < cProp && rStream.
good(); ++
i)
6837 aProperty.
Read(rStream);
6840 return rStream.
good();
6850 rProperty.Write(rStream);
6855 sal_uInt64 nOldPosition = rStream.
Tell();
6860 while (rStream.
good() && rStream.
Tell() < fcFactoidData + lcbFactoidData)
6863 if (!aPropertyBag.
Read(rStream))
6868 rStream.
Seek(nOldPosition);
6875 rPropertyBag.Write(rExport);
6879 : m_rFib(rFibPara), m_rStream(rStream), m_cstd(0), m_cbSTDBaseInFile(0), m_fStdStylenamesWritten(0)
6880 , m_stiMaxWhenSaved(0), m_istdMaxFixedWhenSaved(0), m_nVerBuiltInNamesWhenSaved(0)
6881 , m_ftcAsci(0), m_ftcFE(0), m_ftcOther(0), m_ftcBi(0)
6886 sal_uInt16 cbStshi = 0;
6888 const sal_uInt32 nMinValidStshi = 4;
6898 cbStshi = nMinValidStshi;
6901 if (nRemaining <
sizeof(cbStshi))
6909 cbStshi =
std::min(
static_cast<sal_uInt32
>(cbStshi), nRemaining);
6910 if (cbStshi < nMinValidStshi)
6913 const sal_uInt16 nRead = cbStshi;
6920 if( 6 > nRead )
break;
6926 if( 8 > nRead )
break;
6929 if( 10 > nRead )
break;
6932 if( 12 > nRead )
break;
6935 if( 14 > nRead )
break;
6938 if( 16 > nRead )
break;
6941 if ( 18 > nRead )
break;
6946 if ( 20 > nRead )
break;
6956 nRemaining -= cbStshi;
6960 const sal_uInt32 nMinRecordSize =
sizeof(sal_uInt16);
6961 const sal_uInt16 nMaxPossibleRecords = nRemaining/nMinRecordSize;
6963 OSL_ENSURE(
m_cstd <= nMaxPossibleRecords,
6964 "allegedly more styles that available data");
6980 std::unique_ptr<WW8_STD> pStd;
6982 sal_uInt16 cbStd(0);
6992 memset( pStd.get(), 0,
sizeof( *pStd ) );
6996 if( 2 > nRead )
break;
6998 sal_uInt16 a16Bit = 0;
7000 pStd->sti = a16Bit & 0x0fff ;
7001 pStd->fScratch = sal_uInt16(0 != ( a16Bit & 0x1000 ));
7002 pStd->fInvalHeight = sal_uInt16(0 != ( a16Bit & 0x2000 ));
7003 pStd->fHasUpe = sal_uInt16(0 != ( a16Bit & 0x4000 ));
7004 pStd->fMassCopy = sal_uInt16(0 != ( a16Bit & 0x8000 ));
7006 if( 4 > nRead )
break;
7009 pStd->sgc = a16Bit & 0x000f ;
7010 pStd->istdBase = ( a16Bit & 0xfff0 ) >> 4;
7012 if( 6 > nRead )
break;
7015 pStd->cupx = a16Bit & 0x000f ;
7016 pStd->istdNext = ( a16Bit & 0xfff0 ) >> 4;
7018 if( 8 > nRead )
break;
7022 if(10 > nRead )
break;
7025 pStd->fAutoRedef = a16Bit & 0x0001 ;
7026 pStd->fHidden = ( a16Bit & 0x0002 ) >> 1;
7065 sal_Int32 nLenStringBytes = 0;
7073 nLenStringBytes = pString->getLength() + 2;
7081 nLenStringBytes = (pString->getLength() + 2) * 2;
7097 nLenStringBytes = pString->getLength() + 2;
7101 OSL_ENSURE(
false,
"It was forgotten to code nVersion!");
7104 if (nLenStringBytes > rSkip)
7106 SAL_WARN(
"sw.ww8",
"WW8Style structure corrupt");
7107 nLenStringBytes = rSkip;
7109 rSkip -= nLenStringBytes;
7118const sal_uInt16 maxStrSize = 65;
7124 char szFfn[maxStrSize];
7146 OUStringBuffer
aBuf(sString);
7147 const sal_Int32 nLen =
aBuf.getLength();
7148 bool bFound =
false;
7149 for ( sal_Int32
n = 0;
n < nLen; ++
n )
7151 if (
aBuf[
n] < 0x20 )
7157 sString =
aBuf.makeStringAndClear();
7168 sal_uInt16 calcMaxFonts(
sal_uInt8 *p, sal_Int32 nFFn)
7171 sal_uInt16 nMax = 0;
7172 sal_Int32 nRemaining = nFFn;
7177 const sal_uInt16 cbFfnM1 = *
p++;
7180 if (cbFfnM1 > nRemaining)
7184 nRemaining -= cbFfnM1;
7190 template<
typename T>
bool readU8(
7195 assert(value !=
nullptr);
7208 assert(value !=
nullptr);
7210 ||
static_cast<std::size_t
>(pEnd - p) - offset < 2)
7214 *
value = unsigned(p[offset]) + (unsigned(p[offset + 1]) << 8);
7218 sal_Int32 getStringLengthWithMax(
7219 sal_uInt8 const * p, std::size_t offset,
sal_uInt8 const * pEnd, std::size_t maxchars)
7222 assert(pEnd - p <= SAL_MAX_INT32);
7226 std::size_t nbytes =
static_cast<std::size_t
>(pEnd -
p) - offset;
7227 std::size_t nsearch =
std::min(nbytes, maxchars + 1);
7228 void const * p2 = std::memchr(p + offset, 0, nsearch);
7229 if (p2 ==
nullptr) {
7232 return static_cast<sal_uInt8 const *
>(p2) - (p + offset);
7242 OSL_ENSURE(
false,
"font table is broken! (rFib.lcbSttbfffn < 2)" );
7254 SAL_WARN(
"sw.ww8",
"FFN structure longer than available data");
7255 nFFn = nMaxPossible;
7259 std::vector<sal_uInt8> aA(nFFn);
7260 memset(aA.data(), 0, nFFn);
7278 sal_uInt8 *
const pEnd = aA.data() + nFFn;
7279 const sal_uInt16 nCalcMax = calcMaxFonts(aA.data(), nFFn);
7300 for(;
i<nMax; ++
i, ++
p)
7304 &
p->aFFNBase.cbFfnM1))
7309 p->aFFNBase.prg = 0;
7310 p->aFFNBase.fTrueType = 0;
7313 if (!(readU8(pVer2, 1, pEnd, &
p->aFFNBase.wWeight)
7314 && readU8(pVer2, 2, pEnd, &
p->aFFNBase.chs)))
7324 if ((eEnc == RTL_TEXTENCODING_SYMBOL) || (eEnc == RTL_TEXTENCODING_DONTKNOW))
7325 eEnc = RTL_TEXTENCODING_MS_1252;
7327 const size_t nStringOffset = 1 + 2;
7328 sal_Int32
n = getStringLengthWithMax(pVer2, nStringOffset, pEnd, maxStrSize);
7332 p->sFontname = OUString(
7333 reinterpret_cast<char const *
>(pVer2 + nStringOffset),
n, eEnc);
7334 pVer2 = pVer2 +
p->aFFNBase.cbFfnM1 + 1;
7342 for(;
i<nMax; ++
i, ++
p)
7346 &
p->aFFNBase.cbFfnM1))
7351 if (!readU8(pVer6, 1, pEnd, &c2)) {
7355 p->aFFNBase.prg = c2 & 0x02;
7356 p->aFFNBase.fTrueType = (c2 & 0x04) >> 2;
7358 p->aFFNBase.ff = (c2 & 0x70) >> 4;
7362 &
p->aFFNBase.wWeight)
7367 &
p->aFFNBase.ibszAlt)))
7377 if ((eEnc == RTL_TEXTENCODING_SYMBOL) || (eEnc == RTL_TEXTENCODING_DONTKNOW))
7378 eEnc = RTL_TEXTENCODING_MS_1252;
7379 const size_t nStringOffset = offsetof(WW8_FFN_Ver6, szFfn);
7380 sal_Int32
n = getStringLengthWithMax(pVer6, nStringOffset, pEnd, maxStrSize);
7384 p->sFontname = OUString(
reinterpret_cast<char const*
>(pVer6 + nStringOffset),
n, eEnc);
7385 if (
p->aFFNBase.ibszAlt &&
p->aFFNBase.ibszAlt < maxStrSize)
7387 const size_t nAltStringOffset = offsetof(WW8_FFN_Ver6, szFfn) +
p->aFFNBase.ibszAlt;
7388 n = getStringLengthWithMax(pVer6, nAltStringOffset, pEnd, maxStrSize);
7392 p->sFontname +=
";" + OUString(
reinterpret_cast<char const*
>(pVer6 + nAltStringOffset),
7400 &&
p->sFontname!=
"Symbol"
7403 p->sFontname +=
";Symbol";
7406 pVer6 = pVer6 +
p->aFFNBase.cbFfnM1 + 1;
7414 sal_uInt16 nValidFonts = 0;
7415 sal_Int32 nRemainingFFn = nFFn;
7417 for (sal_uInt16
i=0;
i < nMax && nRemainingFFn; ++
i, ++
p)
7424 if (cbFfnM1 > nRemainingFFn)
7427 if (cbFfnM1 < cbMinFFNPayload)
7430 p->aFFNBase.cbFfnM1 = cbFfnM1;
7437 p->aFFNBase.prg = c2 & 0x02;
7438 p->aFFNBase.fTrueType = (c2 & 0x04) >> 2;
7440 p->aFFNBase.ff = (c2 & 0x70) >> 4;
7442 p->aFFNBase.wWeight = SVBT16ToUInt16(*
reinterpret_cast<SVBT16*
>(pVer8));
7446 p->aFFNBase.chs = *pVer8++;
7449 p->aFFNBase.ibszAlt = *pVer8++;
7457 assert(cbFfnM1 >= 2);
7459 sal_uInt8 nMaxNullTerminatedPossible = cbFfnM1/2 - 1;
7461 pPrimary[nMaxNullTerminatedPossible] = 0;
7463 swapEndian(pPrimary);
7465 p->sFontname = pPrimary;
7466 if (
p->aFFNBase.ibszAlt &&
p->aFFNBase.ibszAlt < nMaxNullTerminatedPossible)
7468 sal_Unicode *pSecondary = pPrimary +
p->aFFNBase.ibszAlt;
7470 swapEndian(pSecondary);
7472 p->sFontname += OUString::Concat(
";") + pSecondary;
7479 pRaw +=
p->aFFNBase.cbFfnM1;
7480 nRemainingFFn -=
p->aFFNBase.cbFfnM1;
7483 OSL_ENSURE(nMax == nValidFonts,
"Font count differs with availability");
7484 nMax =
std::min(nMax, nValidFonts);
7514 : m_aPLCF(*pSt, rFib.m_fcPlcfhdd , rFib.m_lcbPlcfhdd , 0)
7530 for(
sal_uInt8 nI = 0x1; nI <= 0x20; nI <<= 1 )
7558 SAL_WARN(
"sw.ww8",
"End " << nEnd <<
" before Start " << rStart);
7565 SAL_WARN(
"sw.ww8",
"broken offset, ignoring");
7583 SAL_WARN(
"sw.ww8",
"End " << nEnd <<
" before Start " << rStart);
7589 SAL_WARN(
"sw.ww8",
"GetTextPosExact overflow");
7597 for(
sal_uInt8 nI = 0x01; nI <= 0x20; nI <<= 1 )
7603 fFacingPages(false), fWidowControl(false), fPMHMainDoc(false), grfSuppression(0), fpc(0),
7604 grpfIhdt(0), rncFootnote(0), nFootnote(0), fOutlineDirtySave(false), fOnlyMacPics(false),
7605 fOnlyWinPics(false), fLabelDoc(false), fHyphCapitals(false), fAutoHyphen(false),
7606 fFormNoFields(false), fLinkStyles(false), fRevMarking(false), fBackup(false),
7607 fExactCWords(false), fPagHidden(false), fPagResults(false), fLockAtn(false),
7608 fMirrorMargins(false), fReadOnlyRecommended(false), fDfltTrueType(false),
7609 fPagSuppressTopSpacing(false), fProtEnabled(false), fDispFormFieldSel(false), fRMView(false),
7610 fRMPrint(false), fWriteReservation(false), fLockRev(false), fEmbedFonts(false),
7611 copts_fNoTabForInd(false), copts_fNoSpaceRaiseLower(false), copts_fSuppressSpbfAfterPgBrk(false),
7612 copts_fWrapTrailSpaces(false), copts_fMapPrintTextColor(false), copts_fNoColumnBalance(false),
7613 copts_fConvMailMergeEsc(false), copts_fSuppressTopSpacing(false),
7614 copts_fOrigWordTableRules(false), copts_fTransparentMetafiles(false),
7615 copts_fShowBreaksInFrames(false), copts_fSwapBordersFacingPgs(false), copts_fExpShRtn(false),
7616 rncEdn(0), nEdn(0), epc(0), fPrintFormData(false), fSaveFormData(false), fShadeFormData(false),
7617 fWCFootnoteEdn(false), wvkSaved(0), wScaleSaved(0), zkSaved(0), fRotateFontW6(false),
7618 iGutterPos(false), fNoTabForInd(false), fNoSpaceRaiseLower(false),
7619 fSuppressSpbfAfterPageBreak(false), fWrapTrailSpaces(false), fMapPrintTextColor(false),
7620 fNoColumnBalance(false), fConvMailMergeEsc(false), fSuppressTopSpacing(false),
7621 fOrigWordTableRules(false), fTransparentMetafiles(false), fShowBreaksInFrames(false),
7622 fSwapBordersFacingPgs(false), fCompatibilityOptions_Unknown1_13(false), fExpShRtn(false),
7623 fCompatibilityOptions_Unknown1_15(false), fCompatibilityOptions_Unknown1_16(false),
7624 fSuppressTopSpacingMac5(false), fTruncDxaExpand(false), fPrintBodyBeforeHdr(false),
7625 fNoLeading(false), fCompatibilityOptions_Unknown1_21(false), fMWSmallCaps(false),
7626 fCompatibilityOptions_Unknown1_23(false), fCompatibilityOptions_Unknown1_24(false),
7627 fCompatibilityOptions_Unknown1_25(false), fCompatibilityOptions_Unknown1_26(false),
7628 fCompatibilityOptions_Unknown1_27(false), fCompatibilityOptions_Unknown1_28(false),
7629 fCompatibilityOptions_Unknown1_29(false), fCompatibilityOptions_Unknown1_30(false),
7630 fCompatibilityOptions_Unknown1_31(false), fUsePrinterMetrics(false), lvl(0), fHtmlDoc(false),
7631 fSnapBorder(false), fIncludeHeader(false), fIncludeFooter(false), fForcePageSizePag(false),
7632 fMinFontSizePag(false), fHaveVersions(false), fAutoVersion(false),
7633 fCompatibilityOptions_Unknown2_1(false), fCompatibilityOptions_Unknown2_2(false),
7634 fDontUseHTMLAutoSpacing(false), fCompatibilityOptions_Unknown2_4(false),
7635 fCompatibilityOptions_Unknown2_5(false), fCompatibilityOptions_Unknown2_6(false),
7636 fCompatibilityOptions_Unknown2_7(false), fCompatibilityOptions_Unknown2_8(false),
7637 fCompatibilityOptions_Unknown2_9(false), fCompatibilityOptions_Unknown2_10(false),
7638 fDontBreakWrappedTables(false), fCompatibilityOptions_Unknown2_12(false),
7639 fCompatibilityOptions_Unknown2_13(false), fCompatibilityOptions_Unknown2_14(false),
7640 fCompatibilityOptions_Unknown2_15(false), fCompatibilityOptions_Unknown2_16(false),
7641 fCompatibilityOptions_Unknown2_17(false), fCompatibilityOptions_Unknown2_18(false),
7642 fCompatibilityOptions_Unknown2_19(false), fCompatibilityOptions_Unknown2_20(false),
7643 fCompatibilityOptions_Unknown2_21(false), fCompatibilityOptions_Unknown2_22(false),
7644 fCompatibilityOptions_Unknown2_23(false), fCompatibilityOptions_Unknown2_24(false),
7645 fCompatibilityOptions_Unknown2_25(false), fCompatibilityOptions_Unknown2_26(false),
7646 fCompatibilityOptions_Unknown2_27(false), fCompatibilityOptions_Unknown2_28(false),
7647 fCompatibilityOptions_Unknown2_29(false), fCompatibilityOptions_Unknown2_30(false),
7648 fCompatibilityOptions_Unknown2_31(false), fCompatibilityOptions_Unknown2_32(false),
7649 fUnknown3(0), fUseBackGroundInAllmodes(false), fDoNotEmbedSystemFont(false), fWordCompat(false),
7650 fLiveRecover(false), fEmbedFactoids(false), fFactoidXML(false), fFactoidAllDone(false),
7651 fFolioPrint(false), fReverseFolio(false), iTextLineEnding(0), fHideFcc(false),
7652 fAcetateShowMarkup(false), fAcetateShowAtn(false), fAcetateShowInsDel(false),
7653 fAcetateShowProps(false)
7659 const sal_uInt32 nMaxDopSize = 0x268;
7660 std::unique_ptr<sal_uInt8[]> pDataPtr(
new sal_uInt8[ nMaxDopSize ] );
7663 sal_uInt32 nRead =
std::min(nMaxDopSize, nSize);
7668 if (nMaxDopSize > nRead)
7669 memset(
pData + nRead, 0, nMaxDopSize - nRead );
7681 fpc = ( a16Bit & 0x0060 ) >> 5;
7682 grpfIhdt = ( a16Bit & 0xff00 ) >> 8;
7702 fBackup = 0 != ( a8Bit & 0x01 );
7715 fRMView = 0 != ( a8Bit & 0x08 );
7754 rncEdn = a16Bit & 0x0003 ;
7755 nEdn = ( a16Bit & ~0x0003 ) >> 2;
7758 epc = a16Bit & 0x0003 ;
7777 zkSaved = ( a16Bit & 0x3000 ) >> 12;
7802 fHtmlDoc = ( a16Bit & 0x0200 ) >> 9 ;
7824 pData += 1 *
sizeof( sal_Int32);
7855 fHideFcc = ( a16Bit & 0x0800 ) >> 11;
7872 fFacingPages(false), fWidowControl(true), fPMHMainDoc(false), grfSuppression(0), fpc(1),
7873 grpfIhdt(0), rncFootnote(0), nFootnote(1), fOutlineDirtySave(true), fOnlyMacPics(false),
7874 fOnlyWinPics(false), fLabelDoc(false), fHyphCapitals(true), fAutoHyphen(false),
7875 fFormNoFields(false), fLinkStyles(false), fRevMarking(false), fBackup(true),
7876 fExactCWords(false), fPagHidden(true), fPagResults(true), fLockAtn(false),
7877 fMirrorMargins(false), fReadOnlyRecommended(false), fDfltTrueType(true),
7878 fPagSuppressTopSpacing(false), fProtEnabled(false), fDispFormFieldSel(false), fRMView(true),
7879 fRMPrint(true), fWriteReservation(false), fLockRev(false), fEmbedFonts(false),
7880 copts_fNoTabForInd(false), copts_fNoSpaceRaiseLower(false), copts_fSuppressSpbfAfterPgBrk(false),
7881 copts_fWrapTrailSpaces(false), copts_fMapPrintTextColor(false), copts_fNoColumnBalance(false),
7882 copts_fConvMailMergeEsc(false), copts_fSuppressTopSpacing(false),
7883 copts_fOrigWordTableRules(false), copts_fTransparentMetafiles(false),
7884 copts_fShowBreaksInFrames(false), copts_fSwapBordersFacingPgs(false), copts_fExpShRtn(false),
7885 dxaTab(0x2d0), dxaHotZ(0x168), nRevision(1),
7886 rncEdn(0), nEdn(1), epc(3), fPrintFormData(false), fSaveFormData(false), fShadeFormData(true),
7887 fWCFootnoteEdn(false), wvkSaved(2), wScaleSaved(100), zkSaved(0), fRotateFontW6(false),
7888 iGutterPos(false), fNoTabForInd(false), fNoSpaceRaiseLower(false),
7889 fSuppressSpbfAfterPageBreak(false), fWrapTrailSpaces(false), fMapPrintTextColor(false),
7890 fNoColumnBalance(false), fConvMailMergeEsc(false), fSuppressTopSpacing(false),
7891 fOrigWordTableRules(false), fTransparentMetafiles(false), fShowBreaksInFrames(false),
7892 fSwapBordersFacingPgs(false), fCompatibilityOptions_Unknown1_13(false), fExpShRtn(false),
7893 fCompatibilityOptions_Unknown1_15(false), fCompatibilityOptions_Unknown1_16(false),
7894 fSuppressTopSpacingMac5(false), fTruncDxaExpand(false), fPrintBodyBeforeHdr(false),
7895 fNoLeading(true), fCompatibilityOptions_Unknown1_21(false), fMWSmallCaps(false),
7896 fCompatibilityOptions_Unknown1_23(false), fCompatibilityOptions_Unknown1_24(false),
7897 fCompatibilityOptions_Unknown1_25(false), fCompatibilityOptions_Unknown1_26(false),
7898 fCompatibilityOptions_Unknown1_27(false), fCompatibilityOptions_Unknown1_28(false),
7899 fCompatibilityOptions_Unknown1_29(false), fCompatibilityOptions_Unknown1_30(false),
7900 fCompatibilityOptions_Unknown1_31(false), fUsePrinterMetrics(true), lvl(9), fHtmlDoc(false),
7901 fSnapBorder(false), fIncludeHeader(true), fIncludeFooter(true), fForcePageSizePag(false),
7902 fMinFontSizePag(false), fHaveVersions(false), fAutoVersion(false),
7903 cChWS(0), cChWSFootnoteEdn(0), cDBC(0), cDBCFootnoteEdn(0), nfcEdnRef(2),
7904 fCompatibilityOptions_Unknown2_1(false), fCompatibilityOptions_Unknown2_2(false),
7905 fDontUseHTMLAutoSpacing(false), fCompatibilityOptions_Unknown2_4(false),
7906 fCompatibilityOptions_Unknown2_5(false), fCompatibilityOptions_Unknown2_6(false),
7907 fCompatibilityOptions_Unknown2_7(false), fCompatibilityOptions_Unknown2_8(false),
7908 fCompatibilityOptions_Unknown2_9(false), fCompatibilityOptions_Unknown2_10(false),
7909 fDontBreakWrappedTables(false), fCompatibilityOptions_Unknown2_12(false),
7910 fCompatibilityOptions_Unknown2_13(false), fCompatibilityOptions_Unknown2_14(false),
7911 fCompatibilityOptions_Unknown2_15(false), fCompatibilityOptions_Unknown2_16(false),
7912 fCompatibilityOptions_Unknown2_17(false), fCompatibilityOptions_Unknown2_18(false),
7913 fCompatibilityOptions_Unknown2_19(false), fCompatibilityOptions_Unknown2_20(false),
7914 fCompatibilityOptions_Unknown2_21(false), fCompatibilityOptions_Unknown2_22(false),
7915 fCompatibilityOptions_Unknown2_23(false), fCompatibilityOptions_Unknown2_24(false),
7916 fCompatibilityOptions_Unknown2_25(false), fCompatibilityOptions_Unknown2_26(false),
7917 fCompatibilityOptions_Unknown2_27(false), fCompatibilityOptions_Unknown2_28(false),
7918 fCompatibilityOptions_Unknown2_29(false), fCompatibilityOptions_Unknown2_30(false),
7919 fCompatibilityOptions_Unknown2_31(false), fCompatibilityOptions_Unknown2_32(false),
7920 fUnknown3(0), fUseBackGroundInAllmodes(false), fDoNotEmbedSystemFont(false), fWordCompat(false),
7921 fLiveRecover(false), fEmbedFactoids(false), fFactoidXML(false), fFactoidAllDone(false),
7922 fFolioPrint(false), fReverseFolio(false), iTextLineEnding(0), fHideFcc(false),
7923 fAcetateShowMarkup(false), fAcetateShowAtn(true), fAcetateShowInsDel(false),
7924 fAcetateShowProps(false)
7953 fExpShRtn = ( a32Bit & 0x00002000 ) >> 13 ;
7977 sal_uInt32 a32Bit = 0;
8052 sal_uInt32 a32Bit = 0;
8094 const int nMaxDopLen = 610;
8095 sal_uInt32 nLen = 8 == rFib.
m_nVersion ? nMaxDopLen : 84;
8114 a16Bit |= ( 0x0060 & (
fpc << 5));
8115 a16Bit |= ( 0xff00 & (
grpfIhdt << 8));
8120 a16Bit |= ( ~0x0003 & (
nFootnote << 2));
8195 a16Bit |= ( 0x0003 &
rncEdn );
8196 a16Bit |= (~0x0003 & (
nEdn << 2));
8200 a16Bit |= (0x0003 &
epc );
8221 a16Bit |= (0x3000 & (
zkSaved << 12));
8265 pData += 1 *
sizeof( sal_Int32);
8304 m_f2on1 = (a16Bit & 0x0020) >> 5;
8377 OSL_ENSURE(
false,
"Unknown MS Asian Typography language, report");
8403 if( pSprm[1 +
mnDelta] != 255 )
8404 nL =
static_cast< sal_uInt16
>(pSprm[1 +
mnDelta] + aSprm.
nLen);
8408 sal_uInt8 nDel = nDelIdx < nRemLen ? pSprm[nDelIdx] : 0;
8410 sal_uInt8 nIns = nInsIdx < nRemLen ? pSprm[nInsIdx] : 0;
8412 nL = 2 + 4 * nDel + 3 * nIns;
8416 switch (aSprm.
nVari)
8424 nL =
static_cast< sal_uInt16
>(pSprm[1 +
mnDelta] + aSprm.
nLen);
8434 if (
nIndex + 1 >= nRemLen)
8436 SAL_WARN(
"sw.ww8",
"sprm longer than remaining bytes, doc or parser is wrong");
8446 nL =
static_cast<sal_uInt16
>(
nCount + aSprm.
nLen);
8450 OSL_ENSURE(
false,
"Unknown sprm variant");
8461 OSL_ENSURE(pSp,
"Why GetSprmId with pSp of 0");
8473 nId = SVBT16ToUInt16(pSp);
8498 sal_Int32 nLen)
const
8502 const sal_uInt16 nCurrentId =
GetSprmId(pSprms);
8504 sal_Int32 nSize =
GetSprmSize(nCurrentId, pSprms, nLen);
8506 bool bValid = nSize <= nLen;
8509 "sprm 0x" << std::hex << nCurrentId << std::dec <<
" longer than remaining bytes, " <<
8510 nSize <<
" vs " << nLen <<
"doc or parser is wrong");
8512 if (nCurrentId ==
nId && bValid)
8515 return SprmResult(pSprms + nFixedLen, nSize - nFixedLen);
8528 bkc(2), fTitlePage(0), fAutoPgn(0), nfcPgn(0), fUnlocked(0), cnsPgn(0),
8529 fPgnRestart(0), fEndNote(1), lnc(0), grpfIhdt(0), nLnnMod(0), dxaLnn(0),
8530 dxaPgn(720), dyaPgn(720), fLBetween(0), vjc(0), dmBinFirst(0),
8531 dmBinOther(0), dmPaperReq(0), fPropRMark(0), ibstPropRMark(0),
8532 dttmPropRMark(0), dxtCharSpace(0), dyaLinePitch(0), clm(0), reserved1(0),
8533 dmOrientPage(0), iHeadingPgn(0), pgnStart(1), lnnMin(0), wTextFlow(0),
8534 reserved2(0), pgbApplyTo(0), pgbPageDepth(0), pgbOffsetFrom(0),
8536 dxaLeft(1800), dxaRight(1800), dyaTop(1440), dyaBottom(1440), dzaGutter(0),
8537 dyaHdrTop(720), dyaHdrBottom(720), ccolM1(0), fEvenlySpaced(1),
8538 reserved3(0), fBiDi(0), fFacingCol(0), fRTLGutter(0), fRTLAlignment(0),
8539 dxaColumns(720), dxaColumnWidth(0), dmOrientFirst(0), fLayout(0),
8552 for (
sal_Unicode *pWork = pString; *pWork; ++pWork)
8553 *pWork = OSL_SWAPWORD(*pWork);
const LanguageTag & GetLanguageTag() const
static const AllSettings & GetSettings()
LanguageType getLanguageType(bool bResolveSystem=true) const
static css::lang::Locale convertToLocale(LanguageType nLangID, bool bResolveSystem=true)
const OUString & getNumDecimalSep() const
[MS-OSHARED] FactoidType: one smart tag type.
void Write(WW8Export &rExport)
void Read(SvStream &rStream)
void Write(WW8Export &rExport)
void Read(SvStream &rStream)
std::vector< MSOFactoidType > m_aFactoidTypes
std::vector< OUString > m_aStringTable
[MS-OSHARED] PropertyBag: stores information about one smart tag.
bool Read(SvStream &rStream)
void Write(WW8Export &rExport)
std::vector< MSOProperty > m_aProperties
sal_uInt16 m_nId
Matches MSOFactoidType::m_nId in MSOPropertyBagStore::m_aFactoidTypes.
[MS-OSHARED] Property: stores information about one smart-tag key/value.
sal_uInt32 m_nValue
Index into MSOPropertyBagStore::m_aStringTable.
void Write(SvStream &rStream)
sal_uInt32 m_nKey
Index into MSOPropertyBagStore::m_aStringTable.
void Read(SvStream &rStream)
static bool isCJK(LanguageType nLang)
virtual sal_uInt64 TellEnd()
SvStream & ReadInt16(sal_Int16 &rInt16)
std::size_t WriteBytes(const void *pData, std::size_t nSize)
SvStream & WriteUInt16(sal_uInt16 nUInt16)
SvStream & WriteUInt32(sal_uInt32 nUInt32)
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
SvStream & ReadUtf16(sal_Unicode &rUtf16)
sal_uInt64 Seek(sal_uInt64 nPos)
SvStream & ReadInt32(sal_Int32 &rInt32)
std::size_t ReadBytes(void *pData, std::size_t nSize)
sal_uInt64 SeekRel(sal_Int64 nPos)
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
sal_uInt64 remainingSize()
SvStream & ReadUChar(unsigned char &rChar)
SvStream & WriteStream(SvStream &rStream)
static Color GetCol(sal_uInt8 nIco)
static void WriteString8(SvStream &rStrm, std::u16string_view rStr, bool bAddZero, rtl_TextEncoding eCodeSet)
sal_Int16 m_cchFollowingPunct
void ReadFromMem(sal_uInt8 *&pData)
sal_uInt16 m_iLevelOfKinsoku
void WriteToMem(sal_uInt8 *&pData) const
sal_uInt16 m_fKerningPunct
sal_Int16 m_cchLeadingPunct
LanguageType GetConvertedLang() const
sal_Unicode m_rgxchLPunct[nMaxLeading]
sal_Unicode m_rgxchFPunct[nMaxFollowing]
sal_uInt16 m_iJustification
Exporter of the binary Word file formats.
FIB - the File Information Block.
sal_Int32 m_lcbSttbListNames
sal_Int32 m_lcbPlcfHdrtxbxBkd
sal_Int32 m_lcbPlcfspaHdr
sal_Int32 m_lcbPlcftxbxBkd
sal_Int32 m_lcbPlcfAtnbkf
sal_Int32 m_lcbSttbAutoCaption
sal_Int32 m_lcbSttbfRMark
sal_Int32 m_lcbPlcfHdrtxbxText
WW8_FC m_fcPlcffactoid
0x4ba Plcffactoid offset.
WW8_FC m_fcFormFieldSttbf
sal_Int32 m_lcbSttbfCaption
sal_Int32 m_lcbFormFieldSttbf
sal_Int32 m_lcbPlcfpgdEdn
WW8Fib(SvStream &rStrm, sal_uInt8 nWantedVersion, sal_uInt32 nOffset=0)
sal_uInt32 m_lcbAtrdExtra
sal_uInt32 m_lcbPlcfBklFactoid
0x446 smart-tag bookmark ends length.
WW8_FC m_fcFactoidData
0x44a smart tag data offset.
sal_Int32 m_lcbPlcftxbxText
sal_uInt32 m_lcbFactoidData
0x44e smart tag data length.
sal_Int32 m_lcbPlcffldEdn
void Write(SvStream &rStrm)
WW8_FC m_fcAutosaveSource
sal_Int32 m_lcbGrpStAtnOwners
sal_Int32 m_lcbSttbfAtnbkmk
sal_Int32 m_lcbPlcfpgdFootnote
sal_Int32 m_lcbPlcfbteChpx
sal_Int32 m_lcbPlcfspaMom
void WriteHeader(SvStream &rStrm)
sal_Int32 m_fcIslandFirst
sal_Int32 m_lcbPlcffldMcr
sal_Int32 m_lcbPlcfAtnbkl
sal_uInt8 m_nVersion
Program-Version asked for by us: in Ctor we check if it matches the value of nFib.
WW8_FC m_fcPlcfHdrtxbxText
sal_Int32 m_pnFbpPapFirst
WW8_FC m_fcSttbfBkmkFactoid
0x42a smart-tag bookmark string table offset.
sal_uInt16 m_wMagicCreated
sal_uInt16 m_cswNew
Specifies the count of 16-bit values corresponding to fibRgCswNew that follow.
sal_Int32 m_lcbAutosaveSource
sal_Int32 m_lcbPlcfandText
sal_uInt32 m_lcbPlcfBkfFactoid
0x436 smart-tag bookmark ends length.
sal_uInt32 m_lcbSttbfBkmkFactoid
0x42e smart-tag bookmark string table length.
WW8_FC m_fcPlcfHdrtxbxBkd
sal_Int32 m_lcbPlcfdoaMom
sal_Int32 m_lcbPlcfbtePapx
ww::WordVersion GetFIBVersion() const
WW8_FC m_fcSttbAutoCaption
sal_Int32 m_lcbPlcffldFootnote
sal_uInt16 m_wMagicRevised
sal_Int32 m_lcbPlcffldTxbx
static rtl_TextEncoding GetFIBCharset(sal_uInt16 chs, LanguageType nLidLocale)
WW8_FC m_fcPlcffldFootnote
sal_Int32 m_lcbSttbfAssoc
sal_Int32 m_lcbPlcfdoaHdr
bool m_fReadOnlyRecommended
sal_Unicode m_nNumDecimalSep
sal_Int32 m_lcbPlcfendText
sal_Int32 m_lcbPlcffndRef
WW8_FC m_fcPlcfpgdFootnote
sal_uInt32 m_lcbPlcffactoid
0x4be Plcffactoid offset.
sal_Int32 m_pnFbpLvcFirst
sal_Int32 m_lcbPlcffldMom
WW8_FC m_fcPlcffldHdrTxbx
WW8_FC m_fcPlcfBkfFactoid
0x432 smart-tag bookmark starts offset.
sal_Int32 m_lcbPlcffldAtn
sal_uInt16 m_wMagicRevisedPrivate
sal_Int32 m_lcbPlcffldHdr
WW8_FC m_fcGrpStAtnOwners
sal_uInt32 m_lcbSttbttmbd
sal_Int32 m_lcbPlcfendRef
sal_Int32 m_lcbPlcffldHdrTxbx
sal_Int32 m_lcbPlcfandRef
sal_uInt16 m_wMagicCreatedPrivate
WW8_FC m_fcPlcfBklFactoid
0x442 smart-tag bookmark ends offset.
bool GetBaseCp(ManTypes nType, WW8_CP *cp) const
sal_Int32 m_lcbPlcffndText
sal_Int32 m_pnFbpChpFirst
std::vector< WW8_FFN > m_aFontA
const WW8_FFN * GetFont(sal_uInt16 nNum) const
WW8Fonts(const WW8Fonts &)=delete
void SaveAllPLCFx(WW8PLCFxSaveAll &rSave) const
void GetNoSprmEnd(short nIdx, WW8PLCFManResult *pRes) const
void TransferOpenSprms(std::stack< sal_uInt16 > &rStack)
WW8PLCFx_Cp_FKP * GetPapPLCF() const
sal_uInt16 WhereIdx(bool *pbStart, WW8_CP *pPos=nullptr) const
SprmResult HasParaSprm(sal_uInt16 nId) const
void SeekPos(tools::Long nNewCp)
sal_uInt16 GetId(const WW8PLCFxDesc *p) const
bool IsSprmLegalForCategory(sal_uInt16 nSprmId, short nIdx) const
bool Get(WW8PLCFManResult *pResult) const
void AdvNoSprm(short nIdx, bool bStart)
sal_uInt8 * m_pExtendedAtrds
sal_uInt16 GetColl() const
void RestoreAllPLCFx(const WW8PLCFxSaveAll &rSave)
static void GetNewNoSprms(WW8PLCFxDesc &rDesc)
void GetSprmEnd(short nIdx, WW8PLCFManResult *pRes) const
wwSprmParser maSprmParser
void GetSprmStart(short nIdx, WW8PLCFManResult *pRes) const
WW8PLCFxDesc * m_pFactoidBkm
WW8PLCFxDesc m_aD[MAN_PLCF_COUNT]
void AdjustEnds(WW8PLCFxDesc &rDesc)
bool GetDoingDrawTextBox() const
WW8PLCFMan(const WW8ScannerBase *pBase, ManTypes nType, tools::Long nStartCp, bool bDoingDrawTextBox=false)
SprmResult HasCharSprm(sal_uInt16 nId) const
WW8PLCFx_Cp_FKP * GetChpPLCF() const
WW8PLCFspecial * m_pMagicTables
WW8PLCFx_FLD * GetField() const
WW8PLCFspecial * m_pSubdocs
void GetNewSprms(WW8PLCFxDesc &rDesc)
void AdvSprm(short nIdx, bool bStart)
WW8PLCFxDesc * m_pFootnote
void GetNoSprmStart(short nIdx, WW8PLCFManResult *pRes) const
WW8PLCFspecial * m_pTxbxBkd
WW8PLCF_HdFt(SvStream *pSt, WW8Fib const &rFib, WW8Dop const &rDop)
void GetTextPosExact(short nIdx, WW8_CP &rStart, WW8_CP &rLen)
void UpdateIndex(sal_uInt8 grpfIhdt)
bool GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP &rStart, WW8_CP &rLen)
WW8PLCF(SvStream &rSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct, WW8_CP nStartPos=-1)
std::unique_ptr< WW8_CP[]> m_pPLCF_PosArray
void ReadPLCF(SvStream &rSt, WW8_FC nFilePos, sal_uInt32 nPLCF)
void GeneratePLCF(SvStream &rSt, sal_Int32 nPN, sal_Int32 ncpN)
bool Get(WW8_CP &rStart, WW8_CP &rEnd, void *&rpValue) const
void SetIdx(sal_Int32 nI)
void TruncToSortedRange()
bool SeekPos(WW8_CP nPos)
sal_uInt8 * m_pPLCF_Contents
void SetIdx(tools::Long nI)
bool SeekPos(tools::Long nPos)
tools::Long GetIMax() const
WW8PLCFpcd_Iter(const WW8PLCFpcd_Iter &)=delete
bool Get(WW8_CP &rStart, WW8_CP &rEnd, void *&rpValue) const
tools::Long GetIdx() const
std::unique_ptr< WW8_CP[]> m_pPLCF_PosArray
sal_uInt8 * m_pPLCF_Contents
void TruncToSortedRange()
WW8PLCFpcd(const WW8PLCFpcd &)=delete
among others for fields, that is, the same number of attr as positions, if Ctor-Param bNoEnd = false
bool Get(WW8_CP &rStart, void *&rpValue) const
sal_uInt8 * m_pPLCF_Contents
pointer to content-array-part of Pos-array
bool GetData(tools::Long nIdx, WW8_CP &rPos, void *&rpValue) const
std::unique_ptr< sal_Int32[]> m_pPLCF_PosArray
pointer to Pos-array and to the whole structure
bool SeekPosExact(tools::Long nPos)
bool SeekPos(tools::Long nPos)
WW8PLCFspecial(const WW8PLCFspecial &)=delete
tools::Long m_nIdx
marker where we currently are
void SetIdx(tools::Long nI)
tools::Long m_nIMax
number of elements
tools::Long GetIdx() const
Handles the import of PlcfAtnBkf and PlcfAtnBkl: start / end position of annotation marks.
virtual void SetIdx2(sal_uInt32 nIdx) override
std::unique_ptr< WW8PLCFspecial > m_pBook[2]
Start and end positions.
WW8PLCFx_AtnBook(const WW8PLCFx_AtnBook &)=delete
virtual WW8_CP Where() override
sal_Int32 m_nIMax
Number of annotation marks.
virtual sal_uInt32 GetIdx2() const override
virtual ~WW8PLCFx_AtnBook() override
virtual sal_uInt32 GetIdx() const override
virtual void advance() override
virtual bool SeekPos(WW8_CP nCpPos) override
tools::Long getHandle() const
Handle is the unique ID of an annotation mark.
virtual void SetIdx(sal_uInt32 nI) override
virtual tools::Long GetNoSprms(WW8_CP &rStart, WW8_CP &rEnd, sal_Int32 &rLen) override
void MapName(OUString &rName)
tools::Long GetHandle() const
std::vector< eBookStatus > m_aStatus
virtual WW8_CP Where() override
void SetStatus(sal_uInt16 nIndex, eBookStatus eStat)
virtual void advance() override
virtual void SetIdx(sal_uInt32 nI) override
std::vector< OUString > m_aBookNames
eBookStatus GetStatus() const
OUString GetUniqueBookmarkName(const OUString &rSuggestedName)
WW8PLCFx_Book(const WW8PLCFx_Book &)=delete
virtual sal_uInt32 GetIdx() const override
virtual tools::Long GetNoSprms(WW8_CP &rStart, WW8_CP &rEnd, sal_Int32 &rLen) override
tools::Long GetIMax() const
OUString GetBookmark(tools::Long nStart, tools::Long nEnd, sal_uInt16 &nIndex)
virtual bool SeekPos(WW8_CP nCpPos) override
tools::Long GetLen() const
virtual void SetIdx2(sal_uInt32 nIdx) override
const OUString * GetName() const
virtual ~WW8PLCFx_Book() override
virtual sal_uInt32 GetIdx2() const override
std::unique_ptr< WW8PLCFspecial > m_pBook[2]
iterator for Piece Table Exceptions of Fkps works on CPs (high-level)
std::unique_ptr< WW8PLCFx_PCD > m_pPcd
WW8PLCFpcd_Iter * m_pPieceIter
WW8PLCFx_Cp_FKP(const WW8PLCFx_Cp_FKP &)=delete
virtual WW8_CP Where() override
virtual void Restore(const WW8PLCFxSave1 &rSave) override
virtual sal_uInt32 GetIdx2() const override
virtual void advance() override
virtual void Save(WW8PLCFxSave1 &rSave) const override
const WW8ScannerBase & m_rSBase
virtual bool SeekPos(WW8_CP nCpPos) override
virtual ~WW8PLCFx_Cp_FKP() override
virtual void GetSprms(WW8PLCFxDesc *p) override
sal_uInt32 GetPCDIdx() const
virtual void SetIdx2(sal_uInt32 nIdx) override
virtual void GetSprms(WW8PLCFxDesc *p) override
bool GetPara(tools::Long nIdx, WW8FieldDesc &rF)
virtual WW8_CP Where() override
virtual ~WW8PLCFx_FLD() override
bool StartPosIsFieldStart()
virtual void advance() override
virtual bool SeekPos(WW8_CP nCpPos) override
bool EndPosIsFieldEnd(WW8_CP &)
virtual sal_uInt32 GetIdx() const override
WW8PLCFx_FLD(const WW8PLCFx_FLD &)=delete
virtual void SetIdx(sal_uInt32 nIdx) override
std::unique_ptr< WW8PLCFspecial > m_pPLCF
Handles the import of PlcfBkfFactoid and PlcfBklFactoid: start / end position of factoids.
virtual ~WW8PLCFx_FactoidBook() override
virtual void SetIdx2(sal_uInt32 nIdx) override
virtual sal_uInt32 GetIdx() const override
virtual void SetIdx(sal_uInt32 nI) override
virtual bool SeekPos(WW8_CP nCpPos) override
tools::Long getHandle() const
Handle is the unique ID of a factoid mark.
sal_Int32 m_nIMax
Number of factoid marks.
virtual sal_uInt32 GetIdx2() const override
virtual WW8_CP Where() override
WW8PLCFx_FactoidBook(const WW8PLCFx_FactoidBook &)=delete
std::unique_ptr< WW8PLCFspecial > m_pBook[2]
Start and end positions.
virtual void advance() override
virtual tools::Long GetNoSprms(WW8_CP &rStart, WW8_CP &rEnd, sal_Int32 &rLen) override
Entry & operator=(const Entry &rEntry)
void IncMustRemainCache()
sal_uInt16 GetIstd() const
WW8Fkp(const WW8Fib &rFib, SvStream *pFKPStrm, SvStream *pDataStrm, tools::Long _nFilePos, tools::Long nItemSiz, ePLCFT ePl, WW8_FC nStartFc)
void DecMustRemainCache()
bool IsMustRemainCache() const
sal_uInt8 * Get(WW8_FC &rStart, WW8_FC &rEnd, sal_Int32 &rLen) const
void FillEntry(Entry &rEntry, std::size_t nDataOffset, sal_uInt16 nLen)
void SetIdx(sal_uInt8 nI)
const wwSprmParser & GetSprmParser() const
tools::Long GetFilePos() const
sal_uInt8 * GetLenAndIStdAndSprms(sal_Int32 &rLen) const
std::vector< Entry > maEntries
SprmResult HasSprm(sal_uInt16 nId, bool bFindFirst=true)
wwSprmParser maSprmParser
Iterator for Piece Table Exceptions of Fkps works only with FCs, not with CPs ! ( Low-Level )
virtual sal_uInt16 GetIstd() const override
virtual WW8_FC Where() override
WW8PLCFx_Fc_FKP(const WW8PLCFx_Fc_FKP &)=delete
virtual bool SeekPos(WW8_FC nFcPos) override
virtual ~WW8PLCFx_Fc_FKP() override
sal_uInt8 * GetSprmsAndPos(WW8_FC &rStart, WW8_FC &rEnd, sal_Int32 &rLen)
SprmResult HasSprm(sal_uInt16 nId, bool bFindFirst=true)
std::deque< std::unique_ptr< WW8Fkp > > maFkpCache
virtual void advance() override
std::unique_ptr< WW8PLCF > m_pPLCF
std::unique_ptr< WW8PLCFx_PCDAttrs > m_pPCDAttrs
virtual sal_uInt32 GetIdx() const override
virtual void SetIdx(sal_uInt32 nIdx) override
void GetPCDSprms(WW8PLCFxDesc &rDesc)
WW8PLCFx_PCDAttrs(const WW8PLCFx_PCDAttrs &)=delete
virtual bool SeekPos(WW8_CP nCpPos) override
virtual WW8_CP Where() override
virtual sal_uInt32 GetIdx() const override
virtual void advance() override
std::vector< std::unique_ptr< sal_uInt8[]> > const & mrGrpprls
virtual void SetIdx(sal_uInt32 nI) override
virtual void GetSprms(WW8PLCFxDesc *p) override
WW8PLCFpcd_Iter * m_pPcdI
WW8_CP GetClipStart() const
static sal_Int32 TransformPieceAddress(tools::Long nfc, bool &bIsUnicodeAddress)
virtual void SetIdx(sal_uInt32 nI) override
virtual WW8_CP Where() override
virtual void advance() override
virtual sal_uInt32 GetIdx() const override
virtual ~WW8PLCFx_PCD() override
std::unique_ptr< WW8PLCFpcd_Iter > m_pPcdI
static void CurrentPieceFc2Cp(WW8_CP &rStartPos, WW8_CP &rEndPos, const WW8ScannerBase *pSBase)
sal_uInt32 GetIMax() const
virtual bool SeekPos(WW8_CP nCpPos) override
virtual tools::Long GetNoSprms(WW8_CP &rStart, WW8_CP &, sal_Int32 &rLen) override
void SetClipStart(WW8_CP nIn)
WW8_CP CurrentPieceStartFc2Cp(WW8_FC nStartPos)
WW8PLCFx_PCD(const WW8PLCFx_PCD &)=delete
WW8_FC CurrentPieceStartCp2Fc(WW8_CP nCp)
Iterator for Piece Table Exceptions of Sepx.
bool Find4Sprms(sal_uInt16 nId1, sal_uInt16 nId2, sal_uInt16 nId3, sal_uInt16 nId4, SprmResult &r1, SprmResult &r2, SprmResult &r3, SprmResult &r4) const
SprmResult HasSprm(sal_uInt16 nId) const
virtual void GetSprms(WW8PLCFxDesc *p) override
virtual WW8_CP Where() override
std::unique_ptr< WW8PLCF > m_pPLCF
wwSprmParser maSprmParser
virtual void SetIdx(sal_uInt32 nIdx) override
std::unique_ptr< sal_uInt8[]> m_pSprms
WW8PLCFx_SEPX(const WW8PLCFx_SEPX &)=delete
virtual ~WW8PLCFx_SEPX() override
virtual bool SeekPos(WW8_CP nCpPos) override
virtual sal_uInt32 GetIdx() const override
virtual void advance() override
iterator for footnotes/endnotes and comments
virtual WW8_CP Where() override
std::unique_ptr< WW8PLCF > m_pRef
virtual bool SeekPos(WW8_CP nCpPos) override
std::unique_ptr< WW8PLCF > m_pText
virtual void advance() override
virtual ~WW8PLCFx_SubDoc() override
virtual sal_uInt32 GetIdx() const override
virtual void SetIdx(sal_uInt32 nIdx) override
virtual void GetSprms(WW8PLCFxDesc *p) override
WW8PLCFx_SubDoc(const WW8PLCFx_SubDoc &)=delete
virtual void SetIdx2(sal_uInt32 nIdx)
virtual sal_uInt32 GetIdx() const =0
void SetStartFc(WW8_FC nFc)
virtual void Restore(const WW8PLCFxSave1 &rSave)
WW8_FC GetStartFc() const
virtual sal_uInt32 GetIdx2() const
virtual void SetIdx(sal_uInt32 nIdx)=0
ww::WordVersion GetFIBVersion() const
virtual void Save(WW8PLCFxSave1 &rSave) const
virtual void GetSprms(WW8PLCFxDesc *p)
const WW8Fib & GetFIB() const
virtual tools::Long GetNoSprms(WW8_CP &rStart, WW8_CP &, sal_Int32 &rLen)
virtual bool SeekPos(WW8_CP nCpPos)=0
virtual sal_uInt16 GetIstd() const
std::unique_ptr< WW8PLCFx_PCD > m_pPLCFx_PCD
std::unique_ptr< WW8PLCFx_SubDoc > m_pFootnotePLCF
std::unique_ptr< WW8PLCFx_Book > m_pBook
std::unique_ptr< WW8PLCFx_FLD > m_pFieldEdnPLCF
std::unique_ptr< WW8PLCFspecial > m_pHdFtFdoa
std::unique_ptr< WW8PLCFx_SEPX > m_pSepPLCF
std::unique_ptr< WW8PLCFspecial > m_pSubdocs
std::unique_ptr< WW8PLCFx_FLD > m_pFieldAndPLCF
std::unique_ptr< WW8PLCFx_FLD > m_pFieldFootnotePLCF
std::unique_ptr< WW8PLCFx_SubDoc > m_pEdnPLCF
std::vector< std::unique_ptr< sal_uInt8[]> > m_aPieceGrpprls
std::unique_ptr< WW8PLCFx_FLD > m_pFieldTxbxPLCF
WW8ScannerBase(const WW8ScannerBase &)=delete
std::unique_ptr< WW8PLCFx_FactoidBook > m_pFactoidBook
Smart tag bookmarks.
std::unique_ptr< WW8PLCFpcd > OpenPieceTable(SvStream *pStr, const WW8Fib *pWwF)
std::unique_ptr< WW8PLCFx_FLD > m_pFieldPLCF
std::unique_ptr< sal_uInt8[]> m_pExtendedAtrds
std::unique_ptr< WW8PLCFx_PCDAttrs > m_pPLCFx_PCDAttrs
std::unique_ptr< WW8PLCFx_Cp_FKP > m_pPapPLCF
std::unique_ptr< WW8PLCFx_SubDoc > m_pAndPLCF
std::unique_ptr< WW8PLCFspecial > m_pMagicTables
std::unique_ptr< WW8PLCFspecial > m_pMainTxbxBkd
std::unique_ptr< WW8PLCFx_FLD > m_pFieldHdFtPLCF
std::unique_ptr< WW8PLCFspecial > m_pMainFdoa
std::unique_ptr< WW8PLCFspecial > m_pMainTxbx
std::unique_ptr< WW8PLCFspecial > m_pHdFtTxbx
std::unique_ptr< WW8PLCFspecial > m_pHdFtTxbxBkd
std::unique_ptr< WW8PLCFpcd_Iter > m_pPieceIter
WW8_CP WW8Fc2Cp(WW8_FC nFcPos) const
std::unique_ptr< WW8PLCFx_Cp_FKP > m_pChpPLCF
std::unique_ptr< WW8PLCFpcd > m_pPiecePLCF
std::unique_ptr< WW8PLCFx_AtnBook > m_pAtnBook
std::unique_ptr< WW8PLCFx_FLD > m_pFieldTxbxHdFtPLCF
WW8_FC WW8Cp2Fc(WW8_CP nCpPos, bool *pIsUnicode=nullptr, WW8_CP *pNextPieceCp=nullptr, bool *pTestFlag=nullptr) const
sal_Int32 WW8ReadString(SvStream &rStrm, OUString &rStr, WW8_CP nCurrentStartCp, tools::Long nTotalLen, rtl_TextEncoding eEnc) const
void Read(SvStream &rStream, WW8_FC fcFactoidData, sal_uInt32 lcbFactoidData)
std::vector< MSOPropertyBag > m_aPropBags
void Write(WW8Export &rExport)
MSOPropertyBagStore m_aPropBagStore
simple Iterator for SPRMs
const sal_uInt8 * m_pCurrentParams
const sal_uInt8 * GetSprms() const
const wwSprmParser & mrSprmParser
sal_Int32 GetRemLen() const
const sal_uInt8 * GetCurrentParams() const
void SetSprms(const sal_uInt8 *pSprms_, sal_Int32 nLen_)
SprmResult FindSprm(sal_uInt16 nId, bool bFindFirst, const sal_uInt8 *pNextByteMatch=nullptr)
const sal_uInt8 * m_pSprms
sal_uInt16 GetCurrentId() const
WW8SprmIter(const sal_uInt8 *pSprms_, sal_Int32 nLen_, const wwSprmParser &rSprmParser)
sal_uInt16 m_nVerBuiltInNamesWhenSaved
std::unique_ptr< WW8_STD > Read1STDFixed(sal_uInt16 &rSkip)
std::unique_ptr< WW8_STD > Read1Style(sal_uInt16 &rSkip, OUString *pString)
sal_uInt16 m_istdMaxFixedWhenSaved
WW8Style(const WW8Style &)
sal_uInt16 m_fStdStylenamesWritten
sal_uInt16 m_cbSTDBaseInFile
sal_uInt16 m_stiMaxWhenSaved
wwSprmParser knows how to take a sequence of bytes and split it up into sprms and their arguments
sal_uInt16 GetSprmId(const sal_uInt8 *pSp) const
Return the SPRM id at the beginning of this byte sequence.
static const wwSprmSearcher * GetWW8SprmSearcher()
wwSprmParser(const WW8Fib &rFib)
static const wwSprmSearcher * GetWW2SprmSearcher()
ww::WordVersion meVersion
const wwSprmSearcher * mpKnownSprms
ww::WordVersion GetFIBVersion() const
sal_Int32 DistanceToData(sal_uInt16 nId) const
Get known len of a sprms head, the bytes of the sprm id + any bytes reserved to hold a variable lengt...
int MinSprmLen() const
The minimum acceptable sprm len possible for this type of parser.
static const wwSprmSearcher * GetWW6SprmSearcher(const WW8Fib &rFib)
sal_uInt16 GetSprmTailLen(sal_uInt16 nId, const sal_uInt8 *pSprm, sal_Int32 nRemLen) const
Get len of a sprms data area, ignoring the bytes of the sprm id and ignoring any len bytes.
SprmInfo GetSprmInfo(sal_uInt16 nId) const
SprmResult findSprmData(sal_uInt16 nId, sal_uInt8 *pSprms, sal_Int32 nLen) const
Returns the offset to data of the first sprm of id nId, 0.
sal_Int32 GetSprmSize(sal_uInt16 nId, const sal_uInt8 *pSprm, sal_Int32 nRemLen) const
sal_uInt8 SprmDataOfs(sal_uInt16 nId) const
SprmInfo const * search(sal_uInt16 id) const
#define LANGUAGE_CHINESE_TRADITIONAL
#define LANGUAGE_CHINESE_SIMPLIFIED
#define LANGUAGE_JAPANESE
#define LANGUAGE_CHINESE_SIMPLIFIED_LEGACY
#define SAL_WARN_IF(condition, area, stream)
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
std::unique_ptr< sal_Int32[]> pData
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)
static void Write(std::u16string_view aString, SvStream &rStream)
static OUString Read(SvStream &rStream)
const sal_uInt16 sprmPFWidowControl
const sal_uInt16 sprmPDxaFromText
const sal_uInt16 sprmCHpsPosAdj
const sal_uInt16 sprmCFOutline
const sal_uInt16 sprmCHpsNew50
const sal_uInt16 sprmPDyaLine
const sal_uInt16 sprmPFLocked
const sal_uInt16 sprmTSetBrc10
const sal_uInt16 sprmCFStrike
const sal_uInt16 sprmPBrcLeft10
const sal_uInt16 sprmPChgTabsPapx
const sal_uInt16 sprmPFKeep
const sal_uInt16 sprmPShd
const sal_uInt16 sprmSDyaHdrBottom
const sal_uInt16 sprmCFSmallCaps
const sal_uInt16 sprmCIss
const sal_uInt16 sprmPBrcTop10
const sal_uInt16 sprmPBrcLeft
const sal_uInt16 sprmPChgTabs
const sal_uInt16 sprmSNLnnMod
const sal_uInt16 sprmTSetBrc
const sal_uInt16 sprmPicBrcBottom
const sal_uInt16 sprmTDxaCol
const sal_uInt16 sprmPDyaBefore
const sal_uInt16 sprmSDmBinOther
const sal_uInt16 sprmTDxaLeft
const sal_uInt16 sprmSYaPage
const sal_uInt16 sprmPFromText10
const sal_uInt16 sprmCSizePos
const sal_uInt16 sprmCHps
const sal_uInt16 sprmCIbstRMark
const sal_uInt16 sprmPWHeightAbs
const sal_uInt16 sprmCHpsKern
const sal_uInt16 sprmSDxaColumns
const sal_uInt16 sprmPFNoLineNumb
const sal_uInt16 sprmSDxaLeft
const sal_uInt16 sprmPPageBreakBefore
const sal_uInt16 sprmPicBrcLeft
const sal_uInt16 sprmSLnnMin
const sal_uInt16 sprmSDxaLnn
const sal_uInt16 sprmPTtp
const sal_uInt16 sprmSFPgnRestart
const sal_uInt16 sprmSDxaColWidth
const sal_uInt16 sprmPBrcRight10
const sal_uInt16 sprmSFTitlePage
const sal_uInt16 sprmCFData
const sal_uInt16 sprmSDxaRight
const sal_uInt16 sprmTSetShd
const sal_uInt16 sprmCFRMark
const sal_uInt16 sprmTDyaRowHeight
const sal_uInt16 sprmCFBold
const sal_uInt16 sprmTSplit
const sal_uInt16 sprmPBrcl
const sal_uInt16 sprmSDxaPgn
const sal_uInt16 sprmPDyaAfter
const sal_uInt16 sprmCCondHyhen
const sal_uInt16 sprmCPicLocation
const sal_uInt16 sprmCDttmRMark
const sal_uInt16 sprmPIstdPermute
const sal_uInt16 sprmSNfcPgn
const sal_uInt16 sprmPFInTable
const sal_uInt16 sprmPDxaLeft1
const sal_uInt16 sprmCHpsPos
const sal_uInt16 sprmPicBrcTop
const sal_uInt16 sprmSDMPaperReq
const sal_uInt16 sprmPBrcBetween
const sal_uInt16 sprmPIncLv1
const sal_uInt16 sprmSScnsPgn
const sal_uInt16 sprmPDyaAbs
const sal_uInt16 sprmCFCaps
const sal_uInt16 sprmPBrcBottom10
const sal_uInt16 sprmPFSideBySide
const sal_uInt16 sprmPRuler
const sal_uInt16 sprmSDyaHdrTop
const sal_uInt16 sprmSDzaGutter
const sal_uInt16 sprmPicBrcl
const sal_uInt16 sprmPNLvlAnm
const sal_uInt16 sprmSFAutoPgn
const sal_uInt16 sprmCFFldVanish
const sal_uInt16 sprmTTableHeader
const sal_uInt16 sprmSVjc
const sal_uInt16 sprmPBrcTop
const sal_uInt16 sprmPDcs
const sal_uInt16 sprmCFOle2
const sal_uInt16 sprmSFEvenlySpaced
const sal_uInt16 sprmSiHeadingPgn
const sal_uInt16 sprmCIstdPermute
const sal_uInt16 sprmTTableBorders
const sal_uInt16 sprmCLid
const sal_uInt16 sprmSGprfIhdt
const sal_uInt16 sprmSBCustomize
const sal_uInt16 sprmPBrcRight
const sal_uInt16 sprmPBrcp
const sal_uInt16 sprmPDyaFromText
const sal_uInt16 sprmPBrcBar
const sal_uInt16 sprmCIstd
const sal_uInt16 sprmCPlain
const sal_uInt16 sprmTDelete
const sal_uInt16 sprmSOlstAnm
const sal_uInt16 sprmCMajority50
const sal_uInt16 sprmCHpsInc1
const sal_uInt16 sprmPFNoAutoHyph
const sal_uInt16 sprmPDxaAbs
const sal_uInt16 sprmPDxaWidth
const sal_uInt16 sprmTFCantSplit
const sal_uInt16 sprmCFSpec
const sal_uInt16 sprmPBrcBetween10
const sal_uInt16 sprmCHpsInc
const sal_uInt16 sprmPIstd
const sal_uInt16 sprmSBkc
const sal_uInt16 sprmTDxaGapHalf
const sal_uInt16 sprmCChse
const sal_uInt16 sprmPBrcBottom
const sal_uInt16 sprmCMajority
const sal_uInt16 sprmSPgnStart
const sal_uInt16 sprmPAnld
const sal_uInt16 sprmCRMReason
const sal_uInt16 sprmCDxaSpace
const sal_uInt16 sprmTInsert
const sal_uInt16 sprmTTlp
const sal_uInt16 sprmSDyaPgn
const sal_uInt16 sprmSDxaColSpacing
const sal_uInt16 sprmPNest
const sal_uInt16 sprmTMerge
const sal_uInt16 sprmSDyaBottom
const sal_uInt16 sprmPFKeepFollow
const sal_uInt16 sprmSFEndnote
const sal_uInt16 sprmCHpsMul
const sal_uInt16 sprmCIco
const sal_uInt16 sprmCDefault
const sal_uInt16 sprmTDefTable
const sal_uInt16 sprmCFVanish
const sal_uInt16 sprmCKul
const sal_uInt16 sprmPBrcBar10
const sal_uInt16 sprmCSymbol
const sal_uInt16 sprmTDefTableShd
const sal_uInt16 sprmPDxaRight
const sal_uInt16 sprmSBOrientation
const sal_uInt16 sprmSCcolumns
const sal_uInt16 sprmSLBetween
const sal_uInt16 sprmSXaPage
const sal_uInt16 sprmCFShadow
const sal_uInt16 sprmSFProtected
const sal_uInt16 sprmPDxaLeft
const sal_uInt16 sprmCFObj
const sal_uInt16 sprmSLnc
const sal_uInt16 sprmTDefTable10
const sal_uInt16 sprmPicScale
const sal_uInt16 sprmSDyaTop
const sal_uInt16 sprmCFItalic
const sal_uInt16 sprmPicBrcRight
const sal_uInt16 sprmSDmBinFirst
const sal_uInt16 sprmCFtc
const sal_uInt16 sprmCFStrikeRM
const sal_uInt16 LN_CMajority50
const sal_uInt16 LN_PBrcl
const sal_uInt16 LN_CFDiacColor
const sal_uInt16 LN_CHpsPosAdj
const sal_uInt16 LN_CDefault
const sal_uInt16 LN_PDxaFromText10
const sal_uInt16 LN_TDefTable
const sal_uInt16 LN_PBrcp
const sal_uInt16 LN_PBrcBetween10
const sal_uInt16 LN_THTMLProps
const sal_uInt16 LN_SOlstAnm
const sal_uInt16 LN_CSizePos
const sal_uInt16 LN_PBrcTop10
const sal_uInt16 LN_TSetShdOdd80
const sal_uInt16 LN_CObjLocation
const sal_uInt16 LN_TDefTable10
const sal_uInt16 LN_CHpsNew50
const sal_uInt16 LN_CFFtcAsciSymb
const sal_uInt16 LN_PBrcBar10
const sal_uInt16 LN_CHpsInc1
const sal_uInt16 LN_PCrLf
const sal_uInt16 LN_PBrcBottom10
const sal_uInt16 LN_PBrcRight10
const sal_uInt16 LN_PFSideBySide
const sal_uInt16 LN_SDyaPgn
const sal_uInt16 LN_TSetShd80
const sal_uInt16 LN_PicBrcl
const sal_uInt16 LN_PicScale
const sal_uInt16 LN_SGprfIhdt
const sal_uInt16 LN_PHugePapx
const sal_uInt16 LN_PRuler
const sal_uInt16 LN_PISnapBaseLine
const sal_uInt16 LN_SBCustomize
const sal_uInt16 LN_CHpsMul
const sal_uInt16 LN_CIdCharType
const sal_uInt16 LN_CHpsInc
const sal_uInt16 LN_PAnld
const sal_uInt16 LN_PPropRMark
const sal_uInt16 LN_TDiagLine
const sal_uInt16 LN_CFtcDefault
const sal_uInt16 LN_SFFacingCol
const sal_uInt16 LN_PBrcLeft10
const sal_uInt16 LN_SDxaPgn
const sal_uInt16 LN_SFAutoPgn
const sal_uInt16 LN_TSetBrc10
const sal_uInt16 LN_SPropRMark
constexpr OUStringLiteral aData
OString strip(const OString &rIn, char c)
rtl_TextEncoding getBestTextEncodingFromLocale(const css::lang::Locale &rLocale)
std::enable_if< std::is_signed< T >::value, bool >::type checked_add(T a, T b, T &result)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
T sanitizing_min(T a, T b)
std::enable_if< std::is_signed< T >::value, bool >::type checked_multiply(T a, T b, T &result)
std::enable_if< std::is_signed< T >::value, bool >::type checked_sub(T a, T b, T &result)
sal_uInt32 RGBToBGR(::Color nColour)
std::vector< sal_uInt8 > bytes
bool IsEightPlus(WordVersion eVer)
bool IsSevenMinus(WordVersion eVer)
SwNodeOffset min(const SwNodeOffset &a, const SwNodeOffset &b)
const wchar_t *typedef int(__stdcall *DllNativeUnregProc)(int
static LanguageType nLang
TOOLS_DLLPUBLIC OString read_uInt8s_ToOString(SvStream &rStrm, std::size_t nUnits)
OUString read_uInt8_lenPrefixed_uInt8s_ToOUString(SvStream &rStrm, rtl_TextEncoding eEnc)
TOOLS_DLLPUBLIC OUString read_uInt16s_ToOUString(SvStream &rStrm, std::size_t nUnits)
OString read_uInt8_lenPrefixed_uInt8s_ToOString(SvStream &rStrm)
OUString read_uInt8s_ToOUString(SvStream &rStrm, std::size_t nUnits, rtl_TextEncoding eEnc)
TOOLS_DLLPUBLIC bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
bool fCompatibilityOptions_Unknown1_24
bool fCompatibilityOptions_Unknown2_17
bool fCompatibilityOptions_Unknown2_19
bool fDontUseHTMLAutoSpacing
bool fCompatibilityOptions_Unknown2_14
bool fCompatibilityOptions_Unknown1_13
bool fCompatibilityOptions_Unknown2_20
bool fCompatibilityOptions_Unknown2_6
sal_uInt16 grfSuppression
bool fCompatibilityOptions_Unknown1_25
bool fCompatibilityOptions_Unknown1_29
sal_uInt32 GetCompatibilityOptions2() const
bool fCompatibilityOptions_Unknown2_28
bool fCompatibilityOptions_Unknown2_26
bool fCompatibilityOptions_Unknown2_12
bool fTransparentMetafiles
bool fCompatibilityOptions_Unknown1_16
bool copts_fMapPrintTextColor
bool fCompatibilityOptions_Unknown2_16
bool fCompatibilityOptions_Unknown2_22
bool fDontBreakWrappedTables
bool fSuppressTopSpacingMac5
bool fCompatibilityOptions_Unknown2_25
bool fCompatibilityOptions_Unknown2_32
sal_Int32 cParasFootnoteEdn
bool fCompatibilityOptions_Unknown2_27
bool copts_fOrigWordTableRules
bool fCompatibilityOptions_Unknown2_21
bool fReadOnlyRecommended
sal_Int32 cChWSFootnoteEdn
bool bUseThaiLineBreakingRules
bool fCompatibilityOptions_Unknown2_8
bool fCompatibilityOptions_Unknown2_24
sal_Int32 cDBCFootnoteEdn
void SetCompatibilityOptions(sal_uInt32 a32Bit)
bool fCompatibilityOptions_Unknown2_4
bool fCompatibilityOptions_Unknown1_26
bool fCompatibilityOptions_Unknown2_13
sal_Int32 cWordsFootnoteEnd
bool fCompatibilityOptions_Unknown1_23
bool copts_fConvMailMergeEsc
bool copts_fSuppressSpbfAfterPgBrk
bool fCompatibilityOptions_Unknown2_10
bool fSuppressSpbfAfterPageBreak
bool fCompatibilityOptions_Unknown2_23
bool fCompatibilityOptions_Unknown1_28
bool fSwapBordersFacingPgs
bool fCompatibilityOptions_Unknown2_2
bool fCompatibilityOptions_Unknown2_7
bool fCompatibilityOptions_Unknown1_30
bool fCompatibilityOptions_Unknown2_9
bool fCompatibilityOptions_Unknown2_18
bool fCompatibilityOptions_Unknown2_29
sal_uInt16 wScaleSaved
Specifies the zoom percentage that was in use when the document was saved.
bool copts_fNoSpaceRaiseLower
bool fCompatibilityOptions_Unknown1_21
bool copts_fNoColumnBalance
bool fCompatibilityOptions_Unknown2_30
bool fCompatibilityOptions_Unknown1_31
sal_uInt16 iTextLineEnding
void Write(SvStream &rStrm, WW8Fib &rFib) const
bool fCompatibilityOptions_Unknown1_27
bool copts_fShowBreaksInFrames
bool fCompatibilityOptions_Unknown2_1
bool copts_fSuppressTopSpacing
bool fPagSuppressTopSpacing
bool fCompatibilityOptions_Unknown2_31
sal_uInt32 GetCompatibilityOptions() const
sal_Int32 cLinesFootnoteEdn
bool fCompatibilityOptions_Unknown2_5
bool copts_fSwapBordersFacingPgs
WW8DopTypography doptypography
bool fDoNotEmbedSystemFont
bool fCompatibilityOptions_Unknown2_15
bool fUseBackGroundInAllmodes
void SetCompatibilityOptions2(sal_uInt32 a32Bit)
bool copts_fWrapTrailSpaces
bool copts_fTransparentMetafiles
bool fCompatibilityOptions_Unknown1_15
sal_uInt16 nId
WW-id for fields.
WW8_CP nLen
total length (to skip over text)
sal_uInt8 nOpt
WW-Flags ( e.g.: changed by user )
WW8_CP nSCode
start of instructions code
bool bCodeNest
instruction used recursively
WW8_CP nLRes
length ( == 0, if no result )
WW8_CP nSRes
start of result
bool bResNest
instruction inserted into result
const sal_uInt8 * pMemPos
tools::Long nOrigSprmsLen
void Save(WW8PLCFxSave1 &rSave) const
void Restore(const WW8PLCFxSave1 &rSave)
const sal_uInt8 * pMemPos
sal_uInt32 nPLCFxPos2
for PLCF_Cp_Fkp: PieceIter-Pos
WW8_CP nStartCp
for cp based iterator like PAP and CHP
WW8PLCFxSave1 aS[WW8PLCFMan::MAN_PLCF_COUNT]
sal_uInt8 brcType() const
sal_uInt8 dxpLineWidth() const
sal_uInt8 dxpSpace() const
sal_uInt8 brcType() const
sal_uInt8 dptLineWidth() const
sal_uInt8 dptSpace() const
short DetermineBorderProperties(short *pSpace=nullptr) const
sal_uInt8 dptSpace() const
sal_uInt8 dptLineWidth() const
sal_uInt8 brcType() const
short DetermineBorderProperties(short *pSpace) const
base for reading AND working on (will have different subclasses
This is what we use in the Parser (and Dumper)
#define ERR_SWG_READ_ERROR
Word2CHPX ReadWord2Chpx(SvStream &rSt, std::size_t nOffset, sal_uInt8 nSize)
std::vector< sal_uInt8 > ChpxToSprms(const Word2CHPX &rChpx)
static bool WW8GetFieldPara(WW8PLCFspecial &rPLCF, WW8FieldDesc &rF)
static void lcl_checkFontname(OUString &sString)
static bool IsExpandableSprm(sal_uInt16 nSpId)
const int nSmallestPossibleFib
static sal_uInt32 Get_ULong(sal_uInt8 *&p)
static sal_Int32 Get_Long(sal_uInt8 *&p)
static sal_uInt16 Get_UShort(sal_uInt8 *&p)
void WW8ReadSTTBF(bool bVer8, SvStream &rStrm, sal_uInt32 nStart, sal_Int32 nLen, sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector< OUString > &rArray, std::vector< ww::bytes > *pExtraArray, std::vector< OUString > *pValueArray)
reads array of strings (see MS documentation: String Table stored in File) returns NOT the original p...
bool checkRead(SvStream &rSt, void *pDest, sal_uInt32 nLength)
OUString read_uInt16_BeltAndBracesString(SvStream &rStrm)
static constexpr SprmInfoRow InfoRow()
static bool WW8SkipField(WW8PLCFspecial &rPLCF)
OUString read_uInt8_BeltAndBracesString(SvStream &rStrm, rtl_TextEncoding eEnc)
static sal_Int16 Get_Short(sal_uInt8 *&p)
static sal_uInt8 Get_Byte(sal_uInt8 *&p)
static bool IsReplaceAllSprm(sal_uInt16 nSpId)
const sal_uInt16 lLetterWidth
const sal_uInt16 lLetterHeight
OUString read_uInt16_PascalString(SvStream &rStrm)
void Set_UInt32(sal_uInt8 *&p, sal_uInt32 n)
void Set_UInt8(sal_uInt8 *&p, sal_uInt8 n)
void Set_UInt16(sal_uInt8 *&p, sal_uInt16 n)