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

preferencesAboutTextFull
Claudio Valerio 13 years ago
parent 4ae1829345
commit b85adf852c
  1. 5
      src/adaptors/UBSvgSubsetAdaptor.cpp

@ -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

Loading…
Cancel
Save