LibreOffice
LibreOffice 24.2 SDK API Reference
|
Abbreviate arbitrary strings. More...
import"XStringAbbreviation.idl";
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... | |
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.
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).
xStringWidth | The interface that makes concrete the abstract notion of string width. |
nWidth | The resulting abbreviated string's width will be no larger than this. |
aString | The string that is abbreviated. |