Related: fdo#38838 remove a pile of ctors
Change-Id: I5d19eadc3dc24b0aeeb61c677f440eef83af78c2
This commit is contained in:
@@ -99,44 +99,13 @@ private:
|
||||
|
||||
UniString& Assign( const OUString& rStr );
|
||||
UniString& Append( const UniString& rStr );
|
||||
|
||||
UniString( const int* pDummy ); // not implemented: to prevent UniString( NULL )
|
||||
UniString(int); // not implemented; to detect misuses of
|
||||
// UniString(sal_Unicode)
|
||||
void operator =(int); // not implemented; to detect misuses
|
||||
// of operator =(sal_Unicode)
|
||||
void Append(int); // not implemented; to detect misuses of
|
||||
// Append(sal_Unicode)
|
||||
|
||||
//detect and reject use of RTL_CONSTASCII_STRINGPARAM instead of RTL_CONSTASCII_USTRINGPARAM
|
||||
TOOLS_DLLPRIVATE UniString( const sal_Char*, sal_Int32 );
|
||||
|
||||
//detect and reject wrong way to attempt to create a UniString from a substring of
|
||||
//a OString
|
||||
TOOLS_DLLPRIVATE UniString(const OString& rByteStr, xub_StrLen nPos, xub_StrLen nLen,
|
||||
sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS);
|
||||
|
||||
//no longer implemented
|
||||
TOOLS_DLLPRIVATE UniString( const OString& rByteStr,
|
||||
rtl_TextEncoding eTextEncoding,
|
||||
sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS );
|
||||
TOOLS_DLLPRIVATE UniString( const sal_Unicode* pCharStr );
|
||||
TOOLS_DLLPRIVATE UniString( const sal_Unicode* pCharStr, xub_StrLen nLen );
|
||||
TOOLS_DLLPRIVATE UniString( sal_Unicode c );
|
||||
public:
|
||||
UniString();
|
||||
UniString( const ResId& rResId );
|
||||
UniString( const UniString& rStr );
|
||||
UniString( const UniString& rStr, xub_StrLen nPos, xub_StrLen nLen );
|
||||
UniString( const OUString& rStr );
|
||||
UniString(char c); // ...but allow "UniString('a')"
|
||||
UniString( const sal_Char* pByteStr,
|
||||
rtl_TextEncoding eTextEncoding,
|
||||
sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS );
|
||||
UniString( const sal_Char* pByteStr, xub_StrLen nLen,
|
||||
rtl_TextEncoding eTextEncoding,
|
||||
sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS );
|
||||
~UniString();
|
||||
~UniString();
|
||||
|
||||
operator OUString () const
|
||||
{
|
||||
|
@@ -17,31 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
UniString::UniString( const char* pByteStr,
|
||||
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
|
||||
{
|
||||
DBG_ASSERT( pByteStr, "UniString::UniString() - pByteStr is NULL" );
|
||||
|
||||
mpData = NULL;
|
||||
rtl_string2UString( (rtl_uString **)(&mpData),
|
||||
pByteStr, ImplStringLen( pByteStr ),
|
||||
eTextEncoding, nCvtFlags );
|
||||
}
|
||||
|
||||
UniString::UniString( const char* pByteStr, xub_StrLen nLen,
|
||||
rtl_TextEncoding eTextEncoding, sal_uInt32 nCvtFlags )
|
||||
{
|
||||
DBG_ASSERT( pByteStr, "UniString::UniString() - pByteStr is NULL" );
|
||||
|
||||
if ( nLen == STRING_LEN )
|
||||
nLen = ImplStringLen( pByteStr );
|
||||
|
||||
mpData = NULL;
|
||||
rtl_string2UString( (rtl_uString **)(&mpData),
|
||||
pByteStr, nLen,
|
||||
eTextEncoding, nCvtFlags );
|
||||
}
|
||||
|
||||
UniString::UniString( const OUString& rStr )
|
||||
: mpData(NULL)
|
||||
{
|
||||
|
@@ -45,8 +45,6 @@ DBG_NAME( UniString )
|
||||
#include <strimp.cxx>
|
||||
#include <strucvt.cxx>
|
||||
|
||||
UniString::UniString(char c): mpData(ImplAllocData(1)) { mpData->maStr[0] = c; }
|
||||
|
||||
StringCompare STRING::CompareTo( const STRING& rStr, xub_StrLen nLen ) const
|
||||
{
|
||||
if ( mpData == rStr.mpData )
|
||||
|
Reference in New Issue
Block a user