diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-10-08 18:37:35 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-10-08 21:22:34 +0200 |
commit | 91159b1c31a7fd474ba0b97828f593604790ce3c (patch) | |
tree | 5f389bd18b3b5a31b5e2adad5d16370ec694e4c5 /sw/source/core/txtnode | |
parent | 2541f60615ebbdebeab870625817a1f4d8ad1682 (diff) |
fdo#70201: sw: eliminate no-extent RSID-only AUTOFMT hints
These are already filtered out in SwpHints::TryInsertHint(), but they
can be produced by a SwTxtNode::Update() following some deletion like in
SwTxtNode::ReplaceText() (or maybe CutImpl() and RstAttr() too?).
So in order to prevent SwHistorySetTxt being created for these,
filter them out in SwpHints::MergePortions(), which has the advantage
that it's one location to change; probably filtering in Update() and
RstAttr() both would work too.
(regression from 6db39dbd7378351f6476f6db25eb7110c9cfb291)
Change-Id: I597a9ab290dcc3fb1b624dd2dca241c462acf256
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r-- | sw/source/core/txtnode/thints.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 82ccc7325c65..803831184ea3 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -2527,6 +2527,15 @@ bool SwpHints::MergePortions( SwTxtNode& rNode ) pHt->GetAutoFmt().GetStyleHandle()); if ((pSet->Count() == 1) && pSet->GetItem(RES_CHRATR_RSID, false)) { + // fdo#70201: eliminate no-extent RSID-only AUTOFMT + // could be produced by ReplaceText or (maybe?) RstAttr + if (*pHt->GetStart() == *pHt->GetEnd()) + { + SwpHintsArray::DeleteAtPos(i); // kill it without History! + SwTxtAttr::Destroy(pHt, rNode.GetDoc()->GetAttrPool()); + --i; + continue; + } // fdo#52028: this one has _only_ RSID => ignore it completely if (!pHt->IsFormatIgnoreStart() || !pHt->IsFormatIgnoreEnd()) { |