From 21f6bf2d17de3a69981d15d3878fd57d4169972f Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Mon, 31 Oct 2016 08:16:53 +0300 Subject: [PATCH] MS formats allow padding without borders, regardless of display. AllowPaddingWithoutBorders is about display / UI settings. Whether LO displays them or not, the border distance should be saved for proper round-tripping, so no need to test for compat setting (and which is always true anyway in this code segment). related to tdf#41542 and commit 52b29c60801cf75364fd8275a22e812797cb184d Change-Id: I3822d9ea50376b50b89dff37b7394286cab76fff Reviewed-on: https://gerrit.libreoffice.org/30426 Reviewed-by: Justin Luth Tested-by: Justin Luth --- sw/source/filter/ww8/wrtw8esh.cxx | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx index 58f032278307..d5d0d2de844f 100644 --- a/sw/source/filter/ww8/wrtw8esh.cxx +++ b/sw/source/filter/ww8/wrtw8esh.cxx @@ -1967,7 +1967,6 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, sal_Int32 nLineWidth=0; const SfxPoolItem* pItem; bool bFirstLine = true; - const bool bAllowPaddingWithoutBorders = rFormat.getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS); if (SfxItemState::SET == rFormat.GetItemState(RES_BOX, true, &pItem)) { static const o3tl::enumarray aExhperProp = @@ -2035,13 +2034,8 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, rPropOpt.AddOpt( aExhperProp[ n ], DrawModelToEmu( static_cast(pItem)->GetDistance( n ) )); } - else if( bAllowPaddingWithoutBorders ) - { - rPropOpt.AddOpt( aExhperProp[ n ], DrawModelToEmu(static_cast(pItem)->GetDistance( n )) ); - } else - // MM If there is no line the distance should be set to 0 - rPropOpt.AddOpt( aExhperProp[ n ], DrawModelToEmu(0)); + rPropOpt.AddOpt( aExhperProp[ n ], DrawModelToEmu(static_cast(pItem)->GetDistance( n )) ); } else { @@ -2054,13 +2048,6 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat, if( bFirstLine ) // no valid line found { rPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x80000 ); - if( !bAllowPaddingWithoutBorders ) - { - rPropOpt.AddOpt( ESCHER_Prop_dyTextTop, 0 ); - rPropOpt.AddOpt( ESCHER_Prop_dyTextBottom, 0 ); - rPropOpt.AddOpt( ESCHER_Prop_dxTextLeft, 0 ); - rPropOpt.AddOpt( ESCHER_Prop_dxTextRight, 0 ); - } } const SwAttrSet& rAttrSet = rFormat.GetAttrSet(); if (SfxItemState::SET == rAttrSet.GetItemState(RES_BOX, false, &pItem))