Revision 10092

View differences:

trunk/libraries/libDwg/src/com/iver/cit/jdwglib/dwg/readers/DwgFileV14Reader.java
45 45
import org.apache.log4j.Logger;
46 46

  
47 47
import com.iver.cit.gvsig.fmap.drivers.dgn.ByteUtils;
48
import com.iver.cit.jdwglib.dwg.CorruptedDwgEntityException;
48 49
import com.iver.cit.jdwglib.dwg.DwgClass;
49 50
import com.iver.cit.jdwglib.dwg.DwgFile;
50 51
import com.iver.cit.jdwglib.dwg.DwgHandleReference;
......
1551 1552
			logger.info("Mapeando tipo "+dwgClass.getClassNum()+" con "+dwgClass.getDxfName());
1552 1553
		}
1553 1554
		
1554
		
1555
		
1556
		
1555

  
1557 1556
		for (int i=0; i<dwgFile.getDwgObjectOffsets().size(); i++) {
1558 1557
			DwgObjectOffset doo = (DwgObjectOffset)dwgFile.getDwgObjectOffsets().get(i);
1559 1558
			DwgObject obj = readDwgObject(doo.getOffset(), i);
......
1710 1709
		    			 * */
1711 1710
		    		}
1712 1711
		    	}//if type 500
1712
		    	else{
1713
		    		//Resulta que algunos tipos, sin ser mayor que 500, si que
1714
		    		//se hacen coincidir con entradas en la object class.
1715
		    		/*
1716
		    		 * Foro de OpenDesign:
1717
		    		 * 
1718
		    		 * Starting with A2k, some of the entity types that used to be 
1719
		    		 * proxies have been given fixed type values. &nbsp;These are:
1720
		    		 		OLE2FRAME - 74
1721
		    		 		LWPOLYLINE - 77
1722
		    		 		HATCH - 78
1723
		    		 * */	
1724
		    	}
1713 1725
		    }//if DwgObject.class	
1714
		    
1715
	    
1716
		    
1717
		    
1718
	       
1719
//	        elif _type in _vmap:
1720
//	            _stype = _vmap[_type]
1721
//	          
1722
//	            if _stype == 'HATCH': # where is the data kept?
1723
//	                _bitpos, _val = dwgutil.test_bit(_data, _bitpos)
1724
//	                # print "graphic flag: " + str(_val)
1725
//	                
1726
//	            if _stype in _vobjmap:
1727
//	                _vobjmap[_stype](_ent, _data, _bitpos)
1728
//	        else:
1729
//	            # print "unhandled object type: %d" % _type
1730
//	            pass
1731
//	        _objlist.append(_ent)
1732
	    	
1733
	    	
1734
	    	/*
1735
	    	 _vobjmap = {
1736
    'DICTIONARYVAR' : dictionaryvar_reader,
1737
    'HATCH' : hatch_reader,
1738
    'IDBUFFER' : idbuffer_reader,
1739
    'IMAGE' : image_reader,
1740
    'IMAGEDEF' : imagedef_reader,
1741
    'IMAGEDEFREACTOR' : imagedefreactor_reader,
1742
    'LAYER_INDEX' : layer_index_reader,
1743
    'LWPLINE' : lwpline_reader,
1744
#     'OLE2FRAME' : ole2frame_reader,
1745
    'RASTERVARIABLES' : rastervariables_reader,
1746
    'SORTENTSTABLE' : sortentstable_reader,
1747
    'SPATIAL_FILTER' : spatial_filter_reader,
1748
    'SPATIAL_INDEX' : spatial_index_reader,
1749
    'XRECORD' : xrecord_reader
1750
    }
1751
	    	  
1752
	    	  
1753
	    	  
1754
	    	 * */
1755
	    	
1756
	    	
1757
	    	
1758
	    	
1759
			
1726
		    	       		
1760 1727
		    return obj;
1761 1728
		    
1762 1729
	    } catch (Exception e) {
......
1775 1742
	 * 
1776 1743
	 * */
1777 1744
	protected void readSpecificObject(DwgObject obj, int[] data, int bitPos) throws Exception {
1745
		/*
1778 1746
		if (obj.getType()==0x11) {
1779 1747
			((DwgArc)obj).readDwgArcV15(data, bitPos);
1780 1748
		} else if (obj.getType()==0x12) {
......
1853 1821
		} else {
1854 1822
			//logger.warn("Tipo de objeto pendiente de implementaci�n");
1855 1823
		}
1824
		*/
1856 1825
	}
1857 1826
	/*
1858 1827
	 * TODO 
......
2102 2071
	/* (non-Javadoc)
2103 2072
	 * @see com.iver.cit.jdwglib.dwg.readers.IDwgFileReader#readObjectHeader(int[], int, com.iver.cit.jdwglib.dwg.DwgObject)
2104 2073
	 */
2105
	public int readObjectHeader(int[] data, int offset, DwgObject dwgObject) throws Exception {
2074
	public int readObjectHeader(int[] data, int offset, DwgObject dwgObject) {
2106 2075
		int bitPos = offset;
2107 2076
		Integer mode = (Integer)DwgUtil.getBits(data, 2, bitPos);
2108 2077
	    bitPos += 2;
......
2146 2115
	 * (non-Javadoc)
2147 2116
	 * @see com.iver.cit.jdwglib.dwg.readers.IDwgFileReader#readObjectTailer(int[], int, com.iver.cit.jdwglib.dwg.DwgObject)
2148 2117
	 */
2149
	public int readObjectTailer(int[] data, int offset, DwgObject dwgObject) throws Exception {
2118
	public int readObjectTailer(int[] data, int offset, DwgObject dwgObject) throws RuntimeException, CorruptedDwgEntityException {
2150 2119
		int bitPos = offset;
2151 2120
		List val = null;
2152 2121
		

Also available in: Unified diff