Kaydet (Commit) fce1bbdb authored tarafından Michael Stahl's avatar Michael Stahl

sw_redlinehide_3: adapt SwContentTree/SwOutlineContent to gaps

The SwOutlineContent::GetPos() returns the outline position in the
document model / IDocumentOutlineNodesAccess; rename it to make that
more clear.

Also it's already possible to have gaps in the list entries by setting
the outline level so that inner levels are filtered; the
SwContentTree::ExecCommand() doesn't appear to handle this properly,
it needs some tweaks to skip over the outline nodes that don't have list
entries.

The GetYPos() does not contain the outline index, it contains the list
entry index.

Change-Id: Ifae0b9648ce61bb9aa470172ef989b2532370138
üst 0067dec2
...@@ -49,7 +49,7 @@ class SwOutlineContent : public SwContent ...@@ -49,7 +49,7 @@ class SwOutlineContent : public SwContent
SwContent(pCnt, rName, nYPos), SwContent(pCnt, rName, nYPos),
nOutlinePos(nArrPos), nOutlineLevel(nLevel), bIsMoveable(bMove) {} nOutlinePos(nArrPos), nOutlineLevel(nLevel), bIsMoveable(bMove) {}
sal_uInt16 GetPos() const {return nOutlinePos;} SwOutlineNodes::size_type GetOutlinePos() const {return nOutlinePos;}
sal_uInt8 GetOutlineLevel() const {return nOutlineLevel;} sal_uInt8 GetOutlineLevel() const {return nOutlineLevel;}
bool IsMoveable() const {return bIsMoveable;}; bool IsMoveable() const {return bIsMoveable;};
}; };
......
...@@ -72,10 +72,9 @@ class SwContent : public SwTypeNumber ...@@ -72,10 +72,9 @@ class SwContent : public SwTypeNumber
const SwContentType* pParent; const SwContentType* pParent;
OUString const sContentName; OUString const sContentName;
long const nYPosition; long const nYPosition;
// most subclasses appear to use this for a tools/gen.hxx-style // some subclasses appear to use this for a tools/gen.hxx-style
// geometric Y position, while SwOutlineContent wants to store a // geometric Y position, while e.g. SwOutlineContent wants to store
// SwOutlineNodes::size_type value (where all such values used in // the index in its subtree
// practice hopefully fit into 'long')
bool bInvisible; bool bInvisible;
public: public:
SwContent(const SwContentType* pCnt, const OUString& rName, long nYPos ); SwContent(const SwContentType* pCnt, const OUString& rName, long nYPos );
...@@ -96,8 +95,6 @@ public: ...@@ -96,8 +95,6 @@ public:
return ListBox::NaturalSortCompare(sContentName, rCont.sContentName) < 0; return ListBox::NaturalSortCompare(sContentName, rCont.sContentName) < 0;
} }
long GetYPos() const {return nYPosition;}
bool IsInvisible() const {return bInvisible;} bool IsInvisible() const {return bInvisible;}
void SetInvisible(){ bInvisible = true;} void SetInvisible(){ bInvisible = true;}
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment