Kaydet (Commit) b1cd73d3 authored tarafından Miklos Vajna's avatar Miklos Vajna

bnc#828598 fdo#59643 SwFormatClipboard: fix undo of paragraph attributes

Paragraph attributes were set directly on the SwTxtNodes, instead of
going through SwWrtShell::SetAttr(), which handles undo/redo.

Regression from 357fac97.

Change-Id: I5dc86e20e3c006dab60a075355ce9ad1f1b67bb6
üst cd9a9c8f
...@@ -528,19 +528,8 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo ...@@ -528,19 +528,8 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
// remove attribute that were applied by named text and paragraph formatting // remove attribute that were applied by named text and paragraph formatting
lcl_RemoveEqualItems( *pTemplateItemSet, aItemVector ); lcl_RemoveEqualItems( *pTemplateItemSet, aItemVector );
// it can't be a multiple selection
SwPaM* pCrsr = rWrtShell.GetCrsr();
// apply the paragraph automatic attributes to all the nodes in the selection // apply the paragraph automatic attributes to all the nodes in the selection
for (SwNodeIndex pNodeIndexIterator = pCrsr->Start()->nNode, rWrtShell.SetAttr(*pTemplateItemSet);
pNodeIndexEnd = pCrsr->End()->nNode;
pNodeIndexIterator != pNodeIndexEnd;
++pNodeIndexIterator )
{
pNodeIndexIterator.GetNode().GetCntntNode()->SetAttr( *pTemplateItemSet );
}
// same as pCrsr->End()->nNode.GetNode().GetCntntNode()->SetAttr
pCrsr->GetCntntNode()->SetAttr( *pTemplateItemSet );
// store the attributes in aItemVector in order not to apply them as // store the attributes in aItemVector in order not to apply them as
// text automatic formating attributes later in the code // text automatic formating attributes later in the code
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment