diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2021-01-13 11:03:17 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-01-15 11:11:47 +0100 |
commit | cd1c9f5167e797807d6726219f06190657f58372 (patch) | |
tree | 08a6738c5972b1004fb92720b0f375a1af72f685 /sw/inc | |
parent | 0665ec46aa099e556b7d1fc19f60efc90747e798 (diff) |
tdf#135014 sw: fix crash exporting numbering to DOCX
It can happen that the default SwNumRule of a SwList isn't used by
anything directly, but there are other SwNumRule associated with that
SwList and then the DOCX export needs to export it as an abstract
numbering definition.
(regression from 632ee9aae6d5f3cf08b6d6b2789310c20db713b7)
Change-Id: I6b1851980464aaa95bf731a60b7d11ab91cec7b6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109303
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/SwNumberTree.hxx | 14 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 2 | ||||
-rw-r--r-- | sw/inc/list.hxx | 2 |
3 files changed, 10 insertions, 8 deletions
diff --git a/sw/inc/SwNumberTree.hxx b/sw/inc/SwNumberTree.hxx index b4625ab80138..ad45fae21910 100644 --- a/sw/inc/SwNumberTree.hxx +++ b/sw/inc/SwNumberTree.hxx @@ -327,6 +327,13 @@ public: void IsSane(bool bRecursive) const; #endif // DBG_UTIL + /** + Returns how many children this node has got. + + @return number of children + */ + tSwNumberTreeChildren::size_type GetChildCount() const; + protected: /** the children */ tSwNumberTreeChildren mChildren; @@ -348,13 +355,6 @@ protected: */ virtual bool IsNotificationEnabled() const = 0; - /** - Returns how many children this node has got. - - @return number of children - */ - tSwNumberTreeChildren::size_type GetChildCount() const; - // #i64010# - made pure virtual virtual bool HasCountedChildren() const = 0; diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 3183b97f125f..987f660960c2 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -855,7 +855,7 @@ public: bool IsUsed( const sw::BroadcastingModify& ) const; /// Query if table style is used. bool IsUsed( const SwTableAutoFormat& ) const; - static bool IsUsed( const SwNumRule& ); + bool IsUsed( const SwNumRule& ); // Set name of newly loaded document template. size_t SetDocPattern(const OUString& rPatternName); diff --git a/sw/inc/list.hxx b/sw/inc/list.hxx index d8b3e16943ea..64d62faa9c93 100644 --- a/sw/inc/list.hxx +++ b/sw/inc/list.hxx @@ -58,6 +58,8 @@ class SwList bool IsListLevelMarked( const int nListLevel ) const; + bool HasNodes() const; + private: SwList( const SwList& ) = delete; SwList& operator=( const SwList& ) = delete; |