commit 721cc085a26b2a362e90fd2578c5af6f7cfea1a0
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Wed Feb 21 16:37:07 2018 +0100

    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 52b867a..21e117f 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 57ebab3..6c23fc9 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 eacc73e..ee812d3 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 3820739..0744ecd 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 ff8046a..ed15d26 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 0dadd2a..69e5fbb 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 ac53e61..b411c43 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 42e86fe..89a6a20 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 38b4313..0f2b25c 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 c3835b8..e35f852 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 3ff99ef..cea40c8 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 4c1f46e..6dc7b2b 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 9fed367..8e8ee34 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 0787825..6942f22 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 afcfd1e..03c2ed8 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 4c3e37e..f59b48b 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 a0f4565..2515d49 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 88a452f..dc3654e 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 b323cf3..1c2c8c6 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 3b1ea04..1adc110 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 0a783d0..005acb2 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 135cd80..350418c 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 65854cb..e548e7d 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
 
 

Reply via email to