Commit b85adf85 authored by Claudio Valerio's avatar Claudio Valerio

used writecharacter instead of writeCDATA bacause writeCDATA leads to a file...

used writecharacter instead of writeCDATA bacause writeCDATA leads to a file trucation when we copy text from libreoffice and the pase is saved without any changes on the text
parent 4ae18293
......@@ -2278,9 +2278,12 @@ void UBSvgSubsetAdaptor::UBSvgSubsetWriter::textItemToSvg(UBGraphicsTextItem* it
// But a different solution has to be implemented to avoid some annoying case that
// are already present with this hack.
QString htmlString = item->toHtml();
qDebug() << htmlString;
QRegExp regExp("font-size:([0-9]{,3})pt");
htmlString = htmlString.replace(regExp,"font-size:\\1px");
mXmlWriter.writeCDATA(htmlString);
qDebug() << htmlString;
//mXmlWriter.writeCDATA(htmlString);
mXmlWriter.writeCharacters(htmlString);
mXmlWriter.writeEndElement(); //itemTextContent
mXmlWriter.writeEndElement(); //foreignObject
......
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