diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-12-15 22:01:09 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-12-15 22:19:19 +0100 |
commit | a1718045bd6218e07caebda7c4cacdcb853eabd3 (patch) | |
tree | 7ffd39093d13c45260930e83874e4d305e9552db | |
parent | 0f78ae1ca33f83737553ad204c869a63498b7d2d (diff) |
fdo#74981: sw: fix input field handling when splitting paragraphs
The SwInputFld is copied because it doesn't have HasDummyChar() set
although it has 2 dummy characters; TODO why is that...
Change-Id: Iee91c1d0cf7a7a928e7383c1839f8192e8d4d5b0
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 20fc6697abdf..dfc0536a3890 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1575,11 +1575,12 @@ void SwTxtNode::CopyAttr( SwTxtNode *pDest, const sal_Int32 nTxtStartIdx, const sal_Int32 *const pEndIdx = pHt->GetEnd(); if ( pEndIdx && !pHt->HasDummyChar() ) { - if ( ( *pEndIdx > nTxtStartIdx - || ( *pEndIdx == nTxtStartIdx - && nAttrStartIdx == nTxtStartIdx ) ) ) + sal_uInt16 const nWhich = pHt->Which(); + if (RES_TXTATR_INPUTFIELD != nWhich // fdo#74981 skip fields + && ( *pEndIdx > nTxtStartIdx + || (*pEndIdx == nTxtStartIdx + && nAttrStartIdx == nTxtStartIdx))) { - sal_uInt16 const nWhich = pHt->Which(); if ( RES_TXTATR_REFMARK != nWhich ) { // attribute in the area => copy |