mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
cosmetics, maily s/NULL/0/g as hinted by Joost
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24160 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
a597483545
commit
aac50f83e5
@ -88,7 +88,6 @@ FileName EmbeddedFile::availableFile() const
|
||||
{
|
||||
if (isEnabled() && embedded())
|
||||
return FileName(embeddedFile());
|
||||
else
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -101,7 +100,7 @@ string EmbeddedFile::latexFilename(std::string const & buffer_path) const
|
||||
|
||||
void EmbeddedFile::addInset(Inset const * inset)
|
||||
{
|
||||
if (inset != NULL)
|
||||
if (inset)
|
||||
inset_list_.push_back(inset);
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ public:
|
||||
* @param bind_file bind file
|
||||
* @param unbind_map pointer to a KeyMap that holds \unbind bindings
|
||||
*/
|
||||
bool read(std::string const & bind_file, KeyMap * unbind_map = NULL);
|
||||
bool read(std::string const & bind_file, KeyMap * unbind_map = 0);
|
||||
|
||||
/** write to a bind file.
|
||||
* @param append append to the bind_file instead of overwrite it
|
||||
|
@ -1162,8 +1162,7 @@ void Paragraph::write(ostream & os, BufferParams const & bparams,
|
||||
if (c != '\0')
|
||||
os << to_utf8(docstring(1, c));
|
||||
else
|
||||
lyxerr << "ERROR (Paragraph::writeFile):"
|
||||
" NULL char in structure." << endl;
|
||||
LYXERR0("NUL char in structure.");
|
||||
++column;
|
||||
break;
|
||||
}
|
||||
@ -1273,7 +1272,7 @@ Font const Paragraph::getFontSettings(BufferParams const & bparams,
|
||||
pos_type pos) const
|
||||
{
|
||||
if (pos > size()) {
|
||||
lyxerr << " pos: " << pos << " size: " << size() << endl;
|
||||
LYXERR0("pos: " << pos << " size: " << size());
|
||||
BOOST_ASSERT(pos <= size());
|
||||
}
|
||||
|
||||
@ -1309,8 +1308,7 @@ FontSpan Paragraph::fontSpan(pos_type pos) const
|
||||
}
|
||||
|
||||
// This should not happen, but if so, we take no chances.
|
||||
//lyxerr << "Paragraph::getEndPosOfFontSpan: This should not happen!"
|
||||
// << endl;
|
||||
// LYXERR0("Paragraph::getEndPosOfFontSpan: This should not happen!");
|
||||
return FontSpan(pos, pos);
|
||||
}
|
||||
|
||||
@ -1378,8 +1376,7 @@ FontSize Paragraph::highestFontInRange
|
||||
}
|
||||
|
||||
|
||||
char_type
|
||||
Paragraph::getUChar(BufferParams const & bparams, pos_type pos) const
|
||||
char_type Paragraph::getUChar(BufferParams const & bparams, pos_type pos) const
|
||||
{
|
||||
char_type c = d->text_[pos];
|
||||
if (!lyxrc.rtl_support)
|
||||
@ -1414,7 +1411,6 @@ Paragraph::getUChar(BufferParams const & bparams, pos_type pos) const
|
||||
}
|
||||
if (uc != c && getFontSettings(bparams, pos).isRightToLeft())
|
||||
return uc;
|
||||
else
|
||||
return c;
|
||||
}
|
||||
|
||||
|
@ -2120,11 +2120,11 @@ QTreeWidgetItem * PrefShortcuts::insertShortcutItem(FuncRequest const & lfun,
|
||||
FuncCode action = lfun.action;
|
||||
string const action_name = lyxaction.getActionName(action);
|
||||
QString const lfun_name = toqstr(from_utf8(action_name)
|
||||
+ " " + lfun.argument());
|
||||
+ ' ' + lfun.argument());
|
||||
QString const shortcut = toqstr(seq.print(KeySequence::ForGui));
|
||||
item_type item_tag = tag;
|
||||
|
||||
QTreeWidgetItem * newItem = NULL;
|
||||
QTreeWidgetItem * newItem = 0;
|
||||
// for unbind items, try to find an existing item in the system bind list
|
||||
if (tag == UserUnbind) {
|
||||
QList<QTreeWidgetItem*> const items = shortcutsTW->findItems(lfun_name,
|
||||
@ -2139,13 +2139,13 @@ QTreeWidgetItem * PrefShortcuts::insertShortcutItem(FuncRequest const & lfun,
|
||||
// unmatched removed?).
|
||||
if (!newItem) {
|
||||
item_tag = UserExtraUnbind;
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (!newItem) {
|
||||
switch(lyxaction.getActionType(action)) {
|
||||
case LyXAction::Hidden:
|
||||
return NULL;
|
||||
return 0;
|
||||
case LyXAction::Edit:
|
||||
newItem = new QTreeWidgetItem(editItem_);
|
||||
break;
|
||||
|
@ -680,7 +680,7 @@ bool ParValidator::onoff(string const & name) const
|
||||
} // namespace anon.
|
||||
|
||||
// define a global ParValidator
|
||||
ParValidator * par_validator = NULL;
|
||||
ParValidator * par_validator = 0;
|
||||
|
||||
InsetListingsParams::InsetListingsParams()
|
||||
: inline_(false), params_(), status_(InsetCollapsable::Open)
|
||||
|
@ -1383,7 +1383,7 @@ void InsetMathHull::mutateToText()
|
||||
#if 0
|
||||
// translate to latex
|
||||
ostringstream os;
|
||||
latex(NULL, os, false, false);
|
||||
latex(os, false, false);
|
||||
string str = os.str();
|
||||
|
||||
// insert this text
|
||||
@ -1458,7 +1458,7 @@ void InsetMathHull::revealCodes(Cursor & cur) const
|
||||
// translate to latex
|
||||
cur.markInsert(bv);
|
||||
ostringstream os;
|
||||
write(NULL, os);
|
||||
write(os);
|
||||
string str = os.str();
|
||||
cur.markErase(bv);
|
||||
string::size_type pos = 0;
|
||||
|
@ -210,7 +210,7 @@ void writePlaintextParagraph(Buffer const & buf,
|
||||
break;
|
||||
|
||||
case '\0':
|
||||
LYXERR(Debug::INFO, "writePlaintextFile: NULL char in structure.");
|
||||
LYXERR(Debug::INFO, "writePlaintextFile: NUL char in structure.");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user