]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetCaption.cpp
Make sure we center displayed equations.
[lyx.git] / src / insets / InsetCaption.cpp
index b69d1ba71a31526b31251e74a6b3f14d55303f2d..fbb55fc706976f2914e0b3921c6a8d904d2e046e 100644 (file)
@@ -51,7 +51,8 @@ namespace lyx {
 
 
 InsetCaption::InsetCaption(Buffer * buf, string const & type)
-    : InsetText(buf, InsetText::PlainLayout), type_(type)
+    : InsetText(buf, InsetText::PlainLayout), 
+      labelwidth_(0), is_subfloat_(false), type_(type)
 {
        setDrawFrame(true);
        setFrameColor(Color_collapsableframe);
@@ -106,7 +107,7 @@ void InsetCaption::addToToc(DocIterator const & cpit, bool output_active,
                str = full_label_;
                text().forOutliner(str, length);
        }
-       buffer().tocBackend().builder(type)->captionItem(pit, str, output_active);
+       buffer().tocBackend().builder(type).captionItem(pit, str, output_active);
        // Proceed with the rest of the inset.
        InsetText::addToToc(cpit, output_active, utype);
 }