Beispiel #1
0
 /**
  * Search for EscherClientDataRecord, if found, convert its contents into an array of HSLF records
  *
  * @return an array of HSLF records Contained in the shape's EscherClientDataRecord or <code>null</code>
  */
 protected Record[] GetClientRecords()
 {
     if (_clientData == null)
     {
         EscherRecord r = Shape.GetEscherChild(GetSpContainer(), EscherClientDataRecord.RECORD_ID);
         //ddf can return EscherContainerRecord with recordId=EscherClientDataRecord.RECORD_ID
         //convert in to EscherClientDataRecord on the fly
         if (r != null && !(r is EscherClientDataRecord))
         {
             byte[] data = r.Serialize();
             r = new EscherClientDataRecord();
             r.FillFields(data, 0, new DefaultEscherRecordFactory());
         }
         _clientData = (EscherClientDataRecord)r;
     }
     if (_clientData != null && _clientRecords == null)
     {
         byte[] data = _clientData.GetRemainingData();
         _clientRecords = Record.FindChildRecords(data, 0, data.Length);
     }
     return(_clientRecords);
 }