r22310 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 30 20:37:50 UTC 2017
Author: jghali
Date: Sat Dec 30 20:37:50 2017
New Revision: 22310
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22310
Log:
fix issue with r22309: ODTIm::constructFontName() and XtgScanner::getFontName() may return invalid font name
Modified:
trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
Modified: trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22310&path=/trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/odt2im/importodt.cpp Sat Dec 30 20:37:50 2017
@@ -1377,6 +1377,8 @@
QScopedPointer<MissingFont> dia(new MissingFont(0, family, m_Doc));
if (dia->exec())
fontName = dia->getReplacementFont();
+ else
+ fontName = m_Doc->itemToolPrefs().textFont;
qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[family] = fontName;
}
Modified: trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22310&path=/trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp (original)
+++ trunk/Scribus/scribus/plugins/gettext/xtgim/xtgscanner.cpp Sat Dec 30 20:37:50 2017
@@ -407,10 +407,15 @@
QScopedPointer<MissingFont> dia(new MissingFont(0, fontName, doc));
if (dia->exec())
{
- qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = dia->getReplacementFont();
fontName = dia->getReplacementFont();
}
+ else
+ {
+ PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName] = doc->itemToolPrefs().textFont;
+ fontName = doc->itemToolPrefs().textFont;
+ }
+ qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
}
else
fontName = PrefsManager::instance()->appPrefs.fontPrefs.GFontSub[fontName];
More information about the scribus-commit
mailing list