r20170 by fschmid - Fixes for #13144: Incorrect import of FH10 file
scribus-commit
scribus-commit at lists.scribus.net
Thu Jun 18 19:05:56 UTC 2015
Author: fschmid
Date: Thu Jun 18 19:05:56 2015
New Revision: 20170
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20170
Log:
Fixes for #13144: Incorrect import of FH10 file
Modified:
trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
Modified: trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20170&path=/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp Thu Jun 18 19:05:56 2015
@@ -282,14 +282,14 @@
{
if (!doProcessing)
return;
- qDebug() << "openGroup";
+ startLayer(propList);
}
void RawPainter::closeGroup()
{
if (!doProcessing)
return;
- qDebug() << "closeGroup";
+ endLayer();
}
void RawPainter::setStyle(const librevenge::RVNGPropertyList &propList)
@@ -1049,7 +1049,7 @@
else if (align == "bottom")
ite->setVerticalAlignment(2);
}
- ite->setFirstLineOffset(FLOPFontAscent);
+ ite->setFirstLineOffset(FLOPLineSpacing);
actTextItem = ite;
QString pStyle = CommonStrings::DefaultParagraphStyle;
ParagraphStyle newStyle;
@@ -1254,6 +1254,8 @@
textCharStyle.setFontSize(valueAsPoint(propList["fo:font-size"]) * 10.0);
m_maxFontSize = qMax(m_maxFontSize, valueAsPoint(propList["fo:font-size"]));
}
+ if (propList["style:text-scale"])
+ textCharStyle.setFontSize(textCharStyle.fontSize() * fromPercentage(QString(propList["style:text-scale"]->getStr().cstr())));
if (propList["fo:color"])
textCharStyle.setFillColor(parseColor(QString(propList["fo:color"]->getStr().cstr())));
if (propList["style:font-name"])
@@ -1262,6 +1264,15 @@
if (propList["fo:font-weight"])
fontVari = QString(propList["fo:font-weight"]->getStr().cstr());
QString fontName = QString(propList["style:font-name"]->getStr().cstr());
+ QString realFontName = constructFontName(fontName, fontVari);
+ textCharStyle.setFont((*m_Doc->AllFonts)[realFontName]);
+ }
+ if (propList["fo:font-name"])
+ {
+ QString fontVari = "";
+ if (propList["fo:font-weight"])
+ fontVari = QString(propList["fo:font-weight"]->getStr().cstr());
+ QString fontName = QString(propList["fo:font-name"]->getStr().cstr());
QString realFontName = constructFontName(fontName, fontVari);
textCharStyle.setFont((*m_Doc->AllFonts)[realFontName]);
}
More information about the scribus-commit
mailing list