All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.poi.hpsf.Variant Maven / Gradle / Ivy

/* ====================================================================
   Copyright 2002-2004   Apache Software Foundation

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
==================================================================== */

package org.apache.poi.hpsf;

/**
 * 

The Variant types as defined by Microsoft's COM. I * found this information in * http://www.marin.clara.net/COM/variant_type_definitions.htm.

* *

In the variant types descriptions the following shortcuts are * used: [V] - may appear in a VARIANT, * [T] - may appear in a TYPEDESC, * [P] - may appear in an OLE property set, * [S] - may appear in a Safe Array.

* * @author Rainer Klute ([email protected]) * @version $Id: Variant.java,v 1.6.4.2 2004/02/22 11:54:45 glens Exp $ * @since 2002-02-09 */ public class Variant { /** *

[V][P] Nothing.

*/ public static final int VT_EMPTY = 0; /** *

[V][P] SQL style Null.

*/ public static final int VT_NULL = 1; /** *

[V][T][P][S] 2 byte signed int.

*/ public static final int VT_I2 = 2; /** *

[V][T][P][S] 4 byte signed int.

*/ public static final int VT_I4 = 3; /** *

[V][T][P][S] 4 byte real.

*/ public static final int VT_R4 = 4; /** *

[V][T][P][S] 8 byte real.

*/ public static final int VT_R8 = 5; /** *

[V][T][P][S] currency. How long is this? How is it to be * interpreted?

*/ public static final int VT_CY = 6; /** *

[V][T][P][S] date. How long is this? How is it to be * interpreted?

*/ public static final int VT_DATE = 7; /** *

[V][T][P][S] OLE Automation string. How long is this? How is it * to be interpreted?

*/ public static final int VT_BSTR = 8; /** *

[V][T][P][S] IDispatch *. How long is this? How is it to be * interpreted?

*/ public static final int VT_DISPATCH = 9; /** *

[V][T][S] SCODE. How * long is this? How is it to be interpreted?

*/ public static final int VT_ERROR = 10; /** *

[V][T][P][S] True=-1, False=0.

*/ public static final int VT_BOOL = 11; /** *

[V][T][P][S] VARIANT *. How long is this? How is it to be * interpreted?

*/ public static final int VT_VARIANT = 12; /** *

[V][T][S] IUnknown *. How long is this? How is it to be * interpreted?

*/ public static final int VT_UNKNOWN = 13; /** *

[V][T][S] 16 byte fixed point.

*/ public static final int VT_DECIMAL = 14; /** *

[T] signed char.

*/ public static final int VT_I1 = 16; /** *

[V][T][P][S] unsigned char.

*/ public static final int VT_UI1 = 17; /** *

[T][P] unsigned short.

*/ public static final int VT_UI2 = 18; /** *

[T][P] unsigned int.

*/ public static final int VT_UI4 = 19; /** *

[T][P] signed 64-bit int.

*/ public static final int VT_I8 = 20; /** *

[T][P] unsigned 64-bit int.

*/ public static final int VT_UI8 = 21; /** *

[T] signed machine int.

*/ public static final int VT_INT = 22; /** *

[T] unsigned machine int.

*/ public static final int VT_UINT = 23; /** *

[T] C style void.

*/ public static final int VT_VOID = 24; /** *

[T] Standard return type. How long is this? How is it to be * interpreted?

*/ public static final int VT_HRESULT = 25; /** *

[T] pointer type. How long is this? How is it to be * interpreted?

*/ public static final int VT_PTR = 26; /** *

[T] (use VT_ARRAY in VARIANT).

*/ public static final int VT_SAFEARRAY = 27; /** *

[T] C style array. How long is this? How is it to be * interpreted?

*/ public static final int VT_CARRAY = 28; /** *

[T] user defined type. How long is this? How is it to be * interpreted?

*/ public static final int VT_USERDEFINED = 29; /** *

[T][P] null terminated string.

*/ public static final int VT_LPSTR = 30; /** *

[T][P] wide (Unicode) null terminated string.

*/ public static final int VT_LPWSTR = 31; /** *

[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.

*/ public static final int VT_FILETIME = 64; /** *

[P] Length prefixed bytes.

*/ public static final int VT_BLOB = 65; /** *

[P] Name of the stream follows.

*/ public static final int VT_STREAM = 66; /** *

[P] Name of the storage follows.

*/ public static final int VT_STORAGE = 67; /** *

[P] Stream contains an object. How long is this? How is it * to be interpreted?

*/ public static final int VT_STREAMED_OBJECT = 68; /** *

[P] Storage contains an object. How long is this? How is it * to be interpreted?

*/ public static final int VT_STORED_OBJECT = 69; /** *

[P] Blob contains an object. How long is this? How is it to be * interpreted?

*/ public static final int VT_BLOB_OBJECT = 70; /** *

[P] Clipboard format. How long is this? How is it to be * interpreted?

*/ public static final int VT_CF = 71; /** *

[P] A Class ID.

* *

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.

* *

The valid Clipboard Format Tags are:

* *
    *
  • {@link Thumbnail#CFTAG_WINDOWS}
  • *
  • {@link Thumbnail#CFTAG_MACINTOSH}
  • *
  • {@link Thumbnail#CFTAG_NODATA}
  • *
  • {@link Thumbnail#CFTAG_FMTID}
  • *
* *
typedef struct tagCLIPDATA {
     * // cbSize is the size of the buffer pointed to
     * // by pClipData, plus sizeof(ulClipFmt)
     * ULONG              cbSize;
     * long               ulClipFmt;
     * BYTE*              pClipData;
     * } CLIPDATA;
* *

See * msdn.microsoft.com/library/en-us/com/stgrstrc_0uwk.asp.

*/ public static final int VT_CLSID = 72; /** *

[P] simple counted array. How long is this? How is it to be * interpreted?

*/ public static final int VT_VECTOR = 0x1000; /** *

[V] SAFEARRAY*. How * long is this? How is it to be interpreted?

*/ public static final int VT_ARRAY = 0x2000; /** *

[V] void* for local use. How long is this? How is it to be * interpreted?

*/ public static final int VT_BYREF = 0x4000; /** *

FIXME: Document this!

*/ public static final int VT_RESERVED = 0x8000; /** *

FIXME: Document this!

*/ public static final int VT_ILLEGAL = 0xFFFF; /** *

FIXME: Document this!

*/ public static final int VT_ILLEGALMASKED = 0xFFF; /** *

FIXME: Document this!

*/ public static final int VT_TYPEMASK = 0xFFF; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy