]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNewpage.cpp
Allow row-breaking after some insets
[lyx.git] / src / insets / InsetNewpage.cpp
index e062e8bbecf583f1a8610b487c35c81bf64978fb..b108885f9c522a37c386688f4afac930342a2057 100644 (file)
@@ -163,7 +163,7 @@ bool InsetNewpage::getStatus(Cursor & cur, FuncRequest const & cmd,
                        InsetNewpageParams params;
                        string2params(to_utf8(cmd.argument()), params);
                        status.setOnOff(params_.kind == params.kind);
-               } 
+               }
                status.setEnabled(true);
                return true;
        default:
@@ -213,7 +213,11 @@ ColorCode InsetNewpage::ColorName() const
 
 void InsetNewpage::latex(otexstream & os, OutputParams const & runparams) const
 {
-       switch (params_.kind) {
+       if (runparams.inDeletedInset) {
+               os << "\\mbox{}\\\\\\makebox[\\columnwidth]{\\dotfill\\ "
+                  << insetLabel() << "\\ \\dotfill}";
+       } else {
+               switch (params_.kind) {
                case InsetNewpageParams::NEWPAGE:
                        os << "\\newpage" << termcmd;
                        break;
@@ -231,6 +235,7 @@ void InsetNewpage::latex(otexstream & os, OutputParams const & runparams) const
                default:
                        os << "\\newpage" << termcmd;
                        break;
+               }
        }
 }
 
@@ -250,9 +255,9 @@ int InsetNewpage::docbook(odocstream & os, OutputParams const &) const
 }
 
 
-docstring InsetNewpage::xhtml(XHTMLStream & xs, OutputParams const &) const
+docstring InsetNewpage::xhtml(XMLStream & xs, OutputParams const &) const
 {
-       xs << html::CompTag("br");
+       xs << xml::CompTag("br");
        return docstring();
 }