View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002151 | Scribus | Internal | public | 2005-06-28 19:48 | 2005-07-06 04:43 |
| Reporter | jghali | Assigned To | cbradney | ||
| Priority | normal | Severity | tweak | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Platform | Windows | OS | Windows 9x/2k/Xp | OS Version | Win2k SP4 |
| Product Version | 1.2.2cvs | ||||
| Fixed in Version | 1.2.2cvs | ||||
| Summary | 0002151: 1.2.2cvs patch for Unit enum values conflict in windows.h | ||||
| Description | Here is 1.2.2cvs patch for Unit enum values conflict in windows.h. (Reminder from 0002150) Value Names in Unit enum conflicts with declarations in windows.h. Rename values : POINTS => SC_POINTS PT => SC_PT etc... | ||||
| Tags | No tags attached. | ||||
| Attached Files | unit_renames_12x.diff (6,477 bytes)
Index: scribus/gtmeasure.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/gtmeasure.cpp,v
retrieving revision 1.4
diff -u -r1.4 gtmeasure.cpp
--- scribus/gtmeasure.cpp 14 Dec 2004 05:27:18 -0000 1.4
+++ scribus/gtmeasure.cpp 28 Jun 2005 21:34:59 -0000
@@ -26,16 +26,16 @@
{
switch (u)
{
- case PT:
+ case SC_PT:
ratio = 1.0;
break;
- case MM:
+ case SC_MM:
ratio = 25.4/72;
break;
- case IN:
+ case SC_IN:
ratio = 1.0 / 72.0;
break;
- case P:
+ case SC_P:
ratio = 1.0 / 12.0;
break;
}
@@ -67,26 +67,26 @@
QString dbl = "0.0";
if (lowerValue.find("pt") != -1)
{
- init(PT);
+ init(SC_PT);
dbl = lowerValue.remove("pt");
}
else if (lowerValue.find("mm") != -1)
{
- init(MM);
+ init(SC_MM);
dbl = lowerValue.remove("mm");
}
else if (lowerValue.find("in") != -1)
{
- init(IN);
+ init(SC_IN);
dbl = lowerValue.remove("in");
}
else if (lowerValue.find("p") != -1)
{
- init(P);
+ init(SC_P);
dbl = lowerValue.remove("p");
}
else
- init(PT);
+ init(SC_PT);
dbl = dbl.stripWhiteSpace();
return dbl.toDouble();
Index: scribus/gtmeasure.h
===================================================================
RCS file: /cvs/Scribus/scribus/gtmeasure.h,v
retrieving revision 1.4
diff -u -r1.4 gtmeasure.h
--- scribus/gtmeasure.h 14 Dec 2004 05:27:18 -0000 1.4
+++ scribus/gtmeasure.h 28 Jun 2005 21:34:59 -0000
@@ -24,14 +24,14 @@
#include <qstring.h>
enum Unit {
- POINTS = 0,
- PT = 0,
- MILLIMETERS = 1,
- MM = 1,
- INCHES = 2,
- IN = 2,
- PICAS = 3,
- P = 3
+ SC_POINTS = 0,
+ SC_PT = 0,
+ SC_MILLIMETERS = 1,
+ SC_MM = 1,
+ SC_INCHES = 2,
+ SC_IN = 2,
+ SC_PICAS = 3,
+ SC_P = 3
};
class gtMeasure
@@ -46,11 +46,11 @@
static double convert2(int value);
static double parse(const QString& value);
public:
- static double convert(double value, Unit from, Unit to = PT);
- static double convert(int value, Unit from, Unit to = PT);
- static double d2d(double value, Unit from, Unit to = PT);
- static double i2d(int value, Unit from, Unit to = PT);
- static double qs2d(const QString& value, Unit to = PT);
+ static double convert(double value, Unit from, Unit to = SC_PT);
+ static double convert(int value, Unit from, Unit to = SC_PT);
+ static double d2d(double value, Unit from, Unit to = SC_PT);
+ static double i2d(int value, Unit from, Unit to = SC_PT);
+ static double qs2d(const QString& value, Unit to = SC_PT);
};
#endif // GTMEASURE_H
Index: scribus/plugins/gettext/htmlim/htmlreader.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/gettext/htmlim/htmlreader.cpp,v
retrieving revision 1.6
diff -u -r1.6 htmlreader.cpp
--- scribus/plugins/gettext/htmlim/htmlreader.cpp 10 Mar 2005 18:40:10 -0000 1.6
+++ scribus/plugins/gettext/htmlim/htmlreader.cpp 28 Jun 2005 21:34:59 -0000
@@ -98,7 +98,7 @@
pstylecode->getFont()->setName("Courier Regular");
pstylecode->setName("HTML_code");
pstylep = new gtParagraphStyle(*pstyle);
- pstylep->setSpaceBelow(gtMeasure::i2d(5, MM));
+ pstylep->setSpaceBelow(gtMeasure::i2d(5, SC_MM));
pstylep->setName("HTML_p");
pstylepre = new gtParagraphStyle(*pstyle);
pstylepre->setName("HTML_pre");
Index: scribus/plugins/gettext/odtim/stylereader.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/gettext/odtim/stylereader.cpp,v
retrieving revision 1.5
diff -u -r1.5 stylereader.cpp
--- scribus/plugins/gettext/odtim/stylereader.cpp 17 May 2005 13:55:04 -0000 1.5
+++ scribus/plugins/gettext/odtim/stylereader.cpp 28 Jun 2005 21:34:56 -0000
@@ -708,29 +708,29 @@
if (lowerValue.find("pt") != -1)
{
dbl = lowerValue.remove("pt");
- ret = gtMeasure::d2d(dbl.toDouble(), PT);
+ ret = gtMeasure::d2d(dbl.toDouble(), SC_PT);
}
else if (lowerValue.find("mm") != -1)
{
dbl = lowerValue.remove("mm");
- ret = gtMeasure::d2d(dbl.toDouble(), MM);
+ ret = gtMeasure::d2d(dbl.toDouble(), SC_MM);
}
else if (lowerValue.find("cm") != -1)
{
dbl = lowerValue.remove("cm");
- ret = gtMeasure::d2d(dbl.toDouble() * 10, MM);
+ ret = gtMeasure::d2d(dbl.toDouble() * 10, SC_MM);
}
else if (lowerValue.find("in") != -1)
{
dbl = lowerValue.remove("inch");
dbl = lowerValue.remove("in");
- ret = gtMeasure::d2d(dbl.toDouble(), IN);
+ ret = gtMeasure::d2d(dbl.toDouble(), SC_IN);
}
else if (lowerValue.find("pi") != -1)
{
dbl = lowerValue.remove("pica");
dbl = lowerValue.remove("pi");
- ret = gtMeasure::d2d(dbl.toDouble(), P);
+ ret = gtMeasure::d2d(dbl.toDouble(), SC_P);
}
else if (lowerValue.find("%") != -1)
{
Index: scribus/plugins/gettext/sxwim/stylereader.cpp
===================================================================
RCS file: /cvs/Scribus/scribus/plugins/gettext/sxwim/stylereader.cpp,v
retrieving revision 1.10
diff -u -r1.10 stylereader.cpp
--- scribus/plugins/gettext/sxwim/stylereader.cpp 5 Mar 2005 21:26:26 -0000 1.10
+++ scribus/plugins/gettext/sxwim/stylereader.cpp 28 Jun 2005 21:34:59 -0000
@@ -649,29 +649,29 @@
if (lowerValue.find("pt") != -1)
{
dbl = lowerValue.remove("pt");
- ret = gtMeasure::d2d(dbl.toDouble(), PT);
+ ret = gtMeasure::d2d(dbl.toDouble(), SC_PT);
}
else if (lowerValue.find("mm") != -1)
{
dbl = lowerValue.remove("mm");
- ret = gtMeasure::d2d(dbl.toDouble(), MM);
+ ret = gtMeasure::d2d(dbl.toDouble(), SC_MM);
}
else if (lowerValue.find("cm") != -1)
{
dbl = lowerValue.remove("cm");
- ret = gtMeasure::d2d(dbl.toDouble() * 10, MM);
+ ret = gtMeasure::d2d(dbl.toDouble() * 10, SC_MM);
}
else if (lowerValue.find("in") != -1)
{
dbl = lowerValue.remove("inch");
dbl = lowerValue.remove("in");
- ret = gtMeasure::d2d(dbl.toDouble(), IN);
+ ret = gtMeasure::d2d(dbl.toDouble(), SC_IN);
}
else if (lowerValue.find("pi") != -1)
{
dbl = lowerValue.remove("pica");
dbl = lowerValue.remove("pi");
- ret = gtMeasure::d2d(dbl.toDouble(), P);
+ ret = gtMeasure::d2d(dbl.toDouble(), SC_P);
}
else if (lowerValue.find("%") != -1)
{
| ||||
| Patch | |||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2005-06-28 19:48 | jghali | New Issue | |
| 2005-06-28 19:48 | jghali | File Added: unit_renames_12x.diff | |
| 2005-06-28 19:55 | cbradney | Status | new => assigned |
| 2005-06-28 19:55 | cbradney | Assigned To | => cbradney |
| 2005-06-28 20:04 | cbradney | Status | assigned => resolved |
| 2005-06-28 20:04 | cbradney | Fixed in Version | => 1.2.2cvs |
| 2005-06-28 20:04 | cbradney | Resolution | open => fixed |
| 2005-06-28 20:04 | cbradney | Note Added: 0005200 | |
| 2005-06-28 20:06 | cbradney | Status | resolved => closed |
| 2005-07-06 04:43 |
|
Relationship added | child of 0000015 |