[QGIS Commit] r9043 - in trunk/qgis/src/plugins/dxf2shp_converter:
. dxflib/src
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Aug 10 14:25:59 EDT 2008
Author: jef
Date: 2008-08-10 14:25:58 -0400 (Sun, 10 Aug 2008)
New Revision: 9043
Modified:
trunk/qgis/src/plugins/dxf2shp_converter/CMakeLists.txt
trunk/qgis/src/plugins/dxf2shp_converter/builder.cpp
trunk/qgis/src/plugins/dxf2shp_converter/dxflib/src/dl_writer_ascii.cpp
Log:
fix dxf2shp plugin
Modified: trunk/qgis/src/plugins/dxf2shp_converter/CMakeLists.txt
===================================================================
--- trunk/qgis/src/plugins/dxf2shp_converter/CMakeLists.txt 2008-08-09 12:39:21 UTC (rev 9042)
+++ trunk/qgis/src/plugins/dxf2shp_converter/CMakeLists.txt 2008-08-10 18:25:58 UTC (rev 9043)
@@ -16,10 +16,6 @@
SET (dxf2shpconverter_MOC_HDRS
dxf2shpconverter.h
dxf2shpconvertergui.h
- builder.h
- getInsertions.h
- dxflib/src/dl_dxf.h
- dxflib/src/dl_writer_ascii.h
)
SET (dxf2shpconverter_RCCS dxf2shpconverter.qrc)
Modified: trunk/qgis/src/plugins/dxf2shp_converter/builder.cpp
===================================================================
--- trunk/qgis/src/plugins/dxf2shp_converter/builder.cpp 2008-08-09 12:39:21 UTC (rev 9042)
+++ trunk/qgis/src/plugins/dxf2shp_converter/builder.cpp 2008-08-10 18:25:58 UTC (rev 9043)
@@ -225,21 +225,23 @@
SHPObject *psShape;
int dim = polyVertex.size();
- double xv[dim];
- double yv[dim];
- double zv[dim];
+ double *xv = new double[dim];
+ double *yv = new double[dim];
+ double *zv = new double[dim];
for (int i=0; i < dim; i++)
{
xv[i] = polyVertex[i].x;
yv[i] = polyVertex[i].y;
zv[i] = polyVertex[i].z;
-
}
- psShape = SHPCreateObject( shapefileType, fetchedprims, 0, NULL, NULL,
- dim, xv, yv, zv, NULL );
+ psShape = SHPCreateObject( shapefileType, fetchedprims, 0, NULL, NULL, dim, xv, yv, zv, NULL );
+ delete [] xv;
+ delete [] yv;
+ delete [] zv;
+
shpObjects.push_back(psShape);
@@ -363,9 +365,9 @@
SHPObject *psShape;
int dim = arcPoints.size();
- double xv[dim];
- double yv[dim];
- double zv[dim];
+ double *xv = new double[dim];
+ double *yv = new double[dim];
+ double *zv = new double[dim];
for (int i=0; i < dim; i++)
{
@@ -375,9 +377,12 @@
}
- psShape = SHPCreateObject( shapefileType, fetchedprims, 0, NULL, NULL,
- dim, xv, yv, zv, NULL );
+ psShape = SHPCreateObject( shapefileType, fetchedprims, 0, NULL, NULL, dim, xv, yv, zv, NULL );
+ delete [] xv;
+ delete [] yv;
+ delete [] zv;
+
shpObjects.push_back(psShape);
fetchedprims++;
@@ -427,9 +432,9 @@
SHPObject *psShape;
int dim = circlePoints.size();
- double xv[dim];
- double yv[dim];
- double zv[dim];
+ double *xv = new double[dim];
+ double *yv = new double[dim];
+ double *zv = new double[dim];
for (int i=0; i < dim; i++)
{
@@ -439,9 +444,12 @@
}
- psShape = SHPCreateObject( shapefileType, fetchedprims, 0, NULL, NULL,
- dim, xv, yv, zv, NULL );
+ psShape = SHPCreateObject( shapefileType, fetchedprims, 0, NULL, NULL, dim, xv, yv, zv, NULL );
+ delete [] xv;
+ delete [] yv;
+ delete [] zv;
+
shpObjects.push_back(psShape);
fetchedprims++;
@@ -502,9 +510,9 @@
SHPObject *psObject;
int dim = polyVertex.size();
- double xv[dim];
- double yv[dim];
- double zv[dim];
+ double *xv = new double[dim];
+ double *yv = new double[dim];
+ double *zv = new double[dim];
for (int i=0; i < dim; i++)
{
@@ -514,9 +522,12 @@
}
- psObject = SHPCreateObject( shapefileType, fetchedprims, 0, NULL, NULL,
- dim, xv, yv, zv, NULL );
+ psObject = SHPCreateObject( shapefileType, fetchedprims, 0, NULL, NULL, dim, xv, yv, zv, NULL );
+ delete [] xv;
+ delete [] yv;
+ delete [] zv;
+
shpObjects.push_back(psObject);
polyVertex.clear();
Modified: trunk/qgis/src/plugins/dxf2shp_converter/dxflib/src/dl_writer_ascii.cpp
===================================================================
--- trunk/qgis/src/plugins/dxf2shp_converter/dxflib/src/dl_writer_ascii.cpp 2008-08-09 12:39:21 UTC (rev 9042)
+++ trunk/qgis/src/plugins/dxf2shp_converter/dxflib/src/dl_writer_ascii.cpp 2008-08-10 18:25:58 UTC (rev 9043)
@@ -25,12 +25,9 @@
**
**********************************************************************/
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
+#include <cstdio>
+#include <cstring>
-#include <stdio.h>
-
#include "dl_writer_ascii.h"
#include "dl_exception.h"
More information about the QGIS-commit
mailing list