summaryrefslogtreecommitdiff
path: root/svl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-07-02 16:02:38 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-07-03 21:24:35 +0100
commitbccf34c19ae022b67565e212fa4ec0d5213947de (patch)
tree73c2d2e29ad8d15999cbfb2ff554efa1e502a35e /svl/source
parent285289275d1cf1769080a208b55be984cd269e1e (diff)
ditch String::CreateFromAscii
Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691
Diffstat (limited to 'svl/source')
-rw-r--r--svl/source/misc/inettype.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index 33f3070b8611..8d0244e3930f 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -94,7 +94,7 @@ public:
static INetContentType GetContentType(UniString const & rTypeName);
- static UniString GetContentType(INetContentType eTypeID);
+ static rtl::OUString GetContentType(INetContentType eTypeID);
static UniString GetPresentation(INetContentType eTypeID);
@@ -593,15 +593,14 @@ INetContentType Registration::GetContentType(UniString const & rTypeName)
//============================================================================
// static
-UniString Registration::GetContentType(INetContentType eTypeID)
+rtl::OUString Registration::GetContentType(INetContentType eTypeID)
{
Registration &rRegistration = theRegistration::get();
TypeIDMap::iterator pEntry = rRegistration.m_aTypeIDMap.find( eTypeID );
if( pEntry != rRegistration.m_aTypeIDMap.end() )
return pEntry->second->m_aTypeName;
- else
- return UniString();
+ return rtl::OUString();
}
//============================================================================
@@ -735,7 +734,7 @@ INetContentType INetContentTypes::GetContentType(UniString const & rTypeName)
//============================================================================
//static
-UniString INetContentTypes::GetContentType(INetContentType eTypeID)
+rtl::OUString INetContentTypes::GetContentType(INetContentType eTypeID)
{
static sal_Char const * aMap[CONTENT_TYPE_LAST + 1];
static bool bInitialized = false;
@@ -750,10 +749,10 @@ UniString INetContentTypes::GetContentType(INetContentType eTypeID)
bInitialized = true;
}
- UniString aTypeName = eTypeID <= CONTENT_TYPE_LAST ?
- UniString::CreateFromAscii(aMap[eTypeID]) :
+ rtl::OUString aTypeName = eTypeID <= CONTENT_TYPE_LAST ?
+ rtl::OUString::createFromAscii(aMap[eTypeID]) :
Registration::GetContentType(eTypeID);
- if (aTypeName.Len() == 0)
+ if (aTypeName.isEmpty())
{
OSL_FAIL("INetContentTypes::GetContentType(): Bad ID");
return rtl::OUString(CONTENT_TYPE_STR_APP_OCTSTREAM);