r22125 by jghali -
scribus-commit
scribus-commit at lists.scribus.net
Thu Jul 27 18:24:05 UTC 2017
Author: jghali
Date: Thu Jul 27 18:24:05 2017
New Revision: 22125
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22125
Log:
#14926 related: use unicode line separator (0x2028) instead of a control char (0x1C) as line break character
Modified:
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/text/specialchars.cpp
trunk/Scribus/scribus/text/specialchars.h
trunk/Scribus/scribus/ui/loremipsum.cpp
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22125&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Thu Jul 27 18:24:05 2017
@@ -1727,6 +1727,7 @@
tmp2.replace(QRegExp("\r"), QChar(5));
tmp2.replace(QRegExp("\n"), QChar(5));
tmp2.replace(QRegExp("\t"), QChar(4));
+ tmp2.replace(SpecialChars::OLD_LINEBREAK, SpecialChars::LINEBREAK);
tmp2.replace(SpecialChars::OLD_NBHYPHEN, SpecialChars::NBHYPHEN);
tmp2.replace(SpecialChars::OLD_NBSPACE, SpecialChars::NBSPACE);
QString tmpf(it->attribute("CFONT", doc->itemToolPrefs().textFont));
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22125&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Thu Jul 27 18:24:05 2017
@@ -1234,6 +1234,7 @@
tmp2.replace(QRegExp("\r"), QChar(13));
tmp2.replace(QRegExp("\n"), QChar(13));
tmp2.replace(QRegExp("\t"), QChar(9));
+ tmp2.replace(SpecialChars::OLD_LINEBREAK, SpecialChars::LINEBREAK);
tmp2.replace(SpecialChars::OLD_NBHYPHEN, SpecialChars::NBHYPHEN);
tmp2.replace(SpecialChars::OLD_NBSPACE, SpecialChars::NBSPACE);
tmpf = it->attribute("CFONT", "");
Modified: trunk/Scribus/scribus/text/specialchars.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22125&path=/trunk/Scribus/scribus/text/specialchars.cpp
==============================================================================
--- trunk/Scribus/scribus/text/specialchars.cpp (original)
+++ trunk/Scribus/scribus/text/specialchars.cpp Thu Jul 27 18:24:05 2017
@@ -26,7 +26,8 @@
QChar SpecialChars::OBJECT = QChar(25);
QChar SpecialChars::TAB = QChar(9);
QChar SpecialChars::PARSEP = QChar(13);
-QChar SpecialChars::LINEBREAK = QChar(28);
+QChar SpecialChars::LINEBREAK = QChar(0x2028);
+QChar SpecialChars::OLD_LINEBREAK = QChar(28);
QChar SpecialChars::COLBREAK = QChar(26);
QChar SpecialChars::FRAMEBREAK = QChar(27);
QChar SpecialChars::SHYPHEN = QChar(0xAD);
Modified: trunk/Scribus/scribus/text/specialchars.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22125&path=/trunk/Scribus/scribus/text/specialchars.h
==============================================================================
--- trunk/Scribus/scribus/text/specialchars.h (original)
+++ trunk/Scribus/scribus/text/specialchars.h Thu Jul 27 18:24:05 2017
@@ -35,6 +35,7 @@
static QChar TAB;
static QChar PARSEP;
static QChar LINEBREAK;
+ static QChar OLD_LINEBREAK;
static QChar COLBREAK;
static QChar FRAMEBREAK;
static QChar SHYPHEN;
Modified: trunk/Scribus/scribus/ui/loremipsum.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22125&path=/trunk/Scribus/scribus/ui/loremipsum.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/loremipsum.cpp (original)
+++ trunk/Scribus/scribus/ui/loremipsum.cpp Thu Jul 27 18:24:05 2017
@@ -82,6 +82,7 @@
if (element.tagName() == "p")
{
QString txt = element.text().simplified();
+ txt.replace(SpecialChars::OLD_LINEBREAK, SpecialChars::LINEBREAK);
txt.replace(SpecialChars::OLD_NBSPACE, SpecialChars::NBSPACE);
txt.replace(SpecialChars::OLD_NBHYPHEN, SpecialChars::NBHYPHEN);
loremIpsum.append(txt);
More information about the scribus-commit
mailing list