diff options
author | Maxime de Roucy <mderoucy@linagora.com> | 2012-11-23 14:40:27 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-11-27 11:00:39 +0100 |
commit | df25641bc1f38d2c9228cea42318a58c4dc2ead5 (patch) | |
tree | ee2595880b8e18ec293c91988074d4384b276ad7 /sw/source/ui/uiview | |
parent | cc360f0a483e7c68ece7a30424f204d660d74b1c (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
Diffstat (limited to 'sw/source/ui/uiview')
-rw-r--r-- | sw/source/ui/uiview/formatclipboard.cxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx index f9077547aa44..e56a93d60cc5 100644 --- a/sw/source/ui/uiview/formatclipboard.cxx +++ b/sw/source/ui/uiview/formatclipboard.cxx @@ -550,7 +550,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 |