interface XStringAbbreviation in module com::sun::star::util::

(Global Index)

Syntax

interface XStringAbbreviation : com::sun::star::uno::XInterface ;

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

Method Summary

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

Method Details



abbreviateString

Syntax

string abbreviateString (
com::sun::star::util::XStringWidth StringWidth,
long Width,
string String );

Description

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

Parameter StringWidth

The interface that makes concrete the abstract notion of string width.

Parameter Width

The resulting abbreviated string's width will be no larger than this.

Parameter String

The string that is abbreviated.

Returns

an abbreviated string.
Top of Page