X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetBox.cpp;h=2400722fd33f829fcd17b33f75272824a8f5f6fe;hb=2e7d1199dfa7ec7b7d963c374a014f2a2227ae7c;hp=c12b405aaf697b4ce9e9c04cd03c2cbc59e4983f;hpb=67615fba80926702cc15f4788d640916f330986d;p=lyx.git diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index c12b405aaf..2400722fd3 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -15,17 +15,19 @@ #include "InsetBox.h" #include "Buffer.h" +#include "BufferParams.h" #include "BufferView.h" #include "Cursor.h" #include "DispatchResult.h" -#include "support/debug.h" #include "FuncStatus.h" #include "FuncRequest.h" #include "support/gettext.h" #include "LaTeXFeatures.h" #include "Lexer.h" #include "MetricsInfo.h" +#include "TextClass.h" +#include "support/debug.h" #include "support/Translator.h" #include @@ -85,7 +87,10 @@ BoxTranslatorLoc const & boxtranslator_loc() InsetBox::InsetBox(BufferParams const & bp, string const & label) : InsetCollapsable(bp), params_(label) -{} +{ + if (forceEmptyLayout()) + paragraphs().back().setLayout(bp.getTextClass().emptyLayout()); +} InsetBox::InsetBox(InsetBox const & in) @@ -173,7 +178,7 @@ void InsetBox::metrics(MetricsInfo & m, Dimension & dim) const } -bool InsetBox::forceDefaultParagraphs(idx_type) const +bool InsetBox::forceEmptyLayout() const { return !params_.inner_box; } @@ -276,7 +281,7 @@ int InsetBox::latex(Buffer const & buf, odocstream & os, width_string += " - 2\\fboxsep - 2\\fboxrule"/* "-\\shadowsize"*/; break; case Doublebox: - width_string += " - 2\\fboxsep - 7.5\\fboxrule - 1.0pt"; + width_string += " - 2\\fboxsep - 7.5\\fboxrule - 1pt"; break; } } @@ -402,9 +407,8 @@ int InsetBox::latex(Buffer const & buf, odocstream & os, // already done break; } - os << "%\n"; - i += 3; + i += 2; return i; }