summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-03-20 11:37:07 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-03-20 12:57:34 +0000
commit55a40209072bac2526e74d5be7dd7be5ccd2c175 (patch)
tree3dd0257a893fcd6ff16ab164608b952f65041a94 /tools
parenta92129ec175a1362e61a474cf64992f283db74b4 (diff)
remove ToDouble/ToFloat
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/config.hxx2
-rw-r--r--tools/inc/tools/inetmime.hxx8
-rw-r--r--tools/inc/tools/rc.hxx2
-rw-r--r--tools/inc/tools/string.hxx2
-rw-r--r--tools/source/generic/config.cxx2
-rw-r--r--tools/source/inet/inetmime.cxx10
-rw-r--r--tools/source/rc/resmgr.cxx4
-rw-r--r--tools/source/string/tustring.cxx18
8 files changed, 14 insertions, 34 deletions
diff --git a/tools/inc/tools/config.hxx b/tools/inc/tools/config.hxx
index 478f7653291e..59b813a83344 100644
--- a/tools/inc/tools/config.hxx
+++ b/tools/inc/tools/config.hxx
@@ -69,7 +69,7 @@ public:
sal_Bool HasGroup(const rtl::OString& rGroup) const;
rtl::OString ReadKey(const rtl::OString& rKey) const;
- UniString ReadKey(const rtl::OString& rKey, rtl_TextEncoding eEncoding) const;
+ rtl::OUString ReadKey(const rtl::OString& rKey, rtl_TextEncoding eEncoding) const;
rtl::OString ReadKey(const rtl::OString& rKey, const rtl::OString& rDefault) const;
void WriteKey(const rtl::OString& rKey, const rtl::OString& rValue);
void DeleteKey(const rtl::OString& rKey);
diff --git a/tools/inc/tools/inetmime.hxx b/tools/inc/tools/inetmime.hxx
index 6259c20a887e..4c66c4dd068f 100644
--- a/tools/inc/tools/inetmime.hxx
+++ b/tools/inc/tools/inetmime.hxx
@@ -514,7 +514,7 @@ public:
static void writeHeaderFieldBody(INetMIMEOutputSink & rSink,
HeaderFieldType eType,
- const UniString & rBody,
+ const rtl::OUString& rBody,
rtl_TextEncoding ePreferredEncoding,
bool bInitialSpace = true);
@@ -523,7 +523,7 @@ public:
rtl_TextEncoding eEncoding,
sal_uInt32 & rCharacter);
- static UniString decodeHeaderFieldBody(HeaderFieldType eType,
+ static rtl::OUString decodeHeaderFieldBody(HeaderFieldType eType,
const rtl::OString& rBody);
// #i70651#: Prevent warnings on Mac OS X.
@@ -1237,7 +1237,7 @@ struct INetContentTypeParameter
within Unicode's Private Use Area (effectively adding 0xF800 to the
character's numeric value).
*/
- const UniString m_sValue;
+ const rtl::OUString m_sValue;
/** This is true if the value is successfuly converted to Unicode, and
false if the value is a special mixture of ISO-LATIN-1 characters and
@@ -1247,7 +1247,7 @@ struct INetContentTypeParameter
INetContentTypeParameter(const rtl::OString& rTheAttribute,
const rtl::OString& rTheCharset, const rtl::OString& rTheLanguage,
- const UniString & rTheValue, bool bTheConverted)
+ const rtl::OUString& rTheValue, bool bTheConverted)
: m_sAttribute(rTheAttribute)
, m_sCharset(rTheCharset)
, m_sLanguage(rTheLanguage)
diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx
index 1bca5f99d35b..0ee95dbef5ef 100644
--- a/tools/inc/tools/rc.hxx
+++ b/tools/inc/tools/rc.hxx
@@ -82,7 +82,7 @@ class TOOLS_DLLPUBLIC Resource
sal_Int16 ReadShortRes()
{ return m_pResMgr->ReadShort(); }
// read a string from resource data and increment pointer
- UniString ReadStringRes()
+ rtl::OUString ReadStringRes()
{ return m_pResMgr->ReadString(); }
// read a byte string from resource data and increment pointer
rtl::OString ReadByteStringRes()
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx
index d4ba851c9dac..2d1e6a964954 100644
--- a/tools/inc/tools/string.hxx
+++ b/tools/inc/tools/string.hxx
@@ -183,8 +183,6 @@ public:
static const UniString& EmptyString();
sal_Int32 ToInt32() const;
sal_Int64 ToInt64() const;
- float ToFloat() const;
- double ToDouble() const;
UniString& Assign( const UniString& rStr );
UniString& Assign( const rtl::OUString& rStr );
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index dc0c08b56821..767e17a736c1 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -888,7 +888,7 @@ rtl::OString Config::ReadKey(const rtl::OString& rKey) const
// -----------------------------------------------------------------------
-UniString Config::ReadKey(const rtl::OString& rKey, rtl_TextEncoding eEncoding) const
+rtl::OUString Config::ReadKey(const rtl::OString& rKey, rtl_TextEncoding eEncoding) const
{
if ( mpData->mbIsUTF8BOM )
eEncoding = RTL_TEXTENCODING_UTF8;
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index a711e4adc0a9..531d5fc3c3c1 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -1947,7 +1947,7 @@ void INetMIME::writeUTF8(INetMIMEOutputSink & rSink, sal_uInt32 nChar)
// static
void INetMIME::writeHeaderFieldBody(INetMIMEOutputSink & rSink,
HeaderFieldType eType,
- const UniString & rBody,
+ const rtl::OUString& rBody,
rtl_TextEncoding ePreferredEncoding,
bool bInitialSpace)
{
@@ -1959,7 +1959,7 @@ void INetMIME::writeHeaderFieldBody(INetMIMEOutputSink & rSink,
INetMIMEEncodedWordOutputSink::SPACE_ALWAYS :
INetMIMEEncodedWordOutputSink::SPACE_NO,
ePreferredEncoding);
- aOutput.write(rBody.GetBuffer(), rBody.GetBuffer() + rBody.Len());
+ aOutput.write(rBody.getStr(), rBody.getStr() + rBody.getLength());
aOutput.flush();
}
else
@@ -1967,8 +1967,8 @@ void INetMIME::writeHeaderFieldBody(INetMIMEOutputSink & rSink,
enum Brackets { BRACKETS_OUTSIDE, BRACKETS_OPENING, BRACKETS_INSIDE };
Brackets eBrackets = BRACKETS_OUTSIDE;
- const sal_Unicode * pBodyPtr = rBody.GetBuffer();
- const sal_Unicode * pBodyEnd = pBodyPtr + rBody.Len();
+ const sal_Unicode * pBodyPtr = rBody.getStr();
+ const sal_Unicode * pBodyEnd = pBodyPtr + rBody.getLength();
while (pBodyPtr != pBodyEnd)
switch (*pBodyPtr)
{
@@ -2757,7 +2757,7 @@ bool INetMIME::translateUTF8Char(const sal_Char *& rBegin,
//============================================================================
// static
-UniString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
+rtl::OUString INetMIME::decodeHeaderFieldBody(HeaderFieldType eType,
const rtl::OString& rBody)
{
// Due to a bug in INetCoreRFC822MessageStream::ConvertTo7Bit(), old
diff --git a/tools/source/rc/resmgr.cxx b/tools/source/rc/resmgr.cxx
index 8e9931e9f050..bc4e4ad65119 100644
--- a/tools/source/rc/resmgr.cxx
+++ b/tools/source/rc/resmgr.cxx
@@ -727,7 +727,7 @@ UniString GetTypeRes_Impl( const ResId& rTypeId )
{
// Funktion verlassen, falls Resourcefehler in dieser Funktion
static int bInUse = sal_False;
- UniString aTypStr( UniString::CreateFromInt32( rTypeId.GetId() ) );
+ rtl::OUString aTypStr(OUString::valueOf(static_cast<sal_Int32>(rTypeId.GetId())));
if ( !bInUse )
{
@@ -741,7 +741,7 @@ UniString GetTypeRes_Impl( const ResId& rTypeId )
rTypeId.SetRT( RSC_STRING );
if ( rTypeId.GetResMgr()->IsAvailable( rTypeId ) )
{
- aTypStr = UniString( rTypeId );
+ aTypStr = ResId::toString(rTypeId);
// Versions Resource Klassenzeiger ans Ende setzen
rTypeId.GetResMgr()->Increment( sizeof( RSHEADER_TYPE ) );
}
diff --git a/tools/source/string/tustring.cxx b/tools/source/string/tustring.cxx
index 53f5473eb29a..f3879e8d8126 100644
--- a/tools/source/string/tustring.cxx
+++ b/tools/source/string/tustring.cxx
@@ -105,24 +105,6 @@ sal_Int64 UniString::ToInt64() const
// -----------------------------------------------------------------------
-float UniString::ToFloat() const
-{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
-
- return rtl_ustr_toFloat( mpData->maStr );
-}
-
-// -----------------------------------------------------------------------
-
-double UniString::ToDouble() const
-{
- DBG_CHKTHIS( UniString, DbgCheckUniString );
-
- return rtl_ustr_toDouble( mpData->maStr );
-}
-
-// -----------------------------------------------------------------------
-
xub_StrLen STRING::SearchChar( const STRCODE* pChars, xub_StrLen nIndex ) const
{
DBG_CHKTHIS( STRING, DBGCHECKSTRING );