diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-02 16:02:38 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-03 21:24:35 +0100 |
commit | bccf34c19ae022b67565e212fa4ec0d5213947de (patch) | |
tree | 73c2d2e29ad8d15999cbfb2ff554efa1e502a35e /svl | |
parent | 285289275d1cf1769080a208b55be984cd269e1e (diff) |
ditch String::CreateFromAscii
Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/inettype.hxx | 2 | ||||
-rw-r--r-- | svl/source/misc/inettype.cxx | 15 |
2 files changed, 8 insertions, 9 deletions
diff --git a/svl/inc/svl/inettype.hxx b/svl/inc/svl/inettype.hxx index 2b3ddb992929..d7078cc2eb9a 100644 --- a/svl/inc/svl/inettype.hxx +++ b/svl/inc/svl/inettype.hxx @@ -266,7 +266,7 @@ public: static INetContentType GetContentType(UniString const & rTypeName); - static UniString GetContentType(INetContentType eTypeID); + static rtl::OUString GetContentType(INetContentType eTypeID); static UniString GetPresentation(INetContentType eTypeID, const ::com::sun::star::lang::Locale& aLocale); 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); |