]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetRef.cpp
Remove all BufferParam arguments in InsetXXX methods (since insets know about their...
[lyx.git] / src / insets / InsetRef.cpp
index c2c3358ddd438133ee2458115123a82ca14bd088..afc123ee7752a6274be211ce65ce56f11af25197 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author José Matos
+ * \author José Matos
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -12,7 +12,6 @@
 #include "InsetRef.h"
 
 #include "Buffer.h"
-#include "buffer_funcs.h"
 #include "Cursor.h"
 #include "DispatchResult.h"
 #include "FuncRequest.h"
@@ -43,14 +42,6 @@ InsetRef::InsetRef(InsetRef const & ir)
 {}
 
 
-void InsetRef::initView()
-{
-       // We need an update of the Buffer reference cache. This is achieved by
-       // updateLabel().
-       lyx::updateLabels(buffer());
-}
-
-
 bool InsetRef::isCompatibleCommand(string const & s) {
        //FIXME This is likely not the best way to handle this.
        //But this stuff is hardcoded elsewhere already.
@@ -74,24 +65,6 @@ ParamInfo const & InsetRef::findInfo(string const & /* cmdName */)
 }
 
 
-void InsetRef::doDispatch(Cursor & cur, FuncRequest & cmd)
-{
-       switch (cmd.action) {
-       case LFUN_MOUSE_RELEASE:
-               // Eventually trigger dialog with button 3 not 1
-               if (cmd.button() == mouse_button::button3)
-                       lyx::dispatch(FuncRequest(LFUN_LABEL_GOTO,
-                                                 getParam("reference")));
-               else
-                       InsetCommand::doDispatch(cur, cmd);
-               break;
-
-       default:
-               InsetCommand::doDispatch(cur, cmd);
-       }
-}
-
-
 docstring InsetRef::screenLabel() const
 {
        return screen_label_;
@@ -142,7 +115,7 @@ int InsetRef::docbook(odocstream & os, OutputParams const & runparams) const
 }
 
 
-void InsetRef::textString(odocstream & os) const
+void InsetRef::tocString(odocstream & os) const
 {
        plaintext(os, OutputParams(0));
 }
@@ -169,7 +142,7 @@ void InsetRef::updateLabels(ParIterator const & it)
 }
 
 
-void InsetRef::addToToc(ParConstIterator const & cpit) const
+void InsetRef::addToToc(DocIterator const & cpit)
 {
        docstring const & label = getParam("reference");
        if (buffer().insetLabel(label))