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");
270 bool bSquaredMode =
false;
275 sal_uInt32 nCharWidth=240;
276 for (sal_uInt16 nI = 0; nI <
m_xStyles->GetCount(); ++nI)
279 m_vColl[nI].IsWW8BuiltInDefaultStyle())
283 nCharWidth = rFontHeightItem.
GetHeight();
293 sal_Int32 nMain = (nCharSpace & 0xFFFFF000);
295 nCharWidth += nMain*20;
297 int nFraction = (nCharSpace & 0x00000FFF);
298 nFraction = (nFraction*20)/0xFFF;
299 nCharWidth += nFraction;
302 aGrid.
SetBaseWidth( writer_cast<sal_uInt16>(nCharWidth));
306 if (nLinePitch >= 1 && nLinePitch <= 31680)
308 aGrid.
SetLines(writer_cast<sal_uInt16>(nTextareaHeight/nLinePitch));
322 m_xPlcxMan->GetPap()->nRelativeJustify = bRel ? 1 : 0;
340 bRet = nRelative > 0;
344 sal_Int16 nRelative =
m_xPlcxMan->GetPap()->nRelativeJustify;
351 bRet = nRelative > 0;
361 &&
"pointless to search styles if relative justify is impossible");
365 rVisitedStyles.
insert(nColl);
367 sal_Int16 nRelative =
m_vColl[nColl].m_nRelativeJustify;
368 if ( nColl == 0 || nRelative >= 0 )
369 bRet = nRelative > 0;
370 else if (rVisitedStyles.
find(
m_vColl[nColl].m_nBase) == rVisitedStyles.
end())
384 *
pData ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB;
392 bBiDiSwap = (eDir == SvxFrameDirection::Horizontal_RL_TB && !bParentRTL)
393 || (eDir == SvxFrameDirection::Horizontal_LR_TB && bParentRTL);
402 if ( eDir == SvxFrameDirection::Horizontal_LR_TB )
411 if ( eJustify == SvxAdjust::Left )
413 else if ( eJustify == SvxAdjust::Right )
426 sal_uInt32 nNetWidth)
429 const sal_Int16 nCols = rSection.
NoCols();
434 const sal_uInt16 nNetWriterWidth = writer_cast<sal_uInt16>(nNetWidth);
435 if (nNetWriterWidth == 0)
454 aCol.
Init(nCols, writer_cast<sal_uInt16>(nColSpace), nNetWriterWidth);
461 for (sal_uInt16
i = 0, nIdx = 1;
i < nCols && nIdx < maxIdx;
i++, nIdx+=2 )
468 pCol->
SetWishWidth(writer_cast<sal_uInt16>(nWishWidth));
469 pCol->
SetLeft(writer_cast<sal_uInt16>(nLeft));
470 pCol->
SetRight(writer_cast<sal_uInt16>(nRight));
520 const wwSection &rSection,
bool bIgnoreCols)
549 sal_Int32 nNewMargin = nMSMargin;
566 short aSizeArray[5]={0};
573 aLR.
SetLeft(SetBorderDistance(bFromEdge, aBox, SvxBoxItemLine::LEFT, aLR.
GetLeft()));
574 aLR.
SetRight(SetBorderDistance(bFromEdge, aBox, SvxBoxItemLine::RIGHT, aLR.
GetRight()));
575 aUL.
SetUpper(SetBorderDistance(bFromEdge, aBox, SvxBoxItemLine::TOP, aUL.
GetUpper()));
576 aUL.
SetLower(SetBorderDistance(bFromEdge, aBox, SvxBoxItemLine::BOTTOM, aUL.
GetLower()));
619 rData.
nSwUp = nWWHTop;
624 rData.
nSwHLo = nWWUp - nWWHTop;
638 rData.
nSwLo = nWWFBot;
642 rData.
nSwFUp = nWWLo - nWWFBot;
680 aHdUL.
SetLower(
static_cast< sal_uInt16
>(nHdLowerSpace) );
684 pHdFormat->SetFormatAttr(aHdUL);
707 aFtUL.
SetUpper(
static_cast< sal_uInt16
>(nFtUpperSpace) );
711 pFtFormat->SetFormatAttr(aFtUL);
730 bRTLPgn ? SvxFrameDirection::Horizontal_RL_TB : SvxFrameDirection::Horizontal_LR_TB,
RES_FRAMEDIR));
741 OSL_ENSURE(rSection.
mpSection,
"section not inserted!");
747 [](
const wwSection& rSegment) { return rSegment.mpPage != nullptr; });
749 pPage = aIter->mpPage;
751 OSL_ENSURE(pPage,
"no page outside this section!");
757 OSL_ENSURE(pFormat,
"impossible");
767 if ((nSectionLeft != 0) || (nSectionRight != 0))
784 bool bRestartLnNumPerSection = (1 == rSection.
maSep.
lnc);
812 if ((0 < rSection.
maSep.
lnnMin) || bRestartLnNumPerSection)
834 , mnVerticalAdjustment(drawing::TextVerticalAdjust_TOP)
836 , mbHasFootnote(false)
871 OSL_ENSURE(pSep,
"impossible!");
881 if( txtNode->Len() == 0 )
893 pWkb->
Where() == nTextPos)
897 bool bSuccess = pWkb->
Get(nTest,
pData);
914 sal_uInt16 nLIdx = ( (
static_cast<sal_uInt16
>(
mrReader.
m_xWwFib->m_lid) & 0xff ) == 0x9 ) ? 1 : 0;
919 static const sal_uInt16 aVer2Ids0[] =
929 static const sal_uInt16 aVer67Ids0[] =
939 static const sal_uInt16 aVer8Ids0[] =
949 const sal_uInt16* pIds = eVer <=
ww::eWW2 ? aVer2Ids0 : eVer <=
ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
1002 int nColumnDataIdx = 0;
1008 for (
sal_uInt8 nColumn = 0; nColumn < nColumnCount; ++nColumn )
1014 OSL_ENSURE( pSW,
"+Sprm 136 (resp. 0xF203) (ColWidth) missing" );
1015 sal_uInt16 nWidth = (pSW && aSWRes.
nRemainingData >= 3) ? SVBT16ToUInt16(pSW + 1) : 1440;
1019 if ( nColumn < nColumnCount - 1 )
1025 OSL_ENSURE( pSD,
"+Sprm 137 (resp. 0xF204) (Colspacing) missing" );
1028 nWidth = SVBT16ToUInt16(pSD + 1);
1036 static const sal_uInt16 aVer2Ids1[] =
1050 static const sal_uInt16 aVer67Ids1[] =
1064 static const sal_uInt16 aVer8Ids1[] =
1078 pIds = eVer <=
ww::eWW2 ? aVer2Ids1 : eVer <=
ww::eWW7 ? aVer67Ids1 : aVer8Ids1;
1090 static const sal_uInt16 nLef[] = {
MM_250, 1800 };
1091 static const sal_uInt16 nRig[] = {
MM_250, 1800 };
1133 aRes = pSep->
HasSprm(pIds[8]);
1138 aRes = pSep->
HasSprm(pIds[9]);
1143 static const sal_uInt16 nTop[] = {
MM_250, 1440 };
1144 static const sal_uInt16 nBot[] = {
MM_200, 1440 };
1146 static const sal_uInt16 aVer2Ids2[] =
1158 static const sal_uInt16 aVer67Ids2[] =
1169 static const sal_uInt16 aVer8Ids2[] =
1181 pIds = eVer <=
ww::eWW2 ? aVer2Ids2 : eVer <=
ww::eWW7 ? aVer67Ids2 : aVer8Ids2;
1241 for (
int nI = 0, nMask = 1; nI < 6; ++nI, nMask <<= 1)
1326 else if (nBrcVer == 8 && nLen >=
sizeof(
WW8_BRC))
1332 return nullptr !=
pS;
1351 a8Sprm[0], a8Sprm[1], a8Sprm[2], a8Sprm[3]))
1353 for(
int i = 0;
i < 4; ++
i )
1362 a9Sprm[0], a9Sprm[1], a9Sprm[2], a9Sprm[3]))
1364 for(
int i = 0;
i < 4; ++
i )
1372 static const sal_uInt16 aVer67Ids[5] = {
1380 static const sal_uInt16 aVer8Ids[5] = {
1388 static const sal_uInt16 aVer9Ids[5] = {
1400 for(
int i = 0;
i < 5; ++
i )
1408 for(
int i = 0;
i < 5; ++
i )
1414 for(
int i = 0;
i < 5; ++
i )
1425 for(
int i = 0;
i < 5; ++
i )
1433 for(
int i = 0;
i < 5; ++
i )
1439 for(
int i = 0;
i < 5; ++
i )
1447 OSL_ENSURE( pSty || pPap,
"WW8PLCFx_Cp_FKP and WW8RStyle "
1448 "and WW8PLCFx_SEPX is 0" );
1456 sal_uInt32 cv,
short nIdx,
SvxBoxItemLine nOOIndex, sal_uInt16 nWWIndex,
1460 if ( nIdx == 0x1A || nIdx == 0x1B )
1462 nIdx = (nIdx == 0x1A) ? 0x12 : 0x11;
1467 ::editeng::ConvertBorderStyleFromWord(nIdx));
1471 double const fConverted( (SvxBorderLineStyle::NONE == eStyle) ? 0.0 :
1472 ::editeng::ConvertBorderWidthFromWord(eStyle, nLineThickness, nIdx));
1481 pSize[nWWIndex] = fConverted + nSpace;
1483 rBox.
SetLine(&aLine, nOOIndex);
1489 sal_uInt16 nWWIndex,
short *pSize,
const bool bIgnoreSpace)
1494 GetLineIndex(rBox, nLineThickness, bIgnoreSpace ? 0 : nSpace,
1495 rBor.
cv(), rBor.
brcType(), nOOIndex, nWWIndex, pSize );
1514 short *pSizeArray,
sal_uInt8 nSetBorders)
1516 bool bChange =
false;
1517 static const std::pair<sal_uInt16, SvxBoxItemLine> aIdArr[] =
1519 {
WW8_TOP, SvxBoxItemLine::TOP },
1520 {
WW8_LEFT, SvxBoxItemLine::LEFT },
1522 {
WW8_BOT, SvxBoxItemLine::BOTTOM },
1523 {
WW8_BETW, SvxBoxItemLine::BOTTOM }
1526 for(
int i = 0;
i < 4; ++
i )
1535 else if ( nSetBorders & (1 << aIdArr[
i].
first) )
1548 rBox.
SetLine(
nullptr, aIdArr[
i ].second );
1567 rShadow.
SetLocation(SvxShadowLocation::BottomRight);
1577 pbrc[ 0 ].dptSpace() * 20,
1578 pbrc[ 3 ].dptSpace() * 20,
1579 pbrc[ 2 ].dptSpace() * 20 );
1585 bool bShadowed =
false;
1591 rFlySet.
Put( aBox );
1598 rFlySet.
Put( aShadow );
1607#define MAX_BORDER_SIZE 210
1608#define MAX_EMPTY_BORDER 10
1623 *pVar =
static_cast<sal_Int16
>(SVBT16ToUInt16(aS.
pSprm));
1624 return aS.
pSprm !=
nullptr;
1631 *pVar =
static_cast<sal_Int16
>(SVBT16ToUInt16(aS.
pSprm));
1632 return aS.
pSprm !=
nullptr;
1688 ((
nSp45 & 0x7fff) == (rSrc.
nSp45 & 0x7fff)) &&
1746 nTPc = (nOrigSprmTPc & 0xCF) | 0x20;
1748 nTPc = nOrigSprmTPc;
1753 std::shared_ptr<WW8PLCFMan> xPlcxMan = pIo->
m_xPlcxMan;
1756 Read(nOrigSprmTPc, pPap);
1767 xPlcxMan->GetPap()->Save( aSave );
1776 if( nText[0] != 0x01 || nText[1] != 0x0d )
1794 sal_uInt16 nColl = pPap->
GetIstd();
1797 ww::sti eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc(nColl) : static_cast<ww::sti>(nColl);
1798 while (eSti !=
ww::stiNil &&
static_cast<size_t>(nColl) < pIo->
m_vColl.size() &&
nullptr == (pNowStyleApo = pIo->
m_vColl[nColl].m_xWWFly.get()))
1800 aSeenStyles.
insert(nColl);
1802 nColl = pIo->
m_vColl[nColl].m_nBase;
1804 if (aSeenStyles.
find(nColl) != aSeenStyles.
end())
1806 SAL_WARN(
"sw.ww8",
"loop in style chain");
1810 eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc(nColl) : static_cast<ww::sti>(nColl);
1816 if( !( aF == *
this ) )
1822 xPlcxMan->GetPap()->Restore( aSave );
1874 nTPc = (nOrigSprmTPc & 0xCF) | 0x20;
1876 nTPc = nOrigSprmTPc;
1887 OSL_ENSURE(aEmpty.
nPWr == 2,
"this is not what we expect for nPWr");
1888 if (this->
nPWr == 0)
1890 return aEmpty == *
this;
1897 const sal_uInt32 nWWPgTop,
1898 const sal_uInt32 nPgWidth,
1899 const sal_Int32 nIniFlyDx,
1900 const sal_Int32 nIniFlyDy ):
1905nUpperMargin(rWW.nUpperMargin),
1906nLowerMargin(rWW.nLowerMargin),
1909nNetWidth(rWW.nSp28),
1911eHRel(
text::RelOrientation::PAGE_FRAME),
1913eVAlign(
text::VertOrientation::
NONE),
1914eHAlign(
text::HoriOrientation::
NONE),
1915nXBind(( rWW.nTPc & 0xc0 ) >> 6),
1916nYBind(( rWW.nTPc & 0x30 ) >> 4),
1925 eSurround = css::text::WrapTextMode_DYNAMIC;
1929 eSurround = css::text::WrapTextMode_NONE;
1933 eSurround = css::text::WrapTextMode_PARALLEL;
1936 eSurround = css::text::WrapTextMode_THROUGH;
1939 eSurround = css::text::WrapTextMode_DYNAMIC;
1964 msword_cast<sal_Int16>(nPgWidth ? nPgWidth : 2268);
1986 eVRel = text::RelOrientation::PAGE_PRINT_AREA;
1989 eVRel = text::RelOrientation::PAGE_FRAME;
2002 eVRel = text::RelOrientation::FRAME;
2005 eVAlign = text::VertOrientation::TOP;
2010 eVAlign = text::VertOrientation::CENTER;
2013 eVAlign = text::VertOrientation::BOTTOM;
2025 eHAlign = text::HoriOrientation::LEFT;
2029 eHAlign = text::HoriOrientation::CENTER;
2032 eHAlign = text::HoriOrientation::RIGHT;
2036 eHAlign = text::HoriOrientation::LEFT;
2040 eHAlign = text::HoriOrientation::RIGHT;
2052 eHRel = text::RelOrientation::FRAME;
2055 eHRel = text::RelOrientation::PAGE_PRINT_AREA;
2071 sal_Int16 nLeBorderMgn( 0 );
2076 nLeBorderMgn = nLeBorderMgn + nTemp;
2079 sal_Int16 nRiBorderMgn( 0 );
2084 nRiBorderMgn = nRiBorderMgn + nTemp;
2086 if ( !
bAutoWidth &&
eHAlign == text::HoriOrientation::LEFT &&
eHRel == text::RelOrientation::PAGE_FRAME )
2092 eHRel = text::RelOrientation::PAGE_PRINT_AREA;
2097 else if ( !
bAutoWidth &&
eHAlign == text::HoriOrientation::RIGHT &&
eHRel == text::RelOrientation::PAGE_FRAME )
2103 eHRel = text::RelOrientation::PAGE_RIGHT;
2108 else if ( !
bAutoWidth &&
eHAlign == text::HoriOrientation::LEFT &&
eHRel == text::RelOrientation::PAGE_PRINT_AREA )
2113 eHRel = text::RelOrientation::PAGE_PRINT_AREA;
2114 nXPos = -nLeBorderMgn;
2118 else if ( !
bAutoWidth &&
eHAlign == text::HoriOrientation::RIGHT &&
eHRel == text::RelOrientation::PAGE_PRINT_AREA )
2123 eHRel = text::RelOrientation::PAGE_RIGHT;
2136 sal_Int16 nLeLMgn = 0;
2138 nLeLMgn = nLeLMgn + nTemp;
2142 if (
eHAlign == text::HoriOrientation::LEFT)
2153 eVRel = text::RelOrientation::PAGE_FRAME;
2154 nYPos =
static_cast< sal_Int16
>(
nYPos + nWWPgTop );
2200 sal_Int16 eHRel = pFS->
eHRel;
2214 if ( pFS->
eSurround == css::text::WrapTextMode_DYNAMIC )
2218 short aSizeArray[5]={0};
2226 text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ) );
2249 Init(rReader, pPaM);
2253 short aSizeArray[5]={0};
2264 for (
int i = 0;
i < 4;
i++)
2298 : m_pCtrlStck(pStack),
2299 m_aChrSet(rDoc.GetAttrPool()),
2300 m_aParSet(rDoc.GetAttrPool())
2305 for (
size_t i=0;
i < nCnt; ++
i)
2334 }
while ((pItem = aIter.
NextItem()));
2347 OSL_ENSURE( rContent.
GetContentIdx(),
"No content prepared." );
2382 if(aIdx.GetNode().IsTableNode())
2387 if ( (aIdx < aEnd) && aIdx.GetNode().IsTextNode() )
2391 if (aIdx == aEnd && pNd && pNd->
GetText().isEmpty())
2434 OSL_ENSURE(rApo.
HasFrame() || pTabPos,
2435 "If no frame found, *MUST* be in a table");
2443 pRet->ApplyTabPos(pTabPos);
2445 if (pRet->IsEmpty())
2473 short nDCS = SVBT16ToUInt16(aDCS.
pSprm);
2525 OSL_ENSURE(
m_xSFlyPara->GetFlyFormat()->GetAnchor().GetAnchorId() ==
2534 m_xWWZOrder->InsertTextLayerObject(pOurNewObject);
2599 if (aLastAnchorPos == aToBeJoined)
2607 if (aDropCharPos == aToBeJoined)
2616 if (aOpenApoPos == aToBeJoined)
2669 OSL_ENSURE(
m_xSFlyPara->xMainTextPos,
"StopApo: xMainTextPos is nullptr");
2722 if (aLastAnchorPos == aToBeJoined)
2778 m_xSFlyPara->GetFlyFormat()->SetFormatAttr(aSize);
2801 OSL_ENSURE(
m_xWFlyPara,
" Where is my pWFlyPara ? ");
2821 const bool bFirstLineOfStSet,
2822 const bool bLeftIndentSet )
2844 if ( bFirstLineOfStSet )
2850 if ( bLeftIndentSet )
2973 else if (
m_pPaM !=
nullptr)
3011 reinterpret_cast<const char*
>(
pData+2), 1,
3012 RTL_TEXTENCODING_MS_1252).toChar();
3033 const int nContiguousWestern = 8;
3034 const int nWestern = nContiguousWestern + 1;
3035 const int nEastern = 2;
3037 const int nIds = nWestern + nEastern + nCTL;
3038 static const sal_uInt16 nEndIds[ nIds ] =
3057 nI = nContiguousWestern;
3069 sal_uInt16 nMask = 1 << nI;
3090 bool bOn = *
pData & 1;
3231 static const sal_uInt16 nEndIds[2] =
3245 OSL_ENSURE(nI <= 1,
"not happening");
3249 sal_uInt16 nMask = 1 << nI;
3257 bool bOn = *
pData & 1;
3272 && ( *
pData & 0x80 )
3317 OSL_ENSURE(
false,
"Unhandled unknown bidi toggle attribute");
3380 OSL_ENSURE(
false,
"Unhandled unknown toggle attribute");
3386 sal_uInt16 nNewStyle81Mask )
3388 sal_uInt16
i = 1, nToggleAttrFlags =
m_xCtrlStck->GetToggleAttrFlags();
3392 (
i & nToggleAttrFlags) &&
3393 ((
i & nOldStyle81Mask) != (
i & nNewStyle81Mask))
3402 sal_uInt16 nNewStyle81Mask )
3404 sal_uInt16
i = 1, nToggleAttrFlags =
m_xCtrlStck->GetToggleBiDiAttrFlags();
3408 (
i & nToggleAttrFlags) &&
3409 ((
i & nOldStyle81Mask) != (
i & nNewStyle81Mask))
3462 aBegin == aEnd && nBegin == nEnd - 1 &&
3487 bool bIsGraphicPlacementHack =
false;
3502 bIsGraphicPlacementHack =
true;
3505 return bIsGraphicPlacementHack;
3512 if (nLen < (eVersion <=
ww::eWW2 ? 1 : 2))
3529 short nPos = eVersion <= ww::eWW2 ? static_cast< sal_Int8 >( *
pData ) : SVBT16ToInt16(
pData );
3530 sal_Int32 nPos2 =
nPos * ( 10 * 100 );
3533 OSL_ENSURE(pF,
"Expected to have the fontheight available here");
3536 sal_Int32 nHeight = 240;
3537 if (pF !=
nullptr && pF->GetHeight() != 0)
3538 nHeight = pF->GetHeight();
3551 bool bWordLine =
false;
3560 case 2: bWordLine =
true;
3611 else if(
pData && 6 == nLen )
3618 switch( SVBT16ToUInt16(
pData+1 ) )
3620 case 1: cStt =
'('; cEnd =
')';
break;
3621 case 2: cStt =
'['; cEnd =
']';
break;
3622 case 3: cStt =
'<'; cEnd =
'>';
break;
3623 case 4: cStt =
'{'; cEnd =
'}';
break;
3631 bool bFitToLine = 0 != *(
pData+1);
3720 if (pUnderlineAttr && nLen >= 4)
3726 OUString& rName,
FontPitch& rePitch, rtl_TextEncoding& reCharSet )
3758 reCharSet = RTL_TEXTENCODING_DONTKNOW;
3760 reCharSet = rtl_getTextEncodingFromWindowsCharset(pF->
aFFNBase.
chs);
3767 if (rName.startsWithIgnoreAsciiCase(
"Tms Rmn") ||
3768 rName.startsWithIgnoreAsciiCase(
"Timmons") ||
3769 rName.startsWithIgnoreAsciiCase(
"CG Times") ||
3770 rName.startsWithIgnoreAsciiCase(
"MS Serif") ||
3771 rName.startsWithIgnoreAsciiCase(
"Garamond") ||
3772 rName.startsWithIgnoreAsciiCase(
"Times Roman") ||
3773 rName.startsWithIgnoreAsciiCase(
"Times New Roman"))
3777 else if (rName.startsWithIgnoreAsciiCase(
"Helv") ||
3778 rName.startsWithIgnoreAsciiCase(
"Arial") ||
3779 rName.startsWithIgnoreAsciiCase(
"Univers") ||
3780 rName.startsWithIgnoreAsciiCase(
"LinePrinter") ||
3781 rName.startsWithIgnoreAsciiCase(
"Lucida Sans") ||
3782 rName.startsWithIgnoreAsciiCase(
"Small Fonts") ||
3783 rName.startsWithIgnoreAsciiCase(
"MS Sans Serif"))
3801 rtl_TextEncoding eSrcCharSet;
3818 eSrcCharSet = RTL_TEXTENCODING_DONTKNOW;
3831 eSrcCharSet = RTL_TEXTENCODING_DONTKNOW;
3840 rtl_TextEncoding eDstCharSet = eSrcCharSet;
3842 SvxFontItem aFont( eFamily,
aName, OUString(), ePitch, eDstCharSet, nWhich);
3959 sal_uInt16 nFCode = SVBT16ToUInt16(
pData );
3989 if (nLen < (eVersion <=
ww::eWW2 ? 1 : 2))
4039 if (nfChsDiff && nLen >= 2)
4087 sal_uInt16
nId = SVBT16ToUInt16(
pData );
4116 sal_Int16 nKern = SVBT16ToUInt16(
pData );
4127 sal_Int16 nAutoKern = SVBT16ToUInt16(
pData );
4151 std::map<OUString, css::uno::Any>& rMap = aGrabBag.
GetGrabBag();
4152 rMap.insert(std::pair<OUString, css::uno::Any>(
"CharShadingMarker",
uno::Any(
true)));
4165 OSL_ENSURE(nLen == 10,
"Len of para back colour not 10!");
4173 std::map<OUString, css::uno::Any>& rMap = aGrabBag.
GetGrabBag();
4174 rMap.insert(std::pair<OUString, css::uno::Any>(
"CharShadingMarker",
uno::Any(
true)));
4243 short nPara = SVBT16ToUInt16(
pData );
4246 ::std::unique_ptr<SvxFirstLineIndentItem> pFirstLine(pItem
4250 ::std::unique_ptr<SvxTextLeftMarginItem> pLeftMargin(pItem
4254 ::std::unique_ptr<SvxRightMarginItem> pRightMargin(pItem
4275 pFirstLine->SetTextFirstLineOffset(
static_cast<short>(pFormat->
GetFirstLineIndent()));
4277 pTextNode->
SetAttr(*pLeftMargin);
4278 pTextNode->
SetAttr(*pFirstLine);
4309 bool bFirstLinOfstSet(
false );
4310 bool bLeftIndentSet(
false );
4318 pLeftMargin->SetTextLeft(nPara);
4323 bLeftIndentSet =
true;
4351 pFirstLine->SetTextFirstLineOffset(nPara);
4361 pLeftMargin->SetTextLeft(pNumFormat->GetIndentAt());
4365 if ( pDefaultStopItem && pDefaultStopItem->
Count() > 0 )
4375 bFirstLinOfstSet =
true;
4381 pRightMargin->SetRight(nPara);
4387 NewAttr(*pFirstLine, bFirstLinOfstSet,
false);
4388 NewAttr(*pLeftMargin,
false, bLeftIndentSet);
4389 NewAttr(*pRightMargin,
false,
false);
4401 if (nLen < (eVersion <=
ww::eWW2 ? 3 : 4))
4409 short nSpace = SVBT16ToUInt16(
pData );
4410 short nMulti = (eVersion <=
ww::eWW2) ? 1 : SVBT16ToUInt16(
pData + 2 );
4416 eLnSpc = SvxLineSpaceRule::Fix;
4419 eLnSpc = SvxLineSpaceRule::Min;
4431 sal_uInt16 nSpaceTw = 0;
4443 nSpaceTw = o3tl::narrowing<sal_uInt16>(
n * pH->
GetHeight() / 100 );
4448 nSpaceTw = o3tl::narrowing<sal_uInt16>(nSpace);
4460 if (fDontUseHTMLAutoSpacing)
4540 short nPara = SVBT16ToUInt16(
pData );
4583 if (!pText || !
nPos)
4642 bool bDistributed =
false;
4649 eAdjust = SvxAdjust::Center;
4652 eAdjust = SvxAdjust::Right;
4655 eAdjust = SvxAdjust::Block;
4658 eAdjust = SvxAdjust::Block;
4659 bDistributed =
true;
4677 bRTL = *aDir.
pSprm != 0;
4682 if (pItem && (pItem->GetValue() == SvxFrameDirection::Horizontal_RL_TB))
4703 bool bDistributed =
false;
4710 eAdjust = SvxAdjust::Center;
4713 eAdjust = SvxAdjust::Left;
4716 eAdjust = SvxAdjust::Block;
4719 eAdjust = SvxAdjust::Block;
4720 bDistributed =
true;
4746 OSL_ENSURE(
false,
"wrong Id" );