LibreOffice
LibreOffice 7.4 SDK API Reference
Public Member Functions | List of all members
XFilePreview Interface Referencepublished

FilePicker that support the preview of various file formats should implement this interface. More...

import"XFilePreview.idl";

Inheritance diagram for XFilePreview:
XInterface XFilePicker3 FilePicker

Public Member Functions

sequence< short > getSupportedImageFormats ()
 The method returns all image formats that the preview supports. More...
 
com::sun::star::util::Color getTargetColorDepth ()
 The method returns the supported color depth of the target device. More...
 
long getAvailableWidth ()
 The method returns the available width of the preview window even if the window is invisible or could not be created. More...
 
long getAvailableHeight ()
 The method returns the available height of the preview window even if the window is invisible or could not be created. More...
 
void setImage ([in] short aImageFormat, [in] any aImage) raises ( ::com::sun::star::lang::IllegalArgumentException )
 Sets a new image. More...
 
boolean setShowState ([in] boolean bShowState)
 Optionally sets the current show state of the preview. More...
 
boolean getShowState ()
 Returns the current show state of the preview. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

FilePicker that support the preview of various file formats should implement this interface.

Member Function Documentation

◆ getAvailableHeight()

long getAvailableHeight ( )

The method returns the available height of the preview window even if the window is invisible or could not be created.

If a service implementation doesn't support a file preview 0 will be returned.

Returns
The height of the preview window in pixel.

◆ getAvailableWidth()

long getAvailableWidth ( )

The method returns the available width of the preview window even if the window is invisible or could not be created.

If a service implementation doesn't support a file preview 0 will be returned.

Returns
The width of the preview window in pixel.

◆ getShowState()

boolean getShowState ( )

Returns the current show state of the preview.

Returns
A value of TRUE if the preview window is visible.

A value of FALSE if the preview window is invisible.

◆ getSupportedImageFormats()

sequence< short > getSupportedImageFormats ( )

The method returns all image formats that the preview supports.

Returns
A sequence of all supported preview formats
See also
com::sun::star::ui::dialogs::FilePreviewImageFormats

◆ getTargetColorDepth()

com::sun::star::util::Color getTargetColorDepth ( )

The method returns the supported color depth of the target device.

Deprecated:
  • typically now just returns 0
Returns
The color depth in bit, e.g. 8 bit, 16 bit, 32 bit.

◆ setImage()

void setImage ( [in] short  aImageFormat,
[in] any  aImage 
)
raises (::com::sun::star::lang::IllegalArgumentException
)

Sets a new image.

If the preview is currently hidden the image will be ignored. An empty any will clear the preview window.

Parameters
aImageFormatSpecifies the format of the data that will be delivered
aImageThe image data, the image format defines how the image data have to be delivered
Exceptions
com::sun::star::lang::IllegalArgumentExceptionIf the specified image format is invalid or not supported by the preview implementation
See also
com::sun::star::ui::dialogs::FilePreviewImageFormats

◆ setShowState()

boolean setShowState ( [in] boolean  bShowState)

Optionally sets the current show state of the preview.

It is possible that the preview implementation doesn't support hiding the preview.

Parameters
bShowStateA value of TRUE shows the preview window.

A value of FALSE hides the preview window.

Returns
A value of TRUE on success.

A value of FALSE if the operation fails for any reason or the preview implementation doesn't support hiding the preview.


The documentation for this interface was generated from the following file: