1.1 --- a/headingobj.cpp Tue Jan 03 09:44:41 2006 +0000
1.2 +++ b/headingobj.cpp Wed Jan 25 12:34:55 2006 +0000
1.3 @@ -1,4 +1,5 @@
1.4 #include "headingobj.h"
1.5 +#include <qregexp.h>
1.6
1.7 /////////////////////////////////////////////////////////////////
1.8 // HeadingObj
1.9 @@ -117,15 +118,17 @@
1.10 int j=0; // index of last ws
1.11 int k=0; // index of "<br>" or similar linebreak
1.12 int br=0; // width of found break, e.g. for <br> it is 4
1.13 + QRegExp re("<br.*/>");
1.14 + re.setMinimal (true);
1.15
1.16 // set the text and wrap lines
1.17 while (s.length()>0)
1.18 {
1.19 // ok, some people wanted manual linebreaks, here we go
1.20 - k=s.find ("<br>",i,false);
1.21 + k=re.search (s,i);
1.22 if (k>=0)
1.23 {
1.24 - br=4;
1.25 + br=re.cap(0).length();
1.26 i=k;
1.27 } else
1.28 i=s.find (" ",i,false);