// treat <toc> as a special case for compatibility with old code
if (par->GetChar(0) == LyXParagraph::META_INSET) {
Inset * inset = par->GetInset(0);
- char lyx_code = inset->LyxCode();
+ Inset::Code lyx_code = inset->LyxCode();
if (lyx_code == Inset::TOC_CODE){
string temp = "toc";
sgmlOpenTag(ofs, depth, temp);
// more WYSIWYM handling.
if (par->GetChar(0) == LyXParagraph::META_INSET) {
Inset * inset = par->GetInset(0);
- char lyx_code = inset->LyxCode();
+ Inset::Code lyx_code = inset->LyxCode();
if (lyx_code == Inset::LABEL_CODE){
command_name += " id=\"";
command_name += (static_cast<InsetCommand *>(inset))->getContents();
}
}
- sgmlOpenTag(ofs, depth+command_depth, command_name);
+ sgmlOpenTag(ofs, depth + command_depth, command_name);
item_name = "title";
sgmlOpenTag(ofs, depth + 1 + command_depth, item_name);
break;
// Search for Bibtex or Include inset
while ((inset = par->ReturnNextInsetPointer(pos))) {
- if (inset-> LyxCode() == Inset::BIBTEX_CODE) {
+ if (inset->LyxCode() == Inset::BIBTEX_CODE) {
if (!bibkeys.empty())
bibkeys += delim;
bibkeys += static_cast<InsetBibtex*>(inset)->getKeys(delim);
- } else if (inset-> LyxCode() == Inset::INCLUDE_CODE) {
+ } else if (inset->LyxCode() == Inset::INCLUDE_CODE) {
string bk = static_cast<InsetInclude*>(inset)->getKeys(delim);
if (!bk.empty()) {
if (!bibkeys.empty())
return NOT_EDITABLE;
}
+
bool Inset::IsTextInset() const
{
return ((LyxCode() == TEXT_CODE) ||
(LyxCode() == MARGIN_CODE));
}
+
void Inset::Validate(LaTeXFeatures &) const
{
}
{
}
+
void UpdatableInset::ShowInsetCursor(BufferView *)
{
}
+
void UpdatableInset::HideInsetCursor(BufferView *)
{
}
return UNDISPATCHED;
}
+
int UpdatableInset::getMaxWidth(Painter & pain, UpdatableInset const *) const
{
if (owner())
using std::endl;
InsetFoot::InsetFoot(Buffer * bf)
- : InsetCollapsable(bf)
+ : InsetCollapsable(bf)
{
setLabel(_("foot"));
LyXFont font(LyXFont::ALL_SANE);
return InsetText::InsertInset(bv, inset);
}
+
bool InsetFoot::InsertInsetAllowed(Inset * inset) const
{
if ((inset->LyxCode() == Inset::FOOT_CODE) ||
return true;
}
+
LyXFont InsetFoot::GetDrawFont(LyXParagraph * p, int pos) const
{
LyXFont fn = InsetCollapsable::GetDrawFont(p, pos);
- fn.decSize();
- fn.decSize();
+ fn.decSize().decSize();
return fn;
}
}
-bool LyXParagraph::InsertInsetAllowed(Inset *inset)
+bool LyXParagraph::InsertInsetAllowed(Inset * inset)
{
if (inset_owner) {
- printf("CODE:%d\n",inset->LyxCode());
+ lyxerr << "CODE: << " << inset->LyxCode() << endl;
return inset_owner->InsertInsetAllowed(inset);
}
return true;
}
+
Inset * LyXParagraph::GetInset(LyXParagraph::size_type pos)
{
if (pos >= size()) {
}
-bool LyXTabular::SetPWidth(int cell, string width)
+bool LyXTabular::SetPWidth(int cell, string const & width)
{
bool flag = !width.empty();
}
-bool LyXTabular::SetAlignSpecial(int cell, string special, int what)
+bool LyXTabular::SetAlignSpecial(int cell, string const & special, int what)
{
if (what == SET_SPECIAL_MULTI)
cellinfo_of_cell(cell)->align_special = special;
}
-void LyXTabular::OldFormatRead(LyXLex & lex, string fl)
+void LyXTabular::OldFormatRead(LyXLex & lex, string const & fl)
{
int version;
int i, j;
int h = 0;
istream & is = lex.getStream();
- string s;
- s = fl;
+ string s(fl);
if (s.length() > 8)
version = atoi(s.c_str() + 8);
else
version = 1;
- int * cont_row_info;
+ //int * cont_row_info; // unused
if (version < 5) {
lyxerr << "Tabular format < 5 is not supported anymore\n"
/// Returns true if a complete update is necessary, otherwise false
bool SetAlignment(int cell, char align);
///
- bool SetPWidth(int cell, string width);
+ bool SetPWidth(int cell, string const & width);
///
- bool SetAlignSpecial(int cell, string special, int what);
+ bool SetAlignSpecial(int cell, string const & special, int what);
///
char GetAlignment(int cell) const; // add approp. signedness
///
///
void Read(LyXLex &);
///
- void OldFormatRead(LyXLex &, string);
+ void OldFormatRead(LyXLex &, string const &);
///
/// helper function for Latex returns number of newlines
///