27#include <rtl/tencinfo.h>
85#include <lineinfo.hxx>
90#include <com/sun/star/i18n/ScriptType.hpp>
104 if (pLine && !pLine->
isEmpty())
110 case SvxBorderLineStyle::SOLID:
118 case SvxBorderLineStyle::DOTTED:
121 case SvxBorderLineStyle::DASHED:
124 case SvxBorderLineStyle::DOUBLE:
125 case SvxBorderLineStyle::DOUBLE_THIN:
128 case SvxBorderLineStyle::THINTHICK_SMALLGAP:
131 case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
134 case SvxBorderLineStyle::THINTHICK_LARGEGAP:
137 case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
140 case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
143 case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
146 case SvxBorderLineStyle::EMBOSSED:
149 case SvxBorderLineStyle::ENGRAVED:
152 case SvxBorderLineStyle::OUTSET:
155 case SvxBorderLineStyle::INSET:
158 case SvxBorderLineStyle::FINE_DASHED:
161 case SvxBorderLineStyle::DASH_DOT:
164 case SvxBorderLineStyle::DASH_DOT_DOT:
167 case SvxBorderLineStyle::NONE:
173 double const fConverted(
178 + OString::number(
static_cast<sal_Int32
>(fConverted)));
184 + OString::number(
static_cast<sal_Int32
>(fConverted) / 2));
188 + OString::number(
static_cast<sal_Int32
>(rExport.
GetColor(pLine->
GetColor()))));
194 return aRet.makeStringAndClear();
198 const char* pStr, sal_uInt16 nDist,
206 if (eShadowLocation == SvxShadowLocation::BottomRight)
208 return aRet.makeStringAndClear();
227 sal_uInt32 nRow = pTextNodeInfo->getRow();
228 sal_uInt32 nCell = pTextNodeInfo->getCell();
235 OSL_ENSURE(pDeepInner,
"TableNodeInfoInner not found");
247 if ((nRow == 0 && nCell == 0) || (
m_nTableDepth == 0 && pTextNodeInfo->getDepth()))
252 sal_uInt32 nCurrentDepth = pTextNodeInfo->getDepth();
257 for (sal_uInt32 nDepth =
m_nTableDepth + 1; nDepth <= pTextNodeInfo->getDepth();
261 pTextNodeInfo->getInnerForDepth(nDepth));
280 bool bLastPara =
false;
334 OSL_ENSURE(
m_aStyles.getLength() == 0,
"m_aStyles is not empty");
401 bool bSingleEmptyRun)
403 SAL_INFO(
"sw.rtf", __func__ <<
", bSingleEmptyRun: " << bSingleEmptyRun);
435 OSL_ENSURE(
m_aStyles.getLength() == 0,
"m_aStyles is not empty");
450 const OString aNormal =
m_aStyles.makeStringAndClear();
462 if (!aAssocRtlch.isEmpty())
470 if (!aAssocRtlch.isEmpty())
475 if (!aAssocHich.isEmpty())
479 if (!aNormal.isEmpty())
483 if (!aAssocDbch.isEmpty())
495 case i18n::ScriptType::LATIN:
498 case i18n::ScriptType::ASIAN:
501 case i18n::ScriptType::COMPLEX:
509 return aBuf.makeStringAndClear();
515 SAL_INFO(
"sw.rtf", __func__ <<
", rText: " << rText);
532 + OUString::number((aWW8Ruby.
GetRubyHeight() + 5) / 10) +
" \\o";
537 aStr +=
"(\\s\\up " + OUString::number((aWW8Ruby.
GetBaseHeight() + 10) / 20 - 1) +
"(";
583 const OUString& rURL =
m_aURLs.top();
590 if (isAtEndOfParagraph)
612 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
620 if (pRedline->
GetType() == RedlineType::Insert)
628 else if (pRedline->
GetType() == RedlineType::Delete)
645 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
652 + OString::number(
static_cast<sal_Int32
>(nStyle)));
654 aStyle.append(*pStyle);
687 case text::RelOrientation::PAGE_PRINT_AREA:
691 case text::RelOrientation::PAGE_FRAME:
704 case text::RelOrientation::FRAME:
708 case text::RelOrientation::PAGE_PRINT_AREA:
722 case text::HoriOrientation::LEFT:
726 case text::HoriOrientation::CENTER:
730 case text::HoriOrientation::RIGHT:
737 m_aRowDefs.append(
static_cast<sal_Int32
>(nTPosX));
744 case text::VertOrientation::TOP:
748 case text::VertOrientation::CENTER:
752 case text::VertOrientation::BOTTOM:
759 m_aRowDefs.append(
static_cast<sal_Int32
>(nTPosY));
766 m_aRowDefs.append(
static_cast<sal_Int32
>(nTdfrmtxtTop));
769 m_aRowDefs.append(
static_cast<sal_Int32
>(nTdfrmtxtBottom));
774 m_aRowDefs.append(
static_cast<sal_Int32
>(nTdfrmtxtLeft));
777 m_aRowDefs.append(
static_cast<sal_Int32
>(nTdfrmtxtRight));
785 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
799 static const SvxBoxItemLine aBorders[] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT,
800 SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT };
802 static const char* aRowPadNames[]
806 static const char* aRowPadUnits[]
810 for (
int i = 0;
i < 4; ++
i)
819 const double fWidthRatio =
m_pTableWrt->GetAbsWidthRatio();
821 sal_uInt32 nRow = pTableTextNodeInfoInner->getRow();
822 if (nRow >= aRows.
size())
824 SAL_WARN(
"sw.ww8",
"RtfAttributeOutput::TableDefinition: out of range row: " << nRow);
831 sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner->getDepth();
833 for (sal_uInt32
i = 0;
i <
m_aCells[nCurrentDepth];
i++)
838 pTableTextNodeInfoInner->setCell(
i);
846 + rtl::math::round(nSz * fWidthRatio)));
861 SwWriteTableRow* pRow = aRows[pTableTextNodeInfoInner->getRow()].get();
863 = pRow->
GetCells()[pTableTextNodeInfoInner->getCell()].get();
870 static const SvxBoxItemLine aBorders[] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT,
871 SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT };
872 static const char* aBorderNames[]
877 static const char* aCellPadNames[]
880 static const char* aCellPadUnits[]
883 for (
int i = 0;
i < 4; ++
i)
887 if (rBox.GetDistance(aBorders[
i]))
892 m_aRowDefs.append(
static_cast<sal_Int32
>(rBox.GetDistance(aBorders[
i])));
900 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
901 const SwTableBox* pTableBox = pTableTextNodeInfoInner->getTableBox();
908 aColor = pTableColorProp->GetColor();
912 if (pRowColorProp && pRowColorProp->GetColor() !=
COL_AUTO)
913 aColor = pRowColorProp->GetColor();
916 SwWriteTableRow* pRow = aRows[pTableTextNodeInfoInner->getRow()].get();
918 = pRow->
GetCells()[pTableTextNodeInfoInner->getCell()].get();
922 if (pBrushItem->GetColor() !=
COL_AUTO)
923 aColor = pBrushItem->GetColor();
945 const SwTableBox* pTabBox = pTableTextNodeInfoInner->getTableBox();
953 sal_Int32 nHeight = 0;
977 const SwTableBox* pTabBox = pTableTextNodeInfoInner->getTableBox();
989 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
1002 SwWriteTableRow* pRow = aRows[pTableTextNodeInfoInner->getRow()].get();
1004 = pRow->
GetCells()[pTableTextNodeInfoInner->getCell()].get();
1022 if (!pVertOrientItem)
1027 case text::VertOrientation::CENTER:
1030 case text::VertOrientation::BOTTOM:
1050 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
1056 case text::HoriOrientation::CENTER:
1057 aTableAdjust.setLength(0);
1060 case text::HoriOrientation::RIGHT:
1061 aTableAdjust.setLength(0);
1065 case text::HoriOrientation::LEFT_AND_WIDTH:
1079 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
1091 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
1096 bool bRelBoxSize =
false;
1106 m_pTableWrt = std::make_unique<SwWriteTable>(pTable, pLayout);
1121 sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner->getDepth();
1122 SAL_INFO(
"sw.rtf", __func__ <<
", (depth is " << nCurrentDepth <<
")");
1131 if (nCurrentDepth > 1)
1231 sal_uInt32 nRow = pInner->getRow();
1233 const SwTable* pTable = pInner->getTable();
1235 sal_uInt16 nLinesCount = rLines.
size();
1237 if (pInner->isEndOfCell())
1241 if (pInner->isEndOfLine())
1245 if (pInner->isEndOfLine() && (nRow + 1) == nLinesCount)
1256 OSL_ENSURE(
m_aStylesheet.getLength() == 0,
"m_aStylesheet is not empty");
1273 sal_uInt16 nNext, sal_uInt16 , sal_uInt16 ,
1274 sal_uInt16 nSlot,
bool bAutoUpdate)
1276 SAL_INFO(
"sw.rtf", __func__ <<
", rName = '" << rName <<
"'");
1285 if (nBase != 0x0FFF)
1326 m_aStyles.append(
static_cast<sal_Int32
>(nLvl));
1328 m_aStyles.append(
static_cast<sal_Int32
>(nLvl));
1414 sal_uInt16 nOpt = (1 << 5);
1444 const ::std::optional<sal_uInt16>& oPageRestartNumber)
1446 if (oPageRestartNumber)
1453 const char* pStr =
nullptr;
1481 SAL_INFO(
"sw.rtf", __func__ <<
", nBreakCode = " <<
int(nBreakCode));
1487 const char*
sType =
nullptr;
1522 const char*
pOut =
nullptr;
1613 sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
1616 sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex,
1617 sal_Int16 ,
const OUString& rNumberingString,
1628 sal_uInt16 nVal = 0;
1629 switch (nNumberingType)
1689 case style::NumberingType::HANGUL_SYLLABLE_KO:
1692 case style::NumberingType::HANGUL_JAMO_KO:
1695 case style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO:
1698 case style::NumberingType::HANGUL_CIRCLED_JAMO_KO:
1701 case style::NumberingType::NUMBER_HANGUL_KO:
1704 case style::NumberingType::NUMBER_DIGITAL_KO:
1707 case style::NumberingType::NUMBER_DIGITAL2_KO:
1710 case style::NumberingType::NUMBER_LEGAL_KO:
1730 case SvxAdjust::Center:
1733 case SvxAdjust::Right:
1814 std::u16string_view rFieldCmd,
FieldFlags nMode)
1817 bool bHasInstructions = !rFieldCmd.empty();
1820 if (bHasInstructions)
1834 if (bHasInstructions)
1846 if (bHasInstructions)
1861 std::vector<OUString>& rEnds)
1863 for (
const auto& rStart : rStarts)
1871 for (
const auto& rEnd : rEnds)
1881 std::vector<OUString>& rEnds)
1883 for (
const auto& rStart : rStarts)
1896 for (
const auto& rEnd : rEnds)
1904 const sal_Int32
nId = it->second;
1924 const char* pStr,
bool bTitlepg)
1950void lcl_TextFrameShadow(std::vector<std::pair<OString, OString>>& rFlyProperties,
1954 if (aShadowItem.
GetLocation() == SvxShadowLocation::NONE)
1957 rFlyProperties.push_back(std::make_pair<OString, OString>(
"fShadow", OString::number(1)));
1961 rFlyProperties.push_back(std::make_pair<OString, OString>(
1965 OString aShadowWidth = OString::number(sal_Int32(aShadowItem.
GetWidth() / 20) * 12700);
1970 case SvxShadowLocation::TopLeft:
1971 aOffsetX =
"-" + aShadowWidth;
1972 aOffsetY =
"-" + aShadowWidth;
1974 case SvxShadowLocation::TopRight:
1975 aOffsetX = aShadowWidth;
1976 aOffsetY =
"-" + aShadowWidth;
1978 case SvxShadowLocation::BottomLeft:
1979 aOffsetX =
"-" + aShadowWidth;
1980 aOffsetY = aShadowWidth;
1982 case SvxShadowLocation::BottomRight:
1983 aOffsetX = aShadowWidth;
1984 aOffsetY = aShadowWidth;
1986 case SvxShadowLocation::NONE:
1987 case SvxShadowLocation::End:
1990 if (!aOffsetX.isEmpty())
1991 rFlyProperties.emplace_back(
"shadowOffsetX", aOffsetX);
1992 if (!aOffsetY.isEmpty())
1993 rFlyProperties.emplace_back(
"shadowOffsetY", aOffsetY);
1996void lcl_TextFrameRelativeSize(std::vector<std::pair<OString, OString>>& rFlyProperties,
2005 rFlyProperties.push_back(
2006 std::make_pair<OString, OString>(
"pctHoriz", OString::number(nWidthPercent * 10)));
2011 case text::RelOrientation::PAGE_FRAME:
2018 rFlyProperties.emplace_back(std::make_pair(
"sizerelh", aRelation));
2024 rFlyProperties.push_back(
2025 std::make_pair<OString, OString>(
"pctVert", OString::number(nHeightPercent * 10)));
2030 case text::RelOrientation::PAGE_FRAME:
2037 rFlyProperties.emplace_back(std::make_pair(
"sizerelv", aRelation));
2057 std::unique_ptr<SwWriteTable> pTableWrt(std::move(
m_pTableWrt));
2278 const uno::Reference<awt::XControlModel>& xControlModel
2279 = pFormObj->GetUnoControlModel();
2280 uno::Reference<lang::XServiceInfo> xInfo(xControlModel, uno::UNO_QUERY);
2283 uno::Reference<beans::XPropertySet> xPropSet(xControlModel, uno::UNO_QUERY);
2284 uno::Reference<beans::XPropertySetInfo> xPropSetInfo
2285 = xPropSet->getPropertySetInfo();
2287 if (xInfo->supportsService(
"com.sun.star.form.component.CheckBox"))
2300 if (xPropSetInfo->hasPropertyByName(
sName))
2302 xPropSet->getPropertyValue(
sName) >>=
aStr;
2312 if (xPropSetInfo->hasPropertyByName(
sName))
2314 xPropSet->getPropertyValue(
sName) >>=
aStr;
2323 sName =
"HelpF1Text";
2324 if (xPropSetInfo->hasPropertyByName(
sName))
2326 xPropSet->getPropertyValue(
sName) >>=
aStr;
2335 sal_Int16 nTemp = 0;
2336 xPropSet->getPropertyValue(
"DefaultState") >>= nTemp;
2339 xPropSet->getPropertyValue(
"State") >>= nTemp;
2348 else if (xInfo->supportsService(
"com.sun.star.form.component.TextField"))
2360 for (
int i = 0;
i < 8;
i++)
2361 aBuf.append(
char(0x00));
2362 xPropSet->getPropertyValue(
"Name") >>= aTmp;
2364 aBuf.append(OStringChar(
static_cast<char>(
aStr.getLength())) +
aStr
2365 + OStringChar(
char(0x00)));
2366 xPropSet->getPropertyValue(
"DefaultText") >>= aTmp;
2368 aBuf.append(
static_cast<char>(
aStr.getLength()));
2370 for (
int i = 0;
i < 11;
i++)
2371 aBuf.append(
char(0x00));
2373 pStr =
aStr.getStr();
2374 for (
int i = 0;
i <
aStr.getLength();
i++, pStr++)
2378 xPropSet->getPropertyValue(
"Text") >>= aTmp;
2385 if (xPropSetInfo->hasPropertyByName(
sName))
2387 xPropSet->getPropertyValue(
sName) >>= aTmp;
2396 sName =
"HelpF1Text";
2397 if (xPropSetInfo->hasPropertyByName(
sName))
2399 xPropSet->getPropertyValue(
sName) >>= aTmp;
2409 else if (xInfo->supportsService(
"com.sun.star.form.component.ListBox"))
2412 uno::Sequence<sal_Int16> aIntSeq;
2413 uno::Sequence<OUString> aStrSeq;
2423 xPropSet->getPropertyValue(
"DefaultSelection") >>= aIntSeq;
2424 if (aIntSeq.hasElements())
2431 xPropSet->getPropertyValue(
"SelectedItems") >>= aIntSeq;
2432 if (aIntSeq.hasElements())
2440 if (xPropSetInfo->hasPropertyByName(
sName))
2442 xPropSet->getPropertyValue(
sName) >>=
aStr;
2452 if (xPropSetInfo->hasPropertyByName(
sName))
2454 xPropSet->getPropertyValue(
sName) >>=
aStr;
2463 sName =
"HelpF1Text";
2464 if (xPropSetInfo->hasPropertyByName(
sName))
2466 xPropSet->getPropertyValue(
sName) >>=
aStr;
2475 xPropSet->getPropertyValue(
"StringItemList") >>= aStrSeq;
2476 for (
const auto& rStr : std::as_const(aStrSeq))
2488 SAL_INFO(
"sw.rtf", __func__ <<
" unhandled form control: '"
2489 << xInfo->getImplementationName() <<
"'");
2511 SAL_INFO(
"sw.rtf", __func__ <<
": unknown type ("
2519 switch (rCaseMap.GetValue())
2521 case SvxCaseMap::SmallCaps:
2524 case SvxCaseMap::Uppercase:
2547 if (!rContour.GetValue())
2571 short nEsc = rEscapement.
GetEsc();
2573 sal_Int32 nProp100 = nProp * 100;
2584 nEsc = .8 * (100 - nProp);
2589 nEsc = .2 * -(100 - nProp);
2621 m_aStyles.append(
static_cast<sal_Int32
>(
round(fHeight * nEsc / 1000)));
2646 switch (rFontSize.Which())
2667 m_aStyles.append(
static_cast<sal_Int32
>(rKerning.GetValue() / 5));
2669 m_aStyles.append(
static_cast<sal_Int32
>(rKerning.GetValue()));
2674 switch (rLanguage.Which())
2679 static_cast<sal_Int32
>(
static_cast<sal_uInt16
>(rLanguage.
GetLanguage())));
2682 static_cast<sal_Int32
>(
static_cast<sal_uInt16
>(rLanguage.
GetLanguage())));
2687 static_cast<sal_Int32
>(
static_cast<sal_uInt16
>(rLanguage.
GetLanguage())));
2690 static_cast<sal_Int32
>(
static_cast<sal_uInt16
>(rLanguage.
GetLanguage())));
2695 static_cast<sal_Int32
>(
static_cast<sal_uInt16
>(rLanguage.
GetLanguage())));
2710 if (!rShadow.GetValue())
2716 const char* pStr =
nullptr;
2800 m_aStyles.append(
static_cast<sal_Int32
>(rAutoKern.GetValue() ? 1 : 0));
2806 m_aStyles.append(
static_cast<sal_Int32
>(rBlink.GetValue() ? 2 : 0));
2893 if (
v == FontEmphasisMark::NONE)
2895 else if (
v == (FontEmphasisMark::Dot | FontEmphasisMark::PosAbove))
2897 else if (
v == (FontEmphasisMark::Accent | FontEmphasisMark::PosAbove))
2899 else if (
v == (FontEmphasisMark::Circle | FontEmphasisMark::PosAbove))
2901 else if (
v == (FontEmphasisMark::Dot | FontEmphasisMark::PosBelow))
2914 if (!cStart && !cEnd)
2916 else if (
'{' == cStart ||
'}' == cEnd)
2918 else if (
'<' == cStart ||
'>' == cEnd)
2920 else if (
'[' == cStart ||
']' == cEnd)
2932 m_aStyles.append(
static_cast<sal_Int32
>(rScaleWidth.GetValue()));
2938 switch (rRelief.GetValue())
2940 case FontRelief::Embossed:
2943 case FontRelief::Engraved:
2958 if (!rHidden.GetValue())
2963 const sal_uInt16 nDist,
const bool bShadow)
2967 bShadow ? SvxShadowLocation::BottomRight : SvxShadowLocation::NONE));
2984 if (pTextAtr &&
nullptr != (pFormat = pTextAtr->
GetCharFormat()))
2997 m_aStyles.append(
static_cast<sal_Int32
>(nStyle));
3014 SAL_INFO(
"sw.rtf", __func__ <<
" start");
3051 SAL_INFO(
"sw.rtf", __func__ <<
" end");
3057 m_aStyles.append(
static_cast<sal_Int32
>(nSpace));
3059 m_aStyles.append(
static_cast<sal_Int32
>(nMulti));
3066 case SvxAdjust::Left:
3069 case SvxAdjust::Right:
3072 case SvxAdjust::BlockLine:
3073 case SvxAdjust::Block:
3079 case SvxAdjust::Center:
3089 if (!rSplit.GetValue())
3095 if (rWidows.GetValue())
3105 for (sal_uInt16
n = 0;
n < rTabStop.
Count();
n++)
3110 const char* pFill =
nullptr;
3134 const char* pAdjStr =
nullptr;
3137 case SvxTabAdjust::Right:
3140 case SvxTabAdjust::Decimal:
3143 case SvxTabAdjust::Center:
3171 if (USHRT_MAX == nNumId || 0 == nNumId ||
nullptr == pTextNd)
3176 if (!pRule || !pTextNd->
IsInList())
3180 "sw.rtf",
"text node does not have valid list level");
3184 pFormat = &pRule->
Get(nLvl);
3210 sText = OUString(&cBullet, 1);
3215 if (!sText.isEmpty())
3223 if (!sText.isEmpty())
3257 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3262 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3292 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3313 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3356 = pBoxItem->CalcLineSpace(SvxBoxItemLine::LEFT,
true);
3358 = pBoxItem->CalcLineSpace(SvxBoxItemLine::RIGHT,
true);
3514 css::text::WrapTextMode eSurround = rSurround.
GetSurround();
3515 bool bGold = css::text::WrapTextMode_DYNAMIC == eSurround;
3517 eSurround = css::text::WrapTextMode_PARALLEL;
3526 std::optional<sal_Int32> oWrk;
3529 case css::text::WrapTextMode_NONE:
3532 case css::text::WrapTextMode_THROUGH:
3535 case css::text::WrapTextMode_PARALLEL:
3539 case css::text::WrapTextMode_DYNAMIC:
3566 case text::RelOrientation::PAGE_FRAME:
3568 std::make_pair<OString, OString>(
"posrelv", OString::number(1)));
3572 std::make_pair<OString, OString>(
"posrelv", OString::number(2)));
3581 case text::VertOrientation::TOP:
3582 case text::VertOrientation::LINE_TOP:
3584 std::make_pair<OString, OString>(
"posv", OString::number(1)));
3586 case text::VertOrientation::BOTTOM:
3587 case text::VertOrientation::LINE_BOTTOM:
3589 std::make_pair<OString, OString>(
"posv", OString::number(3)));
3591 case text::VertOrientation::CENTER:
3592 case text::VertOrientation::LINE_CENTER:
3594 std::make_pair<OString, OString>(
"posv", OString::number(2)));
3616 case text::RelOrientation::PAGE_FRAME:
3618 std::make_pair<OString, OString>(
"posrelh", OString::number(1)));
3622 std::make_pair<OString, OString>(
"posrelh", OString::number(2)));
3631 case text::HoriOrientation::LEFT:
3633 std::make_pair<OString, OString>(
"posh", OString::number(1)));
3635 case text::HoriOrientation::CENTER:
3637 std::make_pair<OString, OString>(
"posh", OString::number(2)));
3639 case text::HoriOrientation::RIGHT:
3641 std::make_pair<OString, OString>(
"posh", OString::number(3)));
3666 case RndStdIds::FLY_AT_PAGE:
3670 case RndStdIds::FLY_AT_PARA:
3671 case RndStdIds::FLY_AS_CHAR:
3706 "fillType", OString::number(7)));
3720 const Color aStartColor(rColorStops.front().getStopColor());
3724 if (rColorStops.size() < 3)
3727 const Color aEndColor(rColorStops.back().getStopColor());
3736 const Color aEndColor(rColorStops[1].getStopColor());
3740 std::make_pair<OString, OString>(
"fillFocus", OString::number(50)));
3746 static const SvxBoxItemLine aBorders[] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT,
3747 SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT };
3748 static const char* aBorderNames[]
3775 if (!pLeft && !pRight && !pBottom && !pTop)
3778 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
"fLine",
"0"));
3798 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
"fLine",
"0"));
3807 double const fConverted(
3811 std::make_pair<OString, OString>(
"lineWidth", OString::number(nWidth)));
3819 && nDist == rBox.
GetDistance(SvxBoxItemLine::LEFT)
3820 && nDist == rBox.
GetDistance(SvxBoxItemLine::BOTTOM)
3821 && nDist == rBox.
GetDistance(SvxBoxItemLine::RIGHT))
3828 eShadowLocation = pItem->GetLocation();
3831 const char** pBrdNms = aBorderNames;
3832 for (
int i = 0;
i < 4; ++
i, ++pBrd, ++pBrdNms)
3864 for (sal_uInt16
n = 0;
n < nCols;)
3876 + rColumns[
n].GetLeft());
3884 if (rItem.GetValue())
3890 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3902 if (nDir == SvxFrameDirection::Environment)
3907 if (nDir == SvxFrameDirection::Vertical_RL_TB)
3922 if (nDir == SvxFrameDirection::Vertical_RL_TB)
3925 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
"txflTextFlow",
"3"));
3927 else if (rDirection.GetValue() == SvxFrameDirection::Vertical_LR_BT)
3930 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
"txflTextFlow",
"2"));
3935 if (nDir == SvxFrameDirection::Horizontal_RL_TB)
3943 const std::map<OUString, css::uno::Any>& rMap = rItem.
GetGrabBag();
3944 for (
const auto& rValue : rMap)
3946 if (rValue.first ==
"ParaTopMarginBeforeAutoSpacing")
3952 else if (rValue.first ==
"ParaBottomMarginAfterAutoSpacing")
3983 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3988 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3994 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
4045 " MACROBUTTON None ");
4053 , m_rExport(rExport)
4054 , m_pPrevPageDesc(nullptr)
4059 , m_bControlLtrRtl(false)
4060 , m_nNextAnnotationMarkId(0)
4061 , m_nCurrentAnnotationMarkId(-1)
4062 , m_bTableCellOpen(false)
4064 , m_bTableAfterCell(false)
4065 , m_nColBreakNeeded(false)
4066 , m_bBufferSectionBreaks(false)
4067 , m_bBufferSectionHeaders(false)
4068 , m_bLastTable(true)
4069 , m_bWroteCellInfo(false)
4070 , m_bTableRowEnded(false)
4071 , m_bIsBeforeFirstParagraph(true)
4072 , m_bSingleEmptyRun(false)
4075 , m_pFlyFrameSize(nullptr)
4076 , m_bParaBeforeAutoSpacing(false)
4077 , m_nParaBeforeSpacing(0)
4078 , m_bParaAfterAutoSpacing(false)
4079 , m_nParaAfterSpacing(0)
4163 sal_uInt16 nVal = 0;
4178static void lcl_AppendSP(OStringBuffer& rBuffer, std::string_view cName, std::u16string_view rValue,
4183 rBuffer.append(cName);
4187 rBuffer.append(
"}}");
4192 const char* pBLIPType,
const sal_uInt8* pGraphicAry, sal_uInt64 nSize,
4194 bool bWritePicProp =
true,
const SwAttrSet* pAttrSet =
nullptr)
4197 if (pBLIPType && nSize && pGraphicAry)
4203 if (pFlyFrameFormat && bWritePicProp)
4210 lcl_AppendSP(aRet,
"wzDescription", sDescription, rExport);
4229 nXCroppedSize = 100;
4231 nYCroppedSize = 100;
4238 + OString::number(
static_cast<sal_Int32
>((100 * rRendered.
Width()) / nXCroppedSize))
4240 + OString::number(
static_cast<sal_Int32
>((100 * rRendered.
Height()) / nYCroppedSize))
4249 + OString::number(
static_cast<sal_Int32
>(rMapped.
Height()))
4252 + OString::number(
static_cast<sal_Int32
>(rOrig.
Width()))
4254 + OString::number(
static_cast<sal_Int32
>(rOrig.
Height()))
4259 aRet.append(sal_Int32(8));
4265 pStream->WriteOString(aRet);
4275 pStream->WriteOString(aRet);
4279 return aRet.makeStringAndClear();
4287 Size aRendered(aSize);
4297 SAL_WARN(
"sw.rtf",
"failed to export the graphic");
4298 sal_uInt32 nSize = aStream.
TellEnd();
4307 SAL_WARN(
"sw.rtf",
"failed to export the graphic");
4319 sal_Int64 nAspect = rOLENode.
GetAspect();
4327 uno::Reference<util::XCloseable> xClosable = xObj->getComponent();
4328 if (!xClosable.is())
4330 auto pBase =
dynamic_cast<oox::FormulaImExportBase*
>(xClosable.get());
4331 SAL_WARN_IF(!pBase,
"sw.rtf",
"Math OLE object cannot write out RTF");