r19321 by fschmid - Fixed Bug #11967: Misplaced text in VDX file

scribus-commit scribus-commit at lists.scribus.net
Sun Jul 6 18:36:15 UTC 2014


Author: fschmid
Date: Sun Jul  6 18:36:15 2014
New Revision: 19321

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19321
Log:
Fixed Bug #11967: Misplaced text in VDX file

Modified:
    trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
    trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp

Modified: trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19321&path=/trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/revenge/rawpainter.cpp Sun Jul  6 18:36:15 2014
@@ -998,6 +998,14 @@
 			ite->setColumnGap(valueAsPoint(propList["fo:column-gap"]));
 			minTxtW += valueAsPoint(propList["fo:column-gap"]);
 		}
+		if (propList["draw:textarea-vertical-align"])
+		{
+			QString align = QString(propList["draw:textarea-vertical-align"]->getStr().cstr());
+			if (align == "middle")
+				ite->setVerticalAlignment(1);
+			else if (align == "bottom")
+				ite->setVerticalAlignment(2);
+		}
 		ite->setFirstLineOffset(FLOPFontAscent);
 		actTextItem = ite;
 		QString pStyle = CommonStrings::DefaultParagraphStyle;

Modified: trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19321&path=/trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/vsd/importvsd.cpp Sun Jul  6 18:36:15 2014
@@ -349,15 +349,18 @@
 	RawPainter painter(m_Doc, baseX, baseY, docWidth, docHeight, importerFlags, &Elements, &importedColors, &importedPatterns, tmpSel, "vsd");
 	if (!libvisio::VisioDocument::parse(&input, &painter))
 	{
-		qDebug() << "ERROR: Parsing failed!";
-		if (progressDialog)
-			progressDialog->close();
-		if (importerFlags & LoadSavePlugin::lfCreateDoc)
-		{
-			ScribusMainWindow* mw=(m_Doc==0) ? ScCore->primaryMainWindow() : m_Doc->scMW();
-			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
-			QMessageBox::warning(mw, CommonStrings::trWarning, tr("Parsing failed!\n\nPlease submit your file (if possible) to the\nDocument Liberation Project http://www.documentliberation.org"), 1, 0, 0);
-			qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
+		qDebug() << "ERROR: Parsing as Document failed!\ntrying to parse as Stencils";
+		if (!libvisio::VisioDocument::parseStencils(&input, &painter))
+		{
+			if (progressDialog)
+				progressDialog->close();
+			if (importerFlags & LoadSavePlugin::lfCreateDoc)
+			{
+				ScribusMainWindow* mw=(m_Doc==0) ? ScCore->primaryMainWindow() : m_Doc->scMW();
+				qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
+				QMessageBox::warning(mw, CommonStrings::trWarning, tr("Parsing failed!\n\nPlease submit your file (if possible) to the\nDocument Liberation Project http://www.documentliberation.org"), 1, 0, 0);
+				qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
+			}
 		}
 		return false;
 	}




More information about the scribus-commit mailing list