if (lyxerr.debugging()) {
lyxerr << "Register Figure: buffer:["
- << current_view->currentBuffer() << "]" << endl;
+ << current_view->buffer() << "]" << endl;
}
}
// We should have RO-versions of the form instead.
// The actual prevention of altering a readonly doc
// is done in CallbackFig()
- if(current_view->currentBuffer()->isReadonly())
+ if(current_view->buffer()->isReadonly())
WarnReadonly();
if (!form) {
if (lyxerr.debugging()) {
lyxerr << "Clone Figure: buffer:["
- << current_view->currentBuffer()
+ << current_view->buffer()
<< "], cbuffer:[xx]" << endl;
}
break;
case 7: /* apply */
case 8: /* ok (apply and close) */
- if(!current_view->currentBuffer()->isReadonly())
+ if(!current_view->buffer()->isReadonly())
{
wtype = twtype;
htype = thtype;
}
else fl_set_input(form->EpsFile, "");
fl_set_input(form->Subcaption, subcaption.c_str());
- if(current_view->currentBuffer()->isReadonly())
+ if(current_view->buffer()->isReadonly())
DisableFigurePanel(form);
TempRegenerate();
switch (data) {
case 1: // OK, citation
{
- if(!current_view->currentBuffer()->isReadonly()) {
- InsetCommand *inset = static_cast<InsetCommand*>(citation_form->citation_form->u_vdata);
+ if(!current_view->buffer()->isReadonly()) {
+ InsetCommand * inset = static_cast<InsetCommand*>(citation_form->citation_form->u_vdata);
inset->setContents(bibcombox->getline());
inset->setOptions(fl_get_input(citation_form->label));
fl_hide_form(citation_form->citation_form);
break;
case 3: // OK, bibitem
{
- if(!current_view->currentBuffer()->isReadonly()) {
+ if(!current_view->buffer()->isReadonly()) {
InsetCommand *inset = static_cast<InsetCommand*>(bibitem_form->bibitem_form->u_vdata);
inset->setContents(fl_get_input(bibitem_form->key));
inset->setOptions(fl_get_input(bibitem_form->label));
fl_hide_form(bibitem_form->bibitem_form);
// Does look like a hack? It is! (but will change at 0.13)
- current_view->currentBuffer()->text->RedoParagraph();
- current_view->currentBuffer()->update(1);
+ current_view->buffer()->text->RedoParagraph();
+ current_view->buffer()->update(1);
break;
} // fall through to Cancel on RO-mode
}
void InsetCitation::Edit(int, int)
{
- if(current_view->currentBuffer()->isReadonly())
+ if(current_view->buffer()->isReadonly())
WarnReadonly();
if (!citation_form) {
*/
void InsetBibKey::Edit(int, int)
{
- if(current_view->currentBuffer()->isReadonly())
+ if(current_view->buffer()->isReadonly())
WarnReadonly();
if (!bibitem_form) {
// inset is cut and pasted. Such hacks will not be needed
// later (JMarc)
if (!owner) {
- owner = current_view->currentBuffer();
+ owner = current_view->buffer();
}
// If we generate in a temp dir, we might need to give an
// absolute path there. This is a bit complicated since we can
// This hack is copied from InsetBibtex::Latex.
// Is it still needed? Probably yes.
if (!owner) {
- owner = current_view->currentBuffer();
+ owner = current_view->buffer();
}
// We need to create absolute path names for bibliographies
if (!current_view->available())
return;
- string tmp, bibkeys = current_view->currentBuffer()->getBibkeyList(',');
- bibkeys=split(bibkeys, tmp,',');
+ string tmp, bibkeys = current_view->buffer()->getBibkeyList(',');
+ bibkeys = split(bibkeys, tmp,',');
while (!tmp.empty()) {
combox->addto(tmp.c_str());
- bibkeys=split(bibkeys, tmp,',');
+ bibkeys = split(bibkeys, tmp,',');
}
}
{
int w = 0;
// Does look like a hack? It is! (but will change at 0.13)
- LyXParagraph *par = current_view->currentBuffer()->paragraph;
+ LyXParagraph * par = current_view->buffer()->paragraph;
while (par) {
if (par->bibkey) {
{
int w = 0;
// Does look like a hack? It is! (but will change at 0.13)
- LyXParagraph * par = current_view->currentBuffer()->paragraph;
- InsetBibKey * bkey=0;
+ LyXParagraph * par = current_view->buffer()->paragraph;
+ InsetBibKey * bkey = 0;
LyXFont font;
while (par) {
}
case 1:
- if(!current_view->currentBuffer()->isReadonly()) {
+ if(!current_view->buffer()->isReadonly()) {
inset->setContents(fl_get_input(form->input));
// don't typeset
inset->setNoLoad(fl_get_button(form->flag1));
fl_hide_form(form->include);
break;
case 5:
- if(!current_view->currentBuffer()->isReadonly()) {
+ if(!current_view->buffer()->isReadonly()) {
inset->setContents(fl_get_input(form->input));
inset->setNoLoad(fl_get_button(form->flag1));
if (fl_get_button(form->flag2))
fl_hide_form(form->include);
UpdateInset(inset);
- current_view->getOwner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN, inset->getContents().c_str());
+ current_view->owner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN, inset->getContents().c_str());
}
break;
void InsetInclude::Edit(int, int)
{
- if(current_view->currentBuffer()->isReadonly())
+ if(current_view->buffer()->isReadonly())
WarnReadonly();
if (!form) {
switch (data) {
case 1: // OK
- if(!current_view->currentBuffer()->isReadonly()) {
+ if(!current_view->buffer()->isReadonly()) {
string tmp = fl_get_input(index_form->key);
if(tmp != inset->getContents()) {
inset->setContents(tmp);
void InsetIndex::Edit(int, int)
{
- if(current_view->currentBuffer()->isReadonly())
+ if(current_view->buffer()->isReadonly())
WarnReadonly();
if (!index_form)
{
InsetInfo * inset = static_cast<InsetInfo*>(ob->u_vdata);
string tmp = fl_get_input(inset->strobj);
- Buffer * buffer = current_view->currentBuffer();
+ Buffer * buffer = current_view->buffer();
if(tmp != inset->contents && !(buffer->isReadonly()) ) {
buffer->markDirty();
inset->contents = tmp;
{
static int ow = -1, oh;
- if(current_view->currentBuffer()->isReadonly())
+ if(current_view->buffer()->isReadonly())
WarnReadonly();
if (!form) {
void InsetParent::Edit(int, int)
{
- current_view->getOwner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN,
+ current_view->owner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN,
getContents().c_str());
}
int InsetQuotes::Latex(string & file, signed char /*fragile*/)
{
string doclang =
- current_view->currentBuffer()->GetLanguage();
+ current_view->buffer()->GetLanguage();
int quoteind = quote_index[side][language];
string qstr;
{
char type = quote_char[quote_index[side][language]];
- if (current_view->currentBuffer()->GetLanguage() == "default"
+ if (current_view->buffer()->GetLanguage() == "default"
&& lyxrc->fontenc != "T1") {
if (times == InsetQuotes::SingleQ)
switch (type) {
void InsetRef::Edit(int, int)
{
- current_view->getOwner()->getLyXFunc()
+ current_view->owner()->getLyXFunc()
->Dispatch(LFUN_REFGOTO, getContents().c_str());
}
else
temp += _("Ref: ");
temp += getContents();
- if(!current_view->currentBuffer()->isLatex()
+ if(!current_view->buffer()->isLatex()
&& !getOptions().empty()) {
temp += "||";
temp += getOptions();
void InsetTOC::Edit(int, int)
{
- current_view->getOwner()->getLyXFunc()->Dispatch(LFUN_TOCVIEW);
+ current_view->owner()->getLyXFunc()->Dispatch(LFUN_TOCVIEW);
}
int InsetTOC::Linuxdoc(string & file)
else
cmdname = "url";
- Buffer * buffer = current_view->currentBuffer();
+ Buffer * buffer = current_view->buffer();
if ((url != inset->getContents() ||
name != inset->getOptions() ||
{
static int ow = -1, oh;
- if(current_view->currentBuffer()->isReadonly())
+ if(current_view->buffer()->isReadonly())
WarnReadonly();
if (!fd_form_url) {