xub_StrLen and UNO

Norbert Thiebaud nthiebaud at gmail.com
Tue Jul 30 11:09:47 PDT 2013

On Tue, Jul 30, 2013 at 12:06 PM, Stephan Bergmann <sbergman at redhat.com> wrote:
> On 07/30/2013 07:02 PM, Norbert Thiebaud wrote:
>> after a bit more of reflection....
>> 1/ the current API specify 0 as = no-limit
> ah, if that is so (though offapi/com/sun/star/awt/XTextComponent.idl doesn't
> mention it), then the below is indeed a clever way out for now

right it doesn't but UnoEditControlModel does mention it on its
setMaxLen() and the implementation forward the value to the
XTextComponent as-is

otoh, some code use if(getmaxtextlen() != EDIT_NOLIMIT) with
due to the oveflow that translate to SetMaxTextLen(-1) in UNO

furthermore SetMaxTextLen has different default value for the class
Edit (default to EDIT_NOLIMIT) and VclMultiLineEdit(default 0)



More information about the LibreOffice mailing list