Implement IsTocCaption for normal layouts.

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

Fixes: #11045
(cherry picked from commit 8a703573ea)
This commit is contained in:
Juergen Spitzmueller 2018-02-21 16:37:07 +01:00
parent 31c7ce19fb
commit 721cc085a2
23 changed files with 27 additions and 2 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -371,7 +371,8 @@ Style Bibliography
LabelType Bibliography LabelType Bibliography
LabelString "" LabelString ""
LabelBottomSep 0 LabelBottomSep 0
TocLevel 1 TocLevel 1
IsTocCaption 0
End End
### ###

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -70,6 +70,9 @@ What's new
- Save the list of recent files when a file is open/saved so that it - Save the list of recent files when a file is open/saved so that it
is up to date after a crash (bug 10712). is up to date after a crash (bug 10712).
- Only show header for bibliography in outliner (bug 11045).
* INTERNALS * INTERNALS