[Libreoffice-commits] .: 8 commits - filter/source l10ntools/inc l10ntools/prj l10ntools/source linguistic/source svtools/source unusedcode.easy

Caolán McNamara caolan at kemper.freedesktop.org
Fri Apr 20 03:55:34 PDT 2012


 filter/source/graphicfilter/itiff/ccidecom.cxx |   35 ++++++++--------
 filter/source/graphicfilter/itiff/itiff.cxx    |   17 +++++---
 l10ntools/inc/l10ntools/HelpIndexer.hxx        |    4 -
 l10ntools/inc/l10ntools/HelpSearch.hxx         |    6 --
 l10ntools/inc/l10ntools/LuceneHelper.hxx       |   53 +++++++++++++++++++++++++
 l10ntools/prj/d.lst                            |    1 
 l10ntools/source/help/HelpIndexer.cxx          |    2 
 l10ntools/source/help/HelpSearch.cxx           |    1 
 l10ntools/source/help/LuceneHelper.cxx         |    2 
 l10ntools/source/help/LuceneHelper.hxx         |   44 --------------------
 linguistic/source/hyphdsp.cxx                  |    4 -
 svtools/source/control/calendar.cxx            |    8 +--
 svtools/source/control/ruler.cxx               |    3 -
 svtools/source/control/valueacc.cxx            |    9 ++--
 unusedcode.easy                                |   10 ----
 15 files changed, 99 insertions(+), 100 deletions(-)

New commits:
commit 1dcab66d5c2579c4637891859736b02745fdf8bb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 20 11:54:28 2012 +0100

    WaE: MSVC2008 suppress warnings in clucene headers

diff --git a/l10ntools/inc/l10ntools/LuceneHelper.hxx b/l10ntools/inc/l10ntools/LuceneHelper.hxx
new file mode 100644
index 0000000..c990647
--- /dev/null
+++ b/l10ntools/inc/l10ntools/LuceneHelper.hxx
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * Copyright (C) 2012 Gert van Valkenhoef <g.h.m.van.valkenhoef at rug.nl>
+ *  (initial developer)
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+#ifndef LUCENEHELPER_HXX
+#define LUCENEHELPER_HXX
+
+#if defined _MSC_VER
+#pragma warning(push)
+#pragma warning(disable : 4068 4263 4264 4266)
+#endif
+
+#include <CLucene.h>
+#include <CLucene/analysis/LanguageBasedAnalyzer.h>
+
+#if defined _MSC_VER
+#pragma warning(pop)
+#endif
+
+#include <rtl/ustring.hxx>
+#include <vector>
+
+std::vector<TCHAR> OUStringToTCHARVec(rtl::OUString const &rStr);
+rtl::OUString TCHARArrayToOUString(TCHAR const *str);
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 959ab4d0ca1a09dce08a298e41828c377a1474ff
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 20 11:54:01 2012 +0100

    WaE: MSVC2008 suppress warnings in clucene headers

diff --git a/l10ntools/inc/l10ntools/HelpIndexer.hxx b/l10ntools/inc/l10ntools/HelpIndexer.hxx
index 28c7eb6..df492bb 100644
--- a/l10ntools/inc/l10ntools/HelpIndexer.hxx
+++ b/l10ntools/inc/l10ntools/HelpIndexer.hxx
@@ -31,9 +31,7 @@
 #define HELPINDEXER_HXX
 
 #include <l10ntools/dllapi.h>
-
-#include <CLucene/StdHeader.h>
-#include <CLucene.h>
+#include <l10ntools/LuceneHelper.hxx>
 
 #include <rtl/ustring.hxx>
 #include <set>
diff --git a/l10ntools/inc/l10ntools/HelpSearch.hxx b/l10ntools/inc/l10ntools/HelpSearch.hxx
index 63e2807..1a1b3c0 100644
--- a/l10ntools/inc/l10ntools/HelpSearch.hxx
+++ b/l10ntools/inc/l10ntools/HelpSearch.hxx
@@ -31,14 +31,12 @@
 #define HELPSEARCH_HXX
 
 #include <l10ntools/dllapi.h>
-
-#include <CLucene/StdHeader.h>
-#include <CLucene.h>
+#include <l10ntools/LuceneHelper.hxx>
 
 #include <rtl/ustring.hxx>
 #include <vector>
 
-class L10N_DLLPUBLIC HelpSearch {
+class L10N_DLLPUBLIC HelpSearch{
 	private:
 		rtl::OUString d_lang;
 		rtl::OString d_indexDir;
diff --git a/l10ntools/prj/d.lst b/l10ntools/prj/d.lst
index e9329dc..99aac56 100644
--- a/l10ntools/prj/d.lst
+++ b/l10ntools/prj/d.lst
@@ -47,6 +47,7 @@ mkdir: %_DEST%\bin\help\com\sun\star\help
 ..\inc\l10ntools\dllapi.h %_DEST%\inc\l10ntools\dllapi.h
 ..\inc\l10ntools\directory.hxx %_DEST%\inc\l10ntools\directory.hxx
 ..\inc\l10ntools\file.hxx %_DEST%\inc\l10ntools\file.hxx
+..\inc\l10ntools\LuceneHelper.hxx %_DEST%\inc\l10ntools\LuceneHelper.hxx
 ..\inc\l10ntools\HelpIndexer.hxx %_DEST%\inc\l10ntools\HelpIndexer.hxx
 ..\inc\l10ntools\HelpSearch.hxx %_DEST%\inc\l10ntools\HelpSearch.hxx
 ..\source\filter\merge\FCFGMerge.cfg  %_DEST%\inc\l10ntools\FCFGMerge.cfg
diff --git a/l10ntools/source/help/HelpIndexer.cxx b/l10ntools/source/help/HelpIndexer.cxx
index 3413464..608c6cb 100644
--- a/l10ntools/source/help/HelpIndexer.cxx
+++ b/l10ntools/source/help/HelpIndexer.cxx
@@ -28,8 +28,6 @@
  */
 
 #include <l10ntools/HelpIndexer.hxx>
-#include "LuceneHelper.hxx"
-#include <CLucene/analysis/LanguageBasedAnalyzer.h>
 
 #include <rtl/string.hxx>
 #include <rtl/uri.hxx>
diff --git a/l10ntools/source/help/HelpSearch.cxx b/l10ntools/source/help/HelpSearch.cxx
index d54b278..44c4cb6 100644
--- a/l10ntools/source/help/HelpSearch.cxx
+++ b/l10ntools/source/help/HelpSearch.cxx
@@ -30,7 +30,6 @@
 #include <l10ntools/HelpSearch.hxx>
 #include <osl/file.hxx>
 #include <osl/thread.hxx>
-#include "LuceneHelper.hxx"
 
 #include <iostream>
 
diff --git a/l10ntools/source/help/LuceneHelper.cxx b/l10ntools/source/help/LuceneHelper.cxx
index bee9090..9ab708a 100644
--- a/l10ntools/source/help/LuceneHelper.cxx
+++ b/l10ntools/source/help/LuceneHelper.cxx
@@ -27,7 +27,7 @@
  * instead of those above.
  */
 
-#include "LuceneHelper.hxx"
+#include <l10ntools/LuceneHelper.hxx>
 
 std::vector<TCHAR> OUStringToTCHARVec(rtl::OUString const &rStr)
 {
diff --git a/l10ntools/source/help/LuceneHelper.hxx b/l10ntools/source/help/LuceneHelper.hxx
deleted file mode 100644
index 53ed763..0000000
--- a/l10ntools/source/help/LuceneHelper.hxx
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License or as specified alternatively below. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * Major Contributor(s):
- * Copyright (C) 2012 Gert van Valkenhoef <g.h.m.van.valkenhoef at rug.nl>
- *  (initial developer)
- *
- * All Rights Reserved.
- *
- * For minor contributions see the git repository.
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
- * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
- * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
- * instead of those above.
- */
-
-#ifndef LUCENEHELPER_HXX
-#define LUCENEHELPER_HXX
-
-#include <CLucene/StdHeader.h>
-#include <CLucene.h>
-
-#include <rtl/ustring.hxx>
-#include <vector>
-
-std::vector<TCHAR> OUStringToTCHARVec(rtl::OUString const &rStr);
-rtl::OUString TCHARArrayToOUString(TCHAR const *str);
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 539700e10aa2c7111e469820742341a4233849b6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 20 10:52:05 2012 +0100

    valgrind: Uninitialised value created by heap allocation

diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index e656f2f..c55ebe4 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -730,16 +730,16 @@ void CCIDecompressor::MakeLookUp(const CCIHuffmanTableEntry * pHufTab,
                                  sal_uInt16 nHuffmanTableSize,
                                  sal_uInt16 nMaxCodeBits)
 {
-    sal_uInt16 i,j,nMinCode,nMaxCode,nLookUpSize,nMask;
+    sal_uInt16 nLookUpSize = 1 << nMaxCodeBits;
+    memset(pLookUp, 0, nLookUpSize * sizeof(CCILookUpTableEntry));
 
-    if (bTableBad==sal_True) return;
-
-    nLookUpSize=1<<nMaxCodeBits;
+    if (bTableBad==sal_True)
+        return;
 
-    nMask=0xffff>>(16-nMaxCodeBits);
+    sal_uInt16 nMask = 0xffff >> (16-nMaxCodeBits);
 
-    for (i=0; i<nLookUpSize; i++) pLookUp[i].nCodeBits=0;
-    for (i=0; i<nHuffmanTableSize; i++) {
+    for (sal_uInt16 i = 0; i < nHuffmanTableSize; ++i)
+    {
         if ( pHufTab[i].nValue!=pHufTabSave[i].nValue ||
              pHufTab[i].nCode!=pHufTabSave[i].nCode ||
              pHufTab[i].nCodeBits!=pHufTabSave[i].nCodeBits ||
@@ -749,10 +749,12 @@ void CCIDecompressor::MakeLookUp(const CCIHuffmanTableEntry * pHufTab,
             bTableBad=sal_True;
             return;
         }
-        nMinCode = nMask & (pHufTab[i].nCode << (nMaxCodeBits-pHufTab[i].nCodeBits));
-        nMaxCode = nMinCode | (nMask >> pHufTab[i].nCodeBits);
-        for (j=nMinCode; j<=nMaxCode; j++) {
-            if (pLookUp[j].nCodeBits!=0) {
+        sal_uInt16 nMinCode = nMask & (pHufTab[i].nCode << (nMaxCodeBits-pHufTab[i].nCodeBits));
+        sal_uInt16 nMaxCode = nMinCode | (nMask >> pHufTab[i].nCodeBits);
+        for (sal_uInt16 j=nMinCode; j<=nMaxCode; ++j)
+        {
+            if (pLookUp[j].nCodeBits!=0)
+            {
                 bTableBad=sal_True;
                 return;
             }
commit c8b18c0311b2441f19f9b6b37846a83c0417edc6
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 20 10:26:36 2012 +0100

    valgrind: Uninitialised value created by stack allocation

diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index 92aef91..e656f2f 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -847,20 +847,19 @@ sal_uInt8 CCIDecompressor::ReadBlackOrWhite()
 sal_uInt16 CCIDecompressor::ReadCodeAndDecode(const CCILookUpTableEntry * pLookUp,
                                           sal_uInt16 nMaxCodeBits)
 {
-    sal_uInt16 nCode,nCodeBits;
-    sal_uInt8 nByte;
-
     // Einen Huffman-Code einlesen und dekodieren:
-    while (nInputBitsBufSize<nMaxCodeBits) {
+    while (nInputBitsBufSize<nMaxCodeBits)
+    {
+        sal_uInt8 nByte(0);
         *pIStream >> nByte;
         if ( nOptions  & CCI_OPTION_INVERSEBITORDER )
             nByte = pByteSwap[ nByte ];
         nInputBitsBuf=(nInputBitsBuf<<8) | (sal_uLong)nByte;
         nInputBitsBufSize+=8;
     }
-    nCode=(sal_uInt16)((nInputBitsBuf>>(nInputBitsBufSize-nMaxCodeBits))
+    sal_uInt16 nCode = (sal_uInt16)((nInputBitsBuf>>(nInputBitsBufSize-nMaxCodeBits))
                    &(0xffff>>(16-nMaxCodeBits)));
-    nCodeBits=pLookUp[nCode].nCodeBits;
+    sal_uInt16 nCodeBits = pLookUp[nCode].nCodeBits;
     if (nCodeBits==0) bStatus=sal_False;
     nInputBitsBufSize = nInputBitsBufSize - nCodeBits;
     return pLookUp[nCode].nValue;
commit a5f629fa8edb73e5d74350b3c2d102ae37128382
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 20 10:12:22 2012 +0100

    WaE: MSVC2008 C2220 unsafe mix of types in operation

diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index dd881be..5a17e92 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -272,7 +272,7 @@ Reference< XHyphenatedWord > SAL_CALL
     HyphSvcByLangMap_t::iterator    aIt( aSvcMap.find( nLanguage ) );
     LangSvcEntries_Hyph     *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
 
-    sal_Bool bWordModified = sal_False;
+    bool bWordModified = false;
     if (!pEntry || (nMaxLeading < 0 || nMaxLeading > nWordLen))
     {
 #ifdef LINGU_EXCEPTIONS
@@ -413,7 +413,7 @@ Reference< XHyphenatedWord > SAL_CALL
     HyphSvcByLangMap_t::iterator    aIt( aSvcMap.find( nLanguage ) );
     LangSvcEntries_Hyph     *pEntry = aIt != aSvcMap.end() ? aIt->second.get() : NULL;
 
-    sal_Bool bWordModified = sal_False;
+    bool bWordModified = false;
     if (!pEntry || !(0 <= nIndex && nIndex <= nWordLen - 2))
     {
 #ifdef LINGU_EXCEPTIONS
commit 6c719c1585eb1a2dbab86cc73ff871da41765981
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 20 09:21:25 2012 +0100

    Related: n#615223 local nbyte1 should have been class-level nByte1

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index 7f7023f..22738fc 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -133,7 +133,12 @@ private:
     bool HasAlphaChannel() const;
 public:
 
-    TIFFReader() : pAlphaMask(0), pMaskAcc(0) {}
+    TIFFReader()
+        : pAlphaMask(0)
+        , pMaskAcc(0)
+        , nByte1(0)
+    {
+    }
     ~TIFFReader()
     {
         delete pAlphaMask;
@@ -1102,17 +1107,17 @@ void TIFFReader::MakePalCol( void )
 
 void TIFFReader::ReadHeader()
 {
-    sal_uInt8 nbyte1, nbyte2;
-    sal_uInt16 nushort;
+    sal_uInt8 nbyte2(0);
+    sal_uInt16 nushort(0);
 
-    *pTIFF >> nbyte1;
-    if ( nbyte1 == 'I' )
+    *pTIFF >> nByte1;
+    if ( nByte1 == 'I' )
         pTIFF->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
     else
         pTIFF->SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN );
 
     *pTIFF >> nbyte2 >> nushort;
-    if ( nbyte1 != nbyte2 || ( nbyte1 != 'I' && nbyte1 != 'M' ) || nushort != 0x002a )
+    if ( nByte1 != nbyte2 || ( nByte1 != 'I' && nByte1 != 'M' ) || nushort != 0x002a )
         bStatus = sal_False;
 }
 
commit 442cd72704acc08a09bd4fe8928ff983e2472342
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 20 07:55:51 2012 +0100

    conversions of SV_DECL_PTRARR_SORT making inroads in unusedcode

diff --git a/unusedcode.easy b/unusedcode.easy
index ff33e91..89aa3c8 100755
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -2,11 +2,6 @@ CertificateExtension_XmlSecImpl::setCertExtn(com::sun::star::uno::Sequence<signe
 CharAttribList::Clear()
 Dialog::Dialog(Window*, ResId const&)
 EditEngine::GetNextVisPortion(ParaPortion const*) const
-FmEntryDataArray::DeleteAndDestroy(unsigned short, unsigned short)
-FmEntryDataArray::Insert(FmEntryData* const&, unsigned short&)
-FmEntryDataArray::Insert(FmEntryData* const*, unsigned short)
-FmEntryDataArray::Insert(FmEntryDataArray const*, unsigned short, unsigned short)
-FmEntryDataArray::Remove(FmEntryData* const&, unsigned short)
 FmFieldWinMgr::GetChildWindowId()
 FmPropBrwMgr::GetChildWindowId()
 FontSelectPattern::FontSelectPattern(ImplFontData const&, Size const&, float, int, bool)
@@ -757,8 +752,3 @@ svt::FrameStatusListener::removeStatusListener(rtl::OUString const&)
 svxform::DataNavigatorManager::GetChildWindowId()
 svxform::FmFilterNavigatorWinMgr::GetChildWindowId()
 svxform::NavigatorFrameManager::GetChildWindowId()
-svxform::SvLBoxEntrySortedArray::DeleteAndDestroy(unsigned short, unsigned short)
-svxform::SvLBoxEntrySortedArray::Insert(SvLBoxEntry* const&, unsigned short&)
-svxform::SvLBoxEntrySortedArray::Insert(SvLBoxEntry* const*, unsigned short)
-svxform::SvLBoxEntrySortedArray::Insert(svxform::SvLBoxEntrySortedArray const*, unsigned short, unsigned short)
-svxform::SvLBoxEntrySortedArray::Remove(SvLBoxEntry* const&, unsigned short)
commit c4a477614cad811286f3821ecb35412683b4dff8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Apr 20 00:05:58 2012 +0100

    String::CreateFromInt32->rtl::OUString::valueOf

diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index 9732c76..b1f92aa 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -232,8 +232,8 @@ void Calendar::ImplInit( WinBits nWinStyle )
     maWeekText = XubString( SvtResId( STR_SVT_CALENDAR_WEEK ) );
 
     // Tagestexte anlegen
-    for ( sal_uInt16 i = 0; i < 31; i++ )
-        mpDayText[i] = new UniString( UniString::CreateFromInt32( i+1 ) );
+    for (sal_Int32 i = 0; i < 31; ++i)
+        mpDayText[i] = new UniString(rtl::OUString::valueOf(i+1));
 
     maDragScrollTimer.SetTimeoutHdl( STATIC_LINK( this, Calendar, ScrollHdl ) );
     maDragScrollTimer.SetTimeout( GetSettings().GetMouseSettings().GetScrollRepeat() );
@@ -979,8 +979,8 @@ void Calendar::ImplDraw( sal_Bool bPaint )
                 maCalendarWrapper.setGregorianDateTime( aDate);
                 for ( sal_uInt16 nWeekCount = 0; nWeekCount < 6; nWeekCount++ )
                 {
-                    sal_Int16 nWeek = maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
-                    String  aWeekText( String::CreateFromInt32( nWeek));
+                    sal_Int32 nWeek = maCalendarWrapper.getValue( i18n::CalendarFieldIndex::WEEK_OF_YEAR);
+                    rtl::OUString aWeekText(rtl::OUString::valueOf(nWeek));
                     long    nOffX = (mnWeekWidth-WEEKNUMBER_OFFX)-GetTextWidth( aWeekText );
                     long    nOffY = (mnDayHeight-GetTextHeight())/2;
                     DrawText( Point( nDayX+nOffX, nDayY+nOffY ), aWeekText );
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 3222452..6f1065a 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -510,7 +510,7 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
         nMaxWidth /= nTickUnit;
     else
         nMaxWidth /= aImplRulerUnitTab[mnUnitIndex].nTickUnit;
-    UniString aNumStr( UniString::CreateFromInt32( nMaxWidth ) );
+    UniString aNumStr(rtl::OUString::valueOf(static_cast<sal_Int32>(nMaxWidth)));
     long nTxtWidth = GetTextWidth( aNumStr );
     const long nTextOff   = 4;
     if ( nTickWidth < nTxtWidth+nTextOff )
@@ -593,7 +593,6 @@ void Ruler::ImplDrawTicks( long nMin, long nMax, long nStart, long nCenter )
                 // Tick3 - Output (Text)
                 if ( !(nTick % nTick3) )
                 {
-                    //aNumStr = UniString::CreateFromInt32( nTick / aImplRulerUnitTab[mnUnitIndex].nTickUnit );
                     if ( ( mnUnitIndex == RULER_UNIT_CHAR ) || ( mnUnitIndex == RULER_UNIT_LINE ) )
                         aNumStr = UniString::CreateFromInt32( nTick / nTickUnit );
                     else
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index 37c48c2..e6d63fa 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -951,16 +951,17 @@ sal_Int16 SAL_CALL ValueItemAcc::getAccessibleRole()
     throw (uno::RuntimeException)
 {
     const SolarMutexGuard aSolarGuard;
-    String              aRet;
+    rtl::OUString aRet;
 
     if( mpParent )
     {
         aRet = mpParent->maText;
 
-        if( !aRet.Len() )
+        if( aRet.isEmpty() )
         {
-            aRet = String( RTL_CONSTASCII_USTRINGPARAM( "Item " ) );
-            aRet += String::CreateFromInt32( mpParent->mnId );
+            rtl::OUStringBuffer aBuffer("Item ");
+            aBuffer.append(static_cast<sal_Int32>(mpParent->mnId));
+            aRet = aBuffer.makeStringAndClear();
         }
     }
 


More information about the Libreoffice-commits mailing list