27 #include <rtl/tencinfo.h>
86 #include <lineinfo.hxx>
92 #include <com/sun/star/i18n/ScriptType.hpp>
105 if (pLine && !pLine->
isEmpty())
111 case SvxBorderLineStyle::SOLID:
119 case SvxBorderLineStyle::DOTTED:
122 case SvxBorderLineStyle::DASHED:
125 case SvxBorderLineStyle::DOUBLE:
126 case SvxBorderLineStyle::DOUBLE_THIN:
129 case SvxBorderLineStyle::THINTHICK_SMALLGAP:
132 case SvxBorderLineStyle::THINTHICK_MEDIUMGAP:
135 case SvxBorderLineStyle::THINTHICK_LARGEGAP:
138 case SvxBorderLineStyle::THICKTHIN_SMALLGAP:
141 case SvxBorderLineStyle::THICKTHIN_MEDIUMGAP:
144 case SvxBorderLineStyle::THICKTHIN_LARGEGAP:
147 case SvxBorderLineStyle::EMBOSSED:
150 case SvxBorderLineStyle::ENGRAVED:
153 case SvxBorderLineStyle::OUTSET:
156 case SvxBorderLineStyle::INSET:
159 case SvxBorderLineStyle::FINE_DASHED:
162 case SvxBorderLineStyle::DASH_DOT:
165 case SvxBorderLineStyle::DASH_DOT_DOT:
168 case SvxBorderLineStyle::NONE:
174 double const fConverted(
184 aRet.append(static_cast<sal_Int32>(fConverted) / 2);
190 return aRet.makeStringAndClear();
194 const char* pStr, sal_uInt16 nDist,
200 aRet.append(static_cast<sal_Int32>(nDist));
201 if (eShadowLocation == SvxShadowLocation::BottomRight)
203 return aRet.makeStringAndClear();
210 m_bControlLtrRtl =
true;
215 if (m_bIsBeforeFirstParagraph && m_rExport.m_nTextTyp !=
TXT_HDFT)
216 m_bIsBeforeFirstParagraph =
false;
221 sal_uInt32 nRow = pTextNodeInfo->getRow();
222 sal_uInt32 nCell = pTextNodeInfo->getCell();
225 if (m_nTableDepth > 0 && !m_bTableCellOpen)
228 pTextNodeInfo->getInnerForDepth(m_nTableDepth));
229 OSL_ENSURE(pDeepInner,
"TableNodeInfoInner not found");
232 if (pDeepInner && (pDeepInner->getCell() == 0 || m_bTableRowEnded))
234 StartTableRow(pDeepInner);
241 if ((nRow == 0 && nCell == 0) || (m_nTableDepth == 0 && pTextNodeInfo->getDepth()))
246 sal_uInt32 nCurrentDepth = pTextNodeInfo->getDepth();
248 if (nCurrentDepth > m_nTableDepth)
251 for (sal_uInt32 nDepth = m_nTableDepth + 1; nDepth <= pTextNodeInfo->getDepth();
255 pTextNodeInfo->getInnerForDepth(nDepth));
257 m_bLastTable = (nDepth == pTextNodeInfo->getDepth());
259 StartTableRow(pInner);
263 m_nTableDepth = nCurrentDepth;
268 OSL_ENSURE(m_aRun.getLength() == 0,
"m_aRun is not empty");
273 bool bLastPara =
false;
274 if (m_rExport.m_nTextTyp ==
TXT_FTN || m_rExport.m_nTextTyp ==
TXT_EDN
275 || m_rExport.m_rDoc.IsClipBoard())
279 = m_rExport.GetCurrentNodeIndex()
280 && m_rExport.GetCurrentNodeIndex() == m_rExport.m_pCurPam->End()->nNode.GetIndex();
283 FinishTableRowCell(pTextNodeInfoInner);
288 aParagraph->
append(m_aAfterRuns.makeStringAndClear());
289 if (m_bTableAfterCell)
290 m_bTableAfterCell =
false;
301 if (m_nColBreakNeeded)
304 m_nColBreakNeeded =
false;
307 if (!m_bBufferSectionHeaders)
326 OSL_ENSURE(m_aStyles.getLength() == 0,
"m_aStyles is not empty");
329 m_rExport.Strm().WriteOString(m_aSectionBreaks.makeStringAndClear());
330 m_bBufferSectionBreaks =
true;
333 if (!m_bBufferSectionHeaders)
334 m_rExport.Strm().WriteOString(m_aSectionHeaders.makeStringAndClear());
339 m_rExport.OutputSectionBreaks(pTextNode->
GetpSwAttrSet(), *pTextNode);
347 m_rExport.OutputSectionBreaks(&(pFormat->
GetAttrSet()), *pTableNode);
349 m_bBufferSectionBreaks =
false;
359 m_rExport.OutputSectionBreaks(pTextNode->
GetpSwAttrSet(), *pTextNode);
367 if (!m_rExport.GetRTFFlySyntax())
373 if (!m_bBufferSectionHeaders)
374 m_rExport.Strm().WriteOString(aPar.makeStringAndClear());
376 m_aSectionHeaders.append(aPar.makeStringAndClear());
384 const OString
aProperties = MoveCharacterProperties(
true);
385 m_rExport.Strm().WriteOString(aProperties);
389 bool bSingleEmptyRun)
391 SAL_INFO(
"sw.rtf", __func__ <<
", bSingleEmptyRun: " << bSingleEmptyRun);
394 m_bSingleEmptyRun = bSingleEmptyRun;
395 if (!m_bSingleEmptyRun)
401 OSL_ENSURE(m_aRunText.getLength() == 0,
"m_aRunText is not empty");
407 m_aRun.appendAndClear(m_aRunText);
415 if (!m_bSingleEmptyRun && m_bInRun)
422 OSL_ENSURE(m_aStyles.getLength() == 0,
"m_aStyles is not empty");
427 const OString
aProperties = MoveCharacterProperties(
true);
428 m_aRun->append(aProperties.getStr());
433 const OString aAssocHich = m_aStylesAssocHich.makeStringAndClear();
434 const OString aAssocDbch = m_aStylesAssocDbch.makeStringAndClear();
435 const OString aAssocRtlch = m_aStylesAssocRtlch.makeStringAndClear();
436 const OString aAssocLtrch = m_aStylesAssocLtrch.makeStringAndClear();
437 const OString aNormal = m_aStyles.makeStringAndClear();
440 if (aAutoWriteRtlLtr && !m_bControlLtrRtl)
442 m_bControlLtrRtl = !aAssocRtlch.isEmpty();
444 m_nScript = i18n::ScriptType::LATIN;
449 if (!aAssocRtlch.isEmpty())
455 .append(aAssocRtlch);
460 if (!aAssocRtlch.isEmpty())
466 .append(aAssocLtrch);
468 if (!aAssocHich.isEmpty())
472 if (!aNormal.isEmpty())
476 if (!aAssocDbch.isEmpty())
482 if (m_bControlLtrRtl)
484 m_bControlLtrRtl =
false;
488 case i18n::ScriptType::LATIN:
491 case i18n::ScriptType::ASIAN:
494 case i18n::ScriptType::COMPLEX:
502 return aBuf.makeStringAndClear();
507 SAL_INFO(
"sw.rtf", __func__ <<
", rText: " << rText);
508 RawText(rText, m_rExport.GetCurrentEncoding());
521 WW8Ruby aWW8Ruby(rNode, rRuby, GetExport());
523 aStr += OUString::number(aWW8Ruby.
GetJC()) +
" \\* \"Font:";
525 aStr += OUString::number((aWW8Ruby.
GetRubyHeight() + 5) / 10) +
" \\o";
530 aStr +=
"(\\s\\up " + OUString::number((aWW8Ruby.
GetBaseHeight() + 10) / 20 - 1) +
"(";
550 m_aRun->append(
" HYPERLINK ");
552 m_aRun->append(
"\"");
554 m_aRun->append(
"\" ");
556 if (!rTarget.isEmpty())
558 m_aRun->append(
"\\\\t \"");
560 m_aRun->append(
"\" ");
577 if (isAtEndOfParagraph)
580 m_aRunText->append(
"}}");
582 m_aRunText->append(
'}');
587 m_aRun->append(
"}}");
598 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
606 if (pRedline->
GetType() == RedlineType::Insert)
610 m_aRun->append(static_cast<sal_Int32>(
611 m_rExport.GetRedline(
SW_MOD()->GetRedlineAuthor(pRedline->
GetAuthor()))));
614 else if (pRedline->
GetType() == RedlineType::Delete)
618 m_aRun->append(static_cast<sal_Int32>(
619 m_rExport.GetRedline(
SW_MOD()->GetRedlineAuthor(pRedline->
GetAuthor()))));
631 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
636 OString* pStyle = m_rExport.GetStyle(nStyle);
637 OStringBuffer aStyle;
639 aStyle.append(static_cast<sal_Int32>(nStyle));
641 aStyle.append(pStyle->getStr());
642 if (!m_bBufferSectionHeaders)
643 m_rExport.Strm().WriteOString(aStyle.makeStringAndClear());
645 m_aSectionHeaders.append(aStyle.makeStringAndClear());
652 if (m_nTableDepth > 1)
655 m_aStyles.append(static_cast<sal_Int32>(m_nTableDepth));
657 m_bWroteCellInfo =
true;
668 InitTableHelper(pTableTextNodeInfoInner);
670 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
674 TableOrientation(pTableTextNodeInfoInner);
675 TableBidi(pTableTextNodeInfoInner);
676 TableHeight(pTableTextNodeInfoInner);
677 TableCanSplit(pTableTextNodeInfoInner);
681 static const SvxBoxItemLine aBorders[] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT,
682 SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT };
684 static const char* aRowPadNames[]
688 static const char* aRowPadUnits[]
692 for (
int i = 0;
i < 4; ++
i)
694 m_aRowDefs.append(aRowPadUnits[
i]);
695 m_aRowDefs.append(sal_Int32(3));
696 m_aRowDefs.append(aRowPadNames[i]);
697 m_aRowDefs.append(static_cast<sal_Int32>(rBox.
GetDistance(aBorders[i])));
701 const double fWidthRatio = m_pTableWrt->GetAbsWidthRatio();
703 SwWriteTableRow* pRow = aRows[pTableTextNodeInfoInner->getRow()].get();
707 sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner->getDepth();
708 m_aCells[nCurrentDepth] = pRow->
GetCells().size();
709 for (sal_uInt32
i = 0;
i < m_aCells[nCurrentDepth];
i++)
714 pTableTextNodeInfoInner->setCell(
i);
715 TableCellProperties(pTableTextNodeInfoInner);
722 + rtl::math::round(nSz * fWidthRatio)));
737 SwWriteTableRow* pRow = aRows[pTableTextNodeInfoInner->getRow()].get();
739 = pRow->
GetCells()[pTableTextNodeInfoInner->getCell()].get();
745 auto& rBox =
static_cast<const SvxBoxItem&
>(*pItem);
746 static const SvxBoxItemLine aBorders[] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT,
747 SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT };
748 static const char* aBorderNames[]
753 static const char* aCellPadNames[]
756 static const char* aCellPadUnits[]
759 for (
int i = 0;
i < 4; ++
i)
763 if (rBox.GetDistance(aBorders[i]))
765 m_aRowDefs.append(aCellPadUnits[i]);
766 m_aRowDefs.append(sal_Int32(3));
767 m_aRowDefs.append(aCellPadNames[i]);
768 m_aRowDefs.append(static_cast<sal_Int32>(rBox.GetDistance(aBorders[i])));
776 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
777 const SwTableBox* pTableBox = pTableTextNodeInfoInner->getTableBox();
784 aColor = pTableColorProp->GetColor();
788 if (pRowColorProp && pRowColorProp->GetColor() !=
COL_AUTO)
789 aColor = pRowColorProp->GetColor();
792 SwWriteTableRow* pRow = aRows[pTableTextNodeInfoInner->getRow()].get();
794 = pRow->
GetCells()[pTableTextNodeInfoInner->getCell()].get();
801 aColor = rBack.GetColor();
807 m_aRowDefs.append(static_cast<sal_Int32>(m_rExport.GetColor(aColor)));
823 const SwTableBox* pTabBox = pTableTextNodeInfoInner->getTableBox();
831 sal_Int32 nHeight = 0;
848 m_aRowDefs.append(nHeight);
855 const SwTableBox* pTabBox = pTableTextNodeInfoInner->getTableBox();
867 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
870 if (m_rExport.TrueFrameDirection(*pFrameFormat) != SvxFrameDirection::Horizontal_RL_TB)
880 SwWriteTableRow* pRow = aRows[pTableTextNodeInfoInner->getRow()].get();
882 = pRow->
GetCells()[pTableTextNodeInfoInner->getCell()].get();
886 if (SvxFrameDirection::Vertical_RL_TB == m_rExport.TrueFrameDirection(*pCellFormat))
888 else if (SvxFrameDirection::Vertical_LR_BT == m_rExport.TrueFrameDirection(*pCellFormat))
903 switch (static_cast<const SwFormatVertOrient*>(pItem)->GetVertOrient())
905 case text::VertOrientation::CENTER:
908 case text::VertOrientation::BOTTOM:
922 FinishTableRowCell(pNodeInfoInner);
928 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
934 case text::HoriOrientation::CENTER:
935 aTableAdjust.setLength(0);
938 case text::HoriOrientation::RIGHT:
939 aTableAdjust.setLength(0);
943 case text::HoriOrientation::LEFT_AND_WIDTH:
951 m_aRowDefs.append(aTableAdjust.makeStringAndClear());
957 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
969 const SwTable* pTable = pTableTextNodeInfoInner->getTable();
970 if (m_pTableWrt && pTable == m_pTableWrt->GetTable())
974 bool bRelBoxSize =
false;
977 GetTablePageSize(pTableTextNodeInfoInner.get(), nPageSize, bRelBoxSize);
984 m_pTableWrt = std::make_unique<SwWriteTable>(pTable, pLayout);
986 m_pTableWrt = std::make_unique<SwWriteTable>(pTable, pTable->
GetTabLines(), nPageSize,
999 sal_uInt32 nCurrentDepth = pTableTextNodeInfoInner->getDepth();
1000 SAL_INFO(
"sw.rtf", __func__ <<
", (depth is " << nCurrentDepth <<
")");
1001 m_bTableRowEnded =
false;
1003 TableDefinition(pTableTextNodeInfoInner);
1006 m_aTables.push_back(m_aRowDefs.makeStringAndClear());
1009 if (nCurrentDepth > 1)
1013 m_rExport.Strm().WriteOString(m_aAfterRuns.makeStringAndClear());
1014 m_rExport.Strm().WriteOString(m_aRowDefs.makeStringAndClear());
1022 TableDefaultBorders(pTableTextNodeInfoInner);
1023 TableBackgrounds(pTableTextNodeInfoInner);
1024 TableVerticalCell(pTableTextNodeInfoInner);
1029 SAL_INFO(
"sw.rtf", __func__ <<
", (depth is " << m_nTableDepth <<
")");
1031 if (!m_bWroteCellInfo)
1035 m_aAfterRuns.append(static_cast<sal_Int32>(m_nTableDepth));
1037 if (m_nTableDepth > 1)
1042 m_bTableCellOpen =
false;
1043 m_bTableAfterCell =
true;
1044 m_bWroteCellInfo =
false;
1045 if (m_aCells[m_nTableDepth] > 0)
1046 m_aCells[m_nTableDepth]--;
1051 SAL_INFO(
"sw.rtf", __func__ <<
", (depth is " << m_nTableDepth <<
")");
1054 for (sal_uInt32
i = 0;
i < m_aCells[m_nTableDepth];
i++)
1057 if (m_nTableDepth > 1)
1059 m_aAfterRuns.append(
1061 if (!m_aRowDefs.isEmpty())
1062 m_aAfterRuns.append(m_aRowDefs.makeStringAndClear());
1063 else if (!m_aTables.empty())
1065 m_aAfterRuns.append(m_aTables.back());
1066 m_aTables.pop_back();
1074 if (!m_aTables.empty())
1076 m_aAfterRuns.append(m_aTables.back());
1077 m_aTables.pop_back();
1081 m_bTableRowEnded =
true;
1086 if (m_nTableDepth > 0)
1089 m_pTableWrt.reset();
1094 m_bTableCellOpen =
true;
1097 m_pTableWrt.reset();
1106 sal_uInt32 nRow = pInner->getRow();
1108 const SwTable* pTable = pInner->getTable();
1110 sal_uInt16 nLinesCount = rLines.
size();
1112 if (pInner->isEndOfCell())
1116 if (pInner->isEndOfLine())
1120 if (pInner->isEndOfLine() && (nRow + 1) == nLinesCount)
1130 m_rExport.OutColorTable();
1131 OSL_ENSURE(m_aStylesheet.getLength() == 0,
"m_aStylesheet is not empty");
1133 m_aStylesheet.append(
'{');
1139 m_rExport.Strm().WriteChar(
'}');
1140 m_rExport.Strm().WriteOString(m_aStylesheet.makeStringAndClear());
1141 m_rExport.Strm().WriteChar(
'}');
1147 sal_uInt16 nNext, sal_uInt16 , sal_uInt16 nId,
1150 SAL_INFO(
"sw.rtf", __func__ <<
", rName = '" << rName <<
"'");
1152 m_aStylesheet.append(
'{');
1157 m_aStylesheet.append(static_cast<sal_Int32>(nId));
1159 if (nBase != 0x0FFF)
1162 m_aStylesheet.append(static_cast<sal_Int32>(nBase));
1166 m_aStylesheet.append(static_cast<sal_Int32>(nNext));
1171 m_rStyleName = rName;
1177 OString aStyles = MoveCharacterProperties();
1178 m_rExport.InsStyle(m_nStyleId, aStyles);
1179 m_aStylesheet.append(aStyles);
1180 m_aStylesheet.append(
' ');
1181 m_aStylesheet.append(
1183 m_aStylesheet.append(
";}");
1200 m_aStyles.append(static_cast<sal_Int32>(nLvl));
1202 m_aStyles.append(static_cast<sal_Int32>(nLvl));
1219 m_nColBreakNeeded =
true;
1223 m_rExport.SectionProperties(*pSectionInfo);
1230 if (m_bIsBeforeFirstParagraph)
1234 if (!m_bBufferSectionBreaks)
1235 m_rExport.Strm().WriteOString(m_aSectionBreaks.makeStringAndClear());
1249 m_aSectionBreaks.append(static_cast<sal_Int32>(!bProtected));
1265 m_rExport.OutLong(nRestartNo);
1305 const ::std::optional<sal_uInt16>& oPageRestartNumber)
1307 if (oPageRestartNumber)
1310 m_aSectionBreaks.append(static_cast<sal_Int32>(*oPageRestartNumber));
1314 const char* pStr =
nullptr;
1337 m_aSectionBreaks.append(pStr);
1342 SAL_INFO(
"sw.rtf", __func__ <<
", nBreakCode = " <<
int(nBreakCode));
1348 const char*
sType =
nullptr;
1367 m_aSectionBreaks.append(sType);
1368 if (!m_bBufferSectionBreaks)
1369 m_rExport.Strm().WriteOString(m_aSectionBreaks.makeStringAndClear());
1374 WriteFootnoteEndnotePr(
true, m_rExport.m_rDoc.GetFootnoteInfo());
1375 WriteFootnoteEndnotePr(
false, m_rExport.m_rDoc.GetEndNoteInfo());
1380 const char*
pOut =
nullptr;
1435 m_aSectionBreaks.append(pOut);
1437 if (!m_bBufferSectionBreaks)
1439 m_rExport.Strm().WriteOString(m_aSectionBreaks.makeStringAndClear());
1447 m_rExport.OutULong(nId);
1450 m_rExport.OutULong(nId).WriteChar(
'}');
1459 m_rExport.OutULong(nId);
1470 sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
1473 sal_Int16 nIndentAt, sal_Int16 nFirstLineIndex,
1474 sal_Int16 ,
const OUString& rNumberingString,
1485 sal_uInt16 nVal = 0;
1486 switch (nNumberingType)
1546 case style::NumberingType::HANGUL_SYLLABLE_KO:
1549 case style::NumberingType::HANGUL_JAMO_KO:
1552 case style::NumberingType::HANGUL_CIRCLED_SYLLABLE_KO:
1555 case style::NumberingType::HANGUL_CIRCLED_JAMO_KO:
1558 case style::NumberingType::NUMBER_HANGUL_KO:
1561 case style::NumberingType::NUMBER_UPPER_KO:
1577 m_rExport.OutULong(nVal);
1581 case SvxAdjust::Center:
1584 case SvxAdjust::Right:
1592 m_rExport.OutULong(nVal);
1597 int nIndex = m_rExport.GetGrfIndex(*pBrush);
1601 m_rExport.OutULong(nIndex);
1606 m_rExport.OutULong(nStart);
1609 m_rExport.OutULong(nFollow);
1616 m_rExport.Strm().WriteCharPtr(
"\\'01");
1618 m_rExport.Strm().WriteCharPtr(
"\\u");
1619 m_rExport.OutULong(cChar);
1620 m_rExport.Strm().WriteCharPtr(
" ?");
1624 m_rExport.Strm().WriteCharPtr(
"\\'").WriteCharPtr(
1627 m_rExport.GetDefaultEncoding(),
1632 m_rExport.Strm().WriteCharPtr(
";}");
1638 m_rExport.Strm().WriteCharPtr(
"\\'").WriteCharPtr(
1641 m_rExport.Strm().WriteCharPtr(
";}");
1648 m_rExport.OutULong(m_rExport.m_aFontHelper.GetId(*pFont));
1650 m_rExport.OutputItemSet(*pOutSet,
false,
true, i18n::ScriptType::LATIN,
1651 m_rExport.m_bExportModeRTF);
1652 const OString
aProperties = MoveCharacterProperties(
true);
1653 m_rExport.Strm().WriteOString(aProperties);
1658 m_rExport.OutLong(nIndentAt);
1660 m_rExport.Strm().WriteChar(
'}');
1662 m_rExport.Strm().WriteChar(
'}');
1669 bool bHasInstructions = !rFieldCmd.isEmpty();
1672 if (bHasInstructions)
1683 m_rExport.GetDefaultEncoding()));
1684 if (bHasInstructions)
1685 m_aRunText->append(
"}}");
1696 if (bHasInstructions)
1705 m_aRunText->append(
"}}}");
1711 std::vector<OUString>& rEnds)
1713 for (
const auto& rStart : rStarts)
1717 m_aRun->append(
'}');
1721 for (
const auto& rEnd : rEnds)
1725 m_aRun->append(
'}');
1731 std::vector<OUString>& rEnds)
1733 for (
const auto& rStart : rStarts)
1738 const sal_Int32
nId = m_nNextAnnotationMarkId++;
1739 m_rOpenedAnnotationMarksIds[rName] = nId;
1741 m_aRun->append(OString::number(nId).getStr());
1742 m_aRun->append(
'}');
1746 for (
const auto& rEnd : rEnds)
1751 auto it = m_rOpenedAnnotationMarksIds.find(rName);
1752 if (it != m_rOpenedAnnotationMarksIds.end())
1754 const sal_Int32
nId = it->second;
1756 m_aRun->append(OString::number(nId).getStr());
1757 m_aRun->append(
'}');
1758 m_rOpenedAnnotationMarksIds.erase(rName);
1760 if (m_aPostitFields.find(nId) != m_aPostitFields.end())
1762 m_aRunText->append(
"{");
1763 m_nCurrentAnnotationMarkId = nId;
1764 PostitField(m_aPostitFields[nId]);
1765 m_nCurrentAnnotationMarkId = -1;
1766 m_aRunText->append(
"}");
1774 const char* pStr,
bool bTitlepg)
1776 OStringBuffer aSectionBreaks = m_aSectionBreaks;
1777 m_aSectionBreaks.setLength(0);
1783 m_aSectionHeaders.append(
1784 static_cast<sal_Int32>(m_rExport.m_pCurrentPageDesc->GetMaster().GetULSpace().GetUpper()));
1787 m_aSectionHeaders.append(
'{');
1788 m_aSectionHeaders.append(pStr);
1789 m_bBufferSectionHeaders =
true;
1790 m_rExport.WriteHeaderFooterText(rFormat, bHeader);
1791 m_bBufferSectionHeaders =
false;
1792 m_aSectionHeaders.append(
'}');
1794 m_aSectionBreaks = aSectionBreaks;
1800 void lcl_TextFrameShadow(std::vector<std::pair<OString, OString>>& rFlyProperties,
1804 if (aShadowItem.
GetLocation() == SvxShadowLocation::NONE)
1807 rFlyProperties.push_back(std::make_pair<OString, OString>(
"fShadow", OString::number(1)));
1811 rFlyProperties.push_back(std::make_pair<OString, OString>(
1815 OString aShadowWidth = OString::number(sal_Int32(aShadowItem.
GetWidth() / 20) * 12700);
1820 case SvxShadowLocation::TopLeft:
1821 aOffsetX =
"-" + aShadowWidth;
1822 aOffsetY =
"-" + aShadowWidth;
1824 case SvxShadowLocation::TopRight:
1825 aOffsetX = aShadowWidth;
1826 aOffsetY =
"-" + aShadowWidth;
1828 case SvxShadowLocation::BottomLeft:
1829 aOffsetX =
"-" + aShadowWidth;
1830 aOffsetY = aShadowWidth;
1832 case SvxShadowLocation::BottomRight:
1833 aOffsetX = aShadowWidth;
1834 aOffsetY = aShadowWidth;
1836 case SvxShadowLocation::NONE:
1837 case SvxShadowLocation::End:
1840 if (!aOffsetX.isEmpty())
1841 rFlyProperties.emplace_back(
"shadowOffsetX", aOffsetX);
1842 if (!aOffsetY.isEmpty())
1843 rFlyProperties.emplace_back(
"shadowOffsetY", aOffsetY);
1846 void lcl_TextFrameRelativeSize(std::vector<std::pair<OString, OString>>& rFlyProperties,
1855 rFlyProperties.push_back(
1856 std::make_pair<OString, OString>(
"pctHoriz", OString::number(nWidthPercent * 10)));
1861 case text::RelOrientation::PAGE_FRAME:
1868 rFlyProperties.emplace_back(std::make_pair(
"sizerelh", aRelation));
1874 rFlyProperties.push_back(
1875 std::make_pair<OString, OString>(
"pctVert", OString::number(nHeightPercent * 10)));
1880 case text::RelOrientation::PAGE_FRAME:
1887 rFlyProperties.emplace_back(std::make_pair(
"sizerelv", aRelation));
1896 m_rExport.setStream();
1897 aRunText = m_aRunText;
1906 m_rExport.m_pTableInfo = std::make_shared<ww8::WW8TableInfo>();
1907 std::unique_ptr<SwWriteTable> pTableWrt(std::move(m_pTableWrt));
1908 sal_uInt32 nTableDepth = m_nTableDepth;
1916 OString aSave = m_aRun.makeStringAndClear();
1918 bool bInRunOrig = m_bInRun;
1920 bool bSingleEmptyRunOrig = m_bSingleEmptyRun;
1921 m_bSingleEmptyRun =
false;
1922 m_rExport.SetRTFFlySyntax(
true);
1928 m_rExport.SaveData(nStt, nEnd);
1929 m_rExport.m_pParentFrame = &rFrame;
1930 m_rExport.WriteText();
1931 m_rExport.RestoreData();
1934 m_rExport.SetRTFFlySyntax(
false);
1935 m_aRun->append(aSave);
1937 m_bInRun = bInRunOrig;
1938 m_bSingleEmptyRun = bSingleEmptyRunOrig;
1941 m_rExport.m_pTableInfo = pTableInfoOrig;
1942 m_pTableWrt = std::move(pTableWrt);
1943 m_nTableDepth = nTableDepth;
1946 m_rExport.m_pParentFrame =
nullptr;
1948 m_rExport.Strm().WriteChar(
'}');
1952 m_aRunText = aRunText;
1953 m_aRunText->
append(m_rExport.getStream());
1954 m_rExport.resetStream();
1974 , m_Run(
std::move(rRtf.m_aRun))
1975 , m_RunText(
std::move(rRtf.m_aRunText))
1976 , m_bSingleEmptyRun(rRtf.m_bSingleEmptyRun)
1977 , m_bInRun(rRtf.m_bInRun)
1983 m_rRtf.
m_aRun = std::move(m_Run);
2008 m_rExport.m_pParentFrame = &rFrame;
2011 m_rExport.Strm().WriteCharPtr(
2015 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
2021 m_pFlyFrameSize = &aSize;
2023 m_rExport.m_bOutFlyFrameAttrs =
true;
2024 m_rExport.SetRTFFlySyntax(
true);
2025 m_rExport.OutputFormat(rFrame.
GetFrameFormat(),
false,
false,
true);
2031 m_rExport.OutULong(
pObject->GetOrdNum());
2034 m_rExport.Strm().WriteOString(m_aRunText.makeStringAndClear());
2035 m_rExport.Strm().WriteOString(m_aStyles.makeStringAndClear());
2036 m_rExport.m_bOutFlyFrameAttrs =
false;
2037 m_rExport.SetRTFFlySyntax(
false);
2038 m_pFlyFrameSize =
nullptr;
2041 lcl_TextFrameShadow(m_aFlyProperties, rFrameFormat);
2042 lcl_TextFrameRelativeSize(m_aFlyProperties, rFrameFormat);
2044 for (
const std::pair<OString, OString>& rPair : m_aFlyProperties)
2048 m_rExport.Strm().WriteOString(rPair.first);
2050 m_rExport.Strm().WriteOString(rPair.second);
2051 m_rExport.Strm().WriteCharPtr(
"}}");
2053 m_aFlyProperties.clear();
2055 writeTextFrame(rFrame);
2057 m_rExport.Strm().WriteChar(
'}');
2058 m_rExport.Strm().WriteChar(
'}');
2066 m_aRunText.append(dynamic_cast<const SwFlyFrameFormat*>(&rFrame.
GetFrameFormat()),
2071 m_rExport.m_pParentFrame = &rFrame;
2072 m_rExport.SetRTFFlySyntax(
true);
2073 m_rExport.OutputFormat(rFrame.
GetFrameFormat(),
false,
false,
true);
2074 m_rExport.SetRTFFlySyntax(
false);
2076 m_rExport.OutputFormat(rFrame.
GetFrameFormat(),
false,
false,
true);
2077 m_aRunText->append(
'}');
2078 m_rExport.m_pParentFrame =
nullptr;
2089 m_aRunText->append(
" SHAPE ");
2090 m_aRunText->append(
"}"
2093 m_rExport.SdrExporter().AddSdrObject(*pSdrObj);
2095 m_aRunText->append(
'}');
2096 m_aRunText->append(
'}');
2110 if (
auto pFormObj = dynamic_cast<const SdrUnoObj*>(pObject))
2112 const uno::Reference<awt::XControlModel>& xControlModel
2113 = pFormObj->GetUnoControlModel();
2114 uno::Reference<lang::XServiceInfo> xInfo(xControlModel, uno::UNO_QUERY);
2117 uno::Reference<beans::XPropertySet> xPropSet(xControlModel, uno::UNO_QUERY);
2118 uno::Reference<beans::XPropertySetInfo> xPropSetInfo
2119 = xPropSet->getPropertySetInfo();
2121 if (xInfo->supportsService(
"com.sun.star.form.component.CheckBox"))
2124 m_rExport.GetCurrentEncoding()));
2134 if (xPropSetInfo->hasPropertyByName(sName))
2136 xPropSet->getPropertyValue(sName) >>= aStr;
2142 m_aRun->append(
'}');
2146 if (xPropSetInfo->hasPropertyByName(sName))
2148 xPropSet->getPropertyValue(sName) >>= aStr;
2154 m_aRun->append(
'}');
2157 sName =
"HelpF1Text";
2158 if (xPropSetInfo->hasPropertyByName(sName))
2160 xPropSet->getPropertyValue(sName) >>= aStr;
2166 m_aRun->append(
'}');
2169 sal_Int16 nTemp = 0;
2170 xPropSet->getPropertyValue(
"DefaultState") >>= nTemp;
2172 m_aRun->append(static_cast<sal_Int32>(nTemp));
2173 xPropSet->getPropertyValue(
"State") >>= nTemp;
2175 m_aRun->append(static_cast<sal_Int32>(nTemp));
2177 m_aRun->append(
"}}");
2182 else if (xInfo->supportsService(
"com.sun.star.form.component.TextField"))
2190 m_rExport.GetCurrentEncoding()));
2194 for (
int i = 0;
i < 8;
i++)
2195 aBuf.append(
char(0x00));
2196 xPropSet->getPropertyValue(
"Name") >>= aTmp;
2198 aBuf.append(static_cast<char>(aStr.getLength()));
2200 aBuf.append(
char(0x00));
2201 xPropSet->getPropertyValue(
"DefaultText") >>= aTmp;
2203 aBuf.append(static_cast<char>(aStr.getLength()));
2205 for (
int i = 0;
i < 11;
i++)
2206 aBuf.append(
char(0x00));
2207 aStr = aBuf.makeStringAndClear();
2208 pStr = aStr.getStr();
2209 for (
int i = 0;
i < aStr.getLength();
i++, pStr++)
2211 m_aRun->append(
'}');
2213 xPropSet->getPropertyValue(
"Text") >>= aTmp;
2215 m_aRun->append(
'}');
2220 if (xPropSetInfo->hasPropertyByName(sName))
2222 xPropSet->getPropertyValue(sName) >>= aTmp;
2228 m_aRun->append(
'}');
2231 sName =
"HelpF1Text";
2232 if (xPropSetInfo->hasPropertyByName(sName))
2234 xPropSet->getPropertyValue(sName) >>= aTmp;
2240 m_aRun->append(
'}');
2242 m_aRun->append(
"}");
2244 else if (xInfo->supportsService(
"com.sun.star.form.component.ListBox"))
2247 uno::Sequence<sal_Int16> aIntSeq;
2248 uno::Sequence<OUString> aStrSeq;
2251 m_rExport.GetCurrentEncoding()));
2258 xPropSet->getPropertyValue(
"DefaultSelection") >>= aIntSeq;
2259 if (aIntSeq.hasElements())
2263 m_aRun->append(static_cast<sal_Int32>(aIntSeq[0]));
2266 xPropSet->getPropertyValue(
"SelectedItems") >>= aIntSeq;
2267 if (aIntSeq.hasElements())
2271 m_aRun->append(static_cast<sal_Int32>(aIntSeq[0]));
2275 if (xPropSetInfo->hasPropertyByName(sName))
2277 xPropSet->getPropertyValue(sName) >>= aStr;
2283 m_aRun->append(
'}');
2287 if (xPropSetInfo->hasPropertyByName(sName))
2289 xPropSet->getPropertyValue(sName) >>= aStr;
2295 m_aRun->append(
'}');
2298 sName =
"HelpF1Text";
2299 if (xPropSetInfo->hasPropertyByName(sName))
2301 xPropSet->getPropertyValue(sName) >>= aStr;
2307 m_aRun->append(
'}');
2310 xPropSet->getPropertyValue(
"StringItemList") >>= aStrSeq;
2311 for (
const auto& rStr : std::as_const(aStrSeq))
2319 m_aRun->append(
"}}");
2325 SAL_INFO(
"sw.rtf", __func__ <<
" unhandled form control: '"
2326 << xInfo->getImplementationName() <<
"'");
2327 m_aRun->append(
'}');
2332 m_aRun->append(
'}');
2343 FlyFrameOLE(dynamic_cast<const SwFlyFrameFormat*>(&rFrameFormat), rOLENd,
2349 SAL_INFO(
"sw.rtf", __func__ <<
": unknown type ("
2357 switch (rCaseMap.GetValue())
2359 case SvxCaseMap::SmallCaps:
2362 case SvxCaseMap::Uppercase:
2367 m_aStyles.append(sal_Int32(0));
2369 m_aStyles.append(sal_Int32(0));
2379 m_aStyles.append(static_cast<sal_Int32>(m_rExport.GetColor(aColor)));
2385 if (!rContour.GetValue())
2386 m_aStyles.append(sal_Int32(0));
2395 m_aStyles.append(sal_Int32(0));
2399 m_aStyles.append(sal_Int32(1));
2409 short nEsc = rEscapement.
GetEsc();
2411 sal_Int32 nProp100 = nProp * 100;
2422 nEsc = .8 * (100 - nProp);
2427 nEsc = .2 * -(100 - nProp);
2445 m_aStyles.append(
'{');
2448 m_aStyles.append(nProp100);
2449 m_aStyles.append(
'}');
2450 m_aStyles.append(pUpDn);
2459 m_aStyles.append(static_cast<sal_Int32>(round(fHeight * nEsc / 1000)));
2466 m_aStyles.append(static_cast<sal_Int32>(m_rExport.m_aFontHelper.GetId(rFont)));
2470 m_aStylesAssocHich.append(static_cast<sal_Int32>(m_rExport.m_aFontHelper.GetId(rFont)));
2476 aTmp.msPrimary, aTmp.msSecondary, rFont.
GetCharSet());
2477 m_rExport.SetCurrentEncoding(rtl_getTextEncodingFromWindowsCharset(nWindowsCharset));
2478 if (m_rExport.GetCurrentEncoding() == RTL_TEXTENCODING_DONTKNOW)
2479 m_rExport.SetCurrentEncoding(m_rExport.GetDefaultEncoding());
2484 switch (rFontSize.Which())
2488 m_aStyles.append(static_cast<sal_Int32>(rFontSize.
GetHeight() / 10));
2492 m_aStylesAssocDbch.append(static_cast<sal_Int32>(rFontSize.
GetHeight() / 10));
2496 m_aStylesAssocRtlch.append(static_cast<sal_Int32>(rFontSize.
GetHeight() / 10));
2505 m_aStyles.append(static_cast<sal_Int32>(rKerning.GetValue() / 5));
2507 m_aStyles.append(static_cast<sal_Int32>(rKerning.GetValue()));
2512 switch (rLanguage.Which())
2517 static_cast<sal_Int32>(static_cast<sal_uInt16>(rLanguage.
GetLanguage())));
2519 m_aStylesAssocLtrch.append(
2520 static_cast<sal_Int32>(static_cast<sal_uInt16>(rLanguage.
GetLanguage())));
2524 m_aStylesAssocDbch.append(
2525 static_cast<sal_Int32>(static_cast<sal_uInt16>(rLanguage.
GetLanguage())));
2527 m_aStylesAssocLtrch.append(
2528 static_cast<sal_Int32>(static_cast<sal_uInt16>(rLanguage.
GetLanguage())));
2532 m_aStylesAssocRtlch.append(
2533 static_cast<sal_Int32>(static_cast<sal_uInt16>(rLanguage.
GetLanguage())));
2542 m_aStyles.append(sal_Int32(0));
2548 if (!rShadow.GetValue())
2549 m_aStyles.append(sal_Int32(0));
2554 const char* pStr =
nullptr;
2618 m_aStyles.append(pStr);
2622 m_aStyles.append(static_cast<sal_Int32>(m_rExport.GetColor(rUnderline.
GetColor())));
2630 m_aStyles.append(sal_Int32(0));
2636 m_aStyles.append(static_cast<sal_Int32>(rAutoKern.GetValue() ? 1 : 0));
2642 m_aStyles.append(static_cast<sal_Int32>(rBlink.GetValue() ? 2 : 0));
2650 m_aStyles.append(static_cast<sal_Int32>(m_rExport.GetColor(rBrush.
GetColor())));
2658 m_aStylesAssocDbch.append(static_cast<sal_Int32>(m_rExport.m_aFontHelper.GetId(rFont)));
2663 CharFontSize(rFontSize);
2668 CharLanguage(rLanguageItem);
2675 m_aStylesAssocDbch.append(sal_Int32(0));
2682 m_aStylesAssocDbch.append(sal_Int32(0));
2689 m_aStylesAssocRtlch.append(static_cast<sal_Int32>(m_rExport.m_aFontHelper.GetId(rFont)));
2694 CharFontSize(rFontSize);
2699 CharLanguage(rLanguageItem);
2706 m_aStylesAssocRtlch.append(sal_Int32(0));
2713 m_aStylesAssocRtlch.append(sal_Int32(0));
2723 m_aStyles.append(static_cast<sal_Int32>(rRotate.
IsFitToLine() ? 1 : 0));
2729 if (v == FontEmphasisMark::NONE)
2731 else if (v == (FontEmphasisMark::Dot | FontEmphasisMark::PosAbove))
2733 else if (v == (FontEmphasisMark::Accent | FontEmphasisMark::PosAbove))
2735 else if (v == (FontEmphasisMark::Circle | FontEmphasisMark::PosAbove))
2737 else if (v == (FontEmphasisMark::Dot | FontEmphasisMark::PosBelow))
2750 if (!cStart && !cEnd)
2752 else if (
'{' == cStart ||
'}' == cEnd)
2754 else if (
'<' == cStart ||
'>' == cEnd)
2756 else if (
'[' == cStart ||
']' == cEnd)
2762 m_aStyles.append(static_cast<sal_Int32>(nType));
2768 m_aStyles.append(static_cast<sal_Int32>(rScaleWidth.GetValue()));
2774 switch (rRelief.GetValue())
2776 case FontRelief::Embossed:
2779 case FontRelief::Engraved:
2788 m_aStyles.append(pStr);
2794 if (!rHidden.GetValue())
2795 m_aStyles.append(sal_Int32(0));
2799 const sal_uInt16 nDist,
const bool bShadow)
2803 bShadow ? SvxShadowLocation::BottomRight : SvxShadowLocation::NONE));
2820 if (pTextAtr &&
nullptr != (pFormat = pTextAtr->
GetCharFormat()))
2822 sal_uInt16 nStyle = m_rExport.GetId(pFormat);
2823 OString* pString = m_rExport.GetStyle(nStyle);
2825 m_aStyles.append(*pString);
2831 sal_uInt16 nStyle = m_rExport.GetId(rCharFormat.
GetCharFormat());
2833 m_aStyles.append(static_cast<sal_Int32>(nStyle));
2834 OString* pString = m_rExport.GetStyle(nStyle);
2836 m_aStyles.append(*pString);
2850 SAL_INFO(
"sw.rtf", __func__ <<
" start");
2853 EndRunProperties(
nullptr);
2854 m_aRun->append(
' ');
2855 WriteTextFootnoteNumStr(rFootnote);
2859 m_aRun->append(
' ');
2860 WriteTextFootnoteNumStr(rFootnote);
2870 bool bInRunOrig = m_bInRun;
2872 bool bSingleEmptyRunOrig = m_bSingleEmptyRun;
2873 m_bSingleEmptyRun =
false;
2874 m_bBufferSectionHeaders =
true;
2877 m_bBufferSectionHeaders =
false;
2878 m_bInRun = bInRunOrig;
2879 m_bSingleEmptyRun = bSingleEmptyRunOrig;
2881 m_aRun->
append(m_aSectionHeaders.makeStringAndClear());
2883 m_aRun->append(
"}");
2884 m_aRun->append(
"}");
2886 SAL_INFO(
"sw.rtf", __func__ <<
" end");
2892 m_aStyles.append(static_cast<sal_Int32>(nSpace));
2894 m_aStyles.append(static_cast<sal_Int32>(nMulti));
2901 case SvxAdjust::Left:
2904 case SvxAdjust::Right:
2907 case SvxAdjust::BlockLine:
2908 case SvxAdjust::Block:
2914 case SvxAdjust::Center:
2924 if (!rSplit.GetValue())
2930 if (rWidows.GetValue())
2940 if (m_rExport.m_rDoc.getIDocumentSettingAccess().get(
2942 nOffset = m_rExport.GetItem(
RES_LR_SPACE).GetTextLeft();
2944 for (sal_uInt16
n = 0;
n < rTabStop.
Count();
n++)
2949 const char* pFill =
nullptr;
2971 m_aStyles.append(pFill);
2973 const char* pAdjStr =
nullptr;
2976 case SvxTabAdjust::Right:
2979 case SvxTabAdjust::Decimal:
2982 case SvxTabAdjust::Center:
2989 m_aStyles.append(pAdjStr);
2991 m_aStyles.append(static_cast<sal_Int32>(rTS.
GetTabPos() + nOffset));
2996 m_aTabStop.append(rTabStop[0].GetTabPos());
3004 m_aStyles.append(sal_Int32(rHyphenZone.
IsHyphen()));
3010 if (
USHRT_MAX == nNumId || 0 == nNumId ||
nullptr == pTextNd)
3015 if (!pRule || !pTextNd->
IsInList())
3019 "sw.rtf",
"text node does not have valid list level");
3023 pFormat = &pRule->
Get(nLvl);
3027 m_aStyles.append(
'{');
3031 m_aStyles.append(
' ');
3034 aLR.
SetTextLeft(aLR.GetTextLeft() + pFormat->GetIndentAt());
3035 aLR.SetTextFirstLineOffset(pFormat->GetFirstLineOffset());
3037 sal_uInt16 nStyle = m_rExport.GetId(pFormat->GetCharFormat());
3038 OString* pString = m_rExport.GetStyle(nStyle);
3040 m_aStyles.append(*pString);
3047 sal_UCS4 cBullet = pFormat->GetBulletChar();
3048 sText = OUString(&cBullet, 1);
3053 if (!sText.isEmpty())
3055 m_aStyles.append(
' ');
3061 if (!sText.isEmpty())
3063 m_aStyles.append(
'}');
3067 m_aStyles.append(sal_Int32(8));
3069 m_aStyles.append(nLvl);
3070 m_aStyles.append(
'}');
3073 m_aStyles.append(nLvl);
3078 m_aStyles.append(static_cast<sal_Int32>(m_rExport.GetNumberingId(*pRule)) + 1);
3079 m_aStyles.append(
' ');
3094 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3099 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3124 m_aStyles.append(pStr);
3129 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3134 if (m_rExport.m_bOutPageDescs)
3137 m_aSectionBreaks.append(static_cast<sal_Int32>(rSize.
GetWidth()));
3139 m_aSectionBreaks.append(static_cast<sal_Int32>(rSize.
GetHeight()));
3140 if (!m_bBufferSectionBreaks)
3141 m_rExport.Strm().WriteOString(m_aSectionBreaks.makeStringAndClear());
3147 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3152 if (!m_rExport.m_bOutFlyFrameAttrs)
3154 if (m_rExport.m_bOutPageDescs)
3159 m_aSectionBreaks.append(static_cast<sal_Int32>(rLRSpace.
GetLeft()));
3164 m_aSectionBreaks.append(static_cast<sal_Int32>(rLRSpace.
GetRight()));
3169 m_aSectionBreaks.append(static_cast<sal_Int32>(rLRSpace.
GetGutterMargin()));
3171 if (!m_bBufferSectionBreaks)
3172 m_rExport.Strm().WriteOString(m_aSectionBreaks.makeStringAndClear());
3177 m_aStyles.append(static_cast<sal_Int32>(rLRSpace.
GetTextLeft()));
3179 m_aStyles.append(static_cast<sal_Int32>(rLRSpace.
GetRight()));
3181 m_aStyles.append(static_cast<sal_Int32>(rLRSpace.
GetTextLeft()));
3183 m_aStyles.append(static_cast<sal_Int32>(rLRSpace.
GetRight()));
3188 else if (m_rExport.GetRTFFlySyntax())
3191 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3192 "dxWrapDistLeft", OString::number(rLRSpace.
GetLeft() * 635)));
3193 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3194 "dxWrapDistRight", OString::number(rLRSpace.
GetRight() * 635)));
3200 if (!m_rExport.m_bOutFlyFrameAttrs)
3202 if (m_rExport.m_bOutPageDescs)
3204 OSL_ENSURE(m_rExport.GetCurItemSet(),
"Impossible");
3205 if (!m_rExport.GetCurItemSet())
3214 ? *m_rExport.GetFirstPageItemSet()
3215 : *m_rExport.GetCurItemSet());
3217 if (aDistances.dyaTop)
3220 m_aSectionBreaks.append(static_cast<sal_Int32>(aDistances.dyaTop));
3222 if (aDistances.HasHeader())
3225 m_aSectionBreaks.append(static_cast<sal_Int32>(aDistances.dyaHdrTop));
3228 if (aDistances.dyaBottom)
3231 m_aSectionBreaks.append(static_cast<sal_Int32>(aDistances.dyaBottom));
3233 if (aDistances.HasFooter())
3236 m_aSectionBreaks.append(static_cast<sal_Int32>(aDistances.dyaHdrBottom));
3238 if (!m_bBufferSectionBreaks)
3239 m_rExport.Strm().WriteOString(m_aSectionBreaks.makeStringAndClear());
3244 if (m_bParaBeforeAutoSpacing && m_nParaBeforeSpacing == rULSpace.
GetUpper())
3246 else if (m_bParaBeforeAutoSpacing && m_nParaBeforeSpacing == -1)
3250 m_aStyles.append(static_cast<sal_Int32>(rULSpace.
GetUpper()));
3255 m_aStyles.append(static_cast<sal_Int32>(rULSpace.
GetUpper()));
3257 m_bParaBeforeAutoSpacing =
false;
3260 if (m_bParaAfterAutoSpacing && m_nParaAfterSpacing == rULSpace.
GetLower())
3262 else if (m_bParaAfterAutoSpacing && m_nParaAfterSpacing == -1)
3266 m_aStyles.append(static_cast<sal_Int32>(rULSpace.
GetLower()));
3271 m_aStyles.append(static_cast<sal_Int32>(rULSpace.
GetLower()));
3273 m_bParaAfterAutoSpacing =
false;
3280 else if (m_rExport.GetRTFFlySyntax())
3283 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3284 "dyWrapDistTop", OString::number(rULSpace.
GetUpper() * 635)));
3285 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3286 "dyWrapDistBottom", OString::number(rULSpace.
GetLower() * 635)));
3292 if (m_rExport.m_bOutFlyFrameAttrs && !m_rExport.GetRTFFlySyntax())
3294 css::text::WrapTextMode eSurround = rSurround.
GetSurround();
3295 bool bGold = css::text::WrapTextMode_DYNAMIC == eSurround;
3297 eSurround = css::text::WrapTextMode_PARALLEL;
3298 RTFSurround aMC(bGold, static_cast<sal_uInt8>(eSurround));
3300 m_aRunText->append(static_cast<sal_Int32>(aMC.
GetValue()));
3302 else if (m_rExport.m_bOutFlyFrameAttrs && m_rExport.GetRTFFlySyntax())
3306 std::optional<sal_Int32> oWrk;
3309 case css::text::WrapTextMode_NONE:
3312 case css::text::WrapTextMode_THROUGH:
3315 case css::text::WrapTextMode_PARALLEL:
3319 case css::text::WrapTextMode_DYNAMIC:
3330 m_rExport.OutLong(nWr);
3334 m_rExport.OutLong(*oWrk);
3341 if (!(m_rExport.m_bOutFlyFrameAttrs && m_rExport.GetRTFFlySyntax()))
3346 case text::RelOrientation::PAGE_FRAME:
3347 m_aFlyProperties.push_back(
3348 std::make_pair<OString, OString>(
"posrelv", OString::number(1)));
3351 m_aFlyProperties.push_back(
3352 std::make_pair<OString, OString>(
"posrelv", OString::number(2)));
3361 case text::VertOrientation::TOP:
3362 case text::VertOrientation::LINE_TOP:
3363 m_aFlyProperties.push_back(
3364 std::make_pair<OString, OString>(
"posv", OString::number(1)));
3366 case text::VertOrientation::BOTTOM:
3367 case text::VertOrientation::LINE_BOTTOM:
3368 m_aFlyProperties.push_back(
3369 std::make_pair<OString, OString>(
"posv", OString::number(3)));
3371 case text::VertOrientation::CENTER:
3372 case text::VertOrientation::LINE_CENTER:
3373 m_aFlyProperties.push_back(
3374 std::make_pair<OString, OString>(
"posv", OString::number(2)));
3381 m_rExport.OutLong(rFlyVert.
GetPos());
3382 if (m_pFlyFrameSize)
3385 m_rExport.OutLong(rFlyVert.
GetPos() + m_pFlyFrameSize->Height());
3391 if (!(m_rExport.m_bOutFlyFrameAttrs && m_rExport.GetRTFFlySyntax()))
3396 case text::RelOrientation::PAGE_FRAME:
3397 m_aFlyProperties.push_back(
3398 std::make_pair<OString, OString>(
"posrelh", OString::number(1)));
3401 m_aFlyProperties.push_back(
3402 std::make_pair<OString, OString>(
"posrelh", OString::number(2)));
3411 case text::HoriOrientation::LEFT:
3412 m_aFlyProperties.push_back(
3413 std::make_pair<OString, OString>(
"posh", OString::number(1)));
3415 case text::HoriOrientation::CENTER:
3416 m_aFlyProperties.push_back(
3417 std::make_pair<OString, OString>(
"posh", OString::number(2)));
3419 case text::HoriOrientation::RIGHT:
3420 m_aFlyProperties.push_back(
3421 std::make_pair<OString, OString>(
"posh", OString::number(3)));
3428 m_rExport.OutLong(rFlyHori.
GetPos());
3429 if (m_pFlyFrameSize)
3432 m_rExport.OutLong(rFlyHori.
GetPos() + m_pFlyFrameSize->Width());
3438 if (m_rExport.GetRTFFlySyntax())
3443 m_aRunText->append(static_cast<sal_Int32>(eId));
3446 case RndStdIds::FLY_AT_PAGE:
3448 m_aRunText->append(static_cast<sal_Int32>(rAnchor.
GetPageNum()));
3450 case RndStdIds::FLY_AT_PARA:
3451 case RndStdIds::FLY_AS_CHAR:
3461 if (m_rExport.GetRTFFlySyntax())
3465 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3471 m_aStyles.append(static_cast<sal_Int32>(m_rExport.GetColor(rBrush.
GetColor())));
3477 m_oFillStyle = rFillStyle.GetValue();
3482 if (*m_oFillStyle != drawing::FillStyle_GRADIENT)
3485 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3486 "fillType", OString::number(7)));
3490 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3494 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3499 case css::awt::GradientStyle_LINEAR:
3501 case css::awt::GradientStyle_AXIAL:
3502 m_aFlyProperties.push_back(
3503 std::make_pair<OString, OString>(
"fillFocus", OString::number(50)));
3505 case css::awt::GradientStyle_RADIAL:
3506 case css::awt::GradientStyle_ELLIPTICAL:
3507 case css::awt::GradientStyle_SQUARE:
3508 case css::awt::GradientStyle_RECT:
3516 static const SvxBoxItemLine aBorders[] = { SvxBoxItemLine::TOP, SvxBoxItemLine::LEFT,
3517 SvxBoxItemLine::BOTTOM, SvxBoxItemLine::RIGHT };
3518 static const char* aBorderNames[]
3524 if (m_rExport.GetRTFFlySyntax())
3527 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3528 "dxTextLeft", OString::number(rBox.
GetDistance(SvxBoxItemLine::LEFT) * 635)));
3529 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3530 "dyTextTop", OString::number(rBox.
GetDistance(SvxBoxItemLine::TOP) * 635)));
3531 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3532 "dxTextRight", OString::number(rBox.
GetDistance(SvxBoxItemLine::RIGHT) * 635)));
3533 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3534 "dyTextBottom", OString::number(rBox.
GetDistance(SvxBoxItemLine::BOTTOM) * 635)));
3540 if (pLeft && pRight && pTop && pBottom && *pLeft == *pRight && *pLeft == *pTop
3541 && *pLeft == *pBottom)
3545 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
3552 sal_Int32 nWidth = fConverted * 635;
3553 m_aFlyProperties.push_back(
3554 std::make_pair<OString, OString>(
"lineWidth", OString::number(nWidth)));
3558 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
"fLine",
"0"));
3567 && nDist == rBox.
GetDistance(SvxBoxItemLine::LEFT)
3568 && nDist == rBox.
GetDistance(SvxBoxItemLine::BOTTOM)
3569 && nDist == rBox.
GetDistance(SvxBoxItemLine::RIGHT))
3570 m_aSectionBreaks.append(
3576 eShadowLocation = static_cast<const SvxShadowItem*>(pItem)->GetLocation();
3579 const char** pBrdNms = aBorderNames;
3580 for (
int i = 0;
i < 4; ++
i, ++pBrd, ++pBrdNms)
3584 m_aSectionBreaks.append(
OutBorderLine(m_rExport, pLn, *pBrdNms,
3590 if (!m_bBufferSectionBreaks)
3591 m_aStyles.append(m_aSectionBreaks.makeStringAndClear());
3598 m_rExport.OutLong(nCols);
3611 for (sal_uInt16
n = 0;
n < nCols;)
3614 m_rExport.OutLong(
n + 1);
3622 m_rExport.OutLong(rColumns[
n - 1].GetRight() + rColumns[
n].GetLeft());
3630 if (rItem.GetValue())
3636 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3648 if (nDir == SvxFrameDirection::Environment)
3649 nDir = GetExport().GetDefaultFrameDirection();
3651 if (m_rExport.m_bOutPageDescs)
3653 if (nDir == SvxFrameDirection::Vertical_RL_TB)
3656 m_aSectionBreaks.append(static_cast<sal_Int32>(1));
3657 if (!m_bBufferSectionBreaks)
3658 m_rExport.Strm().WriteOString(m_aSectionBreaks.makeStringAndClear());
3663 if (m_rExport.GetRTFFlySyntax())
3665 if (nDir == SvxFrameDirection::Vertical_RL_TB)
3668 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
"txflTextFlow",
"3"));
3670 else if (rDirection.GetValue() == SvxFrameDirection::Vertical_LR_BT)
3673 m_aFlyProperties.push_back(std::make_pair<OString, OString>(
"txflTextFlow",
"2"));
3678 if (nDir == SvxFrameDirection::Horizontal_RL_TB)
3686 const std::map<OUString, css::uno::Any>& rMap = rItem.
GetGrabBag();
3687 for (
const auto&
rValue : rMap)
3689 if (
rValue.first ==
"ParaTopMarginBeforeAutoSpacing")
3691 m_bParaBeforeAutoSpacing =
true;
3692 rValue.second >>= m_nParaBeforeSpacing;
3695 else if (
rValue.first ==
"ParaBottomMarginAfterAutoSpacing")
3697 m_bParaAfterAutoSpacing =
true;
3698 rValue.second >>= m_nParaAfterSpacing;
3716 m_rExport.OutputField(pField,
ww::eNONE, sCmd);
3726 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3731 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3737 SAL_INFO(
"sw.rtf",
"TODO: " << __func__);
3745 auto it = m_rOpenedAnnotationMarksIds.find(aName);
3746 if (it != m_rOpenedAnnotationMarksIds.end())
3750 m_aPostitFields[it->second] = &rPField;
3756 m_aRunText->append(
"}");
3759 m_aRunText->append(
"}");
3764 if (m_nCurrentAnnotationMarkId != -1)
3767 m_aRunText->append(m_nCurrentAnnotationMarkId);
3768 m_aRunText->append(
'}');
3772 m_aRunText->append(
'}');
3775 m_aRunText->append(
'}');
3788 " MACROBUTTON None ");
3790 m_aRunText->append(
"}}");
3796 , m_rExport(rExport)
3797 , m_pPrevPageDesc(nullptr)
3802 , m_bControlLtrRtl(false)
3803 , m_nNextAnnotationMarkId(0)
3804 , m_nCurrentAnnotationMarkId(-1)
3805 , m_bTableCellOpen(false)
3807 , m_bTableAfterCell(false)
3808 , m_nColBreakNeeded(false)
3809 , m_bBufferSectionBreaks(false)
3810 , m_bBufferSectionHeaders(false)
3811 , m_bLastTable(true)
3812 , m_bWroteCellInfo(false)
3813 , m_bTableRowEnded(false)
3814 , m_bIsBeforeFirstParagraph(true)
3815 , m_bSingleEmptyRun(false)
3818 , m_pFlyFrameSize(nullptr)
3819 , m_bParaBeforeAutoSpacing(false)
3820 , m_nParaBeforeSpacing(0)
3821 , m_bParaAfterAutoSpacing(false)
3822 , m_nParaAfterSpacing(0)
3907 sal_uInt16 nVal = 0;
3922 static void lcl_AppendSP(OStringBuffer& rBuffer,
const char cName[],
const OUString& rValue,
3927 rBuffer.append(cName);
3931 rBuffer.append(
"}}");
3936 const char* pBLIPType,
const sal_uInt8* pGraphicAry, sal_uInt64 nSize,
3938 bool bWritePicProp =
true,
const SwAttrSet* pAttrSet =
nullptr)
3941 if (pBLIPType && nSize && pGraphicAry)
3947 if (pFlyFrameFormat && bWritePicProp)
3954 lcl_AppendSP(aRet,
"wzDescription", sDescription, rExport);
3973 nXCroppedSize = 100;
3975 nYCroppedSize = 100;
3981 aRet.append(static_cast<sal_Int32>((100 * rRendered.
Width()) / nXCroppedSize));
3983 aRet.append(static_cast<sal_Int32>((100 * rRendered.
Height()) / nYCroppedSize));
3990 aRet.append(rCr.
GetTop());
3995 aRet.append(static_cast<sal_Int32>(rMapped.
Width()));
3997 aRet.append(static_cast<sal_Int32>(rMapped.
Height()));
4000 aRet.append(static_cast<sal_Int32>(rOrig.
Width()));
4002 aRet.append(static_cast<sal_Int32>(rOrig.
Height()));
4004 aRet.append(pBLIPType);
4007 aRet.append(sal_Int32(8));
4012 pStream->WriteOString(aRet.makeStringAndClear());
4019 pStream->WriteOString(aRet.makeStringAndClear());
4021 return aRet.makeStringAndClear();
4029 Size aRendered(aSize);
4030 aRendered.setWidth(rSize.
Width());
4031 aRendered.setHeight(rSize.
Height());
4039 SAL_WARN(
"sw.rtf",
"failed to export the graphic");
4040 sal_uInt32 nSize = aStream.
TellEnd();
4049 SAL_WARN(
"sw.rtf",
"failed to export the graphic");
4061 sal_Int64 nAspect = rOLENode.
GetAspect();
4069 uno::Reference<util::XCloseable> xClosable = xObj->getComponent();
4070 if (!xClosable.is())
4077 assert(pBase !=
nullptr);
4105 sal_uInt32 nSize = 0;
4110 if (rGraphic.GetType() == GraphicType::NONE)
4117 const char* pBLIPType =
nullptr;
4118 if (rGraphic.IsGfxLink())
4120 aGraphicLink = rGraphic.GetGfxLink();
4122 pGraphicAry = aGraphicLink.
GetData();
4123 switch (aGraphicLink.
GetType())
4133 case GfxLinkType::NativeBmp:
4135 pGraphicAry =
nullptr;
4138 case GfxLinkType::NativeJpg:
4141 case GfxLinkType::NativePng:
4144 case GfxLinkType::NativeWmf:
4148 case GfxLinkType::NativeGif:
4150 aConvertDestinationFormat = ConvertDataFormat::PNG;
4163 (eGraphicType == GraphicType::Bitmap)
4164 ? ConvertDataFormat::PNG
4165 : ConvertDataFormat::WMF))
4174 Size aMapped(eGraphicType == GraphicType::Bitmap ? rGraphic.GetSizePixel()
4175 : rGraphic.GetPrefSize());
4181 Size aRendered(aSize);
4190 if (pFlyFrameFormat == &rFrame.GetFrameFormat())
4226 std::vector<std::pair<OString, OString>> aFlyProperties;
4227 aFlyProperties.push_back(std::make_pair<OString, OString>(
4229 aFlyProperties.push_back(std::make_pair<OString, OString>(
4232 aFlyProperties.push_back(std::make_pair<OString, OString>(
4243 if (pPolyPoly && pPolyPoly->
Count())
4246 *pPolyPoly, pNd,
true);
4247 OStringBuffer aVerticies;
4248 for (sal_uInt16
i = 0;
i < aPoly.
GetSize(); ++
i)
4249 aVerticies.append(
";(")
4250 .append(aPoly[
i].
X())
4252 .append(aPoly[
i].
Y())
4254 aFlyProperties.push_back(std::make_pair<OString, OString>(
4255 "pWrapPolygonVertices",
4256 "8;" + OString::number(aPoly.
GetSize()) + aVerticies.makeStringAndClear()));
4262 if (!pFlyFrameFormat->
GetOpaque().GetValue())
4263 aFlyProperties.push_back(std::make_pair<OString, OString>(
"fBehindDocument",
"1"));
4274 aFlyProperties.emplace_back(
"rotation", OString::number(nRot));
4278 for (
const std::pair<OString, OString>& rPair : aFlyProperties)
4292 bool bWritePicProp = !pFrame || pFrame->
IsInline();
4294 ExportPICT(pFlyFrameFormat, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize,
4300 SAL_WARN(
"sw.rtf",
"failed to export the graphic");
4301 pBLIPType = pConvertDestinationBLIPType;
4305 ExportPICT(pFlyFrameFormat, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry, nSize,
4318 SAL_WARN(
"sw.rtf",
"failed to export the graphic");
4323 ExportPICT(pFlyFrameFormat, aSize, aRendered, aMapped, rCr, pBLIPType, pGraphicAry,
4349 SAL_WARN(
"sw.rtf",
"failed to export the numbering picture bullet");
4350 sal_uInt32 nSize = aStream.
TellEnd();
#define OOO_STRING_SVTOOLS_RTF_SNEXT
#define OOO_STRING_SVTOOLS_RTF_ULW
void FormatBackground(const SvxBrushItem &rBrush) override
Sfx item RES_BACKGROUND.
constexpr TypedWhichId< SwCropGrf > RES_GRFATR_CROPGRF(132)
void FormatTextGrid(const SwTextGridItem &rItem) override
Sfx item RES_TEXTGRID.
SvxNumType GetNumberingType() const
SvStream & OutULong(sal_uLong nVal)
void CharFontCTL(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CTL_FONT.
tools::Long GetWidth() const
#define OOO_STRING_SVTOOLS_RTF_QL
void StartRun(const SwRedlineData *pRedlineData, sal_Int32 nPos, bool bSingleEmptyRun=false) override
Start of the text run.
Wrapper around OStringBuffers, so less hexdump of graphics have to be kept in memory during RTF expor...
bool EndURL(bool isAtEndOfParagraph) override
Output URL end.
void TableHeight(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
#define OOO_STRING_SVTOOLS_RTF_CONTEXTUALSPACE
#define OOO_STRING_SVTOOLS_RTF_LTRSECT
#define OOO_STRING_SVTOOLS_RTF_ACCCOMMA
SVX_NUM_CHARS_UPPER_LETTER_N
void CharGrabBag(const SfxGrabBagItem &rItem) override
Sfx item RES_CHRATR_GRABBAG.
void Redline(const SwRedlineData *pRedline) override
Output redlining.
SwNoTextNode * GetNoTextNodeFromSwFrameFormat(const SwFrameFormat &rFormat)
Get the SwNoTextNode associated with a SwFrameFormat if here is one.
sal_Int64 GetAspect() const
void TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
#define OOO_STRING_SVTOOLS_RTF_WIDCTLPAR
#define OOO_STRING_SVTOOLS_RTF_SHPRIGHT
void TextINetFormat(const SwFormatINetFormat &rURL) override
Sfx item RES_TXTATR_INETFMT.
SwCharFormat * GetCharFormat()
void FormatULSpace(const SvxULSpaceItem &rULSpace) override
Sfx item RES_UL_SPACE.
void FormatColumns_Impl(sal_uInt16 nCols, const SwFormatCol &rCol, bool bEven, SwTwips nPageSize) override
Sfx item RES_COL.
#define OOO_STRING_SVTOOLS_RTF_QR
#define OOO_STRING_SVTOOLS_RTF_ANIMTEXT
#define OOO_STRING_SVTOOLS_RTF_ULTHDASHD
sal_uInt16 GetRowSpan() const
#define OOO_STRING_SVTOOLS_RTF_ALANG
#define OOO_STRING_SVTOOLS_RTF_BRDRINSET
#define OOO_STRING_SVTOOLS_RTF_COLNO
sal_Int32 GetLeft() const
std::vector< SwColumn > SwColumns
void FormatKeep(const SvxFormatKeepItem &rItem) override
Sfx item RES_KEEP.
#define OOO_STRING_SVTOOLS_RTF_FSWISS
void EndRuby(const SwTextNode &rNode, sal_Int32 nPos) override
Output ruby end.
#define OOO_STRING_SVTOOLS_RTF_SN
void FieldVanish(const OUString &rText, ww::eField eType) override
void CharKerning(const SvxKerningItem &rKerning) override
Sfx item RES_CHRATR_KERNING.
#define OOO_STRING_SVTOOLS_RTF_ULHWAVE
sal_uInt16 GetLower() const
SvxAdjust GetAdjust() const
#define OOO_STRING_SVTOOLS_RTF_PNGBLIP
SwOLENode * GetOLENode()
Inline methods from Node.hxx.
void ParaSnapToGrid(const SvxParaGridItem &rItem) override
Sfx item RES_PARATR_SNAPTOGRID.
#define OOO_STRING_SVTOOLS_RTF_CLVMGF
void CharBidiRTL(const SfxPoolItem &rItem) override
Sfx item RES_CHRATR_BidiRTL.
void WriteBookmarks_Impl(std::vector< OUString > &rStarts, std::vector< OUString > &rEnds)
const SwOLEObj & GetOLEObj() const
double ConvertBorderWidthToWord(SvxBorderLineStyle, double)
void EndRun(const SwTextNode *pNode, sal_Int32 nPos, bool bLastRun=false) override
End of the text run.
#define OOO_STRING_SVTOOLS_RTF_SUB
void StartTableRow(const ww8::WW8TableNodeInfoInner::Pointer_t &pTableTextNodeInfoInner)
#define OOO_STRING_SVTOOLS_RTF_EXPNDTW
RtfAttributeOutput(RtfExport &rExport)
#define OOO_STRING_SVTOOLS_RTF_FTNALT
#define OOO_STRING_SVTOOLS_RTF_BRDRENGRAVE
SVX_NUM_FULL_WIDTH_ARABIC
sal_Unicode GetStartBracket() const
#define OOO_STRING_SVTOOLS_RTF_FMODERN
rtl_TextEncoding GetCurrentEncoding() const
void CharBackground(const SvxBrushItem &rBrush) override
Sfx item RES_CHRATR_BACKGROUND.
#define OOO_STRING_SVTOOLS_RTF_SBASEDON
void FormatVertOrientation(const SwFormatVertOrient &rFlyVert) override
Sfx item RES_VERT_ORIENT.
bool IsTransparent() const
#define OOO_STRING_SVTOOLS_RTF_ULDASH
sal_uInt16 GetCountBy() const
#define OOO_STRING_SVTOOLS_RTF_S
void PostitField(const SwField *pField) override
#define OOO_STRING_SVTOOLS_RTF_CLBRDRR
const SwNumFormat * GetNumFormat(sal_uInt16 i) const
#define OOO_STRING_SVTOOLS_RTF_SLMULT
#define OOO_STRING_SVTOOLS_RTF_LI
#define OOO_STRING_SVTOOLS_RTF_PICCROPT
#define OOO_STRING_SVTOOLS_RTF_LEVELFOLLOW
std::size_t GetAuthor() const
#define OOO_STRING_SVTOOLS_RTF_FOOTNOTE
#define OOO_STRING_SVTOOLS_RTF_FROMAN
#define OOO_STRING_SVTOOLS_RTF_FFTYPE
#define OOO_STRING_SVTOOLS_RTF_TLUL
#define OOO_STRING_SVTOOLS_RTF_FOOTERY
#define OOO_STRING_SVTOOLS_RTF_FFOWNSTAT
#define OOO_STRING_SVTOOLS_RTF_TQDEC
sal_uInt8 TransColToIco(const Color &rCol)
#define OOO_STRING_SVTOOLS_RTF_ULDASHD
void SectionPageNumbering(sal_uInt16 nNumType, const ::std::optional< sal_uInt16 > &oPageRestartNumber) override
The style of the page numbers.
constexpr TypedWhichId< SvxLanguageItem > RES_CHRATR_LANGUAGE(10)
tools::Long GetRight() const
void CharHighlight(const SvxBrushItem &rBrush) override
Sfx item RES_CHRATR_HIGHLIGHT.
void FormatDrop(const SwTextNode &rNode, const SwFormatDrop &rSwFormatDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner) override
#define OOO_STRING_SVTOOLS_RTF_CLPADFR
sal_uInt8 & GetProportionalHeight()
#define OOO_STRING_SVTOOLS_RTF_TRPADDB
#define OOO_STRING_SVTOOLS_RTF_ASPALPHA
#define OOO_STRING_SVTOOLS_RTF_NESTTABLEPROPRS
constexpr TypedWhichId< SvxFontHeightItem > RES_CHRATR_FONTSIZE(8)
bool FlyFrameOLEMath(const SwFlyFrameFormat *pFlyFrameFormat, SwOLENode &rOLENode, const Size &rSize)
Math export.
#define OOO_STRING_SVTOOLS_RTF_ULTHLDASH
#define OOO_STRING_SVTOOLS_RTF_UP
Base class of all fields.
constexpr TypedWhichId< SwRotationGrf > RES_GRFATR_ROTATION(133)
const SwPageDesc * FindPageDesc(size_t *pPgDescNdIdx=nullptr) const
Search PageDesc with which this node is formatted.
constexpr::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
#define OOO_STRING_SVTOOLS_RTF_PICCROPL
#define OOO_STRING_SVTOOLS_RTF_RIN
tools::Long GetWidth() const
void ParaHangingPunctuation(const SfxBoolItem &rItem) override
Sfx item RES_PARATR_HANGINGPUNCTUATION.
SVX_NUM_CHARS_UPPER_LETTER
#define LO_STRING_SVTOOLS_RTF_LEVELPICTURE
css::uno::Reference< css::embed::XEmbeddedObject > const & GetOleRef()
#define OOO_STRING_SVTOOLS_RTF_FORMFIELD
#define OOO_STRING_SVTOOLS_RTF_AF
#define OOO_STRING_SVTOOLS_RTF_FFNAME
#define OOO_STRING_SVTOOLS_RTF_LISTLEVEL
void ParaNumRule_Impl(const SwTextNode *pTextNd, sal_Int32 nLvl, sal_Int32 nNumId) override
Sfx item RES_PARATR_NUMRULE.
#define OOO_STRING_SVTOOLS_RTF_ATNREF
#define OOO_STRING_SVTOOLS_RTF_SHPBXCOLUMN
#define OOO_STRING_SVTOOLS_RTF_SL
void ParaSplit(const SvxFormatSplitItem &rSplit) override
Sfx item RES_PARATR_SPLIT.
void StartFont(const OUString &rFamilyName) const
Start the font.
void CharFontCJK(const SvxFontItem &rFont) override
Sfx item RES_CHRATR_CJK_FONT.
sal_uInt16 GetDistance(SvxBoxItemLine nLine) const
void FlyFrameGraphic(const SwFlyFrameFormat *pFlyFrameFormat, const SwGrfNode *pGrfNode)
Output graphic fly frames.
#define OOO_STRING_SVTOOLS_RTF_PICT
void clear()
Similar to ->setLength(0), but for all buffers.
void TableInfoCell(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
virtual OUString GetPar1() const override
Author.
sal_uInt64 Seek(sal_uInt64 nPos)
void ParaWidows(const SvxWidowsItem &rWidows) override
Sfx item RES_PARATR_WIDOWS.
#define OOO_STRING_SVTOOLS_RTF_FIELD
SwTableLine is one table row in the document model.
#define OOO_STRING_SVTOOLS_RTF_KEEPN
#define OOO_STRING_SVTOOLS_RTF_ULDB
#define OOO_STRING_SVTOOLS_RTF_SAUTOUPD
#define OOO_STRING_SVTOOLS_RTF_SHPWRK
void FormatSurround(const SwFormatSurround &rSurround) override
Sfx item RES_SURROUND.
#define OOO_STRING_SVTOOLS_RTF_PICSCALEY
void EndStyles(sal_uInt16 nNumberOfStyles) override
End of the styles table.
#define LO_STRING_SVTOOLS_RTF_MMATH
#define LO_STRING_SVTOOLS_RTF_MMATHPICT
void RefField(const SwField &rField, const OUString &rRef) override
#define OOO_STRING_SVTOOLS_RTF_INTBL
#define OOO_STRING_SVTOOLS_RTF_CLTXTBRL
#define OOO_STRING_SVTOOLS_RTF_SOUTLVL
#define OOO_STRING_SVTOOLS_RTF_BKMKEND
void CharLanguage(const SvxLanguageItem &rLanguage) override
Sfx item RES_CHRATR_LANGUAGE.
#define OOO_STRING_SVTOOLS_RTF_OUTLINELEVEL
#define OOO_STRING_SVTOOLS_RTF_FLYANCHOR
#define OOO_STRING_SVTOOLS_RTF_FSCRIPT
void StartAbstractNumbering(sal_uInt16 nId) override
Start of the abstract numbering definition instance.
#define OOO_STRING_SVTOOLS_RTF_CLVMRG
SvStream & WriteOString(const OString &rStr)
#define OOO_STRING_SVTOOLS_RTF_RTLPAR
#define DFLT_ESC_AUTO_SUB
#define OOO_STRING_SVTOOLS_RTF_LEVELSTARTAT
#define OOO_STRING_SVTOOLS_RTF_FLDRSLT
void StartStyles() override
Start of the styles table.
void FormatFrameSize(const SwFormatFrameSize &rSize) override
Sfx item RES_FRM_SIZE.
void SectionTitlePage() override
Has different headers/footers for the title page.
void CharPostureCTL(const SvxPostureItem &rPosture) override
Sfx item RES_CHRATR_CTL_POSTURE.
void SectFootnoteEndnotePr() override
for footnote/endnote section properties
#define OOO_STRING_SVTOOLS_RTF_ACCUNDERDOT
#define OOO_STRING_SVTOOLS_RTF_SFTNNALC
void FlyFrameOLE(const SwFlyFrameFormat *pFlyFrameFormat, SwOLENode &rOLENode, const Size &rSize)
#define OOO_STRING_SVTOOLS_RTF_LTRCH
const sal_uInt8 ColumnBreak
void SectionBiDi(bool bBiDi) override
Columns populated from right/numbers on the right side?
const editeng::SvxBorderLine * GetRight() const
bool m_bSingleEmptyRun
If we're in a paragraph that has a single empty run only.
#define OOO_STRING_SVTOOLS_RTF_SBKNONE
void CharCaseMap(const SvxCaseMapItem &rCaseMap) override
Sfx item Sfx item RES_CHRATR_CASEMAP.
#define OOO_STRING_SVTOOLS_RTF_CLVERTALB
#define OOO_STRING_SVTOOLS_RTF_PICH
rtl_TextEncoding GetDefaultEncoding() const
#define OOO_STRING_SVTOOLS_RTF_MARGRSXN
EmbeddedObjectRef * pObject
#define OOO_STRING_SVTOOLS_RTF_RTLROW
static OString OutTBLBorderLine(RtfExport const &rExport, const editeng::SvxBorderLine *pLine, const char *pStr)
OUString FieldString(ww::eField eIndex)
SvStream & WriteCharPtr(const char *pBuf)
#define OOO_STRING_SVTOOLS_RTF_HIGHLIGHT
const sal_uInt8 * GetData() const
#define OOO_STRING_SVTOOLS_RTF_SHPPICT
#define OOO_STRING_SVTOOLS_RTF_FAROMAN
int GetActualListLevel() const
Returns the actual list level of this text node, when it is a list item.
SwTableFormat * GetFrameFormat()
void StartSection() override
Start of the section properties.
void TableBidi(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
void CharWeight(const SvxWeightItem &rWeight) override
Sfx item RES_CHRATR_WEIGHT.
Value in Var-direction gives minimum (can be exceeded but not be less).
void TableBackgrounds(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner) override
FontItalic GetPosture() const
#define OOO_STRING_SVTOOLS_RTF_LINECONT
#define OOO_STRING_SVTOOLS_RTF_CLPADFB
#define OOO_STRING_SVTOOLS_RTF_CHBRDR
RtfStringBuffer m_RunText
static bool isTextBox(const SwFrameFormat &rFrameFormat)
Is this a standalone TextFrame, or used as a TextBox of a shape?