[Libreoffice-commits] core.git: TODO: Unclear whether comparisons against "Ruby" shall use == or startsWith
Stephan Bergmann
sbergman at redhat.com
Wed Mar 20 06:00:51 PDT 2013
Maybe somebody with deeper insight into the Writer code can resolve that
TODO.
Thanks,
Stephan
On 03/20/2013 01:06 PM, Stephan Bergmann wrote:
> commit dc06576d8809760b79f771831bed3122878e0505
> Author: Stephan Bergmann<sbergman at redhat.com>
> Date: Wed Mar 20 12:54:59 2013 +0100
>
> TODO: Unclear whether comparisons against "Ruby" shall use == or startsWith
>
> ...as the use of compareToAscii(RTL_CONSTASCII_STRINGPARAM(...)) would imply.
>
> Change-Id: I46f2f0c5e66e5ced4dfea00c2a7e87a316748a0b
>
> diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
> index 4d66549..89f40f6 100644
> --- a/sw/source/core/unocore/unoport.cxx
> +++ b/sw/source/core/unocore/unoport.cxx
> @@ -763,7 +763,7 @@ beans::PropertyState SwXTextPortion::getPropertyState(const OUString& rPropertyN
> throw uno::RuntimeException();
>
> if (GetTextPortionType() == PORTION_RUBY_START &&
> - !rPropertyName.compareToAscii( RTL_CONSTASCII_STRINGPARAM("Ruby") ))
> + rPropertyName.startsWith("Ruby")) //TODO: startsWith or ==?
> {
> eRet = beans::PropertyState_DIRECT_VALUE;
> }
> @@ -794,7 +794,7 @@ uno::Sequence< beans::PropertyState > SwXTextPortion::getPropertyStates(
> beans::PropertyState* pStates = aRet.getArray();
> for(sal_Int32 nProp = 0; nProp < rPropertyNames.getLength();nProp++)
> {
> - if(!pNames[nProp].compareToAscii( RTL_CONSTASCII_STRINGPARAM("Ruby") ))
> + if (pNames[nProp].startsWith("Ruby")) //TODO: startsWith or ==?
> pStates[nProp] = beans::PropertyState_DIRECT_VALUE;
> }
> }
More information about the LibreOffice
mailing list