12#include <com/sun/star/io/WrongFormatException.hpp>
15#include <ooxml/resourceids.hxx>
83 OUString
aStr(OStringToOUString(OStringChar(
char(cCh)), RTL_TEXTENCODING_MS_1252));
203 pBuffer->GetFrameProperties(), pBuffer->GetRowProperties(),
208 throw io::WrongFormatException(
"mismatch between \\itap and number of \\nestrow",
249 bool bRestored =
false;
263 NS_ooxml::LN_CT_TblGridBase_gridCol,
false);
264 const int nXValueLast = pXValueLast ? pXValueLast->getInt() : 0;
289 SAL_WARN(
"writerfilter.rtf",
"dropping extra table buffer");
329 bool bColumns =
false;
335 if (pNum && pNum->getInt() > 1)
371 ==
static_cast<sal_Int32
>(NS_ooxml::LN_Value_ST_SectionMark_continuous))
373 && !(pTitlePg && pTitlePg->getInt()))
419 OUString
aStr(
"PAGE");
const sal_Unicode uFtnEdnSep
virtual void endCharacterGroup()=0
Receives end mark for group with the same character properties.
virtual void props(writerfilter::Reference< Properties >::Pointer_t ref)=0
Receives properties of the current run of text.
virtual void text(const sal_uInt8 *data, size_t len)=0
Receives 8-bit per character text.
virtual void startCharacterGroup()=0
Receives start mark for group with the same character properties.
virtual void utext(const sal_uInt8 *data, size_t len)=0
Receives 16-bit per character text.
int m_nInheritingCells
backup of top-level props, to support inheriting cell props
void replayRowBuffer(RTFBuffer_t &rBuffer, ::std::deque< RTFSprms > &rCellsSprms, ::std::deque< RTFSprms > &rCellsAttributes, int nCells)
int m_nNestedCurrentCellX
Current cellx value (nested table)
void resetTableRowProperties()
void setNeedSect(bool bNeedSect)
If we need a final section break at the end of the document.
void restoreTableRowProperties()
std::deque< RTFBuffer_t > m_aTableBufferStack
Buffered table cells, till cell definitions are not reached.
int m_nBackupTopLevelCurrentCellX
bool m_bIgnoreNextContSectBreak
If the next continuous section break should be ignored.
std::deque< RTFSprms > m_aTopLevelTableCellsAttributes
std::deque< RTFSprms > m_aTableInheritingCellsSprms
bool m_bNeedFinalPar
If set, an empty paragraph will be added at the end of the document.
RTFKeyword m_nResetBreakOnSectBreak
clean up a synthetic page break, see RTF_PAGE if inactive value is -1, otherwise the RTF_SKB* to rest...
RTFError dispatchSymbol(RTFKeyword nKeyword) override
bool m_bHadSect
The document has multiple sections.
void singleChar(sal_uInt8 nValue, bool bRunProps=false)
int m_nTopLevelCurrentCellX
Current cellx value (top-level table)
std::deque< RTFSprms > m_aNestedTableCellsAttributes
bool m_bFirstRun
to start initial paragraph / section after font/style tables
std::deque< RTFSprms > m_aTopLevelTableCellsSprms
void checkUnicode(bool bUnicode, bool bHex)
If we have some unicode or hex characters to send.
RTFBuffer_t m_aSuperBuffer
Buffered superscript, till footnote is reached (or not).
std::deque< RTFSprms > m_aTableInheritingCellsAttributes
std::deque< RTFSprms > m_aNestedTableCellsSprms
int m_nNestedCells
cell props buffer for nested tables, reset by \nestrow the \nesttableprops is a destination and must ...
void bufferProperties(RTFBuffer_t &rBuffer, const RTFValue::Pointer_t &pValue, const tools::SvRef< TableRowBuffer > &pTableProperties, Id nStyleType=0)
Buffers properties to be sent later.
void sendProperties(writerfilter::Reference< Properties >::Pointer_t const &pParagraphProperties, writerfilter::Reference< Properties >::Pointer_t const &pFrameProperties, writerfilter::Reference< Properties >::Pointer_t const &pTableRowProperties)
Send the passed properties to dmapper.
bool m_bNeedCr
If we need to emit a CR at the end of substream.
int m_nTopLevelCells
cell props buffer for top-level table, reset by \row
void prepareProperties(RTFParserState &rState, writerfilter::Reference< Properties >::Pointer_t &o_rpParagraphProperties, writerfilter::Reference< Properties >::Pointer_t &o_rpFrameProperties, writerfilter::Reference< Properties >::Pointer_t &o_rpTableRowProperties, int nCells, int nCurrentCellX)
RTFParserState m_aDefaultState
Read by RTF_PARD.
void checkFirstRun()
If this is the first run of the document, starts the initial paragraph.
void text(OUString &rString)
RTFError dispatchFlag(RTFKeyword nKeyword) override
bool m_bAfterCellBeforeRow
Are we after a \cell, but before a \row?
void sectBreak(bool bFinal=false)
bool m_bNeedPap
If paragraph properties should be emitted on next run.
bool m_bWasInFrame
If aFrame.inFrame() was true in the previous state.
bool m_bNeedSect
If a section break is needed before the end of the doc (false right after a section break).
int m_nCellxMax
Max width of the rows in the current table.
bool inFrame() const
If we got tokens indicating we're in a frame.
RTFSprms & getParagraphSprms()
RTFSprms & getTableRowSprms()
Destination getDestination() const
int getTableRowWidthAfter() const
void setCurrentBuffer(RTFBuffer_t *pCurrentBuffer)
RTFSprms & getCharacterAttributes()
void setTableRowWidthAfter(int nTableRowWidthAfter)
RTFBuffer_t * getCurrentBuffer() const
RTFSprms & getCharacterSprms()
RTFSprms & getSectionSprms()
RTFSprms & getTableCellAttributes()
RTFSprms & getParagraphAttributes()
void setInternalState(RTFInternalState nInternalState)
RTFSprms & getTableCellSprms()
Sends RTFSprm instances to DomainMapper.
Skips a destination after a not parsed control word if it was prefixed with *.
void setReset(bool bReset)
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.
void eraseLast(Id nKeyword)
holds one nested table row
#define SAL_WARN(area, stream)
#define SAL_INFO(area, stream)
std::tuple< RTFBufferTypes, RTFValue::Pointer_t, tools::SvRef< TableRowBuffer > > Buf_t
A buffer storing dmapper calls.
@ NO_APPEND
No, always append the value to the end of the list.
const char * keywordToString(RTFKeyword nKeyword)
const sal_uInt8 cFieldSep
const sal_uInt8 cFieldStart
const sal_uInt8 cFieldEnd