diff --git a/writerfilter/source/rtftok/rtfcontrolwords.cxx b/writerfilter/source/rtftok/rtfcontrolwords.cxx index 0d7f0c049187..dfdec0750fba 100644 --- a/writerfilter/source/rtftok/rtfcontrolwords.cxx +++ b/writerfilter/source/rtftok/rtfcontrolwords.cxx @@ -1844,6 +1844,7 @@ RTFSymbol aRTFControlWords[] = { {"zwj", CONTROL_SYMBOL, RTF_ZWJ}, {"zwnbo", CONTROL_SYMBOL, RTF_ZWNBO}, {"zwnj", CONTROL_SYMBOL, RTF_ZWNJ}, + {"flymaincnt", CONTROL_DESTINATION, RTF_FLYMAINCNT}, }; int nRTFControlWords = SAL_N_ELEMENTS(aRTFControlWords); diff --git a/writerfilter/source/rtftok/rtfcontrolwords.hxx b/writerfilter/source/rtftok/rtfcontrolwords.hxx index 55e17e3e29ea..b3ca6e2a76e6 100644 --- a/writerfilter/source/rtftok/rtfcontrolwords.hxx +++ b/writerfilter/source/rtftok/rtfcontrolwords.hxx @@ -1843,7 +1843,8 @@ enum RTFKeyword RTF_ZWBO, RTF_ZWJ, RTF_ZWNBO, - RTF_ZWNJ + RTF_ZWNJ, + RTF_FLYMAINCNT }; /// Types of an RTF Control Word diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index f3e9b9d4ac50..4f62fed2a8cc 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -58,6 +58,7 @@ #include #include #include +#include #define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L)) @@ -1212,6 +1213,9 @@ int RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) case RTF_FALT: m_aStates.top().nDestinationState = DESTINATION_FALT; break; + case RTF_FLYMAINCNT: + m_aStates.top().nDestinationState = DESTINATION_FLYMAINCONTENT; + break; case RTF_LISTTEXT: // Should be ignored by any reader that understands Word 97 through Word 2007 numbering. case RTF_NONESTTABLES: diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.hxx b/writerfilter/source/rtftok/rtfdocumentimpl.hxx index bb3faec417af..5ebc3a74608d 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.hxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.hxx @@ -112,7 +112,8 @@ namespace writerfilter { DESTINATION_RESULT, DESTINATION_ANNOTATIONDATE, DESTINATION_ANNOTATIONAUTHOR, - DESTINATION_FALT + DESTINATION_FALT, + DESTINATION_FLYMAINCONTENT }; enum RTFBorderState