]> git.lyx.org Git - features.git/commitdiff
Match header/source function argument naming
authorYuriy Skalko <yuriy.skalko@gmail.com>
Sat, 31 Oct 2020 17:18:51 +0000 (19:18 +0200)
committerYuriy Skalko <yuriy.skalko@gmail.com>
Sun, 1 Nov 2020 20:23:44 +0000 (22:23 +0200)
53 files changed:
src/Buffer.cpp
src/BufferList.cpp
src/BufferView.cpp
src/Cursor.cpp
src/Cursor.h
src/CutAndPaste.h
src/Floating.h
src/Font.cpp
src/FontInfo.cpp
src/Format.cpp
src/FuncRequest.cpp
src/Graph.cpp
src/KeySequence.h
src/LaTeXFeatures.cpp
src/LaTeXFeatures.h
src/Language.cpp
src/LayoutFile.h
src/Lexer.cpp
src/Lexer.h
src/LyXAction.cpp
src/MetricsInfo.h
src/Paragraph.cpp
src/ParagraphParameters.cpp
src/Server.h
src/Session.cpp
src/Text.h
src/Text3.cpp
src/TextMetrics.h
src/frontends/qt/FloatPlacement.h
src/frontends/qt/GuiClipboard.h
src/frontends/qt/GuiCounter.h
src/frontends/qt/GuiGraphics.cpp
src/frontends/qt/qt_helpers.cpp
src/frontends/qt/qt_helpers.h
src/insets/ExternalTransforms.h
src/insets/Inset.cpp
src/insets/InsetGraphicsParams.cpp
src/insets/InsetInfo.cpp
src/insets/InsetLabel.cpp
src/insets/InsetListingsParams.cpp
src/insets/InsetSeparator.h
src/insets/InsetSpace.h
src/mathed/InsetMath.cpp
src/mathed/InsetMathAMSArray.h
src/mathed/InsetMathCases.cpp
src/mathed/InsetMathDots.h
src/mathed/InsetMathMacroTemplate.cpp
src/mathed/InsetMathMacroTemplate.h
src/mathed/InsetMathUnknown.cpp
src/mathed/MacroTable.cpp
src/mathed/TextPainter.cpp
src/output_plaintext.h
src/tex2lyx/tex2lyx.h

index 64a3daa4aa4635a89f560e878b843c2f8bdc65e8..d1831d49aab8079e7f210d4852447ee0486b8c1c 100644 (file)
@@ -3525,19 +3525,19 @@ bool Buffer::hasChildren() const
 }
 
 
-void Buffer::collectChildren(ListOfBuffers & clist, bool grand_children) const
+void Buffer::collectChildren(ListOfBuffers & children, bool grand_children) const
 {
        // loop over children
        for (auto const & p : d->children_positions) {
                Buffer * child = const_cast<Buffer *>(p.first);
                // No duplicates
-               ListOfBuffers::const_iterator bit = find(clist.begin(), clist.end(), child);
-               if (bit != clist.end())
+               ListOfBuffers::const_iterator bit = find(children.begin(), children.end(), child);
+               if (bit != children.end())
                        continue;
-               clist.push_back(child);
+               children.push_back(child);
                if (grand_children)
                        // there might be grandchildren
-                       child->collectChildren(clist, true);
+                       child->collectChildren(children, true);
        }
 }
 
index 0cfbec135da4b55253ba5f92f53a77347728508c..198e0bfad047c354c4c9cf48cf2edae6c77800fd 100644 (file)
@@ -312,21 +312,21 @@ Buffer * BufferList::getBuffer(support::FileName const & fname, bool internal) c
 }
 
 
