+2002-05-29 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * configure.m4: fix handling of --with-version-suffix, so that
+ reLyX is still found. (bug #357)
+
2002-05-28 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* layouts/hollywood.layout: fix style "FADE_OUT:"
lyx_check_config=yes
lyx_keep_temps=no
srcdir=
-lyx_suffix=
+version_suffix=
#### Parse the command line
for ac_option do
--help show this help lines
--keep-temps keep temporary files (for debug. purposes)
--without-latex-config do not run LaTeX to determine configuration
- --with-lyx-suffix=suffix suffix of binary installed files
+ --with-version-suffix=suffix suffix of binary installed files
EOF
exit 0;;
--without-latex-config)
lyx_check_config=no ;;
--keep-temps)
lyx_keep_temps=yes ;;
- --with-lyx-suffix*)
- lyx_suffix=`echo "$ac_option" | sed 's,--with-lyx-suffix=,,;s,^,-,'`
+ --with-version-suffix*)
+ version_suffix=`echo "$ac_option" | sed 's,--with-version-suffix=,,'`
esac
done
SEARCH_PROG([for a LaTeX -> LyX converter],tex_to_lyx_command,reLyX)
PATH=${save_PATH}
test $tex_to_lyx_command = "reLyX" && tex_to_lyx_command="reLyX -f \$\$i"
-tex_to_lyx_command=`echo $tex_to_lyx_command | sed "s,reLyX,reLyX$lyx_suffix,"`
+tex_to_lyx_command=`echo $tex_to_lyx_command | sed "s,reLyX,reLyX$version_suffix,"`
SEARCH_PROG([for a Noweb -> LyX converter],literate_to_lyx_command,noweb2lyx)
test $literate_to_lyx_command = "noweb2lyx" && literate_to_lyx_command="noweb2lyx \$\$i \$\$o"
-literate_to_lyx_command=`echo $literate_to_lyx_command | sed "s,noweb2lyx,noweb2lyx$lyx_suffix,"`
+literate_to_lyx_command=`echo $literate_to_lyx_command | sed "s,noweb2lyx,noweb2lyx$version_suffix,"`
# Search something to process a literate document
SEARCH_PROG([for a Noweb -> LaTeX converter],literate_to_tex_command,noweave)
+2002-05-29 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * paragraph_pimpl.C (isTextAt): rewrite to be much faster (do not
+ call getFont all the time)
+
2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
* switch from SigC signals to boost::signals
+2002-05-29 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
+
+ * insetgraphicsParams.C (Read): use lyxlex::eatLine to read the
+ file name, in case there are weird characters like ',' in there.
+ (bug #407)
+
2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
* switch from SigC signals to boost::signals.
bool InsetGraphicsParams::Read(LyXLex & lex, string const & token)
{
if (token == "filename") {
- lex.next();
+ lex.eatLine();
filename = lex.getString();
} else if (token == "BoundingBox") {
for (int i=0; i<4 ;i++) {
}
-bool Paragraph::Pimpl::isTextAt(BufferParams const & bp,
- string const & str, pos_type pos)
+bool Paragraph::Pimpl::isTextAt(string const & str, pos_type pos)
{
- LyXFont const & font = owner_->getFont(bp, pos);
+ pos_type const len = str.length();
+
+ // is the paragraph large enough?
+ if (pos + len > size())
+ return false;
+ // does the wanted text start at point?
for (string::size_type i = 0; i < str.length(); ++i) {
- if (pos + static_cast<pos_type>(i) >= size())
- return false;
- if (str[i] != getChar(pos + i))
- return false;
- if (owner_->getFont(bp, pos + i) != font)
+ if (str[i] != text[pos + i])
return false;
}
+
+ // is there a font change in middle of the word?
+ FontList::const_iterator cit = fontlist.begin();
+ FontList::const_iterator end = fontlist.end();
+ for (; cit != end; ++cit) {
+ if (cit->pos() >= pos)
+ break;
+ }
+ if (cit != end && pos + len - 1 > cit->pos())
+ return false;
+
return true;
}
size_t pnr = 0;
for (; pnr < phrases_nr; ++pnr) {
- if (isTextAt(bparams, special_phrases[pnr][0], i)) {
+ if (isTextAt(special_phrases[pnr][0], i)) {
os << special_phrases[pnr][1];
i += special_phrases[pnr][0].length() - 1;
column += special_phrases[pnr][1].length() - 1;
ParagraphParameters params;
private:
/// match a string against a particular point in the paragraph
- bool isTextAt(BufferParams const &,
- string const & str, lyx::pos_type pos);
+ bool isTextAt(string const & str, lyx::pos_type pos);
/// Who owns us?
Paragraph * owner_;