2002-05-11 10:47:24 -04:00
|
|
|
/*
|
|
|
|
* ====================================================================
|
|
|
|
* The Apache Software License, Version 1.1
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* Copyright (c) 2000 The Apache Software Foundation. All rights
|
|
|
|
* reserved.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 3. The end-user documentation included with the redistribution,
|
|
|
|
* if any, must include the following acknowledgment:
|
|
|
|
* "This product includes software developed by the
|
|
|
|
* Apache Software Foundation (http://www.apache.org/)."
|
|
|
|
* Alternately, this acknowledgment may appear in the software itself,
|
|
|
|
* if and wherever such third-party acknowledgments normally appear.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 4. The names "Apache" and "Apache Software Foundation" must
|
|
|
|
* not be used to endorse or promote products derived from this
|
|
|
|
* software without prior written permission. For written
|
|
|
|
* permission, please contact apache@apache.org.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* 5. Products derived from this software may not be called "Apache",
|
|
|
|
* nor may "Apache" appear in their name, without prior written
|
|
|
|
* permission of the Apache Software Foundation.
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
|
|
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
|
|
|
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
* ====================================================================
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2002-05-11 10:47:24 -04:00
|
|
|
* This software consists of voluntary contributions made by many
|
|
|
|
* individuals on behalf of the Apache Software Foundation. For more
|
|
|
|
* information on the Apache Software Foundation, please see
|
|
|
|
* <http://www.apache.org/>.
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
|
|
|
package org.apache.poi.hpsf;
|
|
|
|
|
2003-08-23 11:12:22 -04:00
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.Map;
|
|
|
|
|
2002-02-13 23:00:59 -05:00
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>The <em>Variant</em> types as defined by Microsoft's COM. I
|
|
|
|
* found this information in <a
|
|
|
|
* href="http://www.marin.clara.net/COM/variant_type_definitions.htm">
|
|
|
|
* http://www.marin.clara.net/COM/variant_type_definitions.htm</a>.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>In the variant types descriptions the following shortcuts are
|
|
|
|
* used: <strong> [V]</strong> - may appear in a VARIANT,
|
|
|
|
* <strong>[T]</strong> - may appear in a TYPEDESC,
|
|
|
|
* <strong>[P]</strong> - may appear in an OLE property set,
|
|
|
|
* <strong>[S]</strong> - may appear in a Safe Array.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*
|
2003-02-01 08:28:28 -05:00
|
|
|
* @author Rainer Klute (klute@rainer-klute.de)
|
|
|
|
* @version $Id$
|
|
|
|
* @since 2002-02-09
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-02-01 08:28:28 -05:00
|
|
|
public class Variant
|
|
|
|
{
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-07-26 17:17:17 -04:00
|
|
|
* <p>[V][P] Nothing, i.e. not a single byte of data.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_EMPTY = 0;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][P] SQL style Null.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_NULL = 1;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] 2 byte signed int.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_I2 = 2;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] 4 byte signed int.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_I4 = 3;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] 4 byte real.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_R4 = 4;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] 8 byte real.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_R8 = 5;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] currency. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_CY = 6;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] date. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_DATE = 7;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] OLE Automation string. <span
|
|
|
|
* style="background-color: #ffff00">How long is this? How is it
|
|
|
|
* to be interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_BSTR = 8;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] IDispatch *. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_DISPATCH = 9;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][S] SCODE. <span style="background-color: #ffff00">How
|
|
|
|
* long is this? How is it to be interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_ERROR = 10;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] True=-1, False=0.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_BOOL = 11;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] VARIANT *. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_VARIANT = 12;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][S] IUnknown *. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_UNKNOWN = 13;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][S] 16 byte fixed point.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_DECIMAL = 14;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T] signed char.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_I1 = 16;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V][T][P][S] unsigned char.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_UI1 = 17;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T][P] unsigned short.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_UI2 = 18;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T][P] unsigned int.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_UI4 = 19;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T][P] signed 64-bit int.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_I8 = 20;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T][P] unsigned 64-bit int.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_UI8 = 21;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T] signed machine int.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_INT = 22;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T] unsigned machine int.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_UINT = 23;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T] C style void.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_VOID = 24;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T] Standard return type. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_HRESULT = 25;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T] pointer type. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_PTR = 26;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T] (use VT_ARRAY in VARIANT).</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_SAFEARRAY = 27;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T] C style array. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_CARRAY = 28;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T] user defined type. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_USERDEFINED = 29;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T][P] null terminated string.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_LPSTR = 30;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[T][P] wide (Unicode) null terminated string.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_LPWSTR = 31;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] FILETIME. The FILETIME structure holds a date and time
|
|
|
|
* associated with a file. The structure identifies a 64-bit
|
|
|
|
* integer specifying the number of 100-nanosecond intervals which
|
|
|
|
* have passed since January 1, 1601. This 64-bit value is split
|
|
|
|
* into the two dwords stored in the structure.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_FILETIME = 64;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] Length prefixed bytes.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_BLOB = 65;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] Name of the stream follows.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_STREAM = 66;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] Name of the storage follows.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_STORAGE = 67;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] Stream contains an object. <span
|
|
|
|
* style="background-color: #ffff00"> How long is this? How is it
|
|
|
|
* to be interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_STREAMED_OBJECT = 68;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] Storage contains an object. <span
|
|
|
|
* style="background-color: #ffff00"> How long is this? How is it
|
|
|
|
* to be interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_STORED_OBJECT = 69;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] Blob contains an object. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_BLOB_OBJECT = 70;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] Clipboard format. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_CF = 71;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] A Class ID.</p>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>It consists of a 32 bit unsigned integer indicating the size
|
|
|
|
* of the structure, a 32 bit signed integer indicating (Clipboard
|
|
|
|
* Format Tag) indicating the type of data that it contains, and
|
|
|
|
* then a byte array containing the data.</p>
|
2002-05-01 05:31:52 -04:00
|
|
|
*
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>The valid Clipboard Format Tags are:</p>
|
2002-05-01 05:31:52 -04:00
|
|
|
*
|
2003-02-01 08:28:28 -05:00
|
|
|
* <ul>
|
|
|
|
* <li>{@link Thumbnail#CFTAG_WINDOWS}</li>
|
|
|
|
* <li>{@link Thumbnail#CFTAG_MACINTOSH}</li>
|
|
|
|
* <li>{@link Thumbnail#CFTAG_NODATA}</li>
|
|
|
|
* <li>{@link Thumbnail#CFTAG_FMTID}</li>
|
|
|
|
* </ul>
|
2002-05-11 10:47:24 -04:00
|
|
|
*
|
2003-02-01 08:28:28 -05:00
|
|
|
* <pre>typedef struct tagCLIPDATA {
|
2002-05-01 05:31:52 -04:00
|
|
|
* // cbSize is the size of the buffer pointed to
|
|
|
|
* // by pClipData, plus sizeof(ulClipFmt)
|
|
|
|
* ULONG cbSize;
|
|
|
|
* long ulClipFmt;
|
|
|
|
* BYTE* pClipData;
|
2003-02-01 08:28:28 -05:00
|
|
|
* } CLIPDATA;</pre>
|
|
|
|
*
|
|
|
|
* <p>See <a
|
|
|
|
* href="msdn.microsoft.com/library/en-us/com/stgrstrc_0uwk.asp"
|
|
|
|
* target="_blank">
|
|
|
|
* msdn.microsoft.com/library/en-us/com/stgrstrc_0uwk.asp</a>.</p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_CLSID = 72;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[P] simple counted array. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_VECTOR = 0x1000;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V] SAFEARRAY*. <span style="background-color: #ffff00">How
|
|
|
|
* long is this? How is it to be interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_ARRAY = 0x2000;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
|
|
|
/**
|
2003-02-01 08:28:28 -05:00
|
|
|
* <p>[V] void* for local use. <span style="background-color:
|
|
|
|
* #ffff00">How long is this? How is it to be
|
|
|
|
* interpreted?</span></p>
|
2002-02-13 23:00:59 -05:00
|
|
|
*/
|
2003-07-26 17:17:17 -04:00
|
|
|
public static final int VT_BYREF = 0x4000;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
2003-07-26 17:17:17 -04:00
|
|
|
/**
|
|
|
|
* <p>FIXME: Document this!</p>
|
|
|
|
*/
|
|
|
|
public static final int VT_RESERVED = 0x8000;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
2003-07-26 17:17:17 -04:00
|
|
|
/**
|
|
|
|
* <p>FIXME: Document this!</p>
|
|
|
|
*/
|
|
|
|
public static final int VT_ILLEGAL = 0xFFFF;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
2003-07-26 17:17:17 -04:00
|
|
|
/**
|
|
|
|
* <p>FIXME: Document this!</p>
|
|
|
|
*/
|
|
|
|
public static final int VT_ILLEGALMASKED = 0xFFF;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
2003-07-26 17:17:17 -04:00
|
|
|
/**
|
|
|
|
* <p>FIXME: Document this!</p>
|
|
|
|
*/
|
|
|
|
public static final int VT_TYPEMASK = 0xFFF;
|
2002-02-13 23:00:59 -05:00
|
|
|
|
2003-08-23 11:12:22 -04:00
|
|
|
|
|
|
|
|
|
|
|
public static final Map m = new HashMap();
|
|
|
|
|
|
|
|
static
|
|
|
|
{
|
|
|
|
m.put(new Integer(0), "VT_EMPTY");
|
|
|
|
m.put(new Integer(1), "VT_NULL");
|
|
|
|
m.put(new Integer(2), "VT_I2");
|
|
|
|
m.put(new Integer(3), "VT_I4");
|
|
|
|
m.put(new Integer(4), "VT_R4");
|
|
|
|
m.put(new Integer(5), "VT_R8");
|
|
|
|
m.put(new Integer(6), "VT_CY");
|
|
|
|
m.put(new Integer(7), "VT_DATE");
|
|
|
|
m.put(new Integer(8), "VT_BSTR");
|
|
|
|
m.put(new Integer(9), "VT_DISPATCH");
|
|
|
|
m.put(new Integer(10), "VT_ERROR");
|
|
|
|
m.put(new Integer(11), "VT_BOOL");
|
|
|
|
m.put(new Integer(12), "VT_VARIANT");
|
|
|
|
m.put(new Integer(13), "VT_UNKNOWN");
|
|
|
|
m.put(new Integer(14), "VT_DECIMAL");
|
|
|
|
m.put(new Integer(16), "VT_I1");
|
|
|
|
m.put(new Integer(17), "VT_UI1");
|
|
|
|
m.put(new Integer(18), "VT_UI2");
|
|
|
|
m.put(new Integer(19), "VT_UI4");
|
|
|
|
m.put(new Integer(20), "VT_I8");
|
|
|
|
m.put(new Integer(21), "VT_UI8");
|
|
|
|
m.put(new Integer(22), "VT_INT");
|
|
|
|
m.put(new Integer(23), "VT_UINT");
|
|
|
|
m.put(new Integer(24), "VT_VOID");
|
|
|
|
m.put(new Integer(25), "VT_HRESULT");
|
|
|
|
m.put(new Integer(26), "VT_PTR");
|
|
|
|
m.put(new Integer(27), "VT_SAFEARRAY");
|
|
|
|
m.put(new Integer(28), "VT_CARRAY");
|
|
|
|
m.put(new Integer(29), "VT_USERDEFINED");
|
|
|
|
m.put(new Integer(30), "VT_LPSTR");
|
|
|
|
m.put(new Integer(31), "VT_LPWSTR");
|
|
|
|
m.put(new Integer(64), "VT_FILETIME");
|
|
|
|
m.put(new Integer(65), "VT_BLOB");
|
|
|
|
m.put(new Integer(66), "VT_STREAM");
|
|
|
|
m.put(new Integer(67), "VT_STORAGE");
|
|
|
|
m.put(new Integer(68), "VT_STREAMED_OBJECT");
|
|
|
|
m.put(new Integer(69), "VT_STORED_OBJECT");
|
|
|
|
m.put(new Integer(70), "VT_BLOB_OBJECT");
|
|
|
|
m.put(new Integer(71), "VT_CF");
|
|
|
|
m.put(new Integer(72), "VT_CLSID");
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static String getVariantName(final long variantType)
|
|
|
|
{
|
|
|
|
String name = (String) m.get(new Integer((int) variantType));
|
|
|
|
return name != null ? name : "unknown variant type";
|
|
|
|
}
|
|
|
|
|
2003-07-26 17:17:17 -04:00
|
|
|
}
|