In Words, if I format some text in a paragraph e.g. add bold, italics, coloured, underlined, etc, and then if I try to change the line-spacing, the text looses most of the formatting I have put in except for superscripts and subscripts. Reproducible: Always Steps to Reproduce: 1. Format some text with italics, underlined, bold, etc. 2. Select the paragraph with the mouse. 3. Goto Paragraph Format -> Indent/Spacing tab and change line spacing. Actual Results: Line spacing changes correctly but the other text formatting is lost. Expected Results: Line spacing changes correctly and text formatting should also be preserved.
The ParagraphFormattingCommand despite using the new visitor gets it wrong. Will have to investigate the cause more thoroughly
Ok so neither the input to the command nor the visitor's handling of fragments are deltas. It manifests itself into two destinct bugs. - The lack of input delta will force all blocks in selection to get the entire style - The lack of calculating fragment deltas, is what the bug reporter complained about I guess we need some sort of helper function that takes two formats and reduce the first to deltas based on the second. Lets call it reduceToDeltaTextFormat(format, baseFormat) The autostyle() method does more than that so it's not useful, but autostyle() can quite possibly use the new method
Fix will only be in version 3.0
Git commit 5b12c6efa4ea89f956c5da20984d6816f0e6a9e1 by C. Boemann. Committed on 26/03/2016 at 13:12. Pushed by boemann into branch 'master'. Make sure the direct formatting dialog doesn't overwrite blockcharformats and fragment formats with a complete new format, but rather just apply changes. M +0 -1 libs/text/KoTextEditor_format.cpp M +7 -5 libs/text/commands/ParagraphFormattingCommand.cpp M +3 -3 plugins/textshape/dialogs/CharacterGeneral.cpp M +1 -1 plugins/textshape/dialogs/CharacterGeneral.h M +71 -103 plugins/textshape/dialogs/CharacterHighlighting.cpp M +4 -9 plugins/textshape/dialogs/CharacterHighlighting.h M +1 -1 plugins/textshape/dialogs/FontDia.cpp M +1 -1 plugins/textshape/dialogs/ParagraphBulletsNumbers.cpp M +1 -1 plugins/textshape/dialogs/ParagraphBulletsNumbers.h M +1 -1 plugins/textshape/dialogs/ParagraphDecorations.cpp M +1 -1 plugins/textshape/dialogs/ParagraphDecorations.h M +5 -5 plugins/textshape/dialogs/ParagraphDropCaps.cpp M +1 -1 plugins/textshape/dialogs/ParagraphDropCaps.h M +7 -7 plugins/textshape/dialogs/ParagraphGeneral.cpp M +1 -1 plugins/textshape/dialogs/ParagraphGeneral.h M +7 -7 plugins/textshape/dialogs/ParagraphIndentSpacing.cpp M +1 -1 plugins/textshape/dialogs/ParagraphIndentSpacing.h M +6 -6 plugins/textshape/dialogs/ParagraphLayout.cpp M +1 -1 plugins/textshape/dialogs/ParagraphLayout.h M +1 -1 plugins/textshape/dialogs/ParagraphSettingsDialog.cpp M +4 -4 plugins/textshape/dialogs/StyleManager.cpp http://commits.kde.org/calligra/5b12c6efa4ea89f956c5da20984d6816f0e6a9e1