From b85adf852c7d7403e3eb789a4e271cb45ee35f3a Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 21 Jun 2012 08:49:46 +0200 Subject: [PATCH] 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 --- src/adaptors/UBSvgSubsetAdaptor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/adaptors/UBSvgSubsetAdaptor.cpp b/src/adaptors/UBSvgSubsetAdaptor.cpp index e9c1b668..a2608c22 100644 --- a/src/adaptors/UBSvgSubsetAdaptor.cpp +++ b/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