https://bugs.documentfoundation.org/show_bug.cgi?id=142857
Julien Nabet <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #6 from Julien Nabet <[email protected]> --- On pc Debian x86-64 with master sources updated today, I could reproduce this. You can avoid cloning paragraph attributes by keeping Ctrl pressed. @devs or @someone who knows a bit of coding Investigating a bit, I found this bt: #0 CreatePaintSet(WhichRangesContainer const&, SfxItemPool&, SfxItemSet const&, SfxItemSet const&, bool, bool) (pRanges=..., rPool=..., rSourceSet=SfxItemSet of pool 0x482a5d0 with parent 0x0 and Which ranges: [(1068, 1093), (4008, 4027), (4028, 4060)] = {...}, rTargetSet=SfxItemSet of pool 0x482a5d0 with parent 0x0 and Which ranges: [(4008, 4064)] = {...}, bNoCharacterFormats=false, bNoParagraphFormats=false) at svx/source/svdraw/svdedxv.cxx:2710 #1 0x00007fa46ebc3b18 in SdrObjEditView::ApplyFormatPaintBrush(SfxItemSet&, bool, bool) (this= 0x4be1a70, rFormatSet=SfxItemSet of pool 0x482a5d0 with parent 0x0 and Which ranges: [(1068, 1093), (4008, 4027), (4028, 4060)] = {...}, bNoCharacterFormats=false, bNoParagraphFormats=false) at svx/source/svdraw/svdedxv.cxx:2855 #2 0x00007fa45a2a9842 in sd::FuFormatPaintBrush::Paste(bool, bool) (this=0xaa1d900, bNoCharacterFormats=false, bNoParagraphFormats=false) at sd/source/ui/func/fuformatpaintbrush.cxx:253 #3 0x00007fa45a2a9512 in sd::FuFormatPaintBrush::MouseButtonUp(MouseEvent const&) (this=0xaa1d900, rMEvt=...) at sd/source/ui/func/fuformatpaintbrush.cxx:181 "CreatePaintSet" is given the ranges which includes "EE_PARA_START, EE_PARA_END" (see https://opengrok.libreoffice.org/xref/core/svx/source/svdraw/svdedxv.cxx?r=d2dfc0c4#2652) but has also a param called "bNoParagraphFormats". If at true, this parameter means "don't take into account paragraph format". But here, this parameter is false. Now when taking a look at sd::FuFormatPaintBrush::MouseButtonUp, we see: 168 bool bNoCharacterFormats = false; 169 bool bNoParagraphFormats = false; 170 { 171 if( (rMEvt.GetModifier()&KEY_MOD1) && (rMEvt.GetModifier()&KEY_SHIFT) ) 172 bNoCharacterFormats = true; 173 else if( rMEvt.GetModifier() & KEY_MOD1 ) 174 bNoParagraphFormats = true; 175 } so it seems the by default behavior is to copy the whole thing and if we want less, we must use modifiers (Ctrl/Shift). Taking a look at git history shows it's like this at least since 2004. commit 5afd381fbaa82aa91feea74c3ab35a5849005e56 Author: Kurt Zenker <[email protected]> Date: Mon Aug 2 09:09:13 2004 +0000 INTEGRATION: CWS formatpaintbrush02 (1.1.2); FILE ADDED 2004/07/20 13:24:51 iha 1.1.2.2: #i31746# format paintbrush - differentiate types of selected objects 2004/07/16 22:44:10 iha 1.1.2.1: #i20119# format paintbrush -- You are receiving this mail because: You are the assignee for the bug.
