summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-10-31 07:52:14 +0300
committerJustin Luth <justin_luth@sil.org>2016-10-31 05:52:27 +0000
commit49909dca5856aada5340d44f03a271d38e038039 (patch)
tree225177dbf4c07e3842b7e852bf847765293ce0db /sw
parentb589c4cd8765b0611afe435354364df891d78852 (diff)
fix logic error - still set zero padding if no border set
caused by commit 52b29c60801cf75364fd8275a22e812797cb184d originally, if there were no visible lines (bFirstLine), then any line distance was reset to zero, but with AllowPaddingWithoutBorders that should not be done. However, the case were there is no boxItem at all was missed - padding should still be initialized to zero in that case. Change-Id: I0a95ee1de6781089196a1ba40d2c0365d15926e2 Reviewed-on: https://gerrit.libreoffice.org/30412 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index b0fc04ae49ef..58f032278307 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2043,6 +2043,14 @@ sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrameFormat& rFormat,
// MM If there is no line the distance should be set to 0
rPropOpt.AddOpt( aExhperProp[ n ], DrawModelToEmu(0));
}
+ else
+ {
+ rPropOpt.AddOpt( ESCHER_Prop_dyTextTop, 0 );
+ rPropOpt.AddOpt( ESCHER_Prop_dyTextBottom, 0 );
+ rPropOpt.AddOpt( ESCHER_Prop_dxTextLeft, 0 );
+ rPropOpt.AddOpt( ESCHER_Prop_dxTextRight, 0 );
+ }
+
if( bFirstLine ) // no valid line found
{
rPropOpt.AddOpt( ESCHER_Prop_fNoLineDrawDash, 0x80000 );