Changeset View
Changeset View
Standalone View
Standalone View
libs/flake/KoOdfWorkaround.cpp
Show First 20 Lines • Show All 229 Lines • ▼ Show 20 Line(s) | 214 | { | |||
---|---|---|---|---|---|
230 | return colorBackground; | 230 | return colorBackground; | ||
231 | } | 231 | } | ||
232 | 232 | | |||
233 | void KoOdfWorkaround::fixGluePointPosition(QString &positionString, KoShapeLoadingContext &context) | 233 | void KoOdfWorkaround::fixGluePointPosition(QString &positionString, KoShapeLoadingContext &context) | ||
234 | { | 234 | { | ||
235 | KoOdfLoadingContext::GeneratorType type(context.odfLoadingContext().generatorType()); | 235 | KoOdfLoadingContext::GeneratorType type(context.odfLoadingContext().generatorType()); | ||
236 | if (type == KoOdfLoadingContext::OpenOffice && !positionString.endsWith('%')) { | 236 | if (type == KoOdfLoadingContext::OpenOffice && !positionString.endsWith('%')) { | ||
237 | const qreal pos = KoUnit::parseValue(positionString); | 237 | const qreal pos = KoUnit::parseValue(positionString); | ||
238 | positionString = QString("%1%%").arg(KoUnit::toMillimeter(pos)); | 238 | positionString = QString("%1%%").arg(KoUnit(KoUnit::Millimeter).toUserValue(pos)); | ||
239 | } | 239 | } | ||
240 | } | 240 | } | ||
241 | 241 | | |||
242 | void KoOdfWorkaround::fixMissingFillRule(Qt::FillRule& fillRule, KoShapeLoadingContext& context) | 242 | void KoOdfWorkaround::fixMissingFillRule(Qt::FillRule& fillRule, KoShapeLoadingContext& context) | ||
243 | { | 243 | { | ||
244 | if ((context.odfLoadingContext().generatorType() == KoOdfLoadingContext::OpenOffice)) { | 244 | if ((context.odfLoadingContext().generatorType() == KoOdfLoadingContext::OpenOffice)) { | ||
245 | fillRule = Qt::OddEvenFill; | 245 | fillRule = Qt::OddEvenFill; | ||
246 | } | 246 | } | ||
▲ Show 20 Lines • Show All 134 Lines • Show Last 20 Lines |