diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-06-18 11:32:46 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-06-18 15:13:52 +0100 |
commit | e31de5e002a9a0301e3f16eb105697169e67438f (patch) | |
tree | 43455f7d71f301dd5ffa39ec251784c1329f5c22 /tools | |
parent | 06e2005ed83567452783003e3113ad6a92190c2d (diff) |
detect wrong UniString ctor
there's no way j was intended to be used as a rtl_TextEncoding
here. From context it's clearly meant to create a UniString from
a subset of the input ByteString
Change-Id: Ic0a0773f90686d73ec4eb8b8e03a454585758578
Diffstat (limited to 'tools')
-rw-r--r-- | tools/inc/tools/string.hxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index 9ab1540db54c..c4a8c2aa3ac2 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -151,6 +151,11 @@ private: //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 rtl::OString + TOOLS_DLLPRIVATE UniString(const rtl::OString& rByteStr, xub_StrLen nPos, xub_StrLen nLen, + sal_uInt32 nCvtFlags = BYTESTRING_TO_UNISTRING_CVTFLAGS); public: UniString(); UniString( const ResId& rResId ); |