]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetref.C
Don't remove cell selections after fontchange.
[lyx.git] / src / insets / insetref.C
index 5ce084749fd26556d8dec77fdb015bc7323ae2ee..b6fccf4831454812d9da9976dabb845714e76d86 100644 (file)
@@ -25,11 +25,11 @@ InsetRef::InsetRef(InsetCommandParams const & p, Buffer const & buf, bool)
 void InsetRef::edit(BufferView * bv, int, int, unsigned int button)
 {
        // Eventually trigger dialog with button 3 not 1
-       if (button == 3 )
+       if (button == 3)
                bv->owner()->getLyXFunc()->
                        dispatch(LFUN_REF_GOTO, getContents());
-       else if (button == 1 )
-               bv->owner()->getDialogs()->showRef( this );
+       else if (button == 1)
+               bv->owner()->getDialogs()->showRef(this);
 }
 
 
@@ -63,7 +63,7 @@ int InsetRef::latex(Buffer const *, ostream & os,
        if (getOptions().empty())
                os << escape(getCommand());
        else {
-               InsetCommandParams p( getCmdName(), getContents(), "" );
+               InsetCommandParams p(getCmdName(), getContents(), "");
                os << escape(p.getCommand());
        }
        return 0;
@@ -88,7 +88,7 @@ int InsetRef::linuxdoc(Buffer const *, ostream & os) const
 int InsetRef::docbook(Buffer const *, ostream & os) const
 {
        if (getOptions().empty()) {
-               os << "<xref linkend=\"" << getContents() << "\"/>";
+               os << "<xref linkend=\"" << getContents() << "\">";
        } else {
                os << "<link linkend=\"" << getContents()
                   << "\">" << getOptions() << "</link>";
@@ -101,9 +101,9 @@ int InsetRef::docbook(Buffer const *, ostream & os) const
 void InsetRef::validate(LaTeXFeatures & features) const
 {
        if (getCmdName() == "vref" || getCmdName() == "vpageref")
-               features.varioref = true;
+               features.require("varioref");
        else if (getCmdName() == "prettyref")
-               features.prettyref = true;
+               features.require("prettyref");
 }
 
 InsetRef::type_info InsetRef::types[] = {