1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir //------------------------------------------------------------------------ 29*cdf0e10cSrcweir //------------------------------------------------------------------------ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #ifndef _RTL_STRING_CONST_H_ 32*cdf0e10cSrcweir #define _RTL_STRING_CONST_H_ 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir #ifndef _RTL_STRING_UTILS_HXX_ 35*cdf0e10cSrcweir #include <rtl_String_Utils.hxx> 36*cdf0e10cSrcweir #endif 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir //------------------------------------------------------------------------ 39*cdf0e10cSrcweir //------------------------------------------------------------------------ 40*cdf0e10cSrcweir 41*cdf0e10cSrcweir #include <limits.h> 42*cdf0e10cSrcweir 43*cdf0e10cSrcweir //------------------------------------------------------------------------ 44*cdf0e10cSrcweir //------------------------------------------------------------------------ 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir #ifndef _SAL_TYPES_H_ 47*cdf0e10cSrcweir #include <sal/types.h> 48*cdf0e10cSrcweir #endif 49*cdf0e10cSrcweir 50*cdf0e10cSrcweir #ifndef _RTL_TEXTENC_H 51*cdf0e10cSrcweir #include <rtl/textenc.h> 52*cdf0e10cSrcweir #endif 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir #ifndef _RTL_USTRING_H_ 55*cdf0e10cSrcweir #include <rtl/ustring.h> 56*cdf0e10cSrcweir #endif 57*cdf0e10cSrcweir 58*cdf0e10cSrcweir //------------------------------------------------------------------------ 59*cdf0e10cSrcweir //------------------------------------------------------------------------ 60*cdf0e10cSrcweir 61*cdf0e10cSrcweir #ifdef __cplusplus 62*cdf0e10cSrcweir extern "C" 63*cdf0e10cSrcweir { 64*cdf0e10cSrcweir #endif 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir //------------------------------------------------------------------------ 67*cdf0e10cSrcweir //------------------------------------------------------------------------ 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir static const rtl_TextEncoding kEncodingRTLTextUSASCII = RTL_TEXTENCODING_ASCII_US; 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir //------------------------------------------------------------------------ 72*cdf0e10cSrcweir //------------------------------------------------------------------------ 73*cdf0e10cSrcweir 74*cdf0e10cSrcweir static const sal_uInt32 kConvertFlagsOUStringToOString = OUSTRING_TO_OSTRING_CVTFLAGS; 75*cdf0e10cSrcweir static const sal_uInt32 kConvertFlagsOStringToOUString = OSTRING_TO_OUSTRING_CVTFLAGS; 76*cdf0e10cSrcweir 77*cdf0e10cSrcweir //------------------------------------------------------------------------ 78*cdf0e10cSrcweir //------------------------------------------------------------------------ 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir static const sal_Char *kTestStr1 = "Sun Microsystems"; 81*cdf0e10cSrcweir static const sal_Char *kTestStr2 = "Sun Microsystems Java Technology"; 82*cdf0e10cSrcweir static const sal_Char *kTestStr3 = "Sun microsystems"; 83*cdf0e10cSrcweir static const sal_Char *kTestStr4 = "SUN MICROSYSTEMS"; 84*cdf0e10cSrcweir static const sal_Char *kTestStr5 = "sun microsystems"; 85*cdf0e10cSrcweir static const sal_Char *kTestStr6 = "Java Technology"; 86*cdf0e10cSrcweir static const sal_Char *kTestStr7 = "Sun "; 87*cdf0e10cSrcweir static const sal_Char *kTestStr8 = "Microsystems"; 88*cdf0e10cSrcweir static const sal_Char *kTestStr9 = "sun microsystems java technology"; 89*cdf0e10cSrcweir static const sal_Char *kTestStr10 = " Sun Microsystems"; 90*cdf0e10cSrcweir static const sal_Char *kTestStr11 = "Sun Microsystems "; 91*cdf0e10cSrcweir static const sal_Char *kTestStr12 = " Sun Microsystems "; 92*cdf0e10cSrcweir static const sal_Char *kTestStr13 = "Sun Microsystems "; 93*cdf0e10cSrcweir static const sal_Char *kTestStr14 = " Sun Microsystems"; 94*cdf0e10cSrcweir static const sal_Char *kTestStr15 = " Sun Microsystems "; 95*cdf0e10cSrcweir static const sal_Char *kTestStr16 = " Sun Microsystems "; 96*cdf0e10cSrcweir static const sal_Char *kTestStr17 = " Sun Microsystems "; 97*cdf0e10cSrcweir static const sal_Char *kTestStr18 = "sUN MICROsYsTEMs"; 98*cdf0e10cSrcweir static const sal_Char *kTestStr19 = "---Sun-Microsystems---"; 99*cdf0e10cSrcweir static const sal_Char *kTestStr20 = "sun"; 100*cdf0e10cSrcweir static const sal_Char *kTestStr21 = "SUN"; 101*cdf0e10cSrcweir static const sal_Char *kTestStr22 = "SUN MICROSYSTEMS JAVA TECHNOLOGY"; 102*cdf0e10cSrcweir static const sal_Char *kTestStr23 = " Java Technology"; 103*cdf0e10cSrcweir static const sal_Char *kTestStr24 = "Sun Microsystems Java Technolog"; 104*cdf0e10cSrcweir static const sal_Char *kTestStr25 = ""; 105*cdf0e10cSrcweir static const sal_Char *kTestStr26 = " Mic"; 106*cdf0e10cSrcweir static const sal_Char *kTestStr27 = "s"; 107*cdf0e10cSrcweir static const sal_Char *kTestStr28 = "\50\3\5\7\11\13\15\17sun"; 108*cdf0e10cSrcweir static const sal_Char *kTestStr29 = "\50\3\5\7\11\13\15\17sun\21\23\25\27\31\33\50"; 109*cdf0e10cSrcweir static const sal_Char *kTestStr30 = "sun\21\23\25\27\31\33\50"; 110*cdf0e10cSrcweir static const sal_Char *kTestStr31 = "sun Microsystems"; 111*cdf0e10cSrcweir static const sal_Char *kTestStr32 = "Sun Microsystem "; 112*cdf0e10cSrcweir static const sal_Char *kTestStr33 = " "; 113*cdf0e10cSrcweir static const sal_Char *kTestStr34 = "\50\5\5\7\11\13\15\17sun"; 114*cdf0e10cSrcweir static const sal_Char *kTestStr35 = "\50\373\5\7\11\13\15\17sun"; 115*cdf0e10cSrcweir static const sal_Char *kTestStr36 = "Microsystems Java Technology"; 116*cdf0e10cSrcweir static const sal_Char *kTestStr37 = "Sun Java Technology"; 117*cdf0e10cSrcweir static const sal_Char *kTestStr38 = "\21\23\25\27\31\33\50"; 118*cdf0e10cSrcweir static const sal_Char *kTestStr39 = "\50\3\5\7\11\13\15\17sun Sun Microsystems "; 119*cdf0e10cSrcweir static const sal_Char *kTestStr40 = "\50\3\5\7\11\13\15\17sunsun Microsystems"; 120*cdf0e10cSrcweir static const sal_Char *kTestStr41 = "Sun"; 121*cdf0e10cSrcweir static const sal_Char *kTestStr42 = "\50\3\5\7\11\13\15\17su"; 122*cdf0e10cSrcweir static const sal_Char *kTestStr43 = "\50\3\5\7\11\13\15\17sun\256\345"; 123*cdf0e10cSrcweir static const sal_Char *kTestStr44 = "\256\345"; 124*cdf0e10cSrcweir static const sal_Char *kTestStr45 = "Sun true"; 125*cdf0e10cSrcweir static const sal_Char *kTestStr46 = "Sun false"; 126*cdf0e10cSrcweir static const sal_Char *kTestStr47 = "true"; 127*cdf0e10cSrcweir static const sal_Char *kTestStr48 = "false"; 128*cdf0e10cSrcweir static const sal_Char *kTestStr49 = "\50\3\5\7\11\13\15\17suntrue"; 129*cdf0e10cSrcweir static const sal_Char *kTestStr50 = "\50\3\5\7\11\13\15\17sunfalse"; 130*cdf0e10cSrcweir static const sal_Char *kTestStr51 = "Sun M"; 131*cdf0e10cSrcweir //static const sal_Char *kTestStr52 = "Sun \077777"; 132*cdf0e10cSrcweir //static const sal_Char *kTestStr53 = "Sun \100000"; 133*cdf0e10cSrcweir //static const sal_Char *kTestStr54 = "\77777"; 134*cdf0e10cSrcweir //static const sal_Char *kTestStr55 = "\100000"; 135*cdf0e10cSrcweir static const sal_Char *kTestStr56 = "\50\3\5\7\11\13\15\17suns"; 136*cdf0e10cSrcweir //static const sal_Char *kTestStr57 = "\50\3\5\7\11\13\15\17sun\77777"; 137*cdf0e10cSrcweir //static const sal_Char *kTestStr58 = "\50\3\5\7\11\13\15\17sun\10000"; 138*cdf0e10cSrcweir static const sal_Char *kTestStr1PlusStr6 = "Sun Microsystems" "Java Technology"; 139*cdf0e10cSrcweir //------------------------------------------------------------------------ 140*cdf0e10cSrcweir //------------------------------------------------------------------------ 141*cdf0e10cSrcweir 142*cdf0e10cSrcweir static const sal_Int32 kTestStr1Len = 16; 143*cdf0e10cSrcweir static const sal_Int32 kTestStr2Len = 32; 144*cdf0e10cSrcweir static const sal_Int32 kTestStr3Len = 16; 145*cdf0e10cSrcweir static const sal_Int32 kTestStr4Len = 16; 146*cdf0e10cSrcweir static const sal_Int32 kTestStr5Len = 16; 147*cdf0e10cSrcweir static const sal_Int32 kTestStr6Len = 15; 148*cdf0e10cSrcweir static const sal_Int32 kTestStr7Len = 4; 149*cdf0e10cSrcweir static const sal_Int32 kTestStr8Len = 12; 150*cdf0e10cSrcweir static const sal_Int32 kTestStr9Len = 32; 151*cdf0e10cSrcweir static const sal_Int32 kTestStr10Len = 17; 152*cdf0e10cSrcweir static const sal_Int32 kTestStr11Len = 17; 153*cdf0e10cSrcweir static const sal_Int32 kTestStr12Len = 18; 154*cdf0e10cSrcweir static const sal_Int32 kTestStr13Len = 19; 155*cdf0e10cSrcweir static const sal_Int32 kTestStr14Len = 19; 156*cdf0e10cSrcweir static const sal_Int32 kTestStr15Len = 20; 157*cdf0e10cSrcweir static const sal_Int32 kTestStr16Len = 20; 158*cdf0e10cSrcweir static const sal_Int32 kTestStr17Len = 22; 159*cdf0e10cSrcweir static const sal_Int32 kTestStr18Len = 16; 160*cdf0e10cSrcweir static const sal_Int32 kTestStr19Len = 22; 161*cdf0e10cSrcweir static const sal_Int32 kTestStr20Len = 3; 162*cdf0e10cSrcweir static const sal_Int32 kTestStr21Len = 3; 163*cdf0e10cSrcweir static const sal_Int32 kTestStr22Len = 32; 164*cdf0e10cSrcweir static const sal_Int32 kTestStr23Len = 16; 165*cdf0e10cSrcweir static const sal_Int32 kTestStr24Len = 31; 166*cdf0e10cSrcweir static const sal_Int32 kTestStr25Len = 0; 167*cdf0e10cSrcweir static const sal_Int32 kTestStr26Len = 4; 168*cdf0e10cSrcweir static const sal_Int32 kTestStr27Len = 1; 169*cdf0e10cSrcweir static const sal_Int32 kTestStr28Len = 11; 170*cdf0e10cSrcweir static const sal_Int32 kTestStr29Len = 18; 171*cdf0e10cSrcweir static const sal_Int32 kTestStr30Len = 10; 172*cdf0e10cSrcweir static const sal_Int32 kTestStr31Len = 16; 173*cdf0e10cSrcweir static const sal_Int32 kTestStr32Len = 16; 174*cdf0e10cSrcweir static const sal_Int32 kTestStr33Len = 1; 175*cdf0e10cSrcweir static const sal_Int32 kTestStr34Len = 11; 176*cdf0e10cSrcweir static const sal_Int32 kTestStr35Len = 11; 177*cdf0e10cSrcweir static const sal_Int32 kTestStr36Len = 28; 178*cdf0e10cSrcweir static const sal_Int32 kTestStr37Len = 20; 179*cdf0e10cSrcweir static const sal_Int32 kTestStr38Len = 7; 180*cdf0e10cSrcweir static const sal_Int32 kTestStr39Len = 33; 181*cdf0e10cSrcweir static const sal_Int32 kTestStr40Len = 27; 182*cdf0e10cSrcweir static const sal_Int32 kTestStr41Len = 3; 183*cdf0e10cSrcweir static const sal_Int32 kTestStr42Len = 10; 184*cdf0e10cSrcweir static const sal_Int32 kTestStr43Len = 13; 185*cdf0e10cSrcweir static const sal_Int32 kTestStr44Len = 2; 186*cdf0e10cSrcweir static const sal_Int32 kTestStr45Len = 8; 187*cdf0e10cSrcweir static const sal_Int32 kTestStr46Len = 9; 188*cdf0e10cSrcweir static const sal_Int32 kTestStr47Len = 4; 189*cdf0e10cSrcweir static const sal_Int32 kTestStr48Len = 5; 190*cdf0e10cSrcweir static const sal_Int32 kTestStr49Len = 15; 191*cdf0e10cSrcweir static const sal_Int32 kTestStr50Len = 16; 192*cdf0e10cSrcweir static const sal_Int32 kTestStr51Len = 5; 193*cdf0e10cSrcweir static const sal_Int32 kTestStr52Len = 5; 194*cdf0e10cSrcweir static const sal_Int32 kTestStr53Len = 5; 195*cdf0e10cSrcweir static const sal_Int32 kTestStr54Len = 1; 196*cdf0e10cSrcweir static const sal_Int32 kTestStr55Len = 1; 197*cdf0e10cSrcweir static const sal_Int32 kTestStr56Len = 12; 198*cdf0e10cSrcweir static const sal_Int32 kTestStr57Len = 12; 199*cdf0e10cSrcweir static const sal_Int32 kTestStr58Len = 12; 200*cdf0e10cSrcweir static const sal_Int32 kTestStr1PlusStr6Len = kTestStr1Len + kTestStr6Len; 201*cdf0e10cSrcweir 202*cdf0e10cSrcweir //------------------------------------------------------------------------ 203*cdf0e10cSrcweir //------------------------------------------------------------------------ 204*cdf0e10cSrcweir static sal_Unicode aUStr1[kTestStr1Len+1]; 205*cdf0e10cSrcweir static sal_Unicode aUStr2[kTestStr2Len+1]; 206*cdf0e10cSrcweir static sal_Unicode aUStr3[kTestStr3Len+1]; 207*cdf0e10cSrcweir static sal_Unicode aUStr4[kTestStr4Len+1]; 208*cdf0e10cSrcweir static sal_Unicode aUStr5[kTestStr5Len+1]; 209*cdf0e10cSrcweir static sal_Unicode aUStr6[kTestStr6Len+1]; 210*cdf0e10cSrcweir static sal_Unicode aUStr7[kTestStr7Len+1]; 211*cdf0e10cSrcweir static sal_Unicode aUStr8[kTestStr8Len+1]; 212*cdf0e10cSrcweir static sal_Unicode aUStr9[kTestStr9Len+1]; 213*cdf0e10cSrcweir static sal_Unicode aUStr10[kTestStr10Len+1]; 214*cdf0e10cSrcweir static sal_Unicode aUStr11[kTestStr11Len+1]; 215*cdf0e10cSrcweir static sal_Unicode aUStr12[kTestStr12Len+1]; 216*cdf0e10cSrcweir static sal_Unicode aUStr13[kTestStr13Len+1]; 217*cdf0e10cSrcweir static sal_Unicode aUStr14[kTestStr14Len+1]; 218*cdf0e10cSrcweir static sal_Unicode aUStr15[kTestStr15Len+1]; 219*cdf0e10cSrcweir static sal_Unicode aUStr16[kTestStr16Len+1]; 220*cdf0e10cSrcweir static sal_Unicode aUStr17[kTestStr17Len+1]; 221*cdf0e10cSrcweir static sal_Unicode aUStr18[kTestStr18Len+1]; 222*cdf0e10cSrcweir static sal_Unicode aUStr19[kTestStr19Len+1]; 223*cdf0e10cSrcweir static sal_Unicode aUStr20[kTestStr20Len+1]; 224*cdf0e10cSrcweir static sal_Unicode aUStr21[kTestStr21Len+1]; 225*cdf0e10cSrcweir static sal_Unicode aUStr22[kTestStr22Len+1]; 226*cdf0e10cSrcweir static sal_Unicode aUStr23[kTestStr23Len+1]; 227*cdf0e10cSrcweir static sal_Unicode aUStr24[kTestStr24Len+1]; 228*cdf0e10cSrcweir static sal_Unicode aUStr25[kTestStr25Len+1]; 229*cdf0e10cSrcweir static sal_Unicode aUStr26[kTestStr26Len+1]; 230*cdf0e10cSrcweir static sal_Unicode aUStr27[kTestStr27Len+1]; 231*cdf0e10cSrcweir static sal_Unicode aUStr28[kTestStr28Len+1]; 232*cdf0e10cSrcweir static sal_Unicode aUStr29[kTestStr29Len+1]; 233*cdf0e10cSrcweir static sal_Unicode aUStr30[kTestStr30Len+1]; 234*cdf0e10cSrcweir static sal_Unicode aUStr31[kTestStr31Len+1]; 235*cdf0e10cSrcweir static sal_Unicode aUStr32[kTestStr32Len+1]; 236*cdf0e10cSrcweir static sal_Unicode aUStr33[kTestStr33Len+1]; 237*cdf0e10cSrcweir static sal_Unicode aUStr34[kTestStr34Len+1]; 238*cdf0e10cSrcweir static sal_Unicode aUStr35[kTestStr35Len+1]; 239*cdf0e10cSrcweir static sal_Unicode aUStr36[kTestStr36Len+1]; 240*cdf0e10cSrcweir static sal_Unicode aUStr37[kTestStr37Len+1]; 241*cdf0e10cSrcweir static sal_Unicode aUStr38[kTestStr38Len+1]; 242*cdf0e10cSrcweir static sal_Unicode aUStr39[kTestStr39Len+1]; 243*cdf0e10cSrcweir static sal_Unicode aUStr40[kTestStr40Len+1]; 244*cdf0e10cSrcweir static sal_Unicode aUStr41[kTestStr41Len+1]; 245*cdf0e10cSrcweir static sal_Unicode aUStr42[kTestStr42Len+1]; 246*cdf0e10cSrcweir static sal_Unicode aUStr43[kTestStr43Len+1]; 247*cdf0e10cSrcweir static sal_Unicode aUStr44[kTestStr44Len+1]; 248*cdf0e10cSrcweir static sal_Unicode aUStr45[kTestStr45Len+1]; 249*cdf0e10cSrcweir static sal_Unicode aUStr46[kTestStr46Len+1]; 250*cdf0e10cSrcweir static sal_Unicode aUStr47[kTestStr47Len+1]; 251*cdf0e10cSrcweir static sal_Unicode aUStr48[kTestStr48Len+1]; 252*cdf0e10cSrcweir static sal_Unicode aUStr49[kTestStr49Len+1]; 253*cdf0e10cSrcweir static sal_Unicode aUStr50[kTestStr50Len+1]; 254*cdf0e10cSrcweir static sal_Unicode aUStr51[kTestStr51Len+1]; 255*cdf0e10cSrcweir // static sal_Unicode aUStr52[kTestStr52Len+1]={83,117,110,32,32767}; 256*cdf0e10cSrcweir // static sal_Unicode aUStr53[kTestStr53Len+1]={83,117,110,32,SAL_MIN_INT16 /*-32768*/}; 257*cdf0e10cSrcweir // static sal_Unicode aUStr54[kTestStr54Len+1]={32767}; 258*cdf0e10cSrcweir // static sal_Unicode aUStr55[kTestStr55Len+1]={SAL_MIN_INT16 /*-32768*/}; 259*cdf0e10cSrcweir static sal_Unicode aUStr56[kTestStr56Len+1]; 260*cdf0e10cSrcweir // static sal_Unicode aUStr57[kTestStr57Len+1]={40,3,5,7,9,11,13,15,115,117,110,32767}; 261*cdf0e10cSrcweir // static sal_Unicode aUStr58[kTestStr58Len+1]={40,3,5,7,9,11,13,15,115,117,110,SAL_MIN_INT16 /*-32768*/}; 262*cdf0e10cSrcweir static sal_Unicode aUStr1PlusUStr6[kTestStr1Len + kTestStr6Len + 1]; 263*cdf0e10cSrcweir 264*cdf0e10cSrcweir // we are already in "C" 265*cdf0e10cSrcweir 266*cdf0e10cSrcweir static sal_Bool SAL_CALL test_ini_uString() 267*cdf0e10cSrcweir { 268*cdf0e10cSrcweir 269*cdf0e10cSrcweir sal_Bool iniResult= sal_True; 270*cdf0e10cSrcweir 271*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr1, kTestStr1, kTestStr1Len ); 272*cdf0e10cSrcweir 273*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr2, kTestStr2, kTestStr2Len ); 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr3, kTestStr3, kTestStr3Len ); 276*cdf0e10cSrcweir 277*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr4, kTestStr4, kTestStr4Len ); 278*cdf0e10cSrcweir 279*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr5, kTestStr5, kTestStr5Len ); 280*cdf0e10cSrcweir 281*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr6, kTestStr6, kTestStr6Len ); 282*cdf0e10cSrcweir 283*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr7, kTestStr7, kTestStr7Len ); 284*cdf0e10cSrcweir 285*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr8, kTestStr8, kTestStr8Len ); 286*cdf0e10cSrcweir 287*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr9, kTestStr9, kTestStr9Len ); 288*cdf0e10cSrcweir 289*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr10, kTestStr10, kTestStr10Len ); 290*cdf0e10cSrcweir 291*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr11, kTestStr11, kTestStr11Len ); 292*cdf0e10cSrcweir 293*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr12, kTestStr12, kTestStr12Len ); 294*cdf0e10cSrcweir 295*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr13, kTestStr13, kTestStr13Len ); 296*cdf0e10cSrcweir 297*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr14, kTestStr14, kTestStr14Len ); 298*cdf0e10cSrcweir 299*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr15, kTestStr15, kTestStr15Len ); 300*cdf0e10cSrcweir 301*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr16, kTestStr16, kTestStr16Len ); 302*cdf0e10cSrcweir 303*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr17, kTestStr17, kTestStr17Len ); 304*cdf0e10cSrcweir 305*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr18, kTestStr18, kTestStr18Len ); 306*cdf0e10cSrcweir 307*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr19, kTestStr19, kTestStr19Len ); 308*cdf0e10cSrcweir 309*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr20, kTestStr20, kTestStr20Len ); 310*cdf0e10cSrcweir 311*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr21, kTestStr21, kTestStr21Len ); 312*cdf0e10cSrcweir 313*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr22, kTestStr22, kTestStr22Len ); 314*cdf0e10cSrcweir 315*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr23, kTestStr23, kTestStr23Len ); 316*cdf0e10cSrcweir 317*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr1PlusUStr6, kTestStr1PlusStr6, kTestStr1PlusStr6Len ); 318*cdf0e10cSrcweir 319*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr24, kTestStr24, kTestStr24Len ); 320*cdf0e10cSrcweir 321*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr25, kTestStr25, kTestStr25Len ); 322*cdf0e10cSrcweir 323*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr26, kTestStr26, kTestStr26Len ); 324*cdf0e10cSrcweir 325*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr27, kTestStr27, kTestStr27Len ); 326*cdf0e10cSrcweir 327*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr28, kTestStr28, kTestStr28Len ); 328*cdf0e10cSrcweir 329*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr29, kTestStr29, kTestStr29Len ); 330*cdf0e10cSrcweir 331*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr30, kTestStr30, kTestStr30Len ); 332*cdf0e10cSrcweir 333*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr31, kTestStr31, kTestStr31Len ); 334*cdf0e10cSrcweir 335*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr32, kTestStr32, kTestStr32Len ); 336*cdf0e10cSrcweir 337*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr33, kTestStr33, kTestStr33Len ); 338*cdf0e10cSrcweir 339*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr34, kTestStr34, kTestStr34Len ); 340*cdf0e10cSrcweir 341*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr35, kTestStr35, kTestStr35Len ); 342*cdf0e10cSrcweir 343*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr36, kTestStr36, kTestStr36Len ); 344*cdf0e10cSrcweir 345*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr37, kTestStr37, kTestStr37Len ); 346*cdf0e10cSrcweir 347*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr38, kTestStr38, kTestStr38Len ); 348*cdf0e10cSrcweir 349*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr39, kTestStr39, kTestStr39Len ); 350*cdf0e10cSrcweir 351*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr40, kTestStr40, kTestStr40Len ); 352*cdf0e10cSrcweir 353*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr41, kTestStr41, kTestStr41Len ); 354*cdf0e10cSrcweir 355*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr42, kTestStr42, kTestStr42Len ); 356*cdf0e10cSrcweir 357*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr43, kTestStr43, kTestStr43Len ); 358*cdf0e10cSrcweir 359*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr44, kTestStr44, kTestStr44Len ); 360*cdf0e10cSrcweir 361*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr45, kTestStr45, kTestStr45Len ); 362*cdf0e10cSrcweir 363*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr46, kTestStr46, kTestStr46Len ); 364*cdf0e10cSrcweir 365*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr47, kTestStr47, kTestStr47Len ); 366*cdf0e10cSrcweir 367*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr48, kTestStr48, kTestStr48Len ); 368*cdf0e10cSrcweir 369*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr49, kTestStr49, kTestStr49Len ); 370*cdf0e10cSrcweir 371*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr50, kTestStr50, kTestStr50Len ); 372*cdf0e10cSrcweir 373*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr51, kTestStr51, kTestStr51Len ); 374*cdf0e10cSrcweir 375*cdf0e10cSrcweir //iniResult &=AStringToUStringNCopy( aUStr52, kTestStr52, kTestStr52Len ); 376*cdf0e10cSrcweir 377*cdf0e10cSrcweir // iniResult &=AStringToUStringNCopy( aUStr53, kTestStr53, kTestStr53Len ); 378*cdf0e10cSrcweir 379*cdf0e10cSrcweir //iniResult &=AStringToUStringNCopy( aUStr54, kTestStr54, kTestStr54Len ); 380*cdf0e10cSrcweir 381*cdf0e10cSrcweir //iniResult &=AStringToUStringNCopy( aUStr55, kTestStr55, kTestStr55Len ); 382*cdf0e10cSrcweir 383*cdf0e10cSrcweir iniResult &=AStringToUStringNCopy( aUStr56, kTestStr56, kTestStr56Len ); 384*cdf0e10cSrcweir 385*cdf0e10cSrcweir // iniResult &=AStringToUStringNCopy( aUStr57, kTestStr57, kTestStr57Len ); 386*cdf0e10cSrcweir 387*cdf0e10cSrcweir //iniResult &=AStringToUStringNCopy( aUStr58, kTestStr58, kTestStr58Len ); 388*cdf0e10cSrcweir return iniResult; 389*cdf0e10cSrcweir 390*cdf0e10cSrcweir } 391*cdf0e10cSrcweir 392*cdf0e10cSrcweir 393*cdf0e10cSrcweir 394*cdf0e10cSrcweir 395*cdf0e10cSrcweir static const sal_Int32 uTestStr1Len = 16; 396*cdf0e10cSrcweir static const sal_Int32 uTestStr2Len = 32; 397*cdf0e10cSrcweir static const sal_Int32 uTestStr3Len = 16; 398*cdf0e10cSrcweir static const sal_Int32 uTestStr4Len = 16; 399*cdf0e10cSrcweir static const sal_Int32 uTestStr5Len = 16; 400*cdf0e10cSrcweir static const sal_Int32 uTestStr9Len = 32; 401*cdf0e10cSrcweir static const sal_Int32 uTestStr22Len = 32; 402*cdf0e10cSrcweir 403*cdf0e10cSrcweir 404*cdf0e10cSrcweir 405*cdf0e10cSrcweir //------------------------------------------------------------------------ 406*cdf0e10cSrcweir //------------------------------------------------------------------------ 407*cdf0e10cSrcweir const sal_Unicode uTestStr31[]= {0x400,0x410,0x4DF}; 408*cdf0e10cSrcweir const sal_Unicode uTestStr32[]= {0x9F9F,0xA000,0x8F80,0x9AD9}; 409*cdf0e10cSrcweir 410*cdf0e10cSrcweir 411*cdf0e10cSrcweir 412*cdf0e10cSrcweir //------------------------------------------------------------------------ 413*cdf0e10cSrcweir //------------------------------------------------------------------------ 414*cdf0e10cSrcweir 415*cdf0e10cSrcweir static const sal_Int32 uTestStr31Len = 3; 416*cdf0e10cSrcweir static const sal_Int32 uTestStr32Len = 4; 417*cdf0e10cSrcweir 418*cdf0e10cSrcweir //------------------------------------------------------------------------ 419*cdf0e10cSrcweir //------------------------------------------------------------------------ 420*cdf0e10cSrcweir 421*cdf0e10cSrcweir static const sal_Int16 kRadixBinary = 2; 422*cdf0e10cSrcweir static const sal_Int16 kRadixOctol = 8; 423*cdf0e10cSrcweir static const sal_Int16 kRadixDecimal = 10; 424*cdf0e10cSrcweir static const sal_Int16 kRadixHexdecimal = 16; 425*cdf0e10cSrcweir static const sal_Int16 kRadixBase36 = 36; 426*cdf0e10cSrcweir 427*cdf0e10cSrcweir //------------------------------------------------------------------------ 428*cdf0e10cSrcweir //------------------------------------------------------------------------ 429*cdf0e10cSrcweir 430*cdf0e10cSrcweir static const sal_Int8 kSInt8Max = SCHAR_MAX; 431*cdf0e10cSrcweir static const sal_Int16 kUInt8Max = UCHAR_MAX; 432*cdf0e10cSrcweir static const sal_Int16 kSInt16Max = SHRT_MAX; 433*cdf0e10cSrcweir static const sal_Int32 kUInt16Max = USHRT_MAX; 434*cdf0e10cSrcweir static const sal_Int32 kSInt32Max = INT_MAX; 435*cdf0e10cSrcweir static const sal_Int64 kUInt32Max = UINT_MAX; 436*cdf0e10cSrcweir #if (defined UNX) || (defined OS2) 437*cdf0e10cSrcweir static const sal_Int64 kSInt64Max = 9223372036854775807LL; 438*cdf0e10cSrcweir #else 439*cdf0e10cSrcweir static const sal_Int64 kSInt64Max = 9223372036854775807; 440*cdf0e10cSrcweir #endif 441*cdf0e10cSrcweir //------------------------------------------------------------------------ 442*cdf0e10cSrcweir 443*cdf0e10cSrcweir static const sal_Int32 kInt32MaxNumsCount = 5; 444*cdf0e10cSrcweir 445*cdf0e10cSrcweir static const sal_Int32 kInt32MaxNums[kInt32MaxNumsCount] = 446*cdf0e10cSrcweir { 447*cdf0e10cSrcweir kSInt8Max, kUInt8Max, 448*cdf0e10cSrcweir kSInt16Max, kUInt16Max, 449*cdf0e10cSrcweir kSInt32Max 450*cdf0e10cSrcweir }; 451*cdf0e10cSrcweir 452*cdf0e10cSrcweir static const sal_Int32 kInt64MaxNumsCount = 7; 453*cdf0e10cSrcweir 454*cdf0e10cSrcweir static const sal_Int64 kInt64MaxNums[kInt64MaxNumsCount] = 455*cdf0e10cSrcweir { 456*cdf0e10cSrcweir kSInt8Max, kUInt8Max, 457*cdf0e10cSrcweir kSInt16Max, kUInt16Max, 458*cdf0e10cSrcweir kSInt32Max, kUInt32Max, 459*cdf0e10cSrcweir kSInt64Max 460*cdf0e10cSrcweir }; 461*cdf0e10cSrcweir 462*cdf0e10cSrcweir //------------------------------------------------------------------------ 463*cdf0e10cSrcweir //------------------------------------------------------------------------ 464*cdf0e10cSrcweir 465*cdf0e10cSrcweir static const sal_Char *kSInt8MaxBinaryStr = "1111111"; 466*cdf0e10cSrcweir static const sal_Char *kUInt8MaxBinaryStr = "11111111"; 467*cdf0e10cSrcweir static const sal_Char *kSInt16MaxBinaryStr = "111111111111111"; 468*cdf0e10cSrcweir static const sal_Char *kUInt16MaxBinaryStr = "1111111111111111"; 469*cdf0e10cSrcweir static const sal_Char *kSInt32MaxBinaryStr = 470*cdf0e10cSrcweir "1111111111111111111111111111111"; 471*cdf0e10cSrcweir static const sal_Char *kUInt32MaxBinaryStr = 472*cdf0e10cSrcweir "11111111111111111111111111111111"; 473*cdf0e10cSrcweir static const sal_Char *kSInt64MaxBinaryStr = 474*cdf0e10cSrcweir "111111111111111111111111111111111111111111111111111111111111111"; 475*cdf0e10cSrcweir 476*cdf0e10cSrcweir //------------------------------------------------------------------------ 477*cdf0e10cSrcweir 478*cdf0e10cSrcweir static const sal_Char *kSInt8MaxOctolStr = "177"; 479*cdf0e10cSrcweir static const sal_Char *kUInt8MaxOctolStr = "377"; 480*cdf0e10cSrcweir static const sal_Char *kSInt16MaxOctolStr = "77777"; 481*cdf0e10cSrcweir static const sal_Char *kUInt16MaxOctolStr = "177777"; 482*cdf0e10cSrcweir static const sal_Char *kSInt32MaxOctolStr = "17777777777"; 483*cdf0e10cSrcweir static const sal_Char *kUInt32MaxOctolStr = "37777777777"; 484*cdf0e10cSrcweir static const sal_Char *kSInt64MaxOctolStr = "777777777777777777777"; 485*cdf0e10cSrcweir 486*cdf0e10cSrcweir //------------------------------------------------------------------------ 487*cdf0e10cSrcweir 488*cdf0e10cSrcweir static const sal_Char *kSInt8MaxDecimalStr = "127"; 489*cdf0e10cSrcweir static const sal_Char *kUInt8MaxDecimalStr = "255"; 490*cdf0e10cSrcweir static const sal_Char *kSInt16MaxDecimalStr = "32767"; 491*cdf0e10cSrcweir static const sal_Char *kUInt16MaxDecimalStr = "65535"; 492*cdf0e10cSrcweir static const sal_Char *kSInt32MaxDecimalStr = "2147483647"; 493*cdf0e10cSrcweir static const sal_Char *kUInt32MaxDecimalStr = "4294967295"; 494*cdf0e10cSrcweir static const sal_Char *kSInt64MaxDecimalStr = "9223372036854775807"; 495*cdf0e10cSrcweir 496*cdf0e10cSrcweir //------------------------------------------------------------------------ 497*cdf0e10cSrcweir 498*cdf0e10cSrcweir static const sal_Char *kSInt8MaxHexDecimalStr = "7f"; 499*cdf0e10cSrcweir static const sal_Char *kUInt8MaxHexDecimalStr = "ff"; 500*cdf0e10cSrcweir static const sal_Char *kSInt16MaxHexDecimalStr = "7fff"; 501*cdf0e10cSrcweir static const sal_Char *kUInt16MaxHexDecimalStr = "ffff"; 502*cdf0e10cSrcweir static const sal_Char *kSInt32MaxHexDecimalStr = "7fffffff"; 503*cdf0e10cSrcweir static const sal_Char *kUInt32MaxHexDecimalStr = "ffffffff"; 504*cdf0e10cSrcweir static const sal_Char *kSInt64MaxHexDecimalStr = "7fffffffffffffff"; 505*cdf0e10cSrcweir 506*cdf0e10cSrcweir //------------------------------------------------------------------------ 507*cdf0e10cSrcweir 508*cdf0e10cSrcweir static const sal_Char *kSInt8MaxBase36Str = "3j"; 509*cdf0e10cSrcweir static const sal_Char *kUInt8MaxBase36Str = "73"; 510*cdf0e10cSrcweir static const sal_Char *kSInt16MaxBase36Str = "pa7"; 511*cdf0e10cSrcweir static const sal_Char *kUInt16MaxBase36Str = "1ekf"; 512*cdf0e10cSrcweir static const sal_Char *kSInt32MaxBase36Str = "zik0zj"; 513*cdf0e10cSrcweir static const sal_Char *kUInt32MaxBase36Str = "1z141z3"; 514*cdf0e10cSrcweir static const sal_Char *kSInt64MaxBase36Str = "1y2p0ij32e8e7"; 515*cdf0e10cSrcweir 516*cdf0e10cSrcweir //------------------------------------------------------------------------ 517*cdf0e10cSrcweir //------------------------------------------------------------------------ 518*cdf0e10cSrcweir 519*cdf0e10cSrcweir static const sal_Int32 kBinaryNumsCount = 16; 520*cdf0e10cSrcweir 521*cdf0e10cSrcweir static const sal_Char *kBinaryNumsStr[kBinaryNumsCount] = 522*cdf0e10cSrcweir { 523*cdf0e10cSrcweir "0", "1", "10", "11", 524*cdf0e10cSrcweir "100", "101", "110", "111", 525*cdf0e10cSrcweir "1000", "1001", "1010", "1011", 526*cdf0e10cSrcweir "1100", "1101", "1110", "1111" 527*cdf0e10cSrcweir }; 528*cdf0e10cSrcweir 529*cdf0e10cSrcweir static const sal_Int32 kBinaryMaxNumsCount = 7; 530*cdf0e10cSrcweir 531*cdf0e10cSrcweir static const sal_Char *kBinaryMaxNumsStr[kBinaryMaxNumsCount] = 532*cdf0e10cSrcweir { 533*cdf0e10cSrcweir kSInt8MaxBinaryStr, 534*cdf0e10cSrcweir kUInt8MaxBinaryStr, 535*cdf0e10cSrcweir kSInt16MaxBinaryStr, 536*cdf0e10cSrcweir kUInt16MaxBinaryStr, 537*cdf0e10cSrcweir kSInt32MaxBinaryStr, 538*cdf0e10cSrcweir kUInt32MaxBinaryStr, 539*cdf0e10cSrcweir kSInt64MaxBinaryStr 540*cdf0e10cSrcweir }; 541*cdf0e10cSrcweir 542*cdf0e10cSrcweir //------------------------------------------------------------------------ 543*cdf0e10cSrcweir 544*cdf0e10cSrcweir static const sal_Int32 kOctolNumsCount = 16; 545*cdf0e10cSrcweir 546*cdf0e10cSrcweir static const sal_Char *kOctolNumsStr[kOctolNumsCount] = 547*cdf0e10cSrcweir { 548*cdf0e10cSrcweir "0", "1", "2", "3", 549*cdf0e10cSrcweir "4", "5", "6", "7", 550*cdf0e10cSrcweir "10", "11", "12", "13", 551*cdf0e10cSrcweir "14", "15", "16", "17" 552*cdf0e10cSrcweir }; 553*cdf0e10cSrcweir 554*cdf0e10cSrcweir static const sal_Int32 kOctolMaxNumsCount = 7; 555*cdf0e10cSrcweir 556*cdf0e10cSrcweir static const sal_Char *kOctolMaxNumsStr[kOctolMaxNumsCount] = 557*cdf0e10cSrcweir { 558*cdf0e10cSrcweir kSInt8MaxOctolStr, 559*cdf0e10cSrcweir kUInt8MaxOctolStr, 560*cdf0e10cSrcweir kSInt16MaxOctolStr, 561*cdf0e10cSrcweir kUInt16MaxOctolStr, 562*cdf0e10cSrcweir kSInt32MaxOctolStr, 563*cdf0e10cSrcweir kUInt32MaxOctolStr, 564*cdf0e10cSrcweir kSInt64MaxOctolStr 565*cdf0e10cSrcweir }; 566*cdf0e10cSrcweir 567*cdf0e10cSrcweir //------------------------------------------------------------------------ 568*cdf0e10cSrcweir 569*cdf0e10cSrcweir static const sal_Int32 kDecimalNumsCount = 16; 570*cdf0e10cSrcweir 571*cdf0e10cSrcweir static const sal_Char *kDecimalNumsStr[kDecimalNumsCount] = 572*cdf0e10cSrcweir { 573*cdf0e10cSrcweir "0", "1", "2", "3", 574*cdf0e10cSrcweir "4", "5", "6", "7", 575*cdf0e10cSrcweir "8", "9", "10", "11", 576*cdf0e10cSrcweir "12", "13", "14", "15" 577*cdf0e10cSrcweir }; 578*cdf0e10cSrcweir 579*cdf0e10cSrcweir static const sal_Int32 kDecimalMaxNumsCount = 7; 580*cdf0e10cSrcweir 581*cdf0e10cSrcweir static const sal_Char *kDecimalMaxNumsStr[kDecimalMaxNumsCount] = 582*cdf0e10cSrcweir { 583*cdf0e10cSrcweir kSInt8MaxDecimalStr, 584*cdf0e10cSrcweir kUInt8MaxDecimalStr, 585*cdf0e10cSrcweir kSInt16MaxDecimalStr, 586*cdf0e10cSrcweir kUInt16MaxDecimalStr, 587*cdf0e10cSrcweir kSInt32MaxDecimalStr, 588*cdf0e10cSrcweir kUInt32MaxDecimalStr, 589*cdf0e10cSrcweir kSInt64MaxDecimalStr 590*cdf0e10cSrcweir }; 591*cdf0e10cSrcweir 592*cdf0e10cSrcweir //------------------------------------------------------------------------ 593*cdf0e10cSrcweir 594*cdf0e10cSrcweir static const sal_Int32 kHexDecimalNumsCount = 16; 595*cdf0e10cSrcweir 596*cdf0e10cSrcweir static const sal_Char *kHexDecimalNumsStr[kHexDecimalNumsCount] = 597*cdf0e10cSrcweir { 598*cdf0e10cSrcweir "0", "1", "2", "3", 599*cdf0e10cSrcweir "4", "5", "6", "7", 600*cdf0e10cSrcweir "8", "9", "a", "b", 601*cdf0e10cSrcweir "c", "d", "e", "f" 602*cdf0e10cSrcweir }; 603*cdf0e10cSrcweir 604*cdf0e10cSrcweir static const sal_Int32 kHexDecimalMaxNumsCount = 7; 605*cdf0e10cSrcweir 606*cdf0e10cSrcweir static const sal_Char *kHexDecimalMaxNumsStr[kHexDecimalMaxNumsCount] = 607*cdf0e10cSrcweir { 608*cdf0e10cSrcweir kSInt8MaxHexDecimalStr, 609*cdf0e10cSrcweir kUInt8MaxHexDecimalStr, 610*cdf0e10cSrcweir kSInt16MaxHexDecimalStr, 611*cdf0e10cSrcweir kUInt16MaxHexDecimalStr, 612*cdf0e10cSrcweir kSInt32MaxHexDecimalStr, 613*cdf0e10cSrcweir kUInt32MaxHexDecimalStr, 614*cdf0e10cSrcweir kSInt64MaxHexDecimalStr 615*cdf0e10cSrcweir }; 616*cdf0e10cSrcweir 617*cdf0e10cSrcweir //------------------------------------------------------------------------ 618*cdf0e10cSrcweir 619*cdf0e10cSrcweir static const sal_Int32 kBase36NumsCount = 36; 620*cdf0e10cSrcweir 621*cdf0e10cSrcweir static const sal_Char *kBase36NumsStr[kBase36NumsCount] = 622*cdf0e10cSrcweir { 623*cdf0e10cSrcweir "0", "1", "2", "3", 624*cdf0e10cSrcweir "4", "5", "6", "7", 625*cdf0e10cSrcweir "8", "9", "a", "b", 626*cdf0e10cSrcweir "c", "d", "e", "f", 627*cdf0e10cSrcweir "g", "h", "i", "j", 628*cdf0e10cSrcweir "k", "l", "m", "n", 629*cdf0e10cSrcweir "o", "p", "q", "r", 630*cdf0e10cSrcweir "s", "t", "u", "v", 631*cdf0e10cSrcweir "w", "x", "y", "z" 632*cdf0e10cSrcweir }; 633*cdf0e10cSrcweir 634*cdf0e10cSrcweir static const sal_Int32 kBase36MaxNumsCount = 7; 635*cdf0e10cSrcweir 636*cdf0e10cSrcweir static const sal_Char *kBase36MaxNumsStr[kBase36MaxNumsCount] = 637*cdf0e10cSrcweir { 638*cdf0e10cSrcweir kSInt8MaxBase36Str, 639*cdf0e10cSrcweir kUInt8MaxBase36Str, 640*cdf0e10cSrcweir kSInt16MaxBase36Str, 641*cdf0e10cSrcweir kUInt16MaxBase36Str, 642*cdf0e10cSrcweir kSInt32MaxBase36Str, 643*cdf0e10cSrcweir kUInt32MaxBase36Str, 644*cdf0e10cSrcweir kSInt64MaxBase36Str 645*cdf0e10cSrcweir }; 646*cdf0e10cSrcweir 647*cdf0e10cSrcweir //------------------------------------------------------------------------ 648*cdf0e10cSrcweir //------------------------------------------------------------------------ 649*cdf0e10cSrcweir static const sal_Int32 nDoubleCount=24; 650*cdf0e10cSrcweir // static const sal_Char *inputDouble[nDoubleCount] = 651*cdf0e10cSrcweir // { 652*cdf0e10cSrcweir // "3","3.1","3.1415","3.1415926535","3.141592653589793", 653*cdf0e10cSrcweir // "3.1415926535897932","3.14159265358979323","+3.1", 654*cdf0e10cSrcweir // "3.141592653589793238462643","9.1096e-31","2.997925e8","6.241e18","5.381e+18", 655*cdf0e10cSrcweir // "1.7e-309","6.5822e-16","1.7e+307","2.2e30","03.1"," 3.1","-3.1", 656*cdf0e10cSrcweir // "-0.0","0.0","","1.00e308" 657*cdf0e10cSrcweir // }; 658*cdf0e10cSrcweir static const double expValDouble[nDoubleCount]= 659*cdf0e10cSrcweir { 660*cdf0e10cSrcweir 3.0,3.1,3.1415,3.1415926535,3.141592653589793, 661*cdf0e10cSrcweir 3.1415926535897932,3.14159265358979323,3.1, 662*cdf0e10cSrcweir 3.141592653589793238462643,9.1096e-31,2.997925e8,6.241e18,5.381e18, 663*cdf0e10cSrcweir 1.7e-309,6.5822e-16,1.7e+307,2.2e30,3.1,3.1,-3.1, 664*cdf0e10cSrcweir 0.0,0.0,0.0,1.00e+308 665*cdf0e10cSrcweir }; 666*cdf0e10cSrcweir //------------------------------------------------------------------------ 667*cdf0e10cSrcweir static const sal_Int32 nFloatCount=22; 668*cdf0e10cSrcweir // static const sal_Char *inputFloat[nFloatCount] = 669*cdf0e10cSrcweir // { 670*cdf0e10cSrcweir // "3", 671*cdf0e10cSrcweir // "3.1", 672*cdf0e10cSrcweir // "3.1415", 673*cdf0e10cSrcweir // "3.14159", 674*cdf0e10cSrcweir // "3.141592", 675*cdf0e10cSrcweir // "3.1415926", 676*cdf0e10cSrcweir // "3.14159265", 677*cdf0e10cSrcweir // "3.141592653589793238462643", 678*cdf0e10cSrcweir // "6.5822e-16", 679*cdf0e10cSrcweir // "9.1096e-31", 680*cdf0e10cSrcweir // "2.997925e8", 681*cdf0e10cSrcweir // "6.241e18", 682*cdf0e10cSrcweir // "1.00e38", 683*cdf0e10cSrcweir // "6.241e-37", 684*cdf0e10cSrcweir // "6.241e37", 685*cdf0e10cSrcweir // "03.1", 686*cdf0e10cSrcweir // " 3.1", 687*cdf0e10cSrcweir // "-3.1", 688*cdf0e10cSrcweir // "+3.1", 689*cdf0e10cSrcweir // "-0.0", 690*cdf0e10cSrcweir // "0.0", 691*cdf0e10cSrcweir // "" 692*cdf0e10cSrcweir // }; 693*cdf0e10cSrcweir static const float expValFloat[nFloatCount] = 694*cdf0e10cSrcweir { 695*cdf0e10cSrcweir 3.0f, 696*cdf0e10cSrcweir 3.1f, 697*cdf0e10cSrcweir 3.1415f, 698*cdf0e10cSrcweir 3.14159f, 699*cdf0e10cSrcweir 3.141592f, 700*cdf0e10cSrcweir 3.1415926f, 701*cdf0e10cSrcweir 3.14159265f, 702*cdf0e10cSrcweir 3.141592653589793238462643f, 703*cdf0e10cSrcweir 6.5822e-16f, 704*cdf0e10cSrcweir 9.1096e-31f, 705*cdf0e10cSrcweir 2.997925e8f, 706*cdf0e10cSrcweir 6.241e18f, 707*cdf0e10cSrcweir 1.00e38f, 708*cdf0e10cSrcweir 6.241e-37f, 709*cdf0e10cSrcweir 6.241e37f, 710*cdf0e10cSrcweir 3.1f, 711*cdf0e10cSrcweir 3.1f, 712*cdf0e10cSrcweir -3.1f, 713*cdf0e10cSrcweir 3.1f, 714*cdf0e10cSrcweir 0.0f, 715*cdf0e10cSrcweir 0.0f, 716*cdf0e10cSrcweir 0.0f 717*cdf0e10cSrcweir }; 718*cdf0e10cSrcweir static const float fPrecision[nFloatCount] = 719*cdf0e10cSrcweir { 720*cdf0e10cSrcweir 3e-7f, 721*cdf0e10cSrcweir 3e-7f, 722*cdf0e10cSrcweir 3e-7f, 723*cdf0e10cSrcweir 3e-7f, 724*cdf0e10cSrcweir 3e-7f, 725*cdf0e10cSrcweir 3e-7f, 726*cdf0e10cSrcweir 3e-7f, 727*cdf0e10cSrcweir 3e-7f, 728*cdf0e10cSrcweir 6e-16f * 1e-7f, 729*cdf0e10cSrcweir 9e-31f * 1e-7f, 730*cdf0e10cSrcweir 3e8f * 1e-7f, 731*cdf0e10cSrcweir 6e18f * 1e-7f, 732*cdf0e10cSrcweir 1e38f * 1e-7f, 733*cdf0e10cSrcweir 6e-37f * 1e-7f, 734*cdf0e10cSrcweir 6e37f * 1e-7f, 735*cdf0e10cSrcweir 3e-7f, 736*cdf0e10cSrcweir 3e-7f, 737*cdf0e10cSrcweir 3e-7f, 738*cdf0e10cSrcweir 3e-7f, 739*cdf0e10cSrcweir 1e-7f, 740*cdf0e10cSrcweir 1e-7f, 741*cdf0e10cSrcweir 1e-7f 742*cdf0e10cSrcweir }; 743*cdf0e10cSrcweir //------------------------------------------------------------------------ 744*cdf0e10cSrcweir static const sal_Int32 nCharCount=15; 745*cdf0e10cSrcweir static const sal_Char *inputChar[nCharCount] = 746*cdf0e10cSrcweir { 747*cdf0e10cSrcweir "A","a","0","-","_", 748*cdf0e10cSrcweir "\25","\33","\35", 749*cdf0e10cSrcweir "@","\n","\'","\"", 750*cdf0e10cSrcweir "\0","","Sun Microsystems" 751*cdf0e10cSrcweir }; 752*cdf0e10cSrcweir static const sal_Unicode expValChar[nCharCount] = 753*cdf0e10cSrcweir { 754*cdf0e10cSrcweir 65,97,48,45,95, 755*cdf0e10cSrcweir 21,27,29, 756*cdf0e10cSrcweir 64,10,39,34, 757*cdf0e10cSrcweir 0,0,83 758*cdf0e10cSrcweir }; 759*cdf0e10cSrcweir //------------------------------------------------------------------------ 760*cdf0e10cSrcweir static const sal_Int32 nDefaultCount=6; 761*cdf0e10cSrcweir static const sal_Unicode input1Default[nDefaultCount] = 762*cdf0e10cSrcweir { 763*cdf0e10cSrcweir 77,115,85,119,32,0 764*cdf0e10cSrcweir }; 765*cdf0e10cSrcweir static const sal_Int32 input2Default[nDefaultCount] = 766*cdf0e10cSrcweir { 767*cdf0e10cSrcweir 0,0,0,0,0,0 768*cdf0e10cSrcweir }; 769*cdf0e10cSrcweir static const sal_Int32 expValDefault[nDefaultCount] = 770*cdf0e10cSrcweir { 771*cdf0e10cSrcweir 4,9,-1,-1,3,-1 772*cdf0e10cSrcweir }; 773*cdf0e10cSrcweir //------------------------------------------------------------------------ 774*cdf0e10cSrcweir static const sal_Int32 nNormalCount=10; 775*cdf0e10cSrcweir static const sal_Unicode input1Normal[nNormalCount] = 776*cdf0e10cSrcweir { 777*cdf0e10cSrcweir 77,77,77,115,115,115,119,119,0,0 778*cdf0e10cSrcweir }; 779*cdf0e10cSrcweir static const sal_Int32 input2Normal[nNormalCount] = 780*cdf0e10cSrcweir { 781*cdf0e10cSrcweir 0,32,80,0,13,20,0,80,0,32 782*cdf0e10cSrcweir }; 783*cdf0e10cSrcweir static const sal_Int32 expValNormal[nNormalCount] = 784*cdf0e10cSrcweir { 785*cdf0e10cSrcweir 4,-1,-1,9,15,-1,-1,-1,-1,-1 786*cdf0e10cSrcweir }; 787*cdf0e10cSrcweir //------------------------------------------------------------------------ 788*cdf0e10cSrcweir static const sal_Int32 nlastDefaultCount=5; 789*cdf0e10cSrcweir static const sal_Unicode input1lastDefault[nlastDefaultCount] = 790*cdf0e10cSrcweir { 791*cdf0e10cSrcweir 77,115,119,32,0 792*cdf0e10cSrcweir }; 793*cdf0e10cSrcweir static const sal_Int32 input2lastDefault[nlastDefaultCount] = 794*cdf0e10cSrcweir { 795*cdf0e10cSrcweir 31,31,31,31,31 796*cdf0e10cSrcweir }; 797*cdf0e10cSrcweir static const sal_Int32 expVallastDefault[nlastDefaultCount] = 798*cdf0e10cSrcweir { 799*cdf0e10cSrcweir 4,15,-1,21,-1 800*cdf0e10cSrcweir }; 801*cdf0e10cSrcweir //------------------------------------------------------------------------ 802*cdf0e10cSrcweir static const sal_Int32 nlastNormalCount=8; 803*cdf0e10cSrcweir static const sal_Unicode input1lastNormal[nlastNormalCount] = 804*cdf0e10cSrcweir { 805*cdf0e10cSrcweir 77,77,77,115,115,119,119,0 806*cdf0e10cSrcweir }; 807*cdf0e10cSrcweir static const sal_Int32 input2lastNormal[nlastNormalCount] = 808*cdf0e10cSrcweir { 809*cdf0e10cSrcweir 29,0,80,31,3,31,80,31 810*cdf0e10cSrcweir }; 811*cdf0e10cSrcweir static const sal_Int32 expVallastNormal[nlastNormalCount] = 812*cdf0e10cSrcweir { 813*cdf0e10cSrcweir 4,-1,4,15,-1,-1,-1,-1 814*cdf0e10cSrcweir }; 815*cdf0e10cSrcweir //------------------------------------------------------------------------ 816*cdf0e10cSrcweir static const sal_Int32 nStrDefaultCount=6; 817*cdf0e10cSrcweir static const sal_Unicode *input1StrDefault[nStrDefaultCount] = 818*cdf0e10cSrcweir { 819*cdf0e10cSrcweir aUStr7,aUStr8,aUStr21, 820*cdf0e10cSrcweir aUStr30,aUStr25,aUStr26 821*cdf0e10cSrcweir }; 822*cdf0e10cSrcweir static const sal_Int32 input2StrDefault[nStrDefaultCount] = 823*cdf0e10cSrcweir { 824*cdf0e10cSrcweir 0,0,0,0,0,0 825*cdf0e10cSrcweir }; 826*cdf0e10cSrcweir static const sal_Int32 expValStrDefault[nStrDefaultCount] = 827*cdf0e10cSrcweir { 828*cdf0e10cSrcweir 0,4,-1,-1,-1,3 829*cdf0e10cSrcweir }; 830*cdf0e10cSrcweir //------------------------------------------------------------------------ 831*cdf0e10cSrcweir static const sal_Int32 nStrNormalCount=9; 832*cdf0e10cSrcweir static const sal_Unicode *input1StrNormal[nStrNormalCount] = 833*cdf0e10cSrcweir { 834*cdf0e10cSrcweir aUStr7,aUStr7,aUStr8,aUStr8,aUStr21,aUStr30,aUStr25,aUStr25,aUStr26 835*cdf0e10cSrcweir }; 836*cdf0e10cSrcweir static const sal_Int32 input2StrNormal[nStrNormalCount] = 837*cdf0e10cSrcweir { 838*cdf0e10cSrcweir 0,32,0,30,0,0,0,32,0 839*cdf0e10cSrcweir }; 840*cdf0e10cSrcweir static const sal_Int32 expValStrNormal[nStrNormalCount] = 841*cdf0e10cSrcweir { 842*cdf0e10cSrcweir 0,-1,4,-1,-1,-1,-1,-1,3 843*cdf0e10cSrcweir }; 844*cdf0e10cSrcweir //------------------------------------------------------------------------ 845*cdf0e10cSrcweir static const sal_Int32 nStrLastDefaultCount=6; 846*cdf0e10cSrcweir static const sal_Unicode *input1StrLastDefault[nStrLastDefaultCount] = 847*cdf0e10cSrcweir { 848*cdf0e10cSrcweir aUStr7,aUStr8,aUStr21,aUStr30,aUStr25,aUStr26 849*cdf0e10cSrcweir }; 850*cdf0e10cSrcweir static const sal_Int32 input2StrLastDefault[nStrLastDefaultCount] = 851*cdf0e10cSrcweir { 852*cdf0e10cSrcweir 31,31,31,31,31,31 853*cdf0e10cSrcweir }; 854*cdf0e10cSrcweir static const sal_Int32 expValStrLastDefault[nStrLastDefaultCount] = 855*cdf0e10cSrcweir { 856*cdf0e10cSrcweir 0,4,-1,-1,-1,3 857*cdf0e10cSrcweir }; 858*cdf0e10cSrcweir //------------------------------------------------------------------------ 859*cdf0e10cSrcweir static const sal_Int32 nStrLastNormalCount=12; 860*cdf0e10cSrcweir static const sal_Unicode *input1StrLastNormal[nStrLastNormalCount] = 861*cdf0e10cSrcweir { 862*cdf0e10cSrcweir aUStr7,aUStr7,aUStr7,aUStr8,aUStr8,aUStr21,aUStr30, 863*cdf0e10cSrcweir aUStr25,aUStr25,aUStr26,aUStr27,aUStr27 864*cdf0e10cSrcweir }; 865*cdf0e10cSrcweir static const sal_Int32 input2StrLastNormal[nStrLastNormalCount] = 866*cdf0e10cSrcweir { 867*cdf0e10cSrcweir 31,0,80,31,2,31,31,31,0,31,31,14 868*cdf0e10cSrcweir }; 869*cdf0e10cSrcweir static const sal_Int32 expValStrLastNormal[nStrLastNormalCount] = 870*cdf0e10cSrcweir { 871*cdf0e10cSrcweir 0,-1,0,4,-1,-1,-1,-1,-1,3,15,11 872*cdf0e10cSrcweir }; 873*cdf0e10cSrcweir //------------------------------------------------------------------------ 874*cdf0e10cSrcweir static const sal_Int32 kNonSInt32Max = INT_MIN; 875*cdf0e10cSrcweir static const sal_Int32 kNonSInt16Max = SHRT_MIN; 876*cdf0e10cSrcweir //------------------------------------------------------------------------ 877*cdf0e10cSrcweir #ifdef __cplusplus 878*cdf0e10cSrcweir } 879*cdf0e10cSrcweir #endif 880*cdf0e10cSrcweir 881*cdf0e10cSrcweir //------------------------------------------------------------------------ 882*cdf0e10cSrcweir //------------------------------------------------------------------------ 883*cdf0e10cSrcweir 884*cdf0e10cSrcweir #endif /* _RTL_STRING_CONST_H_ */ 885*cdf0e10cSrcweir 886