From: Jean-Marc Lasgouttes Date: Thu, 3 May 2001 15:38:24 +0000 (+0000) Subject: Kayvan --export fix ; Angus toolbar fixes X-Git-Tag: 1.6.10~21257 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=407dc56e9728e99c42e73a0f8f9117c4a615a1a6;p=features.git Kayvan --export fix ; Angus toolbar fixes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1983 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferView.C b/src/BufferView.C index 1baf3d769b..1c65105bf6 100644 --- a/src/BufferView.C +++ b/src/BufferView.C @@ -50,12 +50,6 @@ LyXScreen * BufferView::screen() const } -WorkArea * BufferView::workarea() const -{ - return &pimpl_->workarea_; -} - - LyXView * BufferView::owner() const { return pimpl_->owner_; @@ -279,6 +273,12 @@ void BufferView::pasteClipboard(bool asPara) } +string const BufferView::getClipboard() const +{ + return pimpl_->workarea_.getClipboard(); +} + + void BufferView::stuffClipboard(string const & stuff) const { pimpl_->stuffClipboard(stuff); diff --git a/src/BufferView.h b/src/BufferView.h index 2d6f36e88a..f4e45828c7 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -55,8 +55,6 @@ public: /// LyXScreen * screen() const; /// - WorkArea * workarea() const; - /// void buffer(Buffer * b); /// void resize(int, int, int, int); @@ -237,6 +235,8 @@ public: /// bool ChangeCitationsIfUnique(string const & from, string const & to); /// + string const getClipboard() const; + /// void pasteClipboard(bool asPara); /// void stuffClipboard(string const &) const; diff --git a/src/ChangeLog b/src/ChangeLog index 997ab44d5d..bb89050691 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,22 @@ +2001-04-28 Kayvan A. Sylvan + + * LaTeX.C (run): Fix problem with --export code. + +2001-04-26 Angus Leeming + + * BufferView.[Ch] (workarea): removed. + (getClipboard) new method; wrapper for workarea()->getClipboard() + + * ToolbarDefaults.C (read): removed final lex.next() command; it's a + bug. + + * WorkArea.h (width, height, xpos, ypos): These methods all + returned the dimensions of the work_area sub-area of WorkArea, + resulting in a position error if the WorkArea were resized. Now + return the dimensions of the entire WorkArea. + + * lyx_main.C (ReadUIFile): don't print out spurious warnings. + 2001-05-03 Jean-Marc Lasgouttes * LaTeX.C (deplog): correct the syntax of regex reg1 diff --git a/src/LaTeX.C b/src/LaTeX.C index c40f17173f..06e45c4c58 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -174,7 +174,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) ++count; lyxerr[Debug::LATEX] << "Run #" << count << endl; - lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count)); + if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count)); //WriteStatus(lfun, string(_("LaTeX run number ")) + tostr(count)); this->operator()(); @@ -209,7 +209,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) if (head.haschanged(OnlyFilename(ChangeExtension(file, ".idx")))) { // no checks for now lyxerr[Debug::LATEX] << "Running MakeIndex." << endl; - lfun->Dispatch(LFUN_MESSAGE, _("Running MakeIndex.")); + if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("Running MakeIndex.")); // WriteStatus(minib, _("Running MakeIndex.")); rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx"))); } @@ -222,7 +222,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) // tags is found -> run bibtex and set rerun = true; // no checks for now lyxerr[Debug::LATEX] << "Running BibTeX." << endl; - lfun->Dispatch(LFUN_MESSAGE, _("Running BibTeX.")); + if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("Running BibTeX.")); //WriteStatus(minib, _("Running BibTeX.")); updateBibtexDependencies(head, bibtex_info); rerun |= runBibTeX(bibtex_info); @@ -251,7 +251,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) << "Dep. file has changed or rerun requested" << endl; lyxerr[Debug::LATEX] << "Run #" << count << endl; - lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count)); + if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run number") + ' ' + tostr(count)); // WriteStatus(minib, // string(_("LaTeX run number ")) + tostr(count)); this->operator()(); @@ -280,7 +280,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) if (head.haschanged(OnlyFilename(ChangeExtension(file, ".idx")))) { // no checks for now lyxerr[Debug::LATEX] << "Running MakeIndex." << endl; - lfun->Dispatch(LFUN_MESSAGE, _("Running MakeIndex.")); + if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("Running MakeIndex.")); //WriteStatus(minib, _("Running MakeIndex.")); rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx"))); } @@ -302,7 +302,7 @@ int LaTeX::run(TeXErrors & terr, LyXFunc * lfun) rerun = false; ++count; lyxerr[Debug::LATEX] << "Run #" << count << endl; - lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run numger") + ' ' + tostr(count)); + if (lfun) lfun->Dispatch(LFUN_MESSAGE, _("LaTeX run numger") + ' ' + tostr(count)); // WriteStatus(minib, string(_("LaTeX run number ")) + tostr(count)); this->operator()(); scanres = scanLogFile(terr); diff --git a/src/ToolbarDefaults.C b/src/ToolbarDefaults.C index 9e8cc03a78..087ec6d652 100644 --- a/src/ToolbarDefaults.C +++ b/src/ToolbarDefaults.C @@ -111,14 +111,13 @@ void ToolbarDefaults::read(LyXLex & lex) if (lyxerr.debugging(Debug::PARSER)) lex.printTable(lyxerr); - - while (lex.IsOK() && !quit) { + while (lex.IsOK() && !quit) { switch (lex.lex()) { case TO_ADD: if (lex.next()) { func = lex.GetString(); - lyxerr[Debug::GUI] + lyxerr[Debug::PARSER] << "Toolbar::read TO_ADD func: `" << func << "'" << endl; add(func); @@ -149,7 +148,6 @@ void ToolbarDefaults::read(LyXLex & lex) } } lex.popTable(); - lex.next(); } diff --git a/src/ToolbarDefaults.h b/src/ToolbarDefaults.h index 2f98e4f1b6..92b9dc8b0f 100644 --- a/src/ToolbarDefaults.h +++ b/src/ToolbarDefaults.h @@ -79,4 +79,3 @@ extern ToolbarDefaults toolbardefaults; #endif - diff --git a/src/WorkArea.h b/src/WorkArea.h index dc3e26a541..1d757c021f 100644 --- a/src/WorkArea.h +++ b/src/WorkArea.h @@ -35,13 +35,17 @@ public: /// int workWidth() const { return work_area->w; } /// - unsigned int width() const { return work_area->w + scrollbar->w; } + //unsigned int width() const { return work_area->w + scrollbar->w; } + unsigned int width() const { return backgroundbox->w + 15; } /// - unsigned int height() const { return work_area->h; } + //unsigned int height() const { return work_area->h; } + unsigned int height() const { return backgroundbox->h; } /// - int xpos() const { return work_area->x; } + //int xpos() const { return work_area->x; } + int xpos() const { return backgroundbox->x; } /// - int ypos() const { return work_area->y; } + //int ypos() const { return work_area->y; } + int ypos() const { return backgroundbox->y; } /// void resize(int xpos, int ypos, int width, int height); /// diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index d2431d494e..ad41b1fd35 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,9 @@ +2001-04-27 Angus Leeming + + * insettabular.C (LocalDispatch): + * insettext.C (LocalDispatch): getClipboard() is now a BufferView + method + 2001-05-03 Lars Gullik Bjønnes * insettext.C: remvoe !NEW_INSETS cruft diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index a3bced2cd7..73aaf52f8b 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -954,7 +954,7 @@ InsetTabular::LocalDispatch(BufferView * bv, break; case LFUN_PASTESELECTION: { - string clip(bv->workarea()->getClipboard()); + string clip(bv->getClipboard()); if (clip.empty()) break; diff --git a/src/insets/insettext.C b/src/insets/insettext.C index fa69c36dda..f570e72eea 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -959,7 +959,7 @@ InsetText::LocalDispatch(BufferView * bv, break; case LFUN_PASTESELECTION: { - string clip(bv->workarea()->getClipboard()); + string clip(bv->getClipboard()); if (clip.empty()) break; diff --git a/src/lyx_main.C b/src/lyx_main.C index 5dd5799233..de3c9089fd 100644 --- a/src/lyx_main.C +++ b/src/lyx_main.C @@ -658,8 +658,9 @@ void LyX::ReadUIFile(string const & name) break; default: - lex.printError("LyX::ReadUFile: " - "Unknown menu tag: `$$Token'"); + if(!strip(lex.GetString()).empty()) + lex.printError("LyX::ReadUIFile: " + "Unknown menu tag: `$$Token'"); break; } }