Implement IsTocCaption for normal layouts.

But use default "true" to maintain current behavior if not explicitly
stated otherwise.

Fixes: #11045
This commit is contained in:
Juergen Spitzmueller 2018-02-21 16:37:07 +01:00
parent 8adba3896c
commit 8a703573ea
22 changed files with 24 additions and 2 deletions

View File

@ -364,6 +364,7 @@ Style Bibliography
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -177,6 +177,7 @@ Style Bibliography
Size Huge
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -228,5 +228,6 @@ Style Bibliography
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -226,4 +226,5 @@ Style Bibliography
Shape Smallcaps
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -1126,6 +1126,7 @@ Style Bibliography
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -126,6 +126,7 @@ Style Bibliography
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -596,6 +596,7 @@ Style Bibliography
Series Bold
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -326,5 +326,6 @@ Style Bibliography
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -468,4 +468,5 @@ Style Bibliography
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -481,4 +481,5 @@ Style Bibliography
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -288,6 +288,7 @@ Style "Bibliography (plain)"
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -289,5 +289,6 @@ Style Bibliography
Size Larger
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -367,4 +367,5 @@ Style References
Series Bold
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -288,6 +288,7 @@ Style Bibliography
Series Bold
EndFont
TocLevel 0
IsTocCaption 0
End

View File

@ -520,6 +520,7 @@ Style Bibliography
Family Sans
EndFont
TocLevel 1
IsTocCaption 0
End
Style Recipient

View File

@ -372,6 +372,7 @@ Style Bibliography
LabelString ""
LabelBottomSep 0
TocLevel 1
IsTocCaption 0
End
###

View File

@ -349,6 +349,7 @@ Style Bibliography
Shape Smallcaps
EndFont
TocLevel 1
IsTocCaption 0
End
NoStyle Chapter

View File

@ -165,4 +165,5 @@ Style Bibliography
Size Tiny
EndFont
TocLevel 1
IsTocCaption 0
End

View File

@ -82,4 +82,5 @@ Style Bibliography
span.bibitemlabel:after { content: "] "; }
EndHTMLStyle
TocLevel 1
ISTocCaption 0
End

View File

@ -594,6 +594,7 @@ Style Bibliography
Series Bold
EndFont
TocLevel 0
IsTocCaption 0
End
Style Description

View File

@ -120,7 +120,7 @@ enum LayoutTags {
/////////////////////
Layout::Layout()
: add_to_toc_(false), is_toc_caption_(false)
: add_to_toc_(false), is_toc_caption_(true)
{
unknown_ = false;
margintype = MARGIN_STATIC;

View File

@ -3503,6 +3503,8 @@ void Paragraph::forOutliner(docstring & os, size_t const maxlen,
size_t tmplen = shorten ? maxlen + 1 : maxlen;
if (label && !labelString().empty())
os += labelString() + ' ';
if (!layout().isTocCaption())
return;
for (pos_type i = 0; i < size() && os.length() < tmplen; ++i) {
if (isDeleted(i))
continue;