r14863 by fschmid - Fixed Bug #8913: "The Xpos and Ypos parameters of the images are ignored"

scribus-commit scribus-commit at lists.scribus.net
Tue Mar 9 22:01:18 CET 2010


Revision: 14863
Author: fschmid
Date: 2010-03-09T20:56:18.995186Z
Commit message: Fixed Bug #8913: "The Xpos and Ypos parameters of the images are ignored"

Changeset: 
M  /trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
M  /trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp

Diffs:
Index: scribus/plugins/fileloader/scribus13format/scribus13format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 14862)
+++ scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 14863)
@@ -2056,6 +2056,8 @@
 		if (pagenr > -2) 
 			currItem->OwnPage = pagenr;
 		UndoManager::instance()->setUndoEnabled(false);
+		currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
+		currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
 		currItem->setImageXYScale(scx, scy);
 		currItem->setImageXYOffset(offsX, offsY);
 		currItem->setImageRotation(rot);
@@ -2098,8 +2100,6 @@
 		currItem->setImageShown(obj->attribute("PICART").toInt());
 /*		currItem->BBoxX = obj->attribute("BBOXX").toDouble();
 		currItem->BBoxH = obj->attribute("BBOXH").toDouble(); */
-		currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
-		currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
 		currItem->setLineWidth(pw);
 		if (currItem->pixm.imgInfo.layerInfo.count() != 0)
 		{
@@ -2143,6 +2143,8 @@
 		UndoManager::instance()->setUndoEnabled(false);
 		if ((obj->attribute("ANNOTATION", "0").toInt()) && (static_cast<bool>(obj->attribute("ANICON", "0").toInt())))
 		{
+			currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
+			currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
 			currItem->setImageXYScale(scx, scy);
 			currItem->setImageXYOffset(offsX, offsY);
 			currItem->setImageRotation(rot);
@@ -2158,8 +2160,6 @@
 			currItem->setImageShown(obj->attribute("PICART").toInt());
 /*			currItem->BBoxX = obj->attribute("BBOXX").toDouble();
 			currItem->BBoxH = obj->attribute("BBOXH").toDouble(); */
-			currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
-			currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
 		}
 		//currItem->convertTo(pt);
 		UndoManager::instance()->setUndoEnabled(true);
@@ -2172,6 +2172,8 @@
 		UndoManager::instance()->setUndoEnabled(false);
 		if ((obj->attribute("ANNOTATION", "0").toInt()) && (static_cast<bool>(obj->attribute("ANICON", "0").toInt())))
 		{
+			currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
+			currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
 			currItem->setImageXYScale(scx, scy);
 			currItem->setImageXYOffset(offsX, offsY);
 			currItem->setImageRotation(rot);
@@ -2187,8 +2189,6 @@
 			currItem->setImageShown(obj->attribute("PICART").toInt());
 /*			currItem->BBoxX = obj->attribute("BBOXX").toDouble();
 			currItem->BBoxH = obj->attribute("BBOXH").toDouble(); */
-			currItem->ScaleType = obj->attribute("SCALETYPE", "1").toInt();
-			currItem->AspectRatio = obj->attribute("RATIO", "0").toInt();
 		}
 		//currItem->convertTo(pt);
 		UndoManager::instance()->setUndoEnabled(true);
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 14862)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 14863)
@@ -2301,6 +2301,8 @@
 		if (pagenr > -2) 
 			currItem->OwnPage = pagenr;
 		UndoManager::instance()->setUndoEnabled(false);
+		currItem->ScaleType   = attrs.valueAsInt("SCALETYPE", 1);
+		currItem->AspectRatio = attrs.valueAsInt("RATIO", 0);
 		currItem->setImageXYScale(scx, scy);
 		currItem->setImageXYOffset(attrs.valueAsDouble("LOCALX"), attrs.valueAsDouble("LOCALY"));
 		currItem->setImageRotation(attrs.valueAsDouble("LOCALROT"));
@@ -2378,8 +2380,6 @@
 		currItem->setImageShown( attrs.valueAsInt("PICART"));
 /*		currItem->BBoxX = ScCLocale::toDoubleC( obj->attribute("BBOXX"));
 		currItem->BBoxH = ScCLocale::toDoubleC( obj->attribute("BBOXH")); */
