[Libreoffice-commits] .: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Nov 27 02:03:57 PST 2012
sw/source/ui/uiview/formatclipboard.cxx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit df25641bc1f38d2c9228cea42318a58c4dc2ead5
Author: Maxime de Roucy <mderoucy at linagora.com>
Date: Fri Nov 23 14:40:27 2012 +0100
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
diff --git a/sw/source/ui/uiview/formatclipboard.cxx b/sw/source/ui/uiview/formatclipboard.cxx
index f907754..e56a93d 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
More information about the Libreoffice-commits
mailing list