]> git.lyx.org Git - features.git/commitdiff
apply textat.diff
authorLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 5 Dec 2001 23:06:02 +0000 (23:06 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Wed, 5 Dec 2001 23:06:02 +0000 (23:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3159 a592a061-630c-0410-9148-cb99ea01b6c8

src/ChangeLog
src/paragraph_pimpl.C
src/paragraph_pimpl.h

index 51c94d970e33a012019f038148b04aa82b46c239..9151492be461680a53e28208811a86da23592991 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-05  John Levon  <moz@compsoc.man.ac.uk>
+
+       * paragraph_pimpl.h:
+       * paragraph_pimpl.C: isTextAt() doesn't need font param
+
 2001-12-05  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyxlex.h:
index 82e73c9dddacda0051c7544eb995c9339d21f485..e3c85580603810e1917afc3d52eff0e01c76f6d8 100644 (file)
@@ -256,9 +256,11 @@ void Paragraph::Pimpl::simpleTeXBlanks(std::ostream & os, TexRow & texrow,
 }
 
 
-bool Paragraph::Pimpl::isTextAt(BufferParams const & bp, LyXFont & font,
+bool Paragraph::Pimpl::isTextAt(BufferParams const & bp,
                                string const & str, pos_type pos)
 {
+       LyXFont const & font = owner_->getFont(bp, pos);
        for (string::size_type i = 0; i < str.length(); ++i) {
                if (pos + static_cast<pos_type>(i) >= size())
                        return false;
@@ -486,7 +488,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const * buf,
                        size_t pnr = 0;
  
                        for (; pnr < phrases_nr; ++pnr) {
-                               if (isTextAt(bparams, font, special_phrases[pnr][0], i)) {
+                               if (isTextAt(bparams, special_phrases[pnr][0], i)) {
                                        os << special_phrases[pnr][1];
                                        i += special_phrases[pnr][0].length() - 1;
                                        column += special_phrases[pnr][1].length() - 1;
index 922b52eb0503e972cb49c0f00c9478626ab33be1..d5864f38c43d981897e4fc46cdcec3bf80ddc7f3 100644 (file)
@@ -148,7 +148,7 @@ struct Paragraph::Pimpl {
        ParagraphParameters params;
 private:
        /// match a string against a particular point in the paragraph
-       bool isTextAt(BufferParams const &, LyXFont &,
+       bool isTextAt(BufferParams const &,
                      string const & str, lyx::pos_type pos);
  
        /// Who owns us?