(incubating) | The Free and Open Productivity Suite

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous

Content for OpenOffice.org version 3.3.

:: com :: sun :: star :: util ::

interface XStringAbbreviation
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

Methods' Summary
abbreviateString Abbreviate a string, so that the resulting abbreviated string is not wider than some given width.  
Methods' Details
abbreviateString
string
abbreviateString( [in] XStringWidth  xStringWidth,
[in] long  nWidth,
[in] string  aString );

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 xStringWidth
The interface that makes concrete the abstract notion of string width.
Parameter nWidth
The resulting abbreviated string's width will be no larger than this.
Parameter aString
The string that is abbreviated.
Returns
an abbreviated string.
Top of Page

Apache OpenOffice is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.

Copyright & License
Apache and the Apache feather logos are trademarks of The Apache Software Foundation. OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.