]> git.lyx.org Git - lyx.git/commitdiff
Coding style
authorPavel Sanda <sanda@lyx.org>
Mon, 8 Sep 2008 01:18:33 +0000 (01:18 +0000)
committerPavel Sanda <sanda@lyx.org>
Mon, 8 Sep 2008 01:18:33 +0000 (01:18 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26335 a592a061-630c-0410-9148-cb99ea01b6c8

src/BiblioInfo.cpp
src/Buffer.cpp
src/Color.cpp
src/TextClass.cpp
src/frontends/qt4/GuiDocument.cpp
src/frontends/qt4/GuiFontMetrics.cpp
src/frontends/qt4/GuiSelectionManager.cpp
src/frontends/qt4/GuiWorkArea.cpp
src/frontends/qt4/TocWidget.cpp
src/mathed/MathExtern.cpp

index 896d8fc4a8a1d895f1805c2641a47fdf3cb9fb1c..76c0a87aac6330a658dfdc59e38633357b870b9b 100644 (file)
@@ -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;
index 1a769cf0baf9369cdfc04eca2c72967e0fe225fc..161178bd561addbd719f242176562407946206dd 100644 (file)
@@ -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()) {
index f4e84aeee1c0087cf013ac279fc763f014e96396..1e5fc621a19b380378defd122a9ca1eca2a38211 100644 (file)
@@ -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;
 }
 
index a594375cda5930118f51d3513ea237c56dc77d64..5c79fa6e9c5b1e30c490c18766decc7bb9471716 100644 (file)
@@ -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_;
 }
index 51399bd4c54b44f9d0d71a282dcc8724510178da..60cccaadb1fba0e524d263ceb8577ca2cea1d33b 100644 (file)
@@ -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();
index 1acafed3fb4e65ac458f3665be66f7ea30a1f7f4..76ebd907064e088a442cdd03fb2097196c1a2f8e 100644 (file)
@@ -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
index 55484b410ef5a7be681a0b287c6b701c9f9149bb..4156765cc43e679aea506c5887fc7649dba2ad67 100644 (file)
@@ -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();
 }
index 230396a0fd3b35f76cca399448593d0e317e248f..52b9f554a6319e3aa37f642f702ffc421a9db4bd 100644 (file)
@@ -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:
index dbf4948aa585d348f430ece9a02f6f73ae67eab2..6d0b355589a03de98aa764b0e96988afc198ab10 100644 (file)
@@ -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));
 
index 0515179da042532c819126b75c3a6d0c480d550b..2340120bad0f35edc0a7101b37605a44f00da371 100644 (file)
@@ -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);