summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-11-24 15:33:44 +0100
committerMichael Stahl <michael.stahl@cib.de>2020-11-24 19:54:36 +0100
commitecc3c621fe5a7e962f0e40cb3709ad5772a5d744 (patch)
treea9bfc6c067c6f249262ea695e02b2e850c59b50f /sw/inc
parenta4565b9361636c3f9b01755b2f467056d33e4e30 (diff)
sw: fix SwXTextRange::createEnumeration() inside table cell
This would set CursorType::SelectionInTable but leave m_pOwnTable and m_pOwnStartNode uninitialised, causing sw/source/core/unocore/unoobj2.cxx:399: SwXParagraphEnumeration: table type but no start node or table and then the enumeration would return the table it's in as the first element, which is quite annoying. Refactor the creation of SwXParagraphEnumeration to prevent this. Change-Id: I4e9e3456bdf66b9822d19ad985a20b094e6bbba4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106532 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/unoparagraph.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/inc/unoparagraph.hxx b/sw/inc/unoparagraph.hxx
index 64a8defd83fc..eb89ce47249e 100644
--- a/sw/inc/unoparagraph.hxx
+++ b/sw/inc/unoparagraph.hxx
@@ -43,7 +43,7 @@ class SwPaM;
class SwUnoCursor;
class SwStartNode;
class SwTextNode;
-class SwTable;
+class SwTableBox;
class SwXText;
typedef ::cppu::ImplInheritanceHelper
@@ -216,8 +216,8 @@ struct SwXParagraphEnumeration
css::uno::Reference< css::text::XText > const & xParent,
const std::shared_ptr<SwUnoCursor>& pCursor,
const CursorType eType,
- SwStartNode const*const pStartNode = nullptr,
- SwTable const*const pTable = nullptr);
+ /// only for CursorType::TableText
+ SwTableBox const*const pTableBox = nullptr);
};
#endif // INCLUDED_SW_INC_UNOPARAGRAPH_HXX