diff options
-rw-r--r-- | i18nutil/source/utility/oneToOneMapping.cxx | 10 | ||||
-rw-r--r-- | i18nutil/source/utility/paper.cxx | 128 | ||||
-rw-r--r-- | i18nutil/source/utility/widthfolding.cxx | 8 | ||||
-rw-r--r-- | include/i18nutil/unicode.hxx | 2 |
4 files changed, 74 insertions, 74 deletions
diff --git a/i18nutil/source/utility/oneToOneMapping.cxx b/i18nutil/source/utility/oneToOneMapping.cxx index 3c735427dd53..10d4a0af9406 100644 --- a/i18nutil/source/utility/oneToOneMapping.cxx +++ b/i18nutil/source/utility/oneToOneMapping.cxx @@ -57,7 +57,7 @@ sal_Unicode oneToOneMapping::find(const sal_Unicode nKey) const } oneToOneMappingWithFlag::oneToOneMappingWithFlag( UnicodePairWithFlag *rpTableWF, const size_t rnSize, const UnicodePairFlag rnFlag ) - : oneToOneMapping( NULL, rnSize, sizeof(UnicodePairWithFlag) ), + : oneToOneMapping( nullptr, rnSize, sizeof(UnicodePairWithFlag) ), mpTableWF ( rpTableWF ), mnFlag ( rnFlag ), mbHasIndex( false ) @@ -81,7 +81,7 @@ void oneToOneMappingWithFlag::makeIndex() int current = -1; for (size_t i = 0; i < SAL_N_ELEMENTS(mpIndex); ++i) - mpIndex[i] = NULL; + mpIndex[i] = nullptr; for( size_t k = 0; k < mnSize; k++ ) { @@ -93,7 +93,7 @@ void oneToOneMappingWithFlag::makeIndex() mpIndex[high] = new UnicodePairWithFlag*[256]; for (int j = 0; j < 256; ++j) - mpIndex[high][j] = NULL; + mpIndex[high][j] = nullptr; } mpIndex[high][low] = &mpTableWF[k]; } @@ -112,8 +112,8 @@ sal_Unicode oneToOneMappingWithFlag::find( const sal_Unicode nKey ) const int high, low; high = (nKey >> 8) & 0xFF; low = nKey & 0xFF; - if( mpIndex[high] != NULL && - mpIndex[high][low] != NULL && + if( mpIndex[high] != nullptr && + mpIndex[high][low] != nullptr && mpIndex[high][low]->flag & mnFlag ) return mpIndex[high][low]->second; else diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx index 27543326d5d3..6223b6bc3be4 100644 --- a/i18nutil/source/utility/paper.cxx +++ b/i18nutil/source/utility/paper.cxx @@ -64,90 +64,90 @@ struct PageDesc //http://www.sls.psi.ch/controls/help/howto/Howto_Print_a_A0_Poster_at_WSLA_012_2.pdf (Dia) static const PageDesc aDinTab[] = { - { MM2MM100( 841 ), MM2MM100( 1189 ), "A0", NULL }, - { MM2MM100( 594 ), MM2MM100( 841 ), "A1", NULL }, - { MM2MM100( 420 ), MM2MM100( 594 ), "A2", NULL }, - { MM2MM100( 297 ), MM2MM100( 420 ), "A3", NULL }, - { MM2MM100( 210 ), MM2MM100( 297 ), "A4", NULL }, - { MM2MM100( 148 ), MM2MM100( 210 ), "A5", NULL }, - { MM2MM100( 250 ), MM2MM100( 353 ), "ISOB4", NULL }, - { MM2MM100( 176 ), MM2MM100( 250 ), "ISOB5", NULL }, + { MM2MM100( 841 ), MM2MM100( 1189 ), "A0", nullptr }, + { MM2MM100( 594 ), MM2MM100( 841 ), "A1", nullptr }, + { MM2MM100( 420 ), MM2MM100( 594 ), "A2", nullptr }, + { MM2MM100( 297 ), MM2MM100( 420 ), "A3", nullptr }, + { MM2MM100( 210 ), MM2MM100( 297 ), "A4", nullptr }, + { MM2MM100( 148 ), MM2MM100( 210 ), "A5", nullptr }, + { MM2MM100( 250 ), MM2MM100( 353 ), "ISOB4", nullptr }, + { MM2MM100( 176 ), MM2MM100( 250 ), "ISOB5", nullptr }, { IN2MM100( 8.5 ), IN2MM100( 11 ), "Letter", "Note" }, - { IN2MM100( 8.5 ), IN2MM100( 14 ), "Legal", NULL }, + { IN2MM100( 8.5 ), IN2MM100( 14 ), "Legal", nullptr }, { IN2MM100( 11 ), IN2MM100( 17 ), "Tabloid", "11x17" }, - { 0, 0, NULL, NULL }, //User - { MM2MM100( 125 ), MM2MM100( 176 ), "ISOB6", NULL }, + { 0, 0, nullptr, nullptr }, //User + { MM2MM100( 125 ), MM2MM100( 176 ), "ISOB6", nullptr }, { MM2MM100( 229 ), MM2MM100( 324 ), "EnvC4", "C4" }, { MM2MM100( 162 ), MM2MM100( 229 ), "EnvC5", "C5" }, { MM2MM100( 114 ), MM2MM100( 162 ), "EnvC6", "C6" }, - { MM2MM100( 114 ), MM2MM100( 229 ), "EnvC65", NULL }, + { MM2MM100( 114 ), MM2MM100( 229 ), "EnvC65", nullptr }, { MM2MM100( 110 ), MM2MM100( 220 ), "EnvDL", "DL" }, - { MM2MM100( 180), MM2MM100( 270 ), NULL, NULL }, //Dia - { MM2MM100( 210), MM2MM100( 280 ), NULL, NULL }, //Screen 4:3 + { MM2MM100( 180), MM2MM100( 270 ), nullptr, nullptr }, //Dia + { MM2MM100( 210), MM2MM100( 280 ), nullptr, nullptr }, //Screen 4:3 { IN2MM100( 17 ), IN2MM100( 22 ), "AnsiC", "CSheet" }, { IN2MM100( 22 ), IN2MM100( 34 ), "AnsiD", "DSheet" }, { IN2MM100( 34 ), IN2MM100( 44 ), "AnsiE", "ESheet" }, - { IN2MM100( 7.25 ), IN2MM100( 10.5 ), "Executive", NULL }, + { IN2MM100( 7.25 ), IN2MM100( 10.5 ), "Executive", nullptr }, //"Folio" is a different size in the PPD documentation than 8.5x11 //This "FanFoldGermanLegal" is known in the Philippines as //"Legal" paper or "Long Bond Paper". The "Legal" name causing untold //misery, given the differently sized US "Legal" paper - { IN2MM100( 8.5 ), IN2MM100( 13 ), "FanFoldGermanLegal", NULL }, + { IN2MM100( 8.5 ), IN2MM100( 13 ), "FanFoldGermanLegal", nullptr }, { IN2MM100( 3.875 ), IN2MM100( 7.5 ), "EnvMonarch", "Monarch" }, { IN2MM100( 3.625 ), IN2MM100( 6.5 ), "EnvPersonal", "Personal" }, - { IN2MM100( 3.875 ), IN2MM100( 8.875 ), "Env9", NULL }, + { IN2MM100( 3.875 ), IN2MM100( 8.875 ), "Env9", nullptr }, { IN2MM100( 4.125 ), IN2MM100( 9.5 ), "Env10", "Comm10" }, - { IN2MM100( 4.5 ), IN2MM100( 10.375 ), "Env11", NULL }, - { IN2MM100( 4.75 ), IN2MM100( 11 ), "Env12", NULL }, - { MM2MM100( 184 ), MM2MM100( 260 ), NULL, NULL }, //Kai16 - { MM2MM100( 130 ), MM2MM100( 184 ), NULL, NULL }, //Kai32 - { MM2MM100( 140 ), MM2MM100( 203 ), NULL, NULL }, //BigKai32 - { MM2MM100( 257 ), MM2MM100( 364 ), "B4", NULL }, //JIS - { MM2MM100( 182 ), MM2MM100( 257 ), "B5", NULL }, //JIS - { MM2MM100( 128 ), MM2MM100( 182 ), "B6", NULL }, //JIS - { IN2MM100( 17 ), IN2MM100( 11 ), "Ledger", NULL }, - { IN2MM100( 5.5 ), IN2MM100( 8.5 ), "Statement", NULL }, - { PT2MM100( 610 ), PT2MM100( 780 ), "Quarto", NULL }, - { IN2MM100( 10 ), IN2MM100( 14 ), "10x14", NULL }, - { IN2MM100( 5.5 ), IN2MM100( 11.5 ), "Env14", NULL }, + { IN2MM100( 4.5 ), IN2MM100( 10.375 ), "Env11", nullptr }, + { IN2MM100( 4.75 ), IN2MM100( 11 ), "Env12", nullptr }, + { MM2MM100( 184 ), MM2MM100( 260 ), nullptr, nullptr }, //Kai16 + { MM2MM100( 130 ), MM2MM100( 184 ), nullptr, nullptr }, //Kai32 + { MM2MM100( 140 ), MM2MM100( 203 ), nullptr, nullptr }, //BigKai32 + { MM2MM100( 257 ), MM2MM100( 364 ), "B4", nullptr }, //JIS + { MM2MM100( 182 ), MM2MM100( 257 ), "B5", nullptr }, //JIS + { MM2MM100( 128 ), MM2MM100( 182 ), "B6", nullptr }, //JIS + { IN2MM100( 17 ), IN2MM100( 11 ), "Ledger", nullptr }, + { IN2MM100( 5.5 ), IN2MM100( 8.5 ), "Statement", nullptr }, + { PT2MM100( 610 ), PT2MM100( 780 ), "Quarto", nullptr }, + { IN2MM100( 10 ), IN2MM100( 14 ), "10x14", nullptr }, + { IN2MM100( 5.5 ), IN2MM100( 11.5 ), "Env14", nullptr }, { MM2MM100( 324 ), MM2MM100( 458 ), "EnvC3", "C3" }, - { MM2MM100( 110 ), MM2MM100( 230 ), "EnvItalian", NULL }, - { IN2MM100( 14.875 ),IN2MM100( 11 ), "FanFoldUS", NULL }, - { IN2MM100( 8.5 ), IN2MM100( 13 ), "FanFoldGerman", NULL }, - { MM2MM100( 100 ), MM2MM100( 148 ), "Postcard", NULL }, - { IN2MM100( 9 ), IN2MM100( 11 ), "9x11", NULL }, - { IN2MM100( 10 ), IN2MM100( 11 ), "10x11", NULL }, - { IN2MM100( 15 ), IN2MM100( 11 ), "15x11", NULL }, - { MM2MM100( 220 ), MM2MM100( 220 ), "EnvInvite", NULL }, - { MM2MM100( 227 ), MM2MM100( 356 ), "SuperA", NULL }, - { MM2MM100( 305 ), MM2MM100( 487 ), "SuperB", NULL }, - { IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", NULL }, - { MM2MM100( 210 ), MM2MM100( 330 ), "A4Plus", NULL }, - { MM2MM100( 200 ), MM2MM100( 148 ), "DoublePostcard", NULL }, - { MM2MM100( 105 ), MM2MM100( 148 ), "A6", NULL }, - { IN2MM100( 12 ), IN2MM100( 11 ), "12x11", NULL }, - { MM2MM100( 74 ), MM2MM100( 105 ), "A7", NULL }, - { MM2MM100( 52 ), MM2MM100( 74 ), "A8", NULL }, - { MM2MM100( 37 ), MM2MM100( 52 ), "A9", NULL }, - { MM2MM100( 26 ), MM2MM100( 37 ), "A10", NULL }, - { MM2MM100( 1000 ), MM2MM100( 1414 ), "ISOB0", NULL }, - { MM2MM100( 707 ), MM2MM100( 1000 ), "ISOB1", NULL }, - { MM2MM100( 500 ), MM2MM100( 707 ), "ISOB2", NULL }, - { MM2MM100( 353 ), MM2MM100( 500 ), "ISOB3", NULL }, - { MM2MM100( 88 ), MM2MM100( 125 ), "ISOB7", NULL }, - { MM2MM100( 62 ), MM2MM100( 88 ), "ISOB8", NULL }, - { MM2MM100( 44 ), MM2MM100( 62 ), "ISOB9", NULL }, - { MM2MM100( 31 ), MM2MM100( 44 ), "ISOB10", NULL }, + { MM2MM100( 110 ), MM2MM100( 230 ), "EnvItalian", nullptr }, + { IN2MM100( 14.875 ),IN2MM100( 11 ), "FanFoldUS", nullptr }, + { IN2MM100( 8.5 ), IN2MM100( 13 ), "FanFoldGerman", nullptr }, + { MM2MM100( 100 ), MM2MM100( 148 ), "Postcard", nullptr }, + { IN2MM100( 9 ), IN2MM100( 11 ), "9x11", nullptr }, + { IN2MM100( 10 ), IN2MM100( 11 ), "10x11", nullptr }, + { IN2MM100( 15 ), IN2MM100( 11 ), "15x11", nullptr }, + { MM2MM100( 220 ), MM2MM100( 220 ), "EnvInvite", nullptr }, + { MM2MM100( 227 ), MM2MM100( 356 ), "SuperA", nullptr }, + { MM2MM100( 305 ), MM2MM100( 487 ), "SuperB", nullptr }, + { IN2MM100( 8.5 ), IN2MM100( 12.69 ), "LetterPlus", nullptr }, + { MM2MM100( 210 ), MM2MM100( 330 ), "A4Plus", nullptr }, + { MM2MM100( 200 ), MM2MM100( 148 ), "DoublePostcard", nullptr }, + { MM2MM100( 105 ), MM2MM100( 148 ), "A6", nullptr }, + { IN2MM100( 12 ), IN2MM100( 11 ), "12x11", nullptr }, + { MM2MM100( 74 ), MM2MM100( 105 ), "A7", nullptr }, + { MM2MM100( 52 ), MM2MM100( 74 ), "A8", nullptr }, + { MM2MM100( 37 ), MM2MM100( 52 ), "A9", nullptr }, + { MM2MM100( 26 ), MM2MM100( 37 ), "A10", nullptr }, + { MM2MM100( 1000 ), MM2MM100( 1414 ), "ISOB0", nullptr }, + { MM2MM100( 707 ), MM2MM100( 1000 ), "ISOB1", nullptr }, + { MM2MM100( 500 ), MM2MM100( 707 ), "ISOB2", nullptr }, + { MM2MM100( 353 ), MM2MM100( 500 ), "ISOB3", nullptr }, + { MM2MM100( 88 ), MM2MM100( 125 ), "ISOB7", nullptr }, + { MM2MM100( 62 ), MM2MM100( 88 ), "ISOB8", nullptr }, + { MM2MM100( 44 ), MM2MM100( 62 ), "ISOB9", nullptr }, + { MM2MM100( 31 ), MM2MM100( 44 ), "ISOB10", nullptr }, { MM2MM100( 458 ), MM2MM100( 648 ), "EnvC2", "C2" }, { MM2MM100( 81 ), MM2MM100( 114 ), "EnvC7", "C7" }, { MM2MM100( 57 ), MM2MM100( 81 ), "EnvC8", "C8" }, - { IN2MM100( 9 ), IN2MM100( 12 ), "ARCHA", NULL }, - { IN2MM100( 12 ), IN2MM100( 18 ), "ARCHB", NULL }, - { IN2MM100( 18 ), IN2MM100( 24 ), "ARCHC", NULL }, - { IN2MM100( 24 ), IN2MM100( 36 ), "ARCHD", NULL }, - { IN2MM100( 36 ), IN2MM100( 48 ), "ARCHE", NULL }, - { MM2MM100( 157.5), MM2MM100( 280 ), NULL, NULL }, //Screen 16:9 - { MM2MM100( 175 ), MM2MM100( 280 ), NULL, NULL } //Screen 16:10 + { IN2MM100( 9 ), IN2MM100( 12 ), "ARCHA", nullptr }, + { IN2MM100( 12 ), IN2MM100( 18 ), "ARCHB", nullptr }, + { IN2MM100( 18 ), IN2MM100( 24 ), "ARCHC", nullptr }, + { IN2MM100( 24 ), IN2MM100( 36 ), "ARCHD", nullptr }, + { IN2MM100( 36 ), IN2MM100( 48 ), "ARCHE", nullptr }, + { MM2MM100( 157.5), MM2MM100( 280 ), nullptr, nullptr }, //Screen 16:9 + { MM2MM100( 175 ), MM2MM100( 280 ), nullptr, nullptr } //Screen 16:10 }; diff --git a/i18nutil/source/utility/widthfolding.cxx b/i18nutil/source/utility/widthfolding.cxx index e9b46c71c8de..8b3e1cb816ef 100644 --- a/i18nutil/source/utility/widthfolding.cxx +++ b/i18nutil/source/utility/widthfolding.cxx @@ -48,7 +48,7 @@ OUString widthfolding::decompose_ja_voiced_sound_marks (const OUString& inStr, s // The reference count is 1 now. rtl_uString * newStr = rtl_uString_alloc(nCount * 2); - sal_Int32 *p = NULL; + sal_Int32 *p = nullptr; sal_Int32 position = 0; if (useOffset) { // Allocate double of nCount length to offset argument. @@ -126,7 +126,7 @@ OUString widthfolding::compose_ja_voiced_sound_marks (const OUString& inStr, sal // will be converted to // .. .. GA .. .. - sal_Int32 *p = NULL; + sal_Int32 *p = nullptr; sal_Int32 position = 0; if (useOffset) { // Allocate nCount length to offset argument. @@ -234,7 +234,7 @@ oneToOneMapping& widthfolding::getfull2halfTableForASC() table.mpIndex[high] = new UnicodePairWithFlag*[256]; for( j = 0; j < 256; j++ ) - table.mpIndex[high][j] = NULL; + table.mpIndex[high][j] = nullptr; } table.mpIndex[high][low] = &full2halfASCException[i]; } @@ -268,7 +268,7 @@ oneToOneMapping& widthfolding::gethalf2fullTableForJIS() table.mpIndex[high] = new UnicodePairWithFlag*[256]; for( j = 0; j < 256; j++ ) - table.mpIndex[high][j] = NULL; + table.mpIndex[high][j] = nullptr; } table.mpIndex[high][low] = &half2fullJISException[i]; } diff --git a/include/i18nutil/unicode.hxx b/include/i18nutil/unicode.hxx index ef720d03a8b8..c0e0419a11c1 100644 --- a/include/i18nutil/unicode.hxx +++ b/include/i18nutil/unicode.hxx @@ -38,7 +38,7 @@ class I18NUTIL_DLLPUBLIC unicode public: static sal_Int16 SAL_CALL getUnicodeType( const sal_Unicode ch ); - static sal_Int16 SAL_CALL getUnicodeScriptType( const sal_Unicode ch, const ScriptTypeList *typeList = NULL, sal_Int16 unknownType = 0 ); + static sal_Int16 SAL_CALL getUnicodeScriptType( const sal_Unicode ch, const ScriptTypeList *typeList = nullptr, sal_Int16 unknownType = 0 ); static sal_Unicode SAL_CALL getUnicodeScriptStart(css::i18n::UnicodeScript type); static sal_Unicode SAL_CALL getUnicodeScriptEnd(css::i18n::UnicodeScript type); static sal_uInt8 SAL_CALL getUnicodeDirection( const sal_Unicode ch ); |