diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/inc/frame.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 12 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index ec78d7b40188..0f1b1dd07e6c 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -129,6 +129,8 @@ namespace drawinglayer { namespace attribute { class SW_DLLPUBLIC SwFrameAreaDefinition { private: + friend void FriendHackInvalidateRowFrame(SwFrameAreaDefinition &); + // The absolute position and size of the SwFrame in the document. // This values are set by the layouter implementations SwRect maFrameArea; diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index a3449bfaad1e..ff891826b58d 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1770,6 +1770,14 @@ namespace { return bRet; } } + +// extern because static can't be friend +void FriendHackInvalidateRowFrame(SwFrameAreaDefinition & rRowFrame) +{ + // hilariously static_cast<SwTabFrame*>(GetLower()) would not require friend declaration, but it's UB... + rRowFrame.setFrameAreaPositionValid(false); +} + void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) { if ( IsJoinLocked() || StackHack::IsLocked() || StackHack::Count() > 50 ) @@ -1961,6 +1969,10 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) { m_bCalcLowers = true; } + if (GetLower()) + { // it's possible that the rows already have valid pos - but it is surely wrong if the table's pos changed! + FriendHackInvalidateRowFrame(*GetLower()); + } } //We need to know the height of the first row, because the master needs |