summaryrefslogtreecommitdiffstats
path: root/sw/source/core/text/porfld.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/porfld.cxx')
-rw-r--r--sw/source/core/text/porfld.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 1a30a4ecd7..d2ae4be00d 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)
{
@@ -599,9 +602,12 @@ bool SwNumberPortion::Format( SwTextFormatInfo &rInf )
if ( !mbLabelAlignmentPosAndSpaceModeActive )
{
- if (!rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) &&
+ if ((!rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::IGNORE_FIRST_LINE_INDENT_IN_NUMBERING) &&
// #i32902#
- !IsFootnoteNumPortion() )
+ !IsFootnoteNumPortion()) ||
+ // tdf#159382
+ (IsFootnoteNumPortion() &&
+ rInf.GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::NO_GAP_AFTER_NOTE_NUMBER)))
{
nDiff = rInf.Left()
+ rInf.GetTextFrame()->GetTextNodeForParaProps()->