r18515 by fschmid - Fixed Bug #11737: PUB import: Manual line breaks not imported correctly
scribus-commit
scribus-commit at lists.scribus.net
Sat Sep 28 08:15:17 UTC 2013
Author: fschmid
Date: Sat Sep 28 08:15:16 2013
New Revision: 18515
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18515
Log:
Fixed Bug #11737: PUB import: Manual line breaks not imported correctly
Modified:
trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
trunk/Scribus/scribus/plugins/import/pub/importpub.h
Modified: trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18515&path=/trunk/Scribus/scribus/plugins/import/pub/importpub.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pub/importpub.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pub/importpub.cpp Sat Sep 28 08:15:16 2013
@@ -530,6 +530,7 @@
finishItem(ite);
applyFill(ite);
}
+ applyFlip(ite);
applyShadow(ite);
}
}
@@ -638,6 +639,7 @@
finishItem(ite);
applyFill(ite);
}
+ applyFlip(ite);
applyShadow(ite);
}
else
@@ -719,6 +721,7 @@
delete tempFile;
}
}
+ applyFlip(ite);
applyShadow(ite);
}
// qDebug() << "drawGraphicObject";
@@ -752,6 +755,10 @@
m_Doc->RotateItem(rot, ite);
m_Doc->RotMode(rm);
}
+ if (propList["draw-mirror-horizontal"])
+ ite->flipImageH();
+ if (propList["draw-mirror-vertical"])
+ ite->flipImageV();
if (propList["fo:padding-left"])
ite->setTextToFrameDistLeft(valueAsPoint(propList["fo:padding-left"]));
if (propList["fo:padding-right"])
@@ -901,6 +908,10 @@
int posC = actTextItem->itemText.length();
if (actText.count() > 0)
{
+ actText.replace(QChar(10), SpecialChars::LINEBREAK);
+ actText.replace(QChar(12), SpecialChars::FRAMEBREAK);
+ actText.replace(QChar(30), SpecialChars::NBHYPHEN);
+ actText.replace(QChar(160), SpecialChars::NBSPACE);
actTextItem->itemText.insertChars(posC, actText);
actTextItem->itemText.applyStyle(posC, textStyle);
actTextItem->itemText.applyCharStyle(posC, actText.length(), textCharStyle);
@@ -1340,6 +1351,18 @@
groupStack.top().Items.append(nite);
groupStack.top().Items.append(ite);
}
+ }
+}
+
+void RawPainter::applyFlip(PageItem* ite)
+{
+ if (m_style["draw:mirror-horizontal"])
+ {
+ ite->setImageFlippedH(true);
+ }
+ if (m_style["draw:mirror-vertical"])
+ {
+ ite->setImageFlippedV(true);
}
}
Modified: trunk/Scribus/scribus/plugins/import/pub/importpub.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18515&path=/trunk/Scribus/scribus/plugins/import/pub/importpub.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pub/importpub.h (original)
+++ trunk/Scribus/scribus/plugins/import/pub/importpub.h Sat Sep 28 08:15:16 2013
@@ -62,6 +62,7 @@
void insertImage(PageItem* ite, QString imgExt, QByteArray &imageData);
void applyFill(PageItem* ite);
void applyShadow(PageItem* ite);
+ void applyFlip(PageItem* ite);
void finishItem(PageItem* ite);
ScribusDoc* m_Doc;
More information about the scribus-commit
mailing list