summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-07-12 16:02:43 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-07-12 16:55:22 +0200
commitb1cd73d3e62c5192bc3d77f5ecd1036ff42bde61 (patch)
tree0e5e869e347f0316f5765112afa602a345ad276a
parentcd9a9c8fe95acc35ee0b44b887b825d06358e5b6 (diff)
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 357fac9713875302d30185feabaf5c165e040ca4. Change-Id: I5dc86e20e3c006dab60a075355ce9ad1f1b67bb6
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx13
1 files changed, 1 insertions, 12 deletions
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index 914aa696cec3..3cc007d906fe 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -528,19 +528,8 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
// remove attribute that were applied by named text and paragraph formatting
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
- for (SwNodeIndex pNodeIndexIterator = pCrsr->Start()->nNode,
- pNodeIndexEnd = pCrsr->End()->nNode;
- pNodeIndexIterator != pNodeIndexEnd;
- ++pNodeIndexIterator )
- {
- pNodeIndexIterator.GetNode().GetCntntNode()->SetAttr( *pTemplateItemSet );
- }
- // same as pCrsr->End()->nNode.GetNode().GetCntntNode()->SetAttr
- pCrsr->GetCntntNode()->SetAttr( *pTemplateItemSet );
+ rWrtShell.SetAttr(*pTemplateItemSet);
// store the attributes in aItemVector in order not to apply them as
// text automatic formating attributes later in the code