Commit ad18a5f4 authored by Anatoly Mihalchenko's avatar Anatoly Mihalchenko

SANKORE-576

First, lost of text formating. New format and then lost of text.
parent d822dc73
......@@ -2314,6 +2314,22 @@ UBGraphicsTextItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::textItemFromSvg()
QStringRef ubFillOnDarkBackground = mXmlReader.attributes().value(mNamespaceUri, "fill-on-dark-background");
QStringRef ubFillOnLightBackground = mXmlReader.attributes().value(mNamespaceUri, "fill-on-light-background");
if (!ubFillOnDarkBackground.isNull()) {
QColor color;
color.setNamedColor(ubFillOnDarkBackground.toString());
if (!color.isValid())
color = Qt::white;
textItem->setColorOnDarkBackground(color);
}
if (!ubFillOnLightBackground.isNull()) {
QColor color;
color.setNamedColor(ubFillOnLightBackground.toString());
if (!color.isValid())
color = Qt::black;
textItem->setColorOnLightBackground(color);
}
QString text;
while (!(mXmlReader.isEndElement() && (mXmlReader.name() == "font" || mXmlReader.name() == "foreignObject")))
......@@ -2382,22 +2398,6 @@ UBGraphicsTextItem* UBSvgSubsetAdaptor::UBSvgSubsetReader::textItemFromSvg()
textItem->setDefaultTextColor(textColor);
}
if (!ubFillOnDarkBackground.isNull()) {
QColor color;
color.setNamedColor(ubFillOnDarkBackground.toString());
if (!color.isValid())
color = Qt::white;
textItem->setColorOnDarkBackground(color);
}
if (!ubFillOnLightBackground.isNull()) {
QColor color;
color.setNamedColor(ubFillOnLightBackground.toString());
if (!color.isValid())
color = Qt::black;
textItem->setColorOnLightBackground(color);
}
while (!(mXmlReader.isEndElement() && mXmlReader.name() == "font")) {
if (mXmlReader.hasError()) {
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment