diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-09-18 11:47:56 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-09-21 13:15:04 +0200 |
commit | c54d697e2ac379d4b1a3ff5acb6f06bff30cadd6 (patch) | |
tree | 82fb44ee738e85d75f62372fdcbc0cb095069151 /filter | |
parent | 88084ceca708a343fc79249f91eb9de34d26b3e9 (diff) |
tdf#136620 tdf#136708 filter,oox,sw: fix export of 2 different wraps
This reverts commit 2cb90a5c87fe46737c8d840967d8836284f92ffd.
Revert the change to EscherPropertyContainer, which was completely
bogus, based on pre-existing bogus code in VMLExport::Commit().
The problem is that ESCHER_Wrap values are for wrapping text *inside* a
text box, which is "mso-wrap-style" in VML, whereas VML's w10:wrap
element defines how text wraps *around* a shape, doesn't exist as an
ESCHER property and is specific to Word formats.
Instead, export the w10:wrap element in VMLExport::EndShape().
This has 2 callers, WriteActiveXControl() and writeVMLDrawing().
Furthermore the value "none" wasn't written for WrapTextMode_THROUGH,
which caused the wrap element to be omitted in that case.
Change-Id: Id4a01fcb2ea73fa9bef4ee8769b5e0680e059f15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103009
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
(cherry picked from commit fdc8590032b292dcb8152b328401e591fea642a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103090
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 8bf8c779af64..443d533ecadb 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -61,7 +61,6 @@ #include <com/sun/star/drawing/FlagSequence.hpp> #include <com/sun/star/drawing/PolygonFlags.hpp> #include <com/sun/star/text/WritingMode.hpp> -#include <com/sun/star/text/WrapTextMode.hpp> #include <com/sun/star/drawing/TextVerticalAdjust.hpp> #include <com/sun/star/drawing/TextHorizontalAdjust.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp> @@ -693,10 +692,6 @@ void EscherPropertyContainer::CreateTextProperties( bool bWordWrap ( false ); bool bAutoGrowSize ( false ); - uno::Any aTextWrap; - - EscherPropertyValueHelper::GetPropertyValue(aTextWrap, rXPropSet, "TextWrap", true); - if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "TextWritingMode", true ) ) aAny >>= eWM; if ( EscherPropertyValueHelper::GetPropertyValue( aAny, rXPropSet, "TextVerticalAdjust", true ) ) @@ -835,21 +830,6 @@ void EscherPropertyContainer::CreateTextProperties( nTextAttr |= 0x20002; } } - - if (aTextWrap.hasValue()) - { // explicit text wrap overrides whatever was inferred previously - switch (aTextWrap.get<text::WrapTextMode>()) - { - case text::WrapTextMode_THROUGH: - eWrapMode = ESCHER_WrapNone; - break; - // in theory there are 3 more Escher_Wrap, but [MS-ODRAW] says they are useless - default: - eWrapMode = ESCHER_WrapSquare; - break; - } - } - AddOpt( ESCHER_Prop_dxTextLeft, nLeft * 360 ); AddOpt( ESCHER_Prop_dxTextRight, nRight * 360 ); AddOpt( ESCHER_Prop_dyTextTop, nTop * 360 ); |