sw/source/core/doc/DocumentStylePoolManager.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-)
New commits: commit f528d18f99f5d45ccb4ac0beb12045e51fbea477 Author: Kira Tubo <[email protected]> AuthorDate: Thu Sep 19 15:44:55 2024 -0700 Commit: Heiko Tietze <[email protected]> CommitDate: Tue Sep 24 10:04:43 2024 +0200 Reinstate margin paddings on default Comment Style This partially reverts commit 9286ac87abe4eeaf878585bdc5bb4fee40f950cc Margin paddings should not have been removed due to request on tdf#159531 Margin paddings initially removed as part of tdf#161657 Change-Id: If840a3a57d1fbbcb894e192b98f05ccbe53e89be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173687 Tested-by: Jenkins Reviewed-by: Heiko Tietze <[email protected]> diff --git a/sw/source/core/doc/DocumentStylePoolManager.cxx b/sw/source/core/doc/DocumentStylePoolManager.cxx index 31ca9b0a27a7..22c85a8e7779 100644 --- a/sw/source/core/doc/DocumentStylePoolManager.cxx +++ b/sw/source/core/doc/DocumentStylePoolManager.cxx @@ -1015,17 +1015,22 @@ SwTextFormatColl* DocumentStylePoolManager::GetTextCollFromPool( sal_uInt16 nId, { SetAllScriptItem(aSet, SvxFontHeightItem(PT_10, 100, RES_CHRATR_FONTSIZE)); - // Left margin (i.e. Before text indent) - aSet.Put(SvxTextLeftMarginItem (0, RES_MARGIN_TEXTLEFT)); - - // Right margin (i.e. After text indent) - aSet.Put(SvxRightMarginItem(0, RES_MARGIN_RIGHT)); + // tdf#159531: Paddings added to ease readability on comments + // Left and Right margin (i.e. Before and After text indent) + auto const aIndent(o3tl::convert(0.1, o3tl::Length::cm, o3tl::Length::twip)); + SvxTextLeftMarginItem const leftMargin(aIndent, RES_MARGIN_TEXTLEFT); + SvxRightMarginItem const rightMargin(aIndent, RES_MARGIN_RIGHT); + aSet.Put(leftMargin); + aSet.Put(rightMargin); // First line indent aSet.Put(SvxFirstLineIndentItem(0, RES_MARGIN_FIRSTLINE)); + // Added as part of tdf#159531 // Top/bottom spacing (i.e. Above/Below paragraph spacing) - aSet.Put(SvxULSpaceItem(0, 0, RES_UL_SPACE)); + auto const aSpacing(o3tl::convert(0.1, o3tl::Length::cm, o3tl::Length::twip)); + SvxULSpaceItem topSpacing(aSpacing, 0, RES_UL_SPACE); + aSet.Put(topSpacing); // Line spacing = SINGLE aSet.Put(SvxLineSpacingItem(0, RES_PARATR_LINESPACING));