-Buffer * BufferList::getBufferFromTmp(string const & s, bool realpath)
+Buffer * BufferList::getBufferFromTmp(string const & path, bool realpath)
 {
        for (Buffer * buf : bstore) {
                string const temppath = realpath ? FileName(buf->temppath()).realPath() : buf->temppath();
-               if (prefixIs(s, temppath)) {
+               if (prefixIs(path, temppath)) {
                        // check whether the filename matches the master
                        string const master_name = buf->latexName();
-                       if (suffixIs(s, master_name))
+                       if (suffixIs(path, master_name))
                                return buf;
                        // if not, try with the children
                        for (Buffer * child : buf->getDescendants()) {
                                string const mangled_child_name = DocFileName(
                                        changeExtension(child->absFileName(),
                                                ".tex")).mangledFileName();
-                               if (suffixIs(s, mangled_child_name))
+                               if (suffixIs(path, mangled_child_name))
                                        return child;
                        }
                }
index 05630cba0bfdf68c9a7356c0e302661f41c2e2bb..4e704e3249fac83c947672941961eaef892926a4 100644 (file)
@@ -654,24 +654,24 @@ string BufferView::contextMenu(int x, int y) const
 
 
 
-void BufferView::scrollDocView(int const value, bool update)
+void BufferView::scrollDocView(int const pixels, bool update)
 {
        // The scrollbar values are relative to the top of the screen, therefore the
        // offset is equal to the target value.
 
        // No scrolling at all? No need to redraw anything
-       if (value == 0)
+       if (pixels == 0)
                return;
 
        // If the offset is less than 2 screen height, prefer to scroll instead.
-       if (abs(value) <= 2 * height_) {
-               d->anchor_ypos_ -= value;
+       if (abs(pixels) <= 2 * height_) {
+               d->anchor_ypos_ -= pixels;
                processUpdateFlags(Update::Force);
                return;
        }
 
        // cut off at the top
-       if (value <= d->scrollbarParameters_.min) {
+       if (pixels <= d->scrollbarParameters_.min) {
                DocIterator dit = doc_iterator_begin(&buffer_);
                showCursor(dit, false, update);
                LYXERR(Debug::SCROLLING, "scroll to top");
@@ -679,7 +679,7 @@ void BufferView::scrollDocView(int const value, bool update)
        }
 
        // cut off at the bottom
-       if (value >= d->scrollbarParameters_.max) {
+       if (pixels >= d->scrollbarParameters_.max) {
                DocIterator dit = doc_iterator_end(&buffer_);
                dit.backwardPos();
                showCursor(dit, false, update);
@@ -692,11 +692,11 @@ void BufferView::scrollDocView(int const value, bool update)
        pit_type i = 0;
        for (; i != int(d->par_height_.size()); ++i) {
                par_pos += d->par_height_[i];
-               if (par_pos >= value)
+               if (par_pos >= pixels)
                        break;
        }
 
-       if (par_pos < value) {
+       if (par_pos < pixels) {
                // It seems we didn't find the correct pit so stay on the safe side and
                // scroll to bottom.
                LYXERR0("scrolling position not found!");
@@ -706,7 +706,7 @@ void BufferView::scrollDocView(int const value, bool update)
 
        DocIterator dit = doc_iterator_begin(&buffer_);
        dit.pit() = i;
-       LYXERR(Debug::SCROLLING, "value = " << value << " -> scroll to pit " << i);
+       LYXERR(Debug::SCROLLING, "pixels = " << pixels << " -> scroll to pit " << i);
        showCursor(dit, false, update);
 }
 
@@ -2425,21 +2425,21 @@ int BufferView::minVisiblePart()
 }
 
 
-int BufferView::scroll(int y)
+int BufferView::scroll(int pixels)
 {
-       if (y > 0)
-               return scrollDown(y);
-       if (y < 0)
-               return scrollUp(-y);
+       if (pixels > 0)
+               return scrollDown(pixels);
+       if (pixels < 0)
+               return scrollUp(-pixels);
        return 0;
 }
 
 
-int BufferView::scrollDown(int offset)
+int BufferView::scrollDown(int pixels)
 {
        Text * text = &buffer_.text();
        TextMetrics & tm = d->text_metrics_[text];
-       int const ymax = height_ + offset;
+       int const ymax = height_ + pixels;
        while (true) {
                pair<pit_type, ParagraphMetrics const *> last = tm.last();
                int bottom_pos = last.second->position() + last.second->descent();
@@ -2448,38 +2448,38 @@ int BufferView::scrollDown(int offset)
                if (last.first + 1 == int(text->paragraphs().size())) {
                        if (bottom_pos <= height_)
                                return 0;
-                       offset = min(offset, bottom_pos - height_);
+                       pixels = min(pixels, bottom_pos - height_);
                        break;
                }
                if (bottom_pos > ymax)
                        break;
                tm.newParMetricsDown();
        }
-       d->anchor_ypos_ -= offset;
-       return -offset;
+       d->anchor_ypos_ -= pixels;
+       return -pixels;
 }
 
 
-int BufferView::scrollUp(int offset)
+int BufferView::scrollUp(int pixels)
 {
        Text * text = &buffer_.text();
        TextMetrics & tm = d->text_metrics_[text];
-       int ymin = - offset;
+       int ymin = - pixels;
        while (true) {
                pair<pit_type, ParagraphMetrics const *> first = tm.first();
                int top_pos = first.second->position() - first.second->ascent();
                if (first.first == 0) {
                        if (top_pos >= 0)
                                return 0;
-                       offset = min(offset, - top_pos);
+                       pixels = min(pixels, - top_pos);
                        break;
                }
                if (top_pos < ymin)
                        break;
                tm.newParMetricsUp();
        }
-       d->anchor_ypos_ += offset;
-       return offset;
+       d->anchor_ypos_ += pixels;
+       return pixels;
 }
 
 
index 9e7867c8d3a234807e6aaa30cc4561e5a10b2303..97fbeb6a88704bd67a7a500531befdbd11ae25b3 100644 (file)
@@ -637,9 +637,9 @@ void CursorData::recordUndo(UndoKind kind) const
 }
 
 
-void CursorData::recordUndoInset(Inset const * in) const
+void CursorData::recordUndoInset(Inset const * inset) const
 {
-       buffer()->undo().recordUndoInset(*this, in);
+       buffer()->undo().recordUndoInset(*this, inset);
 }
 
 
@@ -897,19 +897,19 @@ void Cursor::pop()
 }
 
 
-void Cursor::push(Inset & p)
+void Cursor::push(Inset & inset)
 {
-       push_back(CursorSlice(p));
-       p.setBuffer(*buffer());
+       push_back(CursorSlice(inset));
+       inset.setBuffer(*buffer());
 }
 
 
-void Cursor::pushBackward(Inset & p)
+void Cursor::pushBackward(Inset & inset)
 {
        LASSERT(!empty(), return);
        //lyxerr << "Entering inset " << t << " front" << endl;
-       push(p);
-       p.idxFirst(*this);
+       push(inset);
+       inset.idxFirst(*this);
 }
 
 
@@ -1379,19 +1379,19 @@ void Cursor::updateTextTargetOffset()
 }
 
 
-bool Cursor::selHandle(bool sel)
+bool Cursor::selHandle(bool selecting)
 {
        //lyxerr << "Cursor::selHandle" << endl;
        if (mark())
-               sel = true;
-       if (sel == selection())
+               selecting = true;
+       if (selecting == selection())
                return false;
 
-       if (!sel)
+       if (!selecting)
                cap::saveSelection(*this);
 
        resetAnchor();
-       selection(sel);
+       selection(selecting);
        return true;
 }
 
index 951a0cc4dba778736dea35bcac32363349700628..6f4ac227f99114b02f3d52621b666ac1e6283ce5 100644 (file)
@@ -270,7 +270,7 @@ public:
        void setCursorData(CursorData const & data);
 
        /// returns true if we made a decision
-       bool getStatus(FuncRequest const & cmd, FuncStatus & flag) const;
+       bool getStatus(FuncRequest const & cmd, FuncStatus & status) const;
        /// dispatch from innermost inset upwards
        void dispatch(FuncRequest const & cmd);
        /// display a message
index fcbac19a8982f00ff7f156cdd3ab75af2d8e7763..09fe05215a5bffc189e7499130a279394e47ff4e 100644 (file)
@@ -127,8 +127,8 @@ void pasteParagraphList(Cursor & cur, ParagraphList const & parlist,
  *  for a list of paragraphs beginning with the specified par.
  *  It changes layouts and character styles.
  */
-void switchBetweenClasses(DocumentClassConstPtr c1,
-                       DocumentClassConstPtr c2, InsetText & in, ErrorList &);
+void switchBetweenClasses(DocumentClassConstPtr oldone,
+                       DocumentClassConstPtr newone, InsetText & in, ErrorList &);
 
 /// Get the current selection as a string. Does not change the selection.
 /// Does only work if the whole selection is in mathed.
index a6f2ec3431b0f5dfbd17b7ef458ca41db88f5dd4..4672d9ac753b6f6cad0fef0b15b8ca17fe067628 100644 (file)
@@ -36,10 +36,10 @@ public:
                 std::string const & style, std::string const & name,
                 std::string const & listName, std::string const & listCmd,
                 std::string const & refPrefix, std::string const & allowedplacement,
-                std::string const & htmlType, std::string const & htmlClass,
+                std::string const & htmlTag, std::string const & htmlAttrib,
                 docstring const & htmlStyle,
                 std::string const & docbookAttr, std::string const & docbookTagType,
-                std::string const & required, bool usesfloat, bool isprefined,
+                std::string const & required, bool usesfloat, bool ispredefined,
                 bool allowswide, bool allowssideways);
        ///
        std::string const & floattype() const { return floattype_; }
index aed80592a58fde7cb34bb0c4d976fb88bc53ddb8..b70c237db4d14498f798ea42e60c2a2036b9400d 100644 (file)
@@ -114,18 +114,18 @@ void Font::setLanguage(Language const * l)
 
 /// Updates font settings according to request
 void Font::update(Font const & newfont,
-                    Language const * document_language,
+                    Language const * default_lang,
                     bool toggleall)
 {
        bits_.update(newfont.fontInfo(), toggleall);
 
        if (newfont.language() == language() && toggleall)
-               if (language() == document_language)
+               if (language() == default_lang)
                        setLanguage(default_language);
                else
-                       setLanguage(document_language);
+                       setLanguage(default_lang);
        else if (newfont.language() == reset_language)
-               setLanguage(document_language);
+               setLanguage(default_lang);
        else if (newfont.language() != ignore_language)
                setLanguage(newfont.language());
 }
index 02a9e70e1e4d455b1acd4df05e48fd3226ba2343..967771373a08417dd6ecb93b868c21ec3aac4200 100644 (file)
@@ -343,9 +343,9 @@ Changer FontInfo::changeStyle(MathStyle const new_style)
 }
 
 
-Changer FontInfo::change(FontInfo font, bool realiz)
+Changer FontInfo::change(FontInfo font, bool realize)
 {
-       if (realiz)
+       if (realize)
                font.realize(*this);
        return make_change(*this, font);
 }
index d639dbfd9fca1b9efe75ef91ac45a06fd5222284..6a3d49ca530883a7247e94954d0d407c9795573c 100644 (file)
@@ -94,9 +94,9 @@ string const Format::extensions() const
 }
 
 
-bool Format::hasExtension(string const & e) const
+bool Format::hasExtension(string const & ext) const
 {
-       return (find(extension_list_.begin(), extension_list_.end(), e)
+       return (find(extension_list_.begin(), extension_list_.end(), ext)
                != extension_list_.end());
 }
 
index 2049210529f39226573334370379561a7da9d708..0d6a487b8ae256a154b047fdd3540ef570402477 100644 (file)
@@ -55,9 +55,9 @@ FuncRequest::FuncRequest(FuncCode act, string const & arg, Origin o)
 
 
 FuncRequest::FuncRequest(FuncCode act, int ax, int ay,
-                        mouse_button::state but, KeyModifier modifier, Origin o)
+                        mouse_button::state button, KeyModifier modifier, Origin o)
        : action_(act), origin_(o), view_origin_(nullptr), x_(ax), y_(ay),
-         button_(but), modifier_(modifier), allow_async_(true)
+         button_(button), modifier_(modifier), allow_async_(true)
 {}
 
 
index f78be287b28e15605ffdc3baa41367891f26d5f4..86694eea585da9f5006da496ede63615a24c9f7e 100644 (file)
@@ -45,11 +45,11 @@ bool Graph::bfs_init(int s, bool clear_visited, queue<int> & Q)
 
 
 Graph::EdgePath const
-       Graph::getReachableTo(int target, bool clear_visited)
+       Graph::getReachableTo(int to, bool clear_visited)
 {
        EdgePath result;
        queue<int> Q;
-       if (!bfs_init(target, clear_visited, Q))
+       if (!bfs_init(to, clear_visited, Q))
                return result;
 
        // Here's the logic, which is shared by the other routines.
@@ -61,7 +61,7 @@ Graph::EdgePath const
        while (!Q.empty()) {
                int const current = Q.front();
                Q.pop();
-               if (current != target || theFormats().get(target).name() != "lyx")
+               if (current != to || theFormats().get(to).name() != "lyx")
                        result.push_back(current);
 
                vector<Arrow *>::iterator it = vertices_[current].in_arrows.begin();
index 444fb0871975095d14a8be5b59fb1762602e61a0..6e46abac2c95a583a76bc48ded8e14383ab5702f 100644 (file)
@@ -40,12 +40,12 @@ public:
        /**
         * Add a key to the key sequence and look it up in the curmap
         * if the latter is defined.
-        * @param keysym the key to add
+        * @param key the key to add
         * @param mod modifier mask
         * @param nmod which modifiers to mask out for equality test
         * @return the action matching this key sequence or LFUN_UNKNOWN_ACTION
         */
-       FuncRequest const & addkey(KeySymbol const & keysym, KeyModifier mod,
+       FuncRequest const & addkey(KeySymbol const & key, KeyModifier mod,
               KeyModifier nmod = NoModifier);
 
        /**
index 347a3e04501113d6d1afb0cca100891d6eadb767..59769a02f5ccf3ca325b5ac6841d4efa468aec78 100644 (file)
@@ -832,15 +832,15 @@ TexString getSnippets(std::list<TexString> const & list)
 } // namespace
 
 
-void LaTeXFeatures::addPreambleSnippet(TexString ts, bool allow_dupes)
+void LaTeXFeatures::addPreambleSnippet(TexString snippet, bool allow_dupes)
 {
-       addSnippet(preamble_snippets_, move(ts), allow_dupes);
+       addSnippet(preamble_snippets_, move(snippet), allow_dupes);
 }
 
 
-void LaTeXFeatures::addPreambleSnippet(docstring const & str, bool allow_dupes)
+void LaTeXFeatures::addPreambleSnippet(docstring const & snippet, bool allow_dupes)
 {
-       addSnippet(preamble_snippets_, TexString(str), allow_dupes);
+       addSnippet(preamble_snippets_, TexString(snippet), allow_dupes);
 }
 
 
index 27edb1f6a89303f799dd3941bbe98c0a8076bb27..2cc90cdbacfb3384f9905f0286cbb3a51c6d7851 100644 (file)
@@ -142,7 +142,7 @@ public:
        void getFontEncodings(std::vector<std::string> & encodings,
                              bool const onlylangs = false) const;
        ///
-       void useLayout(docstring const & lyt);
+       void useLayout(docstring const & layoutname);
        ///
        void useInsetLayout(InsetLayout const & lay);
        ///
index dad933f0c6cd392fcd5b4bd3b45e0ec1693d37ad..884d1a039bb7078ba141013e693a6ba15b65843f 100644 (file)
@@ -57,22 +57,22 @@ bool Language::isBabelExclusive() const
 }
 
 
-docstring const Language::translateLayout(string const & m) const
+docstring const Language::translateLayout(string const & msg) const
 {
-       if (m.empty())
+       if (msg.empty())
                return docstring();
 
-       if (!isAscii(m)) {
-               lyxerr << "Warning: not translating `" << m
+       if (!isAscii(msg)) {
+               lyxerr << "Warning: not translating `" << msg
                       << "' because it is not pure ASCII.\n";
-               return from_utf8(m);
+               return from_utf8(msg);
        }
 
-       TranslationMap::const_iterator it = layoutTranslations_.find(m);
+       TranslationMap::const_iterator it = layoutTranslations_.find(msg);
        if (it != layoutTranslations_.end())
                return it->second;
 
-       docstring t = from_ascii(m);
+       docstring t = from_ascii(msg);
        cleanTranslation(t);
        return t;
 }
index 81dff9de78d39e9eef4dca1d374691c3d0c52a05..f2b27a118d6a72d83aafc7a5818d567c469d93b1 100644 (file)
@@ -107,7 +107,7 @@ public:
        /// Read textclass list. Returns false if this fails.
        bool read();
        /// Clears the textclass so as to force it to be reloaded
-       void reset(LayoutFileIndex const & tc);
+       void reset(LayoutFileIndex const & classname);
 
        /// Add a default textclass with all standard layouts.
        /// Note that this will over-write any information we may have
index b11bf4743a549c4044fcd94c288dd25ef178bbc4..08fb469ce392392ec3bce8a9ebea7ca866c88d24 100644 (file)
@@ -944,9 +944,9 @@ bool Lexer::checkFor(char const * required)
 }
 
 
-void Lexer::setContext(std::string const & str)
+void Lexer::setContext(std::string const & functionName)
 {
-       pimpl_->context = str;
+       pimpl_->context = functionName;
 }
 
 
index 9568b6e19de63e7a8992d61513066280411cac87..6ecdd909891d5c3cc08c0a43e9244ba2debd971a 100644 (file)
@@ -138,14 +138,14 @@ public:
        std::string const getString(bool trim = false) const;
        ///
        docstring const getDocString(bool trim = false) const;
-       /** Get a long string, ended by the tag `endtag'.
+       /** Get a long string, ended by the tag `endtoken'.
            This string can span several lines. The first line
            serves as a template for how many spaces the lines
            are indented. This much white space is skipped from
            each following line. This mechanism does not work
            perfectly if you use tabs.
        */
-       docstring getLongString(docstring const & endtag);
+       docstring getLongString(docstring const & endtoken);
 
        /// Pushes a token list on a stack and replaces it with a new one.
        template<int N> void pushTable(LexerKeyword (&table)[N])
index 23cc74504bbe5b7582d4626cc0c03ee877e9e05d..8b13630d8688552b990ad00f5d158f1dc8b2b2c8 100644 (file)
@@ -4490,9 +4490,9 @@ LyXAction::LyXAction()
 }
 
 
-FuncRequest LyXAction::lookupFunc(string const & func) const
+FuncRequest LyXAction::lookupFunc(string const & func_name) const
 {
-       string const func2 = trim(func);
+       string const func2 = trim(func_name);
 
        if (func2.empty())
                return FuncRequest(LFUN_NOACTION);
index 1508eb345f9e751086704101de6c7912b8a43214..14fd02642a46e95a9518c1f743c712a801e29529 100644 (file)
@@ -55,7 +55,7 @@ public:
        int macro_nesting;
 
        /// Temporarily change a full font.
-       Changer changeFontSet(std::string const & font);
+       Changer changeFontSet(std::string const & name);
        /// Temporarily change the font to math if needed.
        Changer changeEnsureMath(Inset::mode_type mode = Inset::MATH_MODE);
        // Temporarily change to the style suitable for use in fractions
index 4ade252e723e6a3fae9949c0ef6bd19458017065..c668f3b686734b8c267a6a6e6a8bbce5035e6c67 100644 (file)
@@ -1560,19 +1560,19 @@ void flushString(ostream & os, docstring & s)
 
 
 void Paragraph::write(ostream & os, BufferParams const & bparams,
-       depth_type & dth) const
+       depth_type & depth) const
 {
        // The beginning or end of a deeper (i.e. nested) area?
-       if (dth != d->params_.depth()) {
-               if (d->params_.depth() > dth) {
-                       while (d->params_.depth() > dth) {
+       if (depth != d->params_.depth()) {
+               if (d->params_.depth() > depth) {
+                       while (d->params_.depth() > depth) {
                                os << "\n\\begin_deeper";
-                               ++dth;
+                               ++depth;
                        }
                } else {
-                       while (d->params_.depth() < dth) {
+                       while (d->params_.depth() < depth) {
                                os << "\n\\end_deeper";
-                               --dth;
+                               --depth;
                        }
                }
        }
@@ -1685,11 +1685,11 @@ void Paragraph::validate(LaTeXFeatures & features) const
 }
 
 
-void Paragraph::insert(pos_type start, docstring const & str,
+void Paragraph::insert(pos_type pos, docstring const & str,
                       Font const & font, Change const & change)
 {
        for (size_t i = 0, n = str.size(); i != n ; ++i)
-               insertChar(start + i, str[i], font, change);
+               insertChar(pos + i, str[i], font, change);
 }
 
 
@@ -4129,12 +4129,12 @@ void Paragraph::setPlainLayout(DocumentClass const & tc)
 }
 
 
-void Paragraph::setPlainOrDefaultLayout(DocumentClass const & tclass)
+void Paragraph::setPlainOrDefaultLayout(DocumentClass const & tc)
 {
        if (usePlainLayout())
-               setPlainLayout(tclass);
+               setPlainLayout(tc);
        else
-               setDefaultLayout(tclass);
+               setDefaultLayout(tc);
 }
 
 
index e6348797dd2f1e6d6a1f56d80ef60c61430cee86..72b2286b1284588385a5adaa924fa863dbae2f14 100644 (file)
@@ -244,14 +244,14 @@ void ParagraphParameters::read(Lexer & lex, bool merge)
 
 
 void ParagraphParameters::apply(
-               ParagraphParameters const & p, Layout const & layout)
+               ParagraphParameters const & params, Layout const & layout)
 {
-       spacing(p.spacing());
+       spacing(params.spacing());
        // does the layout allow the new alignment?
-       if (p.align() & layout.alignpossible)
-               align(p.align());
-       labelWidthString(p.labelWidthString());
-       noindent(p.noindent());
+       if (params.align() & layout.alignpossible)
+               align(params.align());
+       labelWidthString(params.labelWidthString());
+       noindent(params.noindent());
 }
 
 
index e20406a6d418c7ca9388011164d5818627bf4f75..9257704b439beb11e2a01b6d69517a009c1a5b2f 100644 (file)
@@ -206,7 +206,7 @@ public:
        // lyxserver is using a buffer that is being edited with a bufferview.
        // With a common buffer list this is not a problem, maybe. (Alejandro)
        ///
-       Server(std::string const & pip);
+       Server(std::string const & pipes);
        ///
        ~Server();
        ///
index 43c1b9b93edb2f64d4a40cc609a6d130038acbaa..c80bca5222ff4e8d91b51e901cdd81bb4ef9f8a0 100644 (file)
@@ -383,9 +383,9 @@ void LastCommandsSection::setNumberOfLastCommands(unsigned int no)
 }
 
 
-void LastCommandsSection::add(std::string const & string)
+void LastCommandsSection::add(std::string const & command)
 {
-       lastcommands.push_back(string);
+       lastcommands.push_back(command);
 }
 
 
index 1c5d4397f495a070eadc152166dc003a520e75d8..4defd94fa610e513ea29948da6f4fa7cf1e03e46 100644 (file)
@@ -258,7 +258,7 @@ public:
         settings are given to the new one.
         This function will handle a multi-paragraph selection.
         */
-       void setParagraphs(Cursor const & cur, docstring const & arg, bool modify = false);
+       void setParagraphs(Cursor const & cur, docstring const & arg, bool merge = false);
        /// Sets parameters for current or selected paragraphs
        void setParagraphs(Cursor const & cur, ParagraphParameters const & p);
 
index 74f86b26f384280abbe73913550ac6eb059dc2ed..1927a2536ae1dbc16e4267796540ce93e25f0df1 100644 (file)
@@ -2890,7 +2890,7 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
 
 
 bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
-                       FuncStatus & flag) const
+                       FuncStatus & status) const
 {
        LBUFERR(this == cur.text());
 
@@ -2913,7 +2913,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                // FIXME We really should not allow this to be put, e.g.,
                // in a footnote, or in ERT. But it would make sense in a
                // branch, so I'm not sure what to do.
-               flag.setOnOff(cur.paragraph().params().startOfAppendix());
+               status.setOnOff(cur.paragraph().params().startOfAppendix());
                break;
 
        case LFUN_DIALOG_SHOW_NEW_INSET:
@@ -3043,7 +3043,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                        if (cit == floats.end() ||
                                        // and that we know how to generate a list of them
                            (!cit->second.usesFloatPkg() && cit->second.listCommand().empty())) {
-                               flag.setUnknown(true);
+                               status.setUnknown(true);
                                // probably not necessary, but...
                                enable = false;
                        }
@@ -3227,38 +3227,38 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                break;
 
        case LFUN_FONT_EMPH:
-               flag.setOnOff(fontinfo.emph() == FONT_ON);
+               status.setOnOff(fontinfo.emph() == FONT_ON);
                enable = !cur.paragraph().isPassThru();
                break;
 
        case LFUN_FONT_ITAL:
-               flag.setOnOff(fontinfo.shape() == ITALIC_SHAPE);
+               status.setOnOff(fontinfo.shape() == ITALIC_SHAPE);
                enable = !cur.paragraph().isPassThru();
                break;
 
        case LFUN_FONT_NOUN:
-               flag.setOnOff(fontinfo.noun() == FONT_ON);
+               status.setOnOff(fontinfo.noun() == FONT_ON);
                enable = !cur.paragraph().isPassThru();
                break;
 
        case LFUN_FONT_BOLD:
        case LFUN_FONT_BOLDSYMBOL:
-               flag.setOnOff(fontinfo.series() == BOLD_SERIES);
+               status.setOnOff(fontinfo.series() == BOLD_SERIES);
                enable = !cur.paragraph().isPassThru();
                break;
 
        case LFUN_FONT_SANS:
-               flag.setOnOff(fontinfo.family() == SANS_FAMILY);
+               status.setOnOff(fontinfo.family() == SANS_FAMILY);
                enable = !cur.paragraph().isPassThru();
                break;
 
        case LFUN_FONT_ROMAN:
-               flag.setOnOff(fontinfo.family() == ROMAN_FAMILY);
+               status.setOnOff(fontinfo.family() == ROMAN_FAMILY);
                enable = !cur.paragraph().isPassThru();
                break;
 
        case LFUN_FONT_TYPEWRITER:
-               flag.setOnOff(fontinfo.family() == TYPEWRITER_FAMILY);
+               status.setOnOff(fontinfo.family() == TYPEWRITER_FAMILY);
                enable = !cur.paragraph().isPassThru();
                break;
 
@@ -3414,7 +3414,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                if (!ins)
                        enable = false;
                else
-                       flag.setOnOff(to_utf8(cmd.argument()) == ins->getParams().groupId);
+                       status.setOnOff(to_utf8(cmd.argument()) == ins->getParams().groupId);
                break;
        }
 
@@ -3426,7 +3426,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
 
        case LFUN_LANGUAGE:
                enable = !cur.paragraph().isPassThru();
-               flag.setOnOff(cmd.getArg(0) == cur.real_current_font.language()->lang());
+               status.setOnOff(cmd.getArg(0) == cur.real_current_font.language()->lang());
                break;
 
        case LFUN_PARAGRAPH_BREAK:
@@ -3451,7 +3451,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                docstring const layout = resolveLayout(req_layout, cur);
 
                enable = !owner_->forcePlainLayout() && !layout.empty();
-               flag.setOnOff(isAlreadyLayout(layout, cur));
+               status.setOnOff(isAlreadyLayout(layout, cur));
                break;
        }
 
@@ -3660,7 +3660,7 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
                || (cur.paragraph().layout().pass_thru && !allow_in_passthru)))
                enable = false;
 
-       flag.setEnabled(enable);
+       status.setEnabled(enable);
        return true;
 }
 
index f7f30fa08ec865c1ef23fd6f25b3aea2ea1532c0..096f92a7eb79b86190994c76f71d82a8de4b98d6 100644 (file)
@@ -221,9 +221,9 @@ public:
        void setCursorFromCoordinates(Cursor & cur, int x, int y);
 
        ///
-       int cursorX(CursorSlice const & cursor, bool boundary) const;
+       int cursorX(CursorSlice const & sl, bool boundary) const;
        ///
-       int cursorY(CursorSlice const & cursor, bool boundary) const;
+       int cursorY(CursorSlice const & sl, bool boundary) const;
 
        ///
        bool cursorHome(Cursor & cur);
index 96d45dfc45eb42a83901a471ac4d8c803dc6be5a..fcdafc3400e0b5199660f25dee4abba67d84e02b 100644 (file)
@@ -47,7 +47,7 @@ public:
        ///
        void setPlacement(std::string const & placement);
        ///
-       void setAlignment(std::string const & placement);
+       void setAlignment(std::string const & alignment);
        ///
        std::string const getPlacement() const;
        ///
index 9e48b4ee079caf45055a604cbfeed48640f62f95..278adb8425a625d5d4ccdfe7fdb1382065e8578b 100644 (file)
@@ -73,7 +73,7 @@ public:
        void put(std::string const & text) const override;
        void put(std::string const & lyx, docstring const & html, docstring const & text) override;
        bool hasGraphicsContents(GraphicsType type = AnyGraphicsType) const override;
-       bool hasTextContents(TextType typetype = AnyTextType) const override;
+       bool hasTextContents(TextType type = AnyTextType) const override;
        bool isInternal() const override;
        bool hasInternal() const override;
        bool empty() const override;
index fb589d6c7d4a4f33bae831ea400f5ef71a05c3ae..d512a8b06ee1247d685db0dcd301730b0625ebf5 100644 (file)
@@ -40,7 +40,7 @@ private:
        bool checkWidgets(bool readonly) const override;
        bool initialiseParams(std::string const & data) override;
        //@}
-       void processParams(InsetCommandParams const & icp);
+       void processParams(InsetCommandParams const & params);
        ///
        void fillCombos();
        ///
index 142f433759bce2a660be0b8149b57b559f1b53b7..10764c19ca5ca209b57afefc1936b23d1bc581b7 100644 (file)
@@ -492,7 +492,7 @@ void GuiGraphics::on_angle_textChanged(const QString & file_name)
 }
 
 
-void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
+void GuiGraphics::paramsToDialog(InsetGraphicsParams const & params)
 {
        static char const * const bb_units[] = { "bp", "cm", "mm", "in" };
        static char const * const bb_units_gui[] = { N_("bp"), N_("cm"), N_("mm"), N_("in[[unit of measure]]") };
@@ -519,12 +519,12 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
 
        //lyxerr << bufferFilePath();
        string const name =
-               igp.filename.outputFileName(fromqstr(bufferFilePath()));
+               params.filename.outputFileName(fromqstr(bufferFilePath()));
        filename->setText(toqstr(name));
 
        // set the bounding box values
-       if (igp.bbox.empty()) {
-               string const bb = readBoundingBox(igp.filename.absFileName());
+       if (params.bbox.empty()) {
+               string const bb = readBoundingBox(params.filename.absFileName());
                // the values from the file always have the bigpoint-unit bp
                doubleToWidget(lbX, token(bb, ' ', 0));
                doubleToWidget(lbY, token(bb, ' ', 1));
@@ -537,32 +537,32 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
                bbChanged = false;
        } else {
                // get the values from the inset
-               doubleToWidget(lbX, igp.bbox.xl.value());
-               string unit = unit_name[igp.bbox.xl.unit()];
+               doubleToWidget(lbX, params.bbox.xl.value());
+               string unit = unit_name[params.bbox.xl.unit()];
                lbXunit->setCurrentIndex(lbXunit->findData(toqstr(unit)));
-               doubleToWidget(lbY, igp.bbox.yb.value());
-               unit = unit_name[igp.bbox.yb.unit()];
+               doubleToWidget(lbY, params.bbox.yb.value());
+               unit = unit_name[params.bbox.yb.unit()];
                lbYunit->setCurrentIndex(lbYunit->findData(toqstr(unit)));
-               doubleToWidget(rtX, igp.bbox.xr.value());
-               unit = unit_name[igp.bbox.xr.unit()];
+               doubleToWidget(rtX, params.bbox.xr.value());
+               unit = unit_name[params.bbox.xr.unit()];
                rtXunit->setCurrentIndex(rtXunit->findData(toqstr(unit)));
-               doubleToWidget(rtY, igp.bbox.yt.value());
-               unit = unit_name[igp.bbox.yt.unit()];
+               doubleToWidget(rtY, params.bbox.yt.value());
+               unit = unit_name[params.bbox.yt.unit()];
                rtYunit->setCurrentIndex(rtYunit->findData(toqstr(unit)));
                bbChanged = true;
        }
 
        // Update the draft and clip mode
-       draftCB->setChecked(igp.draft);
-       clip->setChecked(igp.clip);
-       displayGB->setChecked(igp.display);
-       displayscale->setText(toqstr(convert<string>(igp.lyxscale)));
+       draftCB->setChecked(params.draft);
+       clip->setChecked(params.clip);
+       displayGB->setChecked(params.display);
+       displayscale->setText(toqstr(convert<string>(params.lyxscale)));
 
        // the output section (width/height)
 
-       doubleToWidget(Scale, igp.scale);
+       doubleToWidget(Scale, params.scale);
        //igp.scale defaults to 100, so we treat it as empty
-       bool const scaleChecked = !igp.scale.empty() && igp.scale != "100";
+       bool const scaleChecked = !params.scale.empty() && params.scale != "100";
        scaleCB->blockSignals(true);
        scaleCB->setChecked(scaleChecked);
        scaleCB->blockSignals(false);
@@ -578,17 +578,17 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
        for (; it != end; ++it)
                groupCO->addItem(toqstr(*it), toqstr(*it));
        groupCO->insertItem(0, qt_("None"), QString());
-       if (igp.groupId.empty())
+       if (params.groupId.empty())
                groupCO->setCurrentIndex(0);
        else
                groupCO->setCurrentIndex(
-                       groupCO->findData(toqstr(igp.groupId), Qt::MatchExactly));
+                       groupCO->findData(toqstr(params.groupId), Qt::MatchExactly));
        groupCO->blockSignals(false);
 
-       if (igp.width.value() == 0)
+       if (params.width.value() == 0)
                lengthToWidgets(Width, widthUnit, _(autostr), defaultUnit);
        else
-               lengthToWidgets(Width, widthUnit, igp.width, defaultUnit);
+               lengthToWidgets(Width, widthUnit, params.width, defaultUnit);
 
        bool const widthChecked = !Width->text().isEmpty() &&
                Width->text() != qt_(autostr);
@@ -598,10 +598,10 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
        Width->setEnabled(widthChecked);
        widthUnit->setEnabled(widthChecked);
 
-       if (igp.height.value() == 0)
+       if (params.height.value() == 0)
                lengthToWidgets(Height, heightUnit, _(autostr), defaultUnit);
        else
-               lengthToWidgets(Height, heightUnit, igp.height, defaultUnit);
+               lengthToWidgets(Height, heightUnit, params.height, defaultUnit);
 
        bool const heightChecked = !Height->text().isEmpty()
                && Height->text() != qt_(autostr);
@@ -618,11 +618,11 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
        setAutoText();
        updateAspectRatioStatus();
 
-       doubleToWidget(angle, igp.rotateAngle);
-       rotateOrderCB->setChecked(igp.scaleBeforeRotation);
+       doubleToWidget(angle, params.rotateAngle);
+       rotateOrderCB->setChecked(params.scaleBeforeRotation);
 
        rotateOrderCB->setEnabled( (widthChecked || heightChecked || scaleChecked)
-               && igp.rotateAngle != "0");
+               && params.rotateAngle != "0");
 
        origin->clear();
 
@@ -631,13 +631,13 @@ void GuiGraphics::paramsToDialog(InsetGraphicsParams const & igp)
                        toqstr(rorigin_lyx_strs[i]));
        }
 
-       if (!igp.rotateOrigin.empty())
-               origin->setCurrentIndex(origin->findData(toqstr(igp.rotateOrigin)));
+       if (!params.rotateOrigin.empty())
+               origin->setCurrentIndex(origin->findData(toqstr(params.rotateOrigin)));
        else
                origin->setCurrentIndex(0);
 
        // latex section
-       latexoptions->setText(toqstr(igp.special));
+       latexoptions->setText(toqstr(params.special));
        // cf bug #3852
        filename->setFocus();
 }
index d9cc3644e1f7d87fc38e4475310fa174330e0629..dcac28f734a912a234ea365cb00287c2443dbddc 100644 (file)
@@ -686,7 +686,7 @@ QStringList fileFilters(QString const & desc)
 }
 
 
-QString formatToolTip(QString text, int em)
+QString formatToolTip(QString text, int width)
 {
        // 1. QTooltip activates word wrapping only if mightBeRichText()
        //    is true. So we convert the text to rich text.
@@ -704,9 +704,9 @@ QString formatToolTip(QString text, int em)
        // Compute desired width in pixels
        QFont const font = QToolTip::font();
 #if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
-       int const px_width = em * QFontMetrics(font).horizontalAdvance("M");
+       int const px_width = width * QFontMetrics(font).horizontalAdvance("M");
 #else
-       int const px_width = em * QFontMetrics(font).width("M");
+       int const px_width = width * QFontMetrics(font).width("M");
 #endif
        // Determine the ideal width of the tooltip
        QTextDocument td("");
@@ -723,12 +723,12 @@ QString formatToolTip(QString text, int em)
 }
 
 
-QString qtHtmlToPlainText(QString const & html)
+QString qtHtmlToPlainText(QString const & text)
 {
-       if (!Qt::mightBeRichText(html))
-               return html;
+       if (!Qt::mightBeRichText(text))
+               return text;
        QTextDocument td;
-       td.setHtml(html);
+       td.setHtml(text);
        return td.toPlainText();
 }
 
index 92c72f3b26918d975e1cd9b1ab859449674002a0..102c0137de91ed6a24d1e0b73dc77742710d623a 100644 (file)
@@ -244,9 +244,9 @@ private:
 #endif
 
 
-// Check if qstr is understood as rich text (Qt HTML) and if so, produce a
+// Check if text is understood as rich text (Qt HTML) and if so, produce a
 // rendering in plain text.
-QString qtHtmlToPlainText(QString const & qstr);
+QString qtHtmlToPlainText(QString const & text);
 
 
 } // namespace lyx
index 10c3dccd12431d3a11784275c8d3e0f0c59b75b3..8b22f622c87b6efc4dc0936e1bc7869ab39f7cf7 100644 (file)
@@ -46,7 +46,7 @@ public:
 class ExtraData {
 public:
        std::string const get(std::string const & id) const;
-       void set(std::string const & id, std::string const & contents);
+       void set(std::string const & id, std::string const & data);
 
        typedef std::map<std::string, std::string>::const_iterator const_iterator;
        const_iterator begin() const { return data_.begin(); }
index b561533998ede6e1dbfe86249d35abc77ec78f12..14f9f7f19b2acd0ff479f4f06caac1a556ceb700 100644 (file)
@@ -381,7 +381,7 @@ void Inset::doDispatch(Cursor & cur, FuncRequest &cmd)
 
 
 bool Inset::getStatus(Cursor &, FuncRequest const & cmd,
-       FuncStatus & flag) const
+       FuncStatus & status) const
 {
        // LFUN_INSET_APPLY is sent from the dialogs when the data should
        // be applied. This is either changed to LFUN_INSET_MODIFY (if the
@@ -396,20 +396,20 @@ bool Inset::getStatus(Cursor &, FuncRequest const & cmd,
                // Allow modification of our data.
                // This needs to be handled in the doDispatch method of our
                // instantiatable children.
-               flag.setEnabled(true);
+               status.setEnabled(true);
                return true;
 
        case LFUN_INSET_INSERT:
                // Don't allow insertion of new insets.
                // Every inset that wants to allow new insets from open
                // dialogs needs to override this.
-               flag.setEnabled(false);
+               status.setEnabled(false);
                return true;
 
        case LFUN_INSET_SETTINGS:
                if (cmd.argument().empty() || cmd.getArg(0) == insetName(lyxCode())) {
                        bool const enable = hasSettings();
-                       flag.setEnabled(enable);
+                       status.setEnabled(enable);
                        return true;
                } else {
                        return false;
@@ -417,12 +417,12 @@ bool Inset::getStatus(Cursor &, FuncRequest const & cmd,
 
        case LFUN_IN_MATHMACROTEMPLATE:
                // By default we're not in a InsetMathMacroTemplate inset
-               flag.setEnabled(false);
+               status.setEnabled(false);
                return true;
 
        case LFUN_IN_IPA:
                // By default we're not in an IPA inset
-               flag.setEnabled(false);
+               status.setEnabled(false);
                return true;
 
        default:
index 9f55246098e39638cd061f2625e5c2fac8bc41ee..a8c2a26239994033f0036aac749edcb08e96a917 100644 (file)
@@ -82,25 +82,25 @@ void InsetGraphicsParams::init()
 }
 
 
-void InsetGraphicsParams::copy(InsetGraphicsParams const & igp)
+void InsetGraphicsParams::copy(InsetGraphicsParams const & params)
 {
-       filename = igp.filename;
-       lyxscale = igp.lyxscale;
-       display = igp.display;
-       scale = igp.scale;
-       width = igp.width;
-       height = igp.height;
-       keepAspectRatio = igp.keepAspectRatio;
-       draft = igp.draft;
-       scaleBeforeRotation = igp.scaleBeforeRotation;
-
-       bbox = igp.bbox;
-       clip = igp.clip;
-
-       rotateAngle = igp.rotateAngle;
-       rotateOrigin = igp.rotateOrigin;
-       special = igp.special;
-       groupId = igp.groupId;
+       filename = params.filename;
+       lyxscale = params.lyxscale;
+       display = params.display;
+       scale = params.scale;
+       width = params.width;
+       height = params.height;
+       keepAspectRatio = params.keepAspectRatio;
+       draft = params.draft;
+       scaleBeforeRotation = params.scaleBeforeRotation;
+
+       bbox = params.bbox;
+       clip = params.clip;
+
+       rotateAngle = params.rotateAngle;
+       rotateOrigin = params.rotateOrigin;
+       special = params.special;
+       groupId = params.groupId;
 }
 
 
index 3a61dfdccdced1c24e428521ee9d6d63d2ed892b..981fa536be0a6db30d0fb494571290abe199aa32 100644 (file)
@@ -456,12 +456,12 @@ string InsetInfoParams::infoType() const
 
 
 
-InsetInfo::InsetInfo(Buffer * buf, string const & name)
+InsetInfo::InsetInfo(Buffer * buf, string const & info)
        : InsetCollapsible(buf), initialized_(false)
 {
        params_.type = InsetInfoParams::UNKNOWN_INFO;
        params_.force_ltr = false;
-       setInfo(name);
+       setInfo(info);
        status_ = Collapsed;
 }
 
@@ -682,9 +682,9 @@ void InsetInfo::doDispatch(Cursor & cur, FuncRequest & cmd)
 }
 
 
-void InsetInfo::setInfo(string const & name)
+void InsetInfo::setInfo(string const & info)
 {
-       if (name.empty())
+       if (info.empty())
                return;
 
        string saved_date_specifier;
@@ -693,7 +693,7 @@ void InsetInfo::setInfo(string const & name)
                saved_date_specifier = split(params_.name, '@');
        // info_type name
        string type;
-       params_.name = trim(split(name, type, ' '));
+       params_.name = trim(split(info, type, ' '));
        params_.type = nameTranslator().find(type);
        if (params_.name.empty())
                params_.name = defaultValueTranslator().find(params_.type);
index eeced084517b27d43b11552835fbfc6021f6d1fd..b624cce119d2d2976fb6a4f8b0c7725d24094ebc 100644 (file)
@@ -161,19 +161,19 @@ docstring InsetLabel::screenLabel() const
 }
 
 
-void InsetLabel::updateBuffer(ParIterator const & par, UpdateType utype, bool const /*deleted*/)
+void InsetLabel::updateBuffer(ParIterator const & it, UpdateType utype, bool const /*deleted*/)
 {
        docstring const & label = getParam("name");
 
        // Check if this one is active (i.e., neither deleted with change-tracking
        // nor in an inset that does not produce output, such as notes or inactive branches)
-       Paragraph const & para = par.paragraph();
-       bool active = !para.isDeleted(par.pos()) && para.inInset().producesOutput();
+       Paragraph const & para = it.paragraph();
+       bool active = !para.isDeleted(it.pos()) && para.inInset().producesOutput();
        // If not, check whether we are in a deleted/non-outputting inset
        if (active) {
-               for (size_type sl = 0 ; sl < par.depth() ; ++sl) {
-                       Paragraph const & outer_par = par[sl].paragraph();
-                       if (outer_par.isDeleted(par[sl].pos())
+               for (size_type sl = 0 ; sl < it.depth() ; ++sl) {
+                       Paragraph const & outer_par = it[sl].paragraph();
+                       if (outer_par.isDeleted(it[sl].pos())
                            || !outer_par.inInset().producesOutput()) {
                                active = false;
                                break;
@@ -194,7 +194,7 @@ void InsetLabel::updateBuffer(ParIterator const & par, UpdateType utype, bool co
                Counters const & cnts =
                        buffer().masterBuffer()->params().documentClass().counters();
                active_counter_ = cnts.currentCounter();
-               Language const * lang = par->getParLanguage(buffer().params());
+               Language const * lang = it->getParLanguage(buffer().params());
                if (lang && !active_counter_.empty()) {
                        counter_value_ = cnts.theCounter(active_counter_, lang->code());
                        pretty_counter_ = cnts.prettyCounter(active_counter_, lang->code());
index 54707418dfa54a9091d1492b31a10de22543eaf1..9390d6bbe4549867005cfe5e2ed3b2c8add7cecf 100644 (file)
@@ -948,12 +948,12 @@ docstring ParValidator::validate(string const & name,
 }
 
 
-bool ParValidator::onoff(string const & name) const
+bool ParValidator::onoff(string const & key) const
 {
        int p = InsetListingsParams::package();
 
        // locate name in parameter table
-       ListingsParams::const_iterator it = all_params_[p].find(name);
+       ListingsParams::const_iterator it = all_params_[p].find(key);
        if (it != all_params_[p].end())
                return it->second.onoff_;
        else
index 3f8a84cb07de16577d7dea122d14701ae32fa4fb..f7e0ab90597676db964a52f80c57aad32bf1538b 100644 (file)
@@ -43,7 +43,7 @@ public:
        ///
        InsetSeparator();
        ///
-       explicit InsetSeparator(InsetSeparatorParams const & par);
+       explicit InsetSeparator(InsetSeparatorParams const & params);
        ///
        static void string2params(std::string const &, InsetSeparatorParams &);
        ///
index 1d200764a4caf866014e91f6b8c70d7ab3c41d76..5cf7aa7303d2458065d7a8e8eec03cc1a6e2ff1b 100644 (file)
@@ -99,7 +99,7 @@ public:
        ///
        InsetSpace() : Inset(0) {}
        ///
-       explicit InsetSpace(InsetSpaceParams const & par);
+       explicit InsetSpace(InsetSpaceParams const & params);
        ///
        InsetSpaceParams const & params() const { return params_; }
        ///
index 33a9a4e6b4a7f20e3e94b55a572450998ba55ca7..40cb9066062eaa99c68d7affd3705232af987bfc 100644 (file)
@@ -30,21 +30,21 @@ using namespace std;
 
 namespace lyx {
 
-HullType hullType(docstring const & s)
-{
-       if (s == "none")      return hullNone;
-       if (s == "simple")    return hullSimple;
-       if (s == "equation")  return hullEquation;
-       if (s == "eqnarray")  return hullEqnArray;
-       if (s == "align")     return hullAlign;
-       if (s == "alignat")   return hullAlignAt;
-       if (s == "xalignat")  return hullXAlignAt;
-       if (s == "xxalignat") return hullXXAlignAt;
-       if (s == "multline")  return hullMultline;
-       if (s == "gather")    return hullGather;
-       if (s == "flalign")   return hullFlAlign;
-       if (s == "regexp")    return hullRegexp;
-       lyxerr << "unknown hull type '" << to_utf8(s) << "'" << endl;
+HullType hullType(docstring const & name)
+{
+       if (name == "none")      return hullNone;
+       if (name == "simple")    return hullSimple;
+       if (name == "equation")  return hullEquation;
+       if (name == "eqnarray")  return hullEqnArray;
+       if (name == "align")     return hullAlign;
+       if (name == "alignat")   return hullAlignAt;
+       if (name == "xalignat")  return hullXAlignAt;
+       if (name == "xxalignat") return hullXXAlignAt;
+       if (name == "multline")  return hullMultline;
+       if (name == "gather")    return hullGather;
+       if (name == "flalign")   return hullFlAlign;
+       if (name == "regexp")    return hullRegexp;
+       lyxerr << "unknown hull type '" << to_utf8(name) << "'" << endl;
        return hullUnknown;
 }
 
index 5186f5504e8cbc5361f6c68323b0c77227c13d01..ab9ead0bd08dcd71d3b9df0b13f05da9cfd3ff7d 100644 (file)
@@ -34,7 +34,7 @@ public:
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       void draw(PainterInfo & pain, int x, int y) const override;
+       void draw(PainterInfo & pi, int x, int y) const override;
        ///
        InsetMathAMSArray * asAMSArrayInset() override { return this; }
        ///
index 5ddb9d015e50b7f61b008c1585bf1e72f2e1eb3f..09ad0f8fa8273c8610aa49ccfac99db924fab500 100644 (file)
@@ -32,8 +32,8 @@ using namespace lyx::support;
 namespace lyx {
 
 
-InsetMathCases::InsetMathCases(Buffer * buf, row_type n)
-       : InsetMathGrid(buf, 2, n, 'c', from_ascii("ll"))
+InsetMathCases::InsetMathCases(Buffer * buf, row_type rows)
+       : InsetMathGrid(buf, 2, rows, 'c', from_ascii("ll"))
 {}
 
 
index d2026de204dd1664e331821acf3a59f8de69e5fb..2650de004457b85607292574d4b02be572e2b5f6 100644 (file)
@@ -23,7 +23,7 @@ class latexkeys;
 class InsetMathDots : public InsetMath {
 public:
        ///
-       explicit InsetMathDots(latexkeys const * l);
+       explicit InsetMathDots(latexkeys const * key);
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
index 294e24b0730032ead26cee95968f8031be7e3040..1152936ee2e784f64b0ae7c49d654792bc3b78ba 100644 (file)
@@ -1087,7 +1087,7 @@ void InsetMathMacroTemplate::doDispatch(Cursor & cur, FuncRequest & cmd)
 
 
 bool InsetMathMacroTemplate::getStatus(Cursor & cur, FuncRequest const & cmd,
-       FuncStatus & flag) const
+       FuncStatus & status) const
 {
        bool ret = true;
        string const arg = to_utf8(cmd.argument());
@@ -1098,12 +1098,12 @@ bool InsetMathMacroTemplate::getStatus(Cursor & cur, FuncRequest const & cmd,
                                num = convert<int>(arg);
                        bool on = (num >= optionals_
                                   && numargs_ < 9 && num <= numargs_ + 1);
-                       flag.setEnabled(on);
+                       status.setEnabled(on);
                        break;
                }
 
                case LFUN_MATH_MACRO_APPEND_GREEDY_PARAM:
-                       flag.setEnabled(numargs_ < 9);
+                       status.setEnabled(numargs_ < 9);
                        break;
 
                case LFUN_MATH_MACRO_REMOVE_GREEDY_PARAM:
@@ -1111,40 +1111,40 @@ bool InsetMathMacroTemplate::getStatus(Cursor & cur, FuncRequest const & cmd,
                        int num = numargs_;
                        if (!arg.empty())
                                num = convert<int>(arg);
-                       flag.setEnabled(num >= 1 && num <= numargs_);
+                       status.setEnabled(num >= 1 && num <= numargs_);
                        break;
                }
 
                case LFUN_MATH_MACRO_MAKE_OPTIONAL:
-                       flag.setEnabled(numargs_ > 0
+                       status.setEnabled(numargs_ > 0
                                     && optionals_ < numargs_
                                     && type_ != MacroTypeDef);
                        break;
 
                case LFUN_MATH_MACRO_MAKE_NONOPTIONAL:
-                       flag.setEnabled(optionals_ > 0
+                       status.setEnabled(optionals_ > 0
                                     && type_ != MacroTypeDef);
                        break;
 
                case LFUN_MATH_MACRO_ADD_OPTIONAL_PARAM:
-                       flag.setEnabled(numargs_ < 9);
+                       status.setEnabled(numargs_ < 9);
                        break;
 
                case LFUN_MATH_MACRO_REMOVE_OPTIONAL_PARAM:
-                       flag.setEnabled(optionals_ > 0);
+                       status.setEnabled(optionals_ > 0);
                        break;
 
                case LFUN_MATH_MACRO_ADD_GREEDY_OPTIONAL_PARAM:
-                       flag.setEnabled(numargs_ == 0
+                       status.setEnabled(numargs_ == 0
                                     && type_ != MacroTypeDef);
                        break;
 
                case LFUN_IN_MATHMACROTEMPLATE:
-                       flag.setEnabled(true);
+                       status.setEnabled(true);
                        break;
 
                default:
-                       ret = InsetMathNest::getStatus(cur, cmd, flag);
+                       ret = InsetMathNest::getStatus(cur, cmd, status);
                        break;
        }
        return ret;
index 24a0b14875bc276c43c3249bb8e23a0df682cf68..09408968d687caf33f837257171feae5bc8f87d0 100644 (file)
@@ -29,8 +29,8 @@ public:
        ///
        explicit InsetMathMacroTemplate(Buffer * buf);
        ///
-       InsetMathMacroTemplate(Buffer * buf, docstring const & name, int nargs,
-               int optional, MacroType type,
+       InsetMathMacroTemplate(Buffer * buf, docstring const & name, int numargs,
+               int optionals, MacroType type,
                std::vector<MathData> const & optionalValues = std::vector<MathData>(),
                MathData const & def = MathData(),
                MathData const & display = MathData());
index 926e7dd5d5ced43f457f79a3585bf8d0c866eae9..e79a17c015b289acdb679f7ead9989a1e133d984 100644 (file)
@@ -23,9 +23,9 @@
 
 namespace lyx {
 
-InsetMathUnknown::InsetMathUnknown(docstring const & nm,
+InsetMathUnknown::InsetMathUnknown(docstring const & name,
        docstring const & selection, bool final, bool black)
-       : name_(nm), final_(final), black_(black), kerning_(0),
+       : name_(name), final_(final), black_(black), kerning_(0),
          selection_(selection)
 {}
 
index c1a4c49312b0af5ac197615a85531dd7f5c5ed62..fb2a9e08a4fc7658984af5a0c54955db3323c1d1 100644 (file)
@@ -63,7 +63,7 @@ MacroData::MacroData(Buffer * buf, InsetMathMacroTemplate const & macro)
 }
 
 
-bool MacroData::expand(vector<MathData> const & args, MathData & to) const
+bool MacroData::expand(vector<MathData> const & from, MathData & to) const
 {
        updateData();
 
@@ -82,9 +82,9 @@ bool MacroData::expand(vector<MathData> const & args, MathData & to) const
                //it.cell().erase(it.pos());
                //it.cell().insert(it.pos(), it.nextInset()->asInsetMath()
                size_t n = static_cast<InsetMathMacroArgument*>(it.nextInset())->number();
-               if (n <= args.size()) {
+               if (n <= from.size()) {
                        it.cell().erase(it.pos());
-                       it.cell().insert(it.pos(), args[n - 1]);
+                       it.cell().insert(it.pos(), from[n - 1]);
                }
        }
        //LYXERR0("MathData::expand: res: " << inset.cell(0));
@@ -249,11 +249,11 @@ MacroTable::insert(docstring const & name, MacroData const & data)
 
 
 MacroTable::iterator
-MacroTable::insert(Buffer * buf, docstring const & def)
+MacroTable::insert(Buffer * buf, docstring const & definition)
 {
        //lyxerr << "MacroTable::insert, def: " << to_utf8(def) << endl;
        InsetMathMacroTemplate mac(buf);
-       mac.fromString(def);
+       mac.fromString(definition);
        MacroData data(buf, mac);
        return insert(mac.name(), data);
 }
index 7ff8368d6b0eacdf7224eda5d99db8e3f0ac29a5..fb7e7ff3a572b7103fa8087837bf3f79a5c728c3 100644 (file)
@@ -42,16 +42,16 @@ void TextPainter::draw(int x, int y, char_type const * str)
 }
 
 
-void TextPainter::horizontalLine(int x, int y, int n, char_type c)
+void TextPainter::horizontalLine(int x, int y, int len, char_type c)
 {
-       for (int i = 0; i < n && i + x < xmax_; ++i)
+       for (int i = 0; i < len && i + x < xmax_; ++i)
                at(x + i, y) = c;
 }
 
 
-void TextPainter::verticalLine(int x, int y, int n, char_type c)
+void TextPainter::verticalLine(int x, int y, int len, char_type c)
 {
-       for (int i = 0; i < n && i + y < ymax_; ++i)
+       for (int i = 0; i < len && i + y < ymax_; ++i)
                at(x, y + i) = c;
 }
 
index ebecc5ceba6f3317f2b26722306ab176eb711baa..8b2e4f9d1c04f68d99b9f21a22b0029813d8ef57 100644 (file)
@@ -36,7 +36,7 @@ void writePlaintextFile(Buffer const & buf, odocstream &, OutputParams const &);
 
 ///
 void writePlaintextParagraph(Buffer const & buf,
-                   Paragraph const & paragraphs,
+                   Paragraph const & par,
                    odocstream & ofs,
                    OutputParams const &,
                    bool & ref_printed,
index c73785ee8833bb0d33eaca13442bf155b4ef9edd..cd7323ba0df3aa47843f142fbcd5becc9356afc2 100644 (file)
@@ -81,7 +81,7 @@ void parse_math(Parser & p, std::ostream & os, unsigned flags, mode_type mode);
 
 /// in table.cpp
 void handle_tabular(Parser & p, std::ostream & os, std::string const & name,
-                   std::string const & width, std::string const & halign,
+                   std::string const & tabularwidth, std::string const & halign,
                    Context const & context);