Changeset 27571

Show
Ignore:
Timestamp:
11/16/08 19:14:14 (2 months ago)
Author:
switt
Message:

fix broken latex output range checking

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • lyx-devel/trunk/src/Paragraph.cpp

    r27529 r27571  
    20852085                } 
    20862086 
    2087                 if (c == ' ' && i >= start_pos && i < end_pos) { 
     2087                // FIXME: think about end_pos implementation... 
     2088                if (c == ' ' && i >= start_pos && (end_pos == -1 || i < end_pos)) { 
    20882089                        // FIXME: integrate this case in latexSpecialChar 
    20892090                        // Do not print the separation of the optional argument 
     
    21142115                // and then split to handle the two modes separately. 
    21152116                if (c == META_INSET) { 
    2116                         if (i >= start_pos && i < end_pos) 
    2117                         d->latexInset(bparams, os, 
    2118                                         texrow, rp, running_font, 
    2119                                         basefont, outerfont, open_font, 
    2120                                         runningChange, style, i, column); 
     2117                        if (i >= start_pos && (end_pos == -1 || i < end_pos)) { 
     2118                                d->latexInset(bparams, os, 
     2119                                                texrow, rp, running_font, 
     2120                                                basefont, outerfont, open_font, 
     2121                                                runningChange, style, i, column); 
     2122                        } 
    21212123                } else { 
    2122                         if (i >= start_pos && i < end_pos) { 
    2123                         try { 
    2124                                 d->latexSpecialChar(os, rp, running_font, runningChange, 
    2125                                         style, i, column); 
    2126                         } catch (EncodingException & e) { 
     2124                        if (i >= start_pos && (end_pos == -1 || i < end_pos)) { 
     2125                               try { 
     2126                                       d->latexSpecialChar(os, rp, running_font, runningChange, 
     2127                                               style, i, column); 
     2128                               } catch (EncodingException & e) { 
    21272129                                if (runparams.dryrun) { 
    21282130                                        os << "<" << _("LyX Warning: ") 
  • lyx-devel/trunk/src/Paragraph.h

    r27521 r27571  
    134134        bool latex(BufferParams const &, Font const & outerfont, odocstream &, 
    135135                   TexRow & texrow, OutputParams const &, 
    136                    int start_pos = -1, int end_pos = -1) const; 
     136                   int start_pos = 0, int end_pos = -1) const; 
    137137 
    138138        /// Can we drop the standard paragraph wrapper?