diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2022-09-27 16:32:51 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2022-09-27 21:18:19 +0200 |
commit | 70973680f05c587c866d2de2a16bff9ebf8007ca (patch) | |
tree | c390f387e3f26e377922b9992418d71d2f271486 /sw/source/filter | |
parent | 85d099bd3680d517f1a76faf3eb720a9cb8e140f (diff) |
sw: fix inserting fields between 2 adjacent input fields
Primarily this is achieved by using GetTextAttrMode PARENT in
SwCursorShell::CursorInsideInputField() and
SwCursorShell::PosInsideInputField().
But this requires some refactoring to make this parameter available.
Change-Id: I1a0ef4e3d93a6733d972544abfe07ddf929eb62c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140661
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/basflt/fltshell.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/filter/basflt/fltshell.cxx b/sw/source/filter/basflt/fltshell.cxx index 75ef5d5c36b4..fbfec5eaeccf 100644 --- a/sw/source/filter/basflt/fltshell.cxx +++ b/sw/source/filter/basflt/fltshell.cxx @@ -590,7 +590,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwTextNode const*const pTextNode( aRegion.End()->GetNode().GetTextNode()); SwTextField const*const pField = pTextNode ? pTextNode->GetFieldTextAttrAt( - aRegion.End()->GetContentIndex() - 1, true) : nullptr; + aRegion.End()->GetContentIndex() - 1, ::sw::GetTextAttrMode::Default) : nullptr; if (pField) { SwPostItField const*const pPostIt( diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 501d347dc932..16af1afc910a 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -1769,7 +1769,7 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, sal_In if (nLen != -1) { - SwTextAttr* pAttr = pNode->GetTextAttrAt(nPos, RES_TXTATR_CONTENTCONTROL, SwTextNode::DEFAULT); + SwTextAttr* pAttr = pNode->GetTextAttrAt(nPos, RES_TXTATR_CONTENTCONTROL, ::sw::GetTextAttrMode::Default); if (pAttr && pAttr->GetStart() == nPos) { auto pTextContentControl = static_txtattr_cast<SwTextContentControl*>(pAttr); @@ -1799,7 +1799,7 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, sal_Int32 nPos, sal_In if (nLen != -1) { sal_Int32 nEnd = nPos + nLen; - SwTextAttr* pAttr = pNode->GetTextAttrAt(nPos, RES_TXTATR_CONTENTCONTROL, SwTextNode::DEFAULT); + SwTextAttr* pAttr = pNode->GetTextAttrAt(nPos, RES_TXTATR_CONTENTCONTROL, ::sw::GetTextAttrMode::Default); if (pAttr && *pAttr->GetEnd() == nEnd) { WriteContentControlEnd(); |