diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-09-13 17:26:19 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-09-13 19:36:43 +0200 |
commit | 0a398f5af0c03c7912c32576f51824d6fcc3a862 (patch) | |
tree | 15a81177f98f4cf888c91a083a28324660ff392c /sw | |
parent | 88f7ac5ccd358069e356c544888386b745c82732 (diff) |
sw: move frame id SwFrame to SwFrameAreaDefinition
Otherwise it's not easy to see which frame position was invalidated in
SwFrameAreaDefinition::setFrameAreaPositionValid() in a SAL_DEBUG()
statement.
Change-Id: I5771a81b98524bbce6557653a1a366e7a91c583e
Reviewed-on: https://gerrit.libreoffice.org/60443
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/inc/frame.hxx | 16 | ||||
-rw-r--r-- | sw/source/core/layout/newfrm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/wsfrm.cxx | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index e761e259b326..268e74e6d379 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -142,6 +142,11 @@ private: bool mbFrameAreaSizeValid : 1; bool mbFramePrintAreaValid : 1; + // #i65250# + // frame ID is now in general available - used for layout loop control + static sal_uInt32 mnLastFrameId; + const sal_uInt32 mnFrameId; + protected: // write access to mb*Valid flags void setFrameAreaPositionValid(bool bNew); @@ -160,6 +165,9 @@ public: // syntactic sugar: test whole FrameAreaDefinition bool isFrameAreaDefinitionValid() const { return isFrameAreaPositionValid() && isFrameAreaSizeValid() && isFramePrintAreaValid(); } + // #i65250# + sal_uInt32 GetFrameId() const { return mnFrameId; } + // read accesses to FrameArea definitions - only const access allowed. // Do *not* const_cast results, it is necessary to track changes. use // the below offered WriteAccess helper classes instead @@ -305,11 +313,6 @@ class SW_DLLPUBLIC SwFrame : public SwFrameAreaDefinition, public SwClient, publ // cache for (border) attributes static SwCache *mpCache; - // #i65250# - // frame ID is now in general available - used for layout loop control - static sal_uInt32 mnLastFrameId; - const sal_uInt32 mnFrameId; - SwRootFrame *mpRoot; SwLayoutFrame *mpUpper; SwFrame *mpNext; @@ -880,9 +883,6 @@ public: bool IsNeighbourFrame() const { return bool(GetType() & FRM_NEIGHBOUR); } - // #i65250# - sal_uInt32 GetFrameId() const { return mnFrameId; } - // NEW TABLES // Some functions for covered/covering table cells. This way unnecessary // includes can be avoided diff --git a/sw/source/core/layout/newfrm.cxx b/sw/source/core/layout/newfrm.cxx index 203300c28632..02502e82eff1 100644 --- a/sw/source/core/layout/newfrm.cxx +++ b/sw/source/core/layout/newfrm.cxx @@ -228,7 +228,7 @@ SwRectFn fnRectVert = &aVertical; SwRectFn fnRectVertL2R = &aVerticalLeftToRight; // #i65250# -sal_uInt32 SwFrame::mnLastFrameId=0; +sal_uInt32 SwFrameAreaDefinition::mnLastFrameId=0; void FrameInit() diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx index 42b6fb90d0cd..e1b388914bc9 100644 --- a/sw/source/core/layout/wsfrm.cxx +++ b/sw/source/core/layout/wsfrm.cxx @@ -61,7 +61,8 @@ SwFrameAreaDefinition::SwFrameAreaDefinition() maFramePrintArea(), mbFrameAreaPositionValid(false), mbFrameAreaSizeValid(false), - mbFramePrintAreaValid(false) + mbFramePrintAreaValid(false), + mnFrameId(SwFrameAreaDefinition::mnLastFrameId++) { } @@ -282,7 +283,6 @@ SwFrame::SwFrame( SwModify *pMod, SwFrame* pSib ) : SwFrameAreaDefinition(), SwClient( pMod ), SfxBroadcaster(), - mnFrameId( SwFrame::mnLastFrameId++ ), mpRoot( pSib ? pSib->getRootFrame() : nullptr ), mpUpper(nullptr), mpNext(nullptr), |