#include "gettext.h"
#include "Language.h"
#include "LaTeX.h"
-#include "LyXTextClass.h"
+#include "TextClass.h"
#include "Paragraph.h"
#include "paragraph_funcs.h"
#include "ParagraphList.h"
void setCaptionLabels(Inset & inset, string const & type,
docstring const label, Counters & counters)
{
- LyXText * text = inset.getText(0);
+ Text * text = inset.getText(0);
if (!text)
return;
}
-void setCaptions(Paragraph & par, LyXTextClass const & textclass)
+void setCaptions(Paragraph & par, TextClass const & textclass)
{
if (par.insetlist.empty())
return;
Inset & inset = *it->inset;
if (inset.lyxCode() == Inset::FLOAT_CODE
|| inset.lyxCode() == Inset::WRAP_CODE) {
- docstring const & name = inset.insetName();
+ docstring const name = inset.name();
if (name.empty())
continue;
}
// set the label of a paragraph. This includes the counters.
-void setLabel(Buffer const & buf, ParIterator & it, LyXTextClass const & textclass)
+void setLabel(Buffer const & buf, ParIterator & it, TextClass const & textclass)
{
Paragraph & par = *it;
- LyXLayout_ptr const & layout = par.layout();
+ Layout_ptr const & layout = par.layout();
Counters & counters = textclass.counters();
if (it.pit() == 0) {
break;
}
}
- // FIXME Can insetName() return an empty name for wide or
+ // FIXME Can Inset::name() return an empty name for wide or
// float insets? If not we can put the definition of type
// inside the if (in) clause and use that instead of
// if (!type.empty()).
docstring type;
if (in)
- type = in->insetName();
+ type = in->name();
if (!type.empty()) {
Floating const & fl = textclass.floats().getType(to_ascii(type));
if (it == par_iterator_end(buf.inset()))
return false;
-// if (it.lastpit == 0 && LyXText::isMainText(buf))
+// if (it.lastpit == 0 && Text::isMainText(buf))
// return false;
switch (it->layout()->labeltype) {
case LABEL_CENTERED_TOP_ENVIRONMENT:
case LABEL_STATIC:
case LABEL_ITEMIZE:
- setLabel(buf, it, buf.params().getLyXTextClass());
+ setLabel(buf, it, buf.params().getTextClass());
return true;
case LABEL_SENSITIVE:
void updateLabels(Buffer const & buf, bool childonly)
{
// Use the master text class also for child documents
- LyXTextClass const & textclass = buf.params().getLyXTextClass();
+ TextClass const & textclass = buf.params().getTextClass();
if (!childonly) {
// If this is a child document start with the master
void checkBufferStructure(Buffer & buffer, ParIterator const & par_it)
{
if (par_it->layout()->labeltype == LABEL_COUNTER
- && par_it->layout()->toclevel != LyXLayout::NOT_IN_TOC) {
+ && par_it->layout()->toclevel != Layout::NOT_IN_TOC) {
buffer.tocBackend().updateItem(par_it);
buffer.structureChanged();
}