diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-12-04 17:55:22 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-12-04 20:21:54 +0100 |
commit | 0fa95852b0968fa2a35efb8ca816949c58af56e0 (patch) | |
tree | a63f44e6133f147c15a43c85c49b5bbad57da6e1 /sw/source/core/inc/txtfrm.hxx | |
parent | 281f3d5c418e50a2858619633ebca290bd626c03 (diff) |
tdf#128611 sw: improve rotated text layout in table cells
The problem was that in case a table with 1 row and 2 cells has rotated
text in the A1 cell, then the row height is 0, so we aggressively try to
break up the text into multiple lines. Then the A2 cell adds more
content, so the row height is increased, but the A1 cell is not
re-layouted to make use of the increased amount of vertical space.
A similar (but working) situation is vertical alignment of cell content,
there adding more content to A2 re-formats A1.
Fix the problem in a similar way: track if a text frame contains at
least one rotated portion, and throw away the portions of the text frame
at the end of SwCellFrame::Format(), after vertical alignment is
handled.
Change-Id: I65383bb1af486771dc671dca3d8bbf1831ba94ff
Reviewed-on: https://gerrit.libreoffice.org/84433
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/inc/txtfrm.hxx')
-rw-r--r-- | sw/source/core/inc/txtfrm.hxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sw/source/core/inc/txtfrm.hxx b/sw/source/core/inc/txtfrm.hxx index 26ba49dbb351..98d3ad4c5fb9 100644 --- a/sw/source/core/inc/txtfrm.hxx +++ b/sw/source/core/inc/txtfrm.hxx @@ -219,6 +219,8 @@ class SW_DLLPUBLIC SwTextFrame: public SwContentFrame bool mbFootnote : 1; // Has at least one footnote bool mbRepaint : 1; // TextFrame: Repaint is ready to be fetched bool mbHasBlinkPortions : 1; // Contains Blink Portions + /// Contains rotated portions. + bool mbHasRotatedPortions; bool mbFieldFollow : 1; // Start with Field rest of the Master bool mbHasAnimation : 1; // Contains animated SwGrfNumPortion bool mbIsSwapped : 1; // during text formatting we swap the @@ -517,6 +519,8 @@ public: inline void SetBlinkPor() const; inline void ResetBlinkPor() const; bool HasBlinkPor() const { return mbHasBlinkPortions; } + void SetHasRotatedPortions(bool bHasRotatedPortions); + bool GetHasRotatedPortions() const { return mbHasRotatedPortions; } void SetAnimation() const { const_cast<SwTextFrame*>(this)->mbHasAnimation = true; } bool HasAnimation() const { return mbHasAnimation; } |