77 pNextBand(nullptr), nGapHalf(0), mnDefaultLeft(0), mnDefaultTop(0), mnDefaultRight(0),
78 mnDefaultBottom(0), mbHasSpacing(false), nLineHeight(0), nRows(0), nCenter{}, nWidth{},
79 nWwCols(0), nSwCols(0), bLEmptyCol(
false), bREmptyCol(
false), bCantSplit(
false),
80 bCantSplit90(
false), pTCs(
nullptr), nOverrideSpacing{}, nOverrideValues{}, pSHDs(
nullptr),
81 pNewSHDs(
nullptr), bExist{}, nTransCell{}
83 for (sal_uInt16 & rn : maDirections)
99 if( !
close( rPos, eType ) )
105 OSL_ENSURE( bResult,
"close without open!");
113 "should not be possible, must be at least one segment");
121 "should not be possible, must be at least one segment");
129 "should not be possible, must be at least one segment");
138 "should not be possible, must be at least one segment");
181 OSL_ENSURE(!m_aFootnoteStack.empty(),
"footnote end without start");
182 if (m_aFootnoteStack.empty())
185 bool bFtEdOk =
false;
191 sal_Int32
nPos = m_pPaM->GetPoint()->nContent.GetIndex();
198 sChar += OUStringChar(pText->
GetText()[--nPos]);
200 --m_pPaM->GetMark()->nContent;
201 std::shared_ptr<SwUnoCursor> xLastAnchorCursor(m_pLastAnchorPos ?
m_rDoc.
CreateUnoCursor(*m_pLastAnchorPos) :
nullptr);
202 m_pLastAnchorPos.reset();
204 m_pPaM->DeleteMark();
205 if (xLastAnchorCursor)
206 m_pLastAnchorPos.reset(
new SwPosition(*xLastAnchorCursor->GetPoint()));
208 pFN = pText->
InsertItem(aFootnote, nPos, nPos);
210 OSL_ENSURE(pFN,
"Problems creating the footnote text");
216 m_xPlcxMan->SaveAllPLCFx( aSave );
217 std::shared_ptr<WW8PLCFMan> xOldPlcxMan = m_xPlcxMan;
220 OSL_ENSURE(pSttIdx,
"Problems creating footnote text");
224 bool bOld = m_bFootnoteEdn;
225 m_bFootnoteEdn =
true;
230 m_bFootnoteEdn = bOld;
232 OSL_ENSURE(sChar.getLength()==1 && ((rDesc.
mbAutoNum == (sChar[0] == 2))),
233 "footnote autonumbering must be 0x02, and everything else must not be");
248 if (pTNd && !pTNd->
GetText().isEmpty() && !sChar.isEmpty())
250 const OUString &rText = pTNd->
GetText();
251 if (rText[0] == sChar[0])
254 sal_Int32 nFirstLineIndent=0;
263 m_pPaM->GetPoint()->nContent.Assign( pTNd, 0 );
266 if (nFirstLineIndent < 0 && rText.getLength() > 1 && rText[1] == 0x09)
267 ++m_pPaM->GetMark()->nContent;
268 ++m_pPaM->GetMark()->nContent;
269 m_xReffingStck->Delete(*m_pPaM);
271 m_pPaM->DeleteMark();
275 *m_pPaM->GetPoint() = aTmpPos;
277 m_xPlcxMan = xOldPlcxMan;
278 m_xPlcxMan->RestoreAllPLCFx( aSave );
282 m_aSectionManager.SetCurrentSectionHasFootnote();
284 m_aFootnoteStack.pop_back();
306 if (
const void*
pData = pEndNote ? pEndNote->
GetData() :
nullptr)
313 if (
const void*
pData = pFootNote ? pFootNote->
GetData() :
nullptr)
320 m_aFootnoteStack.push_back(aDesc);
331 std::set<std::pair<WW8_CP, WW8_CP>> aPrevRes;
341 aSprmRes = pPap->
HasSprm(0x6649);
345 if (nLevel + 1 == *pLevel)
350 OSL_ENSURE(!nLevel || pLevel,
"sublevel without level sprm");
367 if (!aPrevRes.insert(aBounds).second)
369 SAL_WARN(
"sw.ww8",
"SearchRowEnd, loop in paragraph property chain");
388 std::set<std::pair<WW8_CP, WW8_CP>> aPrevRes;
408 if (!aPrevRes.insert(aBounds).second)
410 SAL_WARN(
"sw.ww8",
"SearchTableEnd, loop in paragraph property chain");
421 const WW8_TablePos *pTopLevelTable = nCellLevel <= 1 ? pTabPos :
nullptr;
425 sal_uInt16
const nStyle(m_xPlcxMan->GetColl());
426 if (!m_bTxbxFlySection && nStyle < m_vColl.size())
427 aRet.
mpStyleApo = StyleExists(nStyle) ? m_vColl[nStyle].m_xWWFly.get() :
nullptr;
448 aRet.
m_bHasSprm37 = m_xPlcxMan->HasParaSprm(m_bVer67 ? 37 : 0x2423).pSprm !=
nullptr;
449 SprmResult aSrpm29 = m_xPlcxMan->HasParaSprm(m_bVer67 ? 29 : 0x261B);
455 bool bNowApo = aRet.
HasFrame() || pTopLevelTable;
458 if (!ConstructApo(aRet, pTabPos))
462 bool bTestAllowed = !m_bTxbxFlySection && !bTableRowEnd;
471 if (nCellLevel == m_nInTable)
480 OSL_ENSURE(m_xTableDesc,
"What!");
481 bTestAllowed =
false;
490 m_xTableDesc->GetCurrentCol() == 0 &&
491 ( !m_xTableDesc->IsValidCell( m_xTableDesc->GetCurrentCol() ) ||
492 m_xTableDesc->InFirstParaInCell() );
501 aRet.
mbStartApo = bNowApo && !InEqualOrHigherApo(1);
502 aRet.
mbStopApo = InEqualOrHigherApo(nCellLevel) && !bNowApo;
510 if (bNowApo && InEqualApo(nCellLevel))
513 if (!TestSameApo(aRet, pTabPos))
526 SVX_NUM_ARABIC, SVX_NUM_ARABIC };
528 static const SvxAdjust eAdjA[4] = { SvxAdjust::Left,
529 SvxAdjust::Right, SvxAdjust::Left, SvxAdjust::Left };
563 if ((rAV.
aBits1 & 0x4) >> 2)
571 sal_Int16 nIndent = std::abs(static_cast<sal_Int16>(SVBT16ToUInt16( rAV.
dxaIndent )));
580 if( rAV.
nfc == 5 || rAV.
nfc == 7 )
588 const sal_uInt8* pText,
size_t nStart,
size_t nElements,
bool bOutline)
590 if (nStart > nElements)
596 bool bInsert =
false;
597 rtl_TextEncoding eCharSet = m_eStructCharSet;
599 const WW8_FFN* pF = m_xFonts->GetFont(SVBT16ToUInt16(rAV.
ftc));
600 bool bListSymbol = pF && ( pF->
aFFNBase.
chs == 2 );
602 OUStringBuffer sText;
606 if (nLen > nElements)
608 SAL_WARN(
"sw.ww8",
"SetAnlvStrings: ignoring out of range "
609 << nLen <<
" vs " << nElements <<
" max");
612 sText = OUString(reinterpret_cast<char const *>(pText), nLen, eCharSet);
619 if (nLen > nElements / 2)
621 SAL_WARN(
"sw.ww8",
"SetAnlvStrings: ignoring out of range "
622 << nLen <<
" vs " << nElements / 2 <<
" max");
625 for(sal_uInt32
i = 0;
i < nLen; ++
i, pText += 2)
627 sText.append(static_cast<sal_Unicode>(SVBT16ToUInt16(*reinterpret_cast<SVBT16 const *>(pText))));
659 if( GetFontParams( SVBT16ToUInt16( rAV.
ftc ), eFamily, aName,
660 ePitch, eCharSet ) ){
687 OUString sP( sText.copy( 0, rAV.
cbTextBefore ).makeStringAndClear() );
715 pNumR->
Set(nSwLevel, aNF);
725 if( m_xStyles->mpStyRule )
726 return m_xStyles->mpStyRule;
728 const OUString aBaseName(
"WW8StyleNum");
736 m_xStyles->mpStyRule->SetAutoRule(
false);
738 return m_xStyles->mpStyRule;
744 m_nSwNumLevel = 0xff;
755 if (pColl !=
nullptr && pColl->
m_bColl && *pData)
761 m_nSwNumLevel = *pData - 1;
762 if (!m_bNoAttrImport)
763 static_cast<SwTextFormatColl*
>(m_pCurrentColl)->AssignToListLevelOfOutlineStyle( m_nSwNumLevel );
770 else if( *pData == 10 || *pData == 11 )
773 m_xStyles->mnWwNumLevel = *pData;
789 if( !m_pCurrentColl || nLen <= 0
790 || (pStyInf && !pStyInf->
m_bColl)
793 m_nSwNumLevel = 0xff;
799 SAL_WARN(
"sw.ww8",
"ANLevelDesc property is " << nLen <<
" long, needs to be at least " <<
sizeof(
WW8_ANLD));
800 m_nSwNumLevel = 0xff;
804 if (m_nSwNumLevel <= 9)
810 const OUString
aName(
"Outline");
816 SetAnld(&aNR, reinterpret_cast<WW8_ANLD const *>(pData), m_nSwNumLevel,
true);
821 else if( m_xStyles->mnWwNumLevel == 10 || m_xStyles->mnWwNumLevel == 11 ){
823 SetAnld(pNR, reinterpret_cast<WW8_ANLD const *>(pData), 0,
false);
826 pStyInf = GetStyle(m_nCurrentColl);
827 if (pStyInf !=
nullptr)
846 for (i = 0, pAV1 = pO->
rganlv; i < nSwLevel; ++i, ++pAV1)
852 pNumR->
Set(nSwLevel, aNF);
867 SAL_WARN(
"sw.ww8",
"WW8_OLST property is " << nLen <<
" long, needs to be at least " <<
sizeof(
WW8_OLST));
872 *m_xNumOlst = *
reinterpret_cast<WW8_OLST const *
>(pData);
878 if( nWwLevelNo == 12 )
880 else if( nWwLevelNo == 10 )
882 else if( nWwLevelNo == 11 )
884 else if( nWwLevelNo > 0 && nWwLevelNo <= 9 )
891 const OUString& rNumRule =
WW8_Numbering == nNumType ? msNumberingNumRule : msOutlineNumRule;
892 if (rNumRule.isEmpty())
900 msNumberingNumRule = rNumRule;
902 msOutlineNumRule = rNumRule;
909 m_bCurrentAND_fNumberAcross =
false;
924 sNumRule = m_xTableDesc->GetNumRuleName();
925 if (!sNumRule.isEmpty())
949 if (sNumRule.isEmpty())
963 m_xTableDesc->SetNumRuleName(pNumRule->
GetName());
969 sNumRule = pNumRule ? pNumRule->
GetName() : OUString();
971 m_xCtrlStck->NewAttr(*m_pPaM->GetPoint(),
974 m_aANLDRules.SetNumRule(sNumRule, m_nWwNumType);
989 if (*pSprm13 == 10 || *pSprm13 == 11)
998 SetAnld(pNumRule, reinterpret_cast<WW8_ANLD const *>(aS12.
pSprm), m_nSwNumLevel,
false);
1001 else if( *pSprm13 > 0 && *pSprm13 <=
MAXLEVEL )
1003 m_nSwNumLevel = *pSprm13 - 1;
1005 if (pNumRule && !pNumRule->
GetNumFormat(m_nSwNumLevel))
1010 for (
sal_uInt8 nI = 0; nI < m_nSwNumLevel; ++nI)
1013 SetNumOlst(pNumRule, m_xNumOlst.get(), nI);
1016 SetNumOlst(pNumRule, m_xNumOlst.get(), m_nSwNumLevel);
1023 SetAnld(pNumRule, reinterpret_cast<WW8_ANLD const *>(aS12.
pSprm), m_nSwNumLevel,
false);
1028 m_nSwNumLevel = 0xff;
1047 StopAnlToRestart(
WW8_None, bGoBack);
1057 *m_pPaM->GetPoint() = aTmpPos;
1062 m_aANLDRules.msNumberingNumRule.clear();
1068 bool bNumberingNotStopOutline =
1071 if (!bNumberingNotStopOutline)
1072 m_aANLDRules.msOutlineNumRule.clear();
1074 m_nSwNumLevel = 0xff;
1091 memcpy( pSHDs, rBand.
pSHDs, nWwCols *
sizeof(
WW8_SHD ) );
1095 pNewSHDs =
new Color[nWwCols];
1098 memcpy(aDefBrcs, rBand.
aDefBrcs,
sizeof(aDefBrcs));
1120 nLen -= 2 * (nCols + 1);
1124 short nOldCols = nWwCols;
1128 for (
int i = 0;
i <= nCols;
i++, pT+=2)
1129 nCenter[
i] = static_cast<sal_Int16>(SVBT16ToUInt16( pT ));
1131 if( nCols != nOldCols )
1141 short nFileCols = nLen / ( bVer67 ? 10 : 20 );
1149 short nColsToRead = std::min<short>(nFileCols, nCols);
1151 if (nColsToRead <= 0)
1168 for (
int i = 0;
i < nColsToRead;
i++, ++pCurrentTC,++pTc)
1172 pCurrentTC->bFirstMerged =
sal_uInt8( ( aBits1 & 0x01 ) != 0 );
1173 pCurrentTC->bMerged =
sal_uInt8( ( aBits1 & 0x02 ) != 0 );
1182 if( ( pCurrentTC->bMerged )
1198 for (
int k = 0; k < nColsToRead; ++k, ++pCurrentTC, ++pTc )
1200 sal_uInt16 aBits1 = SVBT16ToUInt16( pTc->
aBits1Ver8 );
1201 pCurrentTC->bFirstMerged =
sal_uInt8( ( aBits1 & 0x0001 ) != 0 );
1202 pCurrentTC->bMerged =
sal_uInt8( ( aBits1 & 0x0002 ) != 0 );
1203 pCurrentTC->bVertical =
sal_uInt8( ( aBits1 & 0x0004 ) != 0 );
1204 pCurrentTC->bBackward =
sal_uInt8( ( aBits1 & 0x0008 ) != 0 );
1205 pCurrentTC->bRotateFont =
sal_uInt8( ( aBits1 & 0x0010 ) != 0 );
1206 pCurrentTC->bVertMerge =
sal_uInt8( ( aBits1 & 0x0020 ) != 0 );
1207 pCurrentTC->bVertRestart =
sal_uInt8( ( aBits1 & 0x0040 ) != 0 );
1208 pCurrentTC->nVertAlign = ( ( aBits1 & 0x0180 ) >> 7 );
1222 for (
int k = 0; k < nCols; ++k)
1224 if(maDirections[k] == 4)
1226 if(pTCs[k].bVertical)
1228 if(pTCs[k].bBackward)
1229 maDirections[k] = 3;
1231 maDirections[k] = 1;
1239 if( !pParamsTSetBRC || !pTCs )
1244 SAL_WARN(
"sw.ww8",
"table border property is too short");
1252 if (nitcFirst >= nWwCols)
1255 if (nitcLim > nWwCols)
1258 bool bChangeRight = (nFlag & 0x08) != 0;
1259 bool bChangeBottom = (nFlag & 0x04) != 0;
1260 bool bChangeLeft = (nFlag & 0x02) != 0;
1261 bool bChangeTop = (nFlag & 0x01) != 0;
1263 WW8_TCell* pCurrentTC = pTCs + nitcFirst;
1269 SAL_WARN(
"sw.ww8",
"table border property is too short");
1272 brcVer9 =
WW8_BRCVer9(
WW8_BRC(*reinterpret_cast<WW8_BRCVer6 const *>(pParamsTSetBRC+3)));
1274 else if( nBrcVer == 8 )
1276 static_assert(
sizeof (
WW8_BRC) == 4,
"this has to match the msword size");
1277 if (nParamsLen <
sizeof(
WW8_BRC) + 3)
1279 SAL_WARN(
"sw.ww8",
"table border property is too short");
1282 brcVer9 =
WW8_BRCVer9(*reinterpret_cast<WW8_BRC const *>(pParamsTSetBRC+3));
1288 SAL_WARN(
"sw.ww8",
"table border property is too short");
1291 brcVer9 = *
reinterpret_cast<WW8_BRCVer9 const *
>(pParamsTSetBRC+3);
1294 for(
int i = nitcFirst;
i < nitcLim; ++
i, ++pCurrentTC )
1314 SAL_WARN(
"sw.ww8",
"table border property is too short");
1318 for (
int i = 0;
i < 6; ++
i)
1321 else if ( nBrcVer == 8 )
1323 static_assert(
sizeof (
WW8_BRC) == 4,
"this has to match the msword size");
1324 if (nParamsLen <
sizeof(
WW8_BRC) * 6)
1326 SAL_WARN(
"sw.ww8",
"table border property is too short");
1329 for(
int i = 0;
i < 6; ++
i )
1330 aDefBrcs[
i] =
WW8_BRCVer9(reinterpret_cast<WW8_BRC const *>(pParams)[
i]);
1334 if (nParamsLen <
sizeof( aDefBrcs ))
1336 SAL_WARN(
"sw.ww8",
"table border property is too short");
1339 memcpy( aDefBrcs, pParams,
sizeof( aDefBrcs ) );
1348 if( !(nWwCols && pParamsTDxaCol) )
1353 short nDxaCol =
static_cast<sal_Int16
>(SVBT16ToUInt16( pParamsTDxaCol + 2 ));
1355 for(
int i = nitcFirst; (
i < nitcLim) && (
i < nWwCols);
i++ )
1357 const short nOrgWidth = nCenter[
i+1] - nCenter[
i];
1358 const short nDelta = nDxaCol - nOrgWidth;
1359 for(
int j =
i+1; j <= nWwCols; j++ )
1361 nCenter[j] = nCenter[j] + nDelta;
1368 if( !nWwCols || !pParamsTInsert )
1371 sal_uInt8 nitcInsert = pParamsTInsert[0];
1375 sal_uInt16 ndxaCol = SVBT16ToUInt16( pParamsTInsert+2 );
1378 if (nitcInsert > nWwCols)
1380 nNewWwCols = nitcInsert+nctc;
1386 nctc = ::sal::static_int_cast<
sal_uInt8>(nNewWwCols-nitcInsert);
1391 nNewWwCols = nWwCols+nctc;
1397 nctc = ::sal::static_int_cast<
sal_uInt8>(nNewWwCols-nWwCols);
1405 memcpy( pTC2s, pTCs, nWwCols *
sizeof(
WW8_TCell ) );
1411 if (nitcInsert <= nWwCols)
1414 nCenter[nWwCols + nctc] = nCenter[nWwCols]+nctc*ndxaCol;
1415 for(
int i = nWwCols-1;
i >= nitcInsert;
i--)
1418 nCenter[
i + nctc] = nCenter[
i]+nctc*ndxaCol;
1421 pTCs[
i + nctc] = pTCs[
i];
1426 for(
int i = nWwCols;
i > nitcInsert+nWwCols;
i--)
1427 nCenter[
i] =
i ? (nCenter[
i - 1]+ndxaCol) : 0;
1430 for(
int j = 0;j < nctc; j++)
1431 nCenter[j + nitcInsert] = (j + nitcInsert) ? (nCenter[j + nitcInsert -1]+ndxaCol) : 0;
1433 nWwCols = nNewWwCols;
1441 sal_uInt16
nCode = SVBT16ToUInt16(pParams);
1443 OSL_ENSURE(nStartCell < nEndCell,
"not as I thought");
1444 OSL_ENSURE(nEndCell <
MAX_COL + 1,
"not as I thought");
1450 for (;nStartCell < nEndCell; ++nStartCell)
1451 maDirections[nStartCell] = nCode;
1456 sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
1457 OSL_ENSURE(nLen == 6,
"Unexpected spacing len");
1461 #if OSL_DEBUG_LEVEL > 0
1463 OSL_ENSURE(nWhichCell == 0,
"Expected cell to be 0!");
1469 OSL_ENSURE(nSideBits < 0x10,
"Unexpected value for nSideBits");
1471 sal_uInt16
nValue = SVBT16ToUInt16( pParams );
1472 for (
int i = wwTOP;
i <= wwRIGHT;
i++)
1474 switch (nSideBits & (1 <<
i))
1477 mnDefaultTop = nValue;
1480 mnDefaultLeft = nValue;
1483 mnDefaultBottom = nValue;
1486 mnDefaultRight = nValue;
1491 OSL_ENSURE(
false,
"Impossible");
1499 sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
1500 OSL_ENSURE(nLen == 6,
"Unexpected spacing len");
1504 const sal_uInt8 nStartCell = *pParams++;
1506 OSL_ENSURE(nStartCell <
MAX_COL + 1,
"Cell out of range in spacings");
1507 if ( nStartCell >= nEndCell || nEndCell >
MAX_COL+1 )
1511 OSL_ENSURE(nSideBits < 0x10,
"Unexpected value for nSideBits");
1514 OSL_ENSURE(nSizeType == 0x3,
"Unexpected non-twip value for margin width");
1515 if ( nSizeType != 0x3 )
1518 sal_uInt16
nValue = SVBT16ToUInt16( pParams );
1520 for (
int nCell = nStartCell; nCell < nEndCell; ++nCell)
1522 nOverrideSpacing[ nCell ] |= nSideBits;
1523 OSL_ENSURE(nOverrideSpacing[ nCell ] < 0x10,
"Unexpected value for nSideBits");
1525 for (
int i=0;
i < 4;
i++)
1527 if (nSideBits & (1 <<
i))
1528 nOverrideValues[ nCell ][
i ] = nValue;
1535 if( !(nWwCols && pParamsTDelete) )
1539 if (nitcFirst >= nWwCols)
1542 if (nitcLim <= nitcFirst)
1549 int nShlCnt = nWwCols - nitcLim;
1553 WW8_TCell* pCurrentTC = pTCs + nitcFirst;
1555 while( i < nShlCnt )
1558 nCenter[nitcFirst + i] = nCenter[nitcLim + i];
1561 *pCurrentTC = pTCs[ nitcLim + i];
1567 nCenter[nitcFirst + i] = nCenter[nitcLim + i];
1570 short nCellsDeleted = nitcLim - nitcFirst;
1572 if (nCellsDeleted > nWwCols)
1573 nCellsDeleted = nWwCols;
1574 nWwCols -= nCellsDeleted;
1590 short nCount = nLen >> 1;
1591 if (nCount > nWwCols)
1596 for(i=0, pShd = reinterpret_cast<SVBT16 const *>(pS); i<nCount; i++, pShd++ )
1597 pSHDs[i].SetWWValue( *pShd );
1603 if (!nLen || nStart >= nWwCols)
1607 pNewSHDs =
new Color[nWwCols];
1609 short nCount = nLen / 10 + nStart;
1610 if (nCount > nWwCols)
1628 if (aRes.
pSprm ==
nullptr)
1644 sprmTDefTableNewShd, sprmTDefTableNewShd2nd, sprmTDefTableNewShd3rd,
1645 sprmTCellPadding, sprmTCellPaddingDefault
1658 return sprmTTableWidth;
1660 return sprmTTextFlow;
1688 return sprmTDefTableNewShd;
1690 return sprmTDefTableNewShd2nd;
1692 return sprmTDefTableNewShd3rd;
1694 return sprmTTableBorders90;
1698 return sprmTSetBrc90;
1700 return sprmTCellPadding;
1702 return sprmTCellPaddingDefault;
1767 m_pFirstBand(nullptr),
1768 m_pActBand(nullptr),
1769 m_pTableNd(nullptr),
1770 m_pTabLines(nullptr),
1771 m_pTabLine(nullptr),
1772 m_pTabBoxes(nullptr),
1774 m_pCurrentWWCell(nullptr),
1776 m_nDefaultSwCols(0),
1781 m_nPreferredWidth(0),
1784 m_bClaimLineFormat(false),
1785 m_eOri(
text::HoriOrientation::
LEFT),
1788 m_nCurrentBandRow(0),
1792 m_pParentPos(nullptr),
1793 m_pFlyFormat(nullptr),
1796 m_pIo->m_bCurrentAND_fNumberAcross =
false;
1798 static const sal_Int16 aOriArr[] =
1800 text::HoriOrientation::LEFT, text::HoriOrientation::CENTER, text::HoriOrientation::RIGHT, text::HoriOrientation::CENTER
1807 m_pIo->m_xPlcxMan->GetPap()->Save( aSave );
1818 short nTabeDxaNew = SHRT_MAX;
1819 bool bTabRowJustRead =
false;
1821 const sal_uInt8* pNewShadeSprm[3] = {
nullptr,
nullptr,
nullptr};
1822 const sal_uInt8* pTableBorders =
nullptr;
1823 sal_uInt16 nTableBordersLen = 0;
1824 const sal_uInt8* pTableBorders90 =
nullptr;
1825 sal_uInt16 nTableBorders90Len = 0;
1827 std::vector<std::pair<const sal_uInt8*, sal_uInt16>> aTSetBrcs, aTSetBrc90s;
1831 if(!(m_pIo->SearchRowEnd(pPap, nStartCp, m_pIo->m_nInTable)))
1843 for (
int nLoop = 0; nLoop < 2; ++nLoop)
1846 while (aSprmIter.GetSprms() &&
nullptr != (pParams = aSprmIter.GetCurrentParams()))
1848 sal_uInt16
nId = aSprmIter.GetCurrentId();
1849 sal_Int32 nFixedLen = aSprmParser.DistanceToData(nId);
1850 sal_Int32 nL = aSprmParser.GetSprmSize(nId, aSprmIter.GetSprms(), aSprmIter.GetRemLen());
1851 sal_Int32 nLen = nL - nFixedLen;
1855 case sprmTTableWidth:
1861 m_nPreferredWidth = b2 * 0x100 + b1;
1864 m_nPercentWidth = (b2 * 0x100 + b1);
1866 if ( m_nPercentWidth >= 0 && m_nPercentWidth <= 30000 )
1867 m_nPercentWidth *= .02;
1869 m_nPercentWidth = 100;
1878 m_bClaimLineFormat =
true;
1881 pTableBorders = pParams;
1882 nTableBordersLen = nLen;
1884 case sprmTTableBorders90:
1885 pTableBorders90 = pParams;
1886 nTableBorders90Len = nLen;
1890 if ( m_nRowsToRepeat == m_nRows )
1891 m_nRowsToRepeat = (m_nRows + 1);
1896 m_eOri = aOriArr[*pParams & 0x3];
1899 m_bIsBiDi = SVBT16ToUInt16(pParams) != 0;
1902 pNewBand->
nGapHalf =
static_cast<sal_Int16
>(SVBT16ToUInt16( pParams ));
1905 pNewBand->
nLineHeight =
static_cast<sal_Int16
>(SVBT16ToUInt16( pParams ));
1906 m_bClaimLineFormat =
true;
1909 pNewBand->
ReadDef(bOldVer, pParams, nLen);
1910 bTabRowJustRead =
true;
1913 pShadeSprm = pParams;
1915 case sprmTDefTableNewShd:
1916 pNewShadeSprm[0] = pParams;
1918 case sprmTDefTableNewShd2nd:
1919 pNewShadeSprm[1] = pParams;
1921 case sprmTDefTableNewShd3rd:
1922 pNewShadeSprm[2] = pParams;
1930 short nDxaNew =
static_cast<sal_Int16
>(SVBT16ToUInt16( pParams ));
1931 if( nDxaNew < nTabeDxaNew )
1932 nTabeDxaNew = nDxaNew;
1936 aTSetBrcs.emplace_back(pParams, nLen);
1939 aTSetBrc90s.emplace_back(pParams, nLen);
1950 case sprmTCellPaddingDefault:
1953 case sprmTCellPadding:
1959 aSprmIter.advance();
1974 if (bTabRowJustRead)
1979 pNewBand->
ReadShd(pShadeSprm);
1980 if (pNewShadeSprm[0])
1981 pNewBand->
ReadNewShd(pNewShadeSprm[0], bOldVer, 0);
1982 if (pNewShadeSprm[1])
1983 pNewBand->
ReadNewShd(pNewShadeSprm[1], bOldVer, 22);
1984 if (pNewShadeSprm[2])
1985 pNewBand->
ReadNewShd(pNewShadeSprm[2], bOldVer, 44);
1986 if (pTableBorders90)
1988 else if (pTableBorders)
1990 pTableBorders, nTableBordersLen);
1991 for (
const auto& a : aTSetBrcs)
1993 for (
const auto& a : aTSetBrc90s)
1997 if( nTabeDxaNew < SHRT_MAX )
1999 short* pCenter = pNewBand->
nCenter;
2000 short firstDxaCenter = *pCenter;
2001 for(
int i = 0;
i < pNewBand->
nWwCols;
i++, ++pCenter )
2006 (nTabeDxaNew - (firstDxaCenter + pNewBand->
nGapHalf));
2011 m_pActBand = m_pFirstBand = pNewBand;
2015 m_pActBand = pNewBand;
2022 m_pActBand->
nRows++;
2048 SprmResult aParamsRes = HasTabCellSprm(pPap, bOldVer);
2053 if (!pParams || aParamsRes.
nRemainingData < 1 || (1 != *pParams) ||
2054 (pLevel && aLevelRes.
nRemainingData >= 1 && (*pLevel <= m_pIo->m_nInTable)))
2060 WW8_CP nMyStartCp=nStartCp;
2061 if (m_pIo->SearchRowEnd(pPap, nMyStartCp, m_pIo->m_nInTable))
2062 if (m_pIo->ParseTabPos(&aTabPos, pPap))
2071 m_pIo->m_xPlcxMan->GetPap()->nOrigStartPos = aRes.
nStartPos;
2072 m_pIo->m_xPlcxMan->GetPap()->nCpOfs = aRes.
nCpOfs;
2083 ApoTestResults aApo = m_pIo->TestApo(m_pIo->m_nInTable + 1,
false, pTabPos);
2096 if (m_pIo->ConstructApo(aApo, pTabPos))
2102 SAL_WARN(
"sw.ww8",
"WW8TabDesc End same as Start, abandoning to avoid looping");
2111 if( m_pActBand->nRows > 1 )
2116 m_pActBand->nRows--;
2117 pNewBand->
nRows = 1;
2118 m_pActBand->pNextBand = pNewBand;
2126 m_pIo->m_xPlcxMan->GetPap()->Restore( aSave );
2144 short nMinCols = SHRT_MAX;
2176 short nOrigWidth[
MAX_COL + 1];
2194 if (nCellWidth != nOrigWidth[
i])
2196 if (nOrigWidth[i] == 0)
2200 else if ((nCellWidth <= 0) && (nOrigWidth[i] > 0))
2218 if(
m_eOri == text::HoriOrientation::RIGHT)
2243 for (
int k = 0; k < pR->
nWwCols; ++k)
2246 for (
int i = 0;
i < 4; ++
i)
2268 j = (k == pR->
nWwCols - 1) ? 3 : 5;
2287 for (i = 0; i < pR->
nWwCols; ++i)
2302 OSL_ENSURE(i,
"no columns in row ?");
2309 if (i && !pR->
bExist[i-1])
2312 while (k && !pR->
bExist[k])
2314 for (sal_uInt16
n=k+1;
n<i;
n++)
2326 if ((m_nMinLeft && !
m_bIsBiDi && text::HoriOrientation::LEFT ==
m_eOri) ||
2327 (m_nMinLeft != -108 &&
m_bIsBiDi && text::HoriOrientation::RIGHT ==
m_eOri))
2328 m_eOri = text::HoriOrientation::LEFT_AND_WIDTH;
2343 OSL_ENSURE(pApply,
"No frame");
2359 "should not be possible, must be at least one segment");
2372 bool bSetMinHeight =
false;
2388 bSetMinHeight =
true;
2420 if ( bIsInsideMargin && bAdjustMargin )
2421 m_eOri = text::HoriOrientation::LEFT_AND_WIDTH;
2424 if (
m_eOri == text::HoriOrientation::LEFT_AND_WIDTH )
2450 OSL_ENSURE(pTableNode,
"no table node!");
2463 if (
const SfxItemSet* pSet = pNd->GetpSwAttrSet())
2467 if (SfxItemState::SET == pSet->GetItemState(
RES_BREAK,
false, &pItem))
2494 m_bIsBiDi ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB,
RES_FRAMEDIR );
2497 if (text::HoriOrientation::LEFT_AND_WIDTH ==
m_eOri)
2508 (eHori == text::HoriOrientation::LEFT_AND_WIDTH))
2551 GetSttNd()->FindTableNode());
2552 OSL_ENSURE(
m_pTableNd,
"Where is my table node" );
2591 "Too few lines, table ended early");
2600 OSL_ENSURE(nCol < m_pTabBoxes->
size(),
2601 "Too few columns, table ended early");
2608 bool bMerge =
false;
2650 aPam.GetPoint()->nNode++;
2694 m_MergeGroups.push_back(std::unique_ptr<WW8SelBoxInfo>(pActMGroup));
2718 pTabBox2 = rBoxes.empty() ?
nullptr : rBoxes.front();
2722 if (!pTabBox2 || !pTabBox2->
GetSttNd())
2746 OSL_ENSURE(
m_xTmpPos &&
m_pIo,
"I've forgotten where the table is anchored");
2779 if((1 < groupIt->size()) && groupIt->row(0)[0])
2781 SwFrameFormat* pNewFormat = groupIt->row(0)[0]->ClaimFrameFormat();
2783 const sal_uInt16 nRowSpan = groupIt->rowsCount();
2784 for (sal_uInt16
n = 0;
n < nRowSpan; ++
n)
2786 auto& rRow = groupIt->row(
n);
2787 for (
size_t i = 0;
i<rRow.size(); ++
i)
2789 const sal_Int32 nRowSpanSet = (
n == 0) && (
i == 0) ?
2791 (-1 * (nRowSpan -
n));
2796 pCurrentBox->
ChgFrameFormat(static_cast<SwTableBoxFormat*>(pNewFormat));
2807 m_MergeGroups.clear();
2822 const short nTolerance = 4;
2824 short nX2 = nX1 + nWidth;
2843 if( ( nX1 > nGrX1 ) && ( nX2 < nGrX2 ) )
2853 if( ( ( nX1 > nGrX1 )
2854 && ( nX1 < nGrX2 - 2*nTolerance ) )
2855 || ( ( nX2 > nGrX1 + 2*nTolerance )
2856 && ( nX2 < nGrX2 ) )
2858 || ( ( nX1 <=nGrX1 )
2859 && ( nX2 >=nGrX2 ) ) )
2882 OSL_FAIL(
"Problem with table");
2902 OSL_ENSURE(
false,
"Actual row bigger than expected." );
2984 if(!rSnapToGrid.GetValue())
2988 aGridItem.SetValue(
false);
3028 SvxBoxItemLine::TOP);
3036 SvxBoxItemLine::BOTTOM);
3050 SvxBoxItemLine::LEFT);
3053 aFormatBox.
SetDistance(nLeftDist, SvxBoxItemLine::LEFT);
3058 SvxBoxItemLine::RIGHT);
3061 aFormatBox.
SetDistance(nRightDist,SvxBoxItemLine::RIGHT);
3101 OSL_ENSURE(eDir == SvxFrameDirection::Environment,
"unknown direction code, maybe it's a bitfield");
3104 eDir = SvxFrameDirection::Vertical_LR_BT;
3107 eDir = SvxFrameDirection::Vertical_RL_TB;
3110 eDir = SvxFrameDirection::Vertical_RL_TB;
3113 eDir = bIsBiDi ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
3132 sal_Int16 eVertOri=text::VertOrientation::TOP;
3141 eVertOri = text::VertOrientation::TOP;
3144 eVertOri = text::VertOrientation::CENTER;
3147 eVertOri = text::VertOrientation::BOTTOM;
3162 "Wrong column count in table" );
3212 if( j < m_pActBand->nWwCols )
3321 pTheMergeGroup = pActGroup;
3328 if( pTheMergeGroup )
3337 sal_uInt16 nCol = 0;
3361 for (sal_uInt16 nSize = static_cast< sal_uInt16 >(
m_aNumRuleNames.size()); nSize <= nCol; ++nSize)
3379 std::unique_ptr<WW8FlyPara> pTableWFlyPara;
3384 RndStdIds eAnchor( RndStdIds::FLY_AS_CHAR );
3392 WW8_CP nMyStartCp = nStartCp;
3396 pNestedTabPos = &aNestedTabPos;
3399 if ( pNestedTabPos )
3403 if ( pTableWFlyPara )
3413 eAnchor = RndStdIds::FLY_AT_CHAR;
3421 if( pStyleFormat && pStyleFormat->
GetBreak().
GetBreak() == SvxBreak::PageBefore )
3429 int nNewInTable = m_nInTable + 1;
3431 if ((eAnchor == RndStdIds::FLY_AT_CHAR)
3441 aItemSet.Put( aAnchor );
3444 OSL_ENSURE(
m_xTableDesc->m_pFlyFormat->GetAnchor().GetAnchorId() == eAnchor,
3445 "Not the anchor type requested!" );
3454 if ( pTableWFlyPara && pTableSFlyPara )
3456 WW8FlySet aFlySet( *
this, pTableWFlyPara.get(), pTableSFlyPara, false );
3459 aFlySet.Put( aAnchor );
3465 m_xTableDesc->m_pTable->GetFrameFormat()->GetHoriOrient();
3481 delete pTableSFlyPara;
3497 if( ( nLen > 0 ) && ( *pData == 1 ) )
3503 if( ( nLen > 0 ) && ( *pData == 1 ) )
3524 OSL_ENSURE(
m_xTableDesc,
"Panic, stop table with no table!");
3562 for(sal_uInt16 nI = 0; nI <
m_xStyles->GetCount(); nI++ )
3564 && (nLFOIndex ==
m_vColl[ nI ].m_nLFOIndex) )
3575 for(sal_uInt16 nI = 0; nI <
m_xStyles->GetCount(); nI++ )
3577 && (rName ==
m_vColl[ nI ].GetOrgWWName()) )
3579 pRet =
m_vColl[ nI ].m_pFormat;
3609 #ifdef DEBUGSPRMREADER
3610 fprintf(stderr,
"id is %x\n", aIter.GetCurrentId());
3627 std::unique_ptr<sal_uInt8[]> pSprms(
new sal_uInt8[nLen] );
3635 if ( pSt->
Tell() & 0x1 )
3645 if (!(pSt->
Tell() & 0x1))
3670 if( (1 < cbUPX) || ( (0 < cbUPX) && !bPAP ) )
3690 nLen = nLen - cbUPX;
3712 :
WW8Style(*pI->m_pTableStream, _rFib)
3713 , maSprmParser(_rFib)
3715 , mpStStrm(pI->m_pTableStream)
3716 , mpStyRule(nullptr)
3717 , mpParaSprms(nullptr)
3720 , mbTextColChanged(false)
3721 , mbFontChanged(false)
3722 , mbCJKFontChanged(false)
3723 , mbCTLFontChanged(false)
3724 , mbFSizeChanged(false)
3725 , mbFCTLSizeChanged(false)
3726 , mbWidowsChanged(false)
3727 , mbBidiChanged(false)
3794 pColl = aResult.first;
3795 bStyExist = aResult.second;
3802 pColl = aResult.first;
3803 bStyExist = aResult.second;
3809 if (bImport && bStyExist && rSI.
GetOrgWWName().startsWith(
"WW8Num"))
3831 if (j != nThisStyle && j <
m_cstd )
3912 std::unique_ptr<WW8_STD> xStd(
Read1Style(nSkip, &sName));
3919 if ( !xStd || sName.isEmpty() || ((1 != xStd->sgc) && (2 != xStd->sgc)) )
3926 bool bOldNoImp =
PrepareStyle(rSI, static_cast<ww::sti>(xStd->sti), nNr, xStd->istdNext);
3975 for (i=0; i <
m_cstd; ++i)
4006 std::unique_ptr<WW8_STD> xStd(
Read1Style(nSkip,
nullptr));
4024 std::vector<sal_uInt8> aRet;
4027 aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.
fBold) );
4030 aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.
fItalic) );
4033 aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.
fStrike) );
4036 aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.
fOutline) );
4039 aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.
fSmallCaps) );
4042 aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.
fCaps) );
4045 aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.
fVanish) );
4051 ShortToSVBT16(rChpx.
ftc, a);
4052 aRet.push_back(a[1]);
4053 aRet.push_back(a[0]);
4059 aRet.push_back(rChpx.
kul);
4066 ShortToSVBT16(rChpx.
lid, a);
4067 aRet.push_back(a[1]);
4068 aRet.push_back(a[0]);
4074 aRet.push_back(rChpx.
ico);
4082 ShortToSVBT16(rChpx.
hps, a);
4083 aRet.push_back(a[0]);
4089 aRet.push_back(rChpx.
hpsPos);
4093 aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.
fBoldBi) );
4096 aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.
fItalicBi) );
4102 ShortToSVBT16(rChpx.
fsFtcBi, a);
4103 aRet.push_back(a[1]);
4104 aRet.push_back(a[0]);
4111 ShortToSVBT16(rChpx.
lidBi, a);
4112 aRet.push_back(a[1]);
4113 aRet.push_back(a[0]);
4119 aRet.push_back(rChpx.
icoBi);
4126 ShortToSVBT16(rChpx.
hpsBi, a);
4127 aRet.push_back(a[1]);
4128 aRet.push_back(a[0]);
4151 aChpx.
fBold = nFlags8 & 0x01;
4152 aChpx.
fItalic = (nFlags8 & 0x02) >> 1;
4153 aChpx.
fRMarkDel = (nFlags8 & 0x04) >> 2;
4154 aChpx.
fOutline = (nFlags8 & 0x08) >> 3;
4157 aChpx.
fCaps = (nFlags8 & 0x40) >> 6;
4158 aChpx.
fVanish = (nFlags8 & 0x80) >> 7;
4160 if (nCount >= nSize)
break;
4164 aChpx.
fRMark = nFlags8 & 0x01;
4165 aChpx.
fSpec = (nFlags8 & 0x02) >> 1;
4166 aChpx.
fStrike = (nFlags8 & 0x04) >> 2;
4167 aChpx.
fObj = (nFlags8 & 0x08) >> 3;
4168 aChpx.
fBoldBi = (nFlags8 & 0x10) >> 4;
4169 aChpx.
fItalicBi = (nFlags8 & 0x20) >> 5;
4170 aChpx.
fBiDi = (nFlags8 & 0x40) >> 6;
4173 if (nCount >= nSize)
break;
4177 aChpx.
fsIco = nFlags8 & 0x01;
4178 aChpx.
fsFtc = (nFlags8 & 0x02) >> 1;
4179 aChpx.
fsHps = (nFlags8 & 0x04) >> 2;
4180 aChpx.
fsKul = (nFlags8 & 0x08) >> 3;
4181 aChpx.
fsPos = (nFlags8 & 0x10) >> 4;
4182 aChpx.
fsSpace = (nFlags8 & 0x20) >> 5;
4183 aChpx.
fsLid = (nFlags8 & 0x40) >> 6;
4184 aChpx.
fsIcoBi = (nFlags8 & 0x80) >> 7;
4186 if (nCount >= nSize)
break;
4190 aChpx.
fsFtcBi = nFlags8 & 0x01;
4191 aChpx.
fsHpsBi = (nFlags8 & 0x02) >> 1;
4192 aChpx.
fsLidBi = (nFlags8 & 0x04) >> 2;
4194 if (nCount >= nSize)
break;
4198 if (nCount >= nSize)
break;
4202 if (nCount >= nSize)
break;
4208 aChpx.
fNumRun = (nFlags8 & 0x80) >> 7;
4210 if (nCount >= nSize)
break;
4214 aChpx.
ico = nFlags8 & 0x1F;
4215 aChpx.
kul = (nFlags8 & 0xE0) >> 5;
4217 if (nCount >= nSize)
break;
4221 if (nCount >= nSize)
break;
4225 if (nCount >= nSize)
break;
4229 if (nCount >= nSize)
break;
4233 if (nCount >= nSize)
break;
4237 if (nCount >= nSize)
break;
4241 if (nCount >= nSize)
break;
4269 sal_uInt16 cstcStd(0);
4273 sal_uInt16 cbName(0);
4275 if (cbName > nMaxByteCount)
4277 SAL_WARN(
"sw.ww8",
"WW8RStyle::ImportOldFormatStyles: truncating out of range "
4278 << cbName <<
" to " << nMaxByteCount);
4279 cbName = nMaxByteCount;
4281 sal_uInt16 nByteCount = 2;
4283 while (nByteCount < cbName)
4301 nByteCount += aTmp.getLength();
4302 sName = OStringToOUString(aTmp, eStructChrSet);
4307 if (sName.isEmpty())
4311 sName = OUString(pStr, strlen(pStr), RTL_TEXTENCODING_ASCII_US);
4314 if (sName.isEmpty())
4315 sName =
"Unknown Style: " + OUString::number(stc);
4321 sal_uInt16 nStyles=stcp;
4323 std::vector<pxoffset> aCHPXOffsets(stcp);
4325 sal_uInt16 cbChpx(0);
4327 if (cbChpx > nMaxByteCount)
4329 SAL_WARN(
"sw.ww8",
"WW8RStyle::ImportOldFormatStyles: truncating out of range "
4330 << cbChpx <<
" to " << nMaxByteCount);
4331 cbChpx = nMaxByteCount;
4335 std::vector< std::vector<sal_uInt8> > aConvertedChpx;
4336 while (nByteCount < cbChpx)
4338 if (stcp == aCHPXOffsets.size())
4349 aCHPXOffsets[stcp].mnSize = 0;
4356 aCHPXOffsets[stcp].mnSize = nRemainder;
4359 aCHPXOffsets[stcp].
mnSize);
4362 nByteCount += nRemainder;
4365 aConvertedChpx.emplace_back( );
4370 std::vector<pxoffset> aPAPXOffsets(stcp);
4372 sal_uInt16 cbPapx(0);
4374 if (cbPapx > nMaxByteCount)
4376 SAL_WARN(
"sw.ww8",
"WW8RStyle::ImportOldFormatStyles: truncating out of range "
4377 << cbPapx <<
" to " << nMaxByteCount);
4378 cbPapx = nMaxByteCount;
4382 while (nByteCount < cbPapx)
4384 if (stcp == aPAPXOffsets.size())
4394 aPAPXOffsets[stcp].mnSize = 0;
4405 aPAPXOffsets[stcp].mnSize = nRemainder;
4408 nByteCount += nRemainder;
4417 if (iMac > nStyles) iMac = nStyles;
4419 for (stcp = 0; stcp < iMac; ++stcp)
4442 if (stcp >= aPAPXOffsets.size())
4450 bool bOldNoImp =
PrepareStyle(rSI, eSti, stc, stcNext);
4455 if (!aConvertedChpx[stcp].empty())
4457 static_cast< short >(aConvertedChpx[stcp].
size()),
4501 *static_cast<SwTextFormatColl*>(pj->
m_pFormat) );
void SetFamily(FontFamily)
sal_uInt32 GetTextAreaWidth() const
SvxNumType GetNumberingType() const
simple Iterator for SPRMs
SvStream & ReadInt16(sal_Int16 &rInt16)
sal_uInt8 & GetMaxHyphens()
constexpr TypedWhichId< SvxFrameDirectionItem > RES_FRAMEDIR(120)
std::shared_ptr< SwUnoCursor > CreateUnoCursor(const SwPosition &rPos, bool bTableCursor=false)
std::unique_ptr< SwWW8FltControlStack > m_xCtrlStck
SVX_NUM_CHARS_UPPER_LETTER_N
void SetCurrentSectionVerticalAdjustment(const css::drawing::TextVerticalAdjust nVA)
rtl_TextEncoding m_eLTRFontSrcCharSet
sal_uLong GetIndex() const
SwNode & GetNode(bool bPoint=true) const
bool GoInContent(SwPaM &rPam, SwMoveFnCollection const &fnMove)
sw::util::CharStyleMapper m_aCharStyleMapper
sal_uInt8 brcType() const
sal_uInt32 GetPageLeft() const
void SetRowsToRepeat(sal_uInt16 nNumOfRows)
Represents the style of a paragraph.
Marks a position in the document model.
constexpr TypedWhichId< SvxParaGridItem > RES_PARATR_SNAPTOGRID(77)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_CTL_FONT(27)
std::unique_ptr< WW8RStyle > m_xStyles
iterator for footnotes/endnotes and comments
static Color ExtractColour(const sal_uInt8 *&rpData, bool bVer67)
void SetHeight(tools::Long n)
void StartAnl(const sal_uInt8 *pSprm13)
std::stack< std::unique_ptr< sw::util::RedlineStack > > m_aFrameRedlines
void ReadDef(bool bVer67, const sal_uInt8 *pS, short nLen)
void SetTabBorders(SwTableBox *pBox, short nIdx)
sal_uInt32 GetWWPageTopMargin() const
const OUString & GetText() const
sal_uLong GetSttIdx() const
SvStream & ReadUInt16(sal_uInt16 &rUInt16)
bool SearchRowEnd(WW8PLCFx_Cp_FKP *pPap, WW8_CP &rStartCp, int nLevel) const
SVX_NUM_FULL_WIDTH_ARABIC
std::unique_ptr< ContentProperties > pData
const sal_uInt16 sprmTDelete
const sal_uInt16 sprmTDefTable
const SwNumFormat * GetNumFormat(sal_uInt16 i) const
static bool SetBorder(SvxBoxItem &rBox, const WW8_BRCVer9 *pbrc, short *pSizeArray=nullptr, sal_uInt8 nSetBorders=0xFF)
static wwTableSprm GetTableSprm(sal_uInt16 nId, ww::WordVersion eVer)
sw::util::RedlineStack * getOldRedlineStack()
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.
Word2CHPX ReadWord2Chpx(SvStream &rSt, std::size_t nOffset, sal_uInt8 nSize)
rtl_TextEncoding m_eCJKFontSrcCharSet
rtl_TextEncoding GetCharSet() const
bool close(const SwPosition &rPos, RedlineType eType)
void SetNCurrentColl(sal_uInt16 nColl)
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
SwNumRule * GetNumRule(const SwDoc &rDoc, sal_uInt8 nNumType)
sal_uInt16 GetCurrentId() const
const sal_uInt16 sprmTDyaRowHeight
const sal_uInt16 sprmTDxaGapHalf
std::unique_ptr< FrameDeleteWatch > m_xFormatOfJustInsertedApo
SwFrameFormat * ClaimFrameFormat()
std::unique_ptr< sw::util::RedlineStack > mxOldRedlineStack
const sal_Unicode cBulletChar
Character for lists.
std::shared_ptr< WW8Fib > m_xWwFib
bool StyleExists(unsigned int nColl) const
sal_uInt64 Seek(sal_uInt64 nPos)
WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
constexpr TypedWhichId< SvxFormatBreakItem > RES_BREAK(94)
virtual void DeleteRange(SwPaM &)=0
Delete a range SwFlyFrameFormat.
void SetTabShades(SwTableBox *pBox, short nWwIdx)
SwTableLine is one table row in the document model.
sal_uInt8 mnWW8OutlineLevel
std::unique_ptr< WW8TabDesc > m_xTableDesc
const OUString & GetName() const
OUString GetUniqueNumRuleName(const OUString *pChkStr=nullptr, bool bAutoNum=true) const
rtl_TextEncoding GetCJKCharSet() const
void Read_OLST(sal_uInt16, const sal_uInt8 *pData, short nLen)
void SetCharSet(rtl_TextEncoding)
void StopAnlToRestart(sal_uInt8 nType, bool bGoBack=true)
for(size_t a(0);a< count;a++)
sal_uInt16 m_n81BiDiFlags
void ProcessSprmTDelete(const sal_uInt8 *pParamsTDelete)
void MoveInsideFly(const SwFrameFormat *pFlyFormat)
static constexpr sal_uInt16 val
void SetTabDirection(SwTableBox *pBox, short nWwIdx)
IDocumentContentOperations const & getIDocumentContentOperations() const
WW8TabBandDesc * m_pActBand
void SetCurrentSectionHasFootnote()
bool PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisStyle, sal_uInt16 nNextStyle)
constexpr TypedWhichId< SvxFontItem > RES_CHRATR_FONT(7)
SwTableFormat * GetFrameFormat()
bool StartTable(WW8_CP nStartCp)
Value in Var-direction gives minimum (can be exceeded but not be less).
sal_uInt64 SeekRel(sal_Int64 nPos)
void ReadShd(const sal_uInt8 *pS)
void ImportOldFormatStyles()
void Read_ANLevelDesc(sal_uInt16, const sal_uInt8 *pData, short nLen)
rtl_TextEncoding m_eRTLFontSrcCharSet
SwTwips MoveOutsideFly(SwFrameFormat *pFlyFormat, const SwPosition &rPos, bool bTableJoin=true)
WW8TabBandDesc * m_pFirstBand
SwContentNode * GetContentNode(bool bPoint=true) const
std::unique_ptr< sw::util::RedlineStack > m_xRedlineStack
bool IsSevenMinus(WordVersion eVer)
const SwTableLines * m_pTabLines
constexpr::Color COL_AUTO(0xFF, 0xFF, 0xFF, 0xFF)
short GetCurrentCol() const
WW8TabDesc(WW8TabDesc const &)=delete
SwFlyFrameFormat * MakeFlySection(RndStdIds eAnchorType, const SwPosition *pAnchorPos, const SfxItemSet *pSet=nullptr, SwFrameFormat *pParent=nullptr, bool bCalledFromShell=false)
void SetPamInCell(short nWwCol, bool bPam)
std::vector< sal_uInt8 > ChpxToSprms(const Word2CHPX &rChpx)
StyleResult GetStyle(const OUString &rName, ww::sti eSti)
Get the writer style which the word style should map to.
SwNodeType GetNodeType() const
std::shared_ptr< WW8FlyPara > m_xWWFly
std::vector< SwWW8StyInf > m_vColl
bool SetTextFormatColl(const SwPaM &rRg, SwTextFormatColl *pFormat, const bool bReset=true, const bool bResetListAttrs=false, SwRootFrame const *pLayout=nullptr)
Add 4th optional parameter .
IDocumentStylePoolAccess const & getIDocumentStylePoolAccess() const
SwFormat * m_pStandardFormatColl
const SwTextFormatColl * GetDfltTextFormatColl() const
bool InsBoxen(SwTableNode *, SwTableLine *, SwTableBoxFormat *, SwTextFormatColl *, const SfxItemSet *pAutoAttr, sal_uInt16 nInsPos, sal_uInt16 nCnt=1)
Insert a new box in the line before InsPos.
sal_uLong GetIndex() const
SwTableBoxes * m_pTabBoxes
const SwTextFormatColl * m_pDfltTextFormatColl
const sal_uInt16 sprmTTableBorders
sw::util::ParaStyleMapper m_aParaStyleMapper
void InsertTable(SwTableNode &rTableNode, SwPaM &rPaM)
SwTextAttr * InsertItem(SfxPoolItem &rAttr, const sal_Int32 nStart, const sal_Int32 nEnd, const SetAttrMode nMode=SetAttrMode::DEFAULT)
create new text attribute from rAttr and insert it
std::pair< SwTextFormatColl *, bool > StyleResult
StyleResult StyleResult is a std::pair of a pointer to a style and a flag which is true if the style ...
const SwTable & GetTable() const
bool IsWW8BuiltInHeadingStyle() const
virtual WW8_CP Where() override
SVX_NUM_IROHA_FULLWIDTH_JA
void SetCountedInList(bool bCounted)
This is what we use in the Parser (and Dumper)
std::unique_ptr< WW8_STD > Read1Style(sal_uInt16 &rSkip, OUString *pString)
const sal_uInt16 sprmTTableHeader
void ProcessSpecificSpacing(const sal_uInt8 *pParamsTInsert)
sal_uInt64 remainingSize()
bool IsValidCell(short nCol) const
void ImportGrupx(short nLen, bool bPara, bool bOdd)
void ProcessSprmTDxaCol(const sal_uInt8 *pParamsTDxaCol)
void InsertRow(const SwCursor &rCursor, sal_uInt16 nCnt=1, bool bBehind=true)
sti GetCanonicalStiFromStc(sal_uInt8 stc)
Find the WinWord sti index of an old <= Word2 stc (style code)
constexpr TypedWhichId< SvxHyphenZoneItem > RES_PARATR_HYPHENZONE(69)
friend struct WW8SwFlyPara
#define SAL_N_ELEMENTS(arr)
virtual void GetSprms(WW8PLCFxDesc *p) override
exports com.sun.star. text
SvStream & ReadUInt32(sal_uInt32 &rUInt32)
void StopAllAnl(bool bGoBack=true)
virtual bool SeekPos(WW8_CP nCpPos) override
PaM is Point and Mark: a selection of the document model.
void PrependedInlineNode(const SwPosition &rPos, const SwNode &rNode)
SwNumRule * FindNumRulePtr(const OUString &rName) const
bool CurrentSectionIsProtected() const
static SwNodePtr GetStartNode(SwOutlineNodes const *pOutlNds, int nOutlineLevel, SwOutlineNodes::size_type *nOutl)
short ImportSprm(const sal_uInt8 *pPos, sal_Int32 nMemLen, sal_uInt16 nId=0)
ApoTestResults TestApo(int nCellLevel, bool bTableRowEnd, const WW8_TablePos *pTabPos)
void ImportNewFormatStyles()
SVX_NUM_IROHA_HALFWIDTH_JA
bool checkSeek(SvStream &rSt, sal_uInt64 nOffset)
void UpdateTableMergeGroup(WW8_TCell const &rCell, WW8SelBoxInfo *pActGroup, SwTableBox *pActBox, sal_uInt16 nCol)
void SetFamilyName(const OUString &rFamilyName)
sal_uInt16 GetValue() const
static bool IsBorder(const WW8_BRCVer9 *pbrc, bool bChkBtwn=false)