core.git: Branch 'libreoffice-7-6' - sw/source
sw/source/core/text/porfld.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit b860f50e88cb3aeaab596787e0184fb8bddb6cd7 Author: Matthew Kogan AuthorDate: Tue Jan 16 11:03:43 2024 + Commit: Xisco Fauli CommitDate: Wed Jan 17 20:38:15 2024 +0100 tdf#159101 sw: Fix space appearing at start of line when field wraps Adding the ' ' to ScanPortionEnd fails pretty quickly with infinite loop. The important part of fixing the forum-mso-en-13115.docx was that the SetHasFollow(true) condition is not affected by a ' '. (regression from commit 21473f46fda5f1c7f220493667a96fff7c78a7b3) Change-Id: I6452673c0fe05ca549b63a398a977fc71db64bae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162167 Tested-by: Jenkins Reviewed-by: Matthew Kogan Reviewed-by: Michael Stahl (cherry picked from commit 4cdb542348b20d8a558cd6413c7cccdc50241fa9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162147 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 580b4a2635a7..2f5941b618f8 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -392,10 +392,13 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf ) // These characters should not be contained in the follow // field portion. They are handled via the HookChar mechanism. const sal_Unicode nNew = !aNew.isEmpty() ? aNew[0] : 0; -auto IsHook = [](const sal_Unicode cNew) -> bool +auto IsHook = [](const sal_Unicode cNew, bool const isSpace = false) -> bool { switch (cNew) { +case ' ': // tdf#159101 this one is not in ScanPortionEnd + // but is required for justified text +return isSpace; case CH_BREAK: case CH_TAB: case CHAR_HARDHYPHEN: // non-breaking hyphen @@ -412,7 +415,7 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf ) return false; } }; -if (IsHook(nNew)) +if (IsHook(nNew, true)) { if (nNew == CH_BREAK) {
core.git: Branch 'libreoffice-24-2' - sw/source
sw/source/core/text/porfld.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit ee0a6a4179b17b76dfd97982ef87d92661afc28c Author: Matthew Kogan AuthorDate: Tue Jan 16 11:03:43 2024 + Commit: Xisco Fauli CommitDate: Wed Jan 17 15:23:48 2024 +0100 tdf#159101 sw: Fix space appearing at start of line when field wraps Adding the ' ' to ScanPortionEnd fails pretty quickly with infinite loop. The important part of fixing the forum-mso-en-13115.docx was that the SetHasFollow(true) condition is not affected by a ' '. (regression from commit 21473f46fda5f1c7f220493667a96fff7c78a7b3) Change-Id: I6452673c0fe05ca549b63a398a977fc71db64bae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162167 Tested-by: Jenkins Reviewed-by: Matthew Kogan Reviewed-by: Michael Stahl (cherry picked from commit 4cdb542348b20d8a558cd6413c7cccdc50241fa9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162146 Reviewed-by: Xisco Fauli diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 1a30a4ecd7d1..a1f3b9729383 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -402,10 +402,13 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf ) // These characters should not be contained in the follow // field portion. They are handled via the HookChar mechanism. const sal_Unicode nNew = !aNew.isEmpty() ? aNew[0] : 0; -auto IsHook = [](const sal_Unicode cNew) -> bool +auto IsHook = [](const sal_Unicode cNew, bool const isSpace = false) -> bool { switch (cNew) { +case ' ': // tdf#159101 this one is not in ScanPortionEnd + // but is required for justified text +return isSpace; case CH_BREAK: case CH_TAB: case CHAR_HARDHYPHEN: // non-breaking hyphen @@ -422,7 +425,7 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf ) return false; } }; -if (IsHook(nNew)) +if (IsHook(nNew, true)) { if (nNew == CH_BREAK) {
core.git: sw/source
sw/source/core/text/porfld.cxx |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) New commits: commit 4cdb542348b20d8a558cd6413c7cccdc50241fa9 Author: Matthew Kogan AuthorDate: Tue Jan 16 11:03:43 2024 + Commit: Michael Stahl CommitDate: Wed Jan 17 11:44:47 2024 +0100 tdf#159101 sw: Fix space appearing at start of line when field wraps Adding the ' ' to ScanPortionEnd fails pretty quickly with infinite loop. The important part of fixing the forum-mso-en-13115.docx was that the SetHasFollow(true) condition is not affected by a ' '. (regression from commit 21473f46fda5f1c7f220493667a96fff7c78a7b3) Change-Id: I6452673c0fe05ca549b63a398a977fc71db64bae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162167 Tested-by: Jenkins Reviewed-by: Matthew Kogan Reviewed-by: Michael Stahl diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 1a30a4ecd7d1..a1f3b9729383 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -402,10 +402,13 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf ) // These characters should not be contained in the follow // field portion. They are handled via the HookChar mechanism. const sal_Unicode nNew = !aNew.isEmpty() ? aNew[0] : 0; -auto IsHook = [](const sal_Unicode cNew) -> bool +auto IsHook = [](const sal_Unicode cNew, bool const isSpace = false) -> bool { switch (cNew) { +case ' ': // tdf#159101 this one is not in ScanPortionEnd + // but is required for justified text +return isSpace; case CH_BREAK: case CH_TAB: case CHAR_HARDHYPHEN: // non-breaking hyphen @@ -422,7 +425,7 @@ bool SwFieldPortion::Format( SwTextFormatInfo &rInf ) return false; } }; -if (IsHook(nNew)) +if (IsHook(nNew, true)) { if (nNew == CH_BREAK) {
[Libreoffice-commits] core.git: Branch 'libreoffice-7-6' - officecfg/registry sw/source
officecfg/registry/schema/org/openoffice/Office/Writer.xcs |6 ++ sw/source/core/text/txtfld.cxx |4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) New commits: commit fd0d7e7916efa0fcb4796b6a8fd7fccb586d56db Author: Matthew Kogan AuthorDate: Fri Oct 13 14:53:24 2023 +0100 Commit: Xisco Fauli CommitDate: Fri Oct 27 14:41:18 2023 +0200 tdf#154454 sw: make comparison of changed paragraph numbering optional by the new config option "DisplayChangedParagraphNumbering", as a temporary fix to hide incorrect changes in corner cases. Regression from commit 2413f213625253a9c2b1787b3b9fe859d724a9bd "tdf#115523 sw_redlinenum: show correct, also original numbering". Change-Id: I6d85033cc3f60ac1075501fedfcd4c9862e00a9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157940 Tested-by: László Németh Reviewed-by: László Németh (cherry picked from commit d67d47bf0e9c9b24fb9aeed8807c31ed28d7fec2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158042 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas Reviewed-by: Xisco Fauli diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs index d09e31d0dbc8..57905ce11c1a 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs @@ -2622,6 +2622,12 @@ Specifies whether RSIDs are stored in the document model. + + + Specifies whether changed paragraph numbering is displayed. + +true + diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index 7de5583cd1a9..68c32ee19b32 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -58,6 +58,7 @@ #include #include #include +#include static bool lcl_IsInBody( SwFrame const *pFrame ) { @@ -626,7 +627,8 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con if ( !aText.isEmpty() || !aHiddenText.isEmpty() ) { -if (aText != aHiddenText && !aHiddenText.isEmpty()) +bool bDisplayChangedParagraphNumbering = officecfg::Office::Writer::Comparison::DisplayChangedParagraphNumbering::get(); +if (bDisplayChangedParagraphNumbering && aText != aHiddenText && !aHiddenText.isEmpty()) { bHasHiddenNum = true; // show also original number after the actual one enclosed in [ and ],
[Libreoffice-commits] core.git: officecfg/registry sw/source
officecfg/registry/schema/org/openoffice/Office/Writer.xcs |6 ++ sw/source/core/text/txtfld.cxx |4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) New commits: commit d67d47bf0e9c9b24fb9aeed8807c31ed28d7fec2 Author: Matthew Kogan AuthorDate: Fri Oct 13 14:53:24 2023 +0100 Commit: László Németh CommitDate: Tue Oct 17 14:50:03 2023 +0200 tdf#154454 sw: make comparison of changed paragraph numbering optional by the new config option "DisplayChangedParagraphNumbering", as a temporary fix to hide incorrect changes in corner cases. Regression from commit 2413f213625253a9c2b1787b3b9fe859d724a9bd "tdf#115523 sw_redlinenum: show correct, also original numbering". Change-Id: I6d85033cc3f60ac1075501fedfcd4c9862e00a9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157940 Tested-by: László Németh Reviewed-by: László Németh diff --git a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs index 028552cca820..75a019c63c73 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Writer.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Writer.xcs @@ -2622,6 +2622,12 @@ Specifies whether RSIDs are stored in the document model. + + + Specifies whether changed paragraph numbering is displayed. + +true + diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx index aa8fef7331c5..464781428010 100644 --- a/sw/source/core/text/txtfld.cxx +++ b/sw/source/core/text/txtfld.cxx @@ -58,6 +58,7 @@ #include #include #include +#include static bool lcl_IsInBody( SwFrame const *pFrame ) { @@ -721,7 +722,8 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con if ( !aText.isEmpty() || !aHiddenText.isEmpty() ) { -if (aText != aHiddenText && !aHiddenText.isEmpty()) +bool bDisplayChangedParagraphNumbering = officecfg::Office::Writer::Comparison::DisplayChangedParagraphNumbering::get(); +if (bDisplayChangedParagraphNumbering && aText != aHiddenText && !aHiddenText.isEmpty()) { bHasHiddenNum = true; // show also original number after the actual one enclosed in [ and ],