summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorAttila Szűcs <szucs.attila3@nisz.hu>2021-07-27 11:45:58 +0200
committerLászló Németh <nemeth@numbertext.org>2021-08-25 13:45:23 +0200
commitc1ad429d925855c1baacbdeca1ef42f4486eb9c2 (patch)
tree99f1acfa3d30cb57f430ee55f40e660dbcbb3c7b /sw/inc
parenta6ec99fd13ac5b607299252588887e1e90453c9c (diff)
tdf#143384 DOCX import: fix SAXException at header with table
Regression from commit d656191ec308d4280b93c7169372e543a255d108 "tdf#119952 DOCX import: fix negative page margins". Add SwXHeadFootText::CreateTextCursor(bool bIgnoreTables = false) (modeled after SwXBodyText::CreateTextCursor) to create text cursor for copying the header/footer also started with table during fly frame creation in convertoToTextFrame(). Note: add hidden property PROP_CURSOR_NOT_IGNORE_TABLES_IN_HF to use the new feature in domainmapper (followed commit af4e5ee0f93c1ff442d08caed5c875f2b2c1fd43 "tdf#97128 DOCX import: fix frame direction"). Co-authored-by: Tibor Nagy (NISZ) Change-Id: I96e2cf2dddcecd146c53c12d7fdb44fc4d90fa0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119549 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/unotextbodyhf.hxx2
-rw-r--r--sw/inc/unotextrange.hxx3
2 files changed, 4 insertions, 1 deletions
diff --git a/sw/inc/unotextbodyhf.hxx b/sw/inc/unotextbodyhf.hxx
index fbccc982ef04..99887c6beb5c 100644
--- a/sw/inc/unotextbodyhf.hxx
+++ b/sw/inc/unotextbodyhf.hxx
@@ -115,6 +115,8 @@ public:
static css::uno::Reference< css::text::XText >
CreateXHeadFootText(SwFrameFormat & rHeadFootFormat, const bool bIsHeader);
+ css::uno::Reference<css::text::XTextCursor> CreateTextCursor(const bool bIgnoreTables = false);
+
// XInterface
virtual css::uno::Any SAL_CALL queryInterface(
const css::uno::Type& rType) override;
diff --git a/sw/inc/unotextrange.hxx b/sw/inc/unotextrange.hxx
index f3ed06fb4a06..4d8ed2df2c06 100644
--- a/sw/inc/unotextrange.hxx
+++ b/sw/inc/unotextrange.hxx
@@ -57,7 +57,8 @@ namespace sw {
enum class TextRangeMode {
RequireTextNode,
- AllowNonTextNode
+ AllowNonTextNode,
+ AllowTableNode
};
void DeepCopyPaM(SwPaM const & rSource, SwPaM & rTarget);