mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
Small change for Lars's float-inset so that the caption-label is correct.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@893 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ba96677bdf
commit
0d6da9afad
@ -1,3 +1,11 @@
|
||||
2000-07-18 Juergen Vigna <jug@sad.it>
|
||||
|
||||
* src/insets/insetfloat.C (InsetFloat): use setInsetName to set the
|
||||
name of the inset so that it can be requested outside (text2.C).
|
||||
|
||||
* src/text2.C (SetCounter): modified so it sees insetfloat for caption
|
||||
labels.
|
||||
|
||||
2000-07-17 Lars Gullik Bjønnes <larsbj@lyx.org>
|
||||
|
||||
* src/mathed/formula.h (ConvertFont): constify
|
||||
|
@ -92,6 +92,7 @@ InsetFloat::InsetFloat(string const & type)
|
||||
setAutoCollapse(false);
|
||||
setInsetName("Float");
|
||||
floatType = type;
|
||||
setInsetName(type.c_str());
|
||||
//floatPlacement = "H";
|
||||
}
|
||||
|
||||
|
18
src/text2.C
18
src/text2.C
@ -1933,20 +1933,24 @@ void LyXText::SetCounter(Buffer const * buf, LyXParagraph * par) const
|
||||
string s = layout.labelstring();
|
||||
|
||||
// the caption hack:
|
||||
|
||||
if (layout.labeltype == LABEL_SENSITIVE) {
|
||||
if (par->footnoteflag != LyXParagraph::NO_FOOTNOTE
|
||||
bool isOK = (par->InInset() && par->InInset()->owner() &&
|
||||
(par->InInset()->owner()->LyxCode()==Inset::FLOAT_CODE));
|
||||
if ((isOK && (par->InInset()->owner()->getInsetName() == "figure")) ||
|
||||
(par->footnoteflag != LyXParagraph::NO_FOOTNOTE
|
||||
&& (par->footnotekind == LyXParagraph::FIG
|
||||
|| par->footnotekind == LyXParagraph::WIDE_FIG))
|
||||
|| par->footnotekind == LyXParagraph::WIDE_FIG)))
|
||||
s = (par->getParLanguage(buf->params)->lang() == "hebrew")
|
||||
? ":øåéà" : "Figure:";
|
||||
else if (par->footnoteflag != LyXParagraph::NO_FOOTNOTE
|
||||
else if ((isOK && (par->InInset()->owner()->getInsetName() == "table")) ||
|
||||
(par->footnoteflag != LyXParagraph::NO_FOOTNOTE
|
||||
&& (par->footnotekind == LyXParagraph::TAB
|
||||
|| par->footnotekind == LyXParagraph::WIDE_TAB))
|
||||
|| par->footnotekind == LyXParagraph::WIDE_TAB)))
|
||||
s = (par->getParLanguage(buf->params)->lang() == "hebrew")
|
||||
? ":äìáè" : "Table:";
|
||||
else if (par->footnoteflag != LyXParagraph::NO_FOOTNOTE
|
||||
&& par->footnotekind == LyXParagraph::ALGORITHM)
|
||||
else if ((isOK && (par->InInset()->owner()->getInsetName() == "algorithm")) ||
|
||||
(par->footnoteflag != LyXParagraph::NO_FOOTNOTE
|
||||
&& par->footnotekind == LyXParagraph::ALGORITHM))
|
||||
s = (par->getParLanguage(buf->params)->lang() == "hebrew")
|
||||
? ":íúéøåâìà" : "Algorithm:";
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user