-		currItem->ScaleType   = attrs.valueAsInt("SCALETYPE", 1);
-		currItem->AspectRatio = attrs.valueAsInt("RATIO", 0);
 		currItem->setLineWidth(pw);
 		UndoManager::instance()->setUndoEnabled(true);
 		break;
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 14862)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 14863)
@@ -2313,6 +2313,8 @@
 		if (pagenr > -2) 
 			currItem->OwnPage = pagenr;
 		UndoManager::instance()->setUndoEnabled(false);
+		currItem->ScaleType   = attrs.valueAsInt("SCALETYPE", 1);
+		currItem->AspectRatio = attrs.valueAsInt("RATIO", 0);
 		currItem->setImageXYScale(scx, scy);
 		currItem->setImageXYOffset(attrs.valueAsDouble("LOCALX"), attrs.valueAsDouble("LOCALY"));
 		currItem->setImageRotation(attrs.valueAsDouble("LOCALROT", 0));
@@ -2372,8 +2374,6 @@
 		currItem->setImageShown( attrs.valueAsInt("PICART"));
 /*		currItem->BBoxX = ScCLocale::toDoubleC( obj->attribute("BBOXX"));
 		currItem->BBoxH = ScCLocale::toDoubleC( obj->attribute("BBOXH")); */
-		currItem->ScaleType   = attrs.valueAsInt("SCALETYPE", 1);
-		currItem->AspectRatio = attrs.valueAsInt("RATIO", 0);
 		currItem->setLineWidth(pw);
 		UndoManager::instance()->setUndoEnabled(true);
 		break;
@@ -2393,6 +2393,8 @@
 		UndoManager::instance()->setUndoEnabled(false);
 		if (attrs.valueAsInt("ANNOTATION", 0) && attrs.valueAsBool("ANICON", false))
 		{
+			currItem->ScaleType   = attrs.valueAsInt("SCALETYPE", 1);
+			currItem->AspectRatio = attrs.valueAsInt("RATIO", 0);
 			currItem->setImageXYScale(scx, scy);
 			currItem->setImageXYOffset(attrs.valueAsDouble("LOCALX"), attrs.valueAsDouble("LOCALY"));
 			currItem->setImageRotation(attrs.valueAsDouble("LOCALROT", 0));
@@ -2408,8 +2410,6 @@
 			currItem->setImageShown(attrs.valueAsInt("PICART"));
 /*			currItem->BBoxX = ScCLocale::toDoubleC( obj->attribute("BBOXX"));
 			currItem->BBoxH = ScCLocale::toDoubleC( obj->attribute("BBOXH")); */
-			currItem->ScaleType   = attrs.valueAsInt("SCALETYPE", 1);
-			currItem->AspectRatio = attrs.valueAsInt("RATIO", 0);
 		}
 		//currItem->convertTo(pt);
 		UndoManager::instance()->setUndoEnabled(true);
@@ -2422,6 +2422,8 @@
 		UndoManager::instance()->setUndoEnabled(false);
 		if ((attrs.valueAsInt("ANNOTATION", 0)) && (attrs.valueAsBool("ANICON", false)))
 		{
+			currItem->ScaleType   = attrs.valueAsInt("SCALETYPE", 1);
+			currItem->AspectRatio = attrs.valueAsInt("RATIO", 0);
 			currItem->setImageXYScale(scx, scy);
 			currItem->setImageXYOffset(attrs.valueAsDouble("LOCALX"), attrs.valueAsDouble("LOCALY"));
 			currItem->setImageRotation(attrs.valueAsDouble("LOCALROT", 0));
@@ -2437,8 +2439,6 @@
 			currItem->setImageShown( attrs.valueAsInt("PICART"));
 /*			currItem->BBoxX = ScCLocale::toDoubleC( obj->attribute("BBOXX"));
 			currItem->BBoxH = ScCLocale::toDoubleC( obj->attribute("BBOXH")); */
-			currItem->ScaleType   = attrs.valueAsInt("SCALETYPE", 1);
-			currItem->AspectRatio = attrs.valueAsInt("RATIO", 0);
 		}
 		//currItem->convertTo(pt);
 		UndoManager::instance()->setUndoEnabled(true);




More information about the scribus-commit mailing list