sw/source/core/inc/unoport.hxx | 1 + sw/source/core/unocore/unoport.cxx | 3 +++ sw/source/core/unocore/unoportenum.cxx | 9 ++++++++- 3 files changed, 12 insertions(+), 1 deletion(-)
New commits: commit 314958decf4491ca7b11c2ef014d29ea2ae14d69 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Fri Sep 27 18:12:58 2019 +0200 Commit: Michael Stahl <michael.st...@cib.de> CommitDate: Fri Oct 4 12:13:08 2019 +0200 sw: SwXTextPortion "TextFieldSeparator" Change-Id: I60a5036168287b1972c18e74431b7a6101d85304 Reviewed-on: https://gerrit.libreoffice.org/80052 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@cib.de> diff --git a/sw/source/core/inc/unoport.hxx b/sw/source/core/inc/unoport.hxx index 5072f33c4ea7..7817d7d16d36 100644 --- a/sw/source/core/inc/unoport.hxx +++ b/sw/source/core/inc/unoport.hxx @@ -70,6 +70,7 @@ enum SwTextPortionType PORTION_SOFT_PAGEBREAK, PORTION_META, PORTION_FIELD_START, + PORTION_FIELD_SEP, PORTION_FIELD_END, PORTION_FIELD_START_END, PORTION_ANNOTATION, diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx index 319f1c51dbd4..d85eaaa420b8 100644 --- a/sw/source/core/unocore/unoport.cxx +++ b/sw/source/core/unocore/unoport.cxx @@ -244,6 +244,7 @@ void SwXTextPortion::GetPropertyValue( case PORTION_SOFT_PAGEBREAK:pRet = "SoftPageBreak";break; case PORTION_META: pRet = UNO_NAME_META; break; case PORTION_FIELD_START:pRet = "TextFieldStart";break; + case PORTION_FIELD_SEP: pRet = "TextFieldSeparator";break; case PORTION_FIELD_END:pRet = "TextFieldEnd";break; case PORTION_FIELD_START_END:pRet = "TextFieldStartEnd";break; case PORTION_ANNOTATION: @@ -297,6 +298,7 @@ void SwXTextPortion::GetPropertyValue( case PORTION_RUBY_START: case PORTION_RUBY_END: case PORTION_FIELD_START: + case PORTION_FIELD_SEP: case PORTION_FIELD_END: rVal <<= m_bIsCollapsed; break; @@ -323,6 +325,7 @@ void SwXTextPortion::GetPropertyValue( case PORTION_BOOKMARK_END: case PORTION_REDLINE_END: case PORTION_RUBY_END: + case PORTION_FIELD_SEP: case PORTION_FIELD_END: bStart = false; break; diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx index f7ad846313d4..42d4658138a1 100644 --- a/sw/source/core/unocore/unoportenum.cxx +++ b/sw/source/core/unocore/unoportenum.cxx @@ -396,7 +396,7 @@ lcl_FillFieldMarkArray(std::deque<sal_Int32> & rFieldMarks, SwUnoCursor const & if (!pTextNode) return; const sal_Unicode fld[] = { - CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FIELDEND, CH_TXT_ATR_FORMELEMENT, 0 }; + CH_TXT_ATR_FIELDSTART, CH_TXT_ATR_FIELDSEP, CH_TXT_ATR_FIELDEND, CH_TXT_ATR_FORMELEMENT, 0 }; sal_Int32 pos = std::max(static_cast<sal_Int32>(0), i_nStartPos); while ((pos = ::comphelper::string::indexOfAny(pTextNode->GetText(), fld, pos)) != -1) { @@ -443,6 +443,13 @@ lcl_ExportFieldMark( SwXFieldmark::CreateXFieldmark(*pDoc, pFieldmark)); } } + else if (CH_TXT_ATR_FIELDSEP == Char) + { + // TODO how to get the field? + SwXTextPortion* pPortion = new SwXTextPortion( + pUnoCursor, i_xParentText, PORTION_FIELD_SEP); + xRef = pPortion; + } else if (CH_TXT_ATR_FIELDEND == Char) { ::sw::mark::IFieldmark* pFieldmark = nullptr; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits