r20496 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Mon Oct 26 21:47:38 UTC 2015
Author: jghali
Date: Mon Oct 26 21:47:38 2015
New Revision: 20496
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20496
Log:
#13471: Fix for broken hyphenation language selection
Modified:
branches/Version14x/Scribus/scribus/fileloader.cpp
branches/Version14x/Scribus/scribus/scribus.cpp
branches/Version14x/Scribus/scribus/scribusdoc.cpp
branches/Version14x/Scribus/scribus/scribusdoc.h
Modified: branches/Version14x/Scribus/scribus/fileloader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20496&path=/branches/Version14x/Scribus/scribus/fileloader.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/fileloader.cpp (original)
+++ branches/Version14x/Scribus/scribus/fileloader.cpp Mon Oct 26 21:47:38 2015
@@ -361,18 +361,6 @@
bool FileLoader::postLoad(ScribusDoc* currDoc)
{
- //CB #3749 We have to set these up in post load as each format will load into the doc itself
- //settings. As the hyphenator was created in the doc constructor, it needs to be updated.
- //FIXME: Remove these duplicate settings altogether
- if (currDoc->docHyphenator!=0)
- {
- currDoc->docHyphenator->Automatic=currDoc->Automatic;
- currDoc->docHyphenator->AutoCheck=currDoc->AutoCheck;
- currDoc->docHyphenator->Language=currDoc->Language;
- currDoc->docHyphenator->MinWordLen=currDoc->MinWordLen;
- currDoc->docHyphenator->HyCount=currDoc->HyCount;
- }
-
ReplacedFonts = currDoc->AllFonts->getSubstitutions(ReplacedFonts.keys());
if (ReplacedFonts.count() != 0)
{
Modified: branches/Version14x/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20496&path=/branches/Version14x/Scribus/scribus/scribus.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribus.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribus.cpp Mon Oct 26 21:47:38 2015
@@ -2322,6 +2322,7 @@
view = tempView;
tempDoc->setCurrentPage(tempDoc->Pages->at(0));
tempDoc->setGUI(requiresGUI, this, tempView);
+ tempDoc->createHyphenator();
if (requiresGUI)
{
tempDoc->docHyphenator->ignoredWords = prefsManager->appPrefs.ignoredWords;
@@ -4166,6 +4167,7 @@
doc->setName(FName);
doc->setMasterPageMode(false);
doc->Language = GetLang(doc->Language);
+ doc->createHyphenator();
HaveNewDoc();
// propertiesPalette->Cpal->ChooseGrad(0);
// propertiesPalette->updateCList();
Modified: branches/Version14x/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20496&path=/branches/Version14x/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusdoc.cpp (original)
+++ branches/Version14x/Scribus/scribus/scribusdoc.cpp Mon Oct 26 21:47:38 2015
@@ -635,7 +635,14 @@
m_ScMW=mw;
//FIXME: stop using m_View
m_View=view;
- docHyphenator=new Hyphenator(m_ScMW, this);
+}
+
+
+void ScribusDoc::createHyphenator()
+{
+ if (docHyphenator)
+ delete docHyphenator;
+ docHyphenator = new Hyphenator(m_ScMW, this);
Q_CHECK_PTR(docHyphenator);
}
Modified: branches/Version14x/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20496&path=/branches/Version14x/Scribus/scribus/scribusdoc.h
==============================================================================
--- branches/Version14x/Scribus/scribus/scribusdoc.h (original)
+++ branches/Version14x/Scribus/scribus/scribusdoc.h Mon Oct 26 21:47:38 2015
@@ -135,6 +135,7 @@
ScribusView* view() const;
ScribusMainWindow* scMW() const {return m_ScMW;}
void setGUI(bool hasgui, ScribusMainWindow* mw, ScribusView* view);
+ void createHyphenator();
/**
* @brief Return the guarded object associated with the document
More information about the scribus-commit
mailing list