mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-28 06:49:43 +00:00
Reindent files with tab-stops (instead of 4 spaces). It is allowed to change
now the indent in files owned by myself to tabstops if I did miss some! (but please set your tab-width to 4 ;) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1872 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9a75180e35
commit
63d5070bc3
@ -24,9 +24,9 @@ src/frontends/controllers/ControlInclude.C
|
|||||||
src/frontends/controllers/ControlPreamble.C
|
src/frontends/controllers/ControlPreamble.C
|
||||||
src/frontends/controllers/ControlPrint.C
|
src/frontends/controllers/ControlPrint.C
|
||||||
src/frontends/controllers/ControlSearch.C
|
src/frontends/controllers/ControlSearch.C
|
||||||
|
src/frontends/controllers/ControlToc.C
|
||||||
src/frontends/controllers/helper_funcs.C
|
src/frontends/controllers/helper_funcs.C
|
||||||
src/frontends/gnome/FormCitation.C
|
src/frontends/gnome/FormCitation.C
|
||||||
src/frontends/gnome/FormCopyright.C
|
|
||||||
src/frontends/gnome/FormError.C
|
src/frontends/gnome/FormError.C
|
||||||
src/frontends/gnome/FormIndex.C
|
src/frontends/gnome/FormIndex.C
|
||||||
src/frontends/gnome/FormPrint.C
|
src/frontends/gnome/FormPrint.C
|
||||||
|
@ -66,7 +66,6 @@ bool InsetCollapsable::InsertInset(BufferView * bv, Inset * in)
|
|||||||
"Unable to insert inset." << endl;
|
"Unable to insert inset." << endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return inset.InsertInset(bv, in);
|
return inset.InsertInset(bv, in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ void InsetText::Read(Buffer const * buf, LyXLex & lex)
|
|||||||
|
|
||||||
// delete all instances of LyXText before deleting the paragraps used
|
// delete all instances of LyXText before deleting the paragraps used
|
||||||
// by it.
|
// by it.
|
||||||
for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit){
|
for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit) {
|
||||||
delete (*cit).second;
|
delete (*cit).second;
|
||||||
(*cit).second = 0;
|
(*cit).second = 0;
|
||||||
}
|
}
|
||||||
@ -331,7 +331,7 @@ void InsetText::draw(BufferView * bv, LyXFont const & f,
|
|||||||
|
|
||||||
// if top_x differs we have a rule down and we don't have to clear anything
|
// if top_x differs we have a rule down and we don't have to clear anything
|
||||||
if (!cleared && (top_x == int(x)) &&
|
if (!cleared && (top_x == int(x)) &&
|
||||||
((need_update==INIT)||(need_update==FULL)||(top_baseline!=baseline)||
|
((need_update==INIT)||(need_update==FULL)||(top_baseline!=baseline) ||
|
||||||
(last_drawn_width!=insetWidth)))
|
(last_drawn_width!=insetWidth)))
|
||||||
{
|
{
|
||||||
int w = insetWidth;
|
int w = insetWidth;
|
||||||
@ -558,10 +558,11 @@ void InsetText::Edit(BufferView * bv, int x, int y, unsigned int button)
|
|||||||
// If the inset is empty set the language of the current font to the
|
// If the inset is empty set the language of the current font to the
|
||||||
// language to the surronding text.
|
// language to the surronding text.
|
||||||
#ifndef NEW_INSETS
|
#ifndef NEW_INSETS
|
||||||
if (par->Last() == 0 && !par->next_) {
|
if (par->Last() == 0 && !par->next_)
|
||||||
#else
|
#else
|
||||||
if (par->size() == 0 && !par->next()) {
|
if (par->size() == 0 && !par->next())
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
LyXFont font(LyXFont::ALL_IGNORE);
|
LyXFont font(LyXFont::ALL_IGNORE);
|
||||||
font.setLanguage(bv->getParentLanguage(this));
|
font.setLanguage(bv->getParentLanguage(this));
|
||||||
SetFont(bv, font, false);
|
SetFont(bv, font, false);
|
||||||
@ -1153,10 +1154,11 @@ InsetText::LocalDispatch(BufferView * bv,
|
|||||||
/// If the action has deleted all text in the inset, we need to change the
|
/// If the action has deleted all text in the inset, we need to change the
|
||||||
// language to the language to the surronding text.
|
// language to the language to the surronding text.
|
||||||
#ifndef NEW_INSETS
|
#ifndef NEW_INSETS
|
||||||
if (par->Last() == 0 && !par->next_) {
|
if (par->Last() == 0 && !par->next_)
|
||||||
#else
|
#else
|
||||||
if (par->size() == 0 && !par->next()) {
|
if (par->size() == 0 && !par->next())
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
LyXFont font(LyXFont::ALL_IGNORE);
|
LyXFont font(LyXFont::ALL_IGNORE);
|
||||||
font.setLanguage(bv->getParentLanguage(this));
|
font.setLanguage(bv->getParentLanguage(this));
|
||||||
SetFont(bv, font, false);
|
SetFont(bv, font, false);
|
||||||
@ -1628,13 +1630,6 @@ void InsetText::SetFrameColor(BufferView * bv, LColor::color col)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
LyXFont InsetText::GetDrawFont(BufferView * bv, LyXParagraph * p, int pos) const
|
|
||||||
{
|
|
||||||
return TEXT(bv)->GetFont(bv->buffer(), p, pos);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
int InsetText::cx(BufferView * bv) const
|
int InsetText::cx(BufferView * bv) const
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@ using std::vector;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
int const WIDTH_OF_LINE = 5;
|
int const WIDTH_OF_LINE = 5;
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
@ -263,7 +263,7 @@ void LyXTabular::AppendColumn(int cell)
|
|||||||
c_info[i][j] = cell_info[i][j - 1];
|
c_info[i][j] = cell_info[i][j - 1];
|
||||||
}
|
}
|
||||||
// care about multicolumns
|
// care about multicolumns
|
||||||
if (cell_info[i][column + 1].multicolumn == CELL_BEGIN_OF_MULTICOLUMN) {
|
if (cell_info[i][column + 1].multicolumn==CELL_BEGIN_OF_MULTICOLUMN) {
|
||||||
cell_info[i][column + 1].multicolumn = CELL_PART_OF_MULTICOLUMN;
|
cell_info[i][column + 1].multicolumn = CELL_PART_OF_MULTICOLUMN;
|
||||||
}
|
}
|
||||||
if ((column + 1) == columns_ ||
|
if ((column + 1) == columns_ ||
|
||||||
@ -1043,22 +1043,6 @@ void LyXTabular::Write(Buffer const * buf, ostream & os) const
|
|||||||
<< write_attribute("newpage", tostr(row_info[i].newpage))
|
<< write_attribute("newpage", tostr(row_info[i].newpage))
|
||||||
<< ">\n";
|
<< ">\n";
|
||||||
for (int j = 0; j < columns_; ++j) {
|
for (int j = 0; j < columns_; ++j) {
|
||||||
#if 0
|
|
||||||
if (!i) {
|
|
||||||
os << "<column"
|
|
||||||
<< write_attribute("alignment", tostr(column_info[j].alignment))
|
|
||||||
<< write_attribute("valignment", tostr(column_info[j].valignment))
|
|
||||||
<< write_attribute("leftline", tostr(column_info[j].left_line))
|
|
||||||
<< write_attribute("rightline", tostr(column_info[j].right_line))
|
|
||||||
<< write_attribute("width",
|
|
||||||
VSpace(column_info[j].p_width)
|
|
||||||
.asLyXCommand())
|
|
||||||
<< write_attribute("special", column_info[j].align_special)
|
|
||||||
<< ">\n";
|
|
||||||
} else {
|
|
||||||
os << "<column>\n";
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
os << "<cell"
|
os << "<cell"
|
||||||
<< write_attribute("multicolumn", cell_info[i][j].multicolumn)
|
<< write_attribute("multicolumn", cell_info[i][j].multicolumn)
|
||||||
<< write_attribute("alignment", tostr(cell_info[i][j].alignment))
|
<< write_attribute("alignment", tostr(cell_info[i][j].alignment))
|
||||||
@ -1076,9 +1060,6 @@ void LyXTabular::Write(Buffer const * buf, ostream & os) const
|
|||||||
cell_info[i][j].inset.Write(buf, os);
|
cell_info[i][j].inset.Write(buf, os);
|
||||||
os << "\n\\end_inset \n"
|
os << "\n\\end_inset \n"
|
||||||
<< "</cell>\n";
|
<< "</cell>\n";
|
||||||
#if 0
|
|
||||||
<< "</column>\n";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
os << "</row>\n";
|
os << "</row>\n";
|
||||||
}
|
}
|
||||||
@ -1536,10 +1517,11 @@ void LyXTabular::OldFormatRead(LyXLex & lex, string const & fl)
|
|||||||
int row;
|
int row;
|
||||||
|
|
||||||
#ifndef NEW_INSETS
|
#ifndef NEW_INSETS
|
||||||
for (int i = 0; i < par->Last(); ++i) {
|
for (int i = 0; i < par->Last(); ++i)
|
||||||
#else
|
#else
|
||||||
for (int i = 0; i < par->size(); ++i) {
|
for (int i = 0; i < par->size(); ++i)
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
if (par->IsNewline(i)) {
|
if (par->IsNewline(i)) {
|
||||||
++cell;
|
++cell;
|
||||||
if (cell > GetNumberOfCells()) {
|
if (cell > GetNumberOfCells()) {
|
||||||
@ -2331,11 +2313,11 @@ int LyXTabular::DocBook(Buffer const * buf, ostream & os) const
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
inline
|
inline
|
||||||
void print_n_chars(ostream & os, unsigned char ch, int n)
|
void print_n_chars(ostream & os, unsigned char ch, int n)
|
||||||
{
|
{
|
||||||
os << string(n, ch);
|
os << string(n, ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace anon
|
} // namespace anon
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user