diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-05-04 20:17:44 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-05-04 20:19:38 +0200 |
commit | 20a8768b1c6a6a1456cda9cd096a304e16473fbb (patch) | |
tree | 62e7c1ec290e3f97f8c814a0ae93dd798681d930 /writerfilter | |
parent | remove unused variable (diff) | |
download | core-20a8768b1c6a6a1456cda9cd096a304e16473fbb.tar.gz core-20a8768b1c6a6a1456cda9cd096a304e16473fbb.zip |
.docx wrap values mean different things than in LO, map them (bnc#750838)
Change-Id: Ic355ae9993702c37c958ea16d8d97e6ef4892dcd
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/GraphicHelpers.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx index 551c5e932099..31cded9aef89 100644 --- a/writerfilter/source/dmapper/GraphicHelpers.cxx +++ b/writerfilter/source/dmapper/GraphicHelpers.cxx @@ -184,12 +184,16 @@ void WrapHandler::lcl_sprm( Sprm& ) sal_Int32 WrapHandler::getWrapMode( ) { - sal_Int32 nMode = com::sun::star::text::WrapTextMode_NONE; + // The wrap values do not map directly to our wrap mode, + // e.g. none in .docx actually means through in LO. + sal_Int32 nMode = com::sun::star::text::WrapTextMode_THROUGHT; switch ( m_nType ) { case NS_ooxml::LN_Value_vml_wordprocessingDrawing_ST_WrapType_square: + // through and tight are somewhat complicated, approximate case NS_ooxml::LN_Value_vml_wordprocessingDrawing_ST_WrapType_tight: + case NS_ooxml::LN_Value_vml_wordprocessingDrawing_ST_WrapType_through: { switch ( m_nSide ) { @@ -204,13 +208,13 @@ sal_Int32 WrapHandler::getWrapMode( ) } } break; - case NS_ooxml::LN_Value_vml_wordprocessingDrawing_ST_WrapType_through: - nMode = com::sun::star::text::WrapTextMode_THROUGHT; break; case NS_ooxml::LN_Value_vml_wordprocessingDrawing_ST_WrapType_topAndBottom: + nMode = com::sun::star::text::WrapTextMode_NONE; + break; case NS_ooxml::LN_Value_vml_wordprocessingDrawing_ST_WrapType_none: default: - nMode = com::sun::star::text::WrapTextMode_NONE; + nMode = com::sun::star::text::WrapTextMode_THROUGHT; } return nMode; |