[Libreoffice-commits] core.git: TODO: Unclear whether comparisons against "Ruby" shall use == or startsWith

Michael Stahl mstahl at redhat.com
Wed Mar 20 06:19:16 PDT 2013


On 20/03/13 14:00, Stephan Bergmann wrote:
> Maybe somebody with deeper insight into the Writer code can resolve that 
> TODO.

>>       if (GetTextPortionType() == PORTION_RUBY_START &&
>> -        !rPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("Ruby") ))
>> +        rPropertyName.startsWith("Ruby")) //TODO: startsWith or ==?

the Ruby is handled in a very special and ugly way, because there is no
UNO service for it: for everything else in a paragraph the
SwXTextPortion has a single property to retrieve the service instance,
but Ruby exists as 4 properties on the SwXTextPortion itself which all
start with Ruby, so startWith is correct (if perhaps too general) in
these cases.

removed TODO in b19c601bc4e4700b9d193a86795424e847759b4b




More information about the LibreOffice mailing list