1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include <sal/config.h>
12 #include <string_view>
14 #include "rtfdocumentimpl.hxx"
16 #include <com/sun/star/drawing/XDrawPageSupplier.hpp>
17 #include <com/sun/star/drawing/XEnhancedCustomShapeDefaulter.hpp>
18 #include <com/sun/star/text/RelOrientation.hpp>
19 #include <com/sun/star/text/VertOrientation.hpp>
20 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
22 #include <filter/msfilter/escherex.hxx>
24 #include <ooxml/resourceids.hxx>
26 #include <sal/log.hxx>
28 #include "rtfsdrimport.hxx"
29 #include "rtfskipdestination.hxx"
31 using namespace com::sun::star
;
33 namespace writerfilter::rtftok
35 RTFError
RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword
)
38 checkUnicode(/*bUnicode =*/true, /*bHex =*/true);
39 RTFSkipDestination
aSkip(*this);
47 nSprm
= NS_ooxml::LN_Value_ST_Underline_dotted
;
50 nSprm
= NS_ooxml::LN_Value_ST_Underline_words
;
57 auto pValue
= new RTFValue(nSprm
);
58 m_aStates
.top().getCharacterAttributes().set(NS_ooxml::LN_CT_Underline_val
, pValue
);
66 nParam
= NS_ooxml::LN_Value_ST_Jc_center
;
69 nParam
= NS_ooxml::LN_Value_ST_Jc_both
;
72 nParam
= NS_ooxml::LN_Value_ST_Jc_left
;
75 nParam
= NS_ooxml::LN_Value_ST_Jc_right
;
78 nParam
= NS_ooxml::LN_Value_ST_Jc_distribute
;
85 auto pValue
= new RTFValue(nParam
);
86 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_jc
, pValue
);
94 case RTFKeyword::FAFIXED
:
95 case RTFKeyword::FAAUTO
:
96 nParam
= NS_ooxml::LN_Value_doc_ST_TextAlignment_auto
;
98 case RTFKeyword::FAHANG
:
99 nParam
= NS_ooxml::LN_Value_doc_ST_TextAlignment_top
;
101 case RTFKeyword::FACENTER
:
102 nParam
= NS_ooxml::LN_Value_doc_ST_TextAlignment_center
;
104 case RTFKeyword::FAROMAN
:
105 nParam
= NS_ooxml::LN_Value_doc_ST_TextAlignment_baseline
;
107 case RTFKeyword::FAVAR
:
108 nParam
= NS_ooxml::LN_Value_doc_ST_TextAlignment_bottom
;
115 auto pValue
= new RTFValue(nParam
);
116 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_textAlignment
, pValue
);
123 case RTFKeyword::TQR
:
124 nParam
= NS_ooxml::LN_Value_ST_TabJc_right
;
126 case RTFKeyword::TQC
:
127 nParam
= NS_ooxml::LN_Value_ST_TabJc_center
;
129 case RTFKeyword::TQDEC
:
130 nParam
= NS_ooxml::LN_Value_ST_TabJc_decimal
;
137 auto pValue
= new RTFValue(nParam
);
138 m_aStates
.top().getTabAttributes().set(NS_ooxml::LN_CT_TabStop_val
, pValue
);
145 case RTFKeyword::TLDOT
:
146 nParam
= NS_ooxml::LN_Value_ST_TabTlc_dot
;
148 case RTFKeyword::TLMDOT
:
149 nParam
= NS_ooxml::LN_Value_ST_TabTlc_middleDot
;
151 case RTFKeyword::TLHYPH
:
152 nParam
= NS_ooxml::LN_Value_ST_TabTlc_hyphen
;
154 case RTFKeyword::TLUL
:
155 case RTFKeyword::TLTH
:
156 nParam
= NS_ooxml::LN_Value_ST_TabTlc_underscore
;
158 case RTFKeyword::TLEQ
:
164 auto pValue
= new RTFValue(nParam
);
165 m_aStates
.top().getTabAttributes().set(NS_ooxml::LN_CT_TabStop_leader
, pValue
);
173 // brdrhair and brdrs are the same, brdrw will make a difference
174 // map to values in ooxml/model.xml resource ST_Border
175 case RTFKeyword::BRDRHAIR
:
176 case RTFKeyword::BRDRS
:
177 nParam
= NS_ooxml::LN_Value_ST_Border_single
;
179 case RTFKeyword::BRDRDOT
:
180 nParam
= NS_ooxml::LN_Value_ST_Border_dotted
;
182 case RTFKeyword::BRDRDASH
:
183 nParam
= NS_ooxml::LN_Value_ST_Border_dashed
;
185 case RTFKeyword::BRDRDB
:
186 nParam
= NS_ooxml::LN_Value_ST_Border_double
;
188 case RTFKeyword::BRDRTNTHSG
:
189 nParam
= NS_ooxml::LN_Value_ST_Border_thinThickSmallGap
;
191 case RTFKeyword::BRDRTNTHMG
:
192 nParam
= NS_ooxml::LN_Value_ST_Border_thinThickMediumGap
;
194 case RTFKeyword::BRDRTNTHLG
:
195 nParam
= NS_ooxml::LN_Value_ST_Border_thinThickLargeGap
;
197 case RTFKeyword::BRDRTHTNSG
:
198 nParam
= NS_ooxml::LN_Value_ST_Border_thickThinSmallGap
;
200 case RTFKeyword::BRDRTHTNMG
:
201 nParam
= NS_ooxml::LN_Value_ST_Border_thickThinMediumGap
;
203 case RTFKeyword::BRDRTHTNLG
:
204 nParam
= NS_ooxml::LN_Value_ST_Border_thickThinLargeGap
;
206 case RTFKeyword::BRDREMBOSS
:
207 nParam
= NS_ooxml::LN_Value_ST_Border_threeDEmboss
;
209 case RTFKeyword::BRDRENGRAVE
:
210 nParam
= NS_ooxml::LN_Value_ST_Border_threeDEngrave
;
212 case RTFKeyword::BRDROUTSET
:
213 nParam
= NS_ooxml::LN_Value_ST_Border_outset
;
215 case RTFKeyword::BRDRINSET
:
216 nParam
= NS_ooxml::LN_Value_ST_Border_inset
;
218 case RTFKeyword::BRDRDASHSM
:
219 nParam
= NS_ooxml::LN_Value_ST_Border_dashSmallGap
;
221 case RTFKeyword::BRDRDASHD
:
222 nParam
= NS_ooxml::LN_Value_ST_Border_dotDash
;
224 case RTFKeyword::BRDRDASHDD
:
225 nParam
= NS_ooxml::LN_Value_ST_Border_dotDotDash
;
227 case RTFKeyword::BRDRNONE
:
228 nParam
= NS_ooxml::LN_Value_ST_Border_none
;
235 auto pValue
= new RTFValue(nParam
);
236 putBorderProperty(m_aStates
, NS_ooxml::LN_CT_Border_val
, pValue
);
244 case RTFKeyword::SBKNONE
:
245 nParam
= NS_ooxml::LN_Value_ST_SectionMark_continuous
;
247 case RTFKeyword::SBKCOL
:
248 nParam
= NS_ooxml::LN_Value_ST_SectionMark_nextColumn
;
250 case RTFKeyword::SBKPAGE
:
251 nParam
= NS_ooxml::LN_Value_ST_SectionMark_nextPage
;
253 case RTFKeyword::SBKEVEN
:
254 nParam
= NS_ooxml::LN_Value_ST_SectionMark_evenPage
;
256 case RTFKeyword::SBKODD
:
257 nParam
= NS_ooxml::LN_Value_ST_SectionMark_oddPage
;
264 if (m_nResetBreakOnSectBreak
!= RTFKeyword::invalid
)
266 m_nResetBreakOnSectBreak
= nKeyword
;
268 auto pValue
= new RTFValue(nParam
);
269 m_aStates
.top().getSectionSprms().set(NS_ooxml::LN_EG_SectPrContents_type
, pValue
);
273 // Footnote numbering
276 case RTFKeyword::FTNNAR
:
277 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_decimal
;
279 case RTFKeyword::FTNNALC
:
280 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter
;
282 case RTFKeyword::FTNNAUC
:
283 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_upperLetter
;
285 case RTFKeyword::FTNNRLC
:
286 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_lowerRoman
;
288 case RTFKeyword::FTNNRUC
:
289 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_upperRoman
;
291 case RTFKeyword::FTNNCHI
:
292 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_chicago
;
299 auto pInner
= new RTFValue(nParam
);
300 RTFSprms aAttributes
;
301 aAttributes
.set(NS_ooxml::LN_CT_NumFmt_val
, pInner
);
302 auto pOuter
= new RTFValue(aAttributes
);
303 putNestedSprm(m_aDefaultState
.getParagraphSprms(),
304 NS_ooxml::LN_EG_SectPrContents_footnotePr
, NS_ooxml::LN_CT_FtnProps_numFmt
,
309 // Footnote restart type
312 case RTFKeyword::FTNRSTPG
:
313 nParam
= NS_ooxml::LN_Value_ST_RestartNumber_eachPage
;
315 case RTFKeyword::FTNRESTART
:
316 nParam
= NS_ooxml::LN_Value_ST_RestartNumber_eachSect
;
318 case RTFKeyword::FTNRSTCONT
:
319 nParam
= NS_ooxml::LN_Value_ST_RestartNumber_continuous
;
326 auto pValue
= new RTFValue(nParam
);
327 putNestedSprm(m_aDefaultState
.getParagraphSprms(),
328 NS_ooxml::LN_EG_SectPrContents_footnotePr
,
329 NS_ooxml::LN_EG_FtnEdnNumProps_numRestart
, pValue
);
336 case RTFKeyword::AFTNNAR
:
337 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_decimal
;
339 case RTFKeyword::AFTNNALC
:
340 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter
;
342 case RTFKeyword::AFTNNAUC
:
343 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_upperLetter
;
345 case RTFKeyword::AFTNNRLC
:
346 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_lowerRoman
;
348 case RTFKeyword::AFTNNRUC
:
349 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_upperRoman
;
351 case RTFKeyword::AFTNNCHI
:
352 nParam
= NS_ooxml::LN_Value_ST_NumberFormat_chicago
;
359 auto pInner
= new RTFValue(nParam
);
360 RTFSprms aAttributes
;
361 aAttributes
.set(NS_ooxml::LN_CT_NumFmt_val
, pInner
);
362 auto pOuter
= new RTFValue(aAttributes
);
363 putNestedSprm(m_aDefaultState
.getParagraphSprms(), NS_ooxml::LN_EG_SectPrContents_endnotePr
,
364 NS_ooxml::LN_CT_EdnProps_numFmt
, pOuter
);
370 case RTFKeyword::TRQL
:
371 nParam
= NS_ooxml::LN_Value_ST_Jc_left
;
373 case RTFKeyword::TRQC
:
374 nParam
= NS_ooxml::LN_Value_ST_Jc_center
;
376 case RTFKeyword::TRQR
:
377 nParam
= NS_ooxml::LN_Value_ST_Jc_right
;
384 auto pValue
= new RTFValue(nParam
);
385 m_aStates
.top().getTableRowSprms().set(NS_ooxml::LN_CT_TrPrBase_jc
, pValue
);
392 case RTFKeyword::CLTXLRTB
:
393 nParam
= NS_ooxml::LN_Value_ST_TextDirection_lrTb
;
395 case RTFKeyword::CLTXTBRL
:
396 nParam
= NS_ooxml::LN_Value_ST_TextDirection_tbRl
;
398 case RTFKeyword::CLTXBTLR
:
399 nParam
= NS_ooxml::LN_Value_ST_TextDirection_btLr
;
401 case RTFKeyword::CLTXLRTBV
:
402 nParam
= NS_ooxml::LN_Value_ST_TextDirection_lrTbV
;
404 case RTFKeyword::CLTXTBRLV
:
405 nParam
= NS_ooxml::LN_Value_ST_TextDirection_tbRlV
;
412 auto pValue
= new RTFValue(nParam
);
413 m_aStates
.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_textDirection
, pValue
);
416 // Trivial paragraph flags
419 case RTFKeyword::KEEP
:
420 if (m_aStates
.top().getCurrentBuffer() != &m_aTableBufferStack
.back())
421 nParam
= NS_ooxml::LN_CT_PPrBase_keepLines
;
423 case RTFKeyword::KEEPN
:
424 nParam
= NS_ooxml::LN_CT_PPrBase_keepNext
;
426 case RTFKeyword::INTBL
:
428 m_aStates
.top().setCurrentBuffer(&m_aTableBufferStack
.back());
429 nParam
= NS_ooxml::LN_inTbl
;
432 case RTFKeyword::PAGEBB
:
433 nParam
= NS_ooxml::LN_CT_PPrBase_pageBreakBefore
;
440 auto pValue
= new RTFValue(1);
441 m_aStates
.top().getParagraphSprms().set(nParam
, pValue
);
447 case RTFKeyword::FNIL
:
448 case RTFKeyword::FROMAN
:
449 case RTFKeyword::FSWISS
:
450 case RTFKeyword::FMODERN
:
451 case RTFKeyword::FSCRIPT
:
452 case RTFKeyword::FDECOR
:
453 case RTFKeyword::FTECH
:
454 case RTFKeyword::FBIDI
:
455 // TODO ooxml:CT_Font_family seems to be ignored by the domain mapper
457 case RTFKeyword::ANSI
:
458 m_aStates
.top().setCurrentEncoding(RTL_TEXTENCODING_MS_1252
);
460 case RTFKeyword::MAC
:
461 m_aDefaultState
.setCurrentEncoding(RTL_TEXTENCODING_APPLE_ROMAN
);
462 m_aStates
.top().setCurrentEncoding(m_aDefaultState
.getCurrentEncoding());
465 m_aDefaultState
.setCurrentEncoding(RTL_TEXTENCODING_IBM_437
);
466 m_aStates
.top().setCurrentEncoding(m_aDefaultState
.getCurrentEncoding());
468 case RTFKeyword::PCA
:
469 m_aDefaultState
.setCurrentEncoding(RTL_TEXTENCODING_IBM_850
);
470 m_aStates
.top().setCurrentEncoding(m_aDefaultState
.getCurrentEncoding());
472 case RTFKeyword::PLAIN
:
474 m_aStates
.top().getCharacterSprms() = getDefaultState().getCharacterSprms();
475 m_aStates
.top().setCurrentEncoding(getEncoding(getFontIndex(m_nDefaultFontIndex
)));
476 m_aStates
.top().getCharacterAttributes() = getDefaultState().getCharacterAttributes();
477 m_aStates
.top().setCurrentCharacterStyleIndex(-1);
478 m_aStates
.top().setRunType(RTFParserState::RunType::NONE
);
481 case RTFKeyword::PARD
:
484 dispatchSymbol(RTFKeyword::PAR
);
485 // \pard is allowed between \cell and \row, but in that case it should not reset the fact that we're inside a table.
486 // It should not reset the paragraph style, either, so remember the old paragraph style.
487 RTFValue::Pointer_t pOldStyle
488 = m_aStates
.top().getParagraphSprms().find(NS_ooxml::LN_CT_PPrBase_pStyle
);
489 m_aStates
.top().getParagraphSprms() = m_aDefaultState
.getParagraphSprms();
490 m_aStates
.top().getParagraphAttributes() = m_aDefaultState
.getParagraphAttributes();
492 if (m_nTopLevelCells
== 0 && m_nNestedCells
== 0)
494 // Reset that we're in a table.
495 m_aStates
.top().setCurrentBuffer(nullptr);
499 // We are still in a table.
500 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_inTbl
, new RTFValue(1));
501 if (m_bAfterCellBeforeRow
&& pOldStyle
)
502 // And we still have the same paragraph style.
503 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_pStyle
,
505 // Ideally getDefaultSPRM() would take care of this, but it would not when we're buffering.
506 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_tabs
,
511 // Reset currently selected paragraph style as well, unless we are in the special "after \cell, before \row" state.
512 // By default the style with index 0 is applied.
513 if (!m_bAfterCellBeforeRow
)
515 OUString
const aName
= getStyleName(0);
516 // But only in case it's not a character style.
518 && getStyleType(0) != NS_ooxml::LN_Value_ST_StyleType_character
)
520 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_pStyle
,
521 new RTFValue(aName
));
523 m_aStates
.top().setCurrentStyleIndex(0);
525 // Need to send paragraph properties again, if there will be any.
529 case RTFKeyword::SECTD
:
531 m_aStates
.top().getSectionSprms() = m_aDefaultState
.getSectionSprms();
532 m_aStates
.top().getSectionAttributes() = m_aDefaultState
.getSectionAttributes();
535 case RTFKeyword::TROWD
:
537 // Back these up, in case later we still need this info.
538 backupTableRowProperties();
539 resetTableRowProperties();
540 // In case the table definition is in the middle of the row
541 // (invalid), make sure table definition is emitted.
545 case RTFKeyword::WIDCTLPAR
:
546 case RTFKeyword::NOWIDCTLPAR
:
548 auto pValue
= new RTFValue(int(nKeyword
== RTFKeyword::WIDCTLPAR
));
549 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_widowControl
, pValue
);
552 case RTFKeyword::BOX
:
554 RTFSprms aAttributes
;
555 auto pValue
= new RTFValue(aAttributes
);
556 for (int i
= 0; i
< 4; i
++)
557 m_aStates
.top().getParagraphSprms().set(getParagraphBorder(i
), pValue
);
558 m_aStates
.top().setBorderState(RTFBorderState::PARAGRAPH_BOX
);
561 case RTFKeyword::LTRSECT
:
562 case RTFKeyword::RTLSECT
:
564 auto pValue
= new RTFValue(nKeyword
== RTFKeyword::LTRSECT
? 0 : 1);
565 m_aStates
.top().setRunType(RTFParserState::RunType::NONE
);
566 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_EG_SectPrContents_textDirection
,
570 case RTFKeyword::LTRPAR
:
571 case RTFKeyword::RTLPAR
:
573 auto pValue
= new RTFValue(nKeyword
== RTFKeyword::LTRPAR
? 0 : 1);
574 m_aStates
.top().setRunType(RTFParserState::RunType::NONE
);
575 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_bidi
, pValue
);
578 case RTFKeyword::LTRROW
:
579 case RTFKeyword::RTLROW
:
580 m_aStates
.top().setRunType(RTFParserState::RunType::NONE
);
581 m_aStates
.top().getTableRowSprms().set(
582 NS_ooxml::LN_CT_TblPrBase_bidiVisual
,
583 new RTFValue(int(nKeyword
== RTFKeyword::RTLROW
)));
585 case RTFKeyword::LTRCH
:
586 // dmapper does not support this.
587 if (m_aStates
.top().getRunType() == RTFParserState::RunType::RTLCH_LTRCH_1
)
588 m_aStates
.top().setRunType(RTFParserState::RunType::RTLCH_LTRCH_2
);
590 m_aStates
.top().setRunType(RTFParserState::RunType::LTRCH_RTLCH_1
);
592 case RTFKeyword::RTLCH
:
593 if (m_aStates
.top().getRunType() == RTFParserState::RunType::LTRCH_RTLCH_1
)
594 m_aStates
.top().setRunType(RTFParserState::RunType::LTRCH_RTLCH_2
);
596 m_aStates
.top().setRunType(RTFParserState::RunType::RTLCH_LTRCH_1
);
598 if (m_aDefaultState
.getCurrentEncoding() == RTL_TEXTENCODING_MS_1255
)
599 m_aStates
.top().setCurrentEncoding(m_aDefaultState
.getCurrentEncoding());
601 case RTFKeyword::ULNONE
:
603 auto pValue
= new RTFValue(NS_ooxml::LN_Value_ST_Underline_none
);
604 m_aStates
.top().getCharacterAttributes().set(NS_ooxml::LN_CT_Underline_val
, pValue
);
607 case RTFKeyword::NONSHPPICT
:
608 case RTFKeyword::MMATHPICT
: // Picture group used by readers not understanding \moMath group
609 m_aStates
.top().setDestination(Destination::SKIP
);
611 case RTFKeyword::CLBRDRT
:
612 case RTFKeyword::CLBRDRL
:
613 case RTFKeyword::CLBRDRB
:
614 case RTFKeyword::CLBRDRR
:
616 RTFSprms aAttributes
;
618 auto pValue
= new RTFValue(aAttributes
, aSprms
);
621 case RTFKeyword::CLBRDRT
:
622 nParam
= NS_ooxml::LN_CT_TcBorders_top
;
624 case RTFKeyword::CLBRDRL
:
625 nParam
= NS_ooxml::LN_CT_TcBorders_left
;
627 case RTFKeyword::CLBRDRB
:
628 nParam
= NS_ooxml::LN_CT_TcBorders_bottom
;
630 case RTFKeyword::CLBRDRR
:
631 nParam
= NS_ooxml::LN_CT_TcBorders_right
;
636 putNestedSprm(m_aStates
.top().getTableCellSprms(), NS_ooxml::LN_CT_TcPrBase_tcBorders
,
638 m_aStates
.top().setBorderState(RTFBorderState::CELL
);
641 case RTFKeyword::PGBRDRT
:
642 case RTFKeyword::PGBRDRL
:
643 case RTFKeyword::PGBRDRB
:
644 case RTFKeyword::PGBRDRR
:
646 RTFSprms aAttributes
;
648 auto pValue
= new RTFValue(aAttributes
, aSprms
);
651 case RTFKeyword::PGBRDRT
:
652 nParam
= NS_ooxml::LN_CT_PageBorders_top
;
654 case RTFKeyword::PGBRDRL
:
655 nParam
= NS_ooxml::LN_CT_PageBorders_left
;
657 case RTFKeyword::PGBRDRB
:
658 nParam
= NS_ooxml::LN_CT_PageBorders_bottom
;
660 case RTFKeyword::PGBRDRR
:
661 nParam
= NS_ooxml::LN_CT_PageBorders_right
;
666 putNestedSprm(m_aStates
.top().getSectionSprms(),
667 NS_ooxml::LN_EG_SectPrContents_pgBorders
, nParam
, pValue
);
668 m_aStates
.top().setBorderState(RTFBorderState::PAGE
);
671 case RTFKeyword::BRDRT
:
672 case RTFKeyword::BRDRL
:
673 case RTFKeyword::BRDRB
:
674 case RTFKeyword::BRDRR
:
675 case RTFKeyword::BRDRBTW
:
677 RTFSprms aAttributes
;
679 auto pValue
= new RTFValue(aAttributes
, aSprms
);
682 case RTFKeyword::BRDRT
:
683 nParam
= getParagraphBorder(0);
685 case RTFKeyword::BRDRL
:
686 nParam
= getParagraphBorder(1);
688 case RTFKeyword::BRDRB
:
689 nParam
= getParagraphBorder(2);
691 case RTFKeyword::BRDRR
:
692 nParam
= getParagraphBorder(3);
694 case RTFKeyword::BRDRBTW
:
695 nParam
= getParagraphBorder(4);
700 putNestedSprm(m_aStates
.top().getParagraphSprms(), NS_ooxml::LN_CT_PrBase_pBdr
, nParam
,
702 m_aStates
.top().setBorderState(RTFBorderState::PARAGRAPH
);
705 case RTFKeyword::CHBRDR
:
707 RTFSprms aAttributes
;
708 auto pValue
= new RTFValue(aAttributes
);
709 m_aStates
.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_bdr
, pValue
);
710 m_aStates
.top().setBorderState(RTFBorderState::CHARACTER
);
713 case RTFKeyword::CLMGF
:
715 auto pValue
= new RTFValue(NS_ooxml::LN_Value_ST_Merge_restart
);
716 m_aStates
.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_hMerge
, pValue
);
719 case RTFKeyword::CLMRG
:
721 auto pValue
= new RTFValue(NS_ooxml::LN_Value_ST_Merge_continue
);
722 m_aStates
.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_hMerge
, pValue
);
725 case RTFKeyword::CLVMGF
:
727 auto pValue
= new RTFValue(NS_ooxml::LN_Value_ST_Merge_restart
);
728 m_aStates
.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_vMerge
, pValue
);
731 case RTFKeyword::CLVMRG
:
733 auto pValue
= new RTFValue(NS_ooxml::LN_Value_ST_Merge_continue
);
734 m_aStates
.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_vMerge
, pValue
);
737 case RTFKeyword::CLVERTALT
:
738 case RTFKeyword::CLVERTALC
:
739 case RTFKeyword::CLVERTALB
:
743 case RTFKeyword::CLVERTALT
:
744 nParam
= NS_ooxml::LN_Value_ST_VerticalJc_top
;
746 case RTFKeyword::CLVERTALC
:
747 nParam
= NS_ooxml::LN_Value_ST_VerticalJc_center
;
749 case RTFKeyword::CLVERTALB
:
750 nParam
= NS_ooxml::LN_Value_ST_VerticalJc_bottom
;
755 auto pValue
= new RTFValue(nParam
);
756 m_aStates
.top().getTableCellSprms().set(NS_ooxml::LN_CT_TcPrBase_vAlign
, pValue
);
759 case RTFKeyword::TRKEEP
:
761 auto pValue
= new RTFValue(1);
762 m_aStates
.top().getTableRowSprms().set(NS_ooxml::LN_CT_TrPrBase_cantSplit
, pValue
);
765 case RTFKeyword::SECTUNLOCKED
:
767 auto pValue
= new RTFValue(0);
768 m_aStates
.top().getSectionSprms().set(NS_ooxml::LN_EG_SectPrContents_formProt
, pValue
);
771 case RTFKeyword::PGNBIDIA
:
772 case RTFKeyword::PGNBIDIB
:
773 // These should be mapped to NS_ooxml::LN_EG_SectPrContents_pgNumType, but dmapper has no API for that at the moment.
775 case RTFKeyword::LOCH
:
776 m_aStates
.top().setRunType(RTFParserState::RunType::LOCH
);
778 case RTFKeyword::HICH
:
779 m_aStates
.top().setRunType(RTFParserState::RunType::HICH
);
781 case RTFKeyword::DBCH
:
782 m_aStates
.top().setRunType(RTFParserState::RunType::DBCH
);
784 case RTFKeyword::TITLEPG
:
786 auto pValue
= new RTFValue(1);
787 m_aStates
.top().getSectionSprms().set(NS_ooxml::LN_EG_SectPrContents_titlePg
, pValue
);
790 case RTFKeyword::SUPER
:
792 // Make sure character properties are not lost if the document
793 // starts with a footnote.
794 if (!isStyleSheetImport())
800 if (!m_aStates
.top().getCurrentBuffer())
801 m_aStates
.top().setCurrentBuffer(&m_aSuperBuffer
);
803 auto pValue
= new RTFValue("superscript");
804 m_aStates
.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_vertAlign
, pValue
);
807 case RTFKeyword::SUB
:
809 auto pValue
= new RTFValue("subscript");
810 m_aStates
.top().getCharacterSprms().set(NS_ooxml::LN_EG_RPrBase_vertAlign
, pValue
);
813 case RTFKeyword::NOSUPERSUB
:
815 if (m_aStates
.top().getCurrentBuffer() == &m_aSuperBuffer
)
817 replayBuffer(m_aSuperBuffer
, nullptr, nullptr);
818 m_aStates
.top().setCurrentBuffer(nullptr);
820 m_aStates
.top().getCharacterSprms().erase(NS_ooxml::LN_EG_RPrBase_vertAlign
);
823 case RTFKeyword::LINEPPAGE
:
824 case RTFKeyword::LINECONT
:
826 auto pValue
= new RTFValue(nKeyword
== RTFKeyword::LINEPPAGE
827 ? NS_ooxml::LN_Value_ST_LineNumberRestart_newPage
828 : NS_ooxml::LN_Value_ST_LineNumberRestart_continuous
);
829 putNestedAttribute(m_aStates
.top().getSectionSprms(),
830 NS_ooxml::LN_EG_SectPrContents_lnNumType
,
831 NS_ooxml::LN_CT_LineNumber_restart
, pValue
);
834 case RTFKeyword::AENDDOC
:
835 // Noop, this is the default in Writer.
836 case RTFKeyword::AENDNOTES
:
838 case RTFKeyword::AFTNRSTCONT
:
839 // Noop, this is the default in Writer.
840 case RTFKeyword::AFTNRESTART
:
842 case RTFKeyword::FTNBJ
:
843 // Noop, this is the default in Writer.
845 case RTFKeyword::ENDDOC
:
847 auto pValue
= new RTFValue(NS_ooxml::LN_Value_ST_RestartNumber_eachSect
);
848 putNestedSprm(m_aDefaultState
.getParagraphSprms(),
849 NS_ooxml::LN_EG_SectPrContents_footnotePr
,
850 NS_ooxml::LN_EG_FtnEdnNumProps_numRestart
, pValue
);
853 case RTFKeyword::NOLINE
:
854 eraseNestedAttribute(m_aStates
.top().getSectionSprms(),
855 NS_ooxml::LN_EG_SectPrContents_lnNumType
,
856 NS_ooxml::LN_CT_LineNumber_distance
);
858 case RTFKeyword::FORMSHADE
:
859 // Noop, this is the default in Writer.
861 case RTFKeyword::PNGBLIP
:
862 m_aStates
.top().getPicture().eStyle
= RTFBmpStyle::PNG
;
864 case RTFKeyword::JPEGBLIP
:
865 m_aStates
.top().getPicture().eStyle
= RTFBmpStyle::JPEG
;
867 case RTFKeyword::POSYT
:
868 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_yAlign
,
869 NS_ooxml::LN_Value_doc_ST_YAlign_top
);
871 case RTFKeyword::POSYB
:
872 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_yAlign
,
873 NS_ooxml::LN_Value_doc_ST_YAlign_bottom
);
875 case RTFKeyword::POSYC
:
876 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_yAlign
,
877 NS_ooxml::LN_Value_doc_ST_YAlign_center
);
879 case RTFKeyword::POSYIN
:
880 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_yAlign
,
881 NS_ooxml::LN_Value_doc_ST_YAlign_inside
);
883 case RTFKeyword::POSYOUT
:
884 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_yAlign
,
885 NS_ooxml::LN_Value_doc_ST_YAlign_outside
);
887 case RTFKeyword::POSYIL
:
888 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_yAlign
,
889 NS_ooxml::LN_Value_doc_ST_YAlign_inline
);
892 case RTFKeyword::PHMRG
:
893 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_hAnchor
,
894 NS_ooxml::LN_Value_doc_ST_HAnchor_margin
);
896 case RTFKeyword::PVMRG
:
897 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_vAnchor
,
898 NS_ooxml::LN_Value_doc_ST_VAnchor_margin
);
900 case RTFKeyword::PHPG
:
901 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_hAnchor
,
902 NS_ooxml::LN_Value_doc_ST_HAnchor_page
);
904 case RTFKeyword::PVPG
:
905 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_vAnchor
,
906 NS_ooxml::LN_Value_doc_ST_VAnchor_page
);
908 case RTFKeyword::PHCOL
:
909 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_hAnchor
,
910 NS_ooxml::LN_Value_doc_ST_HAnchor_text
);
912 case RTFKeyword::PVPARA
:
913 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_vAnchor
,
914 NS_ooxml::LN_Value_doc_ST_VAnchor_text
);
917 case RTFKeyword::POSXC
:
918 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_xAlign
,
919 NS_ooxml::LN_Value_doc_ST_XAlign_center
);
921 case RTFKeyword::POSXI
:
922 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_xAlign
,
923 NS_ooxml::LN_Value_doc_ST_XAlign_inside
);
925 case RTFKeyword::POSXO
:
926 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_xAlign
,
927 NS_ooxml::LN_Value_doc_ST_XAlign_outside
);
929 case RTFKeyword::POSXL
:
930 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_xAlign
,
931 NS_ooxml::LN_Value_doc_ST_XAlign_left
);
933 case RTFKeyword::POSXR
:
934 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_xAlign
,
935 NS_ooxml::LN_Value_doc_ST_XAlign_right
);
938 case RTFKeyword::DPLINE
:
939 case RTFKeyword::DPRECT
:
940 case RTFKeyword::DPELLIPSE
:
941 case RTFKeyword::DPTXBX
:
942 case RTFKeyword::DPPOLYLINE
:
943 case RTFKeyword::DPPOLYGON
:
948 case RTFKeyword::DPLINE
:
950 uno::Reference
<drawing::XShape
> xShape(
951 getModelFactory()->createInstance("com.sun.star.drawing.LineShape"),
953 m_aStates
.top().getDrawingObject().setShape(xShape
);
956 case RTFKeyword::DPPOLYLINE
:
958 // The reason this is not a simple CustomShape is that in the old syntax we have no ViewBox info.
959 uno::Reference
<drawing::XShape
> xShape(
960 getModelFactory()->createInstance("com.sun.star.drawing.PolyLineShape"),
962 m_aStates
.top().getDrawingObject().setShape(xShape
);
965 case RTFKeyword::DPPOLYGON
:
967 uno::Reference
<drawing::XShape
> xShape(
968 getModelFactory()->createInstance("com.sun.star.drawing.PolyPolygonShape"),
970 m_aStates
.top().getDrawingObject().setShape(xShape
);
973 case RTFKeyword::DPRECT
:
975 uno::Reference
<drawing::XShape
> xShape(
976 getModelFactory()->createInstance("com.sun.star.drawing.RectangleShape"),
978 m_aStates
.top().getDrawingObject().setShape(xShape
);
981 case RTFKeyword::DPELLIPSE
:
982 nType
= ESCHER_ShpInst_Ellipse
;
984 case RTFKeyword::DPTXBX
:
986 uno::Reference
<drawing::XShape
> xShape(
987 getModelFactory()->createInstance("com.sun.star.text.TextFrame"),
989 m_aStates
.top().getDrawingObject().setShape(xShape
);
990 std::vector
<beans::PropertyValue
> aDefaults
991 = RTFSdrImport::getTextFrameDefaults(false);
992 for (const auto& rDefault
: aDefaults
)
994 if (!findPropertyName(
995 m_aStates
.top().getDrawingObject().getPendingProperties(),
997 m_aStates
.top().getDrawingObject().getPendingProperties().push_back(
1001 Mapper().startShape(m_aStates
.top().getDrawingObject().getShape());
1002 m_aStates
.top().getDrawingObject().setHadShapeText(true);
1010 uno::Reference
<drawing::XShape
> xShape(
1011 getModelFactory()->createInstance("com.sun.star.drawing.CustomShape"),
1013 m_aStates
.top().getDrawingObject().setShape(xShape
);
1015 uno::Reference
<drawing::XDrawPageSupplier
> xDrawSupplier(m_xDstDoc
, uno::UNO_QUERY
);
1016 uno::Reference
<beans::XPropertySet
> xPropertySet(
1017 m_aStates
.top().getDrawingObject().getShape(), uno::UNO_QUERY
);
1018 m_aStates
.top().getDrawingObject().setPropertySet(xPropertySet
);
1019 if (xDrawSupplier
.is())
1021 uno::Reference
<drawing::XShapes
> xShapes
= xDrawSupplier
->getDrawPage();
1022 if (xShapes
.is() && nKeyword
!= RTFKeyword::DPTXBX
)
1024 // set default VertOrient before inserting
1025 m_aStates
.top().getDrawingObject().getPropertySet()->setPropertyValue(
1026 "VertOrient", uno::makeAny(text::VertOrientation::NONE
));
1027 xShapes
->add(m_aStates
.top().getDrawingObject().getShape());
1032 uno::Reference
<drawing::XEnhancedCustomShapeDefaulter
> xDefaulter(
1033 m_aStates
.top().getDrawingObject().getShape(), uno::UNO_QUERY
);
1034 xDefaulter
->createCustomShapeDefaults(OUString::number(nType
));
1036 std::vector
<beans::PropertyValue
>& rPendingProperties
1037 = m_aStates
.top().getDrawingObject().getPendingProperties();
1038 for (const auto& rPendingProperty
: rPendingProperties
)
1039 m_aStates
.top().getDrawingObject().getPropertySet()->setPropertyValue(
1040 rPendingProperty
.Name
, rPendingProperty
.Value
);
1041 m_pSdrImport
->resolveDhgt(m_aStates
.top().getDrawingObject().getPropertySet(),
1042 m_aStates
.top().getDrawingObject().getDhgt(),
1043 /*bOldStyle=*/true);
1046 case RTFKeyword::DOBXMARGIN
:
1047 case RTFKeyword::DOBYMARGIN
:
1049 beans::PropertyValue aPropertyValue
;
1051 = (nKeyword
== RTFKeyword::DOBXMARGIN
? std::u16string_view(u
"HoriOrientRelation")
1052 : std::u16string_view(u
"VertOrientRelation"));
1053 aPropertyValue
.Value
<<= text::RelOrientation::PAGE_PRINT_AREA
;
1054 m_aStates
.top().getDrawingObject().getPendingProperties().push_back(aPropertyValue
);
1057 case RTFKeyword::DOBXPAGE
:
1058 case RTFKeyword::DOBYPAGE
:
1060 beans::PropertyValue aPropertyValue
;
1062 = (nKeyword
== RTFKeyword::DOBXPAGE
? std::u16string_view(u
"HoriOrientRelation")
1063 : std::u16string_view(u
"VertOrientRelation"));
1064 aPropertyValue
.Value
<<= text::RelOrientation::PAGE_FRAME
;
1065 m_aStates
.top().getDrawingObject().getPendingProperties().push_back(aPropertyValue
);
1068 case RTFKeyword::DOBYPARA
:
1070 beans::PropertyValue aPropertyValue
;
1071 aPropertyValue
.Name
= "VertOrientRelation";
1072 aPropertyValue
.Value
<<= text::RelOrientation::FRAME
;
1073 m_aStates
.top().getDrawingObject().getPendingProperties().push_back(aPropertyValue
);
1076 case RTFKeyword::CONTEXTUALSPACE
:
1078 auto pValue
= new RTFValue(1);
1079 m_aStates
.top().getParagraphSprms().set(NS_ooxml::LN_CT_PPrBase_contextualSpacing
,
1083 case RTFKeyword::LINKSTYLES
:
1085 auto pValue
= new RTFValue(1);
1086 m_aSettingsTableSprms
.set(NS_ooxml::LN_CT_Settings_linkStyles
, pValue
);
1089 case RTFKeyword::PNLVLBODY
:
1091 auto pValue
= new RTFValue(2);
1092 m_aStates
.top().getTableAttributes().set(NS_ooxml::LN_CT_AbstractNum_nsid
, pValue
);
1095 case RTFKeyword::PNDEC
:
1097 auto pValue
= new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_decimal
);
1098 putNestedAttribute(m_aStates
.top().getTableSprms(), NS_ooxml::LN_CT_Lvl_numFmt
,
1099 NS_ooxml::LN_CT_NumFmt_val
, pValue
);
1102 case RTFKeyword::PNLVLBLT
:
1104 m_aStates
.top().getTableAttributes().set(NS_ooxml::LN_CT_AbstractNum_nsid
,
1106 putNestedAttribute(m_aStates
.top().getTableSprms(), NS_ooxml::LN_CT_Lvl_numFmt
,
1107 NS_ooxml::LN_CT_NumFmt_val
,
1108 new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_bullet
));
1111 case RTFKeyword::LANDSCAPE
:
1113 auto pValue
= new RTFValue(NS_ooxml::LN_Value_ST_PageOrientation_landscape
);
1114 putNestedAttribute(m_aDefaultState
.getSectionSprms(),
1115 NS_ooxml::LN_EG_SectPrContents_pgSz
, NS_ooxml::LN_CT_PageSz_orient
,
1117 [[fallthrough
]]; // set the default + current value
1119 case RTFKeyword::LNDSCPSXN
:
1121 auto pValue
= new RTFValue(NS_ooxml::LN_Value_ST_PageOrientation_landscape
);
1122 putNestedAttribute(m_aStates
.top().getSectionSprms(),
1123 NS_ooxml::LN_EG_SectPrContents_pgSz
, NS_ooxml::LN_CT_PageSz_orient
,
1127 case RTFKeyword::SHPBXPAGE
:
1128 m_aStates
.top().getShape().setHoriOrientRelation(text::RelOrientation::PAGE_FRAME
);
1129 m_aStates
.top().getShape().setHoriOrientRelationToken(
1130 NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromH_page
);
1132 case RTFKeyword::SHPBYPAGE
:
1133 m_aStates
.top().getShape().setVertOrientRelation(text::RelOrientation::PAGE_FRAME
);
1134 m_aStates
.top().getShape().setVertOrientRelationToken(
1135 NS_ooxml::LN_Value_wordprocessingDrawing_ST_RelFromV_page
);
1137 case RTFKeyword::DPLINEHOLLOW
:
1138 m_aStates
.top().getDrawingObject().setFLine(0);
1140 case RTFKeyword::DPROUNDR
:
1141 if (m_aStates
.top().getDrawingObject().getPropertySet().is())
1142 // Seems this old syntax has no way to specify a custom radius, and this is the default
1143 m_aStates
.top().getDrawingObject().getPropertySet()->setPropertyValue(
1144 "CornerRadius", uno::makeAny(sal_Int32(83)));
1146 case RTFKeyword::NOWRAP
:
1147 m_aStates
.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_wrap
,
1148 NS_ooxml::LN_Value_doc_ST_Wrap_notBeside
);
1150 case RTFKeyword::MNOR
:
1153 case RTFKeyword::REVISIONS
:
1154 m_aSettingsTableSprms
.set(NS_ooxml::LN_CT_Settings_trackRevisions
, new RTFValue(1));
1156 case RTFKeyword::BRDRSH
:
1157 putBorderProperty(m_aStates
, NS_ooxml::LN_CT_Border_shadow
, new RTFValue(1));
1159 case RTFKeyword::NOCOLBAL
:
1160 m_aSettingsTableSprms
.set(NS_ooxml::LN_CT_Compat_noColumnBalance
, new RTFValue(1));
1162 case RTFKeyword::MARGMIRROR
:
1163 m_aSettingsTableSprms
.set(NS_ooxml::LN_CT_Settings_mirrorMargins
, new RTFValue(1));
1165 case RTFKeyword::SAUTOUPD
:
1166 m_aStates
.top().getTableSprms().set(NS_ooxml::LN_CT_Style_autoRedefine
,
1169 case RTFKeyword::WIDOWCTRL
:
1170 m_aSettingsTableSprms
.set(NS_ooxml::LN_CT_Settings_widowControl
, new RTFValue(1));
1172 case RTFKeyword::LINEBETCOL
:
1173 putNestedAttribute(m_aStates
.top().getSectionSprms(),
1174 NS_ooxml::LN_EG_SectPrContents_cols
, NS_ooxml::LN_CT_Columns_sep
,
1177 case RTFKeyword::PGNRESTART
:
1178 putNestedAttribute(m_aStates
.top().getSectionSprms(),
1179 NS_ooxml::LN_EG_SectPrContents_pgNumType
,
1180 NS_ooxml::LN_CT_PageNumber_start
, new RTFValue(1));
1182 case RTFKeyword::PGNUCLTR
:
1184 auto pIntValue
= new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_upperLetter
);
1185 putNestedAttribute(m_aStates
.top().getSectionSprms(),
1186 NS_ooxml::LN_EG_SectPrContents_pgNumType
,
1187 NS_ooxml::LN_CT_PageNumber_fmt
, pIntValue
);
1190 case RTFKeyword::PGNLCLTR
:
1192 auto pIntValue
= new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_lowerLetter
);
1193 putNestedAttribute(m_aStates
.top().getSectionSprms(),
1194 NS_ooxml::LN_EG_SectPrContents_pgNumType
,
1195 NS_ooxml::LN_CT_PageNumber_fmt
, pIntValue
);
1198 case RTFKeyword::PGNUCRM
:
1200 auto pIntValue
= new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_upperRoman
);
1201 putNestedAttribute(m_aStates
.top().getSectionSprms(),
1202 NS_ooxml::LN_EG_SectPrContents_pgNumType
,
1203 NS_ooxml::LN_CT_PageNumber_fmt
, pIntValue
);
1206 case RTFKeyword::PGNLCRM
:
1208 auto pIntValue
= new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_lowerRoman
);
1209 putNestedAttribute(m_aStates
.top().getSectionSprms(),
1210 NS_ooxml::LN_EG_SectPrContents_pgNumType
,
1211 NS_ooxml::LN_CT_PageNumber_fmt
, pIntValue
);
1214 case RTFKeyword::PGNDEC
:
1216 auto pIntValue
= new RTFValue(NS_ooxml::LN_Value_ST_NumberFormat_decimal
);
1217 putNestedAttribute(m_aStates
.top().getSectionSprms(),
1218 NS_ooxml::LN_EG_SectPrContents_pgNumType
,
1219 NS_ooxml::LN_CT_PageNumber_fmt
, pIntValue
);
1222 case RTFKeyword::HTMAUTSP
:
1223 m_aSettingsTableSprms
.set(NS_ooxml::LN_CT_Compat_doNotUseHTMLParagraphAutoSpacing
,
1226 case RTFKeyword::DNTBLNSBDB
:
1227 // tdf#128428 switch off longer space sequence
1228 m_aSettingsTableSprms
.set(NS_ooxml::LN_CT_Settings_longerSpaceSequence
,
1231 case RTFKeyword::GUTTERPRL
:
1232 m_aSettingsTableSprms
.set(NS_ooxml::LN_CT_Settings_gutterAtTop
, new RTFValue(1));
1234 case RTFKeyword::RTLGUTTER
:
1236 m_aStates
.top().getSectionSprms().set(NS_ooxml::LN_EG_SectPrContents_rtlGutter
,
1240 case RTFKeyword::FLDLOCK
:
1242 if (m_aStates
.top().getDestination() == Destination::FIELD
)
1243 m_aStates
.top().setFieldLocked(true);
1248 SAL_INFO("writerfilter", "TODO handle flag '" << keywordToString(nKeyword
) << "'");
1249 aSkip
.setParsed(false);
1253 return RTFError::OK
;
1256 } // namespace writerfilter
1258 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */