|
a/src/qtgui/plaintorich.cpp |
|
b/src/qtgui/plaintorich.cpp |
1 |
#ifndef lint
|
1 |
#ifndef lint
|
2 |
static char rcsid[] = "@(#$Id: plaintorich.cpp,v 1.26 2007-07-13 07:00:36 dockes Exp $ (C) 2005 J.F.Dockes";
|
2 |
static char rcsid[] = "@(#$Id: plaintorich.cpp,v 1.27 2007-09-08 17:19:58 dockes Exp $ (C) 2005 J.F.Dockes";
|
3 |
#endif
|
3 |
#endif
|
4 |
/*
|
4 |
/*
|
5 |
* This program is free software; you can redistribute it and/or modify
|
5 |
* This program is free software; you can redistribute it and/or modify
|
6 |
* it under the terms of the GNU General Public License as published by
|
6 |
* it under the terms of the GNU General Public License as published by
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
7 |
* the Free Software Foundation; either version 2 of the License, or
|
|
... |
|
... |
335 |
//
|
335 |
//
|
336 |
// To compute the term character positions in the output text, we used
|
336 |
// To compute the term character positions in the output text, we used
|
337 |
// to emulate how qt's textedit counts chars (ignoring tags and
|
337 |
// to emulate how qt's textedit counts chars (ignoring tags and
|
338 |
// duplicate whitespace etc...). This was tricky business, dependant
|
338 |
// duplicate whitespace etc...). This was tricky business, dependant
|
339 |
// on qtextedit internals, and we don't do it any more, so we finally
|
339 |
// on qtextedit internals, and we don't do it any more, so we finally
|
340 |
// don't know the term par/car positions in the editor text. Instead,
|
340 |
// don't know the term par/car positions in the editor text.
|
341 |
// we return the first term encountered, and the caller will use the
|
341 |
// Instead, we mark the search term positions either with html anchor
|
|
|
342 |
// (qt currently has problems with them), or a special string, and the
|
342 |
// editor's find() function to position on it
|
343 |
// caller will use the editor's find() function to position on it
|
343 |
bool plaintorich(const string& in, string& out,
|
344 |
bool plaintorich(const string& in, string& out,
|
344 |
const HiliteData& hdata,
|
345 |
const HiliteData& hdata,
|
345 |
bool noHeader, bool needBeacons)
|
346 |
bool noHeader, bool needBeacons)
|
346 |
{
|
347 |
{
|
347 |
Chrono chron;
|
348 |
Chrono chron;
|