mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Wrap all #warning calls inside #ifdef WITH_WARNINGS blocks.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8598 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d5fff7cbd8
commit
0424a53b20
@ -717,7 +717,9 @@ void BufferView::Pimpl::stuffClipboard(string const & stuff) const
|
||||
|
||||
InsetBase * BufferView::Pimpl::getInsetByCode(InsetBase::Code /*code*/)
|
||||
{
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Does not work for mathed
|
||||
#endif
|
||||
// Ok, this is a little bit too brute force but it
|
||||
// should work for now. Better infrastructure is coming. (Lgb)
|
||||
|
||||
@ -824,7 +826,9 @@ void BufferView::Pimpl::trackChanges()
|
||||
} else {
|
||||
update();
|
||||
bv_->text()->setCursor(bv_->cursor(), 0, 0);
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning changes FIXME
|
||||
#endif
|
||||
bool found = lyx::find::findNextChange(bv_);
|
||||
if (found) {
|
||||
owner_->getDialogs().show("changes");
|
||||
@ -1072,7 +1076,9 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
|
||||
case LFUN_ACCEPT_ALL_CHANGES: {
|
||||
bv_->cursor().reset(bv_->buffer()->inset());
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME changes
|
||||
#endif
|
||||
while (lyx::find::findNextChange(bv_))
|
||||
bv_->getLyXText()->acceptChange(bv_->cursor());
|
||||
update();
|
||||
@ -1081,7 +1087,9 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & cmd)
|
||||
|
||||
case LFUN_REJECT_ALL_CHANGES: {
|
||||
bv_->cursor().reset(bv_->buffer()->inset());
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME changes
|
||||
#endif
|
||||
while (lyx::find::findNextChange(bv_))
|
||||
bv_->getLyXText()->rejectChange(bv_->cursor());
|
||||
update();
|
||||
|
@ -1,3 +1,15 @@
|
||||
2004-05-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* BufferView_pimpl.C:
|
||||
* buffer.C:
|
||||
* counters.C:
|
||||
* cursor.C:
|
||||
* lyxfunc.C
|
||||
* paragraph.C:
|
||||
* pariterator.C:
|
||||
* text.C:
|
||||
* text2.C:
|
||||
* text3.C: wrap #warning calls inside #ifdef WITH_WARNINGS blocks.
|
||||
|
||||
2004-04-01 Alfredo Braunstein <abraunst@lyx.org>
|
||||
|
||||
|
@ -636,7 +636,9 @@ bool Buffer::readFile(LyXLex & lex, string const & filename, par_type pit)
|
||||
bool the_end = readBody(lex);
|
||||
params().setPaperStuff();
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Look here!
|
||||
#endif
|
||||
#if 0
|
||||
if (token == "\\end_document")
|
||||
the_end_read = true;
|
||||
|
@ -289,7 +289,9 @@ string Counters::counterLabel(string const & format)
|
||||
{
|
||||
string label = format;
|
||||
while (true) {
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Using boost::regex would make this code a lot simpler... (Lgb)
|
||||
#endif
|
||||
|
||||
size_t const i = label.find('\\', 0);
|
||||
if (i == string::npos)
|
||||
|
@ -462,7 +462,9 @@ void LCursor::eraseSelection()
|
||||
//lyxerr << "LCursor::eraseSelection" << endl;
|
||||
CursorSlice const & i1 = selBegin();
|
||||
CursorSlice const & i2 = selEnd();
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME
|
||||
#endif
|
||||
if (i1.inset().asMathInset()) {
|
||||
if (i1.idx() == i2.idx()) {
|
||||
i1.cell().erase(i1.pos(), i2.pos());
|
||||
@ -960,7 +962,9 @@ MathGridInset * LCursor::enclosingGrid(idx_type & idx) const
|
||||
|
||||
void LCursor::pullArg()
|
||||
{
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Look here
|
||||
#endif
|
||||
MathArray ar = cell();
|
||||
if (popLeft() && inMathed()) {
|
||||
plainErase();
|
||||
@ -974,7 +978,9 @@ void LCursor::pullArg()
|
||||
|
||||
void LCursor::touch()
|
||||
{
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning look here
|
||||
#endif
|
||||
#if 0
|
||||
DocIterator::const_iterator it = begin();
|
||||
DocIterator::const_iterator et = end();
|
||||
@ -1283,7 +1289,9 @@ string LCursor::selectionAsString(bool label) const
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning and mathed?
|
||||
#endif
|
||||
return string();
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-05-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ControlErrorList.C: wrap #warning calls inside #ifdef
|
||||
WITH_WARNINGS blocks.
|
||||
|
||||
2004-04-01 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* README: removed. It refered to the ancient and impossible to
|
||||
|
@ -71,8 +71,10 @@ void ControlErrorList::goTo(int item)
|
||||
lyx::pos_type const range = end - start;
|
||||
|
||||
// Now make the selection.
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME (goto error)
|
||||
#warning This should be implemented using an LFUN. (Angus)
|
||||
#endif
|
||||
#if 0
|
||||
PosIterator const pos(pit, start);
|
||||
kernel().bufferview()->putSelectionAt(pos, range, false);
|
||||
|
@ -1,3 +1,7 @@
|
||||
2004-05-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* GMenubar.C: wrap #warning calls inside #ifdef WITH_WARNINGS blocks.
|
||||
|
||||
2004-03-31 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* GViewBase.C: remove mention of ControlButtons.h.
|
||||
|
@ -181,7 +181,9 @@ void GMenubar::onSubMenuActivate(MenuItem const * item,
|
||||
break;
|
||||
case MenuItem::Command:
|
||||
{
|
||||
#warning Bindings are not inserted into the menu labels here. (Lgb)
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Bindings are not inserted into the menu labels here. (Lgb)
|
||||
#endif
|
||||
FuncStatus const flag =
|
||||
view_->getLyXFunc().getStatus(i->func());
|
||||
bool on = flag.onoff(true);
|
||||
|
@ -1,3 +1,15 @@
|
||||
2004-05-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* insetbibitem.C:
|
||||
* insetcaption.C:
|
||||
* insetgraphics.C:
|
||||
* insetlatexaccent.C:
|
||||
* insetquotes.C:
|
||||
* insettabular.C:
|
||||
* insettext.C:
|
||||
* updatableinset.C:
|
||||
wrap #warning calls inside #ifdef WITH_WARNINGS blocks.
|
||||
|
||||
2004-04-02 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* insetfloat.C (read): fix yesterday's float fix.
|
||||
|
@ -134,7 +134,9 @@ int bibitemMaxWidth(BufferView * bv, LyXFont const &)
|
||||
ParagraphList::iterator end = bv->buffer()->paragraphs().end();
|
||||
for (; it != end; ++it) {
|
||||
if (it->bibitem()) {
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning metrics broken!
|
||||
#endif
|
||||
int const wx = it->bibitem()->width();
|
||||
if (wx > w)
|
||||
w = wx;
|
||||
|
@ -92,7 +92,9 @@ void InsetCaption::draw(PainterInfo & pi, int x, int y) const
|
||||
InsetOld * i2 = i1 ? i1->owner() : 0;
|
||||
string type;
|
||||
if (i2->lyxCode() == FLOAT_CODE)
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Now, what happens for i2 == 0?
|
||||
#endif
|
||||
type = static_cast<InsetFloat *>(i2)->params().type;
|
||||
else if (i2->lyxCode() == WRAP_CODE)
|
||||
type = static_cast<InsetWrap *>(i2)->params().type;
|
||||
|
@ -543,7 +543,9 @@ int InsetGraphics::latex(Buffer const & buf, ostream & os,
|
||||
|
||||
// A missing (e)ps-extension is no problem for LaTeX, so
|
||||
// we have to test three different cases
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning uh, but can our cache handle it ? no.
|
||||
#endif
|
||||
string const file_ = params().filename.absFilename();
|
||||
bool const file_exists =
|
||||
!file_.empty() &&
|
||||
|
@ -433,7 +433,9 @@ void InsetLatexAccent::draw(PainterInfo & pi, int x, int baseline) const
|
||||
// closer to the top of the dot-less 'i' or 'j'.
|
||||
char tmpic = ic; // store the ic when we
|
||||
ic = 'x'; // calculates the ascent of
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning metrics?
|
||||
#endif
|
||||
int asc = ascent(); // the dot-less version (here: 'x')
|
||||
ic = tmpic; // set the orig ic back
|
||||
y = baseline - asc; // update to new y coord.
|
||||
|
@ -270,7 +270,9 @@ int InsetQuotes::latex(Buffer const & buf, ostream & os,
|
||||
lyx::pos_type curr_pos = ownerPar(buf, this).getPositionOfInset(this);
|
||||
BOOST_ASSERT(curr_pos != -1);
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME. We _must_ find another way to get the language. (Lgb)
|
||||
#endif
|
||||
#if 0
|
||||
// This cannot be used. (Lgb)
|
||||
string const curr_lang =
|
||||
|
@ -898,7 +898,9 @@ int InsetTabular::docbook(Buffer const & buf, ostream & os,
|
||||
int ret = 0;
|
||||
InsetOld * master = 0;
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Why not pass a proper DocIterator here?
|
||||
#endif
|
||||
#if 0
|
||||
// if the table is inside a float it doesn't need the informaltable
|
||||
// wrapper. Search for it.
|
||||
@ -1749,7 +1751,9 @@ int InsetTabularMailer::string2params(string const & in, InsetTabular & inset)
|
||||
LyXLex lex(0,0);
|
||||
lex.setStream(data);
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning CHECK verify that this is a sane value to return.
|
||||
#endif
|
||||
if (in.empty())
|
||||
return -1;
|
||||
|
||||
@ -1794,7 +1798,9 @@ int InsetTabularMailer::string2params(string const & in, InsetTabular & inset)
|
||||
string const InsetTabularMailer::params2string(InsetTabular const & inset)
|
||||
{
|
||||
ostringstream data;
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning wrong!
|
||||
#endif
|
||||
//data << name_ << " \\active_cell " << inset.getActCell() << '\n';
|
||||
data << name_ << " \\active_cell " << 0 << '\n';
|
||||
inset.write(inset.buffer(), data);
|
||||
|
@ -152,7 +152,9 @@ void InsetText::read(Buffer const & buf, LyXLex & lex)
|
||||
{
|
||||
clear(false);
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning John, look here. Doesnt make much sense.
|
||||
#endif
|
||||
if (buf.params().tracking_changes)
|
||||
paragraphs().begin()->trackChanges();
|
||||
|
||||
@ -294,7 +296,9 @@ void InsetText::edit(LCursor & cur, bool left)
|
||||
cur.clearSelection();
|
||||
finishUndo();
|
||||
sanitizeEmptyText(cur.bv());
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning can someone check if/when this is needed?
|
||||
#endif
|
||||
//Andre?
|
||||
// updateLocal(cur);
|
||||
}
|
||||
@ -491,9 +495,11 @@ LyXText * InsetText::getText(int i) const
|
||||
|
||||
void InsetText::appendParagraphs(Buffer * buffer, ParagraphList & plist)
|
||||
{
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME Check if Changes stuff needs changing here. (Lgb)
|
||||
// And it probably does. You have to take a look at this John. (Lgb)
|
||||
#warning John, have a look here. (Lgb)
|
||||
#endif
|
||||
ParagraphList::iterator pit = plist.begin();
|
||||
ParagraphList::iterator ins = paragraphs().insert(paragraphs().end(), *pit);
|
||||
++pit;
|
||||
|
@ -55,7 +55,9 @@ void UpdatableInset::scroll(BufferView & bv, float s) const
|
||||
|
||||
scx = int(s * workW / 2);
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning metrics?
|
||||
#endif
|
||||
if (tmp_xo_ + scx + width() < workW / 2)
|
||||
scx = workW / 2 - tmp_xo_ - width();
|
||||
}
|
||||
|
@ -1250,7 +1250,9 @@ void LyXFunc::dispatch(FuncRequest const & cmd, bool verbose)
|
||||
}
|
||||
|
||||
case LFUN_BREAKLINE: {
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning swallow 'Return' if the minibuffer is focused. But how?
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,9 @@
|
||||
2004-05-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* formulamacro.C:
|
||||
* math_binaryopinset.C:
|
||||
* math_nestinset.C:
|
||||
wrap #warning calls inside #ifdef WITH_WARNINGS blocks.
|
||||
|
||||
2004-03-31 Alfredo Braunstein <abraunst@lyx.org>
|
||||
|
||||
|
@ -155,7 +155,9 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
|
||||
pi.pain.fillRectangle(x, a, w, h, LColor::mathmacrobg);
|
||||
pi.pain.rectangle(x, a, w, h, LColor::mathframe);
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME
|
||||
#endif
|
||||
#if 0
|
||||
LCursor & cur = p.base.bv->cursor();
|
||||
if (cur.isInside(this))
|
||||
|
@ -38,7 +38,9 @@ int MathBinaryOpInset::opwidth() const
|
||||
}
|
||||
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Andre, have a look here. (Lgb)
|
||||
#endif
|
||||
#if 0
|
||||
// That this is not declared in class MathBinaryOpInset makes
|
||||
// Doxygen give warnings. (Lgb)
|
||||
|
@ -784,7 +784,9 @@ void MathNestInset::priv_dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning look here
|
||||
#endif
|
||||
#if 0
|
||||
|
||||
case LFUN_WORD_REPLACE:
|
||||
@ -997,7 +999,9 @@ bool MathNestInset::interpret(LCursor & cur, char c)
|
||||
if (cur.inMacroArgMode()) {
|
||||
cur.posLeft();
|
||||
cur.plainErase();
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME
|
||||
#endif
|
||||
#if 0
|
||||
int n = c - '0';
|
||||
MathMacroTemplate const * p = formula()->asMacroTemplate();
|
||||
|
@ -1526,7 +1526,9 @@ Paragraph::getParLanguage(BufferParams const & bparams) const
|
||||
{
|
||||
if (!empty())
|
||||
return getFirstFontSettings().language();
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME we should check the prev par as well (Lgb)
|
||||
#endif
|
||||
return bparams.language;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,9 @@ ParIterator & ParIterator::operator++()
|
||||
|
||||
ParIterator & ParIterator::operator--()
|
||||
{
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning look here
|
||||
#endif
|
||||
// DocIterator::backwardPar();
|
||||
return *this;
|
||||
}
|
||||
|
@ -1,3 +1,8 @@
|
||||
2004-05-04 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* filetools.C:
|
||||
wrap #warning calls inside #ifdef WITH_WARNINGS blocks.
|
||||
|
||||
2004-04-05 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* filetools.C (RunCommand): block SIGCHLD during popen/pclose
|
||||
|
@ -1283,7 +1283,9 @@ void readBB_lyxerrMessage(string const & file, bool & zipped,
|
||||
{
|
||||
lyxerr[Debug::GRAPHICS] << "[readBB_from_PSFile] "
|
||||
<< message << std::endl;
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Why is this func deleting a file? (Lgb)
|
||||
#endif
|
||||
if (zipped)
|
||||
unlink(file);
|
||||
}
|
||||
|
10
src/text.C
10
src/text.C
@ -609,7 +609,9 @@ int LyXText::leftMargin(par_type pit, pos_type pos) const
|
||||
// row in this paragraph.
|
||||
RowList::iterator rit = pars_[pit].rows.begin();
|
||||
RowList::iterator end = pars_[pit].rows.end();
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning This is wrong.
|
||||
#endif
|
||||
int minfill = maxwidth_;
|
||||
for ( ; rit != end; ++rit)
|
||||
if (rit->fill() < minfill)
|
||||
@ -1454,7 +1456,9 @@ void LyXText::acceptChange(LCursor & cur)
|
||||
redoParagraph(startc.par());
|
||||
setCursorIntern(cur, startc.par(), 0);
|
||||
}
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning handle multi par selection
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1474,7 +1478,9 @@ void LyXText::rejectChange(LCursor & cur)
|
||||
redoParagraph(startc.par());
|
||||
setCursorIntern(cur, startc.par(), 0);
|
||||
}
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning handle multi par selection
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@ -1573,7 +1579,9 @@ void LyXText::changeCase(LCursor & cur, LyXText::TextCase action)
|
||||
break;
|
||||
}
|
||||
}
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning changes
|
||||
#endif
|
||||
pars_[pit].setChar(pos, c);
|
||||
++pos;
|
||||
}
|
||||
@ -1959,7 +1967,9 @@ bool LyXText::read(Buffer const & buf, LyXLex & lex)
|
||||
}
|
||||
|
||||
if (token == "\\end_document") {
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning Look here!
|
||||
#endif
|
||||
#if 0
|
||||
lex.printError("\\end_document read in inset! Error in document!");
|
||||
#endif
|
||||
|
@ -110,7 +110,9 @@ LyXFont LyXText::getFont(par_type pit, pos_type pos) const
|
||||
BOOST_ASSERT(pos >= 0);
|
||||
|
||||
LyXLayout_ptr const & layout = pars_[pit].layout();
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning broken?
|
||||
#endif
|
||||
BufferParams const & params = bv()->buffer()->params();
|
||||
pos_type const body_pos = pars_[pit].beginOfBody();
|
||||
|
||||
|
@ -684,7 +684,9 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
case LFUN_BACKSPACE_SKIP:
|
||||
// Reverse the effect of LFUN_BREAKPARAGRAPH_SKIP.
|
||||
if (!cur.selection()) {
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning look here
|
||||
#endif
|
||||
//CursorSlice cur = cursor();
|
||||
backspace(cur);
|
||||
//anchor() = cur;
|
||||
@ -851,7 +853,9 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd)
|
||||
case LFUN_PASTE:
|
||||
cur.message(_("Paste"));
|
||||
lyx::cap::replaceSelection(cur);
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME Check if the arg is in the domain of available selections.
|
||||
#endif
|
||||
if (isStrUnsignedInt(cmd.argument))
|
||||
pasteSelection(cur, strToUnsignedInt(cmd.argument));
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user