diff options
author | Maxime de Roucy <mderoucy@linagora.com> | 2012-11-23 14:40:27 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-12-21 16:29:48 +0100 |
commit | 2e6ce1e89374582413daad2fd82006575f49865c (patch) | |
tree | 8c4a7ba538a1b570d310602823b3f6d99858252d | |
parent | ca3b32f2384cbcfb59dc6c7b4243491a38880b1e (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>
-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 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 |