From 721cc085a26b2a362e90fd2578c5af6f7cfea1a0 Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 21 Feb 2018 16:37:07 +0100 Subject: [PATCH] Implement IsTocCaption for normal layouts. But use default "true" to maintain current behavior if not explicitly stated otherwise. Fixes: #11045 (cherry picked from commit 8a703573ea9718a06c94522e40671d46f0b83522) --- lib/layouts/IEEEtran.layout | 1 + lib/layouts/aguplus.inc | 1 + lib/layouts/agutex.layout | 1 + lib/layouts/amsdefs.inc | 1 + lib/layouts/beamer.layout | 1 + lib/layouts/cl2emult.layout | 1 + lib/layouts/egs.layout | 1 + lib/layouts/elsarticle.layout | 1 + lib/layouts/ijmpc.layout | 1 + lib/layouts/ijmpd.layout | 1 + lib/layouts/iopart.layout | 1 + lib/layouts/jasatex.layout | 1 + lib/layouts/kluwer.layout | 1 + lib/layouts/llncs.layout | 1 + lib/layouts/moderncv.layout | 1 + lib/layouts/powerdot.layout | 3 ++- lib/layouts/siamltex.layout | 1 + lib/layouts/simplecv.layout | 1 + lib/layouts/stdstruct.inc | 1 + lib/layouts/svcommon.inc | 1 + src/Layout.cpp | 2 +- src/Paragraph.cpp | 2 ++ status.23x | 3 +++ 23 files changed, 27 insertions(+), 2 deletions(-) diff --git a/lib/layouts/IEEEtran.layout b/lib/layouts/IEEEtran.layout index 52b867af10..21e117f499 100644 --- a/lib/layouts/IEEEtran.layout +++ b/lib/layouts/IEEEtran.layout @@ -364,6 +364,7 @@ Style Bibliography Size Larger EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/aguplus.inc b/lib/layouts/aguplus.inc index 57ebab331c..6c23fc97a0 100644 --- a/lib/layouts/aguplus.inc +++ b/lib/layouts/aguplus.inc @@ -177,6 +177,7 @@ Style Bibliography Size Huge EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/agutex.layout b/lib/layouts/agutex.layout index eacc73eac5..ee812d3e9e 100644 --- a/lib/layouts/agutex.layout +++ b/lib/layouts/agutex.layout @@ -228,5 +228,6 @@ Style Bibliography Size Larger EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/amsdefs.inc b/lib/layouts/amsdefs.inc index 3820739bc7..0744ecdd06 100644 --- a/lib/layouts/amsdefs.inc +++ b/lib/layouts/amsdefs.inc @@ -226,4 +226,5 @@ Style Bibliography Shape Smallcaps EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index ff8046ad54..ed15d26fe8 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -1126,6 +1126,7 @@ Style Bibliography Size Larger EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/cl2emult.layout b/lib/layouts/cl2emult.layout index 0dadd2af7d..69e5fbbac7 100644 --- a/lib/layouts/cl2emult.layout +++ b/lib/layouts/cl2emult.layout @@ -126,6 +126,7 @@ Style Bibliography Size Larger EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/egs.layout b/lib/layouts/egs.layout index ac53e616dd..b411c4384f 100644 --- a/lib/layouts/egs.layout +++ b/lib/layouts/egs.layout @@ -596,6 +596,7 @@ Style Bibliography Series Bold EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/elsarticle.layout b/lib/layouts/elsarticle.layout index 42e86fec1f..89a6a20cd0 100644 --- a/lib/layouts/elsarticle.layout +++ b/lib/layouts/elsarticle.layout @@ -326,5 +326,6 @@ Style Bibliography Size Larger EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/ijmpc.layout b/lib/layouts/ijmpc.layout index 38b43131e1..0f2b25c609 100644 --- a/lib/layouts/ijmpc.layout +++ b/lib/layouts/ijmpc.layout @@ -468,4 +468,5 @@ Style Bibliography Size Larger EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/ijmpd.layout b/lib/layouts/ijmpd.layout index c3835b828b..e35f852bcc 100644 --- a/lib/layouts/ijmpd.layout +++ b/lib/layouts/ijmpd.layout @@ -481,4 +481,5 @@ Style Bibliography Size Larger EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/iopart.layout b/lib/layouts/iopart.layout index 3ff99ef7b6..cea40c800f 100644 --- a/lib/layouts/iopart.layout +++ b/lib/layouts/iopart.layout @@ -288,6 +288,7 @@ Style "Bibliography (plain)" Size Larger EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/jasatex.layout b/lib/layouts/jasatex.layout index 4c1f46e80c..6dc7b2b6c4 100644 --- a/lib/layouts/jasatex.layout +++ b/lib/layouts/jasatex.layout @@ -289,5 +289,6 @@ Style Bibliography Size Larger EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/kluwer.layout b/lib/layouts/kluwer.layout index 9fed36753d..8e8ee3428b 100644 --- a/lib/layouts/kluwer.layout +++ b/lib/layouts/kluwer.layout @@ -367,4 +367,5 @@ Style References Series Bold EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/llncs.layout b/lib/layouts/llncs.layout index 0787825b15..6942f224a6 100644 --- a/lib/layouts/llncs.layout +++ b/lib/layouts/llncs.layout @@ -288,6 +288,7 @@ Style Bibliography Series Bold EndFont TocLevel 0 + IsTocCaption 0 End diff --git a/lib/layouts/moderncv.layout b/lib/layouts/moderncv.layout index afcfd1e115..03c2ed8582 100644 --- a/lib/layouts/moderncv.layout +++ b/lib/layouts/moderncv.layout @@ -520,6 +520,7 @@ Style Bibliography Family Sans EndFont TocLevel 1 + IsTocCaption 0 End Style Recipient diff --git a/lib/layouts/powerdot.layout b/lib/layouts/powerdot.layout index 4c3e37edf8..f59b48b2da 100644 --- a/lib/layouts/powerdot.layout +++ b/lib/layouts/powerdot.layout @@ -371,7 +371,8 @@ Style Bibliography LabelType Bibliography LabelString "" LabelBottomSep 0 - TocLevel 1 + TocLevel 1 + IsTocCaption 0 End ### diff --git a/lib/layouts/siamltex.layout b/lib/layouts/siamltex.layout index a0f4565bb3..2515d49125 100644 --- a/lib/layouts/siamltex.layout +++ b/lib/layouts/siamltex.layout @@ -349,6 +349,7 @@ Style Bibliography Shape Smallcaps EndFont TocLevel 1 + IsTocCaption 0 End NoStyle Chapter diff --git a/lib/layouts/simplecv.layout b/lib/layouts/simplecv.layout index 88a452f43a..dc3654e6fe 100644 --- a/lib/layouts/simplecv.layout +++ b/lib/layouts/simplecv.layout @@ -165,4 +165,5 @@ Style Bibliography Size Tiny EndFont TocLevel 1 + IsTocCaption 0 End diff --git a/lib/layouts/stdstruct.inc b/lib/layouts/stdstruct.inc index b323cf37ea..1c2c8c60ed 100644 --- a/lib/layouts/stdstruct.inc +++ b/lib/layouts/stdstruct.inc @@ -82,4 +82,5 @@ Style Bibliography span.bibitemlabel:after { content: "] "; } EndHTMLStyle TocLevel 1 + ISTocCaption 0 End diff --git a/lib/layouts/svcommon.inc b/lib/layouts/svcommon.inc index 3b1ea043ab..1adc110a49 100644 --- a/lib/layouts/svcommon.inc +++ b/lib/layouts/svcommon.inc @@ -594,6 +594,7 @@ Style Bibliography Series Bold EndFont TocLevel 0 + IsTocCaption 0 End Style Description diff --git a/src/Layout.cpp b/src/Layout.cpp index 0a783d0aad..005acb2258 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -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; diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 135cd80fec..350418c564 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -3510,6 +3510,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; diff --git a/status.23x b/status.23x index 65854cb0a7..e548e7dc12 100644 --- a/status.23x +++ b/status.23x @@ -70,6 +70,9 @@ What's new - Save the list of recent files when a file is open/saved so that it is up to date after a crash (bug 10712). +- Only show header for bibliography in outliner (bug 11045). + + * INTERNALS