summaryrefslogtreecommitdiffstats
path: root/scribus/gtaction.cpp
diff options
context:
space:
mode:
authorjghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>2012-04-03 20:24:49 +0000
committerjghali <jghali@11d20701-8431-0410-a711-e3c959e3b870>2012-04-03 20:24:49 +0000
commit8c59d60f62e048a2d94c3bea8c43e4ec1382446a (patch)
tree462b32fba0880eac72be3e1d7dedb2857eab1a88 /scribus/gtaction.cpp
parented3374c57d36bb26369e382dc2797b67b6dd976b (diff)
downloadscribus-8c59d60f62e048a2d94c3bea8c43e4ec1382446a.tar.gz
scribus-8c59d60f62e048a2d94c3bea8c43e4ec1382446a.tar.xz
scribus-8c59d60f62e048a2d94c3bea8c43e4ec1382446a.zip
text import : add support for new unicode line separator (0x2028) and paragraph separator (0x2029)
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17412 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/gtaction.cpp')
-rw-r--r--scribus/gtaction.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/scribus/gtaction.cpp b/scribus/gtaction.cpp
index 7d9eb52..94bd5ab 100644
--- a/scribus/gtaction.cpp
+++ b/scribus/gtaction.cpp
@@ -198,7 +198,7 @@ void gtAction::write(const QString& text, gtStyle *style)
lastStyle = newStyle;
lastStyleStart = it->itemText.length();
- QChar ch0(0), ch5(5), ch10(10), ch13(13);
+ QChar ch0(0), ch5(5), ch10(10), ch13(13);
for (int a = 0; a < text.length(); ++a)
{
if ((text.at(a) == ch0) || (text.at(a) == ch13))
@@ -206,6 +206,10 @@ void gtAction::write(const QString& text, gtStyle *style)
QChar ch = text.at(a);
if ((ch == ch10) || (ch == ch5))
ch = ch13;
+ else if (ch.unicode() == 0x2028)
+ ch = SpecialChars::LINEBREAK;
+ else if (ch.unicode() == 0x2029)
+ ch = SpecialChars::PARSEP;
int pos = it->itemText.length();
it->itemText.insertChars(pos, QString(ch));