]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetInclude.cpp
DocBook, InsetFloat: avoid a potential nullptr dereference when detecting the type...
[features.git] / src / insets / InsetInclude.cpp
index 467cd110aff82165a62eaf9322652057fa0d4667..10ea52bfca4381cfba56c9890d4479959c220d4d 100644 (file)
@@ -1006,14 +1006,14 @@ int InsetInclude::plaintext(odocstringstream & os,
 {
        // just write the filename if we're making a tooltip or toc entry,
        // or are generating this for advanced search
-       if (op.for_tooltip || op.for_toc || op.for_search) {
+       if (op.for_tooltip || op.for_toc || op.for_searchAdv != OutputParams::NoSearch) {
                os << '[' << screenLabel() << '\n'
                   << ltrim(getParam("filename")) << "\n]";
                return PLAINTEXT_NEWLINE + 1; // one char on a separate line
        }
 
        if (isVerbatim(params()) || isListings(params())) {
-               if (op.for_search) {
+               if (op.for_searchAdv != OutputParams::NoSearch) {
                        os << '[' << screenLabel() << ']';
                }
                else {
@@ -1251,7 +1251,7 @@ string InsetInclude::contextMenuName() const
 }
 
 
-Inset::RowFlags InsetInclude::rowFlags() const
+int InsetInclude::rowFlags() const
 {
        return type(params()) == INPUT ? Inline : Display;
 }