diff options
Diffstat (limited to 'sw/source/core/inc/tabfrm.hxx')
-rw-r--r-- | sw/source/core/inc/tabfrm.hxx | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/sw/source/core/inc/tabfrm.hxx b/sw/source/core/inc/tabfrm.hxx index 88bd6a82b0fb..d320e96c7623 100644 --- a/sw/source/core/inc/tabfrm.hxx +++ b/sw/source/core/inc/tabfrm.hxx @@ -19,6 +19,8 @@ #ifndef INCLUDED_SW_SOURCE_CORE_INC_TABFRM_HXX #define INCLUDED_SW_SOURCE_CORE_INC_TABFRM_HXX +#include <swdllapi.h> + #include "layfrm.hxx" #include "flowfrm.hxx" @@ -26,8 +28,24 @@ class SwTable; class SwBorderAttrs; class SwAttrSetChg; +enum class SwTabFrameInvFlags : sal_uInt8 +{ + NONE = 0x00, + InvalidatePrt = 0x02, + InvalidateIndNextPrt = 0x04, + InvalidatePrevPrt = 0x08, + SetIndNextCompletePaint = 0x10, + InvalidateBrowseWidth = 0x20, + InvalidatePos = 0x40, + InvalidateNextPos = 0x80, +}; + +namespace o3tl { + template<> struct typed_flags<SwTabFrameInvFlags> : is_typed_flags<SwTabFrameInvFlags, 0xfe> {}; +} + /// SwTabFrame is one table in the document layout, containing rows (which contain cells). -class SwTabFrame final: public SwLayoutFrame, public SwFlowFrame +class SAL_DLLPUBLIC_RTTI SwTabFrame final: public SwLayoutFrame, public SwFlowFrame { friend void CalcContent( SwLayoutFrame *pLay, bool bNoColl ); @@ -43,6 +61,7 @@ class SwTabFrame final: public SwLayoutFrame, public SwFlowFrame bool m_bCalcLowers :1; /// For stability of the content in MakeAll bool m_bLowersFormatted :1; /// Communication between MakeAll and Layact bool m_bLockBackMove :1; /// The Master took care of the BackMove test + bool m_bWantBackMove :1; /// Table wants to move back but was locked bool m_bResizeHTMLTable :1; /// Call the Resize of the HTMLTableLayout in the MakeAll /// This is an optimization, so that we don't have to call /// it in ContentFrame::Grow; there it might be called for @@ -84,21 +103,21 @@ class SwTabFrame final: public SwLayoutFrame, public SwFlowFrame bool m_bInRecalcLowerRow : 1; - bool m_bSplitRowDisabled : 1; // loop control - /** * Split() splits the Frame at the specified position: a Follow is * created and constructed and inserted directly after this. * Join() gets the Follow's content and destroys it. */ - bool Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep ); + bool Split(const SwTwips nCutPos, bool bTryToSplit, bool bTableRowKeep, bool & rIsFootnoteGrowth); void Join(); void UpdateAttr_( const SfxPoolItem*, - const SfxPoolItem*, sal_uInt8 &, + const SfxPoolItem*, SwTabFrameInvFlags &, SwAttrSetChg *pa = nullptr, SwAttrSetChg *pb = nullptr ); + void Invalidate(SwTabFrameInvFlags); + void HandleTableHeadlineChange(); virtual bool ShouldBwdMoved( SwLayoutFrame *pNewUpper, bool &rReformat ) override; @@ -110,6 +129,7 @@ class SwTabFrame final: public SwLayoutFrame, public SwFlowFrame virtual void SwClientNotify(const SwModify&, const SfxHint&) override; // only changes the Framesize, not the PrtArea size virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) override; + virtual const SwTabFrame* DynCastTabFrame() const override { return this; } public: SwTabFrame( SwTable &, SwFrame* ); // calling RegistFlys always after creation _and_pasting! @@ -124,9 +144,7 @@ public: inline SwTabFrame *GetFollow(); SwTabFrame* FindMaster( bool bFirstMaster = false ) const; - virtual bool GetInfo( SfxPoolItem &rHint ) const override; - virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const&, - SwPrintData const*const pPrintData = nullptr ) const override; + virtual void PaintSwFrame( vcl::RenderContext& rRenderContext, SwRect const& ) const override; virtual void CheckDirection( bool bVert ) override; virtual void Cut() override; @@ -176,14 +194,6 @@ public: { m_bInRecalcLowerRow = bNew; } - bool IsSplitRowDisabled() const - { - return m_bSplitRowDisabled; - } - void SetSplitRowDisabled() - { - m_bSplitRowDisabled = true; - } // #i26945# bool IsConsiderObjsForMinCellHeight() const @@ -212,7 +222,8 @@ public: bool CalcFlyOffsets( SwTwips& rUpper, tools::Long& rLeftOffset, - tools::Long& rRightOffset ) const; + tools::Long& rRightOffset, + SwTwips * pSpaceBelowBottom) const; SwTwips CalcHeightOfFirstContentLine() const; @@ -226,7 +237,7 @@ public: sal_uInt16 GetBottomLineSize() const; - virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override; + void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override; }; inline const SwFrame *SwTabFrame::FindLastContentOrTable() const |