Changeset View
Changeset View
Standalone View
Standalone View
plugins/flake/textshape/textlayout/ListItemsHelper.cpp
Show First 20 Lines • Show All 469 Lines • ▼ Show 20 Line(s) | 270 | { | |||
---|---|---|---|---|---|
470 | if (calcWidth) | 470 | if (calcWidth) | ||
471 | width = m_fm.width(item); | 471 | width = m_fm.width(item); | ||
472 | index++; | 472 | index++; | ||
473 | 473 | | |||
474 | width += m_fm.width(prefix + suffix); | 474 | width += m_fm.width(prefix + suffix); | ||
475 | 475 | | |||
476 | qreal counterSpacing = 0; | 476 | qreal counterSpacing = 0; | ||
477 | if (format.boolProperty(KoListStyle::AlignmentMode)) { | 477 | if (format.boolProperty(KoListStyle::AlignmentMode)) { | ||
478 | // for aligmentmode spacing should be 0 | 478 | // for AlignmentMode spacing should be 0 | ||
479 | counterSpacing = 0; | 479 | counterSpacing = 0; | ||
480 | } else { | 480 | } else { | ||
481 | if (listStyle != KoListStyle::None) { | 481 | if (listStyle != KoListStyle::None) { | ||
482 | // see ODF spec 1.2 item 20.422 | 482 | // see ODF spec 1.2 item 20.422 | ||
483 | counterSpacing = format.doubleProperty(KoListStyle::MinimumDistance); | 483 | counterSpacing = format.doubleProperty(KoListStyle::MinimumDistance); | ||
484 | if (width < format.doubleProperty(KoListStyle::MinimumWidth)) { | 484 | if (width < format.doubleProperty(KoListStyle::MinimumWidth)) { | ||
485 | counterSpacing -= format.doubleProperty(KoListStyle::MinimumWidth) - width; | 485 | counterSpacing -= format.doubleProperty(KoListStyle::MinimumWidth) - width; | ||
486 | } | 486 | } | ||
Show All 17 Lines |