summaryrefslogtreecommitdiff
path: root/sw/source/core/inc
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-11-19 21:12:28 +0100
committerLászló Németh <nemeth@numbertext.org>2019-11-22 08:00:45 +0100
commit3cccdabf19a99fd3f657985c1822436d7679df2b (patch)
tree224f67225165d43b71758aede5bc7b8a1d2e1951 /sw/source/core/inc
parent5042375a67a7c7171529abd9724576a269a0c32e (diff)
tdf#125300 extend AddParaSpacingToTableCells with line spacing
Now default compatibility mode AddParaSpacingToTableCells uses not only paragraph bottom margin, but also proportional line spacing before bottom cell border, as in MSO. Note: disable testForcepoint76, because it fails again with its fixed layout. Change-Id: I52f6204a5efc63aac4aa332a1563ada0cbeb9618 Reviewed-on: https://gerrit.libreoffice.org/83236 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 2c918aa51e5528b090e52fa31b10fa17cf2593ae) Reviewed-on: https://gerrit.libreoffice.org/83430
Diffstat (limited to 'sw/source/core/inc')
-rw-r--r--sw/source/core/inc/frmtool.hxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/sw/source/core/inc/frmtool.hxx b/sw/source/core/inc/frmtool.hxx
index 3edf774c9828..a32a5a0b9c62 100644
--- a/sw/source/core/inc/frmtool.hxx
+++ b/sw/source/core/inc/frmtool.hxx
@@ -297,6 +297,7 @@ class SwBorderAttrs : public SwCacheObj
bool m_bTop : 1;
bool m_bBottom : 1;
bool m_bLine : 1;
+ bool m_bLineSpacing : 1;
bool m_bIsLine : 1; // border on at least one side?
@@ -320,7 +321,8 @@ class SwBorderAttrs : public SwCacheObj
m_nTop,
m_nBottom,
m_nGetTopLine,
- m_nGetBottomLine;
+ m_nGetBottomLine,
+ m_nLineSpacing;
// only calculate lines and shadow
void CalcTopLine_();
@@ -356,6 +358,9 @@ class SwBorderAttrs : public SwCacheObj
const SwFrame *pCaller,
const SwFrame *pCmp ) const;
+ // tdf#125300 line spacing before cell border
+ void CalcLineSpacing_();
+
public:
SwBorderAttrs( const SwModify *pOwner, const SwFrame *pConstructor );
virtual ~SwBorderAttrs() override;
@@ -371,6 +376,7 @@ public:
inline sal_uInt16 CalcRightLine() const;
inline sal_uInt16 CalcTop() const;
inline sal_uInt16 CalcBottom() const;
+ inline sal_uInt16 CalcLineSpacing() const;
long CalcLeft( const SwFrame *pCaller ) const;
long CalcRight( const SwFrame *pCaller ) const;
@@ -511,6 +517,12 @@ inline sal_uInt16 SwBorderAttrs::CalcBottom() const
const_cast<SwBorderAttrs*>(this)->CalcBottom_();
return m_nBottom;
}
+inline sal_uInt16 SwBorderAttrs::CalcLineSpacing() const
+{
+ if ( m_bLineSpacing )
+ const_cast<SwBorderAttrs*>(this)->CalcLineSpacing_();
+ return m_nLineSpacing;
+}
inline bool SwBorderAttrs::IsLine() const
{
if ( m_bLine )