Revision 32260
trunk/extensions/extCAD/src/com/iver/cit/gvsig/ExportTo.java | ||
---|---|---|
81 | 81 |
private static HashMap<FLyrVect, EndExportToCommand> exportedLayers = |
82 | 82 |
new HashMap<FLyrVect, EndExportToCommand>(); |
83 | 83 |
private static Preferences prefs = Preferences.userRoot().node( "gvSIG.encoding.dbf" ); |
84 |
|
|
84 |
|
|
85 | 85 |
/** |
86 | 86 |
* This method is used to add a layer that is exported |
87 | 87 |
* to other format and its edition has to be finished |
... | ... | |
151 | 151 |
lyrDef.setShapeType(FShape.POINT); |
152 | 152 |
writer.initialize(lyrDef); |
153 | 153 |
} |
154 |
|
|
154 |
|
|
155 | 155 |
if(writer instanceof ShpWriter) { |
156 | 156 |
String charSetName = prefs.get("dbf_encoding", DbaseFile.getDefaultCharset().toString()); |
157 | 157 |
if(lyrVect.getSource() instanceof VectorialFileAdapter) { |
... | ... | |
162 | 162 |
((ShpWriter)writer).loadDbfEncoding((String)s, Charset.forName(charSetName)); |
163 | 163 |
} |
164 | 164 |
} |
165 |
|
|
165 |
|
|
166 | 166 |
// Creamos la tabla. |
167 | 167 |
writer.preProcess(); |
168 | 168 |
|
... | ... | |
173 | 173 |
break; |
174 | 174 |
IGeometry geom = va.getShape(i); |
175 | 175 |
if (geom == null) { |
176 |
reportStep(); |
|
176 | 177 |
continue; |
177 | 178 |
} |
178 | 179 |
if (lyrVect instanceof FLyrAnnotation && geom.getGeometryType()!=FShape.POINT) { |
... | ... | |
207 | 208 |
break; |
208 | 209 |
IGeometry geom = va.getShape(i); |
209 | 210 |
if (geom == null) { |
211 |
reportStep(); |
|
210 | 212 |
continue; |
211 | 213 |
} |
212 | 214 |
if (lyrVect instanceof FLyrAnnotation && geom.getGeometryType()!=FShape.POINT) { |
... | ... | |
350 | 352 |
try { |
351 | 353 |
String tableName = JOptionPane.showInputDialog(PluginServices |
352 | 354 |
.getText(this, "intro_tablename")); |
353 |
|
|
355 |
|
|
354 | 356 |
CharSequence seq = "\\/=.:,;??*{}?$%&()@#|!?"; |
355 | 357 |
for (int i = 0; i < seq.length(); i++) { |
356 | 358 |
char c = seq.charAt(i); |
... | ... | |
358 | 360 |
NotificationManager.showMessageInfo(PluginServices.getText(this, "wrong_characters"), null); |
359 | 361 |
break; |
360 | 362 |
} |
361 |
}
|
|
362 |
|
|
363 |
} |
|
364 |
|
|
363 | 365 |
if (tableName == null) |
364 | 366 |
return; |
365 | 367 |
tableName = tableName.toLowerCase(); |
Also available in: Unified diff