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


Lionel, anyone,

Do you happen to have insight into this, how to trigger the code? (Found in preparation for <https://gerrit.libreoffice.org/#/c/16371/> "Catch inadvertent uses of OUString(sal_Unicode) ctor.")

On 06/19/2015 11:04 AM, Stephan Bergmann wrote:
commit e46e8d19458fd64ff20b1013e5eeabd07e62379c
Author: Stephan Bergmann <sbergman@redhat.com>
Date:   Fri Jun 19 10:11:31 2015 +0200

     Shall this produce a string representation of a number?

     On the one hand, the code had apparently treated nIdx as a sal_Unicode character
     value ever since its inception in e718950884fa2db240822e1711f301b39a70ad3e "new
     querydesign."  On the other hand, the preceding BROW_VIS_ROW case does produce
     strings "0" and "1".

     Change-Id: Ife6e98ba32146cc469b722fa4f013c12152b5505

diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx 
b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 64ecc68..954638d 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -2245,7 +2245,7 @@ OUString OSelectionBrowseBox::GetCellContents(sal_Int32 nCellIndex, 
sal_uInt16 n
              sal_Int32 nIdx = m_pOrderCell->GetSelectEntryPos();
              if (nIdx == LISTBOX_ENTRY_NOTFOUND)
                  nIdx = 0;
-            return OUString(nIdx);
+            return OUString::number(nIdx);
          }
          default:
              return GetCellText(nCellIndex, nColId);


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.