]> git.lyx.org Git - lyx.git/commitdiff
change tracking:
authorMichael Schmitt <michael.schmitt@teststep.org>
Sat, 21 Oct 2006 10:22:41 +0000 (10:22 +0000)
committerMichael Schmitt <michael.schmitt@teststep.org>
Sat, 21 Oct 2006 10:22:41 +0000 (10:22 +0000)
        * paragraph.h: remove setChar(...); all text changes
        must be expressed as erase and insert operations in
        order to support change tracking

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15440 a592a061-630c-0410-9148-cb99ea01b6c8

src/paragraph.C
src/paragraph.h
src/text.C

index 41a5be149e7a411acd8948f54f8dbd43b4cf873d..fa45cbd99b40269ebd950c46d0187e7b96dd29d4 100644 (file)
@@ -1502,12 +1502,6 @@ void Paragraph::clearContents()
 }
 
 
-void Paragraph::setChar(pos_type pos, value_type c)
-{
-       text_[pos] = c;
-}
-
-
 ParagraphParameters & Paragraph::params()
 {
        return pimpl_->params;
index 14974f56954b1a9a1379d80cb91d7fc2ea6fe45e..20b2efadab11922d68878e7b70da6a2b56e5bd2d 100644 (file)
@@ -280,8 +280,6 @@ public:
        value_type getChar(pos_type pos) const { return text_[pos]; }
        /// Get the char, but mirror all bracket characters if it is right-to-left
        value_type getUChar(BufferParams const &, pos_type pos) const;
-       /// The position must already exist.
-       void setChar(pos_type pos, value_type c);
        /// pos <= size() (there is a dummy font change at the end of each par)
        void setFont(pos_type pos, LyXFont const & font);
        /// Returns the height of the highest font in range
index b6d69c991b27939d7f9549c40a4644036dd1ad8b..bf020191e6781fe742bfc7da7016615ad6dfb0b3 100644 (file)
@@ -1624,10 +1624,11 @@ void LyXText::changeCase(LCursor & cur, LyXText::TextCase action)
                                break;
                        }
                }
-#ifdef WITH_WARNINGS
-#warning changes
-#endif
-               pars_[pit].setChar(pos, c);
+
+               // FIXME: change tracking (MG)
+               // sorry but we are no longer allowed to set a single character directly
+               // we have to rewrite this method in terms of erase&insert operations
+               //pars_[pit].setChar(pos, c);
                ++pos;
        }
 }