diff options
Diffstat (limited to 'sw/source/ui/uiview/formatclipboard.cxx')
-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 |