r20462 by fschmid -
scribus-commit
scribus-commit at lists.scribus.net
Sun Oct 11 14:32:58 UTC 2015
Author: fschmid
Date: Sun Oct 11 14:32:58 2015
New Revision: 20462
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20462
Log:
Some fixes to Stylesheets in the rtf importer.
Modified:
trunk/Scribus/scribus/third_party/rtf-qt/StyleSheetDestination.cpp
trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
Modified: trunk/Scribus/scribus/third_party/rtf-qt/StyleSheetDestination.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20462&path=/trunk/Scribus/scribus/third_party/rtf-qt/StyleSheetDestination.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/rtf-qt/StyleSheetDestination.cpp (original)
+++ trunk/Scribus/scribus/third_party/rtf-qt/StyleSheetDestination.cpp Sun Oct 11 14:32:58 2015
@@ -29,6 +29,7 @@
m_currentStyleHandleNumber = 0; /* default */
m_textStyle.setParent(CommonStrings::DefaultParagraphStyle);
m_textStyle.setLineSpacingMode(ParagraphStyle::AutomaticLineSpacing);
+ m_textStyle.charStyle().setFontVariant("");
m_textStyle.charStyle().setFontSize(120.0);
QList<ParagraphStyle::TabRecord> tbs;
tbs.clear();
Modified: trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20462&path=/trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp (original)
+++ trunk/Scribus/scribus/third_party/rtf-qt/sladocumentrtfoutput.cpp Sun Oct 11 14:32:58 2015
@@ -378,6 +378,8 @@
void SlaDocumentRtfOutput::insertStyleSheetTableEntry(quint32 stylesheetTableIndex, ParagraphStyle stylesheetTableEntry)
{
+ QString newName = m_item->itemName() + ":" + stylesheetTableEntry.name();
+ stylesheetTableEntry.setName(newName);
m_stylesTable.insert(stylesheetTableIndex, stylesheetTableEntry);
}
@@ -386,9 +388,12 @@
if (m_stylesTable.contains(styleIndex))
{
ParagraphStyle newStyle = m_stylesTable[styleIndex];
- int fontInd = newStyle.charStyle().fontVariant().toInt();
- newStyle.charStyle().setFontVariant("");
- setFont(fontInd);
+ if (newStyle.charStyle().fontVariant() != "")
+ {
+ int fontInd = newStyle.charStyle().fontVariant().toInt();
+ newStyle.charStyle().setFontVariant("");
+ setFont(fontInd);
+ }
StyleSet<ParagraphStyle>tmp;
tmp.create(newStyle);
m_Doc->redefineStyles(tmp, false);
More information about the scribus-commit
mailing list