tdf#105625 related: don't duplicate dummy character on copy
Change-Id: I5881887c7a0fd0c9ccd954a36482a3ada5103098 Reviewed-on: https://gerrit.libreoffice.org/34025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This commit is contained in:
parent
36bd85083d
commit
d4036d3a89
@ -266,6 +266,15 @@ namespace
|
||||
lcl_SetCpyPos(pMark->GetOtherMarkPos(), rStt, *pCpyStt, *aTmpPam.GetMark(), nDelCount);
|
||||
}
|
||||
|
||||
const IDocumentMarkAccess::MarkType aMarkType = IDocumentMarkAccess::GetType(*pMark);
|
||||
if (aMarkType == IDocumentMarkAccess::MarkType::CHECKBOX_FIELDMARK)
|
||||
{
|
||||
// Node's CopyText() copies also dummy characters, which need to be removed
|
||||
// (they will be added later in MarkBase::InitDoc inside IDocumentMarkAccess::makeMark)
|
||||
// CHECKBOX_FIELDMARK doesn't contain any other data in its range, so just clear it
|
||||
pDestDoc->getIDocumentContentOperations().DeleteRange(aTmpPam);
|
||||
}
|
||||
|
||||
::sw::mark::IMark* const pNewMark = pDestDoc->getIDocumentMarkAccess()->makeMark(
|
||||
aTmpPam,
|
||||
pMark->GetName(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user