r19947 by fschmid - Fixed Bug #12766: 1.5 : Opening 1.4.4 sla that with path object
scribus-commit
scribus-commit at lists.scribus.net
Wed Mar 25 20:23:51 UTC 2015
Author: fschmid
Date: Wed Mar 25 20:23:51 2015
New Revision: 19947
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19947
Log:
Fixed Bug #12766: 1.5 : Opening 1.4.4 sla that with path object
Modified:
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19947&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Wed Mar 25 20:23:51 2015
@@ -1645,11 +1645,16 @@
{
OB->PoLine.resize(obj->attribute("NUMPO").toUInt());
tmp = obj->attribute("POCOOR");
+ double maxVal = std::numeric_limits<double>::max() / 2.0;
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMPO").toUInt(); ++cx)
{
fp >> xf;
fp >> yf;
+ if (xf >= 999999)
+ xf = maxVal;
+ if (yf >= 999999)
+ yf = maxVal;
OB->PoLine.setPoint(cx, xf, yf);
}
}
@@ -1660,11 +1665,16 @@
{
OB->ContourLine.resize(obj->attribute("NUMCO").toUInt());
tmp = obj->attribute("COCOOR");
+ double maxVal = std::numeric_limits<double>::max() / 2.0;
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMCO").toUInt(); ++cx)
{
fp >> xf;
fp >> yf;
+ if (xf >= 999999)
+ xf = maxVal;
+ if (yf >= 999999)
+ yf = maxVal;
OB->ContourLine.setPoint(cx, xf, yf);
}
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19947&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Wed Mar 25 20:23:51 2015
@@ -2917,10 +2917,15 @@
tmp = attrs.valueAsString("POCOOR");
ScTextStream fp(&tmp, QIODevice::ReadOnly);
uint numPo = attrs.valueAsUInt("NUMPO");
+ double maxVal = std::numeric_limits<double>::max() / 2.0;
for (uint cx=0; cx < numPo; ++cx)
{
fp >> xf;
fp >> yf;
+ if (xf >= 999999)
+ xf = maxVal;
+ if (yf >= 999999)
+ yf = maxVal;
currItem->PoLine.setPoint(cx, xf, yf);
}
}
@@ -2934,10 +2939,15 @@
tmp = attrs.valueAsString("COCOOR");
ScTextStream fp(&tmp, QIODevice::ReadOnly);
uint numCo = attrs.valueAsUInt("NUMCO");
+ double maxVal = std::numeric_limits<double>::max() / 2.0;
for (uint cx=0; cx < numCo; ++cx)
{
fp >> xf;
fp >> yf;
+ if (xf >= 999999)
+ xf = maxVal;
+ if (yf >= 999999)
+ yf = maxVal;
currItem->ContourLine.setPoint(cx, xf, yf);
}
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19947&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Wed Mar 25 20:23:51 2015
@@ -1892,11 +1892,16 @@
{
currItem->PoLine.resize(obj->attribute("NUMPO").toUInt());
tmp = obj->attribute("POCOOR");
+ double maxVal = std::numeric_limits<double>::max() / 2.0;
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMPO").toUInt(); ++cx)
{
fp >> xf;
fp >> yf;
+ if (xf >= 999999)
+ xf = maxVal;
+ if (yf >= 999999)
+ yf = maxVal;
currItem->PoLine.setPoint(cx, xf, yf);
}
}
@@ -1907,11 +1912,16 @@
{
currItem->ContourLine.resize(obj->attribute("NUMCO").toUInt());
tmp = obj->attribute("COCOOR");
+ double maxVal = std::numeric_limits<double>::max() / 2.0;
ScTextStream fp(&tmp, QIODevice::ReadOnly);
for (uint cx=0; cx<obj->attribute("NUMCO").toUInt(); ++cx)
{
fp >> xf;
fp >> yf;
+ if (xf >= 999999)
+ xf = maxVal;
+ if (yf >= 999999)
+ yf = maxVal;
currItem->ContourLine.setPoint(cx, xf, yf);
}
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19947&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Wed Mar 25 20:23:51 2015
@@ -5230,12 +5230,17 @@
{
currItem->PoLine.resize(attrs.valueAsUInt("NUMPO"));
tmp = attrs.valueAsString("POCOOR");
+ double maxVal = std::numeric_limits<double>::max() / 2.0;
ScTextStream fp(&tmp, QIODevice::ReadOnly);
uint numPo = attrs.valueAsUInt("NUMPO");
for (uint cx=0; cx < numPo; ++cx)
{
fp >> xf;
fp >> yf;
+ if (xf >= 999999)
+ xf = maxVal;
+ if (yf >= 999999)
+ yf = maxVal;
currItem->PoLine.setPoint(cx, xf, yf);
}
}
@@ -5250,12 +5255,17 @@
{
currItem->ContourLine.resize(attrs.valueAsUInt("NUMCO"));
tmp = attrs.valueAsString("COCOOR");
+ double maxVal = std::numeric_limits<double>::max() / 2.0;
ScTextStream fp(&tmp, QIODevice::ReadOnly);
uint numCo = attrs.valueAsUInt("NUMCO");
for (uint cx=0; cx < numCo; ++cx)
{
fp >> xf;
fp >> yf;
+ if (xf >= 999999)
+ xf = maxVal;
+ if (yf >= 999999)
+ yf = maxVal;
currItem->ContourLine.setPoint(cx, xf, yf);
}
}
More information about the scribus-commit
mailing list