summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2018-10-09 07:30:48 +0300
committerAndras Timar <andras.timar@collabora.com>2018-10-11 10:39:23 +0200
commit5c57e18a775cf82714f7dfd385d970b7a5439c88 (patch)
tree4a186b182ac1037468359213021d31ecd7cbe456 /sw/source/core
parentd878b20f968a27a9643da629303bc6880ebfc2c9 (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> (cherry picked from commit 4af4a473daf8b2530e6b6f5e49c7f4e3413f8378)
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/crsr/bookmrk.cxx7
-rw-r--r--sw/source/core/doc/docbm.cxx2
-rw-r--r--sw/source/core/inc/bookmrk.hxx2
3 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 8ea7445ea676..630bfe9c11d1 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -406,9 +406,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 ba2279853128..c76fb55a6313 100644
--- a/sw/source/core/doc/docbm.cxx
+++ b/sw/source/core/doc/docbm.cxx
@@ -409,7 +409,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 76363043e505..6daa37d1d7e4 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -229,7 +229,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;
};