https://bugs.documentfoundation.org/show_bug.cgi?id=142857

--- Comment #12 from Julien Nabet <serval2...@yahoo.fr> ---
Here's the code for Writer:
   4957         if( pFormatClipboard )//apply format paintbrush
   4958         {
   4959             //get some parameters
   4960             SwWrtShell& rWrtShell = m_rView.GetWrtShell();
   4961             SfxStyleSheetBasePool* pPool=nullptr;
   4962             bool bNoCharacterFormats = false;
   4963             bool bNoParagraphFormats = true;
   4964             {
   4965                 SwDocShell* pDocSh = m_rView.GetDocShell();
   4966                 if(pDocSh)
   4967                     pPool = pDocSh->GetStyleSheetPool();
   4968                 if( (rMEvt.GetModifier()&KEY_MOD1) &&
(rMEvt.GetModifier()&KEY_SHIFT) )
   4969                 {
   4970                     bNoCharacterFormats = true;
   4971                     bNoParagraphFormats = false;
   4972                 }
   4973                 else if( rMEvt.GetModifier() & KEY_MOD1 )
   4974                     bNoParagraphFormats = false;
   4975             }
   4976             //execute paste
   4977             pFormatClipboard->Paste( rWrtShell, pPool,
bNoCharacterFormats, bNoParagraphFormats );

(see
https://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/edtwin.cxx?r=1f820cd3#4957)

So in Writer, it seems by default behavior is not to copy paragraph format.
It copies the paragraph format only when using Ctrl.

According to the code, if we use Ctrl+Shift, it should copy only paragraph
format and not character format but I gave a try and either I missed something
or it doesn't work.

Now I must dig into SwFormatClipboard::Paste (see
https://opengrok.libreoffice.org/xref/core/sw/source/uibase/uiview/formatclipboard.cxx?r=e6de84d4#437)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to