diff -r 138c2cdc02fd -r 6691000c3262 headingobj.cpp --- a/headingobj.cpp Tue Jan 24 15:09:48 2006 +0000 +++ b/headingobj.cpp Tue Jan 24 15:09:48 2006 +0000 @@ -1,4 +1,5 @@ #include "headingobj.h" +#include ///////////////////////////////////////////////////////////////// // HeadingObj @@ -117,15 +118,17 @@ int j=0; // index of last ws int k=0; // index of "
" or similar linebreak int br=0; // width of found break, e.g. for
it is 4 + QRegExp re(""); + re.setMinimal (true); // set the text and wrap lines while (s.length()>0) { // ok, some people wanted manual linebreaks, here we go - k=s.find ("
",i,false); + k=re.search (s,i); if (k>=0) { - br=4; + br=re.cap(0).length(); i=k; } else i=s.find (" ",i,false);