diff -r 309609406650 -r 657078664946 headingobj.cpp --- a/headingobj.cpp Tue Jan 03 09:44:41 2006 +0000 +++ b/headingobj.cpp Wed Feb 15 12:54:55 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);