mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 21:05:12 +00:00
Preliminary longtable caption support. If there is a caption in the first cell of the table it will be labeled as a table.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17060 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
52b5a2c5e1
commit
96512e74cb
@ -40,6 +40,7 @@
|
||||
#include "insets/insetbibitem.h"
|
||||
#include "insets/insetcaption.h"
|
||||
#include "insets/insetinclude.h"
|
||||
#include "insets/insettabular.h"
|
||||
|
||||
#include "support/filetools.h"
|
||||
#include "support/fs_extras.h"
|
||||
@ -400,19 +401,23 @@ void setCaptions(Paragraph & par, LyXTextClass const & textclass)
|
||||
InsetList::iterator end = par.insetlist.end();
|
||||
for (; it != end; ++it) {
|
||||
InsetBase & inset = *it->inset;
|
||||
if (inset.lyxCode() != InsetBase::FLOAT_CODE
|
||||
&& inset.lyxCode() != InsetBase::WRAP_CODE)
|
||||
continue;
|
||||
if (inset.lyxCode() == InsetBase::FLOAT_CODE
|
||||
|| inset.lyxCode() == InsetBase::WRAP_CODE) {
|
||||
docstring const & name = inset.getInsetName();
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
docstring const & name = inset.getInsetName();
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
Floating const & fl = textclass.floats().getType(to_ascii(name));
|
||||
// FIXME UNICODE
|
||||
string const & type = fl.type();
|
||||
docstring const label = from_utf8(fl.name());
|
||||
setCaptionLabels(inset, type, label, counters);
|
||||
Floating const & fl = textclass.floats().getType(to_ascii(name));
|
||||
// FIXME UNICODE
|
||||
string const & type = fl.type();
|
||||
docstring const label = from_utf8(fl.name());
|
||||
setCaptionLabels(inset, type, label, counters);
|
||||
}
|
||||
else if (inset.lyxCode() == InsetBase::TABULAR_CODE
|
||||
&& static_cast<InsetTabular &>(inset).tabular.isLongTabular()) {
|
||||
// FIXME: are "table" and "Table" the correct type and label?
|
||||
setCaptionLabels(inset, "table", from_ascii("Table"), counters);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user