diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-09-24 16:39:58 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2012-09-25 20:45:19 +0400 |
commit | 62a7d56345cc5d774fbcd79d55fa516c17aa0aa5 (patch) | |
tree | e8864ac9450e738bbffd679ee035b56b92dcbb2d /xmlsecurity | |
parent | b4c8346a1e9d127bd7d086b0a30d854b8fc3b263 (diff) |
String -> OUString
Change-Id: Ia4d1fd7ef627459666ed204601313a96507b9104
Diffstat (limited to 'xmlsecurity')
-rw-r--r-- | xmlsecurity/source/dialogs/resourcemanager.cxx | 27 | ||||
-rw-r--r-- | xmlsecurity/source/dialogs/resourcemanager.hxx | 8 |
2 files changed, 17 insertions, 18 deletions
diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx index 3051b29daa7c..aa920d5491b4 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.cxx +++ b/xmlsecurity/source/dialogs/resourcemanager.cxx @@ -29,7 +29,6 @@ #include <rtl/ustrbuf.h> #include <vector> -using ::rtl::OUString; using namespace std; namespace XmlSec @@ -58,18 +57,18 @@ namespace XmlSec Time( _rDT.Hours, _rDT.Minutes, _rDT.Seconds, _rDT.HundredthSeconds ) ); } - String GetDateTimeString( const ::com::sun::star::util::DateTime& _rDT ) + OUString GetDateTimeString( const ::com::sun::star::util::DateTime& _rDT ) { // String with date and time information (#i20172#) DateTime aDT( GetDateTime( _rDT ) ); const LocaleDataWrapper& rLoDa = GetLocaleData(); - String sRet( rLoDa.getDate( aDT ) ); - sRet += ' '; - sRet += rLoDa.getTime( aDT ); - return sRet; + OUStringBuffer sRet( rLoDa.getDate( aDT ) ); + sRet.append( ' ' ); + sRet.append( rLoDa.getTime( aDT ) ); + return sRet.makeStringAndClear(); } - String GetDateString( const ::com::sun::star::util::DateTime& _rDT ) + OUString GetDateString( const ::com::sun::star::util::DateTime& _rDT ) { return GetLocaleData().getDate( GetDateTime( _rDT ) ); } @@ -295,7 +294,7 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) #endif - String GetContentPart( const String& _rRawString ) + OUString GetContentPart( const OUString& _rRawString ) { char const * aIDs[] = { "CN", "OU", "O", "E", NULL }; OUString retVal; @@ -319,11 +318,11 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) return retVal; } - String GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep, sal_uInt16 _nLineBreak ) + OUString GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep, sal_uInt16 _nLineBreak ) { const sal_Int8* pSerNumSeq = _rSeq.getConstArray(); int nCnt = _rSeq.getLength(); - String aStr; + OUStringBuffer aStr; const char pHexDigs[ 17 ] = "0123456789ABCDEF"; char pBuffer[ 3 ] = " "; sal_uInt8 nNum; @@ -337,19 +336,19 @@ vector< pair< OUString, OUString> > parseDN(const OUString& rRawString) pBuffer[ 1 ] = pHexDigs[ nNum & 0x0F ]; nNum >>= 4; pBuffer[ 0 ] = pHexDigs[ nNum ]; - aStr.AppendAscii( pBuffer ); + aStr.appendAscii( pBuffer ); --nBreak; if( nBreak ) - aStr.AppendAscii( _pSep ); + aStr.appendAscii( _pSep ); else { nBreak = nBreakStart; - aStr.AppendAscii( "\n" ); + aStr.append( '\n' ); } } - return aStr; + return aStr.makeStringAndClear(); } long ShrinkToFitWidth( Control& _rCtrl, long _nOffs ) diff --git a/xmlsecurity/source/dialogs/resourcemanager.hxx b/xmlsecurity/source/dialogs/resourcemanager.hxx index 7c3d05b448b4..aa893fa4353c 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.hxx +++ b/xmlsecurity/source/dialogs/resourcemanager.hxx @@ -38,16 +38,16 @@ namespace XmlSec const LocaleDataWrapper& GetLocaleData( void ); DateTime GetDateTime( const ::com::sun::star::util::DateTime& _rDT ); - String GetDateTimeString( const ::com::sun::star::util::DateTime& _rDT ); - String GetDateString( const ::com::sun::star::util::DateTime& _rDT ); + OUString GetDateTimeString( const ::com::sun::star::util::DateTime& _rDT ); + OUString GetDateString( const ::com::sun::star::util::DateTime& _rDT ); std::vector< std::pair< ::rtl::OUString, ::rtl::OUString> > parseDN(const ::rtl::OUString& rRawString); std::pair< ::rtl::OUString, ::rtl::OUString> GetDNForCertDetailsView( const ::rtl::OUString & rRawString); - String GetContentPart( const String& _rRawString ); + OUString GetContentPart( const OUString& _rRawString ); - String GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep = ":", sal_uInt16 _nLineBreak = 0xFFFF ); + OUString GetHexString( const ::com::sun::star::uno::Sequence< sal_Int8 >& _rSeq, const char* _pSep = ":", sal_uInt16 _nLineBreak = 0xFFFF ); long ShrinkToFitWidth( Control& _rCtrl, long _nOffs = 0 ); // return = new width void AlignAfterImage( const FixedImage& _rImage, Control& _rCtrl, long _nXOffset = 0 ); |