25#include <rtl/tencinfo.h>
71#include <officecfg/Office/Writer.hxx>
88#include <lineinfo.hxx>
123 static const Color eSwWW8ColA[] =
132 "ico " << sal_uInt32(nIco) <<
" >= " <<
SAL_N_ELEMENTS(eSwWW8ColA));
156 sal_uInt16 nVal = (
pS && aRes.
nRemainingData >= 2) ? SVBT16ToUInt16(
pS) : nDefaultVal;
174 OSL_ENSURE(
false,
"Unknown layout type");
177 meDir=SvxFrameDirection::Horizontal_LR_TB;
180 meDir=SvxFrameDirection::Vertical_RL_TB;
187 meDir=SvxFrameDirection::Vertical_RL_TB;
191 meDir=SvxFrameDirection::Vertical_RL_TB;
195 meDir=SvxFrameDirection::Horizontal_LR_TB;
200 if ((
meDir == SvxFrameDirection::Horizontal_LR_TB) && bRTLPgn)
201 meDir = SvxFrameDirection::Horizontal_RL_TB;
206 return meDir == SvxFrameDirection::Vertical_RL_TB ||
meDir == SvxFrameDirection::Vertical_LR_TB;
230 nTextareaWidth -= rLR.
GetLeft();
234 std::swap(nTextareaHeight, nTextareaWidth);
247 OSL_ENSURE(
false,
"Unknown grid type");
271 bool bSquaredMode =
false;
276 sal_uInt32 nCharWidth=240;
277 for (sal_uInt16 nI = 0; nI <
m_xStyles->GetCount(); ++nI)
280 m_vColl[nI].IsWW8BuiltInDefaultStyle())
284 nCharWidth = rFontHeightItem.
GetHeight();
294 sal_Int32 nMain = (nCharSpace & 0xFFFFF000);
296 nCharWidth += nMain*20;
298 int nFraction = (nCharSpace & 0x00000FFF);
299 nFraction = (nFraction*20)/0xFFF;
300 nCharWidth += nFraction;
303 aGrid.
SetBaseWidth( writer_cast<sal_uInt16>(nCharWidth));
307 if (nLinePitch >= 1 && nLinePitch <= 31680)
309 aGrid.
SetLines(writer_cast<sal_uInt16>(nTextareaHeight/nLinePitch));
323 m_xPlcxMan->GetPap()->nRelativeJustify = bRel ? 1 : 0;
341 bRet = nRelative > 0;
345 sal_Int16 nRelative =
m_xPlcxMan->GetPap()->nRelativeJustify;
352 bRet = nRelative > 0;
362 &&
"pointless to search styles if relative justify is impossible");
366 rVisitedStyles.
insert(nColl);
368 sal_Int16 nRelative =
m_vColl[nColl].m_nRelativeJustify;
369 if ( nColl == 0 || nRelative >= 0 )
370 bRet = nRelative > 0;
371 else if (rVisitedStyles.
find(
m_vColl[nColl].m_nBase) == rVisitedStyles.
end())
385 *
pData ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
393 bBiDiSwap = (eDir == SvxFrameDirection::Horizontal_RL_TB && !bParentRTL)
394 || (eDir == SvxFrameDirection::Horizontal_LR_TB && bParentRTL);
403 if ( eDir == SvxFrameDirection::Horizontal_LR_TB )
412 if ( eJustify == SvxAdjust::Left )
414 else if ( eJustify == SvxAdjust::Right )
427 sal_uInt32 nNetWidth)
430 const sal_Int16 nCols = rSection.
NoCols();
435 const sal_uInt16 nNetWriterWidth = writer_cast<sal_uInt16>(nNetWidth);
436 if (nNetWriterWidth == 0)
455 aCol.
Init(nCols, writer_cast<sal_uInt16>(nColSpace), nNetWriterWidth);
462 for (sal_uInt16
i = 0, nIdx = 1;
i < nCols && nIdx < maxIdx;
i++, nIdx+=2 )
469 pCol->
SetWishWidth(writer_cast<sal_uInt16>(nWishWidth));
470 pCol->
SetLeft(writer_cast<sal_uInt16>(nLeft));
471 pCol->
SetRight(writer_cast<sal_uInt16>(nRight));
521 const wwSection &rSection,
bool bIgnoreCols)
550 sal_Int32 nNewMargin = nMSMargin;
567 short aSizeArray[5]={0};
574 aLR.
SetLeft(SetBorderDistance(bFromEdge, aBox, SvxBoxItemLine::LEFT, aLR.
GetLeft()));
575 aLR.
SetRight(SetBorderDistance(bFromEdge, aBox, SvxBoxItemLine::RIGHT, aLR.
GetRight()));
576 aUL.
SetUpper(SetBorderDistance(bFromEdge, aBox, SvxBoxItemLine::TOP, aUL.
GetUpper()));
577 aUL.
SetLower(SetBorderDistance(bFromEdge, aBox, SvxBoxItemLine::BOTTOM, aUL.
GetLower()));
620 rData.
nSwUp = nWWHTop;
625 rData.
nSwHLo = nWWUp - nWWHTop;
639 rData.
nSwLo = nWWFBot;
643 rData.
nSwFUp = nWWLo - nWWFBot;
681 aHdUL.
SetLower(
static_cast< sal_uInt16
>(nHdLowerSpace) );
685 pHdFormat->SetFormatAttr(aHdUL);
708 aFtUL.
SetUpper(
static_cast< sal_uInt16
>(nFtUpperSpace) );
712 pFtFormat->SetFormatAttr(aFtUL);
731 bRTLPgn ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB,
RES_FRAMEDIR));
742 OSL_ENSURE(rSection.
mpSection,
"section not inserted!");
748 [](
const wwSection& rSegment) { return rSegment.mpPage != nullptr; });
750 pPage = aIter->mpPage;
752 OSL_ENSURE(pPage,
"no page outside this section!");
758 OSL_ENSURE(pFormat,
"impossible");
768 if ((nSectionLeft != 0) || (nSectionRight != 0))
785 bool bRestartLnNumPerSection = (1 == rSection.
maSep.
lnc);
813 if ((0 < rSection.
maSep.
lnnMin) || bRestartLnNumPerSection)
835 , mnVerticalAdjustment(drawing::TextVerticalAdjust_TOP)
837 , mbHasFootnote(false)
872 OSL_ENSURE(pSep,
"impossible!");
882 if( txtNode->Len() == 0 )
894 pWkb->
Where() == nTextPos)
898 bool bSuccess = pWkb->
Get(nTest,
pData);
915 sal_uInt16 nLIdx = ( (
static_cast<sal_uInt16
>(
mrReader.
m_xWwFib->m_lid) & 0xff ) == 0x9 ) ? 1 : 0;
920 static const sal_uInt16 aVer2Ids0[] =
930 static const sal_uInt16 aVer67Ids0[] =
940 static const sal_uInt16 aVer8Ids0[] =
950 const sal_uInt16* pIds = eVer <=
ww::eWW2 ? aVer2Ids0 : eVer <=
ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
1003 int nColumnDataIdx = 0;
1009 for (
sal_uInt8 nColumn = 0; nColumn < nColumnCount; ++nColumn )
1015 OSL_ENSURE( pSW,
"+Sprm 136 (resp. 0xF203) (ColWidth) missing" );
1016 sal_uInt16 nWidth = (pSW && aSWRes.
nRemainingData >= 3) ? SVBT16ToUInt16(pSW + 1) : 1440;
1020 if ( nColumn < nColumnCount - 1 )
1026 OSL_ENSURE( pSD,
"+Sprm 137 (resp. 0xF204) (Colspacing) missing" );
1029 nWidth = SVBT16ToUInt16(pSD + 1);
1037 static const sal_uInt16 aVer2Ids1[] =
1051 static const sal_uInt16 aVer67Ids1[] =
1065 static const sal_uInt16 aVer8Ids1[] =
1079 pIds = eVer <=
ww::eWW2 ? aVer2Ids1 : eVer <=
ww::eWW7 ? aVer67Ids1 : aVer8Ids1;
1091 static const sal_uInt16 nLef[] = {
MM_250, 1800 };
1092 static const sal_uInt16 nRig[] = {
MM_250, 1800 };
1134 aRes = pSep->
HasSprm(pIds[8]);
1139 aRes = pSep->
HasSprm(pIds[9]);
1144 static const sal_uInt16 nTop[] = {
MM_250, 1440 };
1145 static const sal_uInt16 nBot[] = {
MM_200, 1440 };
1147 static const sal_uInt16 aVer2Ids2[] =
1159 static const sal_uInt16 aVer67Ids2[] =
1170 static const sal_uInt16 aVer8Ids2[] =
1182 pIds = eVer <=
ww::eWW2 ? aVer2Ids2 : eVer <=
ww::eWW7 ? aVer67Ids2 : aVer8Ids2;
1242 for (
int nI = 0, nMask = 1; nI < 6; ++nI, nMask <<= 1)
1327 else if (nBrcVer == 8 && nLen >=
sizeof(
WW8_BRC))
1333 return nullptr !=
pS;
1352 a8Sprm[0], a8Sprm[1], a8Sprm[2], a8Sprm[3]))
1354 for(
int i = 0;
i < 4; ++
i )
1363 a9Sprm[0], a9Sprm[1], a9Sprm[2], a9Sprm[3]))
1365 for(
int i = 0;
i < 4; ++
i )
1373 static const sal_uInt16 aVer67Ids[5] = {
1381 static const sal_uInt16 aVer8Ids[5] = {
1389 static const sal_uInt16 aVer9Ids[5] = {
1401 for(
int i = 0;
i < 5; ++
i )
1409 for(
int i = 0;
i < 5; ++
i )
1415 for(
int i = 0;
i < 5; ++
i )
1426 for(
int i = 0;
i < 5; ++
i )
1434 for(
int i = 0;
i < 5; ++
i )
1440 for(
int i = 0;
i < 5; ++
i )
1448 OSL_ENSURE( pSty || pPap,
"WW8PLCFx_Cp_FKP and WW8RStyle "
1449 "and WW8PLCFx_SEPX is 0" );
1457 sal_uInt32 cv,
short nIdx,
SvxBoxItemLine nOOIndex, sal_uInt16 nWWIndex,
1461 if ( nIdx == 0x1A || nIdx == 0x1B )
1463 nIdx = (nIdx == 0x1A) ? 0x12 : 0x11;
1468 ::editeng::ConvertBorderStyleFromWord(nIdx));
1472 double const fConverted( (SvxBorderLineStyle::NONE == eStyle) ? 0.0 :
1473 ::editeng::ConvertBorderWidthFromWord(eStyle, nLineThickness, nIdx));
1482 pSize[nWWIndex] = fConverted + nSpace;
1484 rBox.
SetLine(&aLine, nOOIndex);
1490 sal_uInt16 nWWIndex,
short *pSize,
const bool bIgnoreSpace)
1495 GetLineIndex(rBox, nLineThickness, bIgnoreSpace ? 0 : nSpace,
1496 rBor.
cv(), rBor.
brcType(), nOOIndex, nWWIndex, pSize );
1515 short *pSizeArray,
sal_uInt8 nSetBorders)
1517 bool bChange =
false;
1518 static const std::pair<sal_uInt16, SvxBoxItemLine> aIdArr[] =
1520 {
WW8_TOP, SvxBoxItemLine::TOP },
1521 {
WW8_LEFT, SvxBoxItemLine::LEFT },
1523 {
WW8_BOT, SvxBoxItemLine::BOTTOM },
1524 {
WW8_BETW, SvxBoxItemLine::BOTTOM }
1527 for(
int i = 0;
i < 4; ++
i )
1536 else if ( nSetBorders & (1 << aIdArr[
i].
first) )
1549 rBox.
SetLine(
nullptr, aIdArr[
i ].second );
1568 rShadow.
SetLocation(SvxShadowLocation::BottomRight);
1578 pbrc[ 0 ].dptSpace() * 20,
1579 pbrc[ 3 ].dptSpace() * 20,
1580 pbrc[ 2 ].dptSpace() * 20 );
1586 bool bShadowed =
false;
1592 rFlySet.
Put( aBox );
1599 rFlySet.
Put( aShadow );
1608#define MAX_BORDER_SIZE 210
1609#define MAX_EMPTY_BORDER 10
1624 *pVar =
static_cast<sal_Int16
>(SVBT16ToUInt16(aS.
pSprm));
1625 return aS.
pSprm !=
nullptr;
1632 *pVar =
static_cast<sal_Int16
>(SVBT16ToUInt16(aS.
pSprm));
1633 return aS.
pSprm !=
nullptr;
1689 ((
nSp45 & 0x7fff) == (rSrc.
nSp45 & 0x7fff)) &&
1747 nTPc = (nOrigSprmTPc & 0xCF) | 0x20;
1749 nTPc = nOrigSprmTPc;
1754 std::shared_ptr<WW8PLCFMan> xPlcxMan = pIo->
m_xPlcxMan;
1757 Read(nOrigSprmTPc, pPap);
1768 xPlcxMan->GetPap()->Save( aSave );
1777 if( nText[0] != 0x01 || nText[1] != 0x0d )
1795 sal_uInt16 nColl = pPap->
GetIstd();
1798 ww::sti eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc(nColl) : static_cast<ww::sti>(nColl);
1799 while (eSti !=
ww::stiNil &&
static_cast<size_t>(nColl) < pIo->
m_vColl.size() &&
nullptr == (pNowStyleApo = pIo->
m_vColl[nColl].m_xWWFly.get()))
1801 aSeenStyles.
insert(nColl);
1803 nColl = pIo->
m_vColl[nColl].m_nBase;
1805 if (aSeenStyles.
find(nColl) != aSeenStyles.
end())
1807 SAL_WARN(
"sw.ww8",
"loop in style chain");
1811 eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc(nColl) : static_cast<ww::sti>(nColl);
1817 if( !( aF == *
this ) )
1823 xPlcxMan->GetPap()->Restore( aSave );
1875 nTPc = (nOrigSprmTPc & 0xCF) | 0x20;
1877 nTPc = nOrigSprmTPc;
1888 OSL_ENSURE(aEmpty.
nPWr == 2,
"this is not what we expect for nPWr");
1889 if (this->
nPWr == 0)
1891 return aEmpty == *
this;
1898 const sal_uInt32 nWWPgTop,
1899 const sal_uInt32 nPgWidth,
1900 const sal_Int32 nIniFlyDx,
1901 const sal_Int32 nIniFlyDy ):
1906nUpperMargin(rWW.nUpperMargin),
1907nLowerMargin(rWW.nLowerMargin),
1910nNetWidth(rWW.nSp28),
1912eHRel(
text::RelOrientation::PAGE_FRAME),
1914eVAlign(
text::VertOrientation::
NONE),
1915eHAlign(
text::HoriOrientation::
NONE),
1916nXBind(( rWW.nTPc & 0xc0 ) >> 6),
1917nYBind(( rWW.nTPc & 0x30 ) >> 4),
1926 eSurround = css::text::WrapTextMode_DYNAMIC;
1930 eSurround = css::text::WrapTextMode_NONE;
1934 eSurround = css::text::WrapTextMode_PARALLEL;
1937 eSurround = css::text::WrapTextMode_THROUGH;
1940 eSurround = css::text::WrapTextMode_DYNAMIC;
1965 msword_cast<sal_Int16>(nPgWidth ? nPgWidth : 2268);
1987 eVRel = text::RelOrientation::PAGE_PRINT_AREA;
1990 eVRel = text::RelOrientation::PAGE_FRAME;
2003 eVRel = text::RelOrientation::FRAME;
2006 eVAlign = text::VertOrientation::TOP;
2011 eVAlign = text::VertOrientation::CENTER;
2014 eVAlign = text::VertOrientation::BOTTOM;
2026 eHAlign = text::HoriOrientation::LEFT;
2030 eHAlign = text::HoriOrientation::CENTER;
2033 eHAlign = text::HoriOrientation::RIGHT;
2037 eHAlign = text::HoriOrientation::LEFT;
2041 eHAlign = text::HoriOrientation::RIGHT;
2053 eHRel = text::RelOrientation::FRAME;
2056 eHRel = text::RelOrientation::PAGE_PRINT_AREA;
2072 sal_Int16 nLeBorderMgn( 0 );
2077 nLeBorderMgn = nLeBorderMgn + nTemp;
2080 sal_Int16 nRiBorderMgn( 0 );
2085 nRiBorderMgn = nRiBorderMgn + nTemp;
2087 if ( !
bAutoWidth &&
eHAlign == text::HoriOrientation::LEFT &&
eHRel == text::RelOrientation::PAGE_FRAME )
2093 eHRel = text::RelOrientation::PAGE_PRINT_AREA;
2098 else if ( !
bAutoWidth &&
eHAlign == text::HoriOrientation::RIGHT &&
eHRel == text::RelOrientation::PAGE_FRAME )
2104 eHRel = text::RelOrientation::PAGE_RIGHT;
2109 else if ( !
bAutoWidth &&
eHAlign == text::HoriOrientation::LEFT &&
eHRel == text::RelOrientation::PAGE_PRINT_AREA )
2114 eHRel = text::RelOrientation::PAGE_PRINT_AREA;
2115 nXPos = -nLeBorderMgn;
2119 else if ( !
bAutoWidth &&
eHAlign == text::HoriOrientation::RIGHT &&
eHRel == text::RelOrientation::PAGE_PRINT_AREA )
2124 eHRel = text::RelOrientation::PAGE_RIGHT;
2137 sal_Int16 nLeLMgn = 0;
2139 nLeLMgn = nLeLMgn + nTemp;
2143 if (
eHAlign == text::HoriOrientation::LEFT)
2154 eVRel = text::RelOrientation::PAGE_FRAME;
2155 nYPos =
static_cast< sal_Int16
>(
nYPos + nWWPgTop );
2201 sal_Int16 eHRel = pFS->
eHRel;
2215 if ( pFS->
eSurround == css::text::WrapTextMode_DYNAMIC )
2219 short aSizeArray[5]={0};
2227 text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ) );
2250 Init(rReader, pPaM);
2254 short aSizeArray[5]={0};
2265 for (
int i = 0;
i < 4;
i++)
2299 : m_pCtrlStck(pStack),
2300 m_aChrSet(rDoc.GetAttrPool()),
2301 m_aParSet(rDoc.GetAttrPool())
2306 for (
size_t i=0;
i < nCnt; ++
i)
2335 }
while ((pItem = aIter.
NextItem()));
2348 OSL_ENSURE( rContent.
GetContentIdx(),
"No content prepared." );
2383 if(aIdx.GetNode().IsTableNode())
2388 if ( (aIdx < aEnd) && aIdx.GetNode().IsTextNode() )
2392 if (aIdx == aEnd && pNd && pNd->
GetText().isEmpty())
2435 OSL_ENSURE(rApo.
HasFrame() || pTabPos,
2436 "If no frame found, *MUST* be in a table");
2444 pRet->ApplyTabPos(pTabPos);
2446 if (pRet->IsEmpty())
2474 short nDCS = SVBT16ToUInt16(aDCS.
pSprm);
2528 if (pAnchorNode && *pAnchorNode == pPoint->
GetNode())
2543 OSL_ENSURE(
m_xSFlyPara->GetFlyFormat()->GetAnchor().GetAnchorId() ==
2552 m_xWWZOrder->InsertTextLayerObject(pOurNewObject);
2617 if (aLastAnchorPos == aToBeJoined)
2625 if (aDropCharPos == aToBeJoined)
2634 if (aOpenApoPos == aToBeJoined)
2687 OSL_ENSURE(
m_xSFlyPara->xMainTextPos,
"StopApo: xMainTextPos is nullptr");
2740 if (aLastAnchorPos == aToBeJoined)
2796 m_xSFlyPara->GetFlyFormat()->SetFormatAttr(aSize);
2819 OSL_ENSURE(
m_xWFlyPara,
" Where is my pWFlyPara ? ");
2839 const bool bFirstLineOfStSet,
2840 const bool bLeftIndentSet )
2862 if ( bFirstLineOfStSet )
2868 if ( bLeftIndentSet )
2991 else if (
m_pPaM !=
nullptr)
3029 reinterpret_cast<const char*
>(
pData+2), 1,
3030 RTL_TEXTENCODING_MS_1252).toChar();
3051 const int nContiguousWestern = 8;
3052 const int nWestern = nContiguousWestern + 1;
3053 const int nEastern = 2;
3055 const int nIds = nWestern + nEastern + nCTL;
3056 static const sal_uInt16 nEndIds[ nIds ] =
3075 nI = nContiguousWestern;
3087 sal_uInt16 nMask = 1 << nI;
3108 bool bOn = *
pData & 1;
3249 static const sal_uInt16 nEndIds[2] =
3263 OSL_ENSURE(nI <= 1,
"not happening");
3267 sal_uInt16 nMask = 1 << nI;
3275 bool bOn = *
pData & 1;
3290 && ( *
pData & 0x80 )
3335 OSL_ENSURE(
false,
"Unhandled unknown bidi toggle attribute");
3414 OSL_ENSURE(
false,
"Unhandled unknown toggle attribute");
3420 sal_uInt16 nNewStyle81Mask )
3422 sal_uInt16
i = 1, nToggleAttrFlags =
m_xCtrlStck->GetToggleAttrFlags();
3426 (
i & nToggleAttrFlags) &&
3427 ((
i & nOldStyle81Mask) != (
i & nNewStyle81Mask))
3436 sal_uInt16 nNewStyle81Mask )
3438 sal_uInt16
i = 1, nToggleAttrFlags =
m_xCtrlStck->GetToggleBiDiAttrFlags();
3442 (
i & nToggleAttrFlags) &&
3443 ((
i & nOldStyle81Mask) != (
i & nNewStyle81Mask))
3496 aBegin == aEnd && nBegin == nEnd - 1 &&
3521 bool bIsGraphicPlacementHack =
false;
3536 bIsGraphicPlacementHack =
true;
3539 return bIsGraphicPlacementHack;
3546 if (nLen < (eVersion <=
ww::eWW2 ? 1 : 2))
3563 short nPos = eVersion <= ww::eWW2 ? static_cast< sal_Int8 >( *
pData ) : SVBT16ToInt16(
pData );
3564 sal_Int32 nPos2 =
nPos * ( 10 * 100 );
3567 OSL_ENSURE(pF,
"Expected to have the fontheight available here");
3570 sal_Int32 nHeight = 240;
3571 if (pF !=
nullptr && pF->GetHeight() != 0)
3572 nHeight = pF->GetHeight();
3585 bool bWordLine =
false;
3594 case 2: bWordLine =
true;
3645 else if(
pData && 6 == nLen )
3652 switch( SVBT16ToUInt16(
pData+1 ) )
3654 case 1: cStt =
'('; cEnd =
')';
break;
3655 case 2: cStt =
'['; cEnd =
']';
break;
3656 case 3: cStt =
'<'; cEnd =
'>';
break;
3657 case 4: cStt =
'{'; cEnd =
'}';
break;
3665 bool bFitToLine = 0 != *(
pData+1);
3754 if (pUnderlineAttr && nLen >= 4)
3760 OUString& rName,
FontPitch& rePitch, rtl_TextEncoding& reCharSet )
3792 reCharSet = RTL_TEXTENCODING_DONTKNOW;
3794 reCharSet = rtl_getTextEncodingFromWindowsCharset(pF->
aFFNBase.
chs);
3801 if (rName.startsWithIgnoreAsciiCase(
"Tms Rmn") ||
3802 rName.startsWithIgnoreAsciiCase(
"Timmons") ||
3803 rName.startsWithIgnoreAsciiCase(
"CG Times") ||
3804 rName.startsWithIgnoreAsciiCase(
"MS Serif") ||
3805 rName.startsWithIgnoreAsciiCase(
"Garamond") ||
3806 rName.startsWithIgnoreAsciiCase(
"Times Roman") ||
3807 rName.startsWithIgnoreAsciiCase(
"Times New Roman"))
3811 else if (rName.startsWithIgnoreAsciiCase(
"Helv") ||
3812 rName.startsWithIgnoreAsciiCase(
"Arial") ||
3813 rName.startsWithIgnoreAsciiCase(
"Univers") ||
3814 rName.startsWithIgnoreAsciiCase(
"LinePrinter") ||
3815 rName.startsWithIgnoreAsciiCase(
"Lucida Sans") ||
3816 rName.startsWithIgnoreAsciiCase(
"Small Fonts") ||
3817 rName.startsWithIgnoreAsciiCase(
"MS Sans Serif"))
3835 rtl_TextEncoding eSrcCharSet;
3852 eSrcCharSet = RTL_TEXTENCODING_DONTKNOW;
3865 eSrcCharSet = RTL_TEXTENCODING_DONTKNOW;
3874 rtl_TextEncoding eDstCharSet = eSrcCharSet;
3876 SvxFontItem aFont( eFamily,
aName, OUString(), ePitch, eDstCharSet, nWhich);
3993 sal_uInt16 nFCode = SVBT16ToUInt16(
pData );
4023 if (nLen < (eVersion <=
ww::eWW2 ? 1 : 2))
4073 if (nfChsDiff && nLen >= 2)
4121 sal_uInt16
nId = SVBT16ToUInt16(
pData );
4150 sal_Int16 nKern = SVBT16ToUInt16(
pData );
4161 sal_Int16 nAutoKern = SVBT16ToUInt16(
pData );
4185 std::map<OUString, css::uno::Any>& rMap = aGrabBag.
GetGrabBag();
4186 rMap.insert(std::pair<OUString, css::uno::Any>(
"CharShadingMarker",
uno::Any(
true)));
4199 OSL_ENSURE(nLen == 10,
"Len of para back colour not 10!");
4207 std::map<OUString, css::uno::Any>& rMap = aGrabBag.
GetGrabBag();
4208 rMap.insert(std::pair<OUString, css::uno::Any>(
"CharShadingMarker",
uno::Any(
true)));
4277 short nPara = SVBT16ToUInt16(
pData );
4280 ::std::unique_ptr<SvxFirstLineIndentItem> pFirstLine(pItem
4284 ::std::unique_ptr<SvxTextLeftMarginItem> pLeftMargin(pItem
4288 ::std::unique_ptr<SvxRightMarginItem> pRightMargin(pItem
4309 pFirstLine->SetTextFirstLineOffset(
static_cast<short>(pFormat->
GetFirstLineIndent()));
4311 pTextNode->
SetAttr(*pLeftMargin);
4312 pTextNode->
SetAttr(*pFirstLine);
4343 bool bFirstLinOfstSet(
false );
4344 bool bLeftIndentSet(
false );
4352 pLeftMargin->SetTextLeft(nPara);
4357 bLeftIndentSet =
true;
4385 pFirstLine->SetTextFirstLineOffset(nPara);
4395 pLeftMargin->SetTextLeft(pNumFormat->GetIndentAt());
4399 if ( pDefaultStopItem && pDefaultStopItem->
Count() > 0 )
4409 bFirstLinOfstSet =
true;
4415 pRightMargin->SetRight(nPara);
4421 NewAttr(*pFirstLine, bFirstLinOfstSet,
false);
4422 NewAttr(*pLeftMargin,
false, bLeftIndentSet);
4423 NewAttr(*pRightMargin,
false,
false);
4435 if (nLen < (eVersion <=
ww::eWW2 ? 3 : 4))
4443 short nSpace = SVBT16ToUInt16(
pData );
4444 short nMulti = (eVersion <=
ww::eWW2) ? 1 : SVBT16ToUInt16(
pData + 2 );
4450 eLnSpc = SvxLineSpaceRule::Fix;
4453 eLnSpc = SvxLineSpaceRule::Min;
4465 sal_uInt16 nSpaceTw = 0;
4477 nSpaceTw = o3tl::narrowing<sal_uInt16>(
n * pH->
GetHeight() / 100 );
4482 nSpaceTw = o3tl::narrowing<sal_uInt16>(nSpace);
4494 if (fDontUseHTMLAutoSpacing)
4574 short nPara = SVBT16ToUInt16(
pData );
4617 if (!pText || !
nPos)
4676 bool bDistributed =
false;
4683 eAdjust = SvxAdjust::Center;
4686 eAdjust = SvxAdjust::Right;
4689 eAdjust = SvxAdjust::Block;
4692 eAdjust = SvxAdjust::Block;
4693 bDistributed =
true;
4711 bRTL = *aDir.
pSprm != 0;
4716 if (pItem && (pItem->GetValue() == SvxFrameDirection::Horizontal_RL_TB))
4737 bool bDistributed =
false;
4744 eAdjust = SvxAdjust::Center;
4747 eAdjust = SvxAdjust::Left;