summaryrefslogtreecommitdiff
path: root/sw/source/ui/uiview
diff options
context:
space:
mode:
authorMaxime de Roucy <mderoucy@linagora.com>2012-11-23 14:40:27 +0100
committerAndras Timar <atimar@suse.com>2013-01-13 21:59:53 +0100
commitdd66f048d73fa331376f22e25fed852e59eef01e (patch)
tree35295630b5d6f8fa2987ab452936ae591db8adce /sw/source/ui/uiview
parent3b863411f7ea3bb4885c3cc1fa86b12f9836178a (diff)
fix bug 53508
In the format paintbrush function : Apply the paragraph automatic attributes to all the nodes in the selection instead of just the last node. Change-Id: I655f00cbf44d3d80c19a7ef623bc1c7cb505ead9 Reviewed-on: https://gerrit.libreoffice.org/1180 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'sw/source/ui/uiview')
-rw-r--r--sw/source/ui/uiview/formatclipboard.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index 8b09cbab12bc..15e3cdf7a9b8 100644
--- a/sw/source/ui/uiview/formatclipboard.cxx
+++ b/sw/source/ui/uiview/formatclipboard.cxx
@@ -551,7 +551,15 @@ void SwFormatClipboard::Paste( SwWrtShell& rWrtShell, SfxStyleSheetBasePool* pPo
// it can't be a multiple selection
SwPaM* pCrsr = rWrtShell.GetCrsr();
- // apply the paragraph automatic attributes
+ // 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 );
// store the attributes in aItemVector in order not to apply them as