[Libreoffice-commits] .: sc/inc sc/source

Kohei Yoshida kohei at kemper.freedesktop.org
Thu Feb 9 14:02:51 PST 2012


 sc/inc/dpcachetable.hxx                     |   10 ++---
 sc/inc/dpdimsave.hxx                        |   22 ++++++------
 sc/inc/dpitemdata.hxx                       |   16 +++++---
 sc/inc/dptablecache.hxx                     |    8 ++--
 sc/source/core/data/dpcachetable.cxx        |   16 +++++---
 sc/source/core/data/dpdimsave.cxx           |   50 ++++++++++++----------------
 sc/source/core/data/dpitemdata.cxx          |   15 +++-----
 sc/source/core/data/dptablecache.cxx        |   18 +++++-----
 sc/source/core/data/dptabres.cxx            |    2 -
 sc/source/filter/excel/xepivot.cxx          |    2 -
 sc/source/filter/xml/XMLExportDataPilot.cxx |    2 -
 sc/source/ui/unoobj/dapiuno.cxx             |    2 -
 12 files changed, 81 insertions(+), 82 deletions(-)

New commits:
commit 2357da95f1382ebb490ca9ed5362d7888e6bcb0c
Author: Kohei Yoshida <kohei.yoshida at suse.com>
Date:   Thu Feb 9 17:02:33 2012 -0500

    String to rtl::OUString.

diff --git a/sc/inc/dpcachetable.hxx b/sc/inc/dpcachetable.hxx
index 7927b1a..2fc86a8 100644
--- a/sc/inc/dpcachetable.hxx
+++ b/sc/inc/dpcachetable.hxx
@@ -68,7 +68,7 @@ public:
     /** individual filter item used in SingleFilter and GroupFilter. */
     struct FilterItem
     {
-        String      maString;
+        rtl::OUString maString;
         double      mfValue;
         bool        mbHasValue;
 
@@ -89,12 +89,12 @@ public:
     class SingleFilter : public FilterBase
     {
     public:
-        explicit SingleFilter(String aString, double fValue, bool bHasValue);
+        explicit SingleFilter(const rtl::OUString& aString, double fValue, bool bHasValue);
         virtual ~SingleFilter() {}
 
         virtual bool match(const ScDPItemData& rCellData) const;
 
-        const String&   getMatchString();
+        const rtl::OUString& getMatchString() const;
         double          getMatchValue() const;
         bool            hasValue() const;
 
@@ -111,7 +111,7 @@ public:
         GroupFilter();
         virtual ~GroupFilter() {}
         virtual bool match(  const  ScDPItemData& rCellData ) const;
-        void addMatchItem(const String& rStr, double fVal, bool bHasValue);
+        void addMatchItem(const rtl::OUString& rStr, double fVal, bool bHasValue);
         size_t getMatchItemCount() const;
 
     private:
@@ -157,7 +157,7 @@ public:
         returned object! */
     const ScDPItemData* getCell(SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const;
     void  getValue( ScDPValueData& rVal, SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const;
-    String getFieldName( SCCOL  nIndex) const;
+    rtl::OUString getFieldName(SCCOL nIndex) const;
 
    /** Get the unique entries for a field specified by index.  The caller must
        make sure that the table is filled before calling function, or it will
diff --git a/sc/inc/dpdimsave.hxx b/sc/inc/dpdimsave.hxx
index 7820ce2..59857fd 100644
--- a/sc/inc/dpdimsave.hxx
+++ b/sc/inc/dpdimsave.hxx
@@ -50,25 +50,25 @@ class ScDPSaveGroupDimension;
 
 class SC_DLLPUBLIC ScDPSaveGroupItem
 {
-    String                  aGroupName;     // name of group
-    ::std::vector<String>   aElements;      // names of items in original dimension
+    rtl::OUString aGroupName;     // name of group
+    ::std::vector<rtl::OUString> aElements;      // names of items in original dimension
 
 public:
-                ScDPSaveGroupItem( const String& rName );
-                ~ScDPSaveGroupItem();
+    ScDPSaveGroupItem( const rtl::OUString& rName );
+    ~ScDPSaveGroupItem();
 
     void    AddToData( ScDPGroupDimension& rDataDim, SvNumberFormatter* pFormatter ) const;
 
-    void    AddElement( const String& rName );
+    void    AddElement( const rtl::OUString& rName );
     void    AddElementsFromGroup( const ScDPSaveGroupItem& rGroup );
-    const String& GetGroupName() const   { return aGroupName; }
-    bool    RemoveElement( const String& rName );   // returns true if found (removed)
+    const rtl::OUString& GetGroupName() const { return aGroupName; }
+    bool    RemoveElement( const rtl::OUString& rName );   // returns true if found (removed)
 
     bool    IsEmpty() const;
     size_t  GetElementCount() const;
-    const String* GetElementByIndex( size_t nIndex ) const;
+    const rtl::OUString* GetElementByIndex(size_t nIndex) const;
 
-    void    Rename( const String& rNewName );
+    void Rename( const rtl::OUString& rNewName );
 
     // remove this group's elements from their groups in rDimension
     // (rDimension must be a different dimension from the one which contains this)
@@ -101,11 +101,11 @@ public:
     sal_Int32   GetDatePart() const             { return nDatePart; }
     const ScDPNumGroupInfo& GetDateInfo() const { return aDateInfo; }
 
-    String  CreateGroupName( const String& rPrefix );
+    rtl::OUString CreateGroupName( const rtl::OUString& rPrefix );
     const ScDPSaveGroupItem* GetNamedGroup( const String& rGroupName ) const;
     ScDPSaveGroupItem* GetNamedGroupAcc( const String& rGroupName );
     void    RemoveFromGroups( const String& rItemName );
-    void    RemoveGroup( const String& rGroupName );
+    void RemoveGroup(const rtl::OUString& rGroupName);
     bool    IsEmpty() const;
     bool HasOnlyHidden(const ScDPUniqueStringSet& rVisible);
 
diff --git a/sc/inc/dpitemdata.hxx b/sc/inc/dpitemdata.hxx
index 97a2fbb..d2c8bf4 100644
--- a/sc/inc/dpitemdata.hxx
+++ b/sc/inc/dpitemdata.hxx
@@ -30,10 +30,11 @@
 #define __SC_DPITEMDATA_HXX__
 
 #include "scdllapi.h"
+#include "address.hxx"
+
 #include "sal/types.h"
 #include "tools/solar.h"
-#include "tools/string.hxx"
-#include "address.hxx"
+#include "rtl/ustring.hxx"
 
 #include <vector>
 
@@ -61,18 +62,19 @@ private:
         sal_Int32 mnDatePart;
     };
 
-    String maString;
+    rtl::OUString maString;
     double mfValue;
     sal_uInt8 mbFlag;
 
     friend class ScDPCache;
 public:
     ScDPItemData();
-    ScDPItemData(sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF);
-    ScDPItemData(const String& rS, double fV = 0.0, bool bHV = false, const sal_uLong nNumFormat = 0 , bool bData = true);
+    ScDPItemData(sal_uLong nNF, const rtl::OUString & rS, double fV, sal_uInt8 bF);
+    ScDPItemData(const rtl::OUString& rS, double fV = 0.0, bool bHV = false,
+                 const sal_uLong nNumFormat = 0, bool bData = true);
     ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel);
 
-    void SetString( const String& rS );
+    void SetString(const rtl::OUString& rS);
     bool IsCaseInsEqual(const ScDPItemData& r) const;
 
     size_t Hash() const;
@@ -86,7 +88,7 @@ public:
     bool IsHasData() const ;
     bool IsHasErr() const ;
     bool IsValue() const;
-    String GetString() const ;
+    const rtl::OUString& GetString() const;
     double GetValue() const ;
     bool HasStringData() const ;
     bool IsDate() const;
diff --git a/sc/inc/dptablecache.hxx b/sc/inc/dptablecache.hxx
index 8934af6..838499b 100644
--- a/sc/inc/dptablecache.hxx
+++ b/sc/inc/dptablecache.hxx
@@ -106,12 +106,12 @@ public:
     void RemoveReference(ScDPObject* pObj) const;
     const ObjectSetType& GetAllReferences() const;
 
-    SCROW GetIdByItemData( long nDim, const String& sItemData ) const;
-    SCROW GetIdByItemData( long nDim, const ScDPItemData& rData ) const;
+    SCROW GetIdByItemData(long nDim, const rtl::OUString& sItemData) const;
+    SCROW GetIdByItemData(long nDim, const ScDPItemData& rData) const;
 
     SCROW GetAdditionalItemID( const ScDPItemData& rData ) const;
 
-    SCCOL GetDimensionIndex( String sName) const;
+    SCCOL GetDimensionIndex(const rtl::OUString& sName) const;
     sal_uLong GetNumType ( sal_uLong nFormat ) const;
     sal_uLong GetNumberFormat( long nDim ) const;
     bool  IsDateDimension( long nDim ) const ;
@@ -124,7 +124,7 @@ public:
 
     SCROW  GetRowCount() const;
     SCROW  GetItemDataId( sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty ) const;
-    String GetDimensionName( sal_uInt16 nColumn ) const;
+    rtl::OUString GetDimensionName( sal_uInt16 nColumn ) const;
     bool IsRowEmpty( SCROW nRow ) const;
     bool IsValid() const;
     bool ValidQuery(SCROW nRow, const ScQueryParam& rQueryParam) const;
diff --git a/sc/source/core/data/dpcachetable.cxx b/sc/source/core/data/dpcachetable.cxx
index db0bcb4..be3f0eb 100644
--- a/sc/source/core/data/dpcachetable.cxx
+++ b/sc/source/core/data/dpcachetable.cxx
@@ -90,9 +90,9 @@ ScDPCacheTable::FilterItem::FilterItem() :
 {
 }
 
-bool  ScDPCacheTable::FilterItem::match( const  ScDPItemData& rCellData ) const
+bool ScDPCacheTable::FilterItem::match( const  ScDPItemData& rCellData ) const
 {
-    if (rCellData.GetString()!= maString &&
+    if (rCellData.GetString().equals(maString) &&
         (!rCellData.IsValue()|| rCellData.GetValue()!=  mfValue))
             return false;
     return true;
@@ -100,7 +100,7 @@ bool  ScDPCacheTable::FilterItem::match( const  ScDPItemData& rCellData ) const
 
 // ----------------------------------------------------------------------------
 
-ScDPCacheTable::SingleFilter::SingleFilter(String aString, double fValue, bool bHasValue)
+ScDPCacheTable::SingleFilter::SingleFilter(const rtl::OUString& aString, double fValue, bool bHasValue)
 {
     maItem.maString = aString;
     maItem.mfValue      = fValue;
@@ -112,7 +112,7 @@ bool ScDPCacheTable::SingleFilter::match( const  ScDPItemData& rCellData ) const
       return maItem.match(rCellData);
 }
 
-const String& ScDPCacheTable::SingleFilter::getMatchString()
+const rtl::OUString& ScDPCacheTable::SingleFilter::getMatchString() const
 {
     return maItem.maString;
 }
@@ -145,7 +145,7 @@ bool ScDPCacheTable::GroupFilter::match( const  ScDPItemData& rCellData ) const
         return false;
 }
 
-void ScDPCacheTable::GroupFilter::addMatchItem(const String& rStr, double fVal, bool bHasValue)
+void ScDPCacheTable::GroupFilter::addMatchItem(const rtl::OUString& rStr, double fVal, bool bHasValue)
 {
     FilterItem aItem;
     aItem.maString = rStr;
@@ -332,10 +332,12 @@ void  ScDPCacheTable::getValue( ScDPValueData& rVal, SCCOL nCol, SCROW nRow, boo
     else
         rVal.Set(0.0, SC_VALTYPE_EMPTY);
 }
-String ScDPCacheTable::getFieldName(SCCOL  nIndex) const
+
+rtl::OUString ScDPCacheTable::getFieldName(SCCOL nIndex) const
 {
     if (!mpCache)
-        return String();
+        return rtl::OUString();
+
     return getCache()->GetDimensionName( nIndex );
 }
 
diff --git a/sc/source/core/data/dpdimsave.cxx b/sc/source/core/data/dpdimsave.cxx
index b6e0cf1..10acf90 100644
--- a/sc/source/core/data/dpdimsave.cxx
+++ b/sc/source/core/data/dpdimsave.cxx
@@ -40,35 +40,31 @@
 
 // ============================================================================
 
-ScDPSaveGroupItem::ScDPSaveGroupItem( const String& rName ) :
-    aGroupName( rName )
-{
-}
+ScDPSaveGroupItem::ScDPSaveGroupItem( const rtl::OUString& rName ) :
+    aGroupName(rName) {}
 
-ScDPSaveGroupItem::~ScDPSaveGroupItem()
-{
-}
+ScDPSaveGroupItem::~ScDPSaveGroupItem() {}
 
-void ScDPSaveGroupItem::AddElement( const String& rName )
+void ScDPSaveGroupItem::AddElement( const rtl::OUString& rName )
 {
-    aElements.push_back( rName );
+    aElements.push_back(rName);
 }
 
 void ScDPSaveGroupItem::AddElementsFromGroup( const ScDPSaveGroupItem& rGroup )
 {
     // add all elements of the other group (used for nested grouping)
 
-    for ( std::vector<String>::const_iterator aIter(rGroup.aElements.begin());
+    for ( std::vector<rtl::OUString>::const_iterator aIter(rGroup.aElements.begin());
                                 aIter != rGroup.aElements.end(); ++aIter )
         aElements.push_back( *aIter );
 }
 
-bool ScDPSaveGroupItem::RemoveElement( const String& rName )
+bool ScDPSaveGroupItem::RemoveElement( const rtl::OUString& rName )
 {
-    for ( std::vector<String>::iterator aIter(aElements.begin()); aIter != aElements.end(); aIter++ )
-        if ( *aIter == rName )          //! ignore case
+    for (std::vector<rtl::OUString>::iterator aIter = aElements.begin(); aIter != aElements.end(); ++aIter)
+        if (*aIter == rName)          //! ignore case
         {
-            aElements.erase( aIter );   // found -> remove
+            aElements.erase(aIter);   // found -> remove
             return true;                // don't have to look further
         }
 
@@ -85,12 +81,12 @@ size_t ScDPSaveGroupItem::GetElementCount() const
     return aElements.size();
 }
 
-const String* ScDPSaveGroupItem::GetElementByIndex( size_t nIndex ) const
+const rtl::OUString* ScDPSaveGroupItem::GetElementByIndex(size_t nIndex) const
 {
     return (nIndex < aElements.size()) ? &aElements[ nIndex ] : 0;
 }
 
-void ScDPSaveGroupItem::Rename( const String& rNewName )
+void ScDPSaveGroupItem::Rename( const rtl::OUString& rNewName )
 {
     aGroupName = rNewName;
 }
@@ -100,16 +96,16 @@ void ScDPSaveGroupItem::RemoveElementsFromGroups( ScDPSaveGroupDimension& rDimen
     // remove this group's elements from their groups in rDimension
     // (rDimension must be a different dimension from the one which contains this)
 
-    for ( std::vector<String>::const_iterator aIter(aElements.begin()); aIter != aElements.end(); aIter++ )
+    for ( std::vector<rtl::OUString>::const_iterator aIter(aElements.begin()); aIter != aElements.end(); aIter++ )
         rDimension.RemoveFromGroups( *aIter );
 }
 
 void ScDPSaveGroupItem::AddToData( ScDPGroupDimension& rDataDim, SvNumberFormatter* pFormatter ) const
 {
-    ScDPGroupItem aGroup( aGroupName );
+    ScDPGroupItem aGroup(aGroupName);
     ScDPItemData aData;
 
-    for ( std::vector<String>::const_iterator aIter(aElements.begin()); aIter != aElements.end(); aIter++ )
+    for ( std::vector<rtl::OUString>::const_iterator aIter(aElements.begin()); aIter != aElements.end(); aIter++ )
     {
         sal_uInt32 nFormat = 0;      //! ...
         double fValue;
@@ -157,7 +153,7 @@ void ScDPSaveGroupDimension::AddGroupItem( const ScDPSaveGroupItem& rItem )
     aGroups.push_back( rItem );
 }
 
-String ScDPSaveGroupDimension::CreateGroupName( const String& rPrefix )
+rtl::OUString ScDPSaveGroupDimension::CreateGroupName(const rtl::OUString& rPrefix)
 {
     // create a name for a new group, using "Group1", "Group2" etc. (translated prefix in rPrefix)
 
@@ -175,7 +171,7 @@ String ScDPSaveGroupDimension::CreateGroupName( const String& rPrefix )
         // look for existing groups
         for ( ScDPSaveGroupItemVec::const_iterator aIter(aGroups.begin());
                                     aIter != aGroups.end() && !bExists; aIter++ )
-            if ( aIter->GetGroupName() == aGroupName )         //! ignore case
+            if (aIter->GetGroupName().equals(aGroupName))         //! ignore case
                 bExists = true;
 
         if ( !bExists )
@@ -185,7 +181,7 @@ String ScDPSaveGroupDimension::CreateGroupName( const String& rPrefix )
     }
 
     OSL_FAIL("CreateGroupName: no valid name found");
-    return EMPTY_STRING;
+    return rtl::OUString();
 }
 
 const ScDPSaveGroupItem* ScDPSaveGroupDimension::GetNamedGroup( const String& rGroupName ) const
@@ -195,8 +191,8 @@ const ScDPSaveGroupItem* ScDPSaveGroupDimension::GetNamedGroup( const String& rG
 
 ScDPSaveGroupItem* ScDPSaveGroupDimension::GetNamedGroupAcc( const String& rGroupName )
 {
-    for ( ScDPSaveGroupItemVec::iterator aIter(aGroups.begin()); aIter != aGroups.end(); aIter++ )
-        if ( aIter->GetGroupName() == rGroupName )         //! ignore case
+    for (ScDPSaveGroupItemVec::iterator aIter = aGroups.begin(); aIter != aGroups.end(); ++aIter)
+        if (aIter->GetGroupName().equals(rGroupName))         //! ignore case
             return &*aIter;
 
     return NULL;        // none found
@@ -232,10 +228,10 @@ void ScDPSaveGroupDimension::RemoveFromGroups( const String& rItemName )
         }
 }
 
-void ScDPSaveGroupDimension::RemoveGroup( const String& rGroupName )
+void ScDPSaveGroupDimension::RemoveGroup(const rtl::OUString& rGroupName)
 {
-    for ( ScDPSaveGroupItemVec::iterator aIter(aGroups.begin()); aIter != aGroups.end(); aIter++ )
-        if ( aIter->GetGroupName() == rGroupName )          //! ignore case
+    for (ScDPSaveGroupItemVec::iterator aIter = aGroups.begin(); aIter != aGroups.end(); ++aIter)
+        if (aIter->GetGroupName().equals(rGroupName))          //! ignore case
         {
             aGroups.erase( aIter );
             return;                     // don't have to look further
diff --git a/sc/source/core/data/dpitemdata.cxx b/sc/source/core/data/dpitemdata.cxx
index 6a06cae..37ad394 100644
--- a/sc/source/core/data/dpitemdata.cxx
+++ b/sc/source/core/data/dpitemdata.cxx
@@ -42,10 +42,10 @@ bool ScDPItemData::isDate( sal_uLong nNumType )
 ScDPItemData::ScDPItemData() :
     mnNumFormat( 0 ), mfValue(0.0), mbFlag(0) {}
 
-ScDPItemData::ScDPItemData(sal_uLong nNF, const String & rS, double fV, sal_uInt8 bF) :
+ScDPItemData::ScDPItemData(sal_uLong nNF, const rtl::OUString & rS, double fV, sal_uInt8 bF) :
     mnNumFormat(nNF), maString(rS), mfValue(fV), mbFlag(bF) {}
 
-ScDPItemData::ScDPItemData(const String& rS, double fV, bool bHV, const sal_uLong nNumFormatP, bool bData) :
+ScDPItemData::ScDPItemData(const rtl::OUString& rS, double fV, bool bHV, const sal_uLong nNumFormatP, bool bData) :
     mnNumFormat( nNumFormatP ), maString(rS), mfValue(fV),
     mbFlag( (MK_VAL*!!bHV) | (MK_DATA*!!bData) | (MK_ERR*!!false) | (MK_DATE*!!isDate( mnNumFormat ) ) )
 {
@@ -54,8 +54,7 @@ ScDPItemData::ScDPItemData(const String& rS, double fV, bool bHV, const sal_uLon
 ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocTab, bool bLabel) :
     mnNumFormat( 0 ), mfValue(0.0), mbFlag( 0 )
 {
-    String aDocStr;
-    pDoc->GetString( nCol, nRow, nDocTab, aDocStr );
+    rtl::OUString aDocStr = pDoc->GetString(nCol, nRow, nDocTab);
 
     SvNumberFormatter* pFormatter = pDoc->GetFormatTable();
 
@@ -81,7 +80,7 @@ ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocT
     }
     else if (bLabel || pDoc->HasData(nCol, nRow, nDocTab))
     {
-        if (bLabel && !aDocStr.Len())
+        if (bLabel && aDocStr.isEmpty())
         {
             // Replace an empty label string with column name.
             rtl::OUStringBuffer aBuf;
@@ -99,7 +98,7 @@ ScDPItemData::ScDPItemData(ScDocument* pDoc, SCCOL nCol, SCROW nRow, SCTAB nDocT
     }
 }
 
-void ScDPItemData::SetString( const String& rS )
+void ScDPItemData::SetString(const rtl::OUString& rS)
 {
     maString = rS;
     mbFlag &= ~(MK_VAL|MK_DATE);
@@ -123,7 +122,7 @@ size_t ScDPItemData::Hash() const
     else
         // If we do unicode safe case insensitive hash we can drop
         // ScDPItemData::operator== and use ::IsCasInsEqual
-        return rtl_ustr_hashCode_WithLength( maString.GetBuffer(), maString.Len() );
+        return rtl_ustr_hashCode_WithLength(maString.getStr(), maString.getLength());
 }
 
 bool ScDPItemData::operator==( const ScDPItemData& r ) const
@@ -202,7 +201,7 @@ bool ScDPItemData::IsValue() const
     return !!(mbFlag&MK_VAL);
 }
 
-String ScDPItemData::GetString() const
+const rtl::OUString& ScDPItemData::GetString() const
 {
     return maString;
 }
diff --git a/sc/source/core/data/dptablecache.cxx b/sc/source/core/data/dptablecache.cxx
index 07b942f..d5c3f2a 100644
--- a/sc/source/core/data/dptablecache.cxx
+++ b/sc/source/core/data/dptablecache.cxx
@@ -623,7 +623,7 @@ bool ScDPCache::AddData(long nDim, ScDPItemData* pData)
 }
 
 
-String ScDPCache::GetDimensionName( sal_uInt16 nColumn ) const
+rtl::OUString ScDPCache::GetDimensionName( sal_uInt16 nColumn ) const
 {
     OSL_ENSURE(nColumn < maLabelNames.size()-1 , "ScDPTableDataCache::GetDimensionName");
     OSL_ENSURE(maLabelNames.size() == static_cast <sal_uInt16> (mnColumnCount+1), "ScDPTableDataCache::GetDimensionName");
@@ -633,7 +633,7 @@ String ScDPCache::GetDimensionName( sal_uInt16 nColumn ) const
         return maLabelNames[nColumn+1].maString;
     }
     else
-        return String();
+        return rtl::OUString();
 }
 
 void ScDPCache::AddLabel(ScDPItemData *pData)
@@ -651,11 +651,11 @@ void ScDPCache::AddLabel(ScDPItemData *pData)
     {
         for ( long i= maLabelNames.size()-1; i>=0; i-- )
         {
-            if( maLabelNames[i].maString == strNewName )
+            if (maLabelNames[i].maString.equals(strNewName))
             {
-                strNewName  =  pData->maString;
+                strNewName = pData->maString;
                 strNewName += String::CreateFromInt32( nIndex );
-                nIndex ++ ;
+                ++nIndex;
                 bFound = true;
             }
         }
@@ -758,11 +758,11 @@ SCROW ScDPCache::GetDimMemberCount( SCCOL nDim ) const
     return maTableDataValues[nDim].size();
 }
 
-SCCOL ScDPCache::GetDimensionIndex(String sName) const
+SCCOL ScDPCache::GetDimensionIndex(const rtl::OUString& sName) const
 {
     for (size_t i = 1; i < maLabelNames.size(); ++i)
     {
-        if ( maLabelNames[i].GetString() == sName )
+        if (maLabelNames[i].GetString().equals(sName))
             return (SCCOL)(i-1);
     }
     return -1;
@@ -789,7 +789,7 @@ const ScDPCache::ObjectSetType& ScDPCache::GetAllReferences() const
     return maRefObjects;
 }
 
-SCROW ScDPCache::GetIdByItemData(long nDim, const String& sItemData ) const
+SCROW ScDPCache::GetIdByItemData(long nDim, const rtl::OUString& sItemData) const
 {
     if ( nDim < mnColumnCount && nDim >=0 )
     {
@@ -804,7 +804,7 @@ SCROW ScDPCache::GetIdByItemData(long nDim, const String& sItemData ) const
     return GetRowCount() + mpAdditionalData->getDataId(rData);
 }
 
-SCROW ScDPCache::GetIdByItemData( long nDim, const ScDPItemData& rData  ) const
+SCROW ScDPCache::GetIdByItemData(long nDim, const ScDPItemData& rData) const
 {
     if ( nDim < mnColumnCount && nDim >=0 )
     {
diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx
index 51dd43d..def28d6 100644
--- a/sc/source/core/data/dptabres.cxx
+++ b/sc/source/core/data/dptabres.cxx
@@ -3909,7 +3909,7 @@ size_t ScDPResultVisibilityData::MemberHash::operator() (const ScDPItemData& r)
     if (r.IsValue())
         return static_cast<size_t>(::rtl::math::approxFloor(r.GetValue()));
     else
-        return rtl_ustr_hashCode_WithLength(r.GetString().GetBuffer(), r.GetString().Len());
+        return rtl_ustr_hashCode_WithLength(r.GetString().getStr(), r.GetString().getLength());
 }
 SCROW ScDPResultMember::GetDataId( ) const
 {
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index b0224b3..afe46d8 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -398,7 +398,7 @@ void XclExpPCField::InitStdGroupField( const XclExpPCField& rBaseField, const Sc
             // loop over all elements of one group
             for( size_t nElemIdx = 0, nElemCount = pGroupItem->GetElementCount(); nElemIdx < nElemCount; ++nElemIdx )
             {
-                if( const String* pElemName = pGroupItem->GetElementByIndex( nElemIdx ) )
+                if (const rtl::OUString* pElemName = pGroupItem->GetElementByIndex(nElemIdx))
                 {
                     // try to find the item that is part of the group in the base field
                     sal_uInt16 nBaseItemIdx = rBaseField.GetItemIndex( *pElemName );
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index ea9e5e6..4094a16 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -668,7 +668,7 @@ void ScXMLExportDataPilot::WriteGroupDimElements(ScDPSaveDimension* pDim, const
                         sal_Int32 nElemCount = pGroup->GetElementCount();
                         for(sal_Int32 j = 0; j < nElemCount; ++j)
                         {
-                            const String* pElem = pGroup->GetElementByIndex( j );
+                            const rtl::OUString* pElem = pGroup->GetElementByIndex(j);
                             if (pElem)
                             {
                                 rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_NAME, *pElem);
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index 4160b1b..efed717 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -2429,7 +2429,7 @@ DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
                             ScFieldGroup aGroup;
                             aGroup.maName = pGroup->GetGroupName();
                             for( sal_Int32 nMemIdx = 0, nMemCount = pGroup->GetElementCount(); nMemIdx < nMemCount; ++nMemIdx )
-                                if( const String* pMem = pGroup->GetElementByIndex( nMemIdx ) )
+                                if (const rtl::OUString* pMem = pGroup->GetElementByIndex(nMemIdx))
                                     aGroup.maMembers.push_back( *pMem );
                             aGroups.push_back( aGroup );
                         }


More information about the Libreoffice-commits mailing list