src/gui/text/qtextobject.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
  1154 {
  1154 {
  1155     Qt::LayoutDirection dir = blockFormat().layoutDirection();
  1155     Qt::LayoutDirection dir = blockFormat().layoutDirection();
  1156     if (dir != Qt::LayoutDirectionAuto)
  1156     if (dir != Qt::LayoutDirectionAuto)
  1157         return dir;
  1157         return dir;
  1158 
  1158 
       
  1159     dir = p->defaultTextOption.textDirection();
       
  1160     if (dir != Qt::LayoutDirectionAuto)
       
  1161         return dir;
       
  1162 
  1159     const QString buffer = p->buffer();
  1163     const QString buffer = p->buffer();
  1160 
  1164 
  1161     const int pos = position();
  1165     const int pos = position();
  1162     QTextDocumentPrivate::FragmentIterator it = p->find(pos);
  1166     QTextDocumentPrivate::FragmentIterator it = p->find(pos);
  1163     QTextDocumentPrivate::FragmentIterator end = p->find(pos + length() - 1); // -1 to omit the block separator char
  1167     QTextDocumentPrivate::FragmentIterator end = p->find(pos + length() - 1); // -1 to omit the block separator char