summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-10-31 08:16:53 +0300
committerJustin Luth <justin_luth@sil.org>2016-10-31 10:19:56 +0000
commit21f6bf2d17de3a69981d15d3878fd57d4169972f (patch)
treee78a4c6074f46793da4c4323665ef5885cbc21c0 /sw
parentloplugin:countusersofdefaultparams in sc(part1) (diff)
downloadcore-21f6bf2d17de3a69981d15d3878fd57d4169972f.tar.gz
core-21f6bf2d17de3a69981d15d3878fd57d4169972f.zip
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 <justin_luth@sil.org> Tested-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx15
1 files changed, 1 insertions, 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<SvxBoxItemLine, sal_uInt16> aExhperProp =
@@ -2035,13 +2034,8 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat,
rPropOpt.AddOpt( aExhperProp[ n ], DrawModelToEmu(
static_cast<const SvxBoxItem*>(pItem)->GetDistance( n ) ));
}
- else if( bAllowPaddingWithoutBorders )
- {
- rPropOpt.AddOpt( aExhperProp[ n ], DrawModelToEmu(static_cast<const SvxBoxItem*>(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<const SvxBoxItem*>(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))