Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


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@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;
          }
      }


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.