LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XStringAbbreviation Interface Referencepublished

Abbreviate arbitrary strings. More...

import"XStringAbbreviation.idl";

Inheritance diagram for XStringAbbreviation:
XInterface UriAbbreviation

Public Member Functions

string abbreviateString ([in] XStringWidth xStringWidth, [in] long nWidth, [in] string aString)
 Abbreviate a string, so that the resulting abbreviated string is not wider than some given width. 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

Abbreviate arbitrary strings.

It is expected that there will be different implementations of this interface, that each expect strings conforming to a certain structure (e.g., URIs, platform-specific file paths, or newsgroup names). The abbreviation algorithms will then take into account the structural information.

See also
XStringWidth

Member Function Documentation

◆ abbreviateString()

string abbreviateString ( [in] XStringWidth  xStringWidth,
[in] long  nWidth,
[in] string  aString 
)

Abbreviate a string, so that the resulting abbreviated string is not wider than some given width.

The width of a string is an abstract concept here, measured via an XStringWidth interface. Examples are the number of characters in the string (XStringWidth will measure the string's length), or the width in pixel when displayed with a specific font (which XStringWidth would encapsulate).

Parameters
xStringWidthThe interface that makes concrete the abstract notion of string width.
nWidthThe resulting abbreviated string's width will be no larger than this.
aStringThe string that is abbreviated.
Returns
an abbreviated string.

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