]> git.lyx.org Git - lyx.git/blobdiff - src/lyxfind.cpp
Fix text direction issue for InsetInfo in RTL context
[lyx.git] / src / lyxfind.cpp
index 3c30d23f740102451a4f38f318f46001f859c607..0e79172fe57af321fbb8e147e2b543642945dc76 100644 (file)
@@ -303,7 +303,7 @@ pair<bool, int> replaceOne(BufferView * bv, docstring searchstr,
        return make_pair(true, 1);
 }
 
-} // namespace anon
+} // namespace
 
 
 docstring const find2string(docstring const & search,
@@ -517,7 +517,7 @@ bool findChange(BufferView * bv, bool forward)
        return selectChange(cur, forward);
 }
 
-}
+} // namespace
 
 bool findNextChange(BufferView * bv)
 {
@@ -1169,8 +1169,8 @@ docstring latexifyFromCursor(DocIterator const & cur, int len)
                // Retrieve the math environment type, and add '$' or '$]'
                // or others (\end{equation}) accordingly
                for (int s = cur.depth() - 1; s >= 0; --s) {
-                       CursorSlice const & cs = cur[s];
-                       InsetMath * inset = cs.asInsetMath();
+                       CursorSlice const & cs2 = cur[s];
+                       InsetMath * inset = cs2.asInsetMath();
                        if (inset && inset->asHullInset()) {
                                WriteStream ws(os);
                                inset->asHullInset()->footer_write(ws);
@@ -1239,9 +1239,9 @@ int findForwardAdv(DocIterator & cur, MatchStringAdv & match)
                if (match_len) {
                        for (; !theApp()->longOperationCancelled() && cur; cur.forwardPos()) {
                                LYXERR(Debug::FIND, "Advancing cur: " << cur);
-                               int match_len = match(cur);
-                               LYXERR(Debug::FIND, "match_len: " << match_len);
-                               if (match_len) {
+                               int match_len2 = match(cur);
+                               LYXERR(Debug::FIND, "match_len: " << match_len2);
+                               if (match_len2) {
                                        // Sometimes in finalize we understand it wasn't a match
                                        // and we need to continue the outest loop
                                        int len = findAdvFinalize(cur, match);
@@ -1338,7 +1338,7 @@ int findBackwardsAdv(DocIterator & cur, MatchStringAdv & match)
 }
 
 
-} // anonym namespace
+} // namespace
 
 
 docstring stringifyFromForSearch(FindAndReplaceOptions const & opt,
@@ -1419,7 +1419,7 @@ static void changeFirstCase(Buffer & buffer, TextCase first_case, TextCase other
        pit->changeCase(buffer.params(), pos_type(1), right, others_case);
 }
 
-} // anon namespace
+} // namespace
 
 ///
 static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, MatchStringAdv & matchAdv)
@@ -1463,7 +1463,7 @@ static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, M
                                changeFirstCase(repl_buffer, text_uppercase, text_uppercase);
                }
        }
-       cap::cutSelection(cur, false, false);
+       cap::cutSelection(cur, false);
        if (cur.inTexted()) {
                repl_buffer.changeLanguage(
                        repl_buffer.language(),
@@ -1612,4 +1612,4 @@ istringstream & operator>>(istringstream & is, FindAndReplaceOptions & opt)
        return is;
 }
 
-} // lyx namespace
+} // namespace lyx