Hello, Here is a patch that should fix bug 53508. It apply the paragraph automatic formatting attributs to all the nodes in the selection (SwPaM) instead of just the last node. Sorry to take so much time to make this patch… I don't have much time to code on LO. But each time I do it's a real pleasure :-) Regards -- Maxime de Roucy Groupe LINAGORA - OSSA ✉ : 80 rue Roque de Fillol 92800 PUTEAUX ☎ : 01.46.96.63.44 📱 : 06.42.00.49.09
From 53bba85c0bba1de7acea5a032fb075c0cf3d9ae2 Mon Sep 17 00:00:00 2001 From: Maxime de Roucy <mderoucy@linagora.com> Date: Fri, 23 Nov 2012 14:40:27 +0100 Subject: [PATCH] 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 --- sw/source/ui/uiview/formatclipboard.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 -- 1.8.0
Attachment:
signature.asc
Description: This is a digitally signed message part