From c1173eb11c5f218cd459924eb44276445c499069 Mon Sep 17 00:00:00 2001 From: Pavel Sanda Date: Mon, 8 Sep 2008 01:18:33 +0000 Subject: [PATCH] Coding style git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26335 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BiblioInfo.cpp | 2 +- src/Buffer.cpp | 2 +- src/Color.cpp | 6 +++--- src/TextClass.cpp | 2 +- src/frontends/qt4/GuiDocument.cpp | 2 +- src/frontends/qt4/GuiFontMetrics.cpp | 8 ++++---- src/frontends/qt4/GuiSelectionManager.cpp | 2 +- src/frontends/qt4/GuiWorkArea.cpp | 2 +- src/frontends/qt4/TocWidget.cpp | 2 +- src/mathed/MathExtern.cpp | 8 ++++---- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/BiblioInfo.cpp b/src/BiblioInfo.cpp index 896d8fc4a8..76c0a87aac 100644 --- a/src/BiblioInfo.cpp +++ b/src/BiblioInfo.cpp @@ -470,7 +470,7 @@ CitationStyle citationStyleFromString(string const & command) size_t const n = cmd.size() - 1; if (cmd != "cite" && cmd[n] == '*') { s.full = true; - cmd = cmd.substr(0,n); + cmd = cmd.substr(0, n); } char const * const * const last = citeCommands + nCiteCommands; diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 1a769cf0ba..161178bd56 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -1232,7 +1232,7 @@ void Buffer::writeDocBookSource(odocstream & os, string const & fname, if (runparams.flavor == OutputParams::XML) top += params().language->code(); else - top += params().language->code().substr(0,2); + top += params().language->code().substr(0, 2); top += '"'; if (!params().options.empty()) { diff --git a/src/Color.cpp b/src/Color.cpp index f4e84aeee1..1e5fc621a1 100644 --- a/src/Color.cpp +++ b/src/Color.cpp @@ -77,9 +77,9 @@ RGBColor rgbFromHexName(string const & x11hexname) { RGBColor c; LASSERT(x11hexname.size() == 7 && x11hexname[0] == '#', /**/); - c.r = hexstrToInt(x11hexname.substr(1,2)); - c.g = hexstrToInt(x11hexname.substr(3,2)); - c.b = hexstrToInt(x11hexname.substr(5,2)); + c.r = hexstrToInt(x11hexname.substr(1, 2)); + c.g = hexstrToInt(x11hexname.substr(3, 2)); + c.b = hexstrToInt(x11hexname.substr(5, 2)); return c; } diff --git a/src/TextClass.cpp b/src/TextClass.cpp index a594375cda..5c79fa6e9c 100644 --- a/src/TextClass.cpp +++ b/src/TextClass.cpp @@ -1017,7 +1017,7 @@ InsetLayout const & DocumentClass::insetLayout(docstring const & name) const size_t i = n.find(':'); if (i == string::npos) break; - n = n.substr(0,i); + n = n.substr(0, i); } return plain_insetlayout_; } diff --git a/src/frontends/qt4/GuiDocument.cpp b/src/frontends/qt4/GuiDocument.cpp index 51399bd4c5..60cccaadb1 100644 --- a/src/frontends/qt4/GuiDocument.cpp +++ b/src/frontends/qt4/GuiDocument.cpp @@ -474,7 +474,7 @@ void PreambleModule::update(BufferParams const & params, BufferId id) Coords::const_iterator it = preamble_coords_.find(current_id_); if (it == preamble_coords_.end()) // First time we open this one. - preamble_coords_[current_id_] = make_pair(0,0); + preamble_coords_[current_id_] = make_pair(0, 0); else { // Restore saved coords. QTextCursor cur = preambleTE->textCursor(); diff --git a/src/frontends/qt4/GuiFontMetrics.cpp b/src/frontends/qt4/GuiFontMetrics.cpp index 1acafed3fb..76ebd90706 100644 --- a/src/frontends/qt4/GuiFontMetrics.cpp +++ b/src/frontends/qt4/GuiFontMetrics.cpp @@ -79,7 +79,7 @@ int GuiFontMetrics::lbearing(char_type c) const if (!is_utf16(c)) // FIXME: QFontMetrics::leftBearingdoes not support the // full unicode range. Once it does, we could use: - //return metrics_.leftBearing(toqstr(docstring(1,c))); + //return metrics_.leftBearing(toqstr(docstring(1, c))); return 0; return metrics_.leftBearing(ucs4_to_qchar(c)); @@ -104,7 +104,7 @@ int GuiFontMetrics::rbearing(char_type c) const } else { // FIXME: QFontMetrics::leftBearing does not support the // full unicode range. Once it does, we could use: - // metrics_.rightBearing(toqstr(docstring(1,c))); + // metrics_.rightBearing(toqstr(docstring(1, c))); value = width(c); } @@ -125,7 +125,7 @@ int GuiFontMetrics::smallcapsWidth(char_type c) const else return metrics_.width(qc); } else { - QString const s = toqstr(docstring(1,c)); + QString const s = toqstr(docstring(1, c)); QString const us = s.toUpper(); if (s != us) return smallcaps_metrics_.width(us); @@ -216,7 +216,7 @@ GuiFontMetrics::AscendDescend const GuiFontMetrics::fillMetricsCache( if (is_utf16(c)) r = metrics_.boundingRect(ucs4_to_qchar(c)); else - r = metrics_.boundingRect(toqstr(docstring(1,c))); + r = metrics_.boundingRect(toqstr(docstring(1, c))); AscendDescend ad = { -r.top(), r.bottom() + 1}; // We could as well compute the width but this is not really diff --git a/src/frontends/qt4/GuiSelectionManager.cpp b/src/frontends/qt4/GuiSelectionManager.cpp index 55484b410e..4156765cc4 100644 --- a/src/frontends/qt4/GuiSelectionManager.cpp +++ b/src/frontends/qt4/GuiSelectionManager.cpp @@ -214,7 +214,7 @@ void GuiSelectionManager::deletePB_clicked() if (nrows > 1) selectedLV->setCurrentIndex(idx); else if (nrows == 1) - selectedLV->setCurrentIndex(selectedLV->model()->index(0,0)); + selectedLV->setCurrentIndex(selectedLV->model()->index(0, 0)); selectedHasFocus_ = (nrows > 0); updateHook(); } diff --git a/src/frontends/qt4/GuiWorkArea.cpp b/src/frontends/qt4/GuiWorkArea.cpp index 230396a0fd..52b9f554a6 100644 --- a/src/frontends/qt4/GuiWorkArea.cpp +++ b/src/frontends/qt4/GuiWorkArea.cpp @@ -1102,7 +1102,7 @@ void GuiWorkArea::inputMethodEvent(QInputMethodEvent * e) QVariant GuiWorkArea::inputMethodQuery(Qt::InputMethodQuery query) const { - QRect cur_r(0,0,0,0); + QRect cur_r(0, 0, 0, 0); switch (query) { // this is the CJK-specific composition window position. case Qt::ImMicroFocus: diff --git a/src/frontends/qt4/TocWidget.cpp b/src/frontends/qt4/TocWidget.cpp index dbf4948aa5..6d0b355589 100644 --- a/src/frontends/qt4/TocWidget.cpp +++ b/src/frontends/qt4/TocWidget.cpp @@ -132,7 +132,7 @@ void TocWidget::setTreeDepth(int depth) // but my qt 4.1.2 doesn't have expandAll().. //tocTV->expandAll(); QModelIndexList indices = tocTV->model()->match( - tocTV->model()->index(0,0), + tocTV->model()->index(0, 0), Qt::DisplayRole, "*", -1, Qt::MatchFlags(Qt::MatchWildcard|Qt::MatchRecursive)); diff --git a/src/mathed/MathExtern.cpp b/src/mathed/MathExtern.cpp index 0515179da0..2340120bad 100644 --- a/src/mathed/MathExtern.cpp +++ b/src/mathed/MathExtern.cpp @@ -1139,7 +1139,7 @@ namespace { string mid = out.substr(i + 13, j - i - 13); if (mid.find("\\over") != npos) mid = '{' + mid + '}'; - out = out.substr(0,i) + out = out.substr(0, i) + mid + out.substr(k + 1); //lyxerr << "output: " << out << endl; @@ -1155,10 +1155,10 @@ namespace { size_t k = get_matching_brace(out, i + 5); if (k == npos || k + 1 == out.size()) break; - out = out.substr(0,j - 1) + out = out.substr(0, j - 1) + "\\frac" - + out.substr(j,i - j) - + out.substr(i + 5,k - i - 4) + + out.substr(j, i - j) + + out.substr(i + 5, k - i - 4) + out.substr(k + 2); //lyxerr << "output: " << out << endl; i = out.find("\\over", i + 4);