From 5218c0d6a8171400bee0d972ff05757849df4d19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Wed, 4 Jul 2012 09:23:10 +0100 Subject: [PATCH] UniString(const rtl::OString ...) no longer implemented Change-Id: Ie4fc4ed1a54889c1745a0d71d02211d6868340fa --- svtools/source/misc/transfer.cxx | 6 +++--- tools/inc/tools/string.hxx | 9 ++++++--- tools/source/fsys/dirent.cxx | 12 ++++++------ tools/source/string/strucvt.cxx | 12 ------------ 4 files changed, 15 insertions(+), 24 deletions(-) diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx index 373df6d754ed..aadd6bf98b8a 100644 --- a/svtools/source/misc/transfer.cxx +++ b/svtools/source/misc/transfer.cxx @@ -2012,7 +2012,7 @@ sal_Bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatr if( ( aDesc.getLength() > 4 ) && aDesc.copy(aDesc.getLength() - 4).equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM(".URL")) ) { - SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( INetURLObject( String( aDesc, eTextEncoding ) ).GetMainURL( INetURLObject::NO_DECODE ), + SvStream* pStream = ::utl::UcbStreamHelper::CreateStream( INetURLObject( rtl::OStringToOUString(aDesc, eTextEncoding) ).GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ ); if( !pStream || pStream->GetError() ) @@ -2042,8 +2042,8 @@ sal_Bool TransferableDataHelper::GetINetBookmark( const ::com::sun::star::datatr bSttFnd = sal_True; else if (bSttFnd && aLine.copy(0, 4).equalsIgnoreAsciiCaseL(RTL_CONSTASCII_STRINGPARAM("URL="))) { - rBmk = INetBookmark( String( aLine.copy(4), eTextEncoding ), - String( aDesc.copy(0, aDesc.getLength() - 4), eTextEncoding ) ); + rBmk = INetBookmark( rtl::OStringToOUString(aLine.copy(4), eTextEncoding), + rtl::OStringToOUString(aDesc.copy(0, aDesc.getLength() - 4), eTextEncoding) ); bRet = sal_True; break; } diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index c4a8c2aa3ac2..ed641d00d3e7 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -156,6 +156,12 @@ private: //a rtl::OString TOOLS_DLLPRIVATE UniString(const rtl::OString& rByteStr, xub_StrLen nPos, xub_StrLen nLen, sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS); + + //no longer implemented + TOOLS_DLLPRIVATE UniString( const rtl::OString& rByteStr, + rtl_TextEncoding eTextEncoding, + sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS ); + public: UniString(); UniString( const ResId& rResId ); @@ -166,9 +172,6 @@ public: UniString( const sal_Unicode* pCharStr, xub_StrLen nLen ); UniString( sal_Unicode c ); UniString(char c); // ...but allow "UniString('a')" - UniString( const rtl::OString& rByteStr, - rtl_TextEncoding eTextEncoding, - sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS ); UniString( const sal_Char* pByteStr, rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS ); diff --git a/tools/source/fsys/dirent.cxx b/tools/source/fsys/dirent.cxx index 3b6e9cd118bf..254c38310cfe 100644 --- a/tools/source/fsys/dirent.cxx +++ b/tools/source/fsys/dirent.cxx @@ -281,7 +281,7 @@ FSysError DirEntry::ImpParseName( const rtl::OString& rPfad ) DBG_CHKTHIS( DirEntry, ImpCheckDirEntry ); // die einzelnen Namen auf einen Stack packen - String aPfad( rPfad, osl_getThreadTextEncoding() ); + String aPfad(rtl::OStringToOUString(rPfad, osl_getThreadTextEncoding())); DirEntryStack aStack; do @@ -1789,8 +1789,8 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const // MoveTo nun atomar SetLastError(0); - DirEntry aFromDevice(String(bFrom, osl_getThreadTextEncoding())); - DirEntry aToDevice(String(bTo,osl_getThreadTextEncoding())); + DirEntry aFromDevice(rtl::OStringToOUString(bFrom, osl_getThreadTextEncoding())); + DirEntry aToDevice(rtl::OStringToOUString(bTo,osl_getThreadTextEncoding())); aFromDevice.ToAbs(); aToDevice.ToAbs(); aFromDevice=aFromDevice.GetDevice(); @@ -1811,11 +1811,11 @@ FSysError DirEntry::MoveTo( const DirEntry& rNewName ) const //nein, also inter-device-move mit copy/delete FSysError nCopyError = CopyTo(rNewName, FSYS_ACTION_COPYFILE); - DirEntry aKill(String(bTo, osl_getThreadTextEncoding())); - FileStat aKillStat(String(bTo, osl_getThreadTextEncoding())); + DirEntry aKill(rtl::OStringToOUString(bTo, osl_getThreadTextEncoding())); + FileStat aKillStat(String(rtl::OStringToOUString(bTo, osl_getThreadTextEncoding()))); if ( aKillStat.IsKind(FSYS_KIND_DIR ) ) { - aKill += String(aName, osl_getThreadTextEncoding()); + aKill += String(rtl::OStringToOUString(aName, osl_getThreadTextEncoding())); } if (nCopyError==FSYS_ERR_OK) diff --git a/tools/source/string/strucvt.cxx b/tools/source/string/strucvt.cxx index f8d2dbd0d6b3..f4144c74040d 100644 --- a/tools/source/string/strucvt.cxx +++ b/tools/source/string/strucvt.cxx @@ -28,18 +28,6 @@ // ======================================================================= -UniString::UniString( const rtl::OString& rByteStr, rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags ) -{ - DBG_CTOR( UniString, DbgCheckUniString ); - - mpData = NULL; - rtl_string2UString( (rtl_uString **)(&mpData), - rByteStr.getStr(), rByteStr.getLength(), - eTextEncoding, nCvtFlags ); -} - -// ----------------------------------------------------------------------- - UniString::UniString( const char* pByteStr, rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags ) {