diff options
author | Justin Luth <justin.luth@collabora.com> | 2018-10-09 07:30:48 +0300 |
---|---|---|
committer | Justin Luth <justin_luth@sil.org> | 2018-10-11 05:53:44 +0200 |
commit | 4af4a473daf8b2530e6b6f5e49c7f4e3413f8378 (patch) | |
tree | cc9a50d8c3de2be8944aad0da9a3b54ea3d06074 /sw/source | |
parent | c8481c8a43ce2544275b2d70ef29a8b0cb157732 (diff) |
tdf#120225 ww8import: keep textform name
A bookmark cross-reference was trying to access the textform
field by name, but an autogenerated __Fieldmark__ name obviously
wasn't matching.
Change-Id: I1018fecf44fda5d947b214c599f1a405f311e2ee
Reviewed-on: https://gerrit.libreoffice.org/61565
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/crsr/bookmrk.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/doc/docbm.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/inc/bookmrk.hxx | 2 |
3 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx index 827ac187185c..1fa3e307aca5 100644 --- a/sw/source/core/crsr/bookmrk.cxx +++ b/sw/source/core/crsr/bookmrk.cxx @@ -407,9 +407,12 @@ namespace sw { namespace mark xmlTextWriterEndElement(pWriter); } - TextFieldmark::TextFieldmark(const SwPaM& rPaM) + TextFieldmark::TextFieldmark(const SwPaM& rPaM, const OUString& rName) : Fieldmark(rPaM) - { } + { + if ( !rName.isEmpty() ) + m_aName = rName; + } void TextFieldmark::InitDoc(SwDoc* const io_pDoc, sw::mark::InsertMode const eMode) { diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx index 5fdaa58590e1..aaa9731bba31 100644 --- a/sw/source/core/doc/docbm.cxx +++ b/sw/source/core/doc/docbm.cxx @@ -410,7 +410,7 @@ namespace sw { namespace mark switch(eType) { case IDocumentMarkAccess::MarkType::TEXT_FIELDMARK: - pMark = std::shared_ptr<IMark>(new TextFieldmark(rPaM)); + pMark = std::shared_ptr<IMark>(new TextFieldmark(rPaM, rName)); break; case IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK: pMark = std::shared_ptr<IMark>(new CheckboxFieldmark(rPaM)); diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx index 001f8561b012..d5f0495ef09e 100644 --- a/sw/source/core/inc/bookmrk.hxx +++ b/sw/source/core/inc/bookmrk.hxx @@ -240,7 +240,7 @@ namespace sw { : public Fieldmark { public: - TextFieldmark(const SwPaM& rPaM); + TextFieldmark(const SwPaM& rPaM, const OUString& rName); virtual void InitDoc(SwDoc* const io_pDoc, sw::mark::InsertMode eMode) override; virtual void ReleaseDoc(SwDoc* const pDoc) override; }; |