]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetLabel.cpp
Remove all BufferParam arguments in InsetXXX methods (since insets know about their...
[lyx.git] / src / insets / InsetLabel.cpp
index 3d25aff1020faf4af704d0bda7f47e77df2fef98..93ccc40b28abc591ef469875ba958b064e548d60 100644 (file)
@@ -23,6 +23,7 @@
 #include "FuncStatus.h"
 #include "InsetIterator.h"
 #include "LyXFunc.h"
+#include "output_xhtml.h"
 #include "ParIterator.h"
 #include "sgml.h"
 #include "Text.h"
@@ -175,7 +176,7 @@ void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
                InsetCommandParams p(REF_CODE, "ref");
                p["reference"] = getParam("name");
                cap::clearSelection();
-               cap::copyInset(cur, new InsetRef(*cur.buffer(), p), getParam("name"));
+               cap::copyInset(cur, new InsetRef(buffer(), p), getParam("name"));
                break;
        }
 
@@ -218,4 +219,10 @@ int InsetLabel::docbook(odocstream & os, OutputParams const & runparams) const
 }
 
 
+docstring InsetLabel::xhtml(odocstream & os, OutputParams const &) const
+{
+       os << "<a name=\"" << html::htmlize(getParam("name")) << "\"></a>";
+       return docstring();
+}
+
 } // namespace lyx