#include "support/lstrings.h" //frontStrip, strip
#include "lyxtext.h"
#include "buffer.h"
+#include "gettext.h"
using std::ostream;
using std::vector;
vector<string> const InsetLabel::getLabelList() const
{
- return vector<string>(1,getContents());
+ return vector<string>(1, getContents());
}
if (!new_contents.empty() &&
getContents() != new_contents) {
bv->buffer()->markDirty();
- bool flag = bv->ChangeRefs(getContents(),new_contents);
- setContents( new_contents );
+ bool flag = bv->ChangeRefsIfUnique(getContents(),
+ new_contents);
+ setContents(new_contents);
bv->text->RedoParagraph(bv);
if (flag) {
bv->redraw();
- bv->fitCursor();
- //bv->updateScrollbar();
+ bv->fitCursor(getLyXText(bv));
} else
- bv->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
+ bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
}
}
}
return 0;
}
-int InsetLabel::Ascii(Buffer const *, ostream & os) const
+int InsetLabel::Ascii(Buffer const *, ostream & os, int) const
{
os << "<" << getContents() << ">";
return 0;
int InsetLabel::DocBook(Buffer const *, ostream & os) const
{
- os << "<anchor id=\"" << getContents() << "\" >";
+ os << "<anchor id=\"" << getContents() << "\" ></anchor>";
return 0;
}