summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/number.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/number.cxx')
-rw-r--r--sw/source/core/doc/number.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx
index 1de08ae9f761..b812897a9ae1 100644
--- a/sw/source/core/doc/number.cxx
+++ b/sw/source/core/doc/number.cxx
@@ -1099,6 +1099,29 @@ void SwNumRule::SetGrabBagItem(const uno::Any& rVal)
mpGrabBagItem->PutValue(rVal, 0);
}
+bool SwNumRule::HasContinueList() const
+{
+ // In case all text nodes are after each other, then we won't have a later list that wants to
+ // continue us.
+ sal_uLong nIndex(0);
+ for (size_t i = 0; i < maTextNodeList.size(); ++i)
+ {
+ SwTextNode* pNode = maTextNodeList[i];
+ if (i > 0)
+ {
+ if (pNode->GetIndex() != nIndex + 1)
+ {
+ // May have a continue list.
+ return true;
+ }
+ }
+ nIndex = pNode->GetIndex();
+ }
+
+ // Definitely won't have a continue list.
+ return false;
+}
+
namespace numfunc
{
namespace {