[Libreoffice-commits] core.git: sw/source
Justin Luth
justin_luth at sil.org
Mon Oct 31 10:20:21 UTC 2016
sw/source/filter/ww8/wrtw8esh.cxx | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
New commits:
commit 21f6bf2d17de3a69981d15d3878fd57d4169972f
Author: Justin Luth <justin_luth at sil.org>
Date: Mon Oct 31 08:16:53 2016 +0300
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 at sil.org>
Tested-by: Justin Luth <justin_luth at sil.org>
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index 58f0322..d5d0d2d 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))
More information about the Libreoffice-commits
mailing list