LibreOffice
LibreOffice 24.2 SDK API Reference
Variables
com::sun::star::embed::ElementModes Constant Group Referencepublished

The constant set contains possible modes to open an element. More...

Variables

const long READ = 1
 specifies opening of an element for reading. More...
 
const long SEEKABLE = 2
 specifies opening of a seekable element. More...
 
const long SEEKABLEREAD = 3
 specifies opening of a seekable element for reading. More...
 
const long WRITE = 4
 specifies opening of an element for writing. More...
 
const long READWRITE = 7
 specifies opening of an element for reading and writing. More...
 
const long TRUNCATE = 8
 lets the document be truncated immediately after opening. More...
 
const long NOCREATE = 16
 restricts creation of a new element on opening in case a requested one does not exist. More...
 

Detailed Description

The constant set contains possible modes to open an element.

The modes can be combined by "or" operation. ElementModes::READ and ElementModes::WRITE are base modes. A result mode must include one of base modes.

See also
XStorage

Variable Documentation

◆ NOCREATE

const long NOCREATE = 16

restricts creation of a new element on opening in case a requested one does not exist.

This flag makes sense only in combination with ElementModes::WRITE.

◆ READ

const long READ = 1

specifies opening of an element for reading.

◆ READWRITE

const long READWRITE = 7

specifies opening of an element for reading and writing.

For a stream element is also specifies that it must be seekable.

◆ SEEKABLE

const long SEEKABLE = 2

specifies opening of a seekable element.

This mode is ignored for Storage elements. This flag makes sense only in combination with ElementModes::READ and/or ElementModes::WRITE.

◆ SEEKABLEREAD

const long SEEKABLEREAD = 3

specifies opening of a seekable element for reading.

This is just a combination of the previous two values. For storages it is the same as ElementModes::READ.

◆ TRUNCATE

const long TRUNCATE = 8

lets the document be truncated immediately after opening.

This flag makes sense only in combination with ElementModes::WRITE.

◆ WRITE

const long WRITE = 4

specifies opening of an element for writing.