r17412 by jghali - text import : add support for new unicode line separator (0x2028) and paragraph separator (0x2029)
scribus-commit
scribus-commit at lists.scribus.net
Tue Apr 3 20:24:49 UTC 2012
Author: jghali
Date: Tue Apr 3 20:24:49 2012
New Revision: 17412
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17412
Log:
text import : add support for new unicode line separator (0x2028) and paragraph separator (0x2029)
Modified:
branches/Version14x/Scribus/scribus/gtaction.cpp
Modified: branches/Version14x/Scribus/scribus/gtaction.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17412&path=/branches/Version14x/Scribus/scribus/gtaction.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/gtaction.cpp (original)
+++ branches/Version14x/Scribus/scribus/gtaction.cpp Tue Apr 3 20:24:49 2012
@@ -198,7 +198,7 @@
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 @@
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));
More information about the scribus-commit
mailing list