diff options
author | Sören Möller <soerenmoeller2001@gmail.com> | 2012-07-04 22:53:11 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-07-05 16:18:51 +0200 |
commit | b6cfbd08c2a9b686cfe024a63469cbcd10d9a4bd (patch) | |
tree | b3a8e6515424445bc5a0c1d0e7fb86e313da57f7 /sc/inc | |
parent | 8e9e166d35191eaacfe2001fa0d50fb8c29394f4 (diff) |
Replaced deprecated tools/String with OUString in ScMatrix
Change-Id: If431e5ef8b5c97384a1bb1c7fa36c6894ece8343
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/global.hxx | 4 | ||||
-rw-r--r-- | sc/inc/scmatrix.hxx | 18 |
2 files changed, 13 insertions, 9 deletions
diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx index 1f29753acf6b..371431fc0265 100644 --- a/sc/inc/global.hxx +++ b/sc/inc/global.hxx @@ -35,6 +35,7 @@ #include <osl/endian.h> #include <com/sun/star/uno/Reference.hxx> #include "scdllapi.h" +#include <rtl/ustring.hxx> #include <boost/unordered_map.hpp> #include <vector> @@ -231,6 +232,7 @@ const sal_uInt16 IDF_AUTOFILL = IDF_ALL & ~(IDF_NOTE | IDF_OBJECTS); #define EMPTY_STRING ScGlobal::GetEmptyString() +#define EMPTY_OUSTRING ScGlobal::GetEmptyOUString() // layer id's for drawing #define SC_LAYER_FRONT 0 @@ -496,6 +498,7 @@ class ScGlobal static String** ppRscString; static String* pStrScDoc; static String* pEmptyString; + static ::rtl::OUString* pEmptyOUString; static String* pStrClipDocName; static SvxBrushItem* pEmptyBrushItem; static SvxBrushItem* pButtonBrushItem; @@ -585,6 +588,7 @@ public: static SvxBrushItem* GetEmbeddedBrushItem() { return pEmbeddedBrushItem; } static SvxBrushItem* GetProtectedBrushItem() { return pProtectedBrushItem; } SC_DLLPUBLIC static const String& GetEmptyString(); + SC_DLLPUBLIC static const ::rtl::OUString& GetEmptyOUString(); static const String& GetScDocString(); /** Returns the specified image list with outline symbols. */ diff --git a/sc/inc/scmatrix.hxx b/sc/inc/scmatrix.hxx index 222f863b1828..9657540bcad0 100644 --- a/sc/inc/scmatrix.hxx +++ b/sc/inc/scmatrix.hxx @@ -32,8 +32,8 @@ #include "global.hxx" #include "types.hxx" #include "formula/errorcodes.hxx" -#include <tools/string.hxx> #include "scdllapi.h" +#include <rtl/ustring.hxx> #include <boost/intrusive_ptr.hpp> @@ -53,12 +53,12 @@ struct ScMatrixValue { union { double fVal; - const String* pS; + const ::rtl::OUString* pS; }; ScMatValType nType; /// Only valid if ScMatrix methods indicate so! - const String& GetString() const { return pS ? *pS : EMPTY_STRING; } + const ::rtl::OUString& GetString() const { return pS ? *pS : EMPTY_OUSTRING; } /// Only valid if ScMatrix methods indicate that this is no string! sal_uInt16 GetError() const { return GetDoubleErrorValue( fVal); } @@ -92,7 +92,7 @@ struct ScMatrixValue if (!pS) return r.pS == NULL; - return GetString().Equals(r.GetString()); + return GetString().equals(r.GetString()); } bool operator!= (const ScMatrixValue& r) const @@ -274,8 +274,8 @@ public: void PutDouble( double fVal, SCSIZE nC, SCSIZE nR); void PutDouble( double fVal, SCSIZE nIndex); - void PutString( const String& rStr, SCSIZE nC, SCSIZE nR); - void PutString( const String& rStr, SCSIZE nIndex); + void PutString( const ::rtl::OUString& rStr, SCSIZE nC, SCSIZE nR); + void PutString( const ::rtl::OUString& rStr, SCSIZE nIndex); void PutEmpty( SCSIZE nC, SCSIZE nR); /// Jump FALSE without path void PutEmptyPath( SCSIZE nC, SCSIZE nR); @@ -303,15 +303,15 @@ public: double GetDouble( SCSIZE nIndex) const; /// @return empty string if empty or empty path, else string content. - const String& GetString( SCSIZE nC, SCSIZE nR) const; + const ::rtl::OUString& GetString( SCSIZE nC, SCSIZE nR) const; /// @return empty string if empty or empty path, else string content. - const String& GetString( SCSIZE nIndex) const; + const ::rtl::OUString& GetString( SCSIZE nIndex) const; /** @returns the matrix element's string if one is present, otherwise the numerical value formatted as string, or in case of an error the error string is returned; an empty string for empty, a "FALSE" string for empty path. */ - String GetString( SvNumberFormatter& rFormatter, SCSIZE nC, SCSIZE nR) const; + ::rtl::OUString GetString( SvNumberFormatter& rFormatter, SCSIZE nC, SCSIZE nR) const; /// @ATTENTION: If bString the ScMatrixValue->pS may still be NULL to indicate /// an empty string! |