12#include <com/sun/star/beans/XPropertySet.hpp>
13#include <com/sun/star/text/WrapTextMode.hpp>
14#include <com/sun/star/document/XDocumentProperties.hpp>
17#include <osl/thread.h>
19#include <rtl/tencinfo.h>
22#include <ooxml/resourceids.hxx>
38 static const int aMap[]
39 = { NS_ooxml::LN_Value_ST_NumberFormat_decimal,
40 NS_ooxml::LN_Value_ST_NumberFormat_upperRoman,
41 NS_ooxml::LN_Value_ST_NumberFormat_lowerRoman,
42 NS_ooxml::LN_Value_ST_NumberFormat_upperLetter,
43 NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter,
44 NS_ooxml::LN_Value_ST_NumberFormat_ordinal,
45 NS_ooxml::LN_Value_ST_NumberFormat_cardinalText,
46 NS_ooxml::LN_Value_ST_NumberFormat_ordinalText,
47 NS_ooxml::LN_Value_ST_NumberFormat_none,
48 NS_ooxml::LN_Value_ST_NumberFormat_none,
49 NS_ooxml::LN_Value_ST_NumberFormat_ideographDigital,
50 NS_ooxml::LN_Value_ST_NumberFormat_japaneseCounting,
51 NS_ooxml::LN_Value_ST_NumberFormat_aiueo,
52 NS_ooxml::LN_Value_ST_NumberFormat_iroha,
53 NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth,
54 NS_ooxml::LN_Value_ST_NumberFormat_decimalHalfWidth,
55 NS_ooxml::LN_Value_ST_NumberFormat_japaneseLegal,
56 NS_ooxml::LN_Value_ST_NumberFormat_japaneseDigitalTenThousand,
57 NS_ooxml::LN_Value_ST_NumberFormat_decimalEnclosedCircleChinese,
58 NS_ooxml::LN_Value_ST_NumberFormat_decimalFullWidth2,
59 NS_ooxml::LN_Value_ST_NumberFormat_aiueoFullWidth,
60 NS_ooxml::LN_Value_ST_NumberFormat_irohaFullWidth,
61 NS_ooxml::LN_Value_ST_NumberFormat_decimalZero,
62 NS_ooxml::LN_Value_ST_NumberFormat_bullet,
63 NS_ooxml::LN_Value_ST_NumberFormat_ganada,
64 NS_ooxml::LN_Value_ST_NumberFormat_chosung,
65 NS_ooxml::LN_Value_ST_NumberFormat_decimalEnclosedFullstop,
66 NS_ooxml::LN_Value_ST_NumberFormat_decimalEnclosedParen,
67 NS_ooxml::LN_Value_ST_NumberFormat_decimalEnclosedCircleChinese,
68 NS_ooxml::LN_Value_ST_NumberFormat_ideographEnclosedCircle,
69 NS_ooxml::LN_Value_ST_NumberFormat_ideographTraditional,
70 NS_ooxml::LN_Value_ST_NumberFormat_ideographZodiac,
71 NS_ooxml::LN_Value_ST_NumberFormat_ideographZodiacTraditional,
72 NS_ooxml::LN_Value_ST_NumberFormat_taiwaneseCounting,
73 NS_ooxml::LN_Value_ST_NumberFormat_ideographLegalTraditional,
74 NS_ooxml::LN_Value_ST_NumberFormat_taiwaneseCountingThousand,
75 NS_ooxml::LN_Value_ST_NumberFormat_taiwaneseDigital,
76 NS_ooxml::LN_Value_ST_NumberFormat_chineseCounting,
77 NS_ooxml::LN_Value_ST_NumberFormat_chineseLegalSimplified,
78 NS_ooxml::LN_Value_ST_NumberFormat_chineseCountingThousand,
79 NS_ooxml::LN_Value_ST_NumberFormat_decimal,
80 NS_ooxml::LN_Value_ST_NumberFormat_koreanDigital,
81 NS_ooxml::LN_Value_ST_NumberFormat_koreanCounting,
82 NS_ooxml::LN_Value_ST_NumberFormat_koreanLegal,
83 NS_ooxml::LN_Value_ST_NumberFormat_koreanDigital2,
84 NS_ooxml::LN_Value_ST_NumberFormat_hebrew1,
85 NS_ooxml::LN_Value_ST_NumberFormat_arabicAlpha,
86 NS_ooxml::LN_Value_ST_NumberFormat_hebrew2,
87 NS_ooxml::LN_Value_ST_NumberFormat_arabicAbjad };
90 if (nParam >= 0 && nParam < nLen)
93 nValue = NS_ooxml::LN_Value_ST_NumberFormat_none;
107 nSprm = NS_ooxml::LN_CT_Lvl_lvlJc;
112 nValue = NS_ooxml::LN_Value_ST_Jc_left;
115 nValue = NS_ooxml::LN_Value_ST_Jc_center;
118 nValue = NS_ooxml::LN_Value_ST_Jc_right;
125 nSprm = NS_ooxml::LN_CT_Lvl_start;
128 nSprm = NS_ooxml::LN_CT_Lvl_lvlPicBulletId;
131 nSprm = NS_ooxml::LN_CT_Style_basedOn;
135 nSprm = NS_ooxml::LN_CT_Style_next;
150 NS_ooxml::LN_CT_NumFmt_val, pIntValue);
171 nSprm = NS_ooxml::LN_EG_RPrBase_szCs;
179 nSprm = NS_ooxml::LN_EG_RPrBase_sz;
184 nSprm = NS_ooxml::LN_EG_RPrBase_spacing;
187 nSprm = NS_ooxml::LN_EG_RPrBase_kern;
190 nSprm = NS_ooxml::LN_EG_RPrBase_w;
224 nSprm = NS_ooxml::LN_CT_Language_bidi;
227 nSprm = NS_ooxml::LN_CT_Language_eastAsia;
234 nSprm = NS_ooxml::LN_CT_Language_val;
239 nSprm = NS_ooxml::LN_CT_Language_eastAsia;
268 nSprm = NS_ooxml::LN_tblDepth;
348 nId = NS_ooxml::LN_CT_FramePr_w;
351 nId = NS_ooxml::LN_CT_FramePr_h;
355 nId = NS_ooxml::LN_CT_FramePr_x;
361 nId = NS_ooxml::LN_CT_FramePr_y;
395 int nCellX = nParam - rCurrentCellX;
397 if (!nCellX && nParam > 0)
411 if (rCurrentCellX == 0 && pTblInd)
414 = pTblInd->getAttributes().find(NS_ooxml::LN_CT_TblWidth_w);
415 if (pWidth && pWidth->getInt() < 0)
416 nCellX = -1 * (pWidth->getInt() - nParam);
419 rCurrentCellX = nParam;
420 auto pXValue =
new RTFValue(nCellX);
447 aSprms.
set(NS_ooxml::LN_tblStart,
new RTFValue(1));
458 OUString hRule(
"auto");
462 std::swap(pIntValue, pAbsValue);
470 NS_ooxml::LN_CT_TrPrBase_trHeight, NS_ooxml::LN_CT_Height_val,
475 NS_ooxml::LN_CT_TrPrBase_trHeight, NS_ooxml::LN_CT_Height_hRule,
492 NS_ooxml::LN_CT_TblWidth_type,
493 new RTFValue(NS_ooxml::LN_Value_ST_TblWidth_dxa));
502 = pCellMargin->getSprms().find(NS_ooxml::LN_CT_TcMar_left);
504 nParam -= pMarginLeft->getAttributes()
505 .find(NS_ooxml::LN_CT_TblWidth_w)
508 rCurrentTRLeft = nParam;
511 rCurrentTRLeft = rCurrentCellX = nParam;
514 +NS_ooxml::LN_CT_TblWidth_w,
new RTFValue(nParam));
523 nValue = NS_ooxml::LN_Value_ST_Shd_clear;
524 else if (nParam < 750)
528 nValue = NS_ooxml::LN_Value_ST_Shd_pct5;
529 else if (nParam < 1100)
530 nValue = NS_ooxml::LN_Value_ST_Shd_pct10;
531 else if (nParam < 1350)
532 nValue = NS_ooxml::LN_Value_ST_Shd_pct12;
533 else if (nParam < 1750)
534 nValue = NS_ooxml::LN_Value_ST_Shd_pct15;
535 else if (nParam < 2250)
536 nValue = NS_ooxml::LN_Value_ST_Shd_pct20;
537 else if (nParam < 2750)
538 nValue = NS_ooxml::LN_Value_ST_Shd_pct25;
539 else if (nParam < 3250)
540 nValue = NS_ooxml::LN_Value_ST_Shd_pct30;
541 else if (nParam < 3600)
542 nValue = NS_ooxml::LN_Value_ST_Shd_pct35;
543 else if (nParam < 3850)
544 nValue = NS_ooxml::LN_Value_ST_Shd_pct37;
545 else if (nParam < 4250)
546 nValue = NS_ooxml::LN_Value_ST_Shd_pct40;
547 else if (nParam < 4750)
548 nValue = NS_ooxml::LN_Value_ST_Shd_pct45;
549 else if (nParam < 5250)
550 nValue = NS_ooxml::LN_Value_ST_Shd_pct50;
551 else if (nParam < 5750)
552 nValue = NS_ooxml::LN_Value_ST_Shd_pct55;
553 else if (nParam < 6100)
554 nValue = NS_ooxml::LN_Value_ST_Shd_pct60;
555 else if (nParam < 6350)
556 nValue = NS_ooxml::LN_Value_ST_Shd_pct62;
557 else if (nParam < 6750)
558 nValue = NS_ooxml::LN_Value_ST_Shd_pct65;
559 else if (nParam < 7250)
560 nValue = NS_ooxml::LN_Value_ST_Shd_pct70;
561 else if (nParam < 7750)
562 nValue = NS_ooxml::LN_Value_ST_Shd_pct75;
563 else if (nParam < 8250)
564 nValue = NS_ooxml::LN_Value_ST_Shd_pct80;
565 else if (nParam < 8600)
566 nValue = NS_ooxml::LN_Value_ST_Shd_pct85;
567 else if (nParam < 8850)
568 nValue = NS_ooxml::LN_Value_ST_Shd_pct87;
569 else if (nParam < 9250)
570 nValue = NS_ooxml::LN_Value_ST_Shd_pct90;
571 else if (nParam < 9750)
572 nValue = NS_ooxml::LN_Value_ST_Shd_pct95;
575 nValue = NS_ooxml::LN_Value_ST_Shd_solid;
588 aAttributes.
set(NS_ooxml::LN_CT_TblWidth_type,
589 new RTFValue(NS_ooxml::LN_Value_ST_TblWidth_dxa));
590 aAttributes.
set(NS_ooxml::LN_CT_TblWidth_w,
new RTFValue(nParam));
595 nSprm = NS_ooxml::LN_CT_TcMar_bottom;
598 nSprm = NS_ooxml::LN_CT_TcMar_top;
601 nSprm = NS_ooxml::LN_CT_TcMar_right;
604 nSprm = NS_ooxml::LN_CT_TcMar_left;
623 aAttributes.
set(NS_ooxml::LN_CT_TblWidth_type,
624 new RTFValue(NS_ooxml::LN_Value_ST_TblWidth_dxa));
630 nSprm = NS_ooxml::LN_CT_TcMar_bottom;
633 nSprm = NS_ooxml::LN_CT_TcMar_left;
636 nSprm = NS_ooxml::LN_CT_TcMar_right;
639 nSprm = NS_ooxml::LN_CT_TcMar_top;
645 NS_ooxml::LN_CT_TblPrBase_tblCellMar, nSprm,
662 aAttributes.
set(NS_ooxml::LN_CT_TblWidth_w,
new RTFValue(nParam));
666 nSprm = NS_ooxml::LN_CT_TcMar_bottom;
669 nSprm = NS_ooxml::LN_CT_TcMar_left;
672 nSprm = NS_ooxml::LN_CT_TcMar_right;
675 nSprm = NS_ooxml::LN_CT_TcMar_top;
695 aAttributes.
set(NS_ooxml::LN_CT_TblWidth_type,
696 new RTFValue(NS_ooxml::LN_Value_ST_TblWidth_dxa));
697 aAttributes.
set(NS_ooxml::LN_CT_TblWidth_w, pIntValue);
700 NS_ooxml::LN_CT_TblPrBase_tblCellMar, NS_ooxml::LN_CT_TblCellMar_left,
703 NS_ooxml::LN_CT_TblPrBase_tblCellMar,
704 NS_ooxml::LN_CT_TblCellMar_right,
new RTFValue(aAttributes));
709 NS_ooxml::LN_CT_TblWidth_type, pIntValue);
713 NS_ooxml::LN_CT_TblWidth_w, pIntValue);
780 nSprm = NS_ooxml::LN_CT_Fonts_cs;
783 nSprm = NS_ooxml::LN_CT_Fonts_eastAsia;
791 nSprm = NS_ooxml::LN_CT_Fonts_ascii;
810 aRunPropsSprms.
set(NS_ooxml::LN_EG_RPrBase_rFonts,
new RTFValue(aFontAttributes));
820 NS_ooxml::LN_EG_RPrBase_rFonts, nSprm, pValue);
850 ? osl_getThreadTextEncoding()
851 : rtl_getTextEncodingFromWindowsCodePage(
aRTFEncodings[
i].codepage);
858 rtl_TextEncoding nEncoding
861 : rtl_getTextEncodingFromWindowsCodePage(nParam);
873 aAttributes.
set(NS_ooxml::LN_CT_Color_val, pValue);
886 auto pValue =
new RTFValue(NS_ooxml::LN_Value_ST_StyleType_paragraph);
893 if (!
aName.isEmpty())
911 auto pValue =
new RTFValue(NS_ooxml::LN_Value_ST_StyleType_character);
918 if (!
aName.isEmpty())
960 : NS_ooxml::LN_CT_Language_bidi),
968 NS_ooxml::LN_CT_Shd_fill, pValue);
976 NS_ooxml::LN_CT_Shd_fill, pValue);
984 NS_ooxml::LN_CT_Shd_fill, pValue);
1008 auto pValue =
new RTFValue(
int(
true));
1014 NS_ooxml::LN_CT_EastAsianLayout_vertCompress, pValue);
1020 auto pValue =
new RTFValue(nParam * 5);
1026 auto pValue =
new RTFValue(
int(
true));
1033 nId = NS_ooxml::LN_Value_ST_CombineBrackets_none;
1036 nId = NS_ooxml::LN_Value_ST_CombineBrackets_round;
1039 nId = NS_ooxml::LN_Value_ST_CombineBrackets_square;
1042 nId = NS_ooxml::LN_Value_ST_CombineBrackets_angle;
1045 nId = NS_ooxml::LN_Value_ST_CombineBrackets_curly;
1050 NS_ooxml::LN_CT_EastAsianLayout_combineBrackets,
new RTFValue(
nId));
1057 new RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_atLeast));
1060 pValue =
new RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_exact);
1070 auto pValue =
new RTFValue(NS_ooxml::LN_Value_doc_ST_LineSpacingRule_auto);
1079 nParam = nParam * 2 / 5;
1080 auto pValue =
new RTFValue(nParam);
1093 auto pValue =
new RTFValue(nParam / 20);
1103 NS_ooxml::LN_CT_Tabs_tab, pValue);
1106 NS_ooxml::LN_CT_Tabs_tab, pValue);
1112 NS_ooxml::LN_CT_NumPr_ilvl, pIntValue);
1184 if (!sValue.isEmpty())
1194 nValue = NS_ooxml::LN_Value_ST_Pitch_default;
1197 nValue = NS_ooxml::LN_Value_ST_Pitch_fixed;
1200 nValue = NS_ooxml::LN_Value_ST_Pitch_variable;
1251 nValue = NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_bothSides;
1254 nValue = NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_left;
1257 nValue = NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_right;
1260 nValue = NS_ooxml::LN_Value_wordprocessingDrawing_ST_WrapText_largest;
1269 pTight->getAttributes().set(NS_ooxml::LN_CT_WrapTight_wrapText, pValue);
1303 NS_ooxml::LN_EG_SectPrContents_cols, NS_ooxml::LN_CT_Columns_num,
1308 NS_ooxml::LN_EG_SectPrContents_cols, NS_ooxml::LN_CT_Columns_space,
1313 NS_ooxml::LN_CT_Columns_col, pIntValue);
1319 NS_ooxml::LN_EG_SectPrContents_cols);
1321 : NS_ooxml::LN_CT_Column_space),
1327 NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_h,
1332 NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_h,
1337 NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_w,
1342 NS_ooxml::LN_EG_SectPrContents_pgSz, NS_ooxml::LN_CT_PageSz_w,
1347 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_left,
1352 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_left,
1357 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_right,
1362 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_right,
1367 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_top,
1372 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_top,
1377 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_bottom,
1382 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_bottom,
1387 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_header,
1392 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_footer,
1397 NS_ooxml::LN_EG_SectPrContents_pgMar, NS_ooxml::LN_CT_PageMar_gutter,
1405 NS_ooxml::LN_EG_SectPrContents_lnNumType,
1406 NS_ooxml::LN_CT_LineNumber_countBy, pIntValue);
1411 NS_ooxml::LN_EG_SectPrContents_lnNumType,
1412 NS_ooxml::LN_CT_LineNumber_distance, pIntValue);
1417 auto pStart = tools::make_ref<RTFValue>(nParam - 1);
1419 NS_ooxml::LN_EG_SectPrContents_lnNumType,
1420 NS_ooxml::LN_CT_LineNumber_start, pStart);
1428 NS_ooxml::LN_CT_TrackChange_author, pValue);
1438 NS_ooxml::LN_CT_TrackChange_date, pValue);
1506 aName =
"PageCount";
1510 aName =
"WordCount";
1513 aName =
"CharacterCount";
1516 aName =
"NonWhitespaceCharacterCount";
1521 if (!
aName.isEmpty())
1537 NS_ooxml::LN_EG_SectPrContents_footnotePr,
1538 NS_ooxml::LN_EG_FtnEdnNumProps_numStart, pIntValue);
1542 NS_ooxml::LN_EG_SectPrContents_endnotePr,
1543 NS_ooxml::LN_EG_FtnEdnNumProps_numStart, pIntValue);
1582 NS_ooxml::LN_CT_Spacing_before, pIntValue);
1586 NS_ooxml::LN_CT_Spacing_after, pIntValue);
1607 aAttributes.
set(NS_ooxml::LN_CT_Fonts_ascii, pValue);
1609 NS_ooxml::LN_EG_RPrBase_rFonts,
new RTFValue(aAttributes));
1676 "PolyPolygon",
uno::Any(aPointSequenceSequence));
1691 NS_ooxml::LN_CT_Ind_firstLine, pIntValue);
1697 NS_ooxml::LN_CT_Ind_firstLine, pIntValue);
1706 NS_ooxml::LN_CT_Ind_left, pIntValue);
1711 NS_ooxml::LN_CT_Ind_left, pIntValue);
1716 NS_ooxml::LN_CT_Ind_firstLine,
new RTFValue(0),
1722 NS_ooxml::LN_CT_Ind_right, pIntValue);
1726 NS_ooxml::LN_CT_Ind_start, pIntValue);
1730 NS_ooxml::LN_CT_Ind_end, pIntValue);
1769 nId = NS_ooxml::LN_Value_ST_TextEffect_none;
1772 nId = NS_ooxml::LN_Value_ST_TextEffect_blinkBackground;
1795 nId = NS_ooxml::LN_Value_ST_TextDirection_lrTb;
1798 nId = NS_ooxml::LN_Value_ST_TextDirection_tbRl;
1815 nId = NS_ooxml::LN_Value_ST_BrClear_left;
1818 nId = NS_ooxml::LN_Value_ST_BrClear_right;
1821 nId = NS_ooxml::LN_Value_ST_BrClear_all;
1834 sal_Int16 nOffsetFrom = (nParam & 0xe0) >> 5;
1835 bool bFromEdge = nOffsetFrom == 1;
1838 Id nId = NS_ooxml::LN_Value_doc_ST_PageBorderOffset_page;
1840 NS_ooxml::LN_EG_SectPrContents_pgBorders,
1841 NS_ooxml::LN_CT_PageBorders_offsetFrom,
new RTFValue(
nId));
1848 NS_ooxml::LN_CT_TblPPr_tblpY,
new RTFValue(nParam));
1854 NS_ooxml::LN_CT_TblPPr_tblpX,
new RTFValue(nParam));
1860 NS_ooxml::LN_CT_TblPPr_leftFromText,
new RTFValue(nParam));
1866 NS_ooxml::LN_CT_TblPPr_rightFromText,
new RTFValue(nParam));
1872 NS_ooxml::LN_CT_TblPPr_topFromText,
new RTFValue(nParam));
1878 NS_ooxml::LN_CT_TblPPr_bottomFromText,
new RTFValue(nParam));
constexpr auto convertTwipToMm100(N n)
const OUString & getBcp47(bool bResolveSystem=true) const
virtual void props(writerfilter::Reference< Properties >::Pointer_t ref)=0
Receives properties of the current run of text.
void SetBlue(sal_uInt8 nBlue)
void SetRed(sal_uInt8 nRed)
void SetGreen(sal_uInt8 nGreen)
OUStringBuffer m_aUnicodeBuffer
int m_nNestedCurrentCellX
Current cellx value (nested table)
void setNeedSect(bool bNeedSect)
If we need a final section break at the end of the document.
RTFSprms m_aSettingsTableAttributes
The settings table attributes.
bool dispatchCharacterSprmValue(RTFKeyword nKeyword, int nParam)
bool dispatchTableValue(RTFKeyword nKeyword, int nParam)
std::deque< RTFBuffer_t > m_aTableBufferStack
Buffered table cells, till cell definitions are not reached.
RTFError dispatchValue(RTFKeyword nKeyword, int nParam) override
int m_nDefaultFontIndex
Raw default font index, use getFont() on it to get a real one.
std::map< int, OUString > m_aFontNames
Font index <-> name map.
std::map< int, int > m_aInvalidListLevelFirstIndents
Maps List level indexes to removed values in the current list entry.
std::deque< RTFSprms > m_aTopLevelTableCellsAttributes
void handleFontTableEntry()
bool dispatchCharacterAttributeValue(RTFKeyword nKeyword, int nParam)
RTFSprms m_aSettingsTableSprms
The settings table sprms.
int m_nCurrentEncoding
Used only during font table parsing till we don't know the font name.
OUString getFontName(int nIndex)
Return the name of the font, based on a dmapper index.
int m_nTopLevelCurrentCellX
Current cellx value (top-level table)
std::deque< RTFSprms > m_aNestedTableCellsAttributes
std::deque< RTFSprms > m_aTopLevelTableCellsSprms
void checkUnicode(bool bUnicode, bool bHex)
If we have some unicode or hex characters to send.
std::deque< RTFSprms > m_aNestedTableCellsSprms
int m_nNestedCells
cell props buffer for nested tables, reset by \nestrow the \nesttableprops is a destination and must ...
int m_nListLevel
Index of the current list level in a list table entry.
OUString getStyleName(int nIndex)
Return the style name of an RTF style index.
int getFontIndex(int nIndex)
Return the dmapper index of an RTF index for fonts.
int m_nTopLevelCells
cell props buffer for top-level table, reset by \row
RTFParserState m_aDefaultState
Read by RTF_PARD.
bool dispatchInfoValue(RTFKeyword nKeyword, int nParam)
std::map< int, OUString > m_aAuthors
Revision index <-> author map.
RTFError dispatchFlag(RTFKeyword nKeyword) override
rtl_TextEncoding getEncoding(int nFontIndex)
Return the encoding associated with a font index.
RTFSprms m_aFormfieldSprms
bool m_bNeedPap
If paragraph properties should be emitted on next run.
bool dispatchTableSprmValue(RTFKeyword nKeyword, int nParam)
RTFFormFieldType m_nFormFieldType
bool dispatchParagraphSprmValue(RTFKeyword nKeyword, int nParam)
std::vector< int > m_aFontIndexes
Maps the non-continuous font indexes to the continuous dmapper indexes.
void outputSettingsTable()
Send NS_ooxml::LN_settings_settings to dmapper.
int m_nCellxMax
Max width of the rows in the current table.
Color getColorTable(sal_uInt32 nIndex)
bool dispatchFrameValue(RTFKeyword nKeyword, int nParam)
css::uno::Reference< css::document::XDocumentProperties > m_xDocumentProperties
Stores the properties of a drawing object.
void setFillColorG(sal_uInt8 nFillColorG)
void setDhgt(sal_Int32 nDhgt)
void setHasLineColor(bool bHasLineColor)
const css::uno::Reference< css::beans::XPropertySet > & getPropertySet() const
void setHasFillColor(bool bHasFillColor)
void setLineColorR(sal_uInt8 nLineColorR)
void setPolyLineCount(sal_Int32 nPolyLineCount)
sal_Int32 getPolyLineCount() const
void setLineColorG(sal_uInt8 nLineColorG)
std::vector< css::awt::Point > & getPolyLinePoints()
void setFillColorB(sal_uInt8 nFillColorB)
void setFillColorR(sal_uInt8 nFillColorR)
void setLineColorB(sal_uInt8 nLineColorB)
void setSprm(Id nId, Id nValue)
Store a property.
Stores the horizontal orientation properties of an RTF fly frame.
sal_Int32 GetAlign() const
sal_Int32 GetAnchor() const
void setCurrentListIndex(int nCurrentListIndex)
void setDay(sal_uInt16 nDay)
void setCurrentCharacterStyleIndex(int nCurrentCharacterStyleIndex)
void setCurrentEncoding(rtl_TextEncoding nCurrentEncoding)
RTFSprms & getParagraphSprms()
RTFColorTableEntry & getCurrentColor()
RTFSprms & getTableRowSprms()
RTFSprms & getTabAttributes()
RTFDrawingObject & getDrawingObject()
void setPropType(const css::uno::Type &rPropType)
void setCurrentStyleIndex(int nCurrentStyleIndex)
Destination getDestination() const
void setHour(sal_uInt16 nHour)
void setLevelNumbersValid(bool bLevelNumbersValid)
RTFPicture & getPicture()
rtl_TextEncoding getCurrentEncoding() const
RTFSprms & getTableSprms()
void setMonth(sal_uInt16 nMonth)
RTFSprms & getCharacterAttributes()
void setTableRowWidthAfter(int nTableRowWidthAfter)
OUStringBuffer * getCurrentDestinationText() const
RTFBuffer_t * getCurrentBuffer() const
RTFSprms & getCharacterSprms()
void setBinaryToRead(int nBinaryToRead)
void setCurrentListOverrideIndex(int nCurrentListOverrideIndex)
RTFSprms & getSectionSprms()
RTFSprms & getTableCellAttributes()
void setYear(sal_uInt16 nYear)
RTFSprms & getParagraphAttributes()
RTFSprms & getTableAttributes()
std::vector< sal_Int32 > & getLevelNumbers()
void setInternalState(RTFInternalState nInternalState)
RunType getRunType() const
bool getLevelNumbersValid() const
RTFSprms & getTableCellSprms()
void setMinute(sal_uInt16 nMinute)
Sends RTFSprm instances to DomainMapper.
void setBottom(sal_Int32 nBottom)
void setLeft(sal_Int32 nLeft)
void setInBackground(bool bInBackground)
void setTop(sal_Int32 nTop)
void setWrap(css::text::WrapTextMode nWrap)
void setRight(sal_Int32 nRight)
Skips a destination after a not parsed control word if it was prefixed with *.
void setParsed(bool bParsed)
A list of RTFSprm with a copy constructor that performs a deep copy.
RTFValue::Pointer_t find(Id nKeyword, bool bFirst=true, bool bForWrite=false)
void set(Id nKeyword, const RTFValue::Pointer_t &pValue, RTFOverwrite eOverwrite=RTFOverwrite::YES)
Does the same as ->push_back(), except that it can overwrite or ignore existing entries.
Stores the vertical orientation properties of an RTF fly frame.
sal_Int32 GetAnchor() const
sal_Int32 GetAlign() const
constexpr ::Color COL_AUTO(ColorTransparency, 0xFF, 0xFF, 0xFF, 0xFF)
UNOTOOLS_DLLPUBLIC OUString utl_getLocaleForGlobalDefaultEncoding()
Sequence< sal_Int8 > aSeq
#define SAL_INFO(area, stream)
#define SAL_N_ELEMENTS(arr)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
RTFEncoding const aRTFEncodings[]
void putNestedAttribute(RTFSprms &rSprms, Id nParent, Id nId, const RTFValue::Pointer_t &pValue, RTFOverwrite eOverwrite, bool bAttribute)
@ NO_IGNORE
No, if the key is already in the list, then ignore, otherwise append.
@ NO_APPEND
No, always append the value to the end of the list.
@ YES_PREPEND
Yes, always prepend the value to the start of the list and remove existing entries.
void putNestedSprm(RTFSprms &rSprms, Id nParent, Id nId, const RTFValue::Pointer_t &pValue, RTFOverwrite eOverwrite)
OString DTTM22OString(tools::Long nDTTM)
RTFSprms & getLastAttributes(RTFSprms &rSprms, Id nId)
const char * keywordToString(RTFKeyword nKeyword)
void putBorderProperty(RTFStack &aStates, Id nId, const RTFValue::Pointer_t &pValue)
static int getNumberFormat(int nParam)
HashMap_OWString_Interface aMap
UNOTOOLS_DLLPUBLIC rtl_TextEncoding utl_getWinTextEncodingFromLangStr(const OUString &sLanguage, bool bOEM=false)