summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfdispatchflag.cxx
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-11-09 19:54:19 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2023-11-10 10:33:54 +0100
commit4e2f2489c4c7436f8b3a21a530bc625cbef4e365 (patch)
treebca2c9e1138b55c4869bbaac6bb52f85e4a0ea7c /writerfilter/source/rtftok/rtfdispatchflag.cxx
parentd45bd161a4750ca30639ce1c6ca6d6d070e6d2cb (diff)
tdf#153178 writerfilter: do not create text frame spuriously
There are different RTF keywords that end up in RTFFrame, and some of them cause Word to create a frame, while others don't. Getting this right requires implementing support for all the missing wrapping keywords, as most of them create a frame in Word but \wrapdefault does not. Change-Id: I1e55d15180564f3d66a5ee7d98274ae18f032872 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159228 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'writerfilter/source/rtftok/rtfdispatchflag.cxx')
-rw-r--r--writerfilter/source/rtftok/rtfdispatchflag.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfdispatchflag.cxx b/writerfilter/source/rtftok/rtfdispatchflag.cxx
index de7b91e26fae..699698aa8df8 100644
--- a/writerfilter/source/rtftok/rtfdispatchflag.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchflag.cxx
@@ -1242,6 +1242,26 @@ RTFError RTFDocumentImpl::dispatchFlag(RTFKeyword nKeyword)
m_aStates.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_wrap,
NS_ooxml::LN_Value_doc_ST_Wrap_notBeside);
break;
+ case RTFKeyword::OVERLAY:
+ m_aStates.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_wrap,
+ NS_ooxml::LN_Value_doc_ST_Wrap_none);
+ break;
+ case RTFKeyword::WRAPAROUND:
+ m_aStates.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_wrap,
+ NS_ooxml::LN_Value_doc_ST_Wrap_around);
+ break;
+ case RTFKeyword::WRAPTHROUGH:
+ m_aStates.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_wrap,
+ NS_ooxml::LN_Value_doc_ST_Wrap_through);
+ break;
+ case RTFKeyword::WRAPTIGHT:
+ m_aStates.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_wrap,
+ NS_ooxml::LN_Value_doc_ST_Wrap_tight);
+ break;
+ case RTFKeyword::WRAPDEFAULT:
+ m_aStates.top().getFrame().setSprm(NS_ooxml::LN_CT_FramePr_wrap,
+ NS_ooxml::LN_Value_doc_ST_Wrap_auto);
+ break;
case RTFKeyword::MNOR:
m_bMathNor = true;
break